xemacs-packages
mule-packages
site-packages
+gmon.out
+to 21.2.33 "Melpomene"
+-- Yet more progress gauge and gutter redisplay fixes from Andy Piper
+-- glyph error checking from Andy Piper
+-- Proper implementation of string glyps makes them Mule safe (IKEYAMA Tomonori)
+-- Bug fixes from the usual suspects
+-- --with-clash-detection now defaults to `yes', at least for betas.
+-- Autoconf support for detecting how to #include header files
+ with names containing preprocessor constants, Didier Verna.
+-- LDAP documentation updated, Oscar Figueiredo.
+-- clash-detection code cleaned and audited, Yoshiki and Martin
+-- Fix hangs on DEC OSF 4.0 when (process-send-string) sends strings
+ longer than 252 bytes.
+-- Fix non-ANSI macro hacking to allow compilation by Irix native compiler.
+-- redisplay fixes, IKEYAMA Tomonori
+-- Code cleaning, Mike Alexander
+-- Pdump + Windows support, Mike Alexander
+-- Sound code cleanup, Jan Vroonhof
+-- yes-or-no-p-dialog-box no longer gives unpredictable results with
+ focus follows mouse, Martin Buchholz
+
+to 21.2.32 "Kastor & Polydeukes"
+-- Internal Postgres RDBMS support from Steve Baur
+-- Improve gutter useability
+-- Fix window geometry with gutters
+-- Fix async updates so that they only occur when neccessary
+-- Gutter documentation from Stephen Turnbull
+-- redisplay-gutter-area fixes from Andy Piper
+-- pdump file in MS-Windows executable from Mike Alexander
+-- Miscellaneous fixes from Andy Piper
+-- Windows and menubar changes from Ben Wing
+-- dumper changes from Olivier Galibert
+
+to 21.2.31 "Iris"
+-- Make XEmacs work on Windows again.
+
+to 21.2.30 "Hygeia"
+-- Make (find-tag-other-window) always use other window,
+ even if tag is found in buffer of current window, Samuel Mikes
+-- Make configure complain about broken compiler versions (Jan Vroonhof, Yoshiki Hayashi, Bill Perry)
+-- `write-region' now deals properly with non-ASCII file names, Martin Buchholz
+-- `file-truename' now respects file-name-coding-system, Martin Buchholz
+-- arm configure support fixed.
+-- non-ASCII string handling performance boost, Martin Buchholz
+-- Garbage collector performance boost, Martin Buchholz
+-- Lisp engine performance boost, Martin Buchholz
+-- New ldap API (Oscar Figueiredo)
+-- (- 0) is now optimized to 0, not (-), Martin Buchholz
+-- More gutter tabs fixes, Andy Piper
+
+to 21.2.29 "Hestia"
+-- Fix compile errors on pre-X11R6 systems, introduced in 21.2.28.
+-- Fix autodetection of Berkeley DB on Linux Glibc 2 systems.
+ (but more work needed)
+-- Allow non-symbols (anything compared with `eq') in object plists.
+-- Cleanup of property frobbing code.
+-- Various AIX 4 fixes, including port of PDUMP.
+-- Unconditionally define _POSIX_C_SOURCE, _XOPEN_SOURCE, _XOPEN_SOURCE_EXTENDED.
+-- MS-Windows redisplay and font fixes from Jonathan Harris.
+-- various fixes from Craig Lanning, Daiki Ueno.
+-- Asynchronous widget updates from Andy Piper.
+-- More widget fixes from Andy Piper.
+-- Don't use rel_alloc on glibc systems, including Linux
+-- Upgrade etags.c to version 13.44, Francesco Potorti
+-- etags does a better job of finding the exact match first, Kyle Jones
+-- Portable dumper now described in Internals manual, Olivier and Martin
+-- Object Plist documentation in lispref updated, Martin Buchholz
+-- Just use standard `const' everywhere, instead of CONST
+-- More pdump changes, Olivier Galibert
+
to 21.2.28 "Hermes"
-- Add configure support for NetWinders, Sean MacLennan
-- Make the "Load .emacs" menu item work again, Kirill Katsnelson
to 21.2.27 "Hera"
-- Dynamic layout for widgets from Andy Piper
+-- Vertical tab widgets for MS-Windows from Andy Piper
+-- pdump fixes for MS-Windows from Big K
-- config.sub, config.guess major upgrade, Marcus Thiessel
-- gdbinit renamed to .gdbinit
-- dbxrc renamed to .dbxrc
-- 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
+-- Completely revamped GPM support from William Perry
-- 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
* configure.in: Add new option `--with-utf-2000'; define `UTF2000'
if it is specified.
+2000-05-01 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.33 is released.
+
+2000-04-27 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * configure.in: Use ORDINARY_LD instead of "\$(ORDINARY_LD)" for
+ the value of LD.
+
+2000-04-26 Ben Wing <ben@xemacs.org>
+
+ * configure.in: add support for --quick-build. Remove --no-doc-file,
+ subsumed.
+
+2000-04-19 Martin Buchholz <martin@xemacs.org>
+
+ * configure.in:
+ * src/config.h.in:
+ Rewrite SMART_INCLUDE implementation to actually work.
+ Be paranoid - Avoid use of spaces in these macro definitions.
+ Leave alloca() definition at start of compilation unit,
+ as AIX requests.
+ Rename SMART_INCLUDE_MACRO to SMART_INCLUDE_INDIRECTIONS.
+
+2000-04-13 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * configure.in: Enable clash-detection by default.
+ * configure.usage: Update documentation.
+
+2000-04-06 Andy Piper <andy@xemacs.org>
+
+ * configure.in: fix typo.
+
+2000-04-12 Andy Piper <andy@xemacs.org>
+
+ * etc/Emacs.ad: give the gui-element face the same font as the
+ menubar and popups. Add translations for text widgets.
+
+2000-04-03 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * configure.in : Fix printing error check warning even if
+ it is not compiled in.
+
+2000-02-19 Jan Vroonhof <vroonhof@math.ethz.ch>
+
+ * xemacs/configure.in: Do a normal link when compiling with
+ --pdump. Don't try compiling an unexec object file.
+
+2000-03-27 Didier Verna <didier@xemacs.org>
+
+ * configure.in: reorganize the output by topic.
+ New configure test to define the proper SMART_INCLUDE macro.
+
+ * configure.usage: slightly rearanged some options.
+
+2000-03-25 Didier Verna <didier@xemacs.org>
+
+ * configure.in: rename `foo_h_path' to `foo_h_file' for variables
+ representing real headers and not directories. This applies to
+ `db_h_path', `curses_h_path', `term_h_path', `tt_c_h_path' and
+ `soundcard_h_path'.
+
+2000-03-21 Didier Verna <didier@xemacs.org>
+
+ * configure.in: try to find postgresql headers at different places
+ and define POSTGRES_H_PATH as appropriate.
+
+2000-03-22 Andy Piper <andy@xemacs.org>
+
+ * config.h.in: add ERROR_CHECK_GLYPHS.
+
+ * configure.in: add error_check_glyphs.
+
+2000-03-20 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.32 is released.
+
+2000-03-15 Olivier Galibert <galibert@pobox.com>
+
+ * configure.in: Add dumper.o object when pdumping.
+
+2000-02-20 Olivier Galibert <galibert@pobox.com>
+
+ * Makefile.in.in: Add pdump install support
+
+ * configure.in: Add EMACS_PROGNAME config.h variable.
+
+2000-03-10 SL Baur <steve@musashimaru.m17n.org>
+
+ * configure.usage: document --with-postgresql flag.
+
+2000-03-06 SL Baur <steve@musashimaru.m17n.org>
+
+ * configure.in: add autodetection of PostgreSQL runtime libraries
+
+2000-03-09 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * aclocal.m4 (XE_SHLIB_STUFF): Define ld_shlibs to yes
+ when C compiler can produce shared libraries.
+
+2000-03-01 Didier Verna <didier@xemacs.org>
+
+ * etc/NEWS: update the rect.el entry.
+
+2000-02-26 Martin Buchholz <martin@xemacs.org>
+
+ * configure.in: Unconditionally define SHELL, to allow working
+ with (unreleased) autoconf 2.14.1, found on Mandrake 7.0 systems.
+
+2000-02-23 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.31 is released.
+
+2000-02-21 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.30 is released.
+
+2000-02-20 Martin Buchholz <martin@xemacs.org>
+
+ * configure.in: Enforce use of autoconf version >= 2.13.
+
+ * configure.in: Fix OS release test on Solaris.
+
+2000-02-19 Marcus Thiessel <marcus@xemacs.org>
+
+ * PROBLEMS: Update email address. Describe more HP Motif errors.
+
+2000-02-19 Jan Vroonhof <vroonhof@math.ethz.ch>
+
+ * configure.in: Split Solaris version test in two parts. In the
+ Bourne shell the "-a" operator does NOT short-circuit.
+
+1999-12-15 Jan Vroonhof <jan@xemacs.org>
+
+ * (configure.in): Autodetect broken gcc versions. Patch from WM
+ Perry with tiny tweaks by Yoshiki Hayashi and yours truly.
+
+2000-02-17 Martin Buchholz <martin@xemacs.org>
+
+ * configure.in: Autodetect sys/param.h. Reorganize
+ AC_CHECK_HEADERS call.
+ * src/config.h.in: Add HAVE_SYS_PARAM_H.
+
+2000-02-16 Martin Buchholz <martin@xemacs.org>
+
+ * configure.in: Test for arm simply using arm* instead of arm-*
+
+2000-01-05 Yoshiki Hayashi <t90553@mail.ecc.u-tokyo.ac.jp>
+
+ * etc/TUTORIAL.ja: Synch with English version.
+
+2000-02-16 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.29 is released.
+
+2000-02-16 Martin Buchholz <martin@xemacs.org>
+
+ * configure.in: Don't use rel_alloc if malloc() calls mmap().
+ Discover this by looking for M_MMAP_THRESHOLD.
+
+ * configure.in: Don't define POSIX_C_SOURCE on Solaris, due to
+ bugs in (at least) Solaris 2.5 headers.
+
+2000-01-29 Craig Lanning <CraigL@DyCon.com>
+
+ * configure.in: Fix detection of XPM on systems without X11.
+
+2000-02-11 Martin Buchholz <martin@xemacs.org>
+
+ * configure.in:
+ * src/config.h.in:
+ Define _POSIX_C_SOURCE, _XOPEN_SOURCE, _XOPEN_SOURCE_EXTENDED,
+ but only on tested Operating systems - Linux && SunOS >= 5.5.
+
+2000-02-09 Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
+
+ * aclocal.m4: Support dlls on aix[34].
+
+2000-02-09 Martin Buchholz <martin@xemacs.org>
+
+ * .cvsignore: Ignore gmon.out
+
+2000-02-08 Martin Buchholz <martin@xemacs.org>
+
+ * configure.in: Sync Berkeley db autodetection with src/database.c
+
+2000-02-07 Martin Buchholz <martin@xemacs.org>
+
+ * configure.in: check for XConvertCase.
+
2000-02-07 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.28 is released.
2000-01-27 URA Hiroshi <ura@hiru.aoba.yokohama.jp>
+
* configure.in: added getaddrinfo and getnameinfo to AC_FUNC.
2000-01-26 Martin Buchholz <martin@xemacs.org>
2000-01-08 Martin Buchholz <martin@xemacs.org>
- * configure.in:
+ * configure.in:
- Allow find-tag to work in the build directory.
- rename src/gdbinit to src/.gdbinit, so that gdb can find it.
- Less verbose messages when creating .sbinit, .gdbinit, TAGS.
1999-12-13 Martin Buchholz <martin@xemacs.org>
- * configure.in:
+ * configure.in:
* configure.usage:
- Autodetect NAS. Change Docs accordingly.
1999-11-26 Martin Buchholz <martin@xemacs.org>
- * configure.in:
+ * configure.in:
Add configure support for Unix 98 type ssize_t.
1999-11-27 Martin Buchholz <martin@xemacs.org>
* 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.
1999-11-17 Martin Buchholz <martin@xemacs.org>
- * Makefile.in.in (install-arch-dep):
+ * Makefile.in.in (install-arch-dep):
Fix `make install' if prefix != exec_prefix.
1999-11-15 Martin Buchholz <martin@xemacs.org>
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
+ $canonical, so that installation paths and dynamic path setup will
stay in synch.
1999-09-20 Andy Piper <andy@xemacs.org>
1999-08-27 Jan Vroonhof <vroonhof@math.ethz.ch>
- * modules/zlib/Makefile (distclean):
- * modules/ldap/Makefile (distclean):
- * modules/sample/Makefile (distclean):
+ * 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
* 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.
1999-07-23 Jan Vroonhof <vroonhof@math.ethz.ch>
- * etc/custom/example-themes/example-theme.el:
- * etc/custom/example-themes/europe-theme.el:
+ * etc/custom/example-themes/example-theme.el:
+ * etc/custom/example-themes/europe-theme.el:
* etc/custom/example-themes/ex-custom-file: Some simple examples
- illustrating the custom theme support.
+ illustrating the custom theme support.
1999-07-17 MORIOKA Tomohiko <tomo@etl.go.jp>
1999-06-25 Michael Sperber [Mr. Preprocessor] <sperber@informatik.uni-tuebingen.de>
* configure.in (with_prefix): Added --with-prefix, defaults to
- yes, to control whether the value of --prefix is compiled into the
+ yes, to control whether the value of --prefix is compiled into the
binary.
1999-07-03 Andy Piper <andy@xemacs.org>
1999-05-31 SL Baur <steve@steve1.m17n.org>
* configure.in (CPP): Don't check for include subdirectories in
- site-prefix directories. This check loses in valid configurations
+ site-prefix directories. This check loses in valid configurations
like /usr/jp in TurboLinux. Conditionally add include directory to
site switches.
1999-05-06 Hrvoje Niksic <hniksic@srce.hr>
- * aclocal.m4 (ld_dynamic_link_flags): Change -Bexport to -Bdynamic
+ * aclocal.m4 (ld_dynamic_link_flags): Change -Bexport to -Bdynamic
for Solaris.
1999-05-03 Hrvoje Niksic <hniksic@srce.hr>
1999-01-05 Gunnar Evermann <ge204@eng.cam.ac.uk>
- * PROBLEMS: Document crashes on SPARC with gcc 2.8.1.
+ * PROBLEMS: Document crashes on SPARC with gcc 2.8.1.
1999-03-01 XEmacs Build Bot <builds@cvs.xemacs.org>
1999-02-10 Martin Buchholz <martin@xemacs.org>
- * configure.in:
+ * configure.in:
- Fixup xfs comments and redundant option checking
- * configure.in:
- * INSTALL:
+ * configure.in:
+ * INSTALL:
* lisp/paths.el:
- improved automounter tmp directory support.
- support 4 (!) empirically discovered automounter conventions
1999-02-10 Martin Buchholz <martin@xemacs.org>
- * lwlib/lwlib.h:
- - redo CONST hacking to deal with X11 R4, which was
+ * lwlib/lwlib.h:
+ - redo CONST hacking to deal with X11 R4, which was
broken in a previous patch.
1999-02-10 Martin Buchholz <martin@xemacs.org>
- * configure.in:
+ * configure.in:
- irix uses -rpath
1999-02-10 Martin Buchholz <martin@xemacs.org>
- * configure.in:
+ * configure.in:
- Check for XOpenIM before using xim=xlib
- only use XmIm if $have_motif = yes
* configure.in: remove -O3 prevention on cygwin - current versions
cope ok now. remove dll prevention on cygwin - the new module
code checks correctly.
-
+
1999-01-10 J. Kean Johnston <jkj@sco.com>
- * configure.in: Added moduledir as the path where loadable modules
+ * configure.in: Added moduledir as the path where loadable modules
are stored. Added --with-site-modules and --moduledir options.
- Ensure the SCO OpenServer compiles with --dynamic by default
- Check for dlfcn.h for dynamic loader
* XEmacs 21.0-beta33 is released.
-1998-03-26 Didier Verna <verna@inf.enst.fr>
+1998-03-26 Didier Verna <didier@xemacs.org>
* configure.in, Makefile.in: Removed infopath_user_defined---we
always want to propagate it.
* etc/FTP: Update address of what was formerly ftp.ibp.fr.
-1998-01-08 Didier Verna <verna@inf.enst.fr>
+1998-01-08 Didier Verna <didier@xemacs.org>
* configure.in: Get rid of INFOPATH for configure time.
* configure.usage (Usage): Ditto.
ChangeLog, README, Todo, paths.h, config.h, inc/*, runemacs.c,
xemacs.mak.
-1997-11-05 Didier Verna <verna@inf.enst.fr>
+1997-11-05 Didier Verna <didier@xemacs.org>
* configure.in: Added the --site-prefixes options for the configure
script. You give a colon or space separated list of prefixes, and
Thu Dec 5 11:56:05 1996 Joseph J Nuspl <nuspl@nvwls.cc.purdue.edu>
* configure.in (LIBS): Fix typo in dialog box test.
-
-
Copyright (c) 1994, 1995, 1996 Board of Trustees, University of Illinois
Copyright (c) 1994-1999 Free Software Foundation, Inc.
-Synched up with: FSF 19.30.
-
Permission is granted to anyone to make or distribute verbatim copies
of this document as received, in any medium, provided that the
copyright notice and permission notice are preserved,
of the Free Software Foundation are approved by the Foundation.
-BUILDING AND INSTALLATION (Unix and Cygwin, see the file nt/README
-for instructions on building under Microsoft Windows):
+BUILDING AND INSTALLATION FOR UNIX AND CYGWIN
+
+(for Microsoft Windows, see nt/README also.)
-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. 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.
+PREREQUISITES
+=============
- 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.
+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. 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.
+
+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
the documentation yourself, you will need at least version 1.68 of
makeinfo (GNU texinfo-3.11).
+ADD-ON LIBRARIES
+================
-2) Decide on what other software packages you would like to use with
+Decide on what other software packages you would like to use with
XEmacs, but are not yet available on your system. On some systems,
Motif and CDE are optional additions. On Solaris, the SUNWaudmo
package enables native sound support. There are also a number of free
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.]
-
-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. 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
+PACKAGE SYSTEM
+==============
-~/.xemacs::$prefix/lib/xemacs-${version}/mule-packages:$prefix/lib/xemacs/mule-packages:$prefix/lib/xemacs-${version}/xemacs-packages:$prefix/lib/xemacs/xemacs-packages
+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!
-This may be changed by specifying a different value with the
---package-path configuration option.
+CONFIGURATION OPTIONS
+=====================
-4) In the top level directory of the XEmacs distribution, run the
- program `configure' as follows:
+In the top level directory of the XEmacs distribution, run the
+program `configure' as follows:
./configure [CONFIGURATION-NAME] [--OPTION[=VALUE]] ...
The `--dynamic' option specifies that configure should try to link
emacs dynamically rather than statically.
-The `--const-is-losing' option is for use if you have trouble
-compiling due to the `const' storage class in C. This is defined by
-default. Most users should have no need to change this.
-
You can build XEmacs for several different machine types from a single
source directory. To do this, you must use a version of `make' that
-supports the `VPATH' variable, such as GNU `make'. Make separate
+supports the `VPATH' variable, such as GNU `make'. Create separate
build directories for the different configuration types, and in each
one, run the XEmacs `configure' script. `configure' looks for the
Emacs source code in the directory that `configure' is in.
EXECDIR/lib/xemacs-VERSION/CONFIGURATION-NAME.
EXECDIR/bin should be a directory that is normally in users' PATHs.
-For example, the command
-
- ./configure mips-dec-ultrix --with-x11=yes
-
-configures XEmacs to build for a DECstation running Ultrix, with
-support for the X11 window system.
+If you specify --prefix (or any of the other installation directory
+options), they will get compiled into the xemacs executable so it will
+be able to find its various associated file. However, XEmacs has
+quite elaborate logic to find out the locations of these directories
+dynamically. Sometimes, it is desirable *not* to compile these
+directories into the executable so you can move the XEmacs
+installation around (as whole) at will. This is true for binary kits,
+for instance. Therefore, you can specify --without-prefix on the
+configure command line to prevent the installation prefix to become
+part of the generated executable; everything else will continue to
+work as usual.
The `--with-menubars=TYPE' option allows you to specify which X
toolkit you wish to use for the menubar. The valid options are
`--with-xim', `--with-canna' and `--with-wnn' as your system
supports.
+MAIL LOCKING
+============
+
+Find out what the preferred method for locking mail spool files is in
+your environment. Presently, XEmacs supports lockf, flock, and dot
+locking. Specify the locking method via the --mail-locking=METHOD
+option to configure. Valid values for METHOD are --mail-locking are
+`lockf', `flock', and `dot'.
+
+RUNNING CONFIGURE
+=================
+
`configure' doesn't do any compilation or installation itself. It
just creates the files that influence those things: `./src/config.h',
and all the Makefile's in the build tree.
-The `--with-pop', `--with-hesiod', and `--with-kerberos' options are used
-in conjunction with movemail. As of XEmacs 20.1, movemail is identical
-to the one used in Emacs.
-
When it is done, `configure' prints a description of what it did and
creates a shell script `config.status' which, when run, recreates the
same configuration. If `configure' exits with an error after
disturbing the status quo, it removes `config.status'.
-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,
-rather than `defvar', as used by `./lisp/paths.el'. For example,
+AUXILIARY PATHS
+===============
+
+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, rather than
+`defvar', as used by `./lisp/paths.el'. For example,
(setq news-inews-program "/usr/bin/inews")
XEmacs cannot detect, you may need to change the value of
`directory-abbrev-alist'.
-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-SPECIFIC STARTUP CODE
+==========================
+
+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
src/Makefile.in.in if you wish to figure out how to do that). For all
else, use site-init.el.
-If you set load-path to a different value in site-init.el or
-site-load.el, XEmacs will use *precisely* that value when it starts up
-again. If you do this, you are on your own!
-
Note that, on some systems, the code you place in site-init.el must
not use expand-file-name or any other function which may look
something up in the system's password and user information database.
The `site-*.el' files are nonexistent in the distribution. You do not
need to create them if you have nothing to put in them.
-7) Refer to the file `./etc/TERMS' for information on fields you may
+TERMCAP CONFIGURATION
+=====================
+
+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.
-8) Run `make' in the top directory of the XEmacs distribution to finish
+RUNNING MAKE
+============
+
+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
If these directories are not what you want, you can specify where to
install XEmacs's libraries and data files or where XEmacs should search
for its lisp files by giving values for `make' variables as part of
-the command. See the section below called `MAKE VARIABLES' for more
-information on this.
-
-Using GNU Make allows for simultaneous builds with and without the
---srcdir option.
-
-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.
-
-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'.
-
-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
+the command.
You can change where the build process installs XEmacs and its data
files by specifying values for `make' variables as part of the `make'
(where VERSION and CONFIGURATION-NAME are as described above).
`docdir' indicates where to put Lisp documentation strings that XEmacs
- refers to as it runs. It defaults the value of `archlibdir'
+ refers to as it runs. It defaults to the value of `archlibdir'
(see above).
`moduledir' indicates where XEmacs installs and expects to find
Makefiles for the subdirectories, so you don't have to specify them
when running make in the subdirectories.
+Using GNU Make allows for simultaneous builds with and without the
+--srcdir option.
-CONFIGURATION BY HAND
-
-Instead of running the `configure' program, you have to perform the
-following steps.
-
-1) Copy `./src/config.h.in' to `./src/config.h'.
-
-2) Consult `./etc/MACHINES' to see what configuration name you should
-use for your system. Look at the code of the `configure' script to
-see which operating system and architecture description files from
-`src/s' and `src/m' should be used for that configuration name. Edit
-`src/config.h', and change the two `#include' directives to include
-the appropriate system and architecture description files.
-
-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'.
-
-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
-the variables `prefix' and `exec_prefix', since the rest of the
-variables have reasonable defaults based on them. For each Makefile
-variable of this type, there is a corresponding configure option; for
-example, to change the location of the lock directory, you might use
-
- ./configure --lockdir=/nfs/xemacslock
-
-The `configure' script is built from `configure.in' by the `autoconf'
-program. However, since XEmacs has configuration requirements that
-autoconf can't meet, `configure.in' uses a marriage of custom-baked
-configuration code and autoconf macros. New versions of autoconf
-could very well break this arrangement, so it may be wise to avoid
-rebuilding `configure' from `configure.in' when possible.
-
-
-BUILDING XEMACS BY HAND
-
-Once XEmacs is configured, running `make' in the top directory performs
-the following steps.
-
-1) Run `make src/paths.h' in the top directory. This produces
-`./src/paths.h' from the template file `./src/paths.h.in', changing
-the paths to the values specified in `./Makefile'.
-
-2) Cd to `./lib-src' and run `make'. This creates executables named
-`ctags' and `etags' and `wakeup' and `make-docfile' and `digest-doc'
-and `test-distrib'. And others.
-
-3) Cd to `./src' and Run `make'. This refers to files in the `./lisp'
-and `./lib-src' subdirectories using names `../lisp' and
-`../lib-src'.
-
-This creates a file `./src/xemacs' which is the runnable XEmacs,
-assigning it a new build version number by incrementing the build
-version stored in `./lisp/version.el'.
-
-It also creates a file in `./lib-src' whose name is `DOC' followed by
-the current XEmacs version. This file contains documentation strings
-for all the functions in XEmacs. Each time you run make to make a new
-xemacs, a new DOC file with a new name is made. You must keep the DOC
-file for an XEmacs version as long as you keep using that XEmacs
-version.
-
-
-INSTALLATION BY HAND
-
-The steps below are done by running `make install' in the main
-directory of the XEmacs distribution.
-
-1) Copy `./lisp' and its subdirectories, `./etc', and the executables
-in `./lib-src' to their final destinations, as selected in `./src/paths.h'.
-
-Strictly speaking, not all of the executables in `./lib-src' need be copied.
-- The programs `cvtmail', `emacsserver', `env', `fakemail', `hexl',
- `movemail', `timer', `vcdiff', `wakeup', and `yow' are used by
- XEmacs; they do need to be copied.
-- The programs `etags', `ctags', `emacsclient', `b2m', `rcs2log',
- `gnuclient', `gnudoit', and `gnuattach' are intended to be run
- by users; they are handled below.
-- The programs `make-docfile' and `test-distrib' were
- used in building XEmacs, and are not needed any more.
-- The programs `digest-doc' and `sorted-doc' convert a `DOC' file into
- a file for users to read. There is no important reason to move them.
-
-2) Copy the files in `./info' to the place specified in
-`./lisp/site-init.el' or `./lisp/paths.el'. Note that if the
-destination directory already contains a file named `dir', you
-probably don't want to replace it with the `dir' file in the XEmacs
-distribution. Instead, you should make sure that the existing `dir'
-file contains an appropriate menu entry for the XEmacs info.
+MAIL-LOCKING POST-INSTALLATION
+==============================
-3) Create a directory for XEmacs to use for clash detection, named as
-indicated by the PATH_LOCK macro in `./src/paths.h'.
+If your system uses dot-locking 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.
-4) Copy `./src/xemacs' to `/usr/local/bin', or to some other directory
-in users' search paths. `./src/xemacs' has an alternate name
-`./src/emacs-EMACSVERSION'; you may wish to make a symbolic link named
-`/usr/local/bin/xemacs' pointing to that alternate name, as an easy way
-of installing different versions.
+CLEANING UP
+==========
-You can delete `./src/temacs'.
-
-5) Copy the programs `b2m', `emacsclient', `ctags', `etags', `rcs2log',
-`gnuclient', `gnudoit', and `gnuattach' from `./lib-src' to
-`/usr/local/bin'. These programs are intended for users to run.
-
-6) Copy the man pages in `./etc' for xemacs, ctags, etags, and gnuserv
-into the appropriate man directories.
+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'.
-7) The files in the `./src' subdirectory, except for `xemacs', are not
-used by XEmacs once it is built. The source would be handy for
-debugging.
+READ README.packages
+====================
+Do it!
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
See the file PROBLEMS in this directory for a list of various
problems sometimes encountered, and what to do about them.
-
-
-If all else fails, please see etc/InstallGuide courtesy
-of Jonathan Seth Hayward.
dump-elc dump-elcs: ${GENERATED_HEADERS} FRC.dump-elcs
cd ./src && $(RECURSIVE_MAKE) dump-elcs
-autoloads: src
- MAKE='$(MAKE)' EMACS='./src/$(PROGNAME)' $(SHELL) ${srcdir}/lib-src/update-autoloads.sh
+autoloads: lisp/auto-autoloads.el lisp/custom-load.el
+
+FRC.lisp.auto.autoloads.el:
+lisp/auto-autoloads.el: FRC.lisp.auto.autoloads.el
+ rm -f lisp/auto-autoloads.el
+ ${blddir}/src/${PROGNAME} -batch -vanilla \
+ -l autoload -f batch-update-directory lisp
+ ${blddir}/src/${PROGNAME} -batch -vanilla \
+ -f batch-byte-compile lisp/auto-autoloads.el
+ @rm -f lisp/auto-autoloads.el~
+#ifdef MULE
+ rm -f lisp/mule/auto-autoloads.el
+ ${blddir}/src/${PROGNAME} -batch -vanilla \
+ -l autoload -f batch-update-directory lisp/mule
+ ${blddir}/src/${PROGNAME} -batch -vanilla \
+ -f batch-byte-compile lisp/mule/auto-autoloads.el
+ @rm -f lisp/mule/auto-autoloads.el~
+#endif
-custom-loads:
- MAKE='$(MAKE)' EMACS='./src/$(PROGNAME)' $(SHELL) ${srcdir}/lib-src/update-custom.sh
+FRC.lisp.custom.load.el:
+lisp/custom-load.el: FRC.lisp.custom.load.el
+ ${blddir}/src/${PROGNAME} -batch -vanilla -l cus-dep \
+ -f Custom-make-dependencies lisp
finder: src
@echo "Building finder database ..."
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 PDUMP
+ ${INSTALL_DATA} src/${PROGNAME}.dmp ${bindir}/${PROGNAME}-${version}-`src/${PROGNAME} -sd`.dmp
+#endif
#ifdef WINDOWSNT
${INSTALL_PROGRAM} src/${PROGNAME} ${bindir}/${PROGNAME}
-chmod 0755 ${bindir}/${PROGNAME}
** AIX
*** On AIX 4.3, you must specify --with-dialogs=athena with configure
-*** The libXt shipped with AIX 4.3 is broken. This causes xemacs -nw
- to fail in various ways. The solution is to build against stock
- X11R6.
+*** The libXt shipped with AIX 4.3 up to 4.3.2 is broken. This causes
+ xemacs -nw to fail in various ways. The official APAR is this:
+
+APAR NUMBER: <IX89470> RESOLVED AS: PROGRAM ERROR
+
+ABSTRACT:
+<IX89470>: LIBXT.A INCORRECT HANDLING OF EXCEPTIONS IN XTAPPADDINPUT
+
+ The solution is to install X11.base.lib at version >=4.3.2.5.
*** On AIX, you get this compiler error message:
*** On HP-UX, problems with make
-Marcus Thiessel <marcus_thiessel@hp.com>
+Marcus Thiessel <marcus@xemacs.org>
Some releases of XEmacs (e.g. 20.4) require GNU make to build
successfully. You don't need GNU make when building 21.x.
*** On HP-UX 9.05 XEmacs won't compile or coredump during the build.
-Marcus Thiessel <marcus_thiessel@hp.com>
+Marcus Thiessel <marcus@xemacs.org>
This might be a sed problem. For your own safety make sure to use
GNU sed while dumping XEmacs.
-*** On HP-UX 11.0 XEmacs causes excessive X11 errors when running.
+*** On HP-UX 11.0 XEmacs causes excessive X11 errors when running.
+ (also appears on AIX as reported in comp.emacs.xemacs)
-Marcus Thiessel <marcus_thiessel@hp.com>
+Marcus Thiessel <marcus@xemacs.org>
Unfortunately, XEmacs releases prior to 21.0 don't work with
Motif2.1. It will compile but you will get excessive X11 errors like
Make sure /usr/lib/Motif1.2_R6/libXm.sl is a link to
/usr/lib/Motif1.2_R6/libXm.3.
+*** On HP-UX 11.0: Object "" does not have windowed ancestor
+
+Marcus Thiessel <marcus@xemacs.org>
+
+ XEmacs dies without core file and reports:
+
+ Error: Object "" does not have windowed ancestor.
+
+ This is a bug. Please apply the patch PHSS_19964 (check if
+ superseded). The other alternative is to link with Motif1.2_R6 (see
+ previous item).
+
+
** SCO OpenServer
*** Native cc on SCO OpenServer 5 is now OK. Icc may still throw you
a curve. Here is what Robert Lipe <robertl@arnet.com> says:
# PIC is the default for these OSes.
;;
- os2*)
+ aix3* | aix4* | os2*)
# We can build DLLs from non-PIC.
;;
amigaos*)
dll_ld=$CC
dll_ldflags=$xcldf
can_build_shared=yes
+ ld_shlibs=yes
else
# OK - only NOW do we futz about with ld.
# See if the linker supports building shared libraries.
### from the file `./configure.in'.
### To rebuild it, execute the command
### autoconf
-### in the this directory. You must have autoconf version 2.12 or later.
+### in the this directory. You must have autoconf version 2.13 or later.
### This file is part of XEmacs.
subdirs=
MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
ac_max_here_lines=12
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
with_sparcworks | \
with_tooltalk | \
with_ldap | \
+ with_postgresql | \
with_pop | \
with_kerberos | \
with_hesiod | \
external_widget | \
verbose | \
extra_verbose | \
- const_is_losing | \
usage_tracking | \
use_union_type | \
pdump | \
memory_usage_stats | \
with_clash_detection | \
with_modules | \
- no_doc_file )
+ quick_build )
case "$val" in
y | ye | yes ) val=yes ;;
n | no ) val=no ;;
byte_code ) error_check_byte_code=yes ;;
nobyte_code ) error_check_byte_code=no ;;
+ glyphs ) error_check_glyphs=yes ;;
+ noglyphs ) error_check_glyphs=no ;;
+
* ) bogus_error_check=yes ;;
esac
if test "$bogus_error_check" -o \
\( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
if test "$error_check_default" = yes ; then
- types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', and \`nobyte-code'."
+ types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
else
- types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', and \`byte-code'."
+ types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
fi
(echo "$progname: Usage error:"
echo " " "Valid types for the \`--$optname' option are:
error_check_gc=$new_default
error_check_malloc=$new_default
error_check_byte_code=$new_default
+ error_check_glyphs=$new_default
new_default= # reset this
fi
echeck_notfirst=true
"use_minimal_tagbits" | \
"use_indexed_lrecord_implementation" | \
"run_in_place" | \
+ "const_is_losing" | \
"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:838: checking whether ln -s works" >&5
+echo "configure:844: checking whether ln -s works" >&5
rm -f conftestdata
if ln -s X conftestdata 2>/dev/null
PROGNAME=xemacs
fi
+{ test "$extra_verbose" = "yes" && cat << EOF
+ Defining EMACS_PROGNAME = "$PROGNAME"
+EOF
+cat >> confdefs.h <<EOF
+#define EMACS_PROGNAME "$PROGNAME"
+EOF
+}
+
+
if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
test "${error_check_extents=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
Defining ERROR_CHECK_EXTENTS
EOF
}
+test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining ERROR_CHECK_GLYPHS
+EOF
+cat >> confdefs.h <<\EOF
+#define ERROR_CHECK_GLYPHS 1
+EOF
+}
+
if test "${debug:=$beta}" = "yes"; then
use_assertions=yes memory_usage_stats=yes
extra_objs="$extra_objs debug.o" && if test "$extra_verbose" = "yes"; then
echo $ac_n "checking "host system type"""... $ac_c" 1>&6
-echo "configure:1086: checking "host system type"" >&5
+echo "configure:1109: 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/'`
m68*-sony-* ) machine=news ;;
mips-sony-* ) machine=news-risc ;;
clipper-* ) machine=clipper ;;
- arm-* ) machine=arm ;;
- armv34lb-* ) machine=arm ;;
+ arm* ) machine=arm ;;
ns32k-* ) machine=ns32000 ;;
esac
fi
fi
-if test "$with_clash_detection" = "yes"; then
+if test "$with_clash_detection" != "no"; then
{ test "$extra_verbose" = "yes" && cat << \EOF
Defining CLASH_DETECTION
EOF
# 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:1582: checking for $ac_word" >&5
+echo "configure:1604: 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:1609: checking for $ac_word" >&5
+echo "configure:1631: 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:1657: checking for $ac_word" >&5
+echo "configure:1679: 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:1686: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1708: 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 1699 "configure"
+#line 1721 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1726: \"$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:1732: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1754: 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:1737: checking whether we are using GNU C" >&5
+echo "configure:1759: 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:1744: \"$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:1766: \"$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:1762: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1784: 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:1795: checking for $ac_word" >&5
+echo "configure:1817: 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:1822: checking for $ac_word" >&5
+echo "configure:1844: 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:1870: checking for $ac_word" >&5
+echo "configure:1892: 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:1899: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1921: 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 1912 "configure"
+#line 1934 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1939: \"$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:1945: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1967: 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:1950: checking whether we are using GNU C" >&5
+echo "configure:1972: 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:1957: \"$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:1979: \"$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:1975: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1997: 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:2008: checking for $ac_word" >&5
+echo "configure:2030: 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:2035: checking for $ac_word" >&5
+echo "configure:2057: 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:2083: checking for $ac_word" >&5
+echo "configure:2105: 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:2112: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2134: 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 2125 "configure"
+#line 2147 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2152: \"$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:2158: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2180: 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:2163: checking whether we are using GNU C" >&5
+echo "configure:2185: 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:2170: \"$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:2192: \"$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:2188: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2210: 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:2225: checking how to run the C preprocessor" >&5
+echo "configure:2247: 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 2238 "configure"
+#line 2260 "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:2244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2266: \"$ac_try\") 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 2255 "configure"
+#line 2277 "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:2261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2283: \"$ac_try\") 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 2272 "configure"
+#line 2294 "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:2278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2300: \"$ac_try\") 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_t""$CPP" 1>&6
+
echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:2303: checking for AIX" >&5
+echo "configure:2326: checking for AIX" >&5
cat > conftest.$ac_ext <<EOF
-#line 2305 "configure"
+#line 2328 "configure"
#include "confdefs.h"
#ifdef _AIX
yes
fi
rm -f conftest*
+
+cat > $srcdir/conffoo.h <<EOF
+#define CONFFOO 1
+EOF
+echo $ac_n "checking for a working inclusion macro""... $ac_c" 1>&6
+echo "configure:2357: checking for a working inclusion macro" >&5
+cat > conftest.$ac_ext <<EOF
+#line 2359 "configure"
+#include "confdefs.h"
+
+int main() {
+
+#define SMART_INCLUDE(path,file) <path/file>
+#define CONFFOO_H_PATH $srcdir
+#define CONFFOO_INCLUDE(file) SMART_INCLUDE (CONFFOO_H_PATH,file)
+#include CONFFOO_INCLUDE(conffoo.h)
+
+; return 0; }
+EOF
+if { (eval echo configure:2371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ echo "$ac_t""direct" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining SMART_INCLUDE_INDIRECTIONS = 0
+EOF
+cat >> confdefs.h <<\EOF
+#define SMART_INCLUDE_INDIRECTIONS 0
+EOF
+}
+
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ cat > conftest.$ac_ext <<EOF
+#line 2386 "configure"
+#include "confdefs.h"
+
+int main() {
+
+#define GLUE_INCLUDE(path,file) <##path##/##file##>
+#define SMART_INCLUDE(path,file) GLUE_INCLUDE(path,file)
+#define CONFFOO_H_PATH $srcdir
+#define CONFFOO_INCLUDE(file) SMART_INCLUDE(CONFFOO_H_PATH,file)
+#include CONFFOO_INCLUDE(conffoo.h)
+
+; return 0; }
+EOF
+if { (eval echo configure:2399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ echo "$ac_t""simple" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining SMART_INCLUDE_INDIRECTIONS = 1
+EOF
+cat >> confdefs.h <<\EOF
+#define SMART_INCLUDE_INDIRECTIONS 1
+EOF
+}
+
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ cat > conftest.$ac_ext <<EOF
+#line 2414 "configure"
+#include "confdefs.h"
+
+int main() {
+
+#define GLUE_INCLUDE_2(path,file) <##path##/##file##>
+#define GLUE_INCLUDE_1(path,file) GLUE_INCLUDE_2(path,file)
+#define SMART_INCLUDE(path,file) GLUE_INCLUDE_1(path,file)
+#define CONFFOO_H_PATH $srcdir
+#define CONFFOO_INCLUDE(file) SMART_INCLUDE (CONFFOO_H_PATH,file)
+#include CONFFOO_INCLUDE(conffoo.h)
+
+; return 0; }
+EOF
+if { (eval echo configure:2428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ echo "$ac_t""double" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining SMART_INCLUDE_INDIRECTIONS = 2
+EOF
+cat >> confdefs.h <<\EOF
+#define SMART_INCLUDE_INDIRECTIONS 2
+EOF
+}
+
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ { echo "configure: error: Cannot define a proper SMART_INCLUDE macro. Please report." 1>&2; exit 1; }
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+rm -f $srcdir/conffoo.h
+
echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
-echo "configure:2332: checking for GNU libc" >&5
+echo "configure:2454: checking for GNU libc" >&5
cat > conftest.$ac_ext <<EOF
-#line 2334 "configure"
+#line 2456 "configure"
#include "confdefs.h"
#include <features.h>
int main() {
; return 0; }
EOF
-if { (eval echo configure:2346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
have_glibc=yes
else
}
+case "$opsys" in
+ sol2)
+ { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining __EXTENSIONS__
+EOF
+cat >> confdefs.h <<\EOF
+#define __EXTENSIONS__ 1
+EOF
+}
+
+ if test "$os_release" -ge 55; then
+ { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining _XOPEN_SOURCE = 500
+EOF
+cat >> confdefs.h <<\EOF
+#define _XOPEN_SOURCE 500
+EOF
+}
+
+ { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining _XOPEN_SOURCE_EXTENDED
+EOF
+cat >> confdefs.h <<\EOF
+#define _XOPEN_SOURCE_EXTENDED 1
+EOF
+}
+
+ fi ;;
+ linux)
+ { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining _POSIX_C_SOURCE = 199506L
+EOF
+cat >> confdefs.h <<\EOF
+#define _POSIX_C_SOURCE 199506L
+EOF
+}
+
+ { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining _XOPEN_SOURCE = 500
+EOF
+cat >> confdefs.h <<\EOF
+#define _XOPEN_SOURCE 500
+EOF
+}
+
+ { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining _XOPEN_SOURCE_EXTENDED
+EOF
+cat >> confdefs.h <<\EOF
+#define _XOPEN_SOURCE_EXTENDED 1
+EOF
+}
+
+ ;;
+esac
cat > conftest.$ac_ext <<EOF
-#line 2368 "configure"
+#line 2545 "configure"
#include "confdefs.h"
int main () {
#if defined __SUNPRO_C
#endif
}
EOF
-if { (eval echo configure:2380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:2557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
:
else
configure___ ld_switch_shared=LD_SWITCH_SHARED
+#define ORDINARY_LD "\$(CC) \$(CFLAGS)"
+configure___ ordinary_ld=ORDINARY_LD
+
#ifdef ORDINARY_LINK
-#define LD "\$(CC) \$(CFLAGS)"
+#define LD ORDINARY_LD
#else /* no ORDINARY LINK */
#ifdef COFF_ENCAPSULATE
#define LD "\$(CC) -nostdlib"
rm $tempcname
+if test "$pdump" = "yes"; then
+ ordinary_link="yes"
+ ld="${ordinary_ld}"
+ start_files=
+ libs_standard=
+ unexec=
+ lib_gcc=
+fi
+
test "$extra_verbose" = "yes" && \
for var in libs_machine libs_system libs_termcap libs_standard objects_machine objects_system c_switch_machine c_switch_system ld_switch_machine ld_switch_system unexec ld_switch_shared ld lib_gcc ld_text_start_addr start_files ordinary_link have_terminfo mail_use_flock mail_use_lockf; do eval "echo \"$var = '\$$var'\""; done && echo ""
CFLAGS="-O" ; fi
fi
+if test "$GCC" = "yes"; then
+echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
+echo "configure:2793: checking for buggy gcc versions" >&5
+GCC_VERSION=`$CC --version`
+case `uname -s`:`uname -m`:$GCC_VERSION in
+ *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
+ case "$CFLAGS" in
+ *-O2*|*-O3*)
+ case "$CFLAGS" in
+ *-fno-schedule-insns*) ;;
+ *)
+ echo "$ac_t""Yes" 1>&6
+ echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
+ echo "configure: warning: without also using -fno-schedule-insns." 1>&2
+ { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ Linux:alpha:egcs-2.91.*)
+ echo "$ac_t""Yes" 1>&6
+ echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
+ echo "configure: warning: Alpha Linux. There have also been reports that egcs-1.0.3a is O.K." 1>&2
+ { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
+ ;;
+ *:i*86*:2.7.2*)
+ case "$GCC_VERSION" in
+ 2.7.2)
+ case "$CFLAGS" in
+ *-O2*|*-O3*)
+ case "$CFLAGS" in
+ *-fno-strength-reduce*) ;;
+ *)
+ echo "$ac_t""Yes" 1>&6
+ echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
+ echo "configure: warning: -fno-strength-reduce." 1>&2
+ { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ case "$CFLAGS" in
+ *-fno-caller-saves*) ;;
+ *)
+ echo "$ac_t""Yes" 1>&6
+ echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
+ echo "configure: warning: -fno-caller-saves." 1>&2
+ { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
+ ;;
+ esac
+ ;;
+esac
+fi
+echo "$ac_t""No" 1>&6
+
if test "$GCC" = "yes"; then
set x $ld_switch_system; shift; ld_switch_system=""
test -n "$objects_system" && extra_objs="$extra_objs $objects_system" && if test "$extra_verbose" = "yes"; then
echo " xemacs will be linked with \"$objects_system\""
fi
-test -n "$unexec" && extra_objs="$extra_objs $unexec" && if test "$extra_verbose" = "yes"; then
+test -n "$unexec" && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" && if test "$extra_verbose" = "yes"; then
echo " xemacs will be linked with \"$unexec\""
fi
+test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" && if test "$extra_verbose" = "yes"; then
+ echo " xemacs will be linked with \"dumper.o\""
+ fi
echo $ac_n "checking for dynodump""... $ac_c" 1>&6
-echo "configure:2666: checking for dynodump" >&5
+echo "configure:2916: 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:2704: checking for terminateAndUnload in -lC" >&5
+echo "configure:2954: 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 2709 "configure"
+#line 2959 "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:2720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2970: \"$ac_link\") 1>&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:2828: checking "for runtime libraries flag"" >&5
+echo "configure:3078: 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 2850 "configure"
+#line 3100 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3107: \"$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:2959: checking for malloc_get_state" >&5
+echo "configure:3209: checking for malloc_get_state" >&5
cat > conftest.$ac_ext <<EOF
-#line 2962 "configure"
+#line 3212 "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:2985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_malloc_get_state=yes"
else
fi
echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
-echo "configure:3005: checking for malloc_set_state" >&5
+echo "configure:3255: checking for malloc_set_state" >&5
cat > conftest.$ac_ext <<EOF
-#line 3008 "configure"
+#line 3258 "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:3031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3281: \"$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:3051: checking whether __after_morecore_hook exists" >&5
+echo "configure:3301: checking whether __after_morecore_hook exists" >&5
cat > conftest.$ac_ext <<EOF
-#line 3053 "configure"
+#line 3303 "configure"
#include "confdefs.h"
extern void (* __after_morecore_hook)();
int main() {
__after_morecore_hook = 0
; return 0; }
EOF
-if { (eval echo configure:3060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3310: \"$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
if test "$system_malloc" = "yes" ; then
GNU_MALLOC=no
GNU_MALLOC_reason="
- (The GNU allocators don't work with this system configuration)."
+ - The GNU allocators don't work with this system configuration."
elif test "$with_system_malloc" = "yes" ; then
GNU_MALLOC=no
GNU_MALLOC_reason="
- (User chose not to use GNU allocators)."
+ - User chose not to use GNU allocators."
elif test "$with_debug_malloc" = "yes" ; then
GNU_MALLOC=no
GNU_MALLOC_reason="
- (User chose to use Debugging Malloc)."
+ - User chose to use Debugging Malloc."
fi
if test "$doug_lea_malloc" = "yes" ; then
if test "$GNU_MALLOC" = yes ; then
GNU_MALLOC_reason="
- (Using Doug Lea's new malloc from the GNU C Library.)"
+ - Using Doug Lea's new malloc from the GNU C Library."
fi
{ test "$extra_verbose" = "yes" && cat << \EOF
Defining DOUG_LEA_MALLOC
if test "$after_morecore_hook_exists" = "no" ; then
GNU_MALLOC_reason="
- (Using Doug Lea's new malloc from the Linux C Library.)"
+ - Using Doug Lea's new malloc from the Linux C Library."
{ test "$extra_verbose" = "yes" && cat << \EOF
Defining _NO_MALLOC_WARNING_
EOF
# 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:3119: checking for $ac_word" >&5
+echo "configure:3369: 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:3174: checking for a BSD compatible install" >&5
+echo "configure:3424: 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:3228: checking for $ac_word" >&5
+echo "configure:3478: checking for $ac_word" >&5
if test -n "$YACC"; then
ac_cv_prog_YACC="$YACC" # Let the user override the test.
test -n "$YACC" || YACC="yacc"
-for ac_hdr in mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3260: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3263 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- { test "$extra_verbose" = "yes" && cat << EOF
- Defining $ac_tr_hdr
-EOF
-cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-}
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in utime.h locale.h libgen.h fcntl.h ulimit.h cygwin/version.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3301: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3304 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- { test "$extra_verbose" = "yes" && cat << EOF
- Defining $ac_tr_hdr
-EOF
-cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-}
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h
+for ac_hdr in a.out.h cygwin/version.h fcntl.h inttypes.h libgen.h locale.h mach/mach.h sys/param.h sys/pstat.h sys/stropts.h sys/time.h sys/timeb.h sys/un.h kstat.h ulimit.h unistd.h utime.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3342: checking for $ac_hdr" >&5
+echo "configure:3510: checking for $ac_hdr" >&5
cat > conftest.$ac_ext <<EOF
-#line 3345 "configure"
+#line 3513 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3518: \"$ac_try\") 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:3380: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:3548: checking for sys/wait.h that is POSIX.1 compatible" >&5
cat > conftest.$ac_ext <<EOF
-#line 3383 "configure"
+#line 3551 "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:3399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3567: \"$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:3423: checking for ANSI C header files" >&5
+echo "configure:3591: checking for ANSI C header files" >&5
cat > conftest.$ac_ext <<EOF
-#line 3426 "configure"
+#line 3594 "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:3434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3602: \"$ac_try\") 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 3451 "configure"
+#line 3619 "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 3469 "configure"
+#line 3637 "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 3487 "configure"
+#line 3655 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
exit (0); }
EOF
-if { (eval echo configure:3498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:3666: \"$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:3524: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:3692: checking whether time.h and sys/time.h may both be included" >&5
cat > conftest.$ac_ext <<EOF
-#line 3527 "configure"
+#line 3695 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:3536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3704: \"$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:3560: checking for sys_siglist declaration in signal.h or unistd.h" >&5
+echo "configure:3728: checking for sys_siglist declaration in signal.h or unistd.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 3563 "configure"
+#line 3731 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
char *msg = *(sys_siglist + 1);
; return 0; }
EOF
-if { (eval echo configure:3575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3743: \"$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:3600: checking for struct utimbuf" >&5
+echo "configure:3768: checking for struct utimbuf" >&5
cat > conftest.$ac_ext <<EOF
-#line 3602 "configure"
+#line 3770 "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:3621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3789: \"$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:3641: checking return type of signal handlers" >&5
+echo "configure:3809: checking return type of signal handlers" >&5
cat > conftest.$ac_ext <<EOF
-#line 3644 "configure"
+#line 3812 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
int i;
; return 0; }
EOF
-if { (eval echo configure:3661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3829: \"$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:3683: checking for size_t" >&5
+echo "configure:3851: checking for size_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 3686 "configure"
+#line 3854 "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:3717: checking for pid_t" >&5
+echo "configure:3885: checking for pid_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 3720 "configure"
+#line 3888 "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:3751: checking for uid_t in sys/types.h" >&5
+echo "configure:3919: checking for uid_t in sys/types.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 3754 "configure"
+#line 3922 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
fi
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:3790: checking for mode_t" >&5
+echo "configure:3958: checking for mode_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 3793 "configure"
+#line 3961 "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:3824: checking for off_t" >&5
+echo "configure:3992: checking for off_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 3827 "configure"
+#line 3995 "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:3858: checking for ssize_t" >&5
+echo "configure:4026: checking for ssize_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 3861 "configure"
+#line 4029 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
-echo "configure:3893: checking for struct timeval" >&5
+echo "configure:4061: checking for struct timeval" >&5
cat > conftest.$ac_ext <<EOF
-#line 3895 "configure"
+#line 4063 "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:3911: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4079: \"$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:3933: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:4101: checking whether struct tm is in sys/time.h or time.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 3936 "configure"
+#line 4104 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
-if { (eval echo configure:3944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4112: \"$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:3968: checking for tm_zone in struct tm" >&5
+echo "configure:4136: checking for tm_zone in struct tm" >&5
cat > conftest.$ac_ext <<EOF
-#line 3971 "configure"
+#line 4139 "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:3979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4147: \"$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:4002: checking for tzname" >&5
+echo "configure:4170: checking for tzname" >&5
cat > conftest.$ac_ext <<EOF
-#line 4005 "configure"
+#line 4173 "configure"
#include "confdefs.h"
#include <time.h>
#ifndef tzname /* For SGI. */
atoi(*tzname);
; return 0; }
EOF
-if { (eval echo configure:4015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4183: \"$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:4041: checking for working const" >&5
+echo "configure:4209: checking for working const" >&5
cat > conftest.$ac_ext <<EOF
-#line 4044 "configure"
+#line 4212 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:4093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4261: \"$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:4118: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:4286: 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:4143: checking whether byte ordering is bigendian" >&5
+echo "configure:4311: 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 4148 "configure"
+#line 4316 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#endif
; return 0; }
EOF
-if { (eval echo configure:4159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4327: \"$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 4163 "configure"
+#line 4331 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#endif
; return 0; }
EOF
-if { (eval echo configure:4174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4342: \"$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 4191 "configure"
+#line 4359 "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:4204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4372: \"$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:4231: checking size of short" >&5
+echo "configure:4399: checking size of short" >&5
cat > conftest.$ac_ext <<EOF
-#line 4234 "configure"
+#line 4402 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:4245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4413: \"$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:4273: checking size of int" >&5
+echo "configure:4441: checking size of int" >&5
cat > conftest.$ac_ext <<EOF
-#line 4276 "configure"
+#line 4444 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:4287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4455: \"$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:4309: checking size of long" >&5
+echo "configure:4477: checking size of long" >&5
cat > conftest.$ac_ext <<EOF
-#line 4312 "configure"
+#line 4480 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:4323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4491: \"$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:4345: checking size of long long" >&5
+echo "configure:4513: checking size of long long" >&5
cat > conftest.$ac_ext <<EOF
-#line 4348 "configure"
+#line 4516 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:4359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4527: \"$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:4381: checking size of void *" >&5
+echo "configure:4549: checking size of void *" >&5
cat > conftest.$ac_ext <<EOF
-#line 4384 "configure"
+#line 4552 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:4395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4563: \"$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:4418: checking for long file names" >&5
+echo "configure:4586: 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:4464: checking for sin" >&5
+echo "configure:4632: checking for sin" >&5
cat > conftest.$ac_ext <<EOF
-#line 4467 "configure"
+#line 4635 "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:4490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4658: \"$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:4508: checking for sin in -lm" >&5
+echo "configure:4676: 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 4513 "configure"
+#line 4681 "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:4524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4692: \"$ac_link\") 1>&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 4568 "configure"
+#line 4736 "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:4575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4743: \"$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:4592: checking type of mail spool file locking" >&5
+echo "configure:4760: checking type of mail spool file locking" >&5
for ac_func in lockf flock
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4596: checking for $ac_func" >&5
+echo "configure:4764: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 4599 "configure"
+#line 4767 "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:4622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
case "$opsys" in decosf*)
echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
-echo "configure:4695: checking for cma_open in -lpthreads" >&5
+echo "configure:4863: 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 4700 "configure"
+#line 4868 "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:4711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4879: \"$ac_link\") 1>&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:4747: checking whether the -xildoff compiler flag is required" >&5
+echo "configure:4915: 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;
else echo "$ac_t""no" 1>&6
fi
-if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then
- echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
-echo "configure:4758: 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 "$ac_t""no" 1>&6 ;;
- esac
+if test "$opsys" = "sol2"; then
+ if test "$os_release" -ge 56; then
+ echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
+echo "configure:4927: 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 "$ac_t""no" 1>&6 ;;
+ esac
+ fi
fi
echo "checking "for specified window system"" 1>&6
-echo "configure:4768: checking "for specified window system"" >&5
+echo "configure:4938: 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:4801: checking for X" >&5
+echo "configure:4971: 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 4861 "configure"
+#line 5031 "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:4866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5036: \"$ac_try\") 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 4935 "configure"
+#line 5105 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:4942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5112: \"$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:5051: checking whether -R must be followed by a space" >&5
+echo "configure:5221: 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 5054 "configure"
+#line 5224 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:5061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5231: \"$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 5077 "configure"
+#line 5247 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:5084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5254: \"$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:5120: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:5290: 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 5125 "configure"
+#line 5295 "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:5136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5306: \"$ac_link\") 1>&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:5160: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:5330: 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 5165 "configure"
+#line 5335 "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:5176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5346: \"$ac_link\") 1>&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:5205: checking for gethostbyname" >&5
+echo "configure:5375: checking for gethostbyname" >&5
cat > conftest.$ac_ext <<EOF
-#line 5208 "configure"
+#line 5378 "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:5231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5401: \"$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:5252: checking for gethostbyname in -lnsl" >&5
+echo "configure:5422: 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 5257 "configure"
+#line 5427 "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:5268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5438: \"$ac_link\") 1>&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:5298: checking for connect" >&5
+echo "configure:5468: checking for connect" >&5
cat > conftest.$ac_ext <<EOF
-#line 5301 "configure"
+#line 5471 "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:5324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5494: \"$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:5347: checking "$xe_msg_checking"" >&5
+echo "configure:5517: 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 5352 "configure"
+#line 5522 "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:5363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5533: \"$ac_link\") 1>&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:5387: checking for remove" >&5
+echo "configure:5557: checking for remove" >&5
cat > conftest.$ac_ext <<EOF
-#line 5390 "configure"
+#line 5560 "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:5413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5583: \"$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:5434: checking for remove in -lposix" >&5
+echo "configure:5604: 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 5439 "configure"
+#line 5609 "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:5450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5620: \"$ac_link\") 1>&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:5474: checking for shmat" >&5
+echo "configure:5644: checking for shmat" >&5
cat > conftest.$ac_ext <<EOF
-#line 5477 "configure"
+#line 5647 "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:5500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5670: \"$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:5521: checking for shmat in -lipc" >&5
+echo "configure:5691: 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 5526 "configure"
+#line 5696 "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:5537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5707: \"$ac_link\") 1>&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:5573: checking "$xe_msg_checking"" >&5
+echo "configure:5743: 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 5578 "configure"
+#line 5748 "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:5589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5759: \"$ac_link\") 1>&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:5758: checking for X defines extracted by xmkmf" >&5
+echo "configure:5928: 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:5790: checking for X11/Intrinsic.h" >&5
+echo "configure:5960: checking for X11/Intrinsic.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 5793 "configure"
+#line 5963 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5968: \"$ac_try\") 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:5822: checking for XOpenDisplay in -lX11" >&5
+echo "configure:5992: 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 5827 "configure"
+#line 5997 "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:5838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6008: \"$ac_link\") 1>&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:5863: checking "$xe_msg_checking"" >&5
+echo "configure:6033: 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 5868 "configure"
+#line 6038 "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:5879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6049: \"$ac_link\") 1>&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:5906: checking for XShapeSelectInput in -lXext" >&5
+echo "configure:6076: 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 5911 "configure"
+#line 6081 "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:5922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6092: \"$ac_link\") 1>&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:5945: checking for XtOpenDisplay in -lXt" >&5
+echo "configure:6115: 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 5950 "configure"
+#line 6120 "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:5961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6131: \"$ac_link\") 1>&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:5984: checking the version of X11 being used" >&5
+echo "configure:6154: checking the version of X11 being used" >&5
cat > conftest.$ac_ext <<EOF
-#line 5986 "configure"
+#line 6156 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
EOF
-if { (eval echo configure:5991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:6161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
./conftest foobar; x11_release=$?
else
}
- for ac_hdr in X11/Xlocale.h
+ for ac_func in XConvertCase
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6016: checking for $ac_hdr" >&5
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6185: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 6019 "configure"
+#line 6188 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
+if { (eval echo configure:6211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
+ eval "ac_cv_func_$ac_func=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"
+ eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
{ test "$extra_verbose" = "yes" && cat << EOF
- Defining $ac_tr_hdr
+ Defining $ac_tr_func
EOF
cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+#define $ac_tr_func 1
EOF
}
done
- echo $ac_n "checking for XFree86""... $ac_c" 1>&6
-echo "configure:6055: checking for XFree86" >&5
- if test -d "/usr/X386/include" -o \
- -f "/etc/XF86Config" -o \
- -f "/etc/X11/XF86Config" -o \
- -f "/usr/X11R6/lib/X11/XF86Config"; then
- echo "$ac_t""yes" 1>&6
- { test "$extra_verbose" = "yes" && cat << \EOF
- Defining HAVE_XFREE386
-EOF
+ for ac_hdr in X11/Xlocale.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:6243: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6246 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ { test "$extra_verbose" = "yes" && cat << EOF
+ Defining $ac_tr_hdr
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+}
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+
+ echo $ac_n "checking for XFree86""... $ac_c" 1>&6
+echo "configure:6282: checking for XFree86" >&5
+ if test -d "/usr/X386/include" -o \
+ -f "/etc/XF86Config" -o \
+ -f "/etc/X11/XF86Config" -o \
+ -f "/usr/X11R6/lib/X11/XF86Config"; then
+ echo "$ac_t""yes" 1>&6
+ { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining HAVE_XFREE386
+EOF
cat >> confdefs.h <<\EOF
#define HAVE_XFREE386 1
EOF
test -z "$with_xmu" && {
echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
-echo "configure:6075: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
+echo "configure:6302: 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 6080 "configure"
+#line 6307 "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:6091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6318: \"$ac_link\") 1>&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:6130: checking for main in -lXbsd" >&5
+echo "configure:6357: 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 6135 "configure"
+#line 6362 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:6142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6369: \"$ac_link\") 1>&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:6179: checking for MS-Windows" >&5
+echo "configure:6406: checking for MS-Windows" >&5
echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
-echo "configure:6182: checking for main in -lgdi32" >&5
+echo "configure:6409: 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 6187 "configure"
+#line 6414 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:6194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6421: \"$ac_link\") 1>&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 6260 "configure"
+#line 6487 "configure"
#include "confdefs.h"
#include <fcntl.h>
int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
EOF
-if { (eval echo configure:6265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:6492: \"$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
cat conftest.$ac_ext >&5
fi
rm -fr conftest*
- const_is_losing=no
with_file_coding=yes
extra_objs="$extra_objs console-msw.o device-msw.o event-msw.o frame-msw.o objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o gui-msw.o" && if test "$extra_verbose" = "yes"; then
echo " xemacs will be linked with \"console-msw.o device-msw.o event-msw.o frame-msw.o objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o gui-msw.o\""
esac
echo "checking for WM_COMMAND option" 1>&6
-echo "configure:6341: checking for WM_COMMAND option" >&5;
+echo "configure:6567: 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:6356: checking for X11/Xauth.h" >&5
+echo "configure:6582: checking for X11/Xauth.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 6359 "configure"
+#line 6585 "configure"
#include "confdefs.h"
#include <X11/Xauth.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6590: \"$ac_try\") 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:6387: checking for XauGetAuthByAddr in -lXau" >&5
+echo "configure:6613: 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 6392 "configure"
+#line 6618 "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:6403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6629: \"$ac_link\") 1>&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:6448: checking for ${dir}tt_c.h" >&5
+echo "configure:6674: checking for ${dir}tt_c.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 6451 "configure"
+#line 6677 "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:6456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6682: \"$ac_try\") 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
- tt_c_h_path="${dir}tt_c.h"; break
+ tt_c_h_file="${dir}tt_c.h"; break
else
echo "$ac_t""no" 1>&6
fi
done
- if test -z "$tt_c_h_path"; then
+ if test -z "$tt_c_h_file"; then
if test "$with_tooltalk" = "yes"; then
(echo "$progname: Usage error:"
echo " " "Unable to find required tooltalk header files."
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:6492: checking "$xe_msg_checking"" >&5
+echo "configure:6718: 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 6497 "configure"
+#line 6723 "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:6508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6734: \"$ac_link\") 1>&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 "$extra_verbose" = "yes" && cat << EOF
- Defining TT_C_H_PATH = "$tt_c_h_path"
+ Defining TT_C_H_FILE = "$tt_c_h_file"
EOF
cat >> confdefs.h <<EOF
-#define TT_C_H_PATH "$tt_c_h_path"
+#define TT_C_H_FILE "$tt_c_h_file"
EOF
}
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:6565: checking for Dt/Dt.h" >&5
+echo "configure:6791: checking for Dt/Dt.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 6568 "configure"
+#line 6794 "configure"
#include "confdefs.h"
#include <Dt/Dt.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6799: \"$ac_try\") 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:6596: checking for DtDndDragStart in -lDtSvc" >&5
+echo "configure:6822: 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 6601 "configure"
+#line 6827 "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:6612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6838: \"$ac_link\") 1>&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:6681: checking if drag and drop API is needed" >&5
+echo "configure:6907: 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:6702: checking for LDAP" >&5
+echo "configure:6928: 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:6705: checking for ldap.h" >&5
+echo "configure:6931: checking for ldap.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 6708 "configure"
+#line 6934 "configure"
#include "confdefs.h"
#include <ldap.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6939: \"$ac_try\") 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:6736: checking for lber.h" >&5
+echo "configure:6962: checking for lber.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 6739 "configure"
+#line 6965 "configure"
#include "confdefs.h"
#include <lber.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6970: \"$ac_try\") 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
with_ldap=no
fi
- }
-if test "$with_ldap" != "no"; then
-
-echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
-echo "configure:6768: checking for ldap_search in -lldap" >&5
-ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
+ }
+if test "$with_ldap" != "no"; then
+
+echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
+echo "configure:6994: 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 6999 "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 ldap_search();
+
+int main() {
+ldap_search()
+; return 0; }
+EOF
+if { (eval echo configure:7010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+ echo "$ac_t""yes" 1>&6
+ with_ldap_nolber=yes
+else
+ echo "$ac_t""no" 1>&6
+with_ldap_nolber=no
+fi
+
+
+ test "$with_ldap_nolber" = "no" && {
+xe_msg_checking="for ldap_open in -lldap"
+test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
+echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
+echo "configure:7035: 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 7040 "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 ldap_open();
+
+int main() {
+ldap_open()
+; return 0; }
+EOF
+if { (eval echo configure:7051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+ echo "$ac_t""yes" 1>&6
+ with_ldap_lber=yes
+else
+ echo "$ac_t""no" 1>&6
+with_ldap_lber=no
+fi
+
+ }
+ test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && {
+xe_msg_checking="for ldap_open in -lldap"
+test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
+echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
+echo "configure:7076: 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 7081 "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 ldap_open();
+
+int main() {
+ldap_open()
+; return 0; }
+EOF
+if { (eval echo configure:7092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+ echo "$ac_t""yes" 1>&6
+ with_ldap_krb=yes
+else
+ echo "$ac_t""no" 1>&6
+with_ldap_krb=no
+fi
+
+ }
+ test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && {
+xe_msg_checking="for ldap_open in -lldap"
+test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
+echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
+echo "configure:7117: 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 7122 "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 ldap_open();
+
+int main() {
+ldap_open()
+; return 0; }
+EOF
+if { (eval echo configure:7133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+ echo "$ac_t""yes" 1>&6
+ with_ldap_krbdes=yes
+else
+ echo "$ac_t""no" 1>&6
+with_ldap_krbdes=no
+fi
+
+ }
+ test -z "$with_ldap" -a \( "$with_ldap_lber" = "yes" -o "$with_ldap_nolber" = "yes" -o "$with_ldap_krb" = "yes" -o "$with_ldap_krbdes" = "yes" \) && with_ldap=yes
+fi
+if test "$with_ldap" = "yes"; then
+ { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining HAVE_LDAP
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_LDAP 1
+EOF
+}
+
+ extra_objs="$extra_objs eldap.o" && if test "$extra_verbose" = "yes"; then
+ echo " xemacs will be linked with \"eldap.o\""
+ fi
+ if test "$with_ldap_nolber" = "yes" ; then
+ LIBS="-lldap $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lldap\" to \$LIBS"; fi
+ else
+ if test "$with_ldap_krb" = "yes" ; then
+ LIBS="-lkrb $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lkrb\" to \$LIBS"; fi
+ fi
+ if test "$with_ldap_krbdes" = "yes" ; then
+ LIBS="-ldes $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-ldes\" to \$LIBS"; fi
+ LIBS="-lkrb $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lkrb\" to \$LIBS"; fi
+ fi
+ LIBS="-llber $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-llber\" to \$LIBS"; fi
+ LIBS="-lldap $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lldap\" to \$LIBS"; fi
+ fi
+ for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:7184: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7187 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:7210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ { test "$extra_verbose" = "yes" && cat << EOF
+ Defining $ac_tr_func
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+}
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+fi
+
+echo "checking for PostgreSQL" 1>&6
+echo "configure:7240: checking for PostgreSQL" >&5
+postgres_h_path=""
+postgres_includes_found=no
+save_c_switch_site="$c_switch_site"
+
+if test "$with_postgresql" != "no"; then
+ ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6
+echo "configure:7248: checking for libpq-fe.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7251 "configure"
+#include "confdefs.h"
+#include <libpq-fe.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7256: \"$ac_try\") 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
+ postgres_includes_found=yes
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \
+ -d "/usr/local/pgsql/include"; then
+ c_switch_site="$c_switch_site -I/usr/local/pgsql/include"
+ ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6
+echo "configure:7283: checking for libpq-fe.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7286 "configure"
+#include "confdefs.h"
+#include <libpq-fe.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7291: \"$ac_try\") 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
+ postgres_includes_found=yes
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test "$postgres_includes_found" != "yes"; then
+ postgres_h_path="/usr/local/pgsql/include"
+ fi
+ c_switch_site="$save_c_switch_site"
+fi
+if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \
+ -d "/usr/include/pgsql"; then
+ c_switch_site="$c_switch_site -I/usr/include/pgsql"
+ ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6
+echo "configure:7321: checking for libpq-fe.h" >&5
-xe_check_libs=" -lldap "
cat > conftest.$ac_ext <<EOF
-#line 6773 "configure"
+#line 7324 "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 ldap_search();
-
-int main() {
-ldap_search()
-; return 0; }
+#include <libpq-fe.h>
EOF
-if { (eval echo configure:6784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7329: \"$ac_try\") 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_lib_$ac_lib_var=yes"
+ 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_lib_$ac_lib_var=no"
+ eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
-xe_check_libs=""
-
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
- with_ldap_nolber=yes
+ postgres_includes_found=yes
else
echo "$ac_t""no" 1>&6
-with_ldap_nolber=no
fi
+ if test "$postgres_includes_found" = "yes"; then
+ postgres_h_path="pgsql"
+ fi
+ c_switch_site="$save_c_switch_site"
+ fi
+if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \
+ -d "/usr/include/postgresql"; then
+ c_switch_site="$c_switch_site -I/usr/include/postgresql"
+ ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6
+echo "configure:7359: checking for libpq-fe.h" >&5
- test "$with_ldap_nolber" = "no" && {
-xe_msg_checking="for ldap_open in -lldap"
-test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
-echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
-echo "configure:6809: 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 6814 "configure"
+#line 7362 "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 ldap_open();
-
-int main() {
-ldap_open()
-; return 0; }
+#include <libpq-fe.h>
EOF
-if { (eval echo configure:6825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7367: \"$ac_try\") 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_lib_$ac_lib_var=yes"
+ 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_lib_$ac_lib_var=no"
+ eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
-xe_check_libs=""
-
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
- with_ldap_lber=yes
+ postgres_includes_found=yes
else
echo "$ac_t""no" 1>&6
-with_ldap_lber=no
fi
- }
- test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && {
-xe_msg_checking="for ldap_open in -lldap"
-test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
-echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
-echo "configure:6850: checking "$xe_msg_checking"" >&5
-ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
+ if test "$postgres_includes_found" = "yes"; then
+ postgres_h_path="postgresql"
+fi
+ c_switch_site="$save_c_switch_site"
+fi
-xe_check_libs=" -lldap -llber -lkrb"
+if test "$postgres_includes_found" = "yes"; then
+
+echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
+echo "configure:7396: checking for PQconnectdb in -lpq" >&5
+ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lpq "
cat > conftest.$ac_ext <<EOF
-#line 6855 "configure"
+#line 7401 "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 ldap_open();
+char PQconnectdb();
int main() {
-ldap_open()
+PQconnectdb()
; return 0; }
EOF
-if { (eval echo configure:6866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7412: \"$ac_link\") 1>&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_ldap_krb=yes
+ with_postgresql=yes
else
echo "$ac_t""no" 1>&6
-with_ldap_krb=no
+with_postgresql=no
fi
- }
- test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && {
-xe_msg_checking="for ldap_open in -lldap"
-test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
-echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
-echo "configure:6891: checking "$xe_msg_checking"" >&5
-ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
-xe_check_libs=" -lldap -llber -lkrb -ldes"
+fi
+if test "$with_postgresql" = "yes"; then
+
+echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
+echo "configure:7437: checking for PQconnectStart in -lpq" >&5
+ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lpq "
cat > conftest.$ac_ext <<EOF
-#line 6896 "configure"
+#line 7442 "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 ldap_open();
+char PQconnectStart();
int main() {
-ldap_open()
+PQconnectStart()
; return 0; }
EOF
-if { (eval echo configure:6907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7453: \"$ac_link\") 1>&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_ldap_krbdes=yes
+ with_postgresqlv7=yes
else
echo "$ac_t""no" 1>&6
-with_ldap_krbdes=no
+with_postgresqlv7=no
fi
- }
- test -z "$with_ldap" -a \( "$with_ldap_lber" = "yes" -o "$with_ldap_nolber" = "yes" -o "$with_ldap_krb" = "yes" -o "$with_ldap_krbdes" = "yes" \) && with_ldap=yes
+
fi
-if test "$with_ldap" = "yes"; then
- { test "$extra_verbose" = "yes" && cat << \EOF
- Defining HAVE_LDAP
+if test "$with_postgresql" = "yes"; then
+ if test -n "$postgres_h_path"; then
+ { test "$extra_verbose" = "yes" && cat << EOF
+ Defining POSTGRES_H_PATH = $postgres_h_path
EOF
-cat >> confdefs.h <<\EOF
-#define HAVE_LDAP 1
+cat >> confdefs.h <<EOF
+#define POSTGRES_H_PATH $postgres_h_path
EOF
}
- extra_objs="$extra_objs eldap.o" && if test "$extra_verbose" = "yes"; then
- echo " xemacs will be linked with \"eldap.o\""
- fi
- if test "$with_ldap_nolber" = "yes" ; then
- LIBS="-lldap $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lldap\" to \$LIBS"; fi
- else
- if test "$with_ldap_krb" = "yes" ; then
- LIBS="-lkrb $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lkrb\" to \$LIBS"; fi
- fi
- if test "$with_ldap_krbdes" = "yes" ; then
- LIBS="-ldes $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-ldes\" to \$LIBS"; fi
- LIBS="-lkrb $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lkrb\" to \$LIBS"; fi
- fi
- LIBS="-llber $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-llber\" to \$LIBS"; fi
- LIBS="-lldap $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lldap\" to \$LIBS"; fi
- fi
- for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6958: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6961 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
+ fi
+ { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining HAVE_POSTGRESQL
EOF
-if { (eval echo configure:6984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
+cat >> confdefs.h <<\EOF
+#define HAVE_POSTGRESQL 1
+EOF
+}
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- { test "$extra_verbose" = "yes" && cat << EOF
- Defining $ac_tr_func
+ if test "$with_postgresqlv7" = "yes"; then
+ { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining HAVE_POSTGRESQLV7
EOF
-cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
+cat >> confdefs.h <<\EOF
+#define HAVE_POSTGRESQLV7 1
EOF
}
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
+ fi
+ LIBS="-lpq $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lpq\" to \$LIBS"; fi
+ extra_objs="$extra_objs postgresql.o" && if test "$extra_verbose" = "yes"; then
+ echo " xemacs will be linked with \"postgresql.o\""
+ fi
fi
if test "$window_system" != "none"; then
echo "checking for graphics libraries" 1>&6
-echo "configure:7016: checking for graphics libraries" >&5
+echo "configure:7513: 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:7021: checking for Xpm - no older than 3.4f" >&5
+echo "configure:7518: checking for Xpm - no older than 3.4f" >&5
xe_check_libs=-lXpm
cat > conftest.$ac_ext <<EOF
-#line 7024 "configure"
+#line 7521 "configure"
#include "confdefs.h"
+#define XPM_NUMBERS
#include <X11/xpm.h>
int main(int c, char **v) {
return c == 1 ? 0 :
XpmIncludeVersion != XpmLibraryVersion() ? 1 :
XpmIncludeVersion < 30406 ? 2 : 0 ;}
EOF
-if { (eval echo configure:7032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:7530: \"$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:7074: checking for \"FOR_MSW\" xpm" >&5
+echo "configure:7572: checking for \"FOR_MSW\" xpm" >&5
xe_check_libs=-lXpm
cat > conftest.$ac_ext <<EOF
-#line 7077 "configure"
+#line 7575 "configure"
#include "confdefs.h"
int main() {
XpmCreatePixmapFromData()
; return 0; }
EOF
-if { (eval echo configure:7084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7582: \"$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:7110: checking for compface.h" >&5
+echo "configure:7608: checking for compface.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 7113 "configure"
+#line 7611 "configure"
#include "confdefs.h"
#include <compface.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7616: \"$ac_try\") 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:7141: checking for UnGenFace in -lcompface" >&5
+echo "configure:7639: 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 7146 "configure"
+#line 7644 "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:7157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7655: \"$ac_link\") 1>&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:7209: checking for inflate in -lc" >&5
+echo "configure:7707: 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 7214 "configure"
+#line 7712 "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:7225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7723: \"$ac_link\") 1>&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:7244: checking for inflate in -lz" >&5
+echo "configure:7742: 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 7249 "configure"
+#line 7747 "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:7260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7758: \"$ac_link\") 1>&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:7279: checking for inflate in -lgz" >&5
+echo "configure:7777: 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 7284 "configure"
+#line 7782 "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:7295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7793: \"$ac_link\") 1>&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:7325: checking for jpeglib.h" >&5
+echo "configure:7823: checking for jpeglib.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 7328 "configure"
+#line 7826 "configure"
#include "confdefs.h"
#include <jpeglib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7831: \"$ac_try\") 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:7356: checking for jpeg_destroy_decompress in -ljpeg" >&5
+echo "configure:7854: 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 7361 "configure"
+#line 7859 "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:7372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
png_problem=""
test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
-echo "configure:7408: checking for pow" >&5
+echo "configure:7906: checking for pow" >&5
cat > conftest.$ac_ext <<EOF
-#line 7411 "configure"
+#line 7909 "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:7434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7932: \"$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:7455: checking for png.h" >&5
+echo "configure:7953: checking for png.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 7458 "configure"
+#line 7956 "configure"
#include "confdefs.h"
#include <png.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7961: \"$ac_try\") 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:7486: checking for png_read_image in -lpng" >&5
+echo "configure:7984: 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 7491 "configure"
+#line 7989 "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:7502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8000: \"$ac_link\") 1>&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:7525: checking for workable png version information" >&5
+echo "configure:8023: checking for workable png version information" >&5
xe_check_libs="-lpng -lz"
cat > conftest.$ac_ext <<EOF
-#line 7528 "configure"
+#line 8026 "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:7536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:8034: \"$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:7579: checking for tiffio.h" >&5
+echo "configure:8077: checking for tiffio.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 7582 "configure"
+#line 8080 "configure"
#include "confdefs.h"
#include <tiffio.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8085: \"$ac_try\") 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:7610: checking for TIFFClientOpen in -ltiff" >&5
+echo "configure:8108: 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 7615 "configure"
+#line 8113 "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:7626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8124: \"$ac_link\") 1>&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:7665: checking for X11 graphics libraries" >&5
+echo "configure:8163: checking for X11 graphics libraries" >&5
echo "checking for the Athena widgets" 1>&6
-echo "configure:7668: checking for the Athena widgets" >&5
+echo "configure:8166: checking for the Athena widgets" >&5
case "$with_athena" in
"xaw" | "") athena_variant=Xaw athena_3d=no ;;
if test "$athena_3d" = "no"; then
echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
-echo "configure:7682: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
+echo "configure:8180: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
xe_check_libs=" -l$athena_variant "
cat > conftest.$ac_ext <<EOF
-#line 7687 "configure"
+#line 8185 "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:7698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
-echo "configure:7714: checking for threeDClassRec in -l$athena_variant" >&5
+echo "configure:8212: checking for threeDClassRec in -l$athena_variant" >&5
ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
xe_check_libs=" -l$athena_variant "
cat > conftest.$ac_ext <<EOF
-#line 7719 "configure"
+#line 8217 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
threeDClassRec()
; return 0; }
EOF
-if { (eval echo configure:7730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
else
echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
-echo "configure:7761: checking for threeDClassRec in -l$athena_variant" >&5
+echo "configure:8259: checking for threeDClassRec in -l$athena_variant" >&5
ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
xe_check_libs=" -l$athena_variant "
cat > conftest.$ac_ext <<EOF
-#line 7766 "configure"
+#line 8264 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
threeDClassRec()
; return 0; }
EOF
-if { (eval echo configure:7777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
-echo "configure:7795: checking for threeDClassRec in -lXaw" >&5
+echo "configure:8293: checking for threeDClassRec in -lXaw" >&5
ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
xe_check_libs=" -lXaw "
cat > conftest.$ac_ext <<EOF
-#line 7800 "configure"
+#line 8298 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
threeDClassRec()
; return 0; }
EOF
-if { (eval echo configure:7811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test "$athena_3d" = "no"; then
ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
-echo "configure:7842: checking for X11/Xaw/ThreeD.h" >&5
+echo "configure:8340: checking for X11/Xaw/ThreeD.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 7845 "configure"
+#line 8343 "configure"
#include "confdefs.h"
#include <X11/Xaw/ThreeD.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
echo "$ac_t""no" 1>&6
ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
-echo "configure:7870: checking for X11/Xaw/XawInit.h" >&5
+echo "configure:8368: checking for X11/Xaw/XawInit.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 7873 "configure"
+#line 8371 "configure"
#include "confdefs.h"
#include <X11/Xaw/XawInit.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
else
ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
-echo "configure:7904: checking for X11/$athena_variant/XawInit.h" >&5
+echo "configure:8402: checking for X11/$athena_variant/XawInit.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 7907 "configure"
+#line 8405 "configure"
#include "confdefs.h"
#include <X11/$athena_variant/XawInit.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
-echo "configure:7929: checking for X11/$athena_variant/ThreeD.h" >&5
+echo "configure:8427: checking for X11/$athena_variant/ThreeD.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 7932 "configure"
+#line 8430 "configure"
#include "confdefs.h"
#include <X11/$athena_variant/ThreeD.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if test -z "$athena_h_path"; then
ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
-echo "configure:7965: checking for $athena_variant/XawInit.h" >&5
+echo "configure:8463: checking for $athena_variant/XawInit.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 7968 "configure"
+#line 8466 "configure"
#include "confdefs.h"
#include <$athena_variant/XawInit.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
-echo "configure:7990: checking for $athena_variant/ThreeD.h" >&5
+echo "configure:8488: checking for $athena_variant/ThreeD.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 7993 "configure"
+#line 8491 "configure"
#include "confdefs.h"
#include <$athena_variant/ThreeD.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
-echo "configure:8027: checking for X11/Xaw3d/XawInit.h" >&5
+echo "configure:8525: checking for X11/Xaw3d/XawInit.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8030 "configure"
+#line 8528 "configure"
#include "confdefs.h"
#include <X11/Xaw3d/XawInit.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
-echo "configure:8052: checking for X11/Xaw3d/ThreeD.h" >&5
+echo "configure:8550: checking for X11/Xaw3d/ThreeD.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8055 "configure"
+#line 8553 "configure"
#include "confdefs.h"
#include <X11/Xaw3d/ThreeD.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
-echo "configure:8092: checking for Xaw3d/XawInit.h" >&5
+echo "configure:8590: checking for Xaw3d/XawInit.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8095 "configure"
+#line 8593 "configure"
#include "confdefs.h"
#include <Xaw3d/XawInit.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
-echo "configure:8117: checking for Xaw3d/ThreeD.h" >&5
+echo "configure:8615: checking for Xaw3d/ThreeD.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8120 "configure"
+#line 8618 "configure"
#include "confdefs.h"
#include <Xaw3d/ThreeD.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if test -z "$athena_h_path"; then
ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
-echo "configure:8157: checking for X11/Xaw/ThreeD.h" >&5
+echo "configure:8655: checking for X11/Xaw/ThreeD.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8160 "configure"
+#line 8658 "configure"
#include "confdefs.h"
#include <X11/Xaw/ThreeD.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
-echo "configure:8200: checking for Xm/Xm.h" >&5
+echo "configure:8698: checking for Xm/Xm.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8203 "configure"
+#line 8701 "configure"
#include "confdefs.h"
#include <Xm/Xm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8706: \"$ac_try\") 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:8225: checking for XmStringFree in -lXm" >&5
+echo "configure:8723: 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 8230 "configure"
+#line 8728 "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:8241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8739: \"$ac_link\") 1>&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:8270: checking for Lesstif" >&5
+echo "configure:8768: checking for Lesstif" >&5
cat > conftest.$ac_ext <<EOF
-#line 8272 "configure"
+#line 8770 "configure"
#include "confdefs.h"
#include <Xm/Xm.h>
#ifdef LESSTIF_VERSION
if test "$with_mule" = "yes" ; then
echo "checking for Mule-related features" 1>&6
-echo "configure:8605: checking for Mule-related features" >&5
+echo "configure:9103: 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:8646: checking for $ac_hdr" >&5
+echo "configure:9144: checking for $ac_hdr" >&5
cat > conftest.$ac_ext <<EOF
-#line 8649 "configure"
+#line 9147 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9152: \"$ac_try\") 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:8685: checking for strerror in -lintl" >&5
+echo "configure:9183: 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 8690 "configure"
+#line 9188 "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:8701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9199: \"$ac_link\") 1>&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:8753: checking for Mule input methods" >&5
+echo "configure:9251: checking for Mule input methods" >&5
case "$with_xim" in "" | "yes" )
echo "checking for XIM" 1>&6
-echo "configure:8756: checking for XIM" >&5
+echo "configure:9254: checking for XIM" >&5
echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
-echo "configure:8759: checking for XOpenIM in -lX11" >&5
+echo "configure:9257: 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 8764 "configure"
+#line 9262 "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:8775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9273: \"$ac_link\") 1>&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:8799: checking for XmImMbLookupString in -lXm" >&5
+echo "configure:9297: 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 8804 "configure"
+#line 9302 "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:8815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9313: \"$ac_link\") 1>&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:8880: checking for XFontSet" >&5
+echo "configure:9378: checking for XFontSet" >&5
echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
-echo "configure:8883: checking for XmbDrawString in -lX11" >&5
+echo "configure:9381: 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 8888 "configure"
+#line 9386 "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:8899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9397: \"$ac_link\") 1>&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:8939: checking for wnn/jllib.h" >&5
+echo "configure:9437: checking for wnn/jllib.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8942 "configure"
+#line 9440 "configure"
#include "confdefs.h"
#include <wnn/jllib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9445: \"$ac_try\") 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:8972: checking for $ac_func" >&5
+echo "configure:9470: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 8975 "configure"
+#line 9473 "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:8998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9496: \"$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:9027: checking for crypt in -lcrypt" >&5
+echo "configure:9525: 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 9032 "configure"
+#line 9530 "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:9043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9541: \"$ac_link\") 1>&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:9078: checking for jl_dic_list_e in -lwnn" >&5
+echo "configure:9576: 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 9083 "configure"
+#line 9581 "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:9094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9592: \"$ac_link\") 1>&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:9112: checking for jl_dic_list_e in -lwnn4" >&5
+echo "configure:9610: 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 9117 "configure"
+#line 9615 "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:9128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9626: \"$ac_link\") 1>&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:9146: checking for jl_dic_list_e in -lwnn6" >&5
+echo "configure:9644: 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 9151 "configure"
+#line 9649 "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:9162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9660: \"$ac_link\") 1>&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:9180: checking for dic_list_e in -lwnn6_fromsrc" >&5
+echo "configure:9678: 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 9185 "configure"
+#line 9683 "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:9196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9694: \"$ac_link\") 1>&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:9244: checking for jl_fi_dic_list in -l$libwnn" >&5
+echo "configure:9742: 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 9249 "configure"
+#line 9747 "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:9260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9758: \"$ac_link\") 1>&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:9295: checking for canna/jrkanji.h" >&5
+echo "configure:9793: checking for canna/jrkanji.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 9298 "configure"
+#line 9796 "configure"
#include "confdefs.h"
#include <canna/jrkanji.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9801: \"$ac_try\") 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:9330: checking for canna/jrkanji.h" >&5
+echo "configure:9828: checking for canna/jrkanji.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 9333 "configure"
+#line 9831 "configure"
#include "confdefs.h"
#include <canna/jrkanji.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9836: \"$ac_try\") 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:9366: checking for canna/RK.h" >&5
+echo "configure:9864: checking for canna/RK.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 9369 "configure"
+#line 9867 "configure"
#include "confdefs.h"
#include <canna/RK.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9872: \"$ac_try\") 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:9397: checking for RkBgnBun in -lRKC" >&5
+echo "configure:9895: 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 9402 "configure"
+#line 9900 "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:9413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9911: \"$ac_link\") 1>&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:9436: checking for jrKanjiControl in -lcanna" >&5
+echo "configure:9934: 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 9441 "configure"
+#line 9939 "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:9452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9950: \"$ac_link\") 1>&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:9501: checking for layout_object_getvalue in -li18n" >&5
+echo "configure:9999: 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 9506 "configure"
+#line 10004 "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:9517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10015: \"$ac_link\") 1>&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 cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getpt getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf fsync ftruncate umask
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9603: checking for $ac_func" >&5
+echo "configure:10101: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 9606 "configure"
+#line 10104 "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:9629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10127: \"$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:9664: checking for $ac_func" >&5
+echo "configure:10162: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 9667 "configure"
+#line 10165 "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:9690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10188: \"$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:9726: checking for kstat_open in -lkstat" >&5
+echo "configure:10224: 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 9731 "configure"
+#line 10229 "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:9742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10240: \"$ac_link\") 1>&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:9776: checking for kvm_read in -lkvm" >&5
+echo "configure:10274: 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 9781 "configure"
+#line 10279 "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:9792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10290: \"$ac_link\") 1>&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:9826: checking whether netdb declares h_errno" >&5
+echo "configure:10324: checking whether netdb declares h_errno" >&5
cat > conftest.$ac_ext <<EOF
-#line 9828 "configure"
+#line 10326 "configure"
#include "confdefs.h"
#include <netdb.h>
int main() {
return h_errno;
; return 0; }
EOF
-if { (eval echo configure:9835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10333: \"$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:9855: checking for sigsetjmp" >&5
+echo "configure:10353: checking for sigsetjmp" >&5
cat > conftest.$ac_ext <<EOF
-#line 9857 "configure"
+#line 10355 "configure"
#include "confdefs.h"
#include <setjmp.h>
int main() {
sigjmp_buf bar; sigsetjmp (bar, 0);
; return 0; }
EOF
-if { (eval echo configure:9864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10362: \"$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:9884: checking whether localtime caches TZ" >&5
+echo "configure:10382: checking whether localtime caches TZ" >&5
if test "$ac_cv_func_tzset" = "yes"; then
cat > conftest.$ac_ext <<EOF
-#line 9888 "configure"
+#line 10386 "configure"
#include "confdefs.h"
#include <time.h>
#if STDC_HEADERS
exit (0);
}
EOF
-if { (eval echo configure:9923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:10421: \"$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:9953: checking whether gettimeofday accepts one or two arguments" >&5
+echo "configure:10451: checking whether gettimeofday accepts one or two arguments" >&5
cat > conftest.$ac_ext <<EOF
-#line 9955 "configure"
+#line 10453 "configure"
#include "confdefs.h"
#ifdef TIME_WITH_SYS_TIME
int main() {
struct timeval time;
- struct timezone dummy;
- gettimeofday (&time, &dummy);
+ gettimeofday (&time, 0);
; return 0; }
EOF
-if { (eval echo configure:9977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10474: \"$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:9999: checking for inline" >&5
+echo "configure:10496: checking for inline" >&5
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 10004 "configure"
+#line 10501 "configure"
#include "confdefs.h"
int main() {
} int $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:10011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
;;
esac
-if test "$ac_cv_c_inline" != "no"; then
- { test "$extra_verbose" = "yes" && cat << \EOF
- Defining HAVE_INLINE
-EOF
-cat >> confdefs.h <<\EOF
-#define HAVE_INLINE 1
-EOF
-}
-
- test "$GCC" = "yes" && extra_objs="$extra_objs inline.o" && if test "$extra_verbose" = "yes"; then
+test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" && if test "$extra_verbose" = "yes"; then
echo " xemacs will be linked with \"inline.o\""
fi
-fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:10061: checking for working alloca.h" >&5
+echo "configure:10548: checking for working alloca.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 10064 "configure"
+#line 10551 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
void *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:10071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10558: \"$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:10095: checking for alloca" >&5
+echo "configure:10582: checking for alloca" >&5
cat > conftest.$ac_ext <<EOF
-#line 10098 "configure"
+#line 10585 "configure"
#include "confdefs.h"
#ifdef __GNUC__
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:10126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10613: \"$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:10165: checking whether alloca needs Cray hooks" >&5
+echo "configure:10652: checking whether alloca needs Cray hooks" >&5
cat > conftest.$ac_ext <<EOF
-#line 10168 "configure"
+#line 10655 "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:10192: checking for $ac_func" >&5
+echo "configure:10679: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 10195 "configure"
+#line 10682 "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:10218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10705: \"$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:10248: checking stack direction for C alloca" >&5
+echo "configure:10735: checking stack direction for C alloca" >&5
cat > conftest.$ac_ext <<EOF
-#line 10251 "configure"
+#line 10738 "configure"
#include "confdefs.h"
find_stack_direction ()
{
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:10270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:10757: \"$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:10299: checking for vfork.h" >&5
+echo "configure:10786: checking for vfork.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 10302 "configure"
+#line 10789 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10794: \"$ac_try\") 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:10335: checking for working vfork" >&5
+echo "configure:10822: checking for working vfork" >&5
cat > conftest.$ac_ext <<EOF
-#line 10338 "configure"
+#line 10825 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
}
}
EOF
-if { (eval echo configure:10433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:10920: \"$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:10459: checking for working strcoll" >&5
+echo "configure:10946: checking for working strcoll" >&5
cat > conftest.$ac_ext <<EOF
-#line 10462 "configure"
+#line 10949 "configure"
#include "confdefs.h"
#include <string.h>
main ()
strcoll ("123", "456") >= 0);
}
EOF
-if { (eval echo configure:10472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:10959: \"$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:10500: checking for $ac_func" >&5
+echo "configure:10987: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 10503 "configure"
+#line 10990 "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:10526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11013: \"$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:10554: checking whether getpgrp takes no argument" >&5
+echo "configure:11041: checking whether getpgrp takes no argument" >&5
cat > conftest.$ac_ext <<EOF
-#line 10557 "configure"
+#line 11044 "configure"
#include "confdefs.h"
/*
}
EOF
-if { (eval echo configure:10612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:11099: \"$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:10639: checking for working mmap" >&5
+echo "configure:11126: checking for working mmap" >&5
case "$opsys" in ultrix* ) have_mmap=no ;; *)
cat > conftest.$ac_ext <<EOF
-#line 10642 "configure"
+#line 11129 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <unistd.h>
return 1;
}
EOF
-if { (eval echo configure:10675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:11162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
have_mmap=yes
else
}
-test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
-test "$rel_alloc" = "default" -a "$have_mmap" = "yes" && rel_alloc=yes
+test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
+if test "$rel_alloc $have_mmap" = "default yes"; then
+ if test "$doug_lea_malloc" = "yes"; then
+ echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
+echo "configure:11188: checking for M_MMAP_THRESHOLD" >&5
+ cat > conftest.$ac_ext <<EOF
+#line 11190 "configure"
+#include "confdefs.h"
+#include <malloc.h>
+int main() {
+
+#ifndef M_MMAP_THRESHOLD
+#error No M_MMAP_THRESHOLD :-(
+!@+$%^&*_)(_ - unlikely to compile...
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:11202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ rel_alloc=no; echo "$ac_t""yes" 1>&6;
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ rel_alloc=yes; echo "$ac_t""no" 1>&6;
+fi
+rm -f conftest*
+ else
+ rel_alloc=yes
+ fi
+fi
test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
Defining REL_ALLOC
EOF
ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for termios.h""... $ac_c" 1>&6
-echo "configure:10710: checking for termios.h" >&5
+echo "configure:11227: checking for termios.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 10713 "configure"
+#line 11230 "configure"
#include "confdefs.h"
#include <termios.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
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:10761: checking for termio.h" >&5
+echo "configure:11278: checking for termio.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 10764 "configure"
+#line 11281 "configure"
#include "confdefs.h"
#include <termio.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11286: \"$ac_try\") 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:10801: checking for socket" >&5
+echo "configure:11318: checking for socket" >&5
cat > conftest.$ac_ext <<EOF
-#line 10804 "configure"
+#line 11321 "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:10827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11344: \"$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:10842: checking for netinet/in.h" >&5
+echo "configure:11359: checking for netinet/in.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 10845 "configure"
+#line 11362 "configure"
#include "confdefs.h"
#include <netinet/in.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11367: \"$ac_try\") 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:10867: checking for arpa/inet.h" >&5
+echo "configure:11384: checking for arpa/inet.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 10870 "configure"
+#line 11387 "configure"
#include "confdefs.h"
#include <arpa/inet.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11392: \"$ac_try\") 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:10900: checking "for sun_len member in struct sockaddr_un"" >&5
+echo "configure:11417: checking "for sun_len member in struct sockaddr_un"" >&5
cat > conftest.$ac_ext <<EOF
-#line 10902 "configure"
+#line 11419 "configure"
#include "confdefs.h"
#include <sys/types.h>
static struct sockaddr_un x; x.sun_len = 1;
; return 0; }
EOF
-if { (eval echo configure:10913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11430: \"$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:10931: checking "for ip_mreq struct in netinet/in.h"" >&5
+echo "configure:11448: checking "for ip_mreq struct in netinet/in.h"" >&5
cat > conftest.$ac_ext <<EOF
-#line 10933 "configure"
+#line 11450 "configure"
#include "confdefs.h"
#include <sys/types.h>
static struct ip_mreq x;
; return 0; }
EOF
-if { (eval echo configure:10943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11460: \"$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:10974: checking for msgget" >&5
+echo "configure:11491: checking for msgget" >&5
cat > conftest.$ac_ext <<EOF
-#line 10977 "configure"
+#line 11494 "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:11000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11517: \"$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:11015: checking for sys/ipc.h" >&5
+echo "configure:11532: checking for sys/ipc.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11018 "configure"
+#line 11535 "configure"
#include "confdefs.h"
#include <sys/ipc.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11540: \"$ac_try\") 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:11040: checking for sys/msg.h" >&5
+echo "configure:11557: checking for sys/msg.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11043 "configure"
+#line 11560 "configure"
#include "confdefs.h"
#include <sys/msg.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11565: \"$ac_try\") 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:11086: checking for dirent.h" >&5
+echo "configure:11603: checking for dirent.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11089 "configure"
+#line 11606 "configure"
#include "confdefs.h"
#include <dirent.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11611: \"$ac_try\") 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:11121: checking for sys/dir.h" >&5
+echo "configure:11638: checking for sys/dir.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11124 "configure"
+#line 11641 "configure"
#include "confdefs.h"
#include <sys/dir.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11646: \"$ac_try\") 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:11162: checking for nlist.h" >&5
+echo "configure:11679: checking for nlist.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11165 "configure"
+#line 11682 "configure"
#include "confdefs.h"
#include <nlist.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11687: \"$ac_try\") 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:11200: checking "for sound support"" >&5
+echo "configure:11717: 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:11207: checking for multimedia/audio_device.h" >&5
+echo "configure:11724: checking for multimedia/audio_device.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11210 "configure"
+#line 11727 "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:11215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11732: \"$ac_try\") 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:11263: checking for ALopenport in -laudio" >&5
+echo "configure:11780: 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 11268 "configure"
+#line 11785 "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:11279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11796: \"$ac_link\") 1>&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:11310: checking for AOpenAudio in -lAlib" >&5
+echo "configure:11827: 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 11315 "configure"
+#line 11832 "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:11326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11843: \"$ac_link\") 1>&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:11364: checking for ${dir}/soundcard.h" >&5
+echo "configure:11881: checking for ${dir}/soundcard.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11367 "configure"
+#line 11884 "configure"
#include "confdefs.h"
#include <${dir}/soundcard.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11889: \"$ac_try\") 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 " xemacs will be linked with \"linuxplay.o\""
fi
{ test "$extra_verbose" = "yes" && cat << EOF
- Defining SOUNDCARD_H_PATH = "${dir}/soundcard.h"
+ Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
EOF
cat >> confdefs.h <<EOF
-#define SOUNDCARD_H_PATH "${dir}/soundcard.h"
+#define SOUNDCARD_H_FILE "${dir}/soundcard.h"
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:11426: checking for audio/audiolib.h" >&5
+echo "configure:11943: checking for audio/audiolib.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11429 "configure"
+#line 11946 "configure"
#include "confdefs.h"
#include <audio/audiolib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:11951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
-echo "configure:11452: checking for AuOpenServer in -laudio" >&5
+echo "configure:11969: 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 11457 "configure"
+#line 11974 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
AuOpenServer()
; return 0; }
EOF
-if { (eval echo configure:11468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
libs_x="-laudio $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-laudio\" to \$libs_x"; fi
cat > conftest.$ac_ext <<EOF
-#line 11507 "configure"
+#line 12024 "configure"
#include "confdefs.h"
#include <audio/Xtutil.h>
EOF
# Extract the first word of "esd-config", so it can be a program name with args.
set dummy esd-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:11538: checking for $ac_word" >&5
+echo "configure:12055: checking for $ac_word" >&5
if test -n "$have_esd_config"; then
ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
c_switch_site="$c_switch_site `esd-config --cflags`" && if test "$extra_verbose" = "yes"; then echo " Appending \"`esd-config --cflags`\" to \$c_switch_site"; fi
LIBS="`esd-config --libs` $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"`esd-config --libs`\" to \$LIBS"; fi
echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
-echo "configure:11567: checking for esd_play_stream" >&5
+echo "configure:12084: checking for esd_play_stream" >&5
cat > conftest.$ac_ext <<EOF
-#line 11570 "configure"
+#line 12087 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char esd_play_stream(); below. */
; return 0; }
EOF
-if { (eval echo configure:11593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_esd_play_stream=yes"
else
if test "$with_tty" = "yes" ; then
echo "checking for TTY-related features" 1>&6
-echo "configure:11644: checking for TTY-related features" >&5
+echo "configure:12161: 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:11660: checking for tgetent in -lncurses" >&5
+echo "configure:12177: 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 11665 "configure"
+#line 12182 "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:11676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12193: \"$ac_link\") 1>&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:11709: checking for ncurses/curses.h" >&5
+echo "configure:12226: checking for ncurses/curses.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11712 "configure"
+#line 12229 "configure"
#include "confdefs.h"
#include <ncurses/curses.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12234: \"$ac_try\") 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
- curses_h_path=ncurses/curses.h
+ curses_h_file=ncurses/curses.h
else
echo "$ac_t""no" 1>&6
fi
ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
-echo "configure:11739: checking for ncurses/term.h" >&5
+echo "configure:12256: checking for ncurses/term.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11742 "configure"
+#line 12259 "configure"
#include "confdefs.h"
#include <ncurses/term.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12264: \"$ac_try\") 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
- term_h_path=ncurses/term.h
+ term_h_file=ncurses/term.h
else
echo "$ac_t""no" 1>&6
fi
c_switch_site="$c_switch_site -I/usr/include/ncurses"
ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
-echo "configure:11777: checking for ncurses/curses.h" >&5
+echo "configure:12294: checking for ncurses/curses.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11780 "configure"
+#line 12297 "configure"
#include "confdefs.h"
#include <ncurses/curses.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12302: \"$ac_try\") 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
- curses_h_path=ncurses/curses.h
+ curses_h_file=ncurses/curses.h
else
echo "$ac_t""no" 1>&6
fi
for lib in curses termlib termcap; do
echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
-echo "configure:11820: checking for tgetent in -l$lib" >&5
+echo "configure:12337: 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 11825 "configure"
+#line 12342 "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:11836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12353: \"$ac_link\") 1>&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:11867: checking for tgetent in -lcurses" >&5
+echo "configure:12384: 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 11872 "configure"
+#line 12389 "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:11883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12400: \"$ac_link\") 1>&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:11901: checking for tgetent in -ltermcap" >&5
+echo "configure:12418: 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 11906 "configure"
+#line 12423 "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:11917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12434: \"$ac_link\") 1>&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
{ test "$extra_verbose" = "yes" && cat << EOF
- Defining CURSES_H_PATH = "${curses_h_path-curses.h}"
+ Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
EOF
cat >> confdefs.h <<EOF
-#define CURSES_H_PATH "${curses_h_path-curses.h}"
+#define CURSES_H_FILE "${curses_h_file-curses.h}"
EOF
}
{ test "$extra_verbose" = "yes" && cat << EOF
- Defining TERM_H_PATH = "${term_h_path-term.h}"
+ Defining TERM_H_FILE = "${term_h_file-term.h}"
EOF
cat >> confdefs.h <<EOF
-#define TERM_H_PATH "${term_h_path-term.h}"
+#define TERM_H_FILE "${term_h_file-term.h}"
EOF
}
test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
-echo "configure:11965: checking for gpm.h" >&5
+echo "configure:12482: checking for gpm.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11968 "configure"
+#line 12485 "configure"
#include "confdefs.h"
#include <gpm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12490: \"$ac_try\") 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:11996: checking for Gpm_Open in -lgpm" >&5
+echo "configure:12513: 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 12001 "configure"
+#line 12518 "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:12012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
!= "no no no" && echo "checking for database support" 1>&6
-echo "configure:12062: checking for database support" >&5
+echo "configure:12579: checking for database support" >&5
if test "$with_database_gdbm $with_database_dbm" != "no no"; then
ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
-echo "configure:12067: checking for ndbm.h" >&5
+echo "configure:12584: checking for ndbm.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 12070 "configure"
+#line 12587 "configure"
#include "confdefs.h"
#include <ndbm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:12592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if test "$with_database_gdbm" != "no"; then
echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
-echo "configure:12105: checking for dbm_open in -lgdbm" >&5
+echo "configure:12622: 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 12110 "configure"
+#line 12627 "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:12121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test "$with_database_dbm" != "no"; then
echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
-echo "configure:12149: checking for dbm_open" >&5
+echo "configure:12666: checking for dbm_open" >&5
cat > conftest.$ac_ext <<EOF
-#line 12152 "configure"
+#line 12669 "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:12175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12692: \"$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:12194: checking for dbm_open in -ldbm" >&5
+echo "configure:12711: 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 12199 "configure"
+#line 12716 "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:12210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test "$with_database_berkdb" != "no"; then
echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
-echo "configure:12251: checking for Berkeley db.h" >&5
- for path in "db/db.h" "db.h"; do
+echo "configure:12768: checking for Berkeley db.h" >&5
+ for header in "db/db.h" "db.h"; do
cat > conftest.$ac_ext <<EOF
-#line 12254 "configure"
+#line 12771 "configure"
#include "confdefs.h"
+
+#include <stdlib.h>
+#if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
#ifdef HAVE_INTTYPES_H
#define __BIT_TYPES_DEFINED__
#include <inttypes.h>
typedef uint64_t u_int64_t;
#endif
#endif
-#include <$path>
+#endif
+#include <$header>
int main() {
; return 0; }
EOF
-if { (eval echo configure:12272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:12793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- db_h_path="$path"; break
+ db_h_file="$header"; break
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
- if test -z "$db_h_path"
+ if test -z "$db_h_file"
then echo "$ac_t""no" 1>&6; with_database_berkdb=no
- else echo "$ac_t""$db_h_path" 1>&6
+ else echo "$ac_t""$db_h_file" 1>&6
fi
if test "$with_database_berkdb" != "no"; then
echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
-echo "configure:12288: checking for Berkeley DB version" >&5
+echo "configure:12809: checking for Berkeley DB version" >&5
cat > conftest.$ac_ext <<EOF
-#line 12290 "configure"
+#line 12811 "configure"
#include "confdefs.h"
-#include <$db_h_path>
+#include <$db_h_file>
#if DB_VERSION_MAJOR > 1
yes
#endif
rm -f conftest*
echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
-echo "configure:12309: checking for $dbfunc" >&5
+echo "configure:12830: checking for $dbfunc" >&5
cat > conftest.$ac_ext <<EOF
-#line 12312 "configure"
+#line 12833 "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:12335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12856: \"$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:12354: checking for $dbfunc in -ldb" >&5
+echo "configure:12875: 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 12359 "configure"
+#line 12880 "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:12370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test "$with_database_berkdb" = "yes"; then
{ test "$extra_verbose" = "yes" && cat << EOF
- Defining DB_H_PATH = "$db_h_path"
+ Defining DB_H_FILE = "$db_h_file"
EOF
cat >> confdefs.h <<EOF
-#define DB_H_PATH "$db_h_path"
+#define DB_H_FILE "$db_h_file"
EOF
}
if test "$with_socks" = "yes"; then
echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
-echo "configure:12434: checking for SOCKSinit in -lsocks" >&5
+echo "configure:12955: 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 12439 "configure"
+#line 12960 "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:12450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test "$with_modules" != "no"; then
echo "checking for module support" 1>&6
-echo "configure:12505: checking for module support" >&5
+echo "configure:13026: 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:12509: checking for dlfcn.h" >&5
+echo "configure:13030: checking for dlfcn.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 12512 "configure"
+#line 13033 "configure"
#include "confdefs.h"
#include <dlfcn.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:13038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:12535: checking for dlopen in -ldl" >&5
+echo "configure:13056: 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 12540 "configure"
+#line 13061 "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:12551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
-echo "configure:12570: checking for dlopen in -lc" >&5
+echo "configure:13091: 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 12575 "configure"
+#line 13096 "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:12586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
else
echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:12625: checking for shl_load in -ldld" >&5
+echo "configure:13146: 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 12630 "configure"
+#line 13151 "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:12641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
-echo "configure:12668: checking for dld_init in -ldld" >&5
+echo "configure:13189: 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 12673 "configure"
+#line 13194 "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:12684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
xealias=$internal_configuration
echo "checking how to build dynamic libraries for ${xehost}" 1>&6
-echo "configure:12729: checking how to build dynamic libraries for ${xehost}" >&5
+echo "configure:13250: 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:12757: checking checking whether we are using GNU C" >&5
+echo "configure:13278: checking checking whether we are using GNU C" >&5
cat > conftest.$ac_ext <<EOF
-#line 12759 "configure"
+#line 13280 "configure"
#include "confdefs.h"
#ifdef __GNUC__
fi
echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
-echo "configure:12781: checking how to produce PIC code" >&5
+echo "configure:13302: checking how to produce PIC code" >&5
wl=
can_build_shared=yes
# PIC is the default for these OSes.
;;
- os2*)
+ aix3* | aix4* | os2*)
# We can build DLLs from non-PIC.
;;
amigaos*)
# 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:12874: checking if PIC flag ${dll_cflags} really works" >&5
+echo "configure:13395: checking if PIC flag ${dll_cflags} really works" >&5
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $dll_cflags -DPIC"
cat > conftest.$ac_ext <<EOF
-#line 12878 "configure"
+#line 13399 "configure"
#include "confdefs.h"
int main() {
int x=0;
; return 0; }
EOF
-if { (eval echo configure:12885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:13406: \"$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:12916: checking if C compiler can produce shared libraries" >&5
+echo "configure:13437: 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 12967 "configure"
+#line 13488 "configure"
#include "confdefs.h"
int main() {
int x=0;
; return 0; }
EOF
-if { (eval echo configure:12974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13495: \"$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:12999: checking for ld used by GCC" >&5
+echo "configure:13520: 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:13024: checking for GNU ld" >&5
+echo "configure:13545: 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:13062: checking if the linker is GNU ld" >&5
+echo "configure:13583: 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
dll_ld=$CC
dll_ldflags=$xcldf
can_build_shared=yes
+ ld_shlibs=yes
else
# OK - only NOW do we futz about with ld.
# See if the linker supports building shared libraries.
echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
-echo "configure:13089: checking whether the linker supports shared libraries" >&5
+echo "configure:13611: checking whether the linker supports shared libraries" >&5
dll_ld=$CC
dll_ldflags=$LDFLAGS
ld_shlibs=yes
for ac_func in dlerror _dlerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:13304: checking for $ac_func" >&5
+echo "configure:13826: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 13307 "configure"
+#line 13829 "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:13330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
fi
cat > conftest.$ac_ext <<EOF
-#line 13369 "configure"
+#line 13891 "configure"
#include "confdefs.h"
int main(int c,char *v[]){return 0;}
EOF
-if { (eval echo configure:13373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:13895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
:
else
EOF
}
-test "$no_doc_file" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
- Defining NO_DOC_FILE
+test "$quick_build" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining QUICK_BUILD
EOF
cat >> confdefs.h <<\EOF
-#define NO_DOC_FILE 1
+#define QUICK_BUILD 1
EOF
}
echo "
XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
-
- Where should the build process find the source code? $srcdir
- What installation prefix should install use? $prefix
- What operating system and machine description files should XEmacs use?
- \`$opsysfile' and \`$machfile'
- What compiler should XEmacs be built with? $CC $CFLAGS
- Should XEmacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
- Should XEmacs use the relocating allocator for buffers? $rel_alloc
- What window system should XEmacs use? ${window_system}"
-if test "$with_x11" = "yes"; then
- echo " Where do we find X Windows header files? $x_includes"
- echo " Where do we find X Windows libraries? $x_libraries"
-fi
+"
+echo "
+Compilation / Installation:"
+echo " Source code location: $srcdir"
+echo " Installation prefix: $prefix"
if test -n "$site_includes"; then
- echo " Additional header files: $site_includes"
+ echo " Additional header files: $site_includes"
fi
if test -n "$site_libraries"; then
- echo " Additional libraries: $site_libraries"
+ echo " Additional libraries: $site_libraries"
fi
if test -n "$site_prefixes"; then
- echo " Additional prefixes: $site_prefixes"
+ echo " Additional prefixes: $site_prefixes"
fi
if test -n "$runpath"; then
- echo " Runtime library search path: $runpath"
+ echo " Runtime library search path: $runpath"
+fi
+echo " Operating system description file: \`$opsysfile'"
+echo " Machine description file: \`$machfile'"
+echo " Compiler: $CC $CFLAGS"
+echo " Relocating allocator for buffers: $rel_alloc"
+echo " GNU version of malloc: ${GNU_MALLOC}${GNU_MALLOC_reason}"
+
+echo "
+Window System:"
+if test "$with_msw" = "yes"; then
+ echo " Compiling in support for the Microsoft window system."
+fi
+if test "$with_x11" = "yes"; then
+ echo " Compiling in support for the X window system:"
+ echo " - X Windows headers location: $x_includes"
+ echo " - X Windows libraries location: $x_libraries"
+ if test "$with_xauth" != yes; then
+ echo " - Xau (X authority) not available."
+ fi
+ if test "$with_xmu" != yes; then
+ echo " - Xmu library not available; substituting equivalent routines."
+ fi
+ if test "$with_wmcommand" != no; then
+ echo " - Handling WM_COMMAND properly."
+ fi
fi
if test "$have_xaw" = "yes"; then
- echo " Athena library to link: $athena_lib"
- echo " Athena header include path: $athena_h_path"
+ echo " Compiling in support for the Athena widget set:"
+ echo " - Athena headers location: $athena_h_path"
+ echo " - Athena library to link: $athena_lib"
fi
-test "$with_dnet" = yes && echo " Compiling in support for DNET."
-test "$with_socks" = yes && echo " Compiling in support for SOCKS."
-test "$with_xauth" = yes && echo " Compiling in support for XAUTH."
-if test "$with_xmu" != yes -a "$with_x11" = yes; then
- echo " No Xmu; substituting equivalent routines."
+case "$with_menubars" in
+ lucid ) echo " Using Lucid menubars." ;;
+ motif ) echo " Using Motif menubars."
+ 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." ;;
+ msw ) echo " Using MS-Windows scrollbars." ;;
+esac
+case "$with_dialogs" in
+ motif ) echo " Using Motif dialog boxes."
+ if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
+ echo " *WARNING* The Motif dialog boxes cause problems on AIX 4.3 and higher."
+ echo " We recommend using the Athena dialog boxes instead."
+ echo " Install libXaw and re-run configure with --with-dialogs='athena'."
+ echo " Read the PROBLEMS file for more information."
+ fi; fi ;;
+ athena ) echo " Using Athena dialog boxes." ;;
+ msw ) echo " Using MS-Windows dialog boxes." ;;
+esac
+case "$with_widgets" in
+ motif ) echo " Using Motif native widgets." ;;
+ athena ) echo " Using Athena native widgets." ;;
+ msw ) echo " Using MS-Windows native widgets." ;;
+esac
+if test "$with_dragndrop" = yes; then
+ echo " Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
+ echo " - Drag'n'Drop prototype: $dragndrop_proto."
fi
+echo "
+TTY:"
+test "$with_ncurses" = yes && echo " Compiling in support for ncurses."
+test "$with_gpm" = yes && echo " Compiling in support for GPM (General Purpose Mouse)."
+
+echo "
+Images:"
+test "$with_gif" = yes && echo " Compiling in support for GIF images (builtin)."
if test "$with_xpm" = yes; then
- echo " Compiling in support for XPM images."
+ echo " Compiling in support for XPM images."
elif test "$with_x11" = yes; then
- echo " --------------------------------------------------------------------"
- echo " WARNING: Compiling without XPM support."
+ echo " WARNING: -----------------------------------------------------------"
+ echo " WARNING: Compiling without XPM image support."
if test "$xpm_problem" != ""; then
echo " Reason: $xpm_problem"
fi
echo " WARNING: You should strongly consider installing XPM."
echo " WARNING: Otherwise toolbars and other graphics will look suboptimal."
echo " WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
- echo " --------------------------------------------------------------------"
+ echo " WARNING: -----------------------------------------------------------"
fi
if test "$with_png" = yes; then
- echo " Compiling in support for PNG image handling."
+ echo " Compiling in support for PNG images."
elif test "$window_system" != "none"; then
- echo " --------------------------------------------------------------------"
+ echo " WARNING: -----------------------------------------------------------"
echo " WARNING: Compiling without PNG image support."
if test "$png_problem" != ""; then
echo " Reason: $png_problem"
echo " WARNING: You should strongly consider installing the PNG libraries."
echo " WARNING: Otherwise certain images and glyphs may not display."
echo " WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
- echo " --------------------------------------------------------------------"
+ echo " WARNING: -----------------------------------------------------------"
fi
-test "$with_gif" = yes && echo " Compiling in support for (builtin) GIF image handling."
-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_jpeg" = yes && echo " Compiling in support for JPEG images."
+test "$with_tiff" = yes && echo " Compiling in support for TIFF images."
test "$with_xface" = yes && echo " Compiling in support for X-Face message headers."
-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)."
+echo "
+Sound:"
+test "$with_native_sound" = yes && echo " Compiling in support for sound (native)."
+test "$with_nas_sound" = yes && echo " Compiling in support for NAS (network audio system)."
+test "$old_nas" = yes && echo " - NAS library lacks error trapping; will play synchronously."
+test "$with_esd_sound" = yes && echo " Compiling in support for ESD (Enlightened Sound Daemon)."
-test "$with_database_berkdb" = yes && echo " Compiling in support for Berkeley DB."
+echo "
+Databases:"
+test "$with_database_berkdb" = yes && echo " Compiling in support for Berkeley database."
test "$with_database_dbm" = yes && echo " Compiling in support for DBM."
test "$with_database_gdbm" = yes && echo " Compiling in support for GNU DBM."
+test "$with_ldap" = yes && echo " Compiling in support for LDAP."
+if test "$with_postgresql" = yes; then
+ echo " Compiling in support for PostgreSQL."
+ if test "$with_postgresqlv7" = yes; then
+ echo " - Using PostgreSQL V7 bindings."
+ fi
+ if test -n "$postgres_h_path"; then
+ echo " - PostgreSQL headers location: $postgres_h_path"
+ fi
+fi
-test "$with_ldap" = yes && echo " Compiling in support for LDAP."
-
-test "$with_ncurses" = yes && echo " Compiling in support for ncurses."
-test "$with_gpm" = yes && echo " Compiling in support for GPM (General Purpose Mouse)."
-
-test "$with_mule" = yes && echo " Compiling in Mule (multi-lingual) support."
+echo "
+Internationalization:"
+test "$with_mule" = yes && echo " Compiling in support for Mule (multi-lingual Emacs)."
test "$with_utf_2000" = yes && echo " Using UTF-2000 (UTF-8) buffer/string representation."
-test "$with_text_coding" = yes && echo " Compiling in Text coding support."
-test "$with_file_coding" = yes && echo " Compiling in File coding support."
-test "$with_xim" != no && echo " Compiling in XIM (X11R5+ I18N input method) support."
-test "$with_xim" = motif && echo " Using Motif to provide XIM support."
-test "$with_xim" = xlib && echo " Using raw Xlib to provide XIM support."
-test "$with_xfs" = yes && echo " Using XFontSet to provide bilingual menubar."
-test "$with_canna" = yes && echo " Compiling in support for Canna on Mule."
+test "$with_text_coding" = yes && echo " Compiling in support for text coding."
+test "$with_file_coding" = yes && echo " Compiling in support for file coding."
+test "$with_xim" != no && echo " Compiling in support for XIM (X11R5+ I18N input method)."
+test "$with_xim" = motif && echo " - Using Motif to provide XIM support."
+test "$with_xim" = xlib && echo " - Using raw Xlib to provide XIM support."
+test "$with_xfs" = yes && echo " - Using XFontSet to provide bilingual menubar."
+test "$with_canna" = yes && echo " Compiling in support for Canna on Mule."
if test "$with_wnn" = yes; then
echo " Compiling in support for the WNN input method on Mule."
- test "$with_wnn6" = yes && echo " Using WNN version 6."
+ test "$with_wnn6" = yes && echo " - Using WNN version 6."
fi
-test "$with_i18n3" = yes && echo " Compiling in I18N support, level 3 (doesn't currently work)."
+test "$with_i18n3" = yes && echo " Compiling in support for I18N level 3 (doesn't currently work)."
+
+echo "
+Mail:"
+test "$with_pop" = yes && echo " Compiling in support for POP mail retrieval."
+test "$with_kerberos" = yes && echo " Compiling in support for Kerberos POP authentication."
+test "$with_hesiod" = yes && echo " Compiling in support for Hesiod POP server access."
+echo " Compiling in support for \"$mail_locking\" mail spool file locking method."
-test "$with_cde" = yes && echo " Compiling in support for CDE."
+echo "
+Other Features:"
test "$with_tooltalk" = yes && echo " Compiling in support for ToolTalk."
-test "$with_offix" = yes && echo " Compiling in support for OffiX."
-test "$with_dragndrop" = yes && echo " Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )."
test "$with_workshop" = yes && echo " Compiling in support for Sun WorkShop."
-test "$with_wmcommand" != no && echo " Compiling in support for proper WM_COMMAND handling."
-case "$with_menubars" in
- lucid ) echo " Using Lucid menubars." ;;
- motif ) echo " Using Motif menubars."
- 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." ;;
- msw ) echo " Using MS-Windows scrollbars." ;;
-esac
-case "$with_widgets" in
- motif ) echo " Using Motif native widgets." ;;
- athena ) echo " Using Athena native widgets." ;;
- msw ) echo " Using MS-Windows native widgets." ;;
-esac
-case "$with_dialogs" in
- motif )
- echo " Using Motif dialog boxes."
- if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
- echo " *WARNING* The Motif dialog boxes cause problems on AIX 4.3 and higher."
- echo " We recommend using the Athena dialog boxes instead."
- echo " Install libXaw and re-run configure with --with-dialogs='athena'."
- echo " Read the PROBLEMS file for more information."
- fi; fi
- ;;
- athena ) echo " Using Athena dialog boxes." ;;
- msw ) echo " Using MS-Windows dialog boxes." ;;
-esac
-test "$with_modules" = "yes" && echo " Compiling in dynamic shared object module support."
-test "$with_clash_detection" = yes && \
+test "$with_socks" = yes && echo " Compiling in support for SOCKS."
+test "$with_dnet" = yes && echo " Compiling in support for DNET."
+test "$with_modules" = "yes" && echo " Compiling in support for dynamic shared object modules."
+test "$with_clash_detection" != "no" && \
echo " Clash detection will use \"$lockdir\" for locking files."
-echo " movemail will use \"$mail_locking\" for locking mail spool files."
-test "$with_pop" = yes && echo " Using POP for mail access."
-test "$with_kerberos" = yes && echo " Using Kerberos for POP authentication."
-test "$with_hesiod" = yes && echo " Using Hesiod to get POP server host."
-test "$use_union_type" = yes && echo " Using the union type for Lisp_Objects."
-test "$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
+test "$use_union_type" = yes && echo " Using the union type for Lisp_Objects."
+test "$pdump" = yes && echo " Using the new portable dumper."
+test "$debug" = yes && echo " Compiling in support for extra debugging code."
+test "$usage_tracking" = yes && echo " Compiling in support for active usage tracking (Sun internal)."
+if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
+ != "no no no no no no"; then
echo " WARNING: ---------------------------------------------------------"
echo " WARNING: Compiling in support for runtime error checking."
echo " WARNING: XEmacs will run noticeably more slowly as a result."
### from the file `./configure.in'.
### To rebuild it, execute the command
### autoconf
-### in the this directory. You must have autoconf version 2.12 or later.
+### in the this directory. You must have autoconf version 2.13 or later.
### This file is part of XEmacs.
dnl We use the m4 quoting characters [ ] (as established by the
dnl autoconf system), so quote them like this: [[foo]]
-AC_PREREQ(2.12)dnl
+AC_PREREQ(2.13)dnl
dnl Redefine some standard autoconf macros
dnl here is how XEmacs is different:
dnl - no cache file
dnl Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
dnl Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
])dnl AC_INIT_PARSE_ARGS
with_widgets=''
with_dialogs=''
with_file_coding=''
-dnl const_is_losing is removed - we rely on AC_C_CONST instead.
-dnl We accept (and ignore) the --const-is-losing option for compatibility.
-dnl const_is_losing='yes'
cpp='' cppflags='' libs='' ldflags=''
dynamic=''
with_x11=''
with_sparcworks | \
with_tooltalk | \
with_ldap | \
+ with_postgresql | \
with_pop | \
with_kerberos | \
with_hesiod | \
external_widget | \
verbose | \
extra_verbose | \
- const_is_losing | \
usage_tracking | \
use_union_type | \
pdump | \
memory_usage_stats | \
with_clash_detection | \
with_modules | \
- no_doc_file )
+ quick_build )
dnl Make sure the value given was either "yes" or "no".
case "$val" in
y | ye | yes ) val=yes ;;
byte_code ) error_check_byte_code=yes ;;
nobyte_code ) error_check_byte_code=no ;;
+ glyphs ) error_check_glyphs=yes ;;
+ noglyphs ) error_check_glyphs=no ;;
+
* ) bogus_error_check=yes ;;
esac
if test "$bogus_error_check" -o \
\( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
if test "$error_check_default" = yes ; then
- types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', and \`nobyte-code'."
+ types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
else
- types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', and \`byte-code'."
+ types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
fi
USAGE_ERROR(["Valid types for the \`--$optname' option are:
$types."])
error_check_gc=$new_default
error_check_malloc=$new_default
error_check_byte_code=$new_default
+ error_check_glyphs=$new_default
new_default= # reset this
fi
echeck_notfirst=true
"use_minimal_tagbits" | \
"use_indexed_lrecord_implementation" | \
"run_in_place" | \
+ "const_is_losing" | \
"with_gnu_make" )
AC_MSG_WARN([Obsolete option \`--$optname' ignored.])
;;
PROGNAME=xemacs
fi
+AC_DEFINE_UNQUOTED(EMACS_PROGNAME, "$PROGNAME")
+
dnl ----------------------------------
dnl Error checking and debugging flags
dnl ----------------------------------
test "${error_check_gc=$beta}" = yes && AC_DEFINE(ERROR_CHECK_GC)
test "${error_check_malloc=$beta}" = yes && AC_DEFINE(ERROR_CHECK_MALLOC)
test "${error_check_byte_code=$beta}" = yes && AC_DEFINE(ERROR_CHECK_BYTE_CODE)
+test "${error_check_glyphs=$beta}" = yes && AC_DEFINE(ERROR_CHECK_GLYPHS)
dnl debug=yes must be set when error checking is present. This should be
dnl fixed up.
dnl debug implies other options
m68*-sony-* ) machine=news ;;
mips-sony-* ) machine=news-risc ;;
clipper-* ) machine=clipper ;;
- arm-* ) machine=arm ;;
- armv[34][lb]-* ) machine=arm ;;
+ arm* ) machine=arm ;;
ns32k-* ) machine=ns32000 ;;
esac
XE_ADD_OBJS(sunpro.o)
fi
-if test "$with_clash_detection" = "yes"; then
+if test "$with_clash_detection" != "no"; then
AC_DEFINE(CLASH_DETECTION)
XE_ADD_OBJS(filelock.o)
fi
AC_PROG_CPP
-AC_AIX
+dnl --------------------------------------------------------------------
+dnl Compiler feature macros
+dnl --------------------------------------------------------------------
+
+AC_AIX dnl Defines _ALL_SOURCE on AIX.
+
+dnl Determine which SMART_INCLUDE macro will work for this system
+cat > $srcdir/conffoo.h <<EOF
+#define CONFFOO 1
+EOF
+AC_MSG_CHECKING(for a working inclusion macro)
+AC_TRY_COMPILE(,[
+#define SMART_INCLUDE(path,file) <path/file>
+#define CONFFOO_H_PATH $srcdir
+#define CONFFOO_INCLUDE(file) SMART_INCLUDE (CONFFOO_H_PATH,file)
+#include CONFFOO_INCLUDE(conffoo.h)
+], [ AC_MSG_RESULT(direct); AC_DEFINE(SMART_INCLUDE_INDIRECTIONS,0) ],
+AC_TRY_COMPILE(,[
+#define GLUE_INCLUDE(path,file) <##path##/##file##>
+#define SMART_INCLUDE(path,file) GLUE_INCLUDE(path,file)
+#define CONFFOO_H_PATH $srcdir
+#define CONFFOO_INCLUDE(file) SMART_INCLUDE(CONFFOO_H_PATH,file)
+#include CONFFOO_INCLUDE(conffoo.h)
+], [ AC_MSG_RESULT(simple); AC_DEFINE(SMART_INCLUDE_INDIRECTIONS,1) ],
+AC_TRY_COMPILE(,[
+#define GLUE_INCLUDE_2(path,file) <##path##/##file##>
+#define GLUE_INCLUDE_1(path,file) GLUE_INCLUDE_2(path,file)
+#define SMART_INCLUDE(path,file) GLUE_INCLUDE_1(path,file)
+#define CONFFOO_H_PATH $srcdir
+#define CONFFOO_INCLUDE(file) SMART_INCLUDE (CONFFOO_H_PATH,file)
+#include CONFFOO_INCLUDE(conffoo.h)
+], [ AC_MSG_RESULT(double); AC_DEFINE(SMART_INCLUDE_INDIRECTIONS,2) ],
+ AC_MSG_ERROR([Cannot define a proper SMART_INCLUDE macro. Please report.]))))
+rm -f $srcdir/conffoo.h
+
+
+dnl We want feature macros defined here and in config.h.in, so that
+dnl the compilation environment at configure time and compile time agree.
AC_MSG_CHECKING(for GNU libc)
AC_TRY_COMPILE([#include <features.h>],[
dnl Well. then why not fix fucking pop?
test "$have_glibc" = "yes" && AC_DEFINE(_GNU_SOURCE)
+dnl We'd like to use vendor extensions, where available.
+dnl We'd like to use functions from the latest Unix98 standards.
+dnl See http://www.opengroup.org/onlinepubs/007908799/xsh/compilation.html
+case "$opsys" in
+ sol2)
+ AC_DEFINE(__EXTENSIONS__)
+ dnl Solaris 2 before 2.5 had some bugs with feature test macro interaction.
+ if test "$os_release" -ge 55; then
+ AC_DEFINE(_XOPEN_SOURCE,500)
+ AC_DEFINE(_XOPEN_SOURCE_EXTENDED)
+ fi ;;
+ linux)
+ AC_DEFINE(_POSIX_C_SOURCE,199506L)
+ AC_DEFINE(_XOPEN_SOURCE,500)
+ AC_DEFINE(_XOPEN_SOURCE_EXTENDED)
+ ;;
+esac
dnl Identify compilers to enable compiler-specific hacks.
dnl Add support for other compilers HERE!
CPP_to_sh(LD_SWITCH_SHARED, ld_switch_shared, -c)
+#define ORDINARY_LD "\$(CC) \$(CFLAGS)"
+configure___ ordinary_ld=ORDINARY_LD
+
#ifdef ORDINARY_LINK
-#define LD "\$(CC) \$(CFLAGS)"
+#define LD ORDINARY_LD
#else /* no ORDINARY LINK */
#ifdef COFF_ENCAPSULATE
#define LD "\$(CC) -nostdlib"
rm $tempcname
+if test "$pdump" = "yes"; then
+ ordinary_link="yes"
+ ld="${ordinary_ld}"
+ start_files=
+ libs_standard=
+ unexec=
+ lib_gcc=
+fi
+
dnl For debugging...
test "$extra_verbose" = "yes" && \
PRINT_VAR(libs_machine libs_system libs_termcap libs_standard
fi
fi
+dnl Search for GCC specific build problems we know about
+if test "$GCC" = "yes"; then
+AC_MSG_CHECKING(for buggy gcc versions)
+GCC_VERSION=`$CC --version`
+case `uname -s`:`uname -m`:$GCC_VERSION in
+ dnl egcs 2.90.21 (egcs-1.00 release)
+ dnl egcs 2.90.29 (egcs-1.0.3 release)
+ *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
+ dnl Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures
+ dnl without also using `-fno-schedule-insns'.
+ case "$CFLAGS" in
+ *-O2*|*-O3*)
+ case "$CFLAGS" in
+ *-fno-schedule-insns*) ;;
+ *)
+ AC_MSG_RESULT(Yes)
+ AC_MSG_WARN(Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures)
+ AC_MSG_WARN(without also using -fno-schedule-insns.)
+ AC_MSG_ERROR(Aborting due to known problem)
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ dnl egcs-2.91.57 (egcs-1.1 release)
+ dnl egcs-2.91.66 (egcs-1.1.2 release)
+ Linux:alpha:egcs-2.91.*)
+ AC_MSG_RESULT(Yes)
+ AC_MSG_WARN(There have been reports of egcs-1.1 not compiling XEmacs correctly on)
+ AC_MSG_WARN(Alpha Linux. There have also been reports that egcs-1.0.3a is O.K.)
+ AC_MSG_ERROR(Aborting due to known problem)
+ ;;
+ *:i*86*:2.7.2*)
+ case "$GCC_VERSION" in
+ 2.7.2)
+ case "$CFLAGS" in
+ *-O2*|*-O3*)
+ case "$CFLAGS" in
+ *-fno-strength-reduce*) ;;
+ *)
+ AC_MSG_RESULT(Yes)
+ AC_MSG_WARN(Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using)
+ AC_MSG_WARN(-fno-strength-reduce.)
+ AC_MSG_ERROR(Aborting due to known problem)
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ case "$CFLAGS" in
+ *-fno-caller-saves*) ;;
+ *)
+ AC_MSG_RESULT(Yes)
+ AC_MSG_WARN(Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using)
+ AC_MSG_WARN(-fno-caller-saves.)
+ AC_MSG_ERROR(Aborting due to known problem)
+ ;;
+ esac
+ ;;
+esac
+fi
+AC_MSG_RESULT(No)
+
dnl Inform compiler that certain flags are meant for the linker
dnl XE_PROTECT_LINKER_FLAGS(shell_var)
define([XE_PROTECT_LINKER_FLAGS], [
dnl Add s&m-determined objects (including unexec) to link line
test -n "$objects_machine" && XE_ADD_OBJS($objects_machine)
test -n "$objects_system" && XE_ADD_OBJS($objects_system)
-test -n "$unexec" && XE_ADD_OBJS($unexec)
+test -n "$unexec" && test ! "$pdump" = "yes" && XE_ADD_OBJS($unexec)
+test "$pdump" = "yes" && XE_ADD_OBJS(dumper.o)
dnl Dynodump (Solaris 2.x, x<6)
AC_MSG_CHECKING(for dynodump)
dnl the run-time to use the link-time libraries. This also helps avoid
dnl mismatches between the link-time and run-time libraries.
-dnl #### Unfortunately, there are horrible libc4 and libc5 libraries
-dnl listed in /etc/ld.so.conf on some systems, and including them on
-dnl the link path leads to linking in utterly broken libc's.
-dnl There are many clever ways of approaching this problem,
+dnl #### Unfortunately, there are horrible libc4 and libc5 libraries
+dnl listed in /etc/ld.so.conf on some systems, and including them on
+dnl the link path leads to linking in utterly broken libc's.
+dnl There are many clever ways of approaching this problem,
dnl but finding out that actually works...
dnl if test -z "$LD_RUN_PATH" -a -r "/etc/ld.so.conf"; then
if test "$system_malloc" = "yes" ; then
GNU_MALLOC=no
GNU_MALLOC_reason="
- (The GNU allocators don't work with this system configuration)."
+ - The GNU allocators don't work with this system configuration."
elif test "$with_system_malloc" = "yes" ; then
GNU_MALLOC=no
GNU_MALLOC_reason="
- (User chose not to use GNU allocators)."
+ - User chose not to use GNU allocators."
elif test "$with_debug_malloc" = "yes" ; then
GNU_MALLOC=no
GNU_MALLOC_reason="
- (User chose to use Debugging Malloc)."
+ - User chose to use Debugging Malloc."
fi
if test "$doug_lea_malloc" = "yes" ; then
if test "$GNU_MALLOC" = yes ; then
GNU_MALLOC_reason="
- (Using Doug Lea's new malloc from the GNU C Library.)"
+ - Using Doug Lea's new malloc from the GNU C Library."
fi
AC_DEFINE(DOUG_LEA_MALLOC)
if test "$after_morecore_hook_exists" = "no" ; then
GNU_MALLOC_reason="
- (Using Doug Lea's new malloc from the Linux C Library.)"
+ - Using Doug Lea's new malloc from the Linux C Library."
AC_DEFINE(_NO_MALLOC_WARNING_)
fi
use_minimal_tagbits=yes
AC_PROG_YACC
dnl checks for header files
-AC_CHECK_HEADERS(mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h)
-AC_CHECK_HEADERS(utime.h locale.h libgen.h fcntl.h ulimit.h cygwin/version.h)
-AC_CHECK_HEADERS(kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h)
+AC_CHECK_HEADERS(dnl
+ a.out.h dnl
+ cygwin/version.h dnl
+ fcntl.h dnl
+ inttypes.h dnl
+ libgen.h dnl
+ locale.h dnl
+ mach/mach.h dnl
+ sys/param.h dnl
+ sys/pstat.h dnl
+ sys/stropts.h dnl
+ sys/time.h dnl
+ sys/timeb.h dnl
+ sys/un.h dnl
+ kstat.h dnl
+ ulimit.h dnl
+ unistd.h dnl
+ utime.h dnl
+)
AC_HEADER_SYS_WAIT
AC_HEADER_STDC
AC_HEADER_TIME
fi
dnl Link with "-z ignore" on Solaris if supported
-if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then
- AC_MSG_CHECKING(for \"-z ignore\" linker flag)
- case "`ld -h 2>&1`" in
- *-z\ ignore\|record* ) AC_MSG_RESULT(yes)
- XE_PREPEND(-z ignore, ld_switch_site) ;;
- *) AC_MSG_RESULT(no) ;;
- esac
+if test "$opsys" = "sol2"; then
+ if test "$os_release" -ge 56; then
+ AC_MSG_CHECKING(for \"-z ignore\" linker flag)
+ case "`ld -h 2>&1`" in
+ *-z\ ignore\|record* ) AC_MSG_RESULT(yes)
+ XE_PREPEND(-z ignore, ld_switch_site) ;;
+ *) AC_MSG_RESULT(no) ;;
+ esac
+ fi
fi
dnl ----------------------
AC_MSG_RESULT(R${x11_release})
AC_DEFINE_UNQUOTED(THIS_IS_X11R${x11_release})
+ AC_CHECK_FUNCS(XConvertCase)
+
AC_CHECK_HEADERS(X11/Xlocale.h)
dnl remove this - we should avoid checking for specific OS
AC_TRY_RUN([#include <fcntl.h>
int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }],
[AC_DEFINE(HAVE_MSG_SELECT)])
- const_is_losing=no
with_file_coding=yes
XE_ADD_OBJS(console-msw.o device-msw.o event-msw.o frame-msw.o objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o gui-msw.o)
fi
dnl autodetect the location of tt_c.h
dnl tt_c.h might be in Tt or desktop include directories
for dir in "" "Tt/" "desktop/" ; do
- AC_CHECK_HEADER(${dir}tt_c.h, tt_c_h_path="${dir}tt_c.h"; break)
+ AC_CHECK_HEADER(${dir}tt_c.h, tt_c_h_file="${dir}tt_c.h"; break)
done
- if test -z "$tt_c_h_path"; then
+ if test -z "$tt_c_h_file"; then
if test "$with_tooltalk" = "yes"; then
USAGE_ERROR("Unable to find required tooltalk header files.")
fi
test -z "$with_tooltalk" && with_tooltalk=yes
if test "$with_tooltalk" = "yes"; then
AC_DEFINE(TOOLTALK)
- AC_DEFINE_UNQUOTED(TT_C_H_PATH, "$tt_c_h_path")
+ AC_DEFINE_UNQUOTED(TT_C_H_FILE, "$tt_c_h_file")
XE_PREPEND($tt_libs, libs_x)
XE_ADD_OBJS(tooltalk.o)
fi
AC_CHECK_FUNCS(ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result)
fi
+dnl Autodetect PostgreSQL
+dnl The default installation location (non-Linux) is /usr/local/pgsql;
+dnl a different prefix can be selected at build/install time. If PostgreSQL
+dnl is installed into a different prefix, that prefix must be specified in
+dnl in the --site-prefixes flag.
+dnl The default RPM-based Linux installation location is /usr.
+AC_CHECKING(for PostgreSQL)
+postgres_h_path=""
+postgres_includes_found=no
+save_c_switch_site="$c_switch_site"
+
+dnl First, test standard location and site prefixes only:
+if test "$with_postgresql" != "no"; then
+ AC_CHECK_HEADER(libpq-fe.h,postgres_includes_found=yes)
+fi
+
+dnl Otherwise, test different known headers locations on linux:
+if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \
+ -d "/usr/local/pgsql/include"; then
+ c_switch_site="$c_switch_site -I/usr/local/pgsql/include"
+ AC_CHECK_HEADER(libpq-fe.h,postgres_includes_found=yes)
+ if test "$postgres_includes_found" != "yes"; then
+ postgres_h_path="/usr/local/pgsql/include"
+ fi
+ c_switch_site="$save_c_switch_site"
+fi
+if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \
+ -d "/usr/include/pgsql"; then
+ c_switch_site="$c_switch_site -I/usr/include/pgsql"
+ AC_CHECK_HEADER(libpq-fe.h,postgres_includes_found=yes)
+ if test "$postgres_includes_found" = "yes"; then
+ postgres_h_path="pgsql"
+ fi
+ c_switch_site="$save_c_switch_site"
+ fi
+if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \
+ -d "/usr/include/postgresql"; then
+ c_switch_site="$c_switch_site -I/usr/include/postgresql"
+ AC_CHECK_HEADER(libpq-fe.h,postgres_includes_found=yes)
+ if test "$postgres_includes_found" = "yes"; then
+ postgres_h_path="postgresql"
+fi
+ c_switch_site="$save_c_switch_site"
+fi
+
+dnl Finally, check if we can link with libpq:
+if test "$postgres_includes_found" = "yes"; then
+ AC_CHECK_LIB(pq,PQconnectdb,with_postgresql=yes,with_postgresql=no)
+fi
+if test "$with_postgresql" = "yes"; then
+ AC_CHECK_LIB(pq,PQconnectStart,with_postgresqlv7=yes,with_postgresqlv7=no)
+fi
+if test "$with_postgresql" = "yes"; then
+ if test -n "$postgres_h_path"; then
+ AC_DEFINE_UNQUOTED(POSTGRES_H_PATH, $postgres_h_path)
+ fi
+ AC_DEFINE(HAVE_POSTGRESQL)
+ if test "$with_postgresqlv7" = "yes"; then
+ AC_DEFINE(HAVE_POSTGRESQLV7)
+ fi
+ XE_PREPEND(-lpq, LIBS)
+ XE_ADD_OBJS(postgresql.o)
+fi
+
dnl ----------------------
dnl Graphics libraries
dnl ----------------------
if test -z "$with_xpm"; then
AC_MSG_CHECKING(for Xpm - no older than 3.4f)
xe_check_libs=-lXpm
- AC_TRY_RUN([#include <X11/xpm.h>
+ AC_TRY_RUN([#define XPM_NUMBERS
+#include <X11/xpm.h>
int main(int c, char **v) {
return c == 1 ? 0 :
XpmIncludeVersion != XpmLibraryVersion() ? 1 :
],
[
struct timeval time;
- struct timezone dummy;
- gettimeofday (&time, &dummy);
+ gettimeofday (&time, 0);
],
[AC_MSG_RESULT(two)],
[AC_MSG_RESULT(one)
AC_C_INLINE
-if test "$ac_cv_c_inline" != "no"; then
- AC_DEFINE(HAVE_INLINE)
- test "$GCC" = "yes" && XE_ADD_OBJS(inline.o)
-fi
+test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && XE_ADD_OBJS(inline.o)
dnl HP-UX has a working alloca in libPW.
dnl case "${GCC}${opsys}" in hpux* )
dnl rel_alloc requires either GNU malloc or system malloc with mmap
dnl We only turn rel_alloc on by default if mmap is available.
-test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
-test "$rel_alloc" = "default" -a "$have_mmap" = "yes" && rel_alloc=yes
+test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
+if test "$rel_alloc $have_mmap" = "default yes"; then
+ if test "$doug_lea_malloc" = "yes"; then
+ dnl Check if malloc() calls mmap(), making rel_alloc pointless.
+ AC_MSG_CHECKING(for M_MMAP_THRESHOLD)
+ AC_TRY_COMPILE([#include <malloc.h>],[
+#ifndef M_MMAP_THRESHOLD
+#error No M_MMAP_THRESHOLD :-(
+!@+$%^&*_)(_ - unlikely to compile...
+#endif
+], [rel_alloc=no; AC_MSG_RESULT(yes);], [rel_alloc=yes; AC_MSG_RESULT(no);])
+ else
+ rel_alloc=yes
+ fi
+fi
test "$rel_alloc" = "yes" && AC_DEFINE(REL_ALLOC)
dnl Check for terminal I/O variants
sound_found=yes
need_miscplay=yes
XE_ADD_OBJS(linuxplay.o)
- [AC_DEFINE_UNQUOTED(SOUNDCARD_H_PATH, "${dir}/soundcard.h")]
+ [AC_DEFINE_UNQUOTED(SOUNDCARD_H_FILE, "${dir}/soundcard.h")]
break)
done
fi
fi
if test "$with_ncurses" = "yes"; then
AC_DEFINE(HAVE_NCURSES)
- AC_CHECK_HEADER(ncurses/curses.h, curses_h_path=ncurses/curses.h)
- AC_CHECK_HEADER(ncurses/term.h, term_h_path=ncurses/term.h)
+ AC_CHECK_HEADER(ncurses/curses.h, curses_h_file=ncurses/curses.h)
+ AC_CHECK_HEADER(ncurses/term.h, term_h_file=ncurses/term.h)
XE_ADD_OBJS(terminfo.o)
XE_PREPEND(-lncurses, LIBS)
dnl <ncurses/unctrl.h>)
save_c_switch_site="$c_switch_site"
c_switch_site="$c_switch_site -I/usr/include/ncurses"
- AC_CHECK_HEADER(ncurses/curses.h, curses_h_path=ncurses/curses.h)
+ AC_CHECK_HEADER(ncurses/curses.h, curses_h_file=ncurses/curses.h)
if test "$ac_cv_header_ncurses_curses_h" = "yes"
then AC_MSG_WARN("Your system has the bogus ncurses include bug.")
else c_switch_site="$save_c_switch_site"
fi
fi
fi
- AC_DEFINE_UNQUOTED(CURSES_H_PATH, "${curses_h_path-curses.h}")
- AC_DEFINE_UNQUOTED(TERM_H_PATH, "${term_h_path-term.h}")
+ AC_DEFINE_UNQUOTED(CURSES_H_FILE, "${curses_h_file-curses.h}")
+ AC_DEFINE_UNQUOTED(TERM_H_FILE, "${term_h_file-term.h}")
dnl Autodetect gpm
test -z "$with_gpm" && { AC_CHECK_HEADER(gpm.h, , with_gpm=no) }
dnl Check for Berkeley DB.
if test "$with_database_berkdb" != "no"; then
AC_MSG_CHECKING(for Berkeley db.h)
- for path in "db/db.h" "db.h"; do
- AC_TRY_COMPILE([#ifdef HAVE_INTTYPES_H
+ for header in "db/db.h" "db.h"; do
+ AC_TRY_COMPILE([
+#include <stdlib.h>
+#if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
+#ifdef HAVE_INTTYPES_H
#define __BIT_TYPES_DEFINED__
#include <inttypes.h>
typedef uint8_t u_int8_t;
typedef uint64_t u_int64_t;
#endif
#endif
-#include <$path>
-],[], db_h_path="$path"; break)
+#endif
+#include <$header>
+],[], db_h_file="$header"; break)
done
- if test -z "$db_h_path"
+ if test -z "$db_h_file"
then AC_MSG_RESULT(no); with_database_berkdb=no
- else AC_MSG_RESULT($db_h_path)
+ else AC_MSG_RESULT($db_h_file)
fi
if test "$with_database_berkdb" != "no"; then
AC_MSG_CHECKING(for Berkeley DB version)
AC_EGREP_CPP(yes,
-[#include <$db_h_path>
+[#include <$db_h_file>
#if DB_VERSION_MAJOR > 1
yes
#endif
fi
if test "$with_database_berkdb" = "yes"; then
- AC_DEFINE_UNQUOTED(DB_H_PATH, "$db_h_path")
+ AC_DEFINE_UNQUOTED(DB_H_FILE, "$db_h_file")
AC_DEFINE(HAVE_BERKELEY_DB)
test "$need_libdb" = "yes" && XE_PREPEND(-ldb, LIBS)
else with_database_berkdb=no
test "$with_i18n3" = "yes" && AC_DEFINE(I18N3)
test "$GCC" = "yes" && AC_DEFINE(USE_GCC)
test "$external_widget" = "yes" && AC_DEFINE(EXTERNAL_WIDGET)
-test "$no_doc_file" = "yes" && AC_DEFINE(NO_DOC_FILE)
-dnl test "$const_is_losing" = "yes" && AC_DEFINE(CONST_IS_LOSING)
+test "$quick_build" = "yes" && AC_DEFINE(QUICK_BUILD)
test "$with_purify" = "yes" && AC_DEFINE(PURIFY)
test "$with_quantify" = "yes" && AC_DEFINE(QUANTIFY)
test "$with_pop" = "yes" && AC_DEFINE(MAIL_USE_POP)
echo "
XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
-
- Where should the build process find the source code? $srcdir
- What installation prefix should install use? $prefix
- What operating system and machine description files should XEmacs use?
- \`$opsysfile' and \`$machfile'
- What compiler should XEmacs be built with? $CC $CFLAGS
- Should XEmacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
- Should XEmacs use the relocating allocator for buffers? $rel_alloc
- What window system should XEmacs use? ${window_system}"
-if test "$with_x11" = "yes"; then
- echo " Where do we find X Windows header files? $x_includes"
- echo " Where do we find X Windows libraries? $x_libraries"
-fi
+"
+echo "
+Compilation / Installation:"
+echo " Source code location: $srcdir"
+echo " Installation prefix: $prefix"
if test -n "$site_includes"; then
- echo " Additional header files: $site_includes"
+ echo " Additional header files: $site_includes"
fi
if test -n "$site_libraries"; then
- echo " Additional libraries: $site_libraries"
+ echo " Additional libraries: $site_libraries"
fi
if test -n "$site_prefixes"; then
- echo " Additional prefixes: $site_prefixes"
+ echo " Additional prefixes: $site_prefixes"
fi
if test -n "$runpath"; then
- echo " Runtime library search path: $runpath"
+ echo " Runtime library search path: $runpath"
+fi
+echo " Operating system description file: \`$opsysfile'"
+echo " Machine description file: \`$machfile'"
+echo " Compiler: $CC $CFLAGS"
+echo " Relocating allocator for buffers: $rel_alloc"
+echo " GNU version of malloc: ${GNU_MALLOC}${GNU_MALLOC_reason}"
+
+echo "
+Window System:"
+if test "$with_msw" = "yes"; then
+ echo " Compiling in support for the Microsoft window system."
+fi
+if test "$with_x11" = "yes"; then
+ echo " Compiling in support for the X window system:"
+ echo " - X Windows headers location: $x_includes"
+ echo " - X Windows libraries location: $x_libraries"
+ if test "$with_xauth" != yes; then
+ echo " - Xau (X authority) not available."
+ fi
+ if test "$with_xmu" != yes; then
+ echo " - Xmu library not available; substituting equivalent routines."
+ fi
+ if test "$with_wmcommand" != no; then
+ echo " - Handling WM_COMMAND properly."
+ fi
fi
if test "$have_xaw" = "yes"; then
- echo " Athena library to link: $athena_lib"
- echo " Athena header include path: $athena_h_path"
+ echo " Compiling in support for the Athena widget set:"
+ echo " - Athena headers location: $athena_h_path"
+ echo " - Athena library to link: $athena_lib"
fi
-test "$with_dnet" = yes && echo " Compiling in support for DNET."
-test "$with_socks" = yes && echo " Compiling in support for SOCKS."
-test "$with_xauth" = yes && echo " Compiling in support for XAUTH."
-if test "$with_xmu" != yes -a "$with_x11" = yes; then
- echo " No Xmu; substituting equivalent routines."
+case "$with_menubars" in
+ lucid ) echo " Using Lucid menubars." ;;
+ motif ) echo " Using Motif menubars."
+ 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." ;;
+ msw ) echo " Using MS-Windows scrollbars." ;;
+esac
+case "$with_dialogs" in
+ motif ) echo " Using Motif dialog boxes."
+ if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
+ echo " *WARNING* The Motif dialog boxes cause problems on AIX 4.3 and higher."
+ echo " We recommend using the Athena dialog boxes instead."
+ echo " Install libXaw and re-run configure with --with-dialogs='athena'."
+ echo " Read the PROBLEMS file for more information."
+ fi; fi ;;
+ athena ) echo " Using Athena dialog boxes." ;;
+ msw ) echo " Using MS-Windows dialog boxes." ;;
+esac
+case "$with_widgets" in
+ motif ) echo " Using Motif native widgets." ;;
+ athena ) echo " Using Athena native widgets." ;;
+ msw ) echo " Using MS-Windows native widgets." ;;
+esac
+if test "$with_dragndrop" = yes; then
+ echo " Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
+ echo " - Drag'n'Drop prototype: $dragndrop_proto."
fi
+echo "
+TTY:"
+test "$with_ncurses" = yes && echo " Compiling in support for ncurses."
+test "$with_gpm" = yes && echo " Compiling in support for GPM (General Purpose Mouse)."
+
+echo "
+Images:"
+test "$with_gif" = yes && echo " Compiling in support for GIF images (builtin)."
if test "$with_xpm" = yes; then
- echo " Compiling in support for XPM images."
+ echo " Compiling in support for XPM images."
elif test "$with_x11" = yes; then
- echo " --------------------------------------------------------------------"
- echo " WARNING: Compiling without XPM support."
+ echo " WARNING: -----------------------------------------------------------"
+ echo " WARNING: Compiling without XPM image support."
if test "$xpm_problem" != ""; then
echo " Reason: $xpm_problem"
fi
echo " WARNING: You should strongly consider installing XPM."
echo " WARNING: Otherwise toolbars and other graphics will look suboptimal."
echo " WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
- echo " --------------------------------------------------------------------"
+ echo " WARNING: -----------------------------------------------------------"
fi
if test "$with_png" = yes; then
- echo " Compiling in support for PNG image handling."
+ echo " Compiling in support for PNG images."
elif test "$window_system" != "none"; then
- echo " --------------------------------------------------------------------"
+ echo " WARNING: -----------------------------------------------------------"
echo " WARNING: Compiling without PNG image support."
if test "$png_problem" != ""; then
echo " Reason: $png_problem"
echo " WARNING: You should strongly consider installing the PNG libraries."
echo " WARNING: Otherwise certain images and glyphs may not display."
echo " WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
- echo " --------------------------------------------------------------------"
+ echo " WARNING: -----------------------------------------------------------"
fi
-test "$with_gif" = yes && echo " Compiling in support for (builtin) GIF image handling."
-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_jpeg" = yes && echo " Compiling in support for JPEG images."
+test "$with_tiff" = yes && echo " Compiling in support for TIFF images."
test "$with_xface" = yes && echo " Compiling in support for X-Face message headers."
-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)."
+echo "
+Sound:"
+test "$with_native_sound" = yes && echo " Compiling in support for sound (native)."
+test "$with_nas_sound" = yes && echo " Compiling in support for NAS (network audio system)."
+test "$old_nas" = yes && echo " - NAS library lacks error trapping; will play synchronously."
+test "$with_esd_sound" = yes && echo " Compiling in support for ESD (Enlightened Sound Daemon)."
-test "$with_database_berkdb" = yes && echo " Compiling in support for Berkeley DB."
+echo "
+Databases:"
+test "$with_database_berkdb" = yes && echo " Compiling in support for Berkeley database."
test "$with_database_dbm" = yes && echo " Compiling in support for DBM."
test "$with_database_gdbm" = yes && echo " Compiling in support for GNU DBM."
+test "$with_ldap" = yes && echo " Compiling in support for LDAP."
+if test "$with_postgresql" = yes; then
+ echo " Compiling in support for PostgreSQL."
+ if test "$with_postgresqlv7" = yes; then
+ echo " - Using PostgreSQL V7 bindings."
+ fi
+ if test -n "$postgres_h_path"; then
+ echo " - PostgreSQL headers location: $postgres_h_path"
+ fi
+fi
-test "$with_ldap" = yes && echo " Compiling in support for LDAP."
-
-test "$with_ncurses" = yes && echo " Compiling in support for ncurses."
-test "$with_gpm" = yes && echo " Compiling in support for GPM (General Purpose Mouse)."
-
-test "$with_mule" = yes && echo " Compiling in Mule (multi-lingual) support."
+echo "
+Internationalization:"
+test "$with_mule" = yes && echo " Compiling in support for Mule (multi-lingual Emacs)."
test "$with_utf_2000" = yes && echo " Using UTF-2000 (UTF-8) buffer/string representation."
-test "$with_text_coding" = yes && echo " Compiling in Text coding support."
-test "$with_file_coding" = yes && echo " Compiling in File coding support."
-test "$with_xim" != no && echo " Compiling in XIM (X11R5+ I18N input method) support."
-test "$with_xim" = motif && echo " Using Motif to provide XIM support."
-test "$with_xim" = xlib && echo " Using raw Xlib to provide XIM support."
-test "$with_xfs" = yes && echo " Using XFontSet to provide bilingual menubar."
-test "$with_canna" = yes && echo " Compiling in support for Canna on Mule."
+test "$with_text_coding" = yes && echo " Compiling in support for text coding."
+test "$with_file_coding" = yes && echo " Compiling in support for file coding."
+test "$with_xim" != no && echo " Compiling in support for XIM (X11R5+ I18N input method)."
+test "$with_xim" = motif && echo " - Using Motif to provide XIM support."
+test "$with_xim" = xlib && echo " - Using raw Xlib to provide XIM support."
+test "$with_xfs" = yes && echo " - Using XFontSet to provide bilingual menubar."
+test "$with_canna" = yes && echo " Compiling in support for Canna on Mule."
if test "$with_wnn" = yes; then
echo " Compiling in support for the WNN input method on Mule."
- test "$with_wnn6" = yes && echo " Using WNN version 6."
+ test "$with_wnn6" = yes && echo " - Using WNN version 6."
fi
-test "$with_i18n3" = yes && echo " Compiling in I18N support, level 3 (doesn't currently work)."
+test "$with_i18n3" = yes && echo " Compiling in support for I18N level 3 (doesn't currently work)."
-test "$with_cde" = yes && echo " Compiling in support for CDE."
+echo "
+Mail:"
+test "$with_pop" = yes && echo " Compiling in support for POP mail retrieval."
+test "$with_kerberos" = yes && echo " Compiling in support for Kerberos POP authentication."
+test "$with_hesiod" = yes && echo " Compiling in support for Hesiod POP server access."
+echo " Compiling in support for \"$mail_locking\" mail spool file locking method."
+
+echo "
+Other Features:"
test "$with_tooltalk" = yes && echo " Compiling in support for ToolTalk."
-test "$with_offix" = yes && echo " Compiling in support for OffiX."
-test "$with_dragndrop" = yes && echo " Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )."
test "$with_workshop" = yes && echo " Compiling in support for Sun WorkShop."
-test "$with_wmcommand" != no && echo " Compiling in support for proper WM_COMMAND handling."
-case "$with_menubars" in
- lucid ) echo " Using Lucid menubars." ;;
- motif ) echo " Using Motif menubars."
- 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." ;;
- msw ) echo " Using MS-Windows scrollbars." ;;
-esac
-case "$with_widgets" in
- motif ) echo " Using Motif native widgets." ;;
- athena ) echo " Using Athena native widgets." ;;
- msw ) echo " Using MS-Windows native widgets." ;;
-esac
-case "$with_dialogs" in
- motif )
- echo " Using Motif dialog boxes."
- if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
- echo " *WARNING* The Motif dialog boxes cause problems on AIX 4.3 and higher."
- echo " We recommend using the Athena dialog boxes instead."
- echo " Install libXaw and re-run configure with --with-dialogs='athena'."
- echo " Read the PROBLEMS file for more information."
- fi; fi
- ;;
- athena ) echo " Using Athena dialog boxes." ;;
- msw ) echo " Using MS-Windows dialog boxes." ;;
-esac
-test "$with_modules" = "yes" && echo " Compiling in dynamic shared object module support."
-test "$with_clash_detection" = yes && \
+test "$with_socks" = yes && echo " Compiling in support for SOCKS."
+test "$with_dnet" = yes && echo " Compiling in support for DNET."
+test "$with_modules" = "yes" && echo " Compiling in support for dynamic shared object modules."
+test "$with_clash_detection" != "no" && \
echo " Clash detection will use \"$lockdir\" for locking files."
-echo " movemail will use \"$mail_locking\" for locking mail spool files."
-test "$with_pop" = yes && echo " Using POP for mail access."
-test "$with_kerberos" = yes && echo " Using Kerberos for POP authentication."
-test "$with_hesiod" = yes && echo " Using Hesiod to get POP server host."
-test "$use_union_type" = yes && echo " Using the union type for Lisp_Objects."
-test "$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
+test "$use_union_type" = yes && echo " Using the union type for Lisp_Objects."
+test "$pdump" = yes && echo " Using the new portable dumper."
+test "$debug" = yes && echo " Compiling in support for extra debugging code."
+test "$usage_tracking" = yes && echo " Compiling in support for active usage tracking (Sun internal)."
+if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
+ != "no no no no no no"; then
echo " WARNING: ---------------------------------------------------------"
echo " WARNING: Compiling in support for runtime error checking."
echo " WARNING: XEmacs will run noticeably more slowly as a result."
unpredictable.
--without-xmu (*) For those unfortunates whose vendors don't ship Xmu.
--external-widget Compile with external widget support.
+
+
+TTY options:
+
+--without-tty Don't support TTY-s.
+--with-ncurses (*) Use the ncurses library for tty support.
+--with-gpm (*) Compile in support for General Purpose Mouse.
+
+
+Image options:
+
--with-xpm (*) Compile with support for XPM files.
It is highly recommended that you obtain XPM
(version 3.4h or better) if you don't already
Get if from the XEmacs FTP site.
-TTY options:
+Sound options:
---without-tty Don't support TTY-s.
---with-ncurses (*) Use the ncurses library for tty support.
---with-gpm (*) Compile in support for General Purpose Mouse.
-
-
-Additional features:
-
---with-tooltalk (*) Support the ToolTalk IPC protocol.
---with-workshop Support the Sun WorkShop (formerly Sparcworks)
- development environment.
---with-socks Compile with support for SOCKS (an Internet proxy).
---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=TYPE,[TYPE],... Compile with native sound support.
Valid types are `native', `nas' and `esd'.
Prefix a type with 'no' to disable.
--native-sound-lib=LIB Native sound support library. Needed on Suns
with --with-sound=both because both sound libraries
are called libaudio.
---with-pop support POP for mail retrieval
---with-kerberos support Kerberos-authenticated POP
---with-hesiod support Hesiod to get the POP server host
---with-dnet (*) Compile with support for DECnet.
+
+
+Database options:
+
+--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-ldap (*) Compile with support for the LDAP protocol (requires
installed LDAP libraries on the system).
+--with-postgresql (*) Compile with support for the PostgreSQL RDBMS (requires
+ installed PostreSQL libraries on the system).
+
+
+Mail options:
+
--mail-locking=TYPE (*) Specify the locking to be used by movemail to prevent
concurrent updates of mail spool files. Valid types
are `lockf', `flock', and `dot'.
+--with-pop support POP for mail retrieval
+--with-kerberos support Kerberos-authenticated POP
+--with-hesiod support Hesiod to get the POP server host
+
+
+Additional features:
+
+--with-tooltalk (*) Support the ToolTalk IPC protocol.
+--with-workshop Support the Sun WorkShop (formerly Sparcworks)
+ development environment.
+--with-socks Compile with support for SOCKS (an Internet proxy).
+--with-dnet (*) Compile with support for DECnet.
--with-modules Compile in experimental support for dynamically
loaded libraries (Dynamic Shared Objects).
--with-site-lisp=yes Allow for a site-lisp directory in the XEmacs hierarchy
--with-system-malloc Force use of the system malloc, rather than GNU malloc.
--with-debug-malloc Use the debugging malloc package.
--with-clash-detection Use lock files to detect multiple edits of the same
- file. The default is to not do clash detection.
+ file. The default is to do clash detection.
--lockdir=DIR The directory to put clash detection files in, such as
`/var/lock/emacs'.
Defaults to `${statedir}/xemacs/lock'.
*menubar*Font: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*
*popup*Font: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*
+! Gui elements share this font
+!
+Emacs.gui-element.attributeFont: -*-helvetica-medium-r-*-*-*-120-*-*-*-*-iso8859-*
+
! Font in the Motif dialog boxes.
! (Motif uses `fontList' while most other things use `font' - if you don't
! know why you probably don't want to.)
<EnterWindow>: Enter()\n\
<LeaveWindow>: Leave()\n
+! Native Widget translations
+! =======================
+Emacs*Text*translations: #override\n\
+ <Btn1Down>: widget-focus-in()\n
+
! XIM input method style
! =======================
Delete key to delete backwards, despite the presence (according to
Xlib) of a BackSpace key on the keyboard.
+** Shifted motion keys now select text by default. You can turn this
+off by setting `shifted-motion-keys-select-region' to nil.
+
+** You can now set the variable `kill-whole-line' to `always', which
+makes `kill-line' (C-k) delete the entire line always, not just when
+the cursor is at the beginning of the line. This behavior, as well as
+the existing kill-whole-line behavior, now only take effect when
+kill-line is called interactively, although this is a departure from a
+previous behavior in the case of setting this variable kill-whole-line
+to t. It is almost certainly what has always been intended, and most
+likely the old way of doing things introduced bugs.
+
+The new function `historical-kill-line' ignores the `kill-whole-line'
+setting and always gives the historical behavior of only killing to
+the end of the line. This function is bound to Sh-C-k, so that the
+kill to end of line behavior is available, even when `kill-whole-line'
+has been customized.
+
+** XEmacs menus now have accelerators by default. If a menu item does
+not have an accelerator specified, one is created dynamically, using
+numbers 1-9 and letters.
+
** Interactive searching and matching case improvements.
Case sensitiveness in searching operations is normally controlled by
** You can now use the buffer tabs to switch between buffers. The
tabs are located between the toolbar and the uppermost window, in a
location called "gutter". If you dislike the buffer tabs, you can
-disable them by specifying:
+disable them by customizing `gutter-buffers-tab-visible-p', or by
+placing this in your .emacs:
- (set-specifier default-gutter-visible-p nil)
+ (set-gutter-element-visible-p default-gutter-visible-p 'buffers-tab nil)
-in your `.emacs'. You can change the location of the gutter with
+You can change the location of the gutter with
`set-default-gutter-position', however currently only MS-Windows
-supports tab widgets with orientations other than vertical..
+supports tab widgets with orientations other than vertical.
+
+** Kill and yank now interact with the clipboard by default under
+Windows. This was done by changing the default value of
+`interprogram-cut-function' and `interprogram-paste-function'. You
+can get the old behavior by setting these to nil, and there is an
+option on the options menu to do this.
** When you press RET at a minibuffer prompt that provides a default
value, the value is stored in history instead of an empty line. Also,
unwanted spaces, and an optional prefix now allows them to behave the
old way.
+Also, the behavior of `string-rectangle' is now compliant with
+`pending-delete-mode': if this mode is active, then the string
+replaces the region rectangle. Otherwise, the command does not delete
+or overwrite any existing text. For those who want that feature but do
+not use pending-delete-mode, a new function, `replace-rectangle', is
+available.
+
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.
is now equivalent to
-user-init-file ~<user>/.emacs -user-init-directory ~<user>/.xemacs.
+** Init file may be called .emacs.el.
+
+Like in GNU Emacs 20.4 and on, you can now name the XEmacs init file
+`.emacs.el'. Formerly the name had to be `.emacs'. If you use the
+name `.emacs.el', you can byte-compile the file in the usual way.
+
+If both `.emacs' and `.emacs.el' exist, the latter file is the one
+that is used.
+
** New variable `mswindows-meta-activates-menu'.
-If you set this variable to nil then pressing the Alt key under
-MS-Windows will no longer activate the menubar. The default is t.
+If you set this variable to nil then pressing and releasing the Alt
+key under MS-Windows will no longer activate the menubar. The default
+is t. This is not to be confused with `menu-accelerator-enabled',
+which enables the use of Alt+<Letter> accelerators to invoke the
+menus.
-** Pixel-based scrolling has been implemented.
+** Pixel-based scrolling has been implemented.
By default this will attempt to scroll in increments equal to the
-height of the default face. Set `window-pixel-scroll-increment' to
+height of the default face. Set `window-pixel-scroll-increment' to
modify this behaviour.
+** Operation progress can be displayed using graphical widgets.
+See `lprogress-display' for details. This support has been switched
+on by default for font-lock and some web browsing functions. If you
+do not like this behaviour set `progress-display-use-echo-area'.
+
+** The PostgreSQL Relational Database Management System is now supported.
+It is now possible to build XEmacs so that the programming interface
+to the PostgreSQL RDBMS (libpq) is available in XEmacs Lisp.
+Supported versions of PostgreSQL are 6.5.3 (earlier versions may work,
+but have not been tested) and 7.0-beta1.
+
** Etags changes.
*** In DOS, etags looks for file.cgz if it cannot find file.c.
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.
-
-#### NOTE: the portable dumper is not really usable yet, because the
-state of built-in variables is not yet saved. Olivier promised to fix
-it. Nag, nag.
+try testing it.
** Much effort has been invested to make XEmacs Lisp faster:
buffer. As a side effect subwindow support now works once again.
All of this is still fairly experimental and there is no
-documentation. The current APIs might change in a future version of
-XEmacs. Some widgets are only available under MS-Windows. See the
+documentation. The current APIs might change in a future version of
+XEmacs. Some widgets are only available under MS-Windows. See the
file glyphs-test.el in the XEmacs src distribution for examples of
usage.
global obarray. `keywordp' used to wrongly return t in both cases
above.
+** New variables `this-command-properties' and
+`last-command-properties' are now available for communication between
+consecutive commands. Commands should use these to communicate with
+the pre/post-command hooks, subsequent commands, wrapping commands,
+etc. in preference to looking at and/or setting `this-command'.
+
+** New functions `add-one-shot-hook' and `add-local-one-shot-hook' make
+it possible to add a "one-shot" hook, which is to say a hook that runs
+only once, and automatically removes itself after the first time it
+has run.
+
+** The descriptor that specifies the text of a menu item can now be an
+evaluated expression. This makes this descriptor parallel with
+others, which can also be expressions.
+
\f
* Changes in XEmacs 21.0
========================
`get', `put', and `remprop' have been generalized to allow you to set
and retrieve properties on many different kinds of objects: symbols,
strings, faces, glyphs, and extents (for extents, however, this is not
-yet implemented). They are joined by a new function `object-props'
+yet implemented). They are joined by a new function `object-plist'
that returns all of the properties that have been set on an object.
New functions `plists-eq' and `plists-equal' are provided for
-Copyright (c) 1997, Didier Verna <verna@inf.enst.fr>.
+Copyright (c) 1997-2000, Didier Verna <didier@xemacs.org>.
Se reporter à la fin du document pour les conditions.
Vous lisez actuellement la version française du tutoriel d'Emacs.
-Cette version a été produite à partir de la version anglaise, qui est
+Cette version a été produite à partir de la version anglaise, qui est
Copyright (c) 1985, 1996 Free Software Foundation, Inc.
NOTE IMPORTANTE: pour quitter Emacs, tapez C-x C-c (deux caractères).
-Quand vous trouvez les caractères >> au début d'une ligne, cette ligne
+Quand vous trouvez les caractères >> au début d'une ligne, cette ligne
vous donne des directives pour essayer une commande. Par exemple:
<<Lignes blanches à but pédagogique. Le texte continue ci-dessous.>>
>> Maintenant, tapez C-v («view next screen») pour passer à l'écran
enfoncée et tapez 'v'). À partir de maintenant, refaites la même
chose quand vous avez fini de lire tout l'écran.
-Remarquez que quand vous changez d'écran, les deux dernières lignes de
+Remarquez que quand vous changez d'écran, les deux dernières lignes de
l'écran précédent sont conservées, ceci afin de conserver un minimum
de continuité dans la lecture.
* MOUVEMENTS DE BASE DU CURSEUR
-------------------------------
-Passer d'un écran à l'autre, c'est bien ... mais comment faire pour se
+Passer d'un écran à l'autre, c'est bien ... mais comment faire pour se
déplacer dans le texte d'un seul écran?
Il existe plusieurs manières de faire. La plus simple est d'utiliser
>> Amenez le curseur sur cette ligne avec quelques C-n.
->> Déplacez vous sur la ligne avec des C-f, puis vers le haut avec des
- C-p. Remarquez ce que fait C-p quand le curseur est au milieu de la
+>> Déplacez vous sur la ligne avec des C-f, puis vers le haut avec des
+ C-p. Remarquez ce que fait C-p quand le curseur est au milieu de la
ligne.
Chaque ligne de texte se termine avec un caractère nommé Newline, qui
se passe.
Si vous trouvez que le déplacement caractère par caractère est trop
-lent, vous pouvez vous déplacer mot par mot. M-f et M-b vous déplacent
+lent, vous pouvez vous déplacer mot par mot. M-f et M-b vous déplacent
respectivement d'un mot en avant et en arrière.
>> Tapez quelques M-f et M-b.
commandes Control agissent sur des unités plus primaires (caractères,
lignes etc.).
-Ce parallèle existe encore entre les lignes et les phrases: C-a et C-e
+Ce parallèle existe encore entre les lignes et les phrases: C-a et C-e
vous positionnent au début ou à la fin d'une ligne, tandis que M-a et
M-e vous déplacent au début ou à la fin d'une phrase.
«point». En d'autres termes, le curseur à l'écran se trouve où le
point est dans le texte.
-Voici un résumé des commandes simples de déplacement, y compris celles
+Voici un résumé des commandes simples de déplacement, y compris celles
relatives aux mots et aux phrases:
C-f En avant d'un caractère
déplacement plus complexes.
La plupart des commandes d'Emacs acceptent un argument numérique, qui
-sert souvent comme compteur de répétition. Pour donner un tel argument
+sert souvent comme compteur de répétition. Pour donner un tel argument
à une fonction, tapez C-u puis les chiffres, et enfin entrez la
commande. Si vous disposez de la touche <Meta> (ou <Edit> ou <Alt>), vous
pouvez aussi tapez directement les chiffres tout en maintenant la
-touche <Meta> enfoncée. Il est préférable d'apprendre la méthode C-u car
+touche <Meta> enfoncée. Il est préférable d'apprendre la méthode C-u car
elle fonctionne sur tous les terminaux.
Par exemple, C-u 8 C-f vous déplace de huit caractères en avant.
-
+
>> Essayez d'utiliser C-n avec un argument numérique pour vous
déplacer d'un seul coup sur une autre ligne.
Certaines commandes n'interprètent pas leur argument numérique comme
-un compteur de répétition. C'est le cas de C-v et M-v qui déplacent le
-texte d'autant de lignes plutôt que d'écrans entiers. Par exemple, C-u
+un compteur de répétition. C'est le cas de C-v et M-v qui déplacent le
+texte d'autant de lignes plutôt que d'écrans entiers. Par exemple, C-u
4 C-v déroulera l'écran de 4 lignes.
>> Essayez C-u 8 C-v.
<PgDn>, celles-ci vous déplaceront d'écran en écran comme C-v et M-v.
Toutes ces commandes acceptent des arguments numériques comme décrit
-précédemment.
+précédemment.
* QUAND EMACS EST BLOQUÉ
------------------------
Si jamais Emacs ne répond plus à vos ordres, vous pouvez l'arrêter en
-toute sécurité en tapant C-g. C-g peut aussi être utilisé pour stopper
+toute sécurité en tapant C-g. C-g peut aussi être utilisé pour stopper
une commande qui met trop de temps à s'exécuter.
C-g sert également à annuler un argument numérique, ou une commande
Maintenant, tapez C-f. Le curseur doit finalement ne bouger que
d'un seul caractère, puisque vous avez annulé l'argument.
-Si vous avez tapé un <Esc> par erreur, vous pourrez toujours l'annuler
+Si vous avez tapé un <Esc> par erreur, vous pourrez toujours l'annuler
avec C-g.
Emacs peut afficher plusieurs fenêtres, chacune avec un texte
différent. Le terme «fenêtre» signifie ici une zone particulière dans
-la fenêtre d'Emacs; il ne s'agit pas de fenêtres pouvant se superposer
+la fenêtre d'Emacs; il ne s'agit pas de fenêtres pouvant se superposer
dans votre système de multifenétrage. Emacs peut aussi ouvrir
-plusieurs fenêtres X (appelées «frames» en jargon Emacsien), mais ceci
+plusieurs fenêtres X (appelées «frames» en jargon Emacsien), mais ceci
est décrit ultérieurement.
-Pour l'instant, mieux vaut ne pas trop s'occuper de plusieurs fenêtres
+Pour l'instant, mieux vaut ne pas trop s'occuper de plusieurs fenêtres
simultanées, sauf peut-être pour savoir les éliminer toutes sauf
une. Ceci est effectué par la commande C-x 1 ('un', pas 'L'). Cette
commande tue toutes les fenêtres sauf celle dans laquelle vous vous
temps!
Plus généralement, <Delete> efface le caractère situé juste avant le
-curseur.
+curseur.
>> Maintenant, tapez quelques caractères, puis effacez-les avec
<Delete>. Ne vous inquiétez pas pour le contenu de ce tutoriel, ce
>> Tapez <Return> pour réinsérer le Newline que vous avez effacé.
Rappelez-vous bien que la plupart des commandes acceptent un argument
-numérique, y compris l'insertion de caractères:
+numérique, y compris l'insertion de caractères:
>> Tapez C-u 8 *, vous obtiendrez "********".
-Vous connaissez maintenant les commandes de base pour insérer du texte
+Vous connaissez maintenant les commandes de base pour insérer du texte
et corriger des erreurs. Toujours grâce aux touches <Control> et
<Meta>, vous pouvez aussi effacer du texte par mot ou par ligne:
texte pour vous donner la possibilité de le réintroduire. L'opération
de réintroduction s'appelle le «yanking». Vous pouvez réintroduire le
texte à la même place ou ailleurs. Vous pouvez même le réintroduire
-plusieurs fois, pourquoi pas à des endroits différents. La commande de
+plusieurs fois, pourquoi pas à des endroits différents. La commande de
«yanking» est C-y.
Notez bien la différence entre «effacer» et «supprimer». Un texte
>> Placez le curseur au début d'une ligne non vide.
Tapez C-k pour supprimer le texte sur cette ligne.
->> Tapez C-k une deuxième fois. Vous remarquerez que cette fois-ci, la
+>> Tapez C-k une deuxième fois. Vous remarquerez que cette fois-ci, la
ligne elle-même est supprimée (le caractère Newline).
C-k traite son argument numérique de manière spéciale: il supprime
Une alternative à C-x u est C-_. C-x u existe car c'est plus facile à
taper sur certains claviers. Sur d'autres vous pouvez également
-obtenir C-_ en tapant C-/.
+obtenir C-_ en tapant C-/.
Enfin, la commande d'annulation accepte les argument numériques.
Pour sauver votre texte, vous avez besoin de le mettre dans un
fichier, sans quoi il disparaîtra quand vous quitterez Emacs. On dit
«trouver» un fichier («finding»), ou encore «visiter» un fichier
-(«visiting»), ou bien «ouvrir».
+(«visiting»), ou bien «ouvrir».
Visiter un fichier revient à voir son contenu dans Emacs. Si vous
-modifiez le texte du fichier dans Emacs, ces changements ne deviennent
-pas permanent, sauf si vous «sauvez» le fichier. Cela permet de ne pas
+modifiez le texte du fichier dans Emacs, ces changements ne deviennent
+pas permanent, sauf si vous «sauvez» le fichier. Cela permet de ne pas
avoir des fichiers à moitié modifiés sur votre système, à moins que
vous ne le souhaitiez vraiment. D'autre part, quand Emacs «sauve» un
-fichier, il commence par copier l'ancienne version sous un nouveau nom
+fichier, il commence par copier l'ancienne version sous un nouveau nom
afin que vous puissiez toujours revenir en arrière.
Regardez en bas de la fenêtre d'Emacs. Vous trouverez une ligne
-contenant des tirets '-', et la chaîne de caractères
+contenant des tirets '-', et la chaîne de caractères
«Emacs: TUTORIAL.FRANCAIS». Cela vous donne le nom du fichier que vous
êtes en train de visiter. En ce moment, vous visitez le fichier
«TUTORIAL.FRANCAIS» qui correspond au Tutoriel d'Emacs, version
manière, on l'appelle «minibuffer». Les commandes d'édition ordinaires
peuvent être utilisées pour éditer le nom du fichier.
-Pendant que vous êtes en train de taper le nom du fichier, vous pouvez
+Pendant que vous êtes en train de taper le nom du fichier, vous pouvez
annuler la commande grâce à C-g.
>> Tapez C-x C-f puis C-g. Cela annule le minibuffer ainsi que la
commande C-x C-f. Vous n'allez finalement pas visiter de fichier.
Quand le nom du fichier est correct, tapez <Return>. La commande
-prendra alors effet et ira chercher le fichier. Après avoir terminé la
+prendra alors effet et ira chercher le fichier. Après avoir terminé la
saisie du nom, le minibuffer disparaît.
Au bout d'un petit moment, le contenu du fichier apparaît et vous
Cette commande copie le texte contenu dans Emacs vers le fichier
lui-même. La première fois que vous le faites, Emacs sauvegarde la
-version initiale du fichier sous un autre nom, en ajoutant un '~' à la
+version initiale du fichier sous un autre nom, en ajoutant un '~' à la
fin du nom.
Quand la sauvegarde est terminée, Emacs affiche le nom du fichier dans
système (non pas qu'Emacs ne puisse jamais crasher lui-même ...).
>> Tapez C-x C-s pour sauver votre copie du tutoriel.
- Vous devriez voir apparaître «Wrote ...TUTORIAL.FRANCAIS" tout en bas
+ Vous devriez voir apparaître «Wrote ...TUTORIAL.FRANCAIS" tout en bas
de la fenêtre.
NOTE: Sur certains systèmes, C-x C-s bloque l'écran et Emacs ne dit
plus rien. Cela signifie qu'une «fonctionnalité» système que l'on
-appelle le «flow control» intercepte le C-s et l'empêche de parvenir à
+appelle le «flow control» intercepte le C-s et l'empêche de parvenir à
Emacs. Pour débloquer la situation, tapez C-q. Reportez-vous dans ce
cas à la section «Spontaneous Entry to Incremental Search» du manuel
-d'Emacs pour plus d'information sur cette ... «particularité».
+d'Emacs pour plus d'information sur cette ... «particularité».
-Vous pouvez visiter des fichiers existant, mais aussi des fichiers qui
+Vous pouvez visiter des fichiers existant, mais aussi des fichiers qui
n'existent pas. C'est en fait comme cela que l'on crée un nouveau
fichier dans Emacs. Initialement, le fichier sera inexistant, et la
première fois que vous demanderez à Emacs de le sauver, il créera
C-b. Par contre, TOUT texte que vous pouvez voir dans Emacs appartient
à un buffer.
->> Tapez C-x 1 pour faire disparaître le buffer contenant la liste des
+>> Tapez C-x 1 pour faire disparaître le buffer contenant la liste des
buffers.
Quand vous éditez un fichier, puis que vous en ouvrez un autre, le
Remarquez qu'il existe des boutons n'ayant aucun équivalent
clavier. Par exemple, le menu «Buffers» donne la liste de tous les
-buffers par ordre de plus récente utilisation. Vous pouvez passer d'un
+buffers par ordre de plus récente utilisation. Vous pouvez passer d'un
buffer à l'autre en les sélectionnant par leur nom dans ce menu.
cliquant le bouton de gauche au début de la portion à sélectionner,
puis en Shift-cliquant à l'autre bout.
-Pour supprimer un morceau de texte, utilisez C-w ou le bouton «Cut» du
+Pour supprimer un morceau de texte, utilisez C-w ou le bouton «Cut» du
menu «Edit». Notez bien que ces deux commandes ne sont pas
-équivalentes: C-w ne fait que supprimer le texte en le sauvegardant de
+équivalentes: C-w ne fait que supprimer le texte en le sauvegardant de
manière interne (comme C-k), mais «Cut» sauvegarde en plus le texte
dans le clipboard de X Window, où il pourra être accédé par d'autres
-applications.
+applications.
Pour récupérer du texte en provenance d'autres applications, utilisez
«Paste» du menu «Edit».
Ces commandes, bien que très utiles, sont utilisées moins souvent que
celles que vous avez déjà apprises. Vous en connaissez déjà deux: les
commandes relatives aux fichiers (C-x C-f et C-x C-s). Un autre
-exemple est la commande pour quitter définitivement Emacs, C-x C-c (ne
+exemple est la commande pour quitter définitivement Emacs, C-x C-c (ne
vous inquiétez pas des éventuels changements qui seraient perdus, C-x
C-c vous propose de sauver ces changements avant de tuer Emacs).
-C-z est la commande qui vous permet de quitter Emacs «temporairement»,
+C-z est la commande qui vous permet de quitter Emacs «temporairement»,
pour que vous puissiez y revenir plus tard.
Sur les systèmes le permettant, C-z «suspend» Emacs, ce qui signifie
des circonstances où vous ne vous déloguez pas, mieux vaut suspendre
par C-z au lieu de sortir véritablement d'Emacs.
-Il existe de nombreuses commandes sous C-x. Voici celles que vous avez
+Il existe de nombreuses commandes sous C-x. Voici celles que vous avez
apprises jusque là:
C-x C-f Visiter un fichier (Find File).
commande «replace-string» substitue globalement une chaîne de
caractères par une autre. Si vous tapez M-x, Emacs vous affichera M-x
en bas de la fenêtre et vous pourrez alors taper le nom d'une
-commande, ici replace-string. Tapez simplement 'repl <Espace> s <Tab>'
+commande, ici replace-string. Tapez simplement 'repl <Espace> s <Tab>'
et Emacs complétera le nom pour vous. Terminez le nom avec <Return>
La commande replace-string requiert deux arguments: la chaîne à
chaînes par <Return>.
>> Déplacez le curseur sur la ligne blanche en dessous de ce
- paragraphe, puis tapez
- M-x repls<Return>Remarquez<Return>Notez<Return>.
+ paragraphe, puis tapez
+ M-x repls<Return>Remarquez<Return>Notez<Return>.
Remarquez comme cette ligne a changé: le mot R-e-m-a-r-q-u-e-z a
été remplacé par N-o-t-e-z partout où il est apparu après le
- curseur.
+ curseur.
* SAUVEGARDE AUTOMATIQUE
La ligne juste au dessus de la zone d'écho s'appelle ligne de mode
(«modeline»). Elle dit actuellement quelque chose comme ça:
---**-XEmacs: TUTORIAL.FRANCAIS (Fundamental)--L752--67%---------
+--**-XEmacs: TUTORIAL.FRANCAIS (Fundamental)--L752--67%---------
-Cette ligne fournit des renseignements utiles sur le status d'Emacs et
+Cette ligne fournit des renseignements utiles sur le status d'Emacs et
le texte que vous éditez.
Vous connaissez déjà la signification du nom de fichier: c'est celui
-que vous êtes en train d'éditer. -xx%- indique le pourcentage de texte
+que vous êtes en train d'éditer. -xx%- indique le pourcentage de texte
situé au dessus du curseur. Si vous pouvez voir le début du fichier à
-l'écran, --Top-- sera indiqué au lieu de --00%--. Si le bas du fichier
+l'écran, --Top-- sera indiqué au lieu de --00%--. Si le bas du fichier
est visible, il y aura --Bot-- à la place. Si votre texte est tout
entier contenu dans la fenêtre, vous verrez --All--.
comme faisant partie des mots. Auparavant, ces caractères étaient
considérés comme des séparateurs de mots. En général, les modes
majeurs ne changent que très peu le comportement des commandes
-habituelles.
+habituelles.
Pour voir la documentation du mode majeur courant, tapez C-h m.
désactivés indépendamment du mode majeur courant. Vous pouvez en
utiliser autant que possible en même temps.
-Un mode mineur très utile pour éditer du texte est le mode
+Un mode mineur très utile pour éditer du texte est le mode
«Auto Fill». Quand ce mode est activé, Emacs coupe lui-même les lignes
si vous tapez du texte trop long pour être contenu sur une seule.
Tapez du texte jusqu'à ce que la ligne soit coupée, puis replacez
la marge à 70.
-Si vous faites des changements au milieu d'un paragraphe, le mode Auto
+Si vous faites des changements au milieu d'un paragraphe, le mode Auto
Fill ne recoupera pas les lignes tout seul. Pour réajuster les lignes
d'un tel paragraphe, tapez M-q avec le curseur n'importe où dans le
paragraphe.
La commande de recherche d'Emacs est un peu différente de celle des
autres éditeurs de texte dans la mesure où elle est incrémentale: la
recherche intervient au fur et à mesure que vous tapez la chaîne à
-rechercher.
+rechercher.
Pour démarrer une recherche, tapez C-s (en avant) ou C-r (en
arrière). MAIS PAS TOUT DE SUITE !! Attendez un peu pour tester ...
NOTE: Sur certains systèmes, C-x C-s bloque l'écran et Emacs ne dit
plus rien. Cela signifie qu'une «fonctionnalité» système que l'on
-appelle le «flow control» intercepte le C-s et l'empêche de parvenir à
+appelle le «flow control» intercepte le C-s et l'empêche de parvenir à
Emacs. Pour débloquer la situation, tapez C-q. Reportez-vous dans ce
cas à la section «Spontaneous Entry to Incremental Search» du manuel
-d'Emacs pour plus d'information sur cette ... «particularité».
+d'Emacs pour plus d'information sur cette ... «particularité».
Si vous êtes au milieu d'une recherche incrémentale et que vous tapez
<Delete>, vous constaterez que le dernier caractère de la chaîne est
C-M-v (ou <Esc> C-v si vous n'avez pas de touche <Meta>) est un
exemple de Control-Méta caractère. L'ordre dans lequel les touches
-<Control> et <Meta> sont enfoncées n'a pas d'importance. Ce sont juste
+<Control> et <Meta> sont enfoncées n'a pas d'importance. Ce sont juste
des modificateurs. Par contre, <Esc> n'est pas un modificateur, donc
vous êtes obligés de taper d'abord <Esc>, et C-v ensuite.
l'utiliser pour sortir du minibuffer ou éliminer des fenêtres
superflues.
->> Tapez M-x pour vous rendre dans le minibuffer, puis tapez
+>> Tapez M-x pour vous rendre dans le minibuffer, puis tapez
<Esc> <Esc> <Esc> pour en sortir.
Il n'est pas possible d'utiliser C-g pour sortir d'un niveau récursif
vous ne désirez finalement pas d'aide après avoir tapé C-h, tapez
simplement C-g.
-(Quelques sites redéfinissent la commande C-h. Cela ne devrait vraiment
+(Quelques sites redéfinissent la commande C-h. Cela ne devrait vraiment
pas être fait, donc allez vous plaindre à votre administrateur système.
Si C-h ne marche pas, tapez M-x help<Return>.)
la commande en question.
>> Tapez C-h c C-p.
- Le message doit ressembler à quelque chose comme
+ Le message doit ressembler à quelque chose comme
C-p runs the command previous-line
Ce tutoriel est fait pour être compréhensible par tout nouvel
utilisateur. Donc si quelque chose n'est pas clair, n'hésitez pas à
-vous plaindre !!
+vous plaindre !!
Si vous avez plus particulièrement des remarques à faire sur la
version française, vous pouvez aussi me contacter directement
-(Didier Verna <verna@inf.enst.fr>).
+(Didier Verna <didier@xemacs.org>).
COPIES / DISTRIBUTION
Cracraft.
* Ben Wing l'a mis à jour pour X Windows.
* Martin Buchholz et Hrvoje Niksic y ont apporté des corrections pour
- XEmacs.
+ XEmacs.
* J'en (Didier Verna) ai fait une version française un beau jour de 1997.
Cette version du tutoriel, tout comme Emacs, est copyrightée, et vous
COPYING et à distribuer Emacs à vos amis. Aidez-nous à tuer
l'obstructionnisme logiciel en utilisant, écrivant et partageant du
logiciel libre!
-
- ==============================
- \e$BF|K\8l\e(B GNUEMACS(Mule) \e$BF~LgJT\e(B
- ==============================
+Copyright (c) 1985, 1996 Free Software Foundation, Inc.
+\e$B;HMQ>r7o$O%U%!%$%k:G8e$r;2>H$N$3$H\e(B
+ \e$B$"$J$?$,8=:_8+$F$$$k$N$O\e(B XEmacs \e$BF~Lg%,%$%I$G$9!#\e(B
-\e$BCm0U!'\e(B \e$B$3$NF~LgJT$O!"!V=,$&$h$j47$l$m!W$r%b%C%H!<$K:n@.$5$l$F$$$^\e(B
- \e$B$9!#\e(B">>" \e$B$+$i;O$^$k9T$O!"$=$N;~2?$r$9$Y$-$+$r;X<($7$F$$$^$9!#\e(B
+XEmacs \e$B$N%3%^%s%I$rF~NO$9$k$K$O!"0lHL$K%3%s%H%m!<%k%-!<!J%-!<%H%C%W$K\e(B
+CTRL \e$B$H$+\e(B CTL \e$B$H=q$$$F$"$k!K$d%a%?%-!<$r;H$$$^$9!#%-!<%\!<%I$K$h$C$F$O!"\e(B
+META \e$B%-!<$O\e(B ALT \e$B$d\e(B EDIT \e$B$H=q$+$l$F$$$?$j!"B>$N$b$N$G$"$C$?$j$7$^$9\e(B
+\e$B!JNc$($P!"\e(BSun \e$B$N%-!<%\!<%I$G$O!"%9%Z!<%9%P!<$N:8$N%@%$%"%b%s%I%-!<$,\e(B
+META \e$B$G$9!K!#\e(BMETA \e$B%-!<$,L5$$>l9g$O!"\e(BESC \e$B$rBe$o$j$K;H$&$3$H$,$G$-$^$9!#\e(B
+\e$B$=$3$G!"\e(BMETA \e$B$H$+\e(B CONTROL \e$B$H$+$r=q$/Be$o$j$K!"<!$N$h$&$J5-9f$r;H$&$3$H\e(B
+\e$B$K$7$^$9!#\e(B
+ C-<\e$BJ8;z\e(B> \e$B%3%s%H%m!<%k%-!<$r2!$7$?$^$^!"\e(B<\e$BJ8;z\e(B>\e$B%-!<$r2!$7$^$9!#Nc$($P!"\e(B
+ C-f \e$B$O%3%s%H%m!<%k%-!<$r2!$7$J$,$i\e(B f \e$B$N%-!<$r2!$9$3$H$G$9!#\e(B
- Mule \e$B$N%3%^%s%I$rF~NO$9$k$H$-$K$O!"0lHLE*$K%3%s%H%m!<%k!&%-!<!J%-!<!&\e(B
-\e$B%H%C%W$K!"\e(BCTRL \e$B$"$k$$$O!"\e(BCTL \e$B$H=q$$$F$"$k!K$d%a%?!&%-!<!JIaDL!"%(%9%1!<%W!&\e(B
-\e$B%-!<$r;H$&!K$,;H$o$l$^$9!#$=$3$G!"\e(BCONTROL \e$B$H$+\e(B META \e$B$H$+=q$/Be$o$j$K!"<!$N\e(B
-\e$B$h$&$J5-9f$r;H$&$3$H$K$7$^$9!#\e(B
+ M-<\e$BJ8;z\e(B> \e$B%a%?%-!<$r2!$7$?$^$^!"\e(B<\e$BJ8;z\e(B>\e$B%-!<$r2!$7$^$9!#$b$7%a%?%-!<$,$J\e(B
+ \e$B$$>l9g$O!"%(%9%1!<%W%-!<$r2!$7$F$+$iN%$7!"$=$l$+$i\e(B<\e$BJ8;z\e(B>\e$B%-!<\e(B
+ \e$B$r2!$7$^$9!#0J9_%(%9%1!<%W%-!<$N$3$H$r\e(B <ESC> \e$B$H=q$-$^$9!#\e(B
-C-<\e$BJ8;z\e(B> \e$B%3%s%H%m!<%k!&%-!<$r2!$7$?$^$^!"\e(B<\e$BJ8;z\e(B>\e$B%-!<$r2!$7$^$9!#Nc$($P!"\e(B
- C-f \e$B$O!"%3%s%H%m!<%k!&%-!<$r2!$7$J$,$i\e(B f \e$B$N%-!<$r2!$9$3$H$r\e(B
- \e$B0UL#$7$^$9!#\e(B
-<<Blank lines inserted here by startup of help-with-tutorial>>
- >> \e$B$=$l$G$O!"\e(BC-v\e$B!J\e(BView Next Screen; \e$B<!$N2hLL$r8+$k!K$r%?%$%W$7$F\e(B
- \e$B$_$F2<$5$$!#<!$N2hLL$K?J$`$3$H$,$G$-$^$9!#\e(B
- \e$B0J9_!"0l2hLL$rFI$_=*$($k$?$S$KF1MM$K$7$F<!$N2hLL$KFI$_?J$s$G\e(B
- \e$B2<$5$$!#\e(B
+\e$B!*=EMW!*\e(B: XEmacs\e$B$r=*N;$9$k$K$O!"\e(BC-x C-c \e$B$r%?%$%W$7$^$9!#\e(B
-ESC <\e$BJ8;z\e(B> \e$B%(%9%1!<%W!&%-!<$r2!$7$F$+$iN%$7!"$=$l$+$i\e(B<\e$BJ8;z\e(B>\e$B%-!<$r2!$7$^\e(B
- \e$B$9!#\e(B
+">>" \e$B$G;O$^$k9T$O!"$=$N;~2?$r$9$Y$-$+$r;X<($7$F$$$^$9!#Nc$($P!"\e(B
+<<Middle of page left blank for didactic purposes. Text continues below.>>
+>> \e$B$G$O\e(B C-v \e$B!J<!$N2hLL$r8+$k!K$r%?%$%W$7$F<!$N2hLL$K?J$s$G2<$5$$!#\e(B
+ \e$B!J$5$"!"$d$C$F$_$^$7$g$&!#%3%s%H%m!<%k%-!<$r2!$7$J$,$i\e(B v \e$B$G$9!K\e(B
+ \e$B0J9_!"0l2hLL$rFI$_=*$($k$?$S$KF1MM$K$7$F<!$N2hLL$KFI$_?J$s$G2<$5$$!#\e(B
-\e$BCm0U!'\e(B <\e$BJ8;z\e(B>\e$B$O!"BgJ8;z$G$b>.J8;z$G$b%3%^%s%I$H$7$F$OF1$80UL#$K$J$j\e(B
- \e$B$^$9!#%a%?%-!<$,;H$($k$J$i$P\e(B ESC <\e$BJ8;z\e(B> \e$B$NBe$o$j$K\e(B M-<\e$BJ8;z\e(B>
- (\e$B%a%?%-!<$r2!$7$?$^$^\e(B<\e$BJ8;z\e(B>\e$B%-!<$r2!$9\e(B) \e$B$,;H$($^$9!#\e(B
+\e$BA0$N2hLL$H<!$N2hLL$H$G$O!"I=<($5$l$kFbMF$K2?9T$+$N=E$J$j$,$"$j$^$9!#$3\e(B
+\e$B$l$O!"I=<($5$l$F$$$kFbMF$,O"B3$7$F$$$k$3$H$,$9$0H=$k$h$&$K$9$k$?$a$G$9!#\e(B
-\e$B=EMW$G$9!'\e(B Emacs\e$B$r=*N;$5$;$?$$;~$O!"\e(BC-x C-c \e$B$r%?%$%W$7$^$9!#\e(BEmacs\e$B$r\e(Bcsh
- \e$B$+$i5/F0$7$F$$$k>l9g!"%5%9%Z%s%I$9$k!J0l;~E*$K;_$a$k\e(B)\e$B$3$H$,\e(B
- \e$B=PMh$^$9!#\e(BEmacs\e$B$r%5%9%Z%s%I$9$k$K$O!"\e(BC-z\e$B$r%?%$%W$7$^$9!#\e(B
+\e$B$^$:$O!"%U%!%$%k$NCf$r0\F0$7$F9T$/J}K!$rCN$kI,MW$,$"$j$^$9!#\e(BC-v \e$B$K$h$C\e(B
+\e$B$F@h$K?J$`$3$H$O$b$&H=$j$^$7$?!#85$KLa$k$K$O!"\e(BM-v \e$B!J%a%?%-!<$r2!$7$J$,\e(B
+\e$B$i\e(B v\e$B!"$b$7$/$O\e(B <ESC> \e$B$r2!$7$FN%$7$F\e(B v\e$B!K$G$9!#\e(B
+>> M-v \e$B$H\e(B C-v \e$B$r;H$C$F!"A08e$K0\F0$9$k$3$H$r2?2s$+;n$7$F2<$5$$!#\e(B
- \e$B$5$F!"$3$l$+$i$O!"0l2hLLJ,FI$_=*$($?$i!"\e(BC-v \e$B$rF~NO$7$F9T$C$F2<$5$$!#\e(B
- \e$BA0$N2hLL$H<!$N2hLL$H$G$O!"I=<($5$l$kFbMF$K2?9TJ8$+$N=E$J$j$,$"$j$^$9!#\e(B
-\e$B$3$l$O!"I=<($5$l$F$$$kFbMF$,O"B3$7$F$$$k$3$H$,$9$0H=$k$h$&$K$9$k$?$a$G$9!#\e(B
+\e$B!v$3$3$^$G$NMWLs\e(B
+================
-
- \e$B$^$:$O!"%U%!%$%k$NCf$r0\F0$7$F9T$/J}K!$rCN$kI,MW$,$"$j$^$9!#\e(BC-v \e$B$K$h\e(B
-\e$B$C$F@h$K?J$`$3$H$O$b$&H=$j$^$7$?!#85$KLa$k$K$O!"\e(BESC v \e$B$r%?%$%W$7$^$9!#\e(B
-
- >> ESC v \e$B$H\e(B C-v \e$B$r;H$C$F!"A08e$K0\F0$9$k$3$H$r2?2s$+;n$7$F$_$J$5$$!#\e(B
-
-\e$BMWLs\e(B
-====
\e$B%U%!%$%k$r2hLLKh$K8+$F9T$/$K$O!"<!$N%3%^%s%I$r;H$$$^$9!#\e(B
- C-v \e$BA0$K0l2hLLJ,?J$`\e(B
- ESC v \e$B8e$m$K0l2hLLJ,La$k\e(B
- C-l \e$B2hLL$r=q$-D>$9!#$3$N$H$-!"85%+!<%=%k$N$"$C$?9T$,\e(B
- \e$B2hLL$NCf1{$K$/$k$h$&$K$9$k\e(B
+ C-v \e$B<!$N2hLL$K?J$`\e(B
+ M-v \e$BA0$N2hLL$KLa$k\e(B
+ C-l \e$B2hLL$r=q$-D>$9!#$3$N$H$-!"%+!<%=%k$N$"$k9T$,2hLL$NCf1{$K\e(B
+ \e$B$/$k$h$&$K$9$k!#!J\e(BC-1 \e$B$8$c$J$/$C$F\e(B C-L \e$B$G$9$h!*!K\e(B
- >> \e$B:#%+!<%=%k$,$I$3$K$"$k$+!"$=$N6a$/$K$I$s$J%F%-%9%H$,=q$+$l$F$$$k\e(B
- \e$B$+$r3P$($J$5$$!#\e(BC-l \e$B$r%?%$%W$7!"%+!<%=%k$,$I$3$K0\F0$7$?$+!"$=$N\e(B
- \e$B6a$/$N%F%-%9%H$O$I$&$J$C$?$+$rD4$Y$F$_$J$5$$!#\e(B
+>> \e$B%+!<%=%k$r8+$D$1!"$=$N6a$/$K$I$s$JJ8>O$,=q$+$l$F$$$k$+$r3P$(!"\e(B
+ \e$B$=$l$+$i\e(B C-l \e$B$r%?%$%W$7$F2<$5$$!#\e(B
+ \e$B%+!<%=%k$,$I$3$K0\F0$7$?$+!"$=$N6a$/$N%F%-%9%H$O$I$&$J$C$?$+$rD4$Y\e(B
+ \e$B$F$_$^$7$g$&!#\e(B
-\e$B4pK\E*$J%+!<%=%k$N@)8f\e(B
-======================
- \e$B2hLLKh$N0\F0$O$G$-$k$h$&$K$J$j$^$7$?!#:#EY$O!"2hLL$NCf$G!"FCDj$N>l=j$K\e(B
-\e$B0\F0$9$k$?$a$NJ}K!$r21$($^$7$g$&!#$3$l$K$O$$$/$D$+$N$d$jJ}$,$"$j$^$9!#0l$D\e(B
-\e$B$NJ}K!$O!"A0\e(B(previous)\e$B<!\e(B(next)\e$B@h\e(B(forward)\e$B8e\e(B(backward)\e$B$K0\F0$9$k%3%^%s%I$r;H\e(B
-\e$B$&$3$H$G$9!#$3$l$i$N%3%^%s%I$O$=$l$>$l!"\e(BC-p, C-n, C-f,C-b \e$B$K3d$jEv$F$i$l$F\e(B
-\e$B$*$j!"8=:_$N>l=j$+$i?7$7$$>l=j$K%+!<%=%k$r0\F0$5$;$^$9!#?^$G=q$1$P!"\e(B
+\e$B!v4pK\E*$J%+!<%=%k$N@)8f\e(B
+========================
+\e$B2hLLKh$N0\F0$O$G$-$k$h$&$K$J$j$^$7$?!#:#EY$O!"2hLL$NCf$G!"FCDj$N>l=j$K\e(B
+\e$B0\F0$9$k$?$a$NJ}K!$r21$($^$7$g$&!#\e(B
+
+\e$B$3$l$K$O$$$/$D$+$N$d$jJ}$,$"$j$^$9!#0lHV4pK\E*$JJ}K!$O\e(B C-p, C-b, C-f,
+C-n \e$B$r;H$&$3$H$G$9!#$3$l$i$O$=$l$>$l%+!<%=%k$rA0$N9T!"A0$NJ8;z!"<!$NJ8\e(B
+\e$B;z!"<!$N9T$K0\F0$5$;$^$9!#?^$G=q$1$P!"\e(B
\e$BA0$N9T!$\e(BC-p
:
:
- \e$B8e$NJ8;z!$\e(BC-b .... \e$B8=:_$N%+!<%=%k0LCV\e(B .... \e$B@h$NJ8;z!$\e(BC-f
+ \e$BA0$NJ8;z!$\e(BC-b .... \e$B8=:_$N%+!<%=%k0LCV\e(B .... \e$B<!$NJ8;z!$\e(BC-f
:
:
\e$B<!$N9T!$\e(BC-n
+>> C-n \e$B$H\e(B C-p \e$B$G%+!<%=%k$r>e?^$N??Cf$N9T$KF0$+$7$F2<$5$$!#$=$l$+$i\e(B C-l
+ \e$B$r%?%$%W$7$F?^$NA4BN$,2hLLCf1{$K$/$k$h$&$K$7$F$_$^$7$g$&!#\e(B
- \e$B$3$l$i$O!"$=$l$>$l!"\e(BPrevious, Next, Backward, Forward \e$B$NF,J8;z$K$J$C$F\e(B
-\e$B$$$k$N$G!"21$($d$9$$$G$7$g$&!#$3$l$i$O!"4pK\E*$J%+!<%=%k0\F0%3%^%s%I$G$"$j!"\e(B
-\e$B$$$D$G$b;H$&$b$N$G$9!#\e(B
- >> C-n \e$B$r2?2s$+%?%$%W$7!"!J:#!"$"$J$?$,FI$s$G$$$k!K$3$N9T$^$G%+!<%=\e(B
- \e$B%k$r0\F0$5$;$J$5$$!#\e(B
+\e$B$3$l$i$O$N%3%^%s%I$O$=$l$>$l!"\e(BPrevious, Next, Backward, Forward \e$B$NF,J8\e(B
+\e$B;z$K$J$C$F$$$k$N$G!"21$($d$9$$$G$7$g$&!#$3$l$i$O!"4pK\E*$J%+!<%=%k0\F0\e(B
+\e$B%3%^%s%I$G$"$j!"$$$D$G$b;H$&$b$N$G$9!#:#$3$3$G3P$($F2<$5$$!#\e(B
- >> C-f \e$B$r;H$C$F9T$NCf$[$I$K0\F0$7!"\e(BC-p \e$B$G2?9T$+>e$K0\F0$7$F$_$J$5\e(B
- \e$B$$!#%+!<%=%k$N0LCV$NJQ2=$KCm0U$7$J$5$$!#\e(B
+>> C-n \e$B$r2?2s$+%?%$%W$7!"!J:#!"$"$J$?$,FI$s$G$$$k!K$3$N9T$^$G%+!<%=%k\e(B
+ \e$B$r0\F0$5$;$^$7$g$&!#\e(B
- >> \e$B9T$N@hF,$G\e(B C-b \e$B$r%?%$%W$7$F$_$J$5$$!#%+!<%=%k$O$I$3$K0\F0$7$^$9$+\e(B
- \e$B!)$5$i$K$b$&>/$7\e(B C-b \e$B$r%?%$%W$7!":#EY$O\e(B C-f \e$B$G9TKv$NJ}$KLa$j$J$5\e(B
- \e$B$$!#%+!<%=%k$,9TKv$r1[$($k$H$I$&$J$j$^$9$+!)\e(B
+>> C-f \e$B$r;H$C$F9T$NCf$[$I$K0\F0$7!"\e(BC-p \e$B$G2?9T$+>e$K0\F0$5$;$^$7$g$&!#\e(B
+ \e$B%+!<%=%k$N0LCV$NJQ2=$KCm0U$7$F2<$5$$!#\e(B
+\e$B3F9T$N:G8e$K$O!JL\$K$O8+$($J$$!K\e(B Newline \e$BJ8;z$,$"$j$^$9!#$3$l$O<!$N9T\e(B
+\e$B$H$N6h@Z$j$r<($9$?$a$G$9!#%U%!%$%k$N:G8e$b\e(B Newline \e$B$rIU$1$k$Y$-$G$9\e(B
+\e$B!J$b$C$H$b\e(B XEmacs \e$B$O$=$l$r6/@)$O$7$^$;$s$,!K!#\e(B
- \e$B2hLL$N@hF,$dKvHx$r1[$($F%+!<%=%k$r0\F0$5$;$h$&$H$9$k$H!"$=$NJ}8~$K$"$k\e(B
-\e$B%F%-%9%H$,0\F0$7$FMh$F!"%+!<%=%k$O>o$K2hLLFb$K$"$k$h$&$K$5$l$^$9!#\e(B
+>> \e$B9T$N@hF,$G\e(B C-b \e$B$r%?%$%W$7$F$_$^$7$g$&!#%+!<%=%k$OA0$N9T$NKvHx$K0\F0\e(B
+ \e$B$9$k$O$:$G$9!#$3$l$O\e(B C-b \e$B$,A0$N\e(B Newline \e$BJ8;z$r1[$($FLa$C$?$+$i$G$9!#\e(B
- >> C-n \e$B$r;H$C$F!"%+!<%=%k$r2hLL$N2<C<$h$j2<$K0\F0$5$;$F$_$J$5$$!#2?\e(B
- \e$B$,5/$3$j$^$7$?$+!)%+!<%=%k$N0LCV$O$I$&JQ$j$^$7$?$+!)\e(B
+\e$BF1MM$K\e(B C-f \e$B$O%+!<%=%k$r\e(B Newline \e$BJ8;z$r1[$($F<!$K?J$a$k$3$H$,$G$-$^$9!#\e(B
- \e$B0lJ8;zC10L$N0\F0$G$O$^$I$m$C$3$7$$$H;W$&$J$i!"C18lC10L$G0\F0$9$k$3$H$b\e(B
-\e$B$G$-$^$9!#\e(BESC f \e$B$G0lC18lJ,@h$K?J$_!"\e(BESC b \e$B$G0lC18lJ,A0$KLa$j$^$9!#\e(B
+>> \e$B$5$i$K$b$&>/$7\e(B C-b \e$B$r%?%$%W$7$F%+!<%=%k0\F0$N46$8$rGD$s$G2<$5$$!#\e(B
+ \e$B:#EY$O\e(B C-f \e$B$G9TKv$^$G?J$s$G2<$5$$!#\e(B
+ \e$B$5$i$K$b$&0lEY\e(B C-f \e$B$r%?%$%W$7$F<!$N9T$K?J$s$G2<$5$$!#\e(B
-\e$BCm0U!'\e(B \e$BF|K\8l$K$D$$$F$O!"C18l$N@Z$lL\$rG'<1$9$k$3$H$O$G$-$^$;$s$,!"\e(B
- \e$B5?;wE*$JJ8@a$rC18l$N@Z$lL\$H$7$F$$$^$9!#\e(B
+\e$B2hLL$N@hF,$dKvHx$r1[$($F%+!<%=%k$r0\F0$5$;$h$&$H$9$k$H!"$=$NJ}8~$K$"$k\e(B
+\e$BJ8>O$,2hLL$NCf$K0\F0$7$FMh$F$^$9!#$3$l$r!V%9%/%m!<%k!W$H8F$S$^$9!#2hLL\e(B
+\e$B$,%9%/%m!<%k$9$k$3$H$K$h$C$F!"%+!<%=%k$r0\F0$5$;$F$b!"%+!<%=%k$O>o$K2h\e(B
+\e$BLLFb$K$"$k$h$&$K$5$l$^$9!#\e(B
- >> ESC f \e$B$d\e(B ESC b \e$B$r2?2s$+%?%$%W$7$F$_$J$5$$!#\e(BC-f \e$B$d\e(B C-b \e$B$HJ;MQ$7$F\e(B
- \e$B$_$J$5$$!#\e(B
+>> C-n \e$B$r;H$C$F!"%+!<%=%k$r2hLL$N2<C<$h$j2<$K0\F0$5$;$F$_$J$5$$!#2?\e(B
+ \e$B$,5/$3$j$^$7$?$+!)\e(B
- C-f \e$B$d\e(B C-b \e$B$KBP$9$k!"\e(BESC f \e$B$d\e(B ESC b \e$B$NN`;w@-$KCmL\$7$^$7$g$&!#B?$/$N\e(B
-\e$B>l9g!"\e(BESC <\e$BJ8;z\e(B>\e$B$OJ8=q4X78$N=hM}$K;H$o$l!"0lJ}\e(BC-<\e$BJ8;z\e(B>\e$B$O$=$l$h$j$b$b$C$H4p\e(B
-\e$BK\E*$JBP>]!JJ8;z$H$+9T$H$+!K$KBP$9$kA`:n$K;H$o$l$^$9!#\e(B
+\e$B0lJ8;zC10L$N0\F0$G$O$^$I$m$C$3$7$$$J$i!"C18lC10L$G0\F0$9$k$3$H$b$G$-$^\e(B
+\e$B$9!#\e(BM-f (<ESC> f) \e$B$G0lC18l@h$X!"\e(BM-b (<ESC> b) \e$B$G0lC18lA0$X0\F0$7$^$9!#\e(B
- C-a \e$B$H\e(B C-e \e$B$bCN$C$F$$$FJXMx$J%3%^%s%I$G$9!#\e(BC-a \e$B$O%+!<%=%k$r9T$N@hF,$K\e(B
-\e$B0\F0$5$;!"\e(BC-e \e$B$O9T$NKvHx$K0\F0$5$;$^$9!#\e(B
+\e$BCm0U!'\e(B \e$BF|K\8l$K$D$$$F$O!"C18l$N@Z$lL\$rG'<1$9$k$3$H$O$G$-$^$;$s$,!"5?\e(B
+ \e$B;wE*$JJ8@a$rC18l$N@Z$lL\$H$7$F$$$^$9!#\e(B
+>> M-f \e$B$d\e(B M-b \e$B$r2?2s$+;n$7$F$_$^$7$g$&!#\e(B
- >> C-a \e$B$r#22s!"$=$l$+$i\e(B C-e \e$B$r#22sF~NO$7$F$_$J$5$$!#$3$l$i$N%3%^%s%I\e(B
- \e$B$r#22s0J>e7+JV$7$F$b!"%+!<%=%k$O$=$l0J>e0\F0$7$J$$$3$H$KCm0U!#\e(B
+\e$BC18l$NCfDx$K$$$k;~$O!"\e(BM-f \e$B$O$=$NC18l$N=*$o$j$^$G?J$_$^$9!#$b$76uGrJ8;z\e(B
+\e$B$K$$$k;~$K$O\e(B M-f \e$B$O<!$NC18l$N=*$o$j$^$G?J$_$^$9!#\e(BM-b \e$B$bF1MM$G$9!"J}8~\e(B
+\e$B$O5U$G$9$,!#\e(B
- \e$B$"$HFs$D!"4JC1$J%+!<%=%k0\F0%3%^%s%I$,$"$j$^$9!#%U%!%$%k$N@hF,$K0\F0$9\e(B
-\e$B$k\e(B ESC < \e$B$H!"%U%!%$%k$NKvHx$K0\F0$9$k\e(B ESC > \e$B$G$9!#\e(B
+>> M-f \e$B$H\e(B M-b \e$B$r\e(B C-f \e$B$H\e(B C-b \e$B$r8r$($J$,$i?t2s;n$7!"C18l$NCf$KF~$k;~$H!"\e(B
+ \e$BC18l$HC18l$N4V$K$$$k;~$NF0$-$rD4$Y$F2<$5$$!#\e(B
- \e$B%F%-%9%HCf$G%+!<%=%k$NB8:_$9$k0LCV$r!V%]%$%s%H!W$H8F$S$^$9!#8@$$$+$($l\e(B
-\e$B$P!"%+!<%=%k$O!"%F%-%9%H$N$I$3$K%]%$%s%H$,$"$k$+$r2hLL>e$G<($7$F$$$k$N$G$9!#\e(B
+C-f \e$B$H\e(B C-b \e$B$KBP$9$k!"\e(BM-f \e$B$H\e(B M-b \e$B$NN`;w@-$KCmL\$7$^$7$g$&!#B?$/$N>l9g!"\e(B
+\e$B%a%?%-!<$OJ8=q$r9=@.$9$k%f%K%C%H!JC18l!"J8!"CJMn!K$KBP$9$kA`:n$K;H$$!"\e(B
+\e$B%3%s%H%m!<%k%-!<$O$=$l$h$j$b$b$C$H4pK\E*$JBP>]!JJ8;z$H$+9TEy!K$KBP$9$k\e(B
+\e$BA`:n$K;H$$$^$9!#\e(B
- \e$B0J2<$KC1=c$J0\F0A`:n$K$D$$$FMWLs$7$^$9!#$3$N$J$+$K$O!"C18l$d9TC10L$G$N\e(B
-\e$B0\F0%3%^%s%I$b4^$^$l$F$$$^$9!#\e(B
+\e$B$3$NN`;w@-$O9T$HJ8$N4X78$K$b$"$j$^$9!#\e(BC-a \e$B$H\e(B C-e \e$B$O$=$l$>$l9TF,$H9TKv\e(B
+\e$B$K0\F0$7!"\e(BM-a \e$B$H\e(B M-e \e$B$O$=$l$>$lJ8F,$HJ8Kv$K0\F0$7$^$9!#\e(B
- C-f \e$B0lJ8;z@h$K?J$`\e(B
- C-b \e$B0lJ8;z8e$KLa$k\e(B
+>> C-a \e$B$r#22s!"$=$l$+$i\e(B C-e \e$B$r#22s;n$7$^$7$g$&!#\e(B
+ M-a \e$B$r#22s!"$=$l$+$i\e(B M-e \e$B$r#22s;n$7$^$7$g$&!#\e(B
- ESC f \e$B0lC18l@h$K?J$`\e(B
- ESC b \e$B0lC18l8e$KLa$k\e(B
+C-a \e$B$d\e(B C-e \e$B$O7+JV$7$F$b$=$l0J>e0\F0$7$^$;$s$,!"\e(BM-a \e$B$r7+$jJV$9$H$I$s$I\e(B
+\e$B$sA0$NJ8F,$KLa$C$F$$$-$^$9!#$3$NItJ,$G$ON`;w@-$,GK$l$F$$$^$9$,!"$^$"$3\e(B
+\e$B$l$,<+A3$JF0:n$G$O$J$$$G$7$g$&$+!#\e(B
- C-n \e$B<!$N9T$K0\F0\e(B
- C-p \e$BA0$N9T$K0\F0\e(B
+\e$BJ8>OCf$G%+!<%=%k$,$"$k0LCV$r!V%]%$%s%H!W$H8F$S$^$9!#8@$$$+$($l$P!"%+!<\e(B
+\e$B%=%k$O!"J8>O$N$I$3$K%]%$%s%H$,$"$k$+$r2hLL>e$G<($7$F$$$k$N$G$9!#\e(B
- ESC ] \e$BCJMn$N=*$o$j$K0\F0\e(B
- ESC [ \e$BCJMn$N@hF,$K0\F0\e(B
+\e$B0J2<$KC1=c$J%+!<%=%k0\F0A`:n$K$D$$$FMWLs$7$^$9!#$3$N$J$+$K$O!"C18l$d9T\e(B
+\e$BC10L$G$N0\F0%3%^%s%I$b4^$^$l$F$$$^$9!#\e(B
- C-a \e$B9T$N:G=i$K0\F0\e(B
- C-e \e$B9T$N:G8e$K0\F0\e(B
+ C-f \e$B0lJ8;z<!$K?J$`\e(B
+ C-b \e$B0lJ8;zA0$KLa$k\e(B
- ESC < \e$B%U%!%$%k$N:G=i$K0\F0\e(B
- ESC > \e$B%U%!%$%k$N:G8e$K0\F0\e(B
+ M-f \e$B0lC18l<!$K?J$`\e(B
+ M-b \e$B0lC18lA0$KLa$k\e(B
- >> \e$B3F!9$N%3%^%s%I$r;n$7$F$_$J$5$$!#$3$l$i$N%3%^%s%I$O!":G$b$7$P$7$P\e(B
- \e$B;H$o$l$k$b$N$G$9!#:G8e$NFs$D$G$O!"$3$N>l=j$H$ON%$l$?$H$3$m$K0\F0\e(B
- \e$B$9$k$N$G!"\e(B C-v \e$B$d\e(B ESC v \e$B$r;H$C$F$3$3$KLa$C$FMh$k$h$&$K$7$J$5$$!#\e(B
+ C-n \e$B<!$N9T$K0\F0\e(B
+ C-p \e$BA0$N9T$K0\F0\e(B
- Emacs\e$B$NB>$N%3%^%s%I$HF1MM$K!"$3$l$i$N%3%^%s%I$K$O!"7+$jJV$7$N2s?t$r;X\e(B
-\e$BDj$9$k0z?t\e(B \e$B$rM?$($k$3$H$,$G$-$^$9!#$=$N$?$a$K$O!"%3%^%s%I$rF~NO$9$kA0$K!"\e(B
-C-u\e$B$KB3$$$F7+$jJV$92s?t$rF~NO$7$^$9!#\e(B
+ C-a \e$B9TF,$K0\F0\e(B
+ C-e \e$B9TKv$K0\F0\e(B
- \e$BNc$($P!"\e(BC-u 8 C-f \e$B$H$9$k$H!"#8J8;zJ,@h$K0\F0$7$^$9!#\e(B
+>> \e$B$3$l$iA4It$r2?EY$+;n$7$FN}=,$7$^$7$g$&!#\e(B
+ \e$B$I$l$bIQHK$K;H$&%3%^%s%I$G$9!#\e(B
- >> C-n \e$B$"$k$$$O\e(B C-p \e$B$KE,Ev$J0z?t$r;XDj$7$F!"0l2s$N0\F0$G$J$k$Y$/$3\e(B
- \e$B$N9T$N6a$/$KMh$k$h$&$K$7$F$_$J$5$$!#\e(B
+\e$B$"$HFs$D!"=EMW$J%+!<%=%k0\F0%3%^%s%I$,$"$j$^$9!#%U%!%$%k$N@hF,$K0\F0$9\e(B
+\e$B$k\e(B M-< \e$B$H!"%U%!%$%k$NKvHx$K0\F0$9$k\e(B M-> \e$B$G$9!#\e(B
- C-v \e$B$d\e(B ESC v \e$B$K$D$$$F$O>/$70c$$$^$9!#$3$N>l9g!";XDj$5$l$??t$N9T$@$12h\e(B
-\e$BLL$r0\F0$9$k$3$H$K$J$j$^$9!#\e(B
+\e$BBgDq$NC<Kv$G$O\e(B "<" \e$B%-!<$O\e(B ","\e$B%-!<!J%3%s%^!K$N>e$K$"$j!"$=$l$r%?%$%W$9\e(B
+\e$B$k$K$O%7%U%H%-!<$r;H$&I,MW$,$"$j$^$9!#$7$?$,$C$F\e(B M-< \e$B$r%?%$%W$9$k$K$O!"\e(B
+\e$B%a%?%-!<$H%7%U%H%-!<$H%3%s%^%-!<$rF1;~$K2!$5$M$P$J$j$^$;$s!#\e(B
- >> C-u 3 C-v \e$B$HF~NO$7$F$_$J$5$$!#\e(B
+>> M-< \e$B$r;n$7$F!"$3$NF~Lg%,%$%I$N@hF,$K0\F0$7$^$7$g$&!#\e(B
+ \e$B$=$l$+$i!"\e(BC-v \e$B$r2?EY$+;H$C$F$3$3$^$G5"$C$F$-$F$/$@$5$$!#\e(B
- \e$B85$KLa$k$K$O!"\e(BC-u 3 ESC v \e$B$r;H$($P$h$$$N$G$9!#\e(B
+>> M-> \e$B$r;n$7$F!"$3$NF~Lg%,%$%I$NKvHx$K0\F0$7$^$7$g$&!#\e(B
+ \e$B$=$l$+$i!"\e(BM-v \e$B$r2?EY$+;H$C$F$3$3$^$G5"$C$F$-$F$/$@$5$$!#\e(B
-\e$BCf;_%3%^%s%I\e(B
-============
+\e$B$b$7C<Kv$KLp0u%-!<$,$"$l$P!"$=$l$r;H$C$F%+!<%=%k$rF0$+$9$3$H$b$G$-$^$9!#\e(B
+\e$B$1$l$I!"<!$N#3$D$NM}M3$+$i\e(B C-b, C-f, C-n, C-p \e$B$r3P$($k$3$H$r4+$a$^$9!#\e(B
+\e$BBh0l$K!"$3$l$i$O$I$s$JC<Kv$G$b;H$($^$9!#BhFs$K!"\e(BXEmacs\e$B$r;H$&$N$,>eC#$7\e(B
+\e$B$F$/$l$P!"$3$l$i$N%3%s%H%m!<%kJ8;z$rBG$DJ}$,!"Lp0u%-!<$rBG$D$h$j$:$C$H\e(B
+\e$BB.$$$3$H$,J,$k$G$7$g$&!J<j$rDL>o$N0LCV$+$iBg$-$/F0$+$5$J$$$G$h$$$N$G!K!#\e(B
+\e$B:G8e$K!"0lEY$3$l$i$N%3%s%H%m!<%kJ8;z$rBG$D=,47$rIU$1$?$i!"$b$C$H?J$s$@\e(B
+\e$B%+!<%=%k0\F0%3%^%s%I$b4JC1$K3P$($k$3$H$,$G$-$^$9!#\e(B
- C-g \e$B$H$$$&%3%^%s%I$G!"F~NO$rI,MW$H$9$k$h$&$J%3%^%s%I$rCf;_$9$k$3$H$,\e(B
-\e$B$G$-$^$9!#Nc$($P!"0z?t$rF~NO$7$F$$$kESCf$d!"#2$D0J>e$N%-!<F~NO$rI,MW$H$9$k\e(B
-\e$B%3%^%s%I$rF~NO$7$F$$$k:GCf$K!"$=$l$r$d$a$?$/$J$C$?$i!"\e(BC-g \e$B$r;H$($PNI$$$N$G\e(B
-\e$B$9!#\e(B
+XEmacs\e$B$NBgDq$N%3%^%s%I$K$O?tCM0z?t$rM?$($k$3$H$,$G$-$^$9!#BgDq$N>l9g$3\e(B
+\e$B$N?tCM$G7+$jJV$72s?t$r;X<($9$k$3$H$K$J$j$^$9!#?tCM0z?t$rM?$($k$K$O!"%3\e(B
+\e$B%^%s%I$rF~NO$9$kA0$K\e(B C-u \e$B$KB3$$$F?t;z2?7e$+%?%$%W$7$^$9!#$b$7%a%?%-!<\e(B
+\e$B$,;H$($k$J$i!"%a%?%-!<$r2!$7$J$,$i?t;z$r%?%$%W$9$k$3$H$b$G$-$^$9!#$G$b\e(B
+\e$B$d$O$j\e(B C-u \e$B$r3P$($k$3$H$r4+$a$^$9!#$=$l$O$I$s$JC<Kv$G$b;H$($k$+$i$G$9!#\e(B
- >> C-u 100 \e$B$r%?%$%W$7$F0z?t$r#1#0#0$K@_Dj$7!"\e(BC-g \e$B$r%?%$%W$7$J$5$$!#\e(B
- \e$B$=$N$"$H$G\e(B C-f \e$B$r%?%$%W$7$F$_$J$5$$!#2?J8;z0\F0$7$^$7$?$+!)$b$7\e(B
- \e$B4V0c$C$F\e(B ESC \e$B$rF~NO$7$F$7$^$C$?;~$b!"\e(BC-g \e$B$rF~NO$9$l$P<h$j>C$;$^\e(B
- \e$B$9!#\e(B
+\e$BNc$($P\e(B C-u 8 C-f \e$B$H%?%$%W$9$k$H#8J8;zJ,@h$K0\F0$7$^$9!#\e(B
-\e$B%(%i!<\e(B
-======
+>> \e$BE,Ev$J?tCM0z?t$r\e(B C-n \e$B$"$k$$$O\e(B C-p \e$B$KM?$(!"0l2s$N%3%^%s%I$G$J$k$Y$/\e(B
+ \e$B$3$N9T$N6a$/$KMh$k$h$&$K$7$F$_$^$7$g$&!#\e(B
- \e$B;~$K$O!"\e(BEmacs\e$B$G5v$5$l$F$$$J$$A`:n$r$7$F$7$^$&$3$H$,$"$j$^$9!#Nc$($P!"\e(B
-\e$B%3%^%s%I$NDj5A$5$l$F$$$J$$%3%s%H%m!<%k!&%-!<$rF~NO$7$F$7$^$C$?;~$K$O!"\e(BEmacs
-\e$B$O%Y%k$rLD$i$7!"$5$i$K!"2hLL$N0lHV2<$K!"2?$,0-$+$C$?$+$rI=<($7$^$9!#\e(B
+\e$BBgDq$N%3%^%s%I$O?tCM0z?t$r7+$jJV$72s?t$H2r<a$7$^$9$,!"Cf$K$ONc30$b$"$j\e(B
+\e$B$^$9!#\e(BC-v \e$B$d\e(B M-v \e$B$,$=$&$G$9!#$3$N>l9g!";XDj$5$l$??t$N9T$@$12hLL$r%9%/\e(B
+\e$B%m!<%k$5$;$k$3$H$K$J$j$^$9!#Nc$($P\e(B C-u 4 C-v \e$B$O2hLL$r#49TJ,>e$K%9%/%m!<\e(B
+\e$B%k$5$;$^$9!#\e(B
- Emacs\e$B$N%P!<%8%g%s$K$h$C$F$O!"$3$NF~LgJT$K=q$+$l$F$$$k$3$H$r<B9T$G$-$J\e(B
-\e$B$$>l9g$,$"$jF@$^$9!#$=$NMM$J>l9g$K$O!"%(%i!<%a%C%;!<%8$,I=<($5$l$^$9$+$i!"\e(B
-\e$B2?$+%+!<%=%k0\F0%-!<$r2!$7$F!"$=$N<!$NItJ,$K?J$s$G2<$5$$!#\e(B
+>> C-u 8 C-v \e$B$r;n$7$F$_$^$7$g$&!#\e(B
-\e$B%&%#%s%I%&\e(B
-==========
+\e$B2hLL$,>e$K#89T%9%/%m!<%k$7$?$O$:$G$9!#$^$?2hLL$r2<$K%9%/%m!<%k$5$;$k$K$O\e(B
+M-v \e$B$K0z?t$rM?$($l$P$h$$$N$G$9!#\e(B
- Emacs\e$B$O4v$D$b$N%&%#%s%I%&$r;}$D$3$H$H!"$=$N$=$l$>$l$KBP$7$F%F%-%9%H$r\e(B
-\e$BI=<($9$k$3$H$,$G$-$^$9!#%X%k%W$d!"4v$D$+$N%3%^%s%I$+$i$N=PNO$rI=<($9$k$?$a\e(B
-\e$B$K8=$l$?M>J,$J%&%#%s%I%&$r>C$9$?$a$K!"<!$N%3%^%s%I$rCN$kI,MW$,$"$j$^$9!#\e(B
+\e$B$b$7\e(B X \e$B%&%#%s%I%&$r;H$C$F$$$k$N$J$i!"%9%/%m!<%k%P!<$H8F$P$l$k=DD9$N;M\e(B
+\e$B3Q$$%(%j%"$,\e(B XEmacs \e$B$N%&%#%s%I%&$N1&C<$K$"$k$O$:$G$9!#$=$3$r%^%&%9$GA`\e(B
+\e$B:n$7$F2hLL$r%9%/%m!<%k$5$;$k$3$H$b$G$-$^$9!#\e(B
- C-x 1 \e$B%&%#%s%I%&$r#1$D$K$9$k!#\e(B
+>> \e$B%9%/%m!<%k%P!<$NCf$G%^%&%9$N??Cf$N%\%?%s$r2!$7$F$_$^$7$g$&!#%\%?%s\e(B
+ \e$B$r2!$7$?0LCV$G7h$^$kJ8>O$N0LCV$^$G2hLL$,%9%/%m!<%k$7$^$9!#\e(B
- C-x 1 \e$B$O!"B>$N%&%#%s%I%&$r>C$7$F!"%+!<%=%k$N$"$k%&%#%s%I%&$r!"2hLLA4BN\e(B
-\e$B$K9-$2$^$9!#\e(B
+>> \e$B%9%/%m!<%k%P!<$N0lHV>e$+$i#39TL\$[$I$N$H$3$m$K%^%&%9$r0\F0$7$F!":8\e(B
+ \e$B$N%\%?%s$r2?EY$+2!$7$F$_$^$7$g$&!#\e(B
- >> \e$B%+!<%=%k$r$3$N9T$K;}$C$F$-$F!"\e(BC-u 0 C-l \e$B$H%?%$%W$7$^$9!#\e(B
+* X \e$BC<Kv$G$N%+!<%=%k$N%3%s%H%m!<%k\e(B
+----------------------------------
- >> C-h k C-f \e$B$H%?%$%W$7$J$5$$!#?7$7$$%&%#%s%I%&$,\e(B C-f \e$B%3%^%s%I$N%I%-\e(B
- \e$B%e%a%s%H$rI=<($9$k$?$a$K8=$l$k$HF1;~$K!"$3$N%&%#%s%I%&$,$I$N$h$&\e(B
- \e$B$K=L$`$+$r4Q;!$7$J$5$$!#\e(B
+X \e$BC<Kv$,$"$k$H!"$*$=$i$/%-!<%Q%C%I$G%+!<%=%k$rA`:n$9$kJ}$,4JC1$@$H46$8\e(B
+\e$B$k$G$7$g$&!#\e(Bleft, right, up, down \e$B$NLp0u%-!<$OM=A[DL$j$NJ}8~$K0\F0$7$"\e(B
+\e$B$9!#$=$l$i!"\e(BC-b, C-f, C-p, C-n \e$B$HA4$/F1$8$h$&$KF0:n$7$^$9$,!"$h$j%?%$\e(B
+\e$B%W$,4JC1$G!"3P$($k$N$b4JC1$G$9!#C18l$4$H$G$N0\F0$K\e(B C-left \e$B$H\e(B C-right
+\e$B$r;H$&$3$H$b$G$-!"2t\e(B \e$B!JNc$($P!"%F%-%9%HJT=8Cf$K$OCJMn!K\e(B \e$B$G0\F0$9$k$?$a\e(B
+\e$B$K\e(BC-up \e$B$H\e(B C-down \e$B$r;H$&$3$H$b$G$-$^$9!#\e(BHOME \e$B!J$b$7$/$O\e(B BEGIN\e$B!K\e(B \e$B$H\e(B END
+\e$B$H=q$+$l$?%-!<$,$"$l$P!"$=$l$>$l9T$N:G=i$H:G8e$K0\F0$7!"\e(BC_home \e$B$H\e(B
+C-end \e$B$O%U%!%$%k$N:G=i$H:G8e$K0\F0$7$^$9!#%-!<%\!<%I$K\e(B PgUp \e$B$H\e(B PgDn \e$B%-!<\e(B
+\e$B$,$"$l$P!"\e(BM-v \e$B$H\e(B C-v \e$B$N$h$&$K!"0lEY$K0l2hLLKh!">e2<$K0\F0$9$k$?$a$K;H\e(B
+\e$B$&$3$H$,$G$-$^$9!#\e(B
- >> C-x 1\e$B$H%?%$%W$7$F!"%I%-%e%a%s%H$N8=$o$l$F$$$?%&%#%s%I%&$r>C$7$J$5\e(B
- \e$B$$!#\e(B
+\e$B$3$l$iA4$F$N%3%^%s%I$O>e$G@bL@$5$l$F$$$k$h$&$K?tCM0z?t$r<h$k$3$H$,$G$-\e(B
+\e$B$^$9!#$3$l$i$N0z?t$NF~NO$KC;=LO)$r<h$k$3$H$,$G$-$^$9!#\e(BCONTROL \e$B$+\e(B META
+\e$B%-!<$r2!$7$?$^$^?t;z$r%?%$%W$9$k$@$1$G$9!#Nc$($P!"1&$K#1#28l0\F0$9$k$?\e(B
+\e$B$a$K$O!"\e(BC-1 C-2 C-right \e$B$H%?%$%W$7$^$9!#BG80$N4V$K\e(B CONTROL \e$B%-!<$rN%$5\e(B
+\e$B$J$/$F$h$$$N$G!"%?%$%W$OHs>o$K4JC1$G$9!#\e(B
-\e$BA^F~$H:o=|\e(B
-==========
- \e$B%F%-%9%H$r%?%$%W$7$?$1$l$P!"C1$K$=$l$r%?%$%W$9$k$@$1$G9=$$$^$;$s!#L\$K\e(B
-\e$B8+$($kJ8;z!J\e(B'A','7','*','\e$B$"\e(B'\e$B$J$I!K$O\e(BEmacs\e$B$K$h$C$F%F%-%9%H$G$"$k$H$_$J$5$l!"\e(B
-\e$B$=$N$^$^A^F~$5$l$^$9!#9T$N=*$o$j$O2~9TJ8;z$GI=$5$l!"$3$l$rF~NO$9$k$K$O\e(B
-<Return> \e$B$r%?%$%W$7$^$9!#\e(B
+\e$B!v\e(B XEmacs \e$B$,%O%s%0$7$?;~!JF0$+$J$/$J$C$?;~!K\e(B
+==========================================
+
+\e$B$b$7\e(B XEmacs \e$B$,%3%^%s%I$KH?1~$7$J$/$J$C$?$i!"\e(BC-g \e$B$r%?%$%W$9$k$3$H$G\e(B
+XEmacs \e$B$r0BA4$K;_$a$k$3$H$,$G$-$^$9!#\e(BC-g \e$B$G$H$F$b;~4V$N$+$+$k%3%^%s%I\e(B
+\e$B$r;_$a$k$3$H$,$G$-$^$9!#\e(B
- \e$BD>A0$KF~NO$7$?J8;z$r:o=|$9$k$K$O!"\e(B<Delete> \e$B$rF~NO$7$^$9!#\e(B<Delete> \e$B$O!"\e(B
-\e$B%-!<%\!<%I$G!V\e(BDelete\e$B!W$H=q$$$F$"$k%-!<$r2!$7$FF~NO$7$^$9!#!V\e(BDelete\e$B!W$N$+$o\e(B
-\e$B$j$K!V\e(BRubout\e$B!W$H=q$$$F$"$k$+$bCN$l$^$;$s!#$h$j0lHLE*$K$O!"\e(B<Delete> \e$B$O!"8=:_\e(B
-\e$B%+!<%=%k$N$"$k0LCV$ND>A0$NJ8;z$r:o=|$7$^$9!#\e(B
+C-g \e$B$O$^$?!"?tCM0z?t$r<h$j;_$a$?$j!"#2$D0J>e$N%-!<F~NO$rI,MW$H$9$k\e(B
+\e$B%3%^%s%I$rF~NO$7$F$$$k:GCf$K$=$l$r<h$j;_$a$?$j$9$k$N$K$b;H$($^$9!#\e(B
- >> \e$BJ8;z$r$$$/$D$+%?%$%W$7!"$=$l$+$i$=$l$i$r\e(B <Delete> \e$B$r;H$C$F:o=|$7\e(B
- \e$B$J$5$$!#\e(B
+>> C-u 100 \e$B$H%?%$%W$7$F0z?t#1#0#0$r@_Dj$7$F$+$i\e(B C-g \e$B$rBG$C$F$_$^$7$g$&!#\e(B
+ \e$B$=$l$+$i\e(B C-f \e$B$rBG$C$F2<$5$$!#0lJ8;z$7$+?J$^$J$$$O$:$G$9!#$J$<$J$i!"\e(B
+ C-g \e$B$G?tCM0z?t$,%-%c%s%;%k$5$l$?$+$i$G$9!#\e(B
- >> \e$B1&%^!<%8%s$r1[$($k$^$G%F%-%9%H$r%?%$%W$7$J$5$$!#%F%-%9%H$,0l9T$N\e(B
- \e$BI}0J>e$KD9$/$J$k$H!"$=$N9T$O2hLL$+$i$O$_=P$7$F!V7QB3!W$5$l$^$9!#\e(B
- \e$B1&C<$K$"$k\e(B'\'\e$B5-9f$O!"$=$N9T$,7QB3$5$l$F$$$k$3$H$rI=$7$F$$$^$9!#\e(B
- Emacs\e$B$O!"8=:_JT=8Cf$N0LCV$,8+$($k$h$&$K9T$r%9%/%m!<%k$7$^$9!#2hLL\e(B
- \e$B$N1&$"$k$$$O:8$NC<$K$"$k\e(B'\'\e$B5-9f$O!"$=$NJ}8~$K9T$,$^$@B3$$$F$$$k$3\e(B
- \e$B$H$rI=$7$F$$$^$9!#\e(B
+\e$B4V0c$C$F\e(B <ESC> \e$B$r%?%$%W$7$F$7$^$C$?;~$b!"\e(BC-g \e$B$G$=$l$r<h$j>C$;$^$9!#\e(B
- \e$B$3$l$O!"J8>O$G@bL@$9$k$h$j<B:]$K$d$C$?J}$,$h$/H=$k$G$7$g$&!#\e(B
- >> \e$B@h$[$IF~NO$7$?!"7QB3$5$l$?9T$N>e$K%+!<%=%k$r$b$C$F$$$-!"\e(BC-d \e$B$G%F\e(B
- \e$B%-%9%H$r:o=|$7$F!"%F%-%9%H$,0l9T$K<}$^$k$h$&$K$7$F$_$J$5$$!#7QB3\e(B
- \e$B$rI=$9\e(B'\'\e$B5-9f$O>C$($^$7$?$M!#\e(B
+\e$B!v;HMQIT2D\e(B (disabled) \e$B%3%^%s%I\e(B
+==================================
- >> \e$B%+!<%=%k$r9T$N@hF,$K0\F0$7!"\e(B<Delete> \e$B$rF~NO$7$J$5$$!#$3$l$O$=$N9T\e(B
- \e$B$ND>A0$N9T6g@Z$j$r:o=|$9$k$N$G!"$=$N9T$,A0$N9T$H$D$J$,$C$F$7$^$$\e(B
- \e$B$^$9!#$D$J$,$C$?9T$,2hLL$NI}$h$jD9$/$J$k$H!"7QB3$NI=<($,$5$l$k$G\e(B
- \e$B$7$g$&!#\e(B
+\e$B$$$/$D$+$N%3%^%s%I$O=i?4<T$,4V0c$C$F;H$o$J$$$h$&;HMQIT2D$K$J$C$F$$$^$9!#\e(B
- >> <Return> \e$B$r2!$7$F!"$b$&0lEY9T6g@Z$j$rA^F~$7$J$5$$!#\e(B
+\e$B$b$72?$l$+$N;HMQIT2D%3%^%s%I$r%?%$%W$7$?$i!"$=$l$O$I$&$$$&%3%^%s%I$+$,\e(B
+\e$BI=<($5$l!"K\Ev$K$=$l$r<B9T$7$?$$$N$+$I$&$+?V$M$i$l$^$9!#\e(B
- Emacs\e$B$N$[$H$s$I$N%3%^%s%I$O!"7+$jJV$7$N2s?t$rM?$($k$3$H$,$G$-$^$9!#$3\e(B
-\e$B$N$3$H$O!"J8;z$NA^F~$K$D$$$F$bEv$F$O$^$j$^$9!#\e(B
+\e$B$b$7K\Ev$K<B9T$7$?$$$N$J$i%9%Z!<%9%-!<$r%?%$%W$7$F2<$5$$!#$b$7<B9T$7$?\e(B
+\e$B$/$J$1$l$P\e(B "n" \e$B$H%?%$%W$7$F2<$5$$!#\e(B
- >> C-u 8 * \e$B$HF~NO$7$F$_$J$5$$!#$I$&$J$j$^$7$?$+!#\e(B
+>> `C-x n p' : \e$B$H%?%$%W$7$F$_$^$7$g$&!J$3$l$O;HMQIT2D%3%^%s%I$G$9!K!#\e(B
+ \e$B$=$l$+$i\e(B n \e$B$H%?%$%W$7$^$7$g$&!#\e(B
- \e$BFs$D$N9T$N4V$K6uGr9T$r:n$j$?$$>l9g$K$O!"FsHVL\$N9T$N@hF,$K9T$-!"\e(BC-o \e$B$r\e(B
-\e$BF~NO$7$^$9!#\e(B
- >> \e$BE,Ev$J9T$N@hF,$K9T$-!"$=$3$G\e(B C-o \e$B$rF~NO$7$F$_$J$5$$!#\e(B
+\e$B!v%&%#%s%I%&\e(B
+============
- \e$B$3$l$G!"\e(BEmacs\e$B$G!"%F%-%9%H$rF~NO$7!"$^$?4V0c$$$r=$@5$9$k$b$C$H$b4pK\E*\e(B
-\e$B$JJ}K!$r3X$s$@$3$H$K$J$j$^$9!#J8;z$HF1$8MM$K!"C18l$d9T$b:o=|$9$k$3$H$,$G$-\e(B
-\e$B$^$9!#:o=|A`:n$K$D$$$FMWLs$9$k$H<!$N$h$&$K$J$j$^$9!#\e(B
+XEmacs \e$B$O4v$D$b$N%&%#%s%I%&$K!"$=$l$>$l8DJL$NJ8>O$rI=<($9$k$3$H$,$G$-\e(B
+\e$B$^$9!#\e(BXEmacs \e$B$G;H$o$l$F$$$k!V%&%#%s%I%&!W$O%&%#%s%I%&%7%9%F%`$G$N=E$J$C\e(B
+\e$B$F$$$kJL$N%&%#%s%I%&$K8@5Z$7$F$$$k$N$G$O$J$/!"C10l$N\e(B X \e$B%&%#%s%I%&2<$G\e(B
+\e$B$NJL$NAk$N$3$H$r8@$C$F$$$k$3$H$KCm0U$7$F$/$@$5$$!#!J\e(BXEmacs \e$B$OJ#?t$N\e(B X
+\e$B$N%&%#%s%I%&!"\e(BXEmacs \e$B$NMQ8l$G$O!V%U%l!<%`!W$r;}$D$3$H$b$G$-$^$9!#$3$l\e(B
+\e$B$O8e$[$I@bL@$7$^$9!#!K\e(B
- <Delete> \e$B%+!<%=%k$ND>A0$NJ8;z$r:o=|\e(B
- C-d \e$B%+!<%=%k$N$"$kJ8;z$r:o=|\e(B
+\e$B$3$3$G$O!"J#?t$N%&%#%s%I%&$r;H$&5;=Q$K$O?($i$J$$$[$&$,8-L@$G$7$g$&!#$G\e(B
+\e$B$b!"%X%k%W$dFCDj$N%3%^%s%I$N=PNO$G8=$l$k$+$b$7$l$J$$M>J,$J%&%#%s%I%&$r\e(B
+\e$B>C$7$F!"$I$&$d$C$F85$N0l$D$N%&%#%s%I%&$N>uBV$KLa$k$+$r@bL@$9$k$3$H$OI,\e(B
+\e$BMW$G$7$g$&!#$=$l$O4JC1$G$9!#\e(B
- ESC <Delete> \e$B%+!<%=%k$ND>A0$NC18l$r:o=|\e(B
- ESC d \e$B%+!<%=%k0LCV0J9_$K$"$kC18l$r:o=|\e(B
+ C-x 1 \e$B%&%#%s%I%&$r#1$D$K$9$k!J$D$^$jB>$N%&%#%s%I%&$rA4It>C$9!K\e(B
- C-k \e$B%+!<%=%k0LCV$+$i9TKv$^$G$r:o=|\e(B
+\e$B$D$^$j\e(B C-x \e$B$rBG$C$F$+$i$5$i$K\e(B 1 \e$B$rBG$D$N$G$9!#$3$N%3%^%s%I$O%+!<%=%k$N\e(B
+\e$B$"$k%&%#%s%I%&$r2hLLA4BN$K9-$2$^$9!#B>$N%&%#%s%I%&$OA4It>C$($^$9!#\e(B
- \e$B2?$+$r:o=|$7$?8e$G!"$=$l$r85$KLa$7$?$/$J$k$3$H$,$"$j$^$9!#\e(BEmacs\e$B$O!"0l\e(B
-\e$BJ8;z$h$j$bBg$-$$C10L$G:o=|$r9T$C$?;~$K$O!":o=|$7$?FbMF$rJ]B8$7$F$*$-$^$9!#\e(B
-\e$B85$KLa$9$K$O!"\e(BC-y \e$B$r;H$$$^$9!#Cm0U$7$?$$$N$O!"\e(BC-y \e$B$r:o=|$r9T$C$?>l=j$@$1$G\e(B
-\e$B$O$J$/!"$I$3$K$G$b=PMh$k$3$H$G$9!#\e(BC-y \e$B$O!"J]B8$5$l$?%F%-%9%H$r8=:_%+!<%=%k\e(B
-\e$B$N$"$k>l=j$KA^F~$9$k$?$a$N%3%^%s%I$G$9$+$i!"$3$l$r;H$C$F%F%-%9%H$N0\F0$r9T\e(B
-\e$B$&$3$H$,$G$-$^$9!#\e(B
+>> \e$B%+!<%=%k$r$3$N9T$K;}$C$F$-$F!"\e(BC-u 0 C-l \e$B$H%?%$%W$7$F$_$F2<$5$$!#\e(B
- \e$B:o=|$r9T$&%3%^%s%I$K$O!"\e(B"Delete" \e$B%3%^%s%I$H!"\e(B"Kill" \e$B%3%^%s%I$H$,$"$j$^\e(B
-\e$B$9!#\e(B"Kill" \e$B%3%^%s%I$G$O:o=|$5$l$?$b$N$OJ]B8$5$l$^$9$,!"\e(B"Delete" \e$B%3%^%s%I$G\e(B
-\e$B$OJ]B8$5$l$^$;$s!#$?$@$7!"7+$jJV$72s?t$,M?$($i$l$k$H!"J]B8$5$l$^$9!#\e(B
+\e$B!J\e(BC-l \e$B$,2hLL$r:FIA2h$9$k$3$H$r;W$$=P$7$F$/$@$5$$!#$=$l$K?tCM0z?t$rM?$(\e(B
+\e$B$k$H!"!V2hLL$r:FIA2h$7$F8=:_$N9T$r2hLL$N:G>eIt$+$i$=$N?t$@$1N%$l$?$H$3\e(B
+\e$B$m$K0\F0$7$J$5$$!W$H$$$&0UL#$K$J$j$^$9!#$G$9$+$i!"\e(BC-u 0 C-l \e$B$O!V2hLL$r\e(B
+\e$B:FIA2h$7$F!"8=:_$N9T$r:G>eIt$K$9$k!W$H$$$&0UL#$K$J$j$^$9!#!K\e(B
- >> C-n \e$B$r#22s$[$I%?%$%W$7$F!"2hLL$NE,Ev$J>l=j$K0\F0$7$J$5$$!#$=$7$F!"\e(B
- C-k \e$B$G!"$=$N9T$r:o=|$7$J$5$$!#\e(B
+>> \e$BB3$$$F\e(B Control-x 2 \e$B$H%?%$%W$7$F2<$5$$!#\e(B
+ \e$B?7$7$$%&%#%s%I%&$,$3$N%P%C%U%!$NFbMF$rI=<($9$k$?$a$K8=$l$k$H$H$b$K!"\e(B
+ \e$B$3$N%&%#%s%I%&$,$I$N$h$&$K=L$`$+$r8+$F2<$5$$!#\e(B
- \e$B0l2sL\$N\e(B C-k \e$B$G$=$N9T$NFbMF$,:o=|$5$l!"$b$&0lEY\e(B C-k \e$B$rF~NO$9$k$H!"$=$N\e(B
-\e$B9T<+?H$,:o=|$5$l$^$9!#$b$7!"\e(BC-k \e$B$K7+$jJV$72s?t$r;XDj$7$?>l9g$K$O!"$=$N2s?t\e(B
-\e$B$@$1$N9T$,!JFbMF$H9T<+?H$H$,F1;~$K!K:o=|$5$l$^$9!#\e(B
+>> C-x 1 \e$B$H%?%$%W$7$F!"?7$7$$%&%#%s%I%&$,>C$($k$N$r8+$F2<$5$$!#\e(B
- \e$B:#:o=|$5$l$?%F%-%9%H$O!"J]B8$5$l$F$$$k$N$G!"$=$l$r<h$j=P$9$3$H$,$G$-$^\e(B
-\e$B$9!#$=$N$?$a$K$O!"\e(BC-y \e$B$r%?%$%W$7$^$9!#\e(B
- >> C-y \e$B$r;n$7$F$_$J$5$$!#\e(B
+\e$B!vA^F~$H:o=|\e(B
+============
+
+\e$B%F%-%9%H$rF~NO$7$?$1$l$P!"C1$K$=$l$r%?%$%W$7$F2<$5$$!#\e(BXEmacs \e$B$O!"L\$K\e(B
+\e$B8+$($kJ8;z!J\e(BA, 7, * \e$BEy!K$r%F%-%9%H$G$"$k$H$_$J$9$N$G!"$=$l$i$O$=$N$^$^\e(B
+\e$BA^F~$5$l$^$9!#\e(B<Return>\e$B!J2~9T%-!<!K$r%?%$%W$9$l$P2~9TJ8;z$,A^F~$5$l$^$9!#\e(B
- C-k \e$B$r2?EY$bB3$1$F9T$&$H!":o=|$5$l$k%F%-%9%H$O!"$^$H$a$FJ]B8$5$l!"\e(BC-y
-\e$B$G!"$=$NA4$F$,<h$j=P$5$l$^$9!#\e(B
+\e$BD>A0$KF~NO$7$?J8;z$r:o=|$9$k$K$O!"\e(B<Delete> \e$B$r%?%$%W$7$^$9!#\e(B<Delete> \e$B$O!"\e(B
+\e$B%-!<%\!<%I>e$K!V\e(BDel\e$B!W$H=q$$$F$"$k%-!<$G$9!#;~$K$O\e(B <Backspace> \e$B%-!<$b\e(B
+<Delete> \e$B$H$7$FF0:n$7$^$9$,!"$$$D$b$G$O$"$j$^$;$s!#\e(B
- >> C-k \e$B$r2?EY$b%?%$%W$7$F$_$J$5$$!#\e(B
+\e$B$h$j0lHLE*$K$O!"\e(B<Delete> \e$B$O8=:_%+!<%=%k$N$"$k0LCV$ND>A0$NJ8;z$r:o=|$7\e(B
+\e$B$^$9!#\e(B
- >> \e$B%F%-%9%H$r<h$j=P$9$K$O!"\e(BC-y \e$B$G$9!#%+!<%=%k$r?t9T2<$K0\F0$5$;!"$b\e(B
- \e$B$&0lEY\e(B C-y \e$B$r%?%$%W$7$F$_$J$5$$!#$3$l$G%F%-%9%H$N%3%T!<$,$G$-$k$o\e(B
- \e$B$1$G$9!#\e(B
+>> \e$BJ8;z$r$$$/$D$+%?%$%W$7!"$=$l$+$i$=$l$i$r\e(B <Delete> \e$B$r;H$C$F:o=|$7\e(B
+ \e$B$F2<$5$$!#$3$N%U%!%$%k$rJQ99$9$k$3$H$r5$$K$9$kI,MW$O$"$j$^$;$s!#%*\e(B
+ \e$B%j%8%J%k$NF~Lg%,%$%I%U%!%$%k$OJQ99$5$l$^$;$s$+$i!#:#8+$F$$$k%U%!%$\e(B
+ \e$B%k$O$"$J$?$N$?$a$N%3%T!<$G$9!#\e(B
- \e$B8=:_2?$+$N%F%-%9%H$,J]B8$5$l$F$$$F!"$5$i$KB>$N%F%-%9%H$r:o=|$9$k$H$I$&\e(B
-\e$B$J$k$G$7$g$&$+!#\e(BC-y \e$B$O!"$b$C$H$b:G6a:o=|$5$l$?$b$N$r<h$j=P$7$^$9!#\e(B
+\e$BJ8>O$N0l9T$,2hLL$K<}$^$i$J$$DxD9$/$J$C$?>l9g!"$=$N9T$O2hLL>e$N<!$N9T$X\e(B
+\e$B$H7QB3!J\e(Bcontinued\e$B!K$5$l$^$9!#2hLL$N1&C<$N\e(B backslash \e$BJ8;z\e(B ("\") \e$B$O!"$=\e(B
+\e$B$N9T$,7QB3$5$l$F$$$k$3$H$rI=$7$F$$$^$9!#\e(B
+>> \e$B2hLL$N1&C<$^$GJ8>O$rF~NO$7!"$5$i$KF~NO$rB3$1$F2<$5$$!#\e(B
+ \e$B7QB39T$,$G$-$k$N$,J,$k$G$7$g$&!#\e(B
- >> \e$B9T$r:o=|$7!"%+!<%=%k$r0\F0$5$;!"JL$N9T$r:o=|$7$J$5$$!#\e(BC-y \e$B$r9T$&\e(B
- \e$B$H!"#2HVL\$N9T$,F@$i$l$^$9!#\e(B
+>> <Delete> \e$B$r;H$C$F2hLL$K<}$^$k$H$3$m$^$G8=:_$N9T$rC;$/$7$F$_$F$/$@$5\e(B
+ \e$B$$!#7QB39T$O>C$($^$9!#\e(B
-\e$B<h$j>C$7\e(B(UNDO)
-==============
+\e$B2~9TJ8;z$bB>$NJ8;z$HF1$8$h$&$K:o=|$G$-$^$9!##2$D$N9T$N4V$N2~9TJ8;z$r>C\e(B
+\e$B$9$H$=$l$i$N9T$,9g$o$5$j#1$D$N9T$K$J$j$^$9!#$b$7$=$N9g$o$5$C$?9T$,2hLL\e(B
+\e$B$NI}$h$j$bD9$$>l9g$O!"7QB39T$H$J$C$FI=<($5$l$^$9!#\e(B
+
+>> \e$B%+!<%=%k$r9T$N@hF,$K0\F0$7!"\e(B<Delete> \e$B$r%?%$%W$7$F2<$5$$!#8=:_$N9T$,\e(B
+ \e$B$=$NA0$N9T$H$D$J$,$j$^$9!#\e(B
+
+>> <Return> \e$B$r%?%$%W$7$F!":#:o=|$7$?2~9TJ8;z$r$^$?A^F~$7$F2<$5$$!#\e(B
+
+XEmacs \e$B$N$[$H$s$I$N%3%^%s%I$O!"7+$jJV$7$N2s?t;XDj$G$-$k$3$H$r;W$$=P$7\e(B
+\e$B$F2<$5$$!#$3$l$O!"J8;z$NA^F~$K$D$$$F$bEv$F$O$^$j$^$9!#\e(B
+
+>> C-u 8 * \e$B$H%?%$%W$9$k$H\e(B ******** \e$B$,A^F~$5$l$^$9!#;n$7$F$_$^$7$g$&!#\e(B
+
+\e$B$3$l$G!"\e(BXEmacs \e$B$G%F%-%9%H$rF~NO$7!"$^$?4V0c$$$r=$@5$9$k$b$C$H$b4pK\E*\e(B
+\e$B$JJ}K!$r3X$s$@$3$H$K$J$j$^$9!#J8;z$HF1$8MM$K!"C18l$d9T$b:o=|$9$k$3$H$,\e(B
+\e$B$G$-$^$9!#:o=|A`:n$K$D$$$FMWLs$9$k$H<!$N$h$&$K$J$j$^$9!#\e(B
+
+ <Delete> \e$B%+!<%=%k$ND>A0$NJ8;z$r:o=|!J\e(Bdelete\e$B!K\e(B
+ C-d \e$B%+!<%=%k$N$"$kJ8;z$r:o=|!J\e(Bdelete\e$B!K\e(B
+
+ M-<Delete> \e$B%+!<%=%k$ND>A0$NC18l$r>C5n!J\e(Bkill\e$B!K\e(B
+ M-d \e$B%+!<%=%k0LCV0J9_$K$"$kC18l$r>C5n!J\e(Bkill\e$B!K\e(B
+
+ C-k \e$B%+!<%=%k0LCV$+$i9TKv$^$G$r>C5n!J\e(Bkill\e$B!K\e(B
+ M-k \e$B%+!<%=%k0LCV$+$iJ8Kv$^$G$r>C5n!J\e(Bkill\e$B!K\e(B
+
+<Delete> \e$B$H\e(B C-d \e$B$KBP$9$k\e(B M-<Delete> \e$B$H\e(B M-d \e$B$O!"\e(BC-f \e$B$H\e(B M-f \e$B$G;O$^$C$?N`\e(B
+\e$B;w@-$r$^$?3HD%$7$^$9!#$3$3$G\e(B <Delete> \e$B$O%3%s%H%m!<%kJ8;z$G$O$"$j$^$;$s\e(B
+\e$B$,!"$^$"!"$=$l$O5$$K$7$J$$$G2<$5$$!#\e(BC-k \e$B$H\e(B M-k \e$B$N4X78$O\e(B C-e \e$B$H\e(B M-e \e$B$N\e(B
+\e$B4X78!J9T$HJ8$NBPHf!K$HF1$8$G$9!#\e(B
+
+\e$B0lEY$K#2J8;z0J>e>C$7$?>l9g!"\e(BXEmacs \e$B$O$=$N>C$7$?%F%-%9%H$rJ]B8$7$F$*$$\e(B
+\e$B$F!"$^$?85$KLa$9$3$H$,$G$-$k$h$&$K$7$F$$$^$9!#$3$N!V85$KLa$9!W$H$$$&F0\e(B
+\e$B:n$r:FF~!J\e(Byanking\e$B!K$H8F$S$^$9!#>C$7$?%F%-%9%H$O!"85$HF1$8>l=j$K$G$b85\e(B
+\e$B$H$O0c$&>l=j$K$G$b:FF~$G$-$^$9!#$^$?!"2?EY$b:FF~$7$F%F%-%9%H$N%3%T!<$r\e(B
+\e$BJ#?t:n$k$3$H$b$G$-$^$9!#:FF~$N$?$a$N%3%^%s%I$O\e(B C-y \e$B$G$9!#\e(B
+
+\e$B!V>C5n!J\e(Bkill\e$B!K!W$H!V:o=|!J\e(Bdelete\e$B!K!W$N0c$$$K5$$r$D$1$F2<$5$$!#>C5n$7$?\e(B
+\e$B%F%-%9%H$O:FF~$G$-$^$9$,!":o=|$7$?$b$N$O:FF~$G$-$^$;$s!#0lHL$K!"BgNL$N\e(B
+\e$B%F%-%9%H$r>C$9%3%^%s%I$O$=$N%F%-%9%H$rJ]B8$7$F$*$-$^$9$,!"0lJ8;z$H$+6u\e(B
+\e$BGr9T$d6uGrJ8;z$r:o=|$9$k%3%^%s%I$O:o=|$7$?$b$N$rJ]B8$7$-$^$;$s!#\e(B
+
+>> \e$B6u9T$G$J$$9T$N@hF,$K%+!<%=%k$r0\F0$5$;$F2<$5$$!#\e(B
+ \e$B$=$l$+$i\e(B C-k \e$B$G$=$N9T$N%F%-%9%H$r>C5n$7$F2<$5$$!#\e(B
+>> \e$B$b$&0lEY\e(B C-k \e$B$r%?%$%W$7$F$/$@$5$$!#$=$N9T$KB3$/2~9TJ8;z$,>C$5$l$k$N\e(B
+ \e$B$,J,$j$^$7$?$+!#\e(B
+
+\e$B0l2sL\$N\e(B C-k \e$B$O$=$N9T$N%F%-%9%H$r>C$7!"#22sL\$N\e(B C-k \e$B$O$=$N9T<+?H$r>C$7\e(B
+\e$B$F$=$N@h$N9T$r>e$2$F$-$^$9!#\e(BC-k \e$B$N?tCM0z?t$N07$$$OFC<l$G$9!#0z?tJ,$N9T\e(B
+\e$B!J9T$NFbMF$H9T<+?H!K$r>C$7$^$9!#$3$l$OC1$J$k7+$jJV$7$G$O$"$j$^$;$s!#\e(B
+C-u 2 C-k \e$B$O#2$D$N9T$H$=$l$>$l$KB3$/2~9TJ8;z$r>C$7$^$9$,!"\e(BC-k \e$B$r#2EY%?\e(B
+\e$B%$%W$7$F$b$=$&$O$J$j$^$;$s!#\e(B
+
+\e$B:G8e$K>C5n$7$?%F%-%9%H$r8=:_%+!<%=%k$,$"$k0LCV$K:FF~$9$k$K$O\e(B C-y \e$B$r%?\e(B
+\e$B%$%W$7$^$9!#\e(B
+
+>> \e$B;n$7$F2<$5$$!#\e(BC-y \e$B$r%?%$%W$7$F:G8e$K>C5n$7$?%F%-%9%H$r:FF~$7$^$7$g$&!#\e(B
+
+C-y \e$B$O!"$"$J$?$,L5$/$7$?$b$N$r<h$jLa$9$b$N$@$H9M$($^$7$g$&!#\e(BC-k \e$B$rB3$1\e(B
+\e$B$F<B9T$9$k$H!">C5n$7$?3F9T$OA4It$^$H$a$FJ]B8$5$l$k$N$G!"0l2s$N\e(B C-y \e$B$G\e(B
+\e$B$=$l$i$N9T$,A4It:FF~$5$l$^$9!#\e(B
+
+>> C-k \e$B$r2?EY$+B3$1$F%?%$%W$7$F$_$F2<$5$$!#\e(B
- \e$B$$$D$G$b!"%F%-%9%H$rJQ99$7$?$1$l$I$b!"$=$l$r$b$H$KLa$7$?$$$H$-$O\e(BC-x u
-\e$B$GD>$j$^$9!#IaDL$O4V0c$($?%3%^%s%I$rL58z$K$9$kF/$-$r$7$^$9!#7+$jJV$7$F\e(BUNDO
-\e$B$r9T$J$*$&$H$9$k;~$O!"2?EY$b$=$N%3%^%s%I$r9T$J$($P=PMh$k$h$&$K$J$C$F$$$^$9!#\e(B
+\e$B$5$"!">C5n$7$?%F%-%9%H$r:FF~$7$^$7$g$&!#\e(B
- >> \e$B$3$N9T$r\e(BC-k\e$B$G>C$7$F2<$5$$!#$=$7$F!"\e(BC-x u\e$B$GLa$7$F2<$5$$!#\e(B
+>> C-y \e$B$r%?%$%W$7$F2<$5$$!#<!$K%+!<%=%k$r?t9T2<$K0\F0$5$;!"$^$?\e(B C-y \e$B$r\e(B
+ \e$B%?%$%W$7$F2<$5$$!#$I$&$d$C$F%F%-%9%H$r%3%T!<$9$k$+J,$j$^$7$?$M!#\e(B
- C-_\e$B$O!"\e(BUNDO\e$B$r9T$J$&!"$b$&0l$D$N%3%^%s%I$G$9!#5!G=$O!"\e(BC-x u\e$B$HF1$8$G$9!#\e(B
+\e$B2a5n$K>C5n$7$?%F%-%9%H$r:FF~$7$?$$$N$K!"JL$N%F%-%9%H$r$=$N8e>C5n$7$?;~\e(B
+\e$B$O$I$&$9$l$P$h$$$G$7$g$&!)\e(B C-y \e$B$O:G8e$K>C5n$7$?$b$N$r:FF~$7$^$9!#$G$b\e(B
+\e$B$=$l$G$h$j0JA0$K>C5n$7$?%F%-%9%H$,$J$/$J$k$o$1$G$O$"$j$^$;$s!#$=$&$$$&\e(B
+\e$B%F%-%9%H$O\e(B M-y \e$B$G:FF~$G$-$^$9!#\e(BC-y \e$B$G:G8e$K>C5n$7$?%F%-%9%H$r:FF~$7$?\e(B
+\e$BD>8e$K\e(BM-y \e$B$r%?%$%W$9$k$H!"$=$N:FF~$5$l$?%F%-%9%H$O$=$l0JA0$K>C5n$7$?$b\e(B
+\e$B$N$KJQ99$5$l$^$9!#2?EY$bB3$1$F\e(B M-y \e$B$r%?%$%W$9$k$H!"$5$i$KA0$K>C5n$7$?\e(B
+\e$B%F%-%9%H$r8F$SLa$;$^$9!#K>$_$N%F%-%9%H$K9T$-Ev$C$?$i!"$=$l$O$=$N$^$^$K\e(B
+\e$B$7$FJT=8:n6H$rB3$1$l$P$h$$$N$G$9!#\e(B
- C-_\e$B$d\e(BC-x u\e$B$K\e(BUNDO\e$B$N2s?t$r!"M?$($k$3$H$,=PMh$^$9!#\e(B
+\e$B$"$k2s?t$@$1\e(B M-y \e$B$r7+$jJV$7$?$i!"$^$?:G=i!J$D$^$j:G8e$K>C5n$7$?%F%-%9\e(B
+\e$B%H!K$KLa$j$^$9!#\e(B
+>> \e$B0l9T>C5n$7!"JL$N9T$K9T$C$F$=$N9T$r>C5n$7$F2<$5$$!#\e(B
+ \e$B$=$l$+$i\e(B C-y \e$B$G#2HVL\!J:G8e!K$K>C5n$7$?9T$r:FF~$7$F2<$5$$!#\e(B
+ \e$BB3$$$F\e(B M-y \e$B$G$=$N9T$r:G=i$K>C5n$7$?9T$KJQ$($F2<$5$$!#\e(B
+ M-y \e$B$rB3$1$I$&$J$k$+8+$F$_$^$7$g$&!##2HVL\$K>C5n$7$?9T$,La$C$FMh$k\e(B
+ \e$B$^$G\e(B M-y \e$B$r7+$jJV$7!"$5$i$K$b$&2?EY$+\e(B M-y \e$B$r$7$^$7$g$&!#\e(B
+ \e$B$b$7K>$_$J$i\e(B M-y \e$B$K@5$b$7$/$OIi$N?tCM0z?t$rM?$($F$bNI$$$G$7$g$&!#\e(B
-\e$B%U%!%$%k\e(B
-========
- \e$B%F%-%9%H$X$NJQ99$r1J5WE*$K$9$k$?$a$K$O!"$=$l$r%U%!%$%k$KJ]B8$7$J$1$l$P\e(B
-\e$B$J$j$^$;$s!#J]B8$5$l$J$$$H!"$[$I$3$7$?JQ99$O!"\e(BEmacs\e$B$r=*N;$9$k$HF1;~$K<:$o$l\e(B
-\e$B$F$7$^$$$^$9!#\e(B
+\e$B!v<h$j>C$7\e(B(UNDO)
+================
- \e$B$$$^8+$F$$$k%U%!%$%k$KBP$7$F!"$"$J$?$NJT=8$r9T$C$?$b$N$r=q$-9~$_$^$9!#\e(B
-\e$B$$$^8+$F$$$k%U%!%$%k$H$O!"4JC1$K$$$($PJT=8$7$F$$$k%U%!%$%k<+BN$N$3$H$G$9!#\e(B
+\e$B$b$7!"J8>O$rJQ99$7$?8e$G$=$NJQ99$O4V0c$$$@$C$?$H;W$C$?$i!"<h$j>C$7\e(B
+\e$B!J\e(Bundo\e$B!K%3%^%s%I\e(B C-x u \e$B$G$=$NJQ99$r<h$j>C$9$3$H$,$G$-$^$9!#\e(B
- \e$B$"$J$?$,%U%!%$%k$r%;!<%V!JJ]B8$9$k!K$9$k$^$G!":#$^$G$NJQ99$OJT=8$7$F$$\e(B
-\e$B$k%U%!%$%k$K=q$-9~$^$l$k;v$O$"$j$^$;$s!#$=$l$O!"$"$J$?$,$=$N$h$&$K9T$$$?$/\e(B
-\e$B$J$$$N$K!"ESCf$^$GJQ99$r2C$($?$b$N$,>!<j$K=q$-9~$^$l$k$h$&$J;v$,$J$$$h$&$K\e(B
+\e$BDL>o!"\e(BC-x u \e$B$O0l$D$N%3%^%s%I$K$h$kJQ99$r<h$j>C$7$^$9!#B3$1$F2?EY$b\e(B C-x
+u \e$B$r9T$($P$=$N$?$S$K0l$DA0$N%3%^%s%I$,<h$j>C$7$K$J$j$^$9!#\e(B
+
+\e$B$?$@$7$3$l$K$ONc30$,Fs$D$"$j$^$9!#$^$:!"J8>O$rJQ99$7$J$$%3%^%s%I$O<h$j\e(B
+\e$B>C$7$K$J$j$^$;$s!#%+!<%=%k0\F0$d%9%/%m!<%k$N%3%^%s%I$,$=$l$KEv$?$j$^$9!#\e(B
+\e$B$=$l$+$i!"%F%-%9%HJ8;z$NA^F~!J<+8JA^F~%3%^%s%I!K$O\e(B 20 \e$B8D0l$^$H$a$G07$o\e(B
+\e$B$l$^$9!#$3$l$O%F%-%9%H$NA^F~$r<h$j>C$9$?$a$N\e(B C-x u \e$B$N2s?t$r8:$i$9$?$a\e(B
\e$B$G$9!#\e(B
- \e$B%;!<%V$r9T$C$?8e$G$5$(JQ99$7$?$b$N$,4V0c$C$F$$$?;~$N$?$a$K\e(BEmacs\e$B$OL>A0\e(B
-\e$B$rJQ$($F%*%j%8%J%k$N%U%!%$%k$r;D$7$^$9!#\e(B
+>> \e$B$3$N9T$r\e(BC-k\e$B$G>C$7$F2<$5$$!#$=$7$F!"\e(BC-x u \e$B$GLa$7$F2<$5$$!#\e(B
-\e$BHw9M\e(B: \e$B$^$?!"\e(BEmacs\e$B$OITB,$N;vBV$KBP$7!"0lDj$N%?%$%_%s%0$4$H$K<+F0E*\e(B
- \e$B$KJT=8$7$F$$$k%U%!%$%k$NFbMF$rL>A0$rJQ$($?%U%!%$%k$K%;!<%V$7\e(B
- \e$B$^$9!#$3$l$K$h$C$F!"K|0l$N>l9g$O9T$C$?$NJQ99$KBP$7:G>.8B$NHo\e(B
- \e$B32$G:Q$`$h$&$K$J$C$F$$$^$9!#\e(B
+C-_ \e$B$b<h$j>C$7!J\e(Bundo\e$B!K$r9T$J$&%3%^%s%I$G$9!#5!G=$O!"\e(BC-x u \e$B$HF1$8$G$9$,!"\e(B
+\e$BB3$1$F2?EY$b%?%$%W$9$k>l9g$O$h$jJXMx$G$9!#\e(BC-_ \e$B$NLdBj$O!"%-!<%\!<%I$K$h$C\e(B
+\e$B$F$O$I$&$d$C$F%?%$%W$9$k$N$+J,$j$E$i$$;v$G$9!#$@$+$i\e(B C-x u \e$B$,$"$k$N$G\e(B
+\e$B$9!#C<Kv$K$h$C$F$O!"%3%s%H%m!<%k%-!<$r2!$7$?$^$^\e(B / \e$B$r%?%$%W$9$k$H\e(B C-_
+\e$B$r%?%$%W$7$?$3$H$K$J$j$^$9!#\e(B
- \e$B2hLL$N2<$NJ}$r8+$k$H!"$3$N$h$&$J46$8$G%b!<%I%i%$%s$,I=<($5$l$F$$$k$H;W\e(B
-\e$B$$$^$9!#\e(B
+C-_ \e$B$d\e(B C-x u \e$B$O?tCM0z?t$r7+$jJV$72s?t$H2r<a$7$^$9!#\e(B
-(\e$BNc\e(B) [--]J:--**-Mule: MULE.tut (Fundamental) ---55%--------------
+\e$B!v%U%!%$%k\e(B
+==========
+\e$BJT=8$7$F$$$kJ8>O$r915WE*$JJ*$K$9$k$K$O!"$=$l$r%U%!%$%k$KJ]B8$7$J$1$l$P\e(B
+\e$B$J$j$^$;$s!#$5$b$J$$$H!"\e(BXEmacs \e$B$N=*N;$HF1;~$K$=$l$O$J$/$J$C$F$7$^$$$^\e(B
+\e$B$9!#JT=8$7$?J*$r%U%!%$%k$KF~$l$k$K$O%U%!%$%k$r3+$$$F$+$i$7$^$9!#!J%U%!\e(B
+\e$B%$%k$r\e(B "visit" \e$B$9$k$H$b8@$$$^$9!K!#\e(B
- \e$B$3$N\e(BEmacs\e$B%A%e!<%H%j%"%k$N%3%T!<$O\e(BMULE.tut\e$B$H8F$P$l$F$$$^$9!#%U%!%$%k$r\e(B
-\e$B%U%!%$%s%I!J%U%!%$%k$r8+$D$1$F%P%C%U%!$KFI$_9~$`$3$H!K$9$k$H!"\e(BMULE.tut\e$B$NIt\e(B
-\e$BJ,$KI=<($5$l$^$9!#Nc$($P!"\e(Bnew-file\e$B$H$$$&L>A0$N%U%!%$%k$r%U%!%$%s%I$7$?$J$i\e(B
-\e$B$P!"\e(B"Mule: new-file"\e$B$H$$$&%b!<%I%i%$%s$K$J$k$G$7$g$&!#\e(B
+\e$B%U%!%$%k$r3+$/$H$O!"$=$N%U%!%$%k$NCf?H$r\e(B XEmacs \e$B$G8+$k$3$H$r0UL#$7$^$9!#\e(B
+\e$B?'!9$J0UL#$G!"$=$l$O$"$J$?$,%U%!%$%k<+?H$rJT=8$7$F$$$k$+$NMM$G$9!#$7$+\e(B
+\e$B$7!"\e(BXEmacs \e$B$G9T$&JQ99$O%U%!%$%k$r%;!<%V$9$kKx$O915WE*$J$b$N$H$J$j$^$;\e(B
+\e$B$s!#$3$l$O!"$=$l$rK>$^$J$$$N$K!"ESCf$^$GJQ99$7$?%U%!%$%k$,;D$k$N$rHr$1\e(B
+\e$B$k$?$a$G$9!#%;!<%V$7$?8e$G$5$(!"JQ99$7$?$b$N$,4V0c$C$F$$$?;~$N$?$a$K!"\e(B
+\e$B85$N%U%!%$%k$OL>A0$rJQ$($F;D$5$l$^$9!#\e(B
-\e$BCm0U!'\e(B \e$B%b!<%I%i%$%s$K$D$$$F$O8e$[$I@bL@$7$^$9!#>/$7$*BT$A$r!#\e(B
+\e$B2hLL$N0lHV2<6a$/$K!"\e(B"ISO7--%%-XEmacs: TUTORIAL.ja" \e$B$NMM$JJ8;zNs$G;O$^\e(B
+\e$B$j\e(B "----" \e$B$G=*$C$F$$$k9T$,$"$k$O$:$G$9!#2hLL$N$3$NItJ,$O>o$K8=:_3+$$$F\e(B
+\e$B$$$k%U%!%$%k$NL>A0$,I=<($5$l$F$$$^$9!#:#$O\e(B "TUTORIAL.ja" \e$B$H$$$&L>$N%U%!\e(B
+\e$B%$%k!J$3$l$O\e(B XEmacs \e$BF~Lg%,%$%I$N$"$J$?MQ$N%3%T!<$G$9!K$r3+$$$F$$$^$9!#\e(B
+XEmacs \e$B$G%U%!%$%k$r3+$/$H$=$N%U%!%$%k$NL>A0$,$3$NItJ,$K8=$l$^$9!#\e(B
- \e$B%U%!%$%k$r%U%!%$%s%I$7$?$j!"%;!<%V$7$?$j$9$k%3%^%s%I$O!"$3$l$^$G$N$b$N\e(B
-\e$B$H$O0c$$!"#2$D$NJ8;z$+$i$J$C$F$$$^$9!#\e(BC-x \e$B$KB3$$$FF~NO$9$kJ8;z$,!"%U%!%$%k\e(B
-\e$B$KBP$7$F9T$&A`:n$rI=$7$^$9!#\e(B
+\e$B%U%!%$%k$r3+$$$?$jJ]B8$7$?$j$9$k%3%^%s%I$O!"#2$D$NJ8;z$+$i@.$k$H$$$&E@\e(B
+\e$B$G:#$^$G3X$s$@B>$N%3%^%s%I$H$O0c$$$^$9!#N>J}$H$b!"\e(BControl-x \e$B$H$$$&J8;z\e(B
+\e$B$G;O$^$j$^$9!#\e(BControl-x \e$B$G;O$^$k%3%^%s%I$O$?$/$5$s$"$j$^$9!#B?$/$O%U%!\e(B
+\e$B%$%k!"%P%C%U%!$d$=$l$i$K4XO"$7$?$b$N$K4X78$7$?$3$H$r$7$^$9!#$3$l$i$N%3\e(B
+\e$B%^%s%I$O#2!"#3!"#4J8;z$G$9!#\e(B
- \e$B$b$&0l$D$3$l$^$G$N$b$N$H0c$&E@$O!"%U%!%$%s%I$N;~!"%U%!%$%kL>$r\e(BEmacs\e$B$K\e(B
-\e$BLd$o$l$^$9!#$3$N$3$H$r!"C<Kv$+$i0z?t$rFI$_9~$s$G$/$k%3%^%s%I$H8@$C$F$$$^$9!#\e(B
+\e$B%U%!%$%k$r3+$/$?$a$N%3%^%s%I$O$3$l$^$G3X$s$@$b$N$H$O0c$$!"%U%!%$%k$NL>\e(B
+\e$BA0$r;XDj$7$J$1$l$P$J$j$^$;$s!#$3$l$r!"%3%^%s%I$,!VC<Kv$+$i0z?t$rFI$_9~\e(B
+\e$B$`!W$H8@$$$^$9!#:#$N>l9g$O0z?t$O%U%!%$%kL>$G$9!#<!$N%3%^%s%I\e(B
-\e$BCm0U!'\e(B \e$B$3$N>l9g$O%U%!%$%kL>$G$9!#\e(B
+ C-x C-f Find a file
- C-x C-f \e$B%U%!%$%k$r8+$D$1$k!J%U%!%$%s%I$9$k!K\e(B
+\e$B$r%?%$%W$9$k$H!"\e(BXEmacs \e$B$O%U%!%$%kL>$rJ9$$$F$-$^$9!#%?%$%W$7$?%U%!%$%k\e(B
+\e$BL>$O2hLL$N:G2<9T$KI=<($5$l$^$9!#$3$N:G2<9T$O!"$3$&$$$&F~NO$N$?$a$K;H$C\e(B
+\e$B$F$$$k;~$O!"%_%K%P%C%U%!$H8F$S$^$9!#DL>o$NJT=8%3%^%s%I$G%U%!%$%kL>$rJT\e(B
+\e$B=8$9$k$3$H$b$G$-$^$9!#\e(B
- Emacs\e$B$O%U%!%$%kL>$rJ9$$$F$-$^$9!#$=$l$O!"2hLL$N2<$N9T$K8=$l$^$9!#%U%!\e(B
-\e$B%$%kL>$r;XDj$7$F$$$kItJ,$O!"%_%K%P%C%U%!$H8F$P$l$k$b$N$G$9!#%_%K%P%C%U%!$O\e(B
-\e$B$3$NMM$J;H$o$lJ}$r$7$^$9!#%U%!%$%kL>$KB3$$$F!"%j%?!<%s%-!<$r2!$9$H!"%_%K%P\e(B
-\e$B%C%U%!$KI=<($5$l$F$$$?FbMF$O$b$&I,MW$G$O$J$/$J$k$N$G>C$($F$7$^$$$^$9!#\e(B
+\e$B%U%!%$%kL>$NF~NOCf!J$"$k$$$O$=$NB>$N%_%K%P%C%U%!F~NOCf!K$K\e(B C-g \e$B$K$h$C\e(B
+\e$B$F%3%^%s%I$r%-%c%s%;%k$G$-$^$9!#\e(B
- >> C-x C-f\e$B$H%?%$%W$7$?8e$K\e(BC-g\e$B$H%?%$%W$7$F2<$5$$!#%_%K%P%C%U%!$NFbMF\e(B
- \e$B$r<h$j>C$7!"$^$?!"\e(BC-x C-f\e$B%3%^%s%I$b<h$j>C$7$^$9!#$H8@$&Lu$G!"2?$b\e(B
- \e$B%U%!%$%k$r8+$D$1$k$h$&$J$3$H$O$7$^$;$s!#\e(B
+>> C-x C-f \e$B$r%?%$%W$7$F$+$i\e(B C-g \e$B$r%?%$%W$7$F$_$^$7$g$&!#%_%K%P%C%U%!$,\e(B
+ \e$B<h$j>C$5$l!"$=$l$r;H$C$F$$$?%3%^%s%I\e(B C-x C-f \e$B<+BN$b<h$j>C$5$l$^$9!#\e(B
+ \e$B$@$+$i!"%U%!%$%k$O2?$b3+$+$l$^$;$s!#\e(B
- \e$B:#EY$O%U%!%$%k$r%;!<%V$7$F$_$^$7$g$&!#:#$^$G$NJQ99$rJ]B8$9$k$?$a$K$O<!\e(B
-\e$B$N$h$&$J%3%^%s%I$r;H$$$^$9!#\e(B
+\e$B%U%!%$%kL>$rF~NO$7$?$i!"\e(B<Return>\e$B%-!<$r%?%$%W$7F~NO$r40N;$5$;$^$9!#$=$&\e(B
+\e$B$9$k$H!"\e(BC-x C-f \e$B%3%^%s%I$,Av$j;O$a;XDj$7$?%U%!%$%k$r3+$-$^$9!#%_%K%P%C\e(B
+\e$B%U%!$O\e(B C-x C-f \e$B%3%^%s%I$N=*N;$H$H$b$K>C$($^$9!#\e(B
- C-x C-s \e$B%U%!%$%k$r%;!<%V$9$k\e(B
+\e$B%U%!%$%k$NFbMF$,2hLL$KI=<($5$l$k$H!"$=$NFbMF$rJQ99$9$k$3$H$,$G$-$^$9!#\e(B
+\e$B2C$($?JQ99$r915WE*$J$b$N$K$7$?$1$l$P!"<!$N%3%^%s%I$r%?%$%W$7$^$9!#\e(B
- Emacs\e$B$NFbMF$O%U%!%$%k$K=q$-=P$5$l$^$9!#%;!<%V$9$k;~!"%*%j%8%J%k$N\e(B
-\e$B%U%!%$%k$O?7$7$$L>A0$r$D$1$i$l$F;D$5$l$F$$$k$N$GFbMF$O<:$o$l$^$;$s!#$=\e(B
-\e$B$N?7$7$$L>A0$O%*%j%8%J%k$N%U%!%$%k$NL>A0$K\e(B'~'\e$B$r$D$1$?$b$N$G$9!#\e(B
+ C-x C-s Save the file
- \e$B%;!<%V$,=*$o$k$H!"\e(BEmacs\e$B$O%;!<%V$7$?%U%!%$%k$NL>A0$rI=<($7$^$9!#\e(B
+\e$B$3$l$O\e(B XEmacs \e$B$,J];}$7$F$$$kJ8>O$r%U%!%$%k$K%3%T!<$7$^$9!#=i$a$F$3$l$r\e(B
+\e$B<B9T$9$k$H$-$O!"85$N%U%!%$%k$r?7$7$$L>A0$KIU$1BX$($k$N$G!"$=$NFbMF$O<:\e(B
+\e$B$o$l$^$;$s!#$=$N?7$7$$L>A0$O85$N%U%!%$%k$NL>A0$N:G8e$K\e(B'~'\e$B$r$D$1$?$b$N\e(B
+\e$B$G$9!#\e(B
- >> C-x C-s\e$B$H%?%$%W$7$F%A%e!<%H%j%"%k$N%3%T!<$r%;!<%V$7$F2<$5$$!#$=$N\e(B
- \e$B;~!"2hLL$N2<$NJ}$K\e(B"Wrote ...../MULE.tut"\e$B$HI=<($5$l$^$9!#\e(B
+\e$B%;!<%V$,=*$o$k$H!"%;!<%V$7$?%U%!%$%k$NL>A0$,I=<($5$l$^$9!#3d$HIQHK$K%;!<\e(B
+\e$B%V$7$?J}$,NI$$$G$7$g$&!#%7%9%F%`$,Mn$A$F$b$;$C$+$/$N:n6H$,%Q%"$K$J$i$J\e(B
+\e$B$$$h$&$K!#\e(B
- \e$B?7$7$$%U%!%$%k$r:n$k;~!"$"$?$+$b0JA0$+$i$"$C$?%U%!%$%k$r%U%!%$%s%I$9$k\e(B
-\e$B$h$&$J%U%j$r$7$^$9!#$=$&$7$F!"$=$N%U%!%$%s%I$7$?%U%!%$%k$K%?%$%W$7$F$$$-$^\e(B
-\e$B$9!#\e(B
+>> C-x C-s \e$B$H%?%$%W$7$F$3$NF~Lg%,%$%I$N%3%T!<$r%;!<%V$7$F2<$5$$!#\e(B
+ \e$B2hLL:G2<CJ$K\e(B "Wrote ...TUTORIAL.ja" \e$B$HI=<($5$l$^$9!#\e(B
- \e$B%U%!%$%k$r%;!<%V$7$h$&$H$7$?;~$K=i$a$F!"\e(BEmacs\e$B$O:#$^$GJT=8$7$F$$$?FbMF\e(B
-\e$B$r%U%!%$%k$NCf$K=q$-9~$_$^$9!#\e(B
+\e$BCm0U!'%7%9%F%`$K$h$C$F$O\e(B C-x C-s \e$B$H%?%$%W$9$k$H2hLL$,F0$+$J$/$J$j\e(B
+XEmacs \e$B$,I=<($7$h$&$H$9$k$b$N$,2?$b2hLL$K=P$J$/$J$j$^$9!#$3$l$O!"%U%m!<\e(B
+\e$B%3%s%H%m!<%k$H8F$P$l$k#O#S$N5!G=$,\e(B C-s \e$B$rB*$(!"\e(BXEmacs \e$B$KEO$5$J$$$h$&$K\e(B
+\e$B$7$F$$$k$N$G$9!#$3$l$r2r=|$9$k$K$O\e(B C-q \e$B$r%?%$%W$7$^$9!#$=$l$+$i\e(B XEmacs
+\e$B%^%K%e%"%k$N\e(B "Spontaneous Entry to Incremental Search (\e$BCN$i$L4V$K%$%s\e(B
+\e$B%/%j%a%s%?%k%5!<%A$K$J$k\e(B)" \e$B$N@a$rFI$s$G$/$@$5$$!#$3$N$d$C$+$$$J#O#S$N\e(B
+\e$B5!G=$K$I$&BP=h$9$l$PNI$$$+$,:\$C$F$$$^$9!#\e(B
+\e$B4{B8$N%U%!%$%k$r3+$-!"FbMF$r8+!"JT=8$9$k$3$H$,$G$-$^$9!#B8:_$7$J$$%U%!\e(B
+\e$B%$%k$r3+$/$3$H$b$G$-$^$9!#\e(BXEmacs \e$B$G?7$7$$%U%!%$%k$r:n$k$K$O<!$N$h$&$K\e(B
+\e$B$7$^$9!#%U%!%$%k$r3+$-$^$9!#:G=i$O6u$C$]$G$9$M!#J8>O$rF~NO$7$F$$$-$^$9!#\e(B
+\e$B%U%!%$%k$r%;!<%V$7$h$&$H$7$?;~$K=i$a$F?7$7$$%U%!%$%k$,:n$i$l!":#$^$GF~\e(B
+\e$BNO$7$?FbMF$,$=$l$K=q$-9~$^$l$^$9!#$=$l0J9_$O!"$"$J$?$O4{B8$N%U%!%$%k\e(B
+\e$B!J$?$C$?:#:n$i$l$?%U%!%$%k!K$rJT=8$7$F$$$k$H;W$C$F2<$5$$!#\e(B
-\e$B%P%C%U%!\e(B
-========
- \e$B$b$7!"#2HVL\$N%U%!%$%k$r\e(B C-x C-f \e$B$G<h$j=P$9$H!"#1HVL\$N%U%!%$%k$O\e(BEmacs
-\e$BFbIt$K;D$j$^$9!#\e(BEmacs\e$BFbIt$K$"$k%U%!%$%k$+$i%F%-%9%H$rFI$_9~$s$GJ]B8$7$F$$$k\e(B
-\e$B$b$N$O%P%C%U%!$H8F$P$l$^$9!#%U%!%$%k$N<h$j=P$7$O!"\e(BEmacs\e$BFbIt$K?7$7$$%P%C%U%!\e(B
-\e$B$r:n$j$^$9!#\e(B
+\e$B!v%P%C%U%!\e(B
+==========
- Emacs\e$B$NCf$KJ]B8$7$F$$$k%P%C%U%!$N%j%9%H$r8+$k$K$O!"<!$N$h$&$K%?%$%W$7\e(B
-\e$B$^$9!#\e(B
+\e$B#2$DL\$N%U%!%$%k$r\e(B C-x C-f \e$B$G3+$$$F$b!":G=i$N%U%!%$%k$O\e(B XEmacs \e$BFbIt$K\e(B
+\e$B;D$C$?$^$^$G$9!#$=$C$A$N%U%!%$%k$KLa$k$K$O$b$&0lEY\e(B C-x C-f \e$B$G$=$N%U%!\e(B
+\e$B%$%k$r3+$1$P$h$$$N$G$9!#$3$&$d$C$F!"4v$D$b$N%U%!%$%k$r\e(B XEmacs \e$B$G3+$/$3\e(B
+\e$B$H$,$G$-$^$9!#\e(B
- C-x C-b
+>> "foo" \e$B$H$$$&L>$N%U%!%$%k$r:n$j$^$7$g$&!#\e(BC-x C-f foo <Return> \e$B$G$9!#\e(B
+ \e$B2?$+J8>O$rF~$l!"JT=8$7!"\e(BC-x C-s \e$B$G\e(B "foo" \e$B$r%;!<%V$7$F2<$5$$!#\e(B
+ \e$B:G8e$K\e(B C-x C-f TUTORIAL.ja <Retrun> \e$B$H%?%$%W$7\e(B
+ \e$BF~Lg%,%$%I$KLa$j$^$7$g$&!#\e(B
+
+XEmacs \e$B$O%U%!%$%k$NFbMF$r%P%C%U%!!J\e(Bbuffer\e$B!K$H8F$P$l$k$b$N$NCf$K3JG<$7\e(B
+\e$B$F$$$^$9!#%U%!%$%k$r3+$/$H?7$7$$%P%C%U%!$,$G$-$^$9!#\e(BXEmacs \e$B$,8=:_;}$C\e(B
+\e$B$F$$$k%P%C%U%!$N%j%9%H$r8+$k$K$O!"<!$N$h$&$K%?%$%W$7$^$9!#\e(B
- >> C-x C-b \e$B$H%?%$%W$7$J$5$$!#$=$l$>$l$N%P%C%U%!$,$I$N$h$&$KL>A0$r;}\e(B
- \e$B$C$F$$$k$+!"$=$7$F!"$I$N$h$&$J%U%!%$%kL>$r$D$1$F$$$k$N$+4Q;!$7$J\e(B
- \e$B$5$$!#\e(B
+ C-x C-b List buffers
- \e$B%P%C%U%!$K$O%U%!%$%k$H0lCW$J$$$b$N$b$"$j$^$9!#$?$H$($P!"\e(B
-"*Buffer List*" \e$B$H$$$&%U%!%$%k$O$"$j$^$;$s!#$3$l$O\e(B C-x C-b \e$B$K$h$C$F:n$i$l\e(B
-\e$B$?%P%C%U%!%j%9%H$KBP$7$F$N%P%C%U%!$G$9!#\e(B
+>> C-x C-b \e$B$r;n$7$F$_$^$7$g$&!#\e(B
- \e$B$"$J$?$,8+$F$$$k\e(BEmacs\e$B%&%#%s%I%&Fb$K$"$k!"$I$s$J%F%-%9%H$G$b!"$$$:$l$+\e(B
-\e$B$N%P%C%U%!Fb$K$"$j$^$9!#\e(B
+\e$B3F%P%C%U%!$,$I$s$JIw$KL>A0$d$=$l$,3+$$$F$$$k%U%!%$%k$KBP$9$k%U%!%$%kL>\e(B
+\e$B$r;}$C$F$$$k$+8+$F2<$5$$!#%U%!%$%k$r3+$$$F$$$J$$%P%C%U%!$b$"$j$^$9!#$?\e(B
+\e$B$H$($P!"\e(B"*Buffer List*" \e$B$H$$$&L>$N%P%C%U%!$O$I$s$J%U%!%$%k$b3+$$$F$$$^\e(B
+\e$B$;$s!#$3$l$O%P%C%U%!$N%j%9%H$rFbMF$H$9$k%P%C%U%!$G!"\e(BC-x C-b \e$B$G:n$i$l$?\e(B
+\e$B$b$N$G$9!#\e(BXEmacs \e$B$N%&%#%s%I%&Fb$K$"$k%F%-%9%H$O$I$l$b!"$$$:$l$+$N%P%C\e(B
+\e$B%U%!$N0lIt$G$9!#\e(B
- >> \e$B%P%C%U%!%j%9%H$r>C$9$?$a\e(B C-x 1 \e$B$H%?%$%W$7$J$5$$!#\e(B
+>> C-x 1 \e$B$H%?%$%W$7$F%P%C%U%!%j%9%H$r>C$7$^$7$g$&!#\e(B
- \e$B$b$7!"$"$k%U%!%$%k$N%F%-%9%H$KJQ99$r9T$J$C$F$+$i!"B>$N%U%!%$%k$r<h$j=P\e(B
-\e$B$7$?$H$7$?$i!":G=i$N%U%!%$%k$O%;!<%V$5$l$F$$$^$;$s!#$=$NJQ99$O\e(BEmacs\e$BFbIt$N%U\e(B
-\e$B%!%$%k$HBP1~$9$k%P%C%U%!$NCf$@$1$K9T$J$o$l$F$$$^$9!#\e(B
+\e$B$"$k%U%!%$%k$NFbMF$K$J$s$i$+$NJQ99$r2C$(!"$=$l$+$iB>$N%U%!%$%k$r3+$$$F\e(B
+\e$B$b!":G=i$N%U%!%$%k$O$^$@%;!<%V$5$l$^$;$s!#JQ99$O\e(B XEmacs \e$B$NFbIt!"$=$N%U%!\e(B
+\e$B%$%k$KBP1~$9$k%P%C%U%!$NCf$K;D$C$?$^$^$G$9!##2HVL\$N%U%!%$%k$N%P%C%U%!\e(B
+\e$B$r:n$C$?$j!"JT=8$7$?$j$7$F$b!":G=i$N%U%!%$%k$N%P%C%U%!$K$O2?$N1F6A$b$"\e(B
+\e$B$j$^$;$s!#$3$l$O$H$F$bLr$KN)$A$^$9$,!":G=i$N%U%!%$%k$N%P%C%U%!$r%;!<%V\e(B
+\e$B$9$k2?$+JXMx$JJ}K!$,I,MW$@$H$$$&$3$H$G$b$"$j$^$9!#\e(B C-x C-s \e$B$G%;!<%V$9\e(B
+\e$B$k$?$a$K\e(B C-x C-f \e$B$G85$N%P%C%U%!$KLa$k$N$O$OLq2p$G$9!#$=$3$G<!$N%3%^%s\e(B
+\e$B%I$r;H$$$^$9!#\e(B
- \e$B#2HVL\$N%U%!%$%k$KBP1~$9$k%P%C%U%!$r:n$C$?$j!"%(%G%#%C%H$7$?$j$7$F$b!"\e(B
-\e$B#1HVL\$N%U%!%$%k$KBP1~$9$k%P%C%U%!$K$O2?$b1F6A$rM?$($^$;$s!#$3$l$O$H$F$b;H\e(B
-\e$B$$0W$/!"$^$?!"#1HVL\$N%U%!%$%k$KBP1~$9$k%P%C%U%!$r<h$C$F$*$/$?$a$KLr$KN)$D\e(B
-\e$BJ}K!$G$9!#\e(B
+ C-x s \e$B2?$l$+$N%P%C%U%!$r%;!<%V$9$k\e(B
- C-x C-s \e$B$G%P%C%U%!$r%;!<%V$9$k$?$a$K\e(B C-x C-f \e$B$G%P%C%U%!$r@Z$jBX$($k$N\e(B
-\e$B$OLq2p$G$9!#$=$3$G<!$N%3%^%s%I$r;H$$$^$9!#\e(B
+C-x s \e$B$O!"$^$@%;!<%V$7$F$$$J$$JQ99$,$"$k%P%C%U%!$=$l$>$l$K$D$$$F!"$=$l\e(B
+\e$B$r%;!<%V$9$k$+$I$&$+$rJ9$$$F$-$^$9!#\e(B
- C-x s \e$B8=:_$"$k%P%C%U%!$r%;!<%V$9$k!#\e(B
+>> \e$B0l9T%F%-%9%H$rF~NO$7$F$+$i\e(B C-x s \e$B$H%?%$%W$7$F2<$5$$!#\e(B
+ TUTORIAL.ja \e$B$H$$$&%P%C%U%!$r%;!<%V$9$k$+$I$&$+J9$$$F$/$k$O$:$G$9!#\e(B
+ \e$B!V$O$$!W$HEz$($k$?$a$K\e(B "y" \e$B$H%?%$%W$7$F2<$5$$!#\e(B
- C-x s \e$B$OFbMF$rJQ$($?%P%C%U%!A4$F$r%U%!%$%k$K%;!<%V$7$^$9!#$3$N;~!"$R$H\e(B
-\e$B$D$R$H$D$N\e(B(\e$B%;!<%V$5$l$k$Y$-\e(B)\e$B%P%C%U%!$KBP$7$F!"%;!<%V$9$k$+!"$7$J$$$+$r\e(By\e$B$+\e(Bn
-\e$B$GLd$o$l$^$9!#$3$NI=<($O2hLL$N2<$N9T$KI=<($5$l$^$9!#Nc$($P!"$3$N$h$&$K$G$9!#\e(B
+\e$B!v%a%K%e!<$r;H$&\e(B
+----------------
- Save file /usr/private/yours/MULE.tut? (y or n)
+\e$B$b$7\e(B X \e$BC<Kv$r;H$C$F$$$l$P!"\e(BXEmacs \e$B$N2hLL$N:G>eIt$K%a%K%e!<%P!<$,$"$k$3\e(B
+\e$B$H$K5$IU$/$G$7$g$&!#$3$N%a%K%e!<%P!<$r;H$C$F!V%U%!%$%k$r3+$/!W$H$$$&$h\e(B
+\e$B$&$J$[$H$s$I$N$h$/;H$&\e(B XEmacs \e$B$N%3%^%s%I$r;HMQ$9$k$3$H$,$G$-$^$9!#FCDj\e(B
+\e$B$N%3%^%s%I$r;HMQ$9$k$?$a$NBG80$r3P$($J$/$F$h$$$N$G!":G=i$O$3$NJ}$,4JC1\e(B
+\e$B$K;W$($k$G$7$g$&!#\e(BXEmacs \e$B$K47$l$F$/$k$K$7$?$,$C$F!"%-!<%\!<%I$N%3%^%s\e(B
+\e$B%I$r;H$&$3$H$,4JC1$K$J$C$F$/$k$G$7$g$&!#BP1~$9$k%-!<%\!<%I%3%^%s%I$,%3\e(B
+\e$B%^%s%I$N<!$K=q$+$l$F$$$k$+$i$G$9!#\e(B
+\e$B%a%K%e!<%P!<$K$O%-!<%\!<%I$G40A4$KF1Ey$KBP1~$9$k$b$N$,L5$$9`L\$,B?$/$"\e(B
+\e$B$j$^$9!#Nc$($P!"\e(BBuffers \e$B%a%K%e!<$O:G6a;H$o$l$?=g$KA*Br2DG=$J%P%C%U%!$N\e(B
+\e$B0lMw$rI=<($7$^$9!#C1$K\e(B Buffers \e$B%a%K%e!<$GL>A0$r8+$D$1$FA*Br$9$k$@$1$G\e(B
+\e$B$I$N%P%C%U%!$K$G$b0\F0$G$-$^$9!#\e(B
-\e$B%3%^%s%I$N3HD%\e(B
-==============
+\e$B!v%^%&%9$r;H$&\e(B
+--------------
+
+X \e$B$N2<$G<B9T$5$l$F$$$k$H$-$O!"\e(BXEmacs \e$B$O40A4$K%^%&%95!G=$H0lBN2=$7$F$$\e(B
+\e$B$^$9!#K>$_$N>l=j$G:8%\%?%s$r%/%j%C%/$9$k$3$H$G%F%-%9%H$N%+!<%=%k$r0\F0\e(B
+\e$B$9$k$3$H$,$G$-!"A*Br$7$?$$%F%-%9%H$r:8%^%&%9%\%?%s$G%I%i%C%0$9$k$3$H$G\e(B
+\e$B%F%-%9%H$rA*Br$9$k$3$H$,$G$-$^$9!#!J$b$7$/$O!"$=$NBe$o$j$K%F%-%9%H$rA*\e(B
+\e$BBr$9$k$?$a$K0lJ}$NC<$G:8%^%&%9%\%?%s$r%/%j%C%/$7!"B>$NC<$K0\F0$7$F\e(B
+Shift \e$B$r2!$7$J$,$i%/%j%C%/$9$k$3$H$,$G$-$^$9!#!K\e(B
+
+\e$BA*Br$7$?%F%-%9%H$r>C5n\e(B \e$B!J\e(Bkill\e$B!K\e(B \e$B$9$k$?$a$K$O!"\e(BC-w \e$B$+!"\e(BEdit \e$B%a%K%e!<$N\e(B
+Cut \e$B9`L\$r;H$($^$9!#$3$l$i$OEy2A$G$O\e(B*\e$BL5$$\e(B*\e$B$3$H$KCm0U$7$F$/$@$5$$\e(B: C-w
+\e$B$O\e(BXEmacs \e$B$NFbIt$N$_$K%F%-%9%H$rJ]B8$7$^$9$,!J>e$G@bL@$7$?\e(B C-k \e$B$H;w$F$$\e(B
+\e$B$^$9!K!"\e(BCut \e$B$O$3$l$H$H$b$K%F%-%9%H$rB>$N%"%W%j%1!<%7%g%s$,;HMQ2DG=$J\e(B X
+\e$B$N%/%j%C%W%\!<%I$K$bF~$l$^$9!#\e(B
- \e$B%(%G%#%?$K$O!"%3%s%H%m!<%k!&%-!<$d%a%?!&%-!<$GF~NO$G$-$k$b$N$h$j$b$:$C\e(B
-\e$B$HB?$/$N%3%^%s%I$,$"$j$^$9!#$3$l$i$r07$&$?$a$K!"3HD%!J\e(BeXtend\e$B!K%3%^%s%I$r\e(B
+X \e$B$N%/%j%C%W%\!<%I$+$i%F%-%9%H$r<hF@$9$k$K$O!"\e(BEdit \e$B%a%K%e!<$N\e(B Paste \e$B9`\e(B
+\e$BL\$r;H$C$F$/$@$5$$!#\e(B
+
+\e$B??Cf$N%^%&%9$N%\%?%s$OIaDL$O2hLL$G8+$($F$$$k$b$N$rA*Br$9$k$?$a$K;H$o$l\e(B
+\e$B$^$9!#Nc$($P!"\e(BInfo\e$B!J%*%s%i%$%s\e(B XEmacs \e$B@bL@J8=q!K$K\e(B C-h i \e$B$+\e(B Help \e$B%a%K%e!<\e(B
+\e$B$r;H$C$FF~$l$P!"%O%$%i%$%H$5$l$?%j%s%/$r??Cf$N%\%?%s$r2!$9$3$H$GDI$&$3\e(B
+\e$B$H$,$G$-$^$9!#F1MM$K!"%U%!%$%kL>$rF~NO$7$F$$$k$H$-$K!JNc$($P!"!V%U%!%$\e(B
+\e$B%k$r3+$/!W$GF~NO$rB%$5$l$?$H$-!K\e(B TAB \e$B$GJd408uJd$rI=<($5$;$k$H!"8uJd$N\e(B
+\e$B0l$D$rA*Br$9$k$?$a$K??Cf$N%\%?%s$G%/%j%C%/$9$k$3$H$,$G$-$^$9!#\e(B
+
+\e$B1&$N%^%&%9$N%\%?%s$O%]%C%W%"%C%W%a%K%e!<$rI=<($7$^$9$3$N%a%K%e!<$NFbMF\e(B
+\e$B$O:#$N%b!<%I$K0MB8$7!"IaDL$O;HMQ$70W$$$h$&$K#2!"#3$NNI$/;H$o$l$k%3%^%s\e(B
+\e$B%I$r4^$s$G$-$^$9!#\e(B
+
+>> \e$B1&%^%&%9%\%?%s$r2!$7$F$/$@$5$$!#\e(B
+
+\e$B%a%K%e!<$rI=<($5$;B3$1$k$?$a$K$O%\%?%s$r2!$7B3$1$kI,MW$,$"$j$^$9!#\e(B
+
+
+\e$B!v%3%^%s%I$N3HD%\e(B
+================
+
+XEmacs \e$B$K$O!"%3%s%H%m!<%kJ8;z$d%a%?J8;z$K3dEv$i$l$k$h$j$b$:$C$H$:$C$H\e(B
+\e$BB?$/$N%3%^%s%I$,$"$j$^$9!#$3$l$i$r07$&$?$a$K!"3HD%!J\e(BeXtend\e$B!K%3%^%s%I$r\e(B
\e$B;H$$$^$9!#$=$l$K$O!"0J2<$N#2$D$N<oN`$,$"$j$^$9!#\e(B
C-x \e$BJ8;z$K$h$k3HD%!#B3$1$F0lJ8;z$rF~NO$7$^$9!#\e(B
ESC x \e$BL>A0$K$h$k3HD%!#B3$1$F%3%^%s%I$NL>A0$rF~NO$7$^$9!#\e(B
- \e$B$3$l$i$O0lHL$K!"JXMx$@$1$l$I$b!"$3$l$^$G8+$F$-$?$b$N$[$IIQHK$K$OMQ$$$i\e(B
-\e$B$l$J$$%3%^%s%I$N$?$a$N$b$N$G$9!#\e(BC-x C-f \e$B!J%U%!%$%s%I!K$d\e(B C-x C-s\e$B!J%;!<%V!K\e(B
-\e$B$O$3$NCg4V$G$9!#B>$K!"\e(BC-x C-c\e$B!J%(%G%#%?$N=*N;!K$b$=$&$G$9!#\e(B
+\e$B$3$l$i$O!"0lHLE*$K$OJXMx$@$1$l$I$b!"$3$l$^$G8+$F$-$?$b$N$[$I$OIQHK$KMQ\e(B
+\e$B$$$i$l$J$$%3%^%s%I$G$9!#\e(BC-x C-f \e$B!J%U%!%$%k$r3+$/!K$d\e(B C-x C-s\e$B!J%U%!%$%k\e(B
+\e$B$r%;!<%V!K$O$3$NCg4V$G$9!#B>$K!"\e(BC-x C-c\e$B!J\e(BXEmacs \e$B$r=*N;!K$b$=$&$G$9!#\e(B
+C-x C-c \e$B$K4X$7$F$O!"$=$l$^$G$K2C$($?JQ99$,L5$/$J$k$N$r?4G[$9$kI,MW$O$"\e(B
+\e$B$j$^$;$s!#\e(BXEmacs \e$B$r=*N;$5$;$kA0$KJQ99$5$l$?3F%U%!%$%k$r%;!<%V$9$k$+$I\e(B
+\e$B$&$+J9$$$F$-$^$9$+$i!#\e(B
- C-z\e$B$O\e(BEmacs\e$B$rH4$1$k$N$KNI$/;H$o$l$kJ}K!$G$9!#\e(BEmacs\e$B$r=*N;$9$k$3$H$J$/!"\e(B
-\e$B0lC6!"\e(Bcsh\e$B$N%l%Y%k$KLa$k$K$O0lHVNI$$J}K!$H8@$($k$G$7$g$&!#\e(BC-z\e$B$r9T$J$o$l$F$b\e(B
-Emacs\e$B$O%9%H%C%W$7$F$$$k$@$1$G!"FbMF$,GK2u$5$l$k$H$$$&$3$H$O$"$j$^$;$s!#\e(B
+C-z \e$B$O!V0l;~E*$K!W\e(B XEmacs \e$B$rH4$1$k%3%^%s%I$G$9!#$^$?F1$8\e(B XEmacs \e$B%;%C%7%g\e(B
+\e$B%s$KLa$k$3$H$,$G$-$^$9!#\e(B
-\e$BCm0U\e(B: \e$B$?$@$7\e(BX-window\e$B$G9T$J$C$F$$$k>l9g!"$b$7$/$O;HMQ$7$F$$$k%7%'%k\e(B
- \e$B$,\e(Bsh\e$B$N;~$O!"$3$N8B$j$G$O$"$j$^$;$s!#\e(B
+\e$B$=$l$,$G$-$k%7%9%F%`>e$J$i!"\e(BC-z \e$B$O\e(B XEmacs \e$B$r!VCfCG!W$5$;$^$9!#$D$^$j\e(B
+XEmacs \e$B$r=*N;$9$k$3$H$J$/!"%3%^%s%I%7%'%k$KLa$k$3$H$,$G$-$^$9!#BgJ}$N\e(B
+\e$BI8=`E*$J%7%'%k$J$i!"\e(B`fg' \e$B%3%^%s%I$b$7$/$O\e(B `%emacs' \e$B$K$h$C$F\e(B XEmacs \e$B$r\e(B
+\e$B:F3+$G$-$^$9!#\e(B
+\e$B!VCfCG!W5!G=$r<BAu$7$F$$$J$$%7%9%F%`$G$O!"\e(BC-z \e$B$O\e(B XEmacs \e$B$N2<$GAv$k%5%V\e(B
+\e$B%7%'%k$r:n$j!"B>$N%W%m%0%i%`$rAv$i$;$F$+$i$^$?\e(B XEmacs \e$B$KLa$k$3$H$,$G$-\e(B
+\e$B$k$h$&$K$7$^$9!#$3$N>l9gK\Ev$K\e(B XEmacs \e$B$+$iH4$1=P$k$o$1$G$O$"$j$^$;$s$N\e(B
+\e$B$G!"%7%'%k%3%^%s%I$N\e(B `exit' \e$B$,$=$N%5%V%7%'%k$+$i\e(B XEmacs \e$B$KLa$kIaDL$N$d\e(B
+\e$B$jJ}$G$9!#\e(B
- C-x \e$B%3%^%s%I$O!"$?$/$5$s$"$j$^$9!#$9$G$K3X$s$@$b$N$O0J2<$N$b$N$G$9!#\e(B
+C-x C-c \e$B$O%m%0%"%&%H$7$h$&$H;W$&;~$K;H$&$b$N$G$9!#%a!<%k%D!<%k!J\e(Bmail
+\e$B%3%^%s%IEy!K$d$=$NB>$NMM!9$J%"%W%j%1!<%7%g%s%W%m%0%i%`$,5/F0$7$?\e(B
+XEmacs \e$B$+$iH4$1=P$k>l9g$K;H$&$N$b@5$7$$;H$$J}$G$9!#$3$l$i$N%W%m%0%i%`\e(B
+\e$B$O\e(B XEmacs \e$B$NCfCG$K$I$&BP=h$7$FNI$$$+CN$i$J$$$G$7$g$&$+$i!#$7$+$7$J$,$i!"\e(B
+\e$BIaDL$N>l9g$O!"%m%0%"%&%H$7$h$&$7$J$$8B$j$O\e(B XEmacs \e$B$r=*N;$5$;$k$h$j$O\e(B
+C-z \e$B$GCfCG$5$;$kJ}$,NI$$$G$7$g$&!#\e(B
- C-x C-f \e$B%U%!%$%k$NJT=8!J\e(BFind\e$B!K\e(B
- C-x C-s \e$B%U%!%$%k$NJ]B8!J\e(BSave\e$B!K\e(B
- C-x C-b \e$B%P%C%U%!%j%9%H$NI=<(\e(B
- C-x C-c \e$B%(%G%#%?$r=*N;$9$k!#%U%!%$%k$NJ]B8$O!"<+F0E*$K$O9T$o$l$^$;\e(B
- \e$B$s!#$7$+$7!"$b$7%U%!%$%k$,JQ99$5$l$F$$$l$P!"%U%!%$%k$NJ]B8\e(B
- \e$B$r$9$k$N$+$I$&$+$rJ9$$$F$-$^$9!#J]B8$7$F=*N;$9$kIaDL$NJ}K!\e(B
- \e$B$O!"\e(BC-x C-s C-x C-c \e$B$H$9$k$3$H$G$9!#\e(B
+C-x \e$B%3%^%s%I$O$?$/$5$s$"$j$^$9!#$3$l$^$G$K!"0J2<$r3X$S$^$7$?!#\e(B
- \e$BL>A0$K$h$k3HD%%3%^%s%I$K$O!"$"$^$j;H$o$l$J$$$b$N$d!"FCDj$N%b!<%I$G$7$+\e(B
-\e$B;H$o$J$$$b$N$J$I$,$"$j$^$9!#Nc$H$7$F!"\e(B"command-apropos" \e$B$r$H$j$"$2$^$9!#$3\e(B
-\e$B$N%3%^%s%I$O%-!<%o!<%I$rF~NO$5$;!"$=$l$K%^%C%A$9$kA4$F$N%3%^%s%I$NL>A0$rI=\e(B
-\e$B<($7$^$9!#\e(BESC x \e$B$H%?%$%W$9$k$H!"%9%/%j!<%s$N2<$K\e(B "M-x" \e$B$,I=<($5$l$^$9!#$3$l\e(B
-\e$B$KBP$7$F!"<B9T$9$k%3%^%s%I$NL>A0!J:#$N>l9g!"\e(B"command-apropos"\e$B!K$rF~NO$7$^$9!#\e(B
-"command-a" \e$B$^$GF~NO$7$?8e%9%Z!<%9$rF~$l$l$P!"8e$NItJ,$O<+F0E*$KJd$o$l$^$9!#\e(B
-\e$B$3$N8e!"%-!<%o!<%I$rJ9$+$l$^$9$+$i!"CN$j$?$$J8;zNs$r%?%$%W$7$^$9!#$J$*!"%-!<\e(B
-\e$B%o!<%I$rF~$l$J$$$H!"A4$F$N%3%^%s%I$,I=<($5$l$^$9!#\e(B
+ C-x C-f \e$B%U%!%$%k$r3+$/!J\e(BFind\e$B!K\e(B
+ C-x C-s \e$B%U%!%$%k$N%;!<%V!J\e(BSave\e$B!K\e(B
+ C-x C-b \e$B%P%C%U%!$N%j%9%H%"%C%W\e(B
+ C-x C-c XEmacs \e$B$r=*N;\e(B
+ C-x u \e$B<h$j>C$7\e(B
- >> ESC x \e$B$r%?%$%W$7!"B3$1$F!"\e(B"command-apropos<Return>" \e$B$"$k$$$O\e(B
- "command-a<Space><Return>" \e$B$H%?%$%W$7$^$9!#<!$K!"\e(B"kanji<Return>"
- \e$B$H%?%$%W$7$^$9!#\e(B
+\e$BL>A0$K$h$k3HD%%3%^%s%I$K$O!"$"$^$j;H$o$J$$$b$N$d!"FCDj$N%b!<%I$G$7$+;H\e(B
+\e$B$o$J$$$b$N$,$"$j$^$9!#$?$H$($P\e(B replace-string \e$B$G$9$,!"$3$l$OJ8;zNs$rCV\e(B
+\e$B49$9$k$b$N$G$9!#\e(BM-x \e$B$r%?%$%W$9$k$H!"\e(BXEmacs \e$B$O2hLL$N:G2<9T$K\e(B M-x \e$B$HI=<(\e(B
+\e$B$7F~NO$rB%$9$N$G!"$=$3$K%3%^%s%I$NL>A0!J$3$N>l9g\e(B "replace-string"\e$B!K$r\e(B
+\e$BF~$l$J$1$l$P$J$j$^$;$s!#\e(B"repl s<TAB>" \e$B$H$@$1%?%$%W$9$k$H\e(B XEmacs \e$B$,%3%^\e(B
+\e$B%s%IL>$rJd40$7$F$/$l$^$9!#%3%^%s%IL>$rF~$l$?$i\e(B <Return> \e$B$rBG$C$F2<$5$$!#\e(B
- \e$B8=$l$?!V%&%#%s%I%&!W$r>C$9$K$O!"\e(BC-x 1 \e$B$H%?%$%W$7$^$9!#\e(B
+"Replace string" \e$B%3%^%s%I$K$O0z?t$,Fs$DI,MW$G$9!#$I$NJ8;zNs$r$I$&CV49\e(B
+\e$B$9$k$+$G$9!#3F0z?t$rF~NO$9$k$?$S$K\e(B <Return> \e$B$rBG$C$F2<$5$$!#\e(B
-\e$B%b!<%I%i%$%s\e(B
-============
- \e$B$b$7$f$C$/$j$H%3%^%s%I$rBG$C$?$J$i$P!"2hLL$N2<Dl$N%(%3!<%(%j%"$H8F$P$l\e(B
-\e$B$k>l=j$KBG$C$?$b$N$,I=<($5$l$^$9!#%(%3!<%(%j%"$O2hLL$N\e(B1\e$B$P$s2<$N9T$G$9!#$=$N\e(B
-\e$B$9$0>e$N9T$O!"%b!<%I%i%$%s$H8F$P$l$F$$$^$9!#%b!<%I%i%$%s$O$3$s$JIw$KI=<($5\e(B
-\e$B$l$F$$$k$G$7$g$&!#\e(B
+>> \e$B%+!<%=%k$r$3$3$+$i#29T2<$N6u9T$K0\F0$5$;$F2<$5$$!#\e(B
+ M-x repl s<Return>changed<Return>Altered<Return> \e$B$H%?%$%W$7$^$7$g$&!#\e(B
- [--]J:--**-Mule: MULE.tut (Fundamental) ---NN%--------------
+ \e$B$3$N9T$,$I$&JQ$o$k$+\e(B(changed)\e$B8+$^$7$g$&!#$"$J$?$O%+!<%=%k0J9_A4It$N\e(B
+ c-h-a-n-g-e-d \e$B$H$$$&8l$r\e(B "altered" \e$B$KJQ$($?$N$G$9!#\e(B
-\e$BCm0U\e(B: NN%\e$B$N\e(BNN\e$B$O?t;z$,F~$C$F$$$^$9!#$"$J$?$,;H$C$F$$$k\e(BEmacs\e$B$N%b!<\e(B
- \e$B%I%i%$%s$H0c$&$+$bCN$l$J$$$1$I!"92$F$J$$$h$&$K!#Nc$($P!";~4V\e(B
- \e$B$d\e(Buptime\e$B$,I=<($5$l$F$$$k$N$O!"\e(Bdisplay-time\e$B$H$$$&5!G=$,F0$$$F\e(B
- \e$B$$$k$+$i$G$9!#\e(B
+\e$B!v<+F0%;!<%V\e(B
+============
- \e$B$3$N9T$K$h$C$FB?$/$NM-MQ$J>pJs$,F@$i$l$^$9!#\e(B
+\e$B%U%!%$%k$KJQ99$r2C$($F$^$@%;!<%V$7$F$$$J$$>l9g!"$=$l$i$NJQ99$O7W;;5!$,\e(B
+\e$B%/%i%C%7%e$9$k$H<:$o$l$F$7$^$&2DG=@-$,$"$j$^$9!#$=$&$$$&;vBV$rHr$1$k$?\e(B
+\e$B$a!"JT=8Cf$N3F%U%!%$%k$K$D$$$F<+F0%;!<%V%U%!%$%k$,Dj4|E*$K=q$+$l$^$9!#\e(B
+\e$B<+F0%;!<%V%U%!%$%k$OF,$H$*?,$K\e(B # \e$B$,IU$$$F$$$^$9!#Nc$($P\e(B "hello.c" \e$B$H$$\e(B
+\e$B$&%U%!%$%k$N<+F0%;!<%V%U%!%$%k$O\e(B "#hello.c#" \e$B$G$9!#DL>o$NJ}K!$G%U%!%$\e(B
+\e$B%k$r%;!<%V$7$?$H$-$K!"$=$&$$$&<+F0%;!<%V%U%!%$%k$O>C$5$l$^$9!#\e(B
+\e$B7W;;5!$,%/%i%C%7%e$7$?>l9g!"<+F0%;!<%V$5$l$?JT=8$r2sI|$5$;$k$3$H$,$G$-\e(B
+\e$B$^$9!#IaDL$K%U%!%$%k!JJT=8$7$F$$$?$b$N$G!"<+F0%;!<%V%U%!%$%k$8$c$"$j$^\e(B
+\e$B$;$s!K$r3+$-!"$=$l$+$i\e(B M-x recover file<Return> \e$B$H%?%$%W$9$k$N$G$9!#3N\e(B
+\e$BG'$r5a$a$F$-$^$9$N$G!"\e(Byes<Return> \e$B$H%?%$%W$7<+F0%;!<%V$5$l$?%G!<%?$r2s\e(B
+\e$BI|$7$^$9!#\e(B
- \e$B:#!"$"$J$?$,8+$F$$$k%U%!%$%kL>$rI=<($7$F$$$^$9!#\e(BNN%\e$B$O8=:_%9%/%j!<%s>e\e(B
-\e$B$K%U%!%$%k$N0lHV>e$+$i2?%Q!<%;%s%HL\$,I=<($5$l$F$$$k$+$r<($7$F$$$^$9!#%U%!\e(B
-\e$B%$%k$N0lHV:G=i$rI=<($7$F$$$k$J$i$P!"\e(B--Top--\e$B$HI=<($5$l$F$^$9!#%U%!%$%k$N0lHV\e(B
-\e$B:G8e$rI=<($7$F$$$k$J$i$P!"\e(B--Bot--\e$B$HI=<($5$l$^$9!#2hLL$NCf$K%U%!%$%k$NA4$F$,\e(B
-\e$BI=<($5$l$F$$$k$J$i$P!"\e(B--All--\e$B$HI=<($5$l$^$9!#\e(B
- \e$B%b!<%I%i%$%s$N>.3g8L$NCf$O!":#$I$s$J%b!<%I$KF~$C$F$$$k$+$r<($7$F$$$^$9!#\e(B
-\e$B8=:_$O!"%G%U%)%k%H$N\e(BFundamental\e$B$KF~$C$F$$$^$9!#$3$l$b%a%8%c!<%b!<%I$N0lNc$G\e(B
-\e$B$9!#\e(B
+\e$B!v%(%3!<%(%j%"\e(B
+==============
- Emacs\e$B$O\e(BLisp mode\e$B$d\e(BText mode\e$B$N$h$&$J$3$H$J$k%W%m%0%i%`8@8l$d%F%-%9%H$K\e(B
-\e$BBP$7$F%(%G%#%C%H$r9T$&$?$a$N4v$D$+$N%a%8%c!<%b!<%I$r;}$C$F$$$^$9!#$I$s$J;~\e(B
-\e$B$G$bI,$:$$$:$l$+$N%a%8%c!<%b!<%I$N>uBV$K$J$C$F$$$^$9!#\e(B
+\e$B$b$7$f$C$/$j$H%3%^%s%I$rBG$C$?$J$i$P!"2hLL$N2<$N%(%3!<%(%j%"$H8F$P$l\e(B
+\e$B$k>l=j$KBG$C$?$b$N$,I=<($5$l$^$9!#%(%3!<%(%j%"$O2hLL$N:G2<9T$G$9!#\e(B
- \e$B$=$l$>$l$N%a%8%c!<%b!<%I$O4v$D$+$N%3%^%s%I$rA4$/0c$&?6$kIq$$$K$7$F$7$^\e(B
-\e$B$$$^$9!#Nc$r>e$2$F$_$^$7$g$&!#%W%m%0%i%`$NCf$K%3%a%s%H$r:n$k%3%^%s%I$,$"$j\e(B
-\e$B$^$9!#%3%a%s%H$r$I$NMM$J7A<0$K$9$k$+$O!"3F%W%m%0%i%`8@8l$K$h$C$F0c$$$^$9$,!"\e(B
-\e$B$=$l$>$l$N%a%8%c!<%b!<%I$O!"$-$A$s$HF~$l$F$/$l$^$9!#\e(B
- \e$B$=$l$>$l$N%a%8%c!<%b!<%I$KF~$k$?$a$N%3%^%s%I$O%b!<%IL>$N3HD%$5$l$?$b$N\e(B
-\e$B$K$J$C$F$$$^$9!#Nc$($P!"\e(BM-x fundamental-mode\e$B$O\e(BFundamental\e$B$KF~$k$?$a$N$b$N$G\e(B
-\e$B$9!#\e(B
+\e$B!v%b!<%I%i%$%s\e(B
+==============
- \e$B$b$7!"1Q8l$r%(%G%#%C%H$9$k$J$i$P!"\e(BText mode\e$B$KF~$j$^$9!#\e(B
+\e$B%(%3!<%(%j%"$N$9$0>e$N9T$O!"%b!<%I%i%$%s$H8F$S$^$9!#%b!<%I%i%$%s$O$3$s$JIw$K8+$($k$G$7$g$&!#\e(B
- >> M-x text-mode <Retuen>\e$B$H%?%$%W$7$J$5$$!#\e(B
+ISO7-----XEmacs: TUTORIAL.ja (Fundamental)--L670--58%----------------
- \e$B8=:_$N%a%8%c!<%b!<%I$K$D$$$F$N%I%-%e%a%s%H$r8+$?$$;~$O!"\e(BC-h m\e$B$H%?%$%W\e(B
-\e$B$7$^$9!#\e(B
+\e$B$3$N9T$O\e(B XEmacs \e$B$N>uBV5Z$SJT=8Cf$NJ8>O$K$D$$$FM-1W$J>pJs$rM?$($F$/$l$^\e(B
+\e$B$9!#\e(B
- >> C-h m \e$B$r;H$C$F\e(BText mode\e$B$H\e(BFundamental mode\e$B$N0c$$$rD4$Y$J$5$$!#\e(B
+\e$B%U%!%$%kL>$K$D$$$F$O$b$&J,$C$F$$$^$9$M!#$=$l$O$"$J$?$,3+$$$?%U%!%$%k$G\e(B
+\e$B$9!#\e(B-NN%-- \e$B$OJ8>OCf$N8=:_0LCV$r<($7$F$$$^$9!#J8>O$N\e(B NN% \e$B$,2hLL:G>eCJ$h\e(B
+\e$B$jA0$K$"$k$H$$$&$3$H$G$9!#$b$7J8>O$N:G=i$N9T$,2hLL$K$"$k;~$K$O\e(B --00%--
+\e$B$NBe$j$K\e(B --Top-- \e$B$HI=<($7$^$9!#$b$7J8>O$N:G8e$N9T$,2hLL$K$"$k;~$K$O\e(B
+--Bot-- \e$B$HI=<($7$^$9!#$b$72hLL$KA4It<}$^$C$F$7$^$&$h$&$JC;$$J8>O$r8+$F\e(B
+\e$B$$$k$H$-$K$O\e(B --All-- \e$B$HI=<($7$^$9!#\e(B
+
+\e$B3g8L$K0O$^$l$?ItJ,$O$I$&$JJT=8%b!<%I$K$$$k$+$r<($7$^$9!#%G%U%)%k%H$O\e(B
+"Fundamental" \e$B$H$$$&%b!<%I!"$3$l$,8=:_$N%b!<%I$G$9!#$3$l$O!V%a%8%c!<%b!<\e(B
+\e$B%I!J\e(Bmajor mode\e$B!K!W$N0lNc$G$9!#\e(B
+
+XEmacs \e$B$K$OB?$/$N<oN`$N%a%8%c!<%b!<%I$,$"$j$^$9!#\e(BLisp mode \e$B$d\e(BText mode
+\e$B$N$h$&$K!"$I$s$J%W%m%0%i%`8@8l$d$I$s$J<oN`$NJ8>O$rJT=8Cf$+$r0UL#$9$k$b\e(B
+\e$B$N$b$"$j$^$9!#$$$D$G$bI,$:$$$:$l$+$N%a%8%c!<%b!<%I$N>uBV$K$J$C$F$$$^$9!#\e(B
+\e$B$I$N%a%8%c!<%b!<%I$K$$$k$N$+$O!"%b!<%I%i%$%s$N8=:_$O\e(B "Fundamental" \e$B$H\e(B
+\e$BI=<($7$F$$$kItJ,$r8+$l$PJ,$j$^$9!#\e(B
+
+\e$B3F%a%8%c!<%b!<%I$O4v$D$+$N%3%^%s%I$K0[$J$k?6$kIq$$$r$5$;$^$9!#Nc$($P!"\e(B
+\e$B%W%m%0%i%`%j%9%HCf$K%3%a%s%H$rF~$l$k$?$a$N%3%^%s%I$,$"$j$^$9!#%3%a%s%H\e(B
+\e$B$N7A<0!J%7%s%?%C%/%9!K$O!"%W%m%0%i%`8@8l$K$h$C$F0[$J$j!"%a%8%c!<%b!<%I\e(B
+\e$B$O!"$=$l$KBP1~$9$k8@8l$K9g$C$?7A<0$G%3%a%s%H$rA^F~$7$^$9!#3F%a%8%c!<%b!<\e(B
+\e$B%I$O3HD%%3%^%s%I$NL>A0$K$J$C$F$$$^$9!#$D$^$j$=$N3HD%%3%^%s%I$r;H$C$F%a\e(B
+\e$B%8%c!<%b!<%I$r@Z$j49$($k$N$G$9!#Nc$($P!"\e(BM-x fundamental-mode \e$B$H$$$&$N\e(B
+\e$B$O\e(B Fundamental \e$B%b!<%I$K@Z$j49$($k$?$a$N%3%^%s%I$G$9!#\e(B
+
+\e$B$b$7!"DL>o$N1Q8l$dF|K\8l$NJ8>O!J$3$N%U%!%$%k$N$h$&$J!K$rJT=8$9$k$N$J$i\e(B
+\e$B$P!"\e(BText mode \e$B$r;H$$$^$7$g$&!#\e(B
+
+>> M-x text-mode <Retuen> \e$B$H%?%$%W$7$F$_$F2<$5$$!#\e(B
+
+\e$B?4G[$7$J$$$G!#$3$l$^$G3X$s$@%3%^%s%I$O$?$$$7$FJQ$o$j$^$;$s$+$i!#$@$1$I!"\e(B
+M-f \e$B$d\e(B M-b \e$B$,%"%]%9%H%m%U%#\e(B "'" \e$B$rC18l$N0lIt$@$H2r<a$9$k$h$&$K$J$C$?$N\e(B
+\e$B$,J,$k$G$7$g$&!#0JA0$N\e(B Fundamental \e$B%b!<%I$G$O\e(B M-f \e$B$d\e(B M-b \e$B$O\e(B "'" \e$B$rC18l\e(B
+\e$B$N6h@Z$j$H8+$J$7$F$$$^$7$?!#\e(B
+
+\e$B%a%8%c!<%b!<%I$O$3$N$h$&$K:3:Y$J0c$$$r@8$_$^$9!#Bg35$N%3%^%s%I$O$I$N%a\e(B
+\e$B%8%c!<%b!<%I$G$bF1$8F/$-$r$7$^$9$,!"<B:]$NF0$-$O>/$7$@$1$3$H$J$k$N$G$9!#\e(B
+
+\e$B8=:_$N%a%8%c!<%b!<%I$K$D$$$F$N@bL@J8$r8+$k$K$O\e(B C-h m \e$B$H%?%$%W$7$^$9!#\e(B
+
+>> C-u C-v \e$B$r0lFsEY$d$C$F$3$N9T$r2hLL$N>e$NJ}$K;}$C$F$$$-$^$7$g$&!#\e(B
+>> C-h m \e$B$H%?%$%W$7!"\e(BText mode \e$B$H\e(B Fundamental mode \e$B$N0c$$$r$_$^$7$g$&!#\e(B
+>> q \e$B$G\e(B Text mode \e$B$N@bL@J8$r2hLL$+$i>C$7$^$7$g$&!#\e(B
+
+\e$B%a%8%c!<%b!<%I$,!V%a%8%c!<!W$H$$$&$+$i$K$O!V%^%$%J!<%b!<%I!W$b$"$j$^$9!#\e(B
+\e$B%^%$%J!<%b!<%I$O%a%8%c!<%b!<%I$NBe$o$j$K$J$k$b$N$G$O$J$/!"$=$l$r$A$g$C\e(B
+\e$B$H$@$1=$@5$9$k$b$N$G$9!#3F%^%$%J!<%b!<%I$O!"%a%8%c!<%b!<%I$dB>$N%^%$%J!<\e(B
+\e$B%b!<%I$K1F6A$rM?$($:$K!"$=$l$@$1$r%*%s%*%U$G$-$^$9!#$D$^$j!"%^%$%J!<%b!<\e(B
+\e$B%I$rA4$/;H$o$J$+$C$?$j!"0l8D$@$1;H$C$?$j!"$$$/$D$+$rF1;~$K;H$C$?$j$G$-\e(B
+\e$B$k$N$G$9!#\e(B
+
+\e$BDL>o$NJ8>O$rJT=8$7$F$$$k;~$K$H$F$bJXMx$J%^%$%J!<%b!<%I$N0l$D$K%*!<%H%U%#\e(B
+\e$B%k!J\e(BAuto Fill\e$B!K%b!<%I$H$$$&$N$,$"$j$^$9!#$3$N%b!<%I$,%*%s$N;~$KJ8>O$r\e(B
+\e$BF~NO$7$F$$$C$F9T$rD9$/$7$9$.$?>l9g!"<+F0E*$KC18l$HC18l$N4V$G9T$,J,3d$5\e(B
+\e$B$l$^$9!JF|K\8l$N>l9g$O$I$NJ8;z$N4V$G$b!K!#\e(B
+
+Auto Fill \e$B%b!<%I$O\e(B M-x auto-fill-mode<Return> \e$B$H$d$l$P%*%s$K$G$-$^$9!#\e(B
+\e$B$=$l$,%*%s$N>uBV$G\e(B M-x auto-fill-mode<Return> \e$B$H$d$l$,%*%U$K$G$-$^$9!#\e(B
+\e$B$3$N%3%^%s%I$O!"%b!<%I$,%*%U$J$i%*%s$K!"%*%s$J$i%*%U$K$9$k$N$G$9!#$3$&\e(B
+\e$B$$$&$N$r!V%b!<%I$r%H%0%k$9$k!W$H8@$$$^$9!#\e(B
+
+>> M-x auto-fill-mode<Return> \e$B$H%?%$%W$7$F!"\e(B "asdf " \e$B$G;O$^$k9T$rF~NO\e(B
+ \e$B$7$F2<$5$$!#9T$,J,3d$5$l$k$^$G2?EY$b\e(B "asdf " \e$B$H%?%$%W$7$^$7$g$&!#%9\e(B
+ \e$B%Z!<%9$rK:$l$:$K!#\e(BAuto Fill \e$B$O%9%Z!<%9$,F~NO$5$l$?;~$N$_F/$-$^$9!#\e(B
+
+\e$B1&%^!<%8%s$ODL>o\e(B 70 \e$BJ8;z!J%+%i%`!K$G$9$,!"\e(BC-x f \e$B%3%^%s%I$G$3$l$rJQ99$9\e(B
+\e$B$k$3$H$,$G$-$^$9!#;XDj$NJ8;z?t$r?tCM0z?t$H$7$FM?$($^$9!#\e(B
+
+>> \e$B?tCM0z?t\e(B 20 \e$B$G\e(B C-x f \e$B$r$d$j$^$7$g$&!#\e(B (C-u 2 0 C-x f)\e$B!#\e(B
+ \e$B$=$l$+$iE,Ev$JJ8>O!J1Q8l!K$rF~NO$7!"\e(B20 \e$BJ8;z$G9T$,J,3d$5$l$k$N$r8+$F\e(B
+ \e$B$_$^$7$g$&!#$=$l$+$i\e(B C-x f \e$B%3%^%s%I$G$^$?%^!<%8%s$r\e(B 70 \e$BJ8;z$KLa$7$F\e(B
+ \e$B2<$5$$!#\e(B
+
+\e$B%Q%i%0%i%U$NESCf$rJQ99$7$F$b\e(B Auto Fill \e$B%b!<%I$O$=$l$r<+F0E*$K%U%#%k$7\e(B
+\e$BD>$7$O$7$^$;$s!#\e(B
+\e$B%Q%i%0%i%U$r%U%#%k$7D>$9$K$O%+!<%=%k$r$=$N%Q%i%0%i%U$NCf$KCV$$$F$+$i\e(B
+M-q \e$B$r%?%$%W$7$^$9!#\e(B
+
+>> \e$B%+!<%=%k$r$3$N9TD>A0$N%Q%i%0%i%U$K0\F0$5$;\e(B M-q \e$B$H%?%$%W$7$F2<$5$$!#\e(B
+
+\e$B!v8!:w\e(B
+======
- >> C-x 1\e$B$G%I%-%e%a%s%H$r2hLL$+$i>C$7$J$5$$!#\e(B
+\e$BJ8>OCf$NFCDj$NJ8;zNs$r!"A08~$-$K$b8e8~$-$K$bC5$9;v$,$G$-$^$9!#J8;zNs$r\e(B
+\e$BC5$9$H$$$&$N$O%+!<%=%k0\F0%3%^%s%I$G$9!#$D$^$j!"<!$K$=$NJ8;zNs$,8=$l$k\e(B
+\e$B>l=j$^$G%+!<%=%k$r0\F0$5$;$k$N$G$9!#\e(B
- \e$B:8C<$N\e(B '[--]' \e$B$O8=:_$N%-!<F~NO$N%b!<%I$r<($7$F$$$^$9!#\e(B[--] \e$B$N;~$K$O\e(B
-\e$B1Q8l%"%k%U%!%Y%C%H$,$=$N$^$^F~NO$G$-$^$9!#F~NO%b!<%I$K$D$$$F$N>\$7$$@bL@$O\e(B
-\e$B!V$?$^$4!W$N%^%K%e%"%k$rD4$Y$F2<$5$$!#\e(B
+XEmacs \e$B$N8!:w%3%^%s%I$OB>$NBg35$N%(%G%#%?$N8!:w%3%^%s%I$H$O0[$j!V%$%s\e(B
+\e$B%/%j%a%s%?%k!W$G$9!#8!:w$9$kJ8;zNs$r%?%$%W$7$F$$$k$=$P$+$i8!:w$,5/$k$N\e(B
+\e$B$G$9!#\e(B
- \e$B$=$N$9$01&$K$O%3!<%IBN7O\e(B (coding-system) \e$B$K4X$9$k%U%i%0$N>uBV$,I=\e(B
-\e$B<($5$l$F$$$^$9!#\e(BMule \e$B$O!"%U%!%$%kF~=PNO!"F~NO!"2hLL=PNO$K$D$$$F!"$=$l$>$lFH\e(B
-\e$BN)$K%3!<%IBN7O$r;XDj$5$;$k$3$H$,=PMh$^$9$,!"DL>o$O%U%!%$%kMQ$N%3!<%IBN7O$N\e(B
-\e$B%K!<%b%K%C%/$N$_I=<($7$F$$$^$9!#\e(B
+\e$B8!:w$r;O$a$k$?$a$N%3%^%s%I$O!"A08~$-$K8!:w$9$k$J$i$P\e(B C-s\e$B!"8e8~$-$J$i\e(B
+C-r \e$B$G$9!#$^$@$G$9!*!*:#$O$^$@;n$5$J$$$G2<$5$$!#\e(B
- >> \e$B%b!<%I%i%$%s>e$K\e(B"J:","S:",\e$B$b$7$/$O\e(B "E:"\e$B$,I=<($5$l$F$$$k$+$I$&$+3N\e(B
- \e$BG'$7$J$5$$!#\e(B
+C-s \e$B$rBG$D$H\e(B "I-search" \e$B$H$$$&J8;zNs$,%(%3!<%(%j%"$KI=<($5$l$k$N$,8+$(\e(B
+\e$B$k$G$7$g$&!#$3$l$O\e(B XEmacs \e$B$,%$%s%/%j%a%s%?%k8!:w$H$$$&>uBV$K$$$F!"$"$J\e(B
+\e$B$?$,C5$7$?$$J8;zNs$rF~NO$9$k$N$rBT$C$F$$$k$N$G$9!#\e(B<Return> \e$B$rBG$F$P8!\e(B
+\e$B:w$r=*$o$l$^$9!#\e(B
- \e$B:G=i$N0lJ8;z$,%3!<%IBN7O$N%K!<%b%K%C%/!"<!$N\e(B ':' \e$B$,8=:_1Q8l0J30$NJ8;z\e(B
-\e$B!JF|K\8l!"Cf9q8l$J$I!K$b$A$c$s$HI=<($9$k$H$$$&$3$H$r<($7$F$$$^$9!#\e(BJ\e$B$O\e(BJUNET
-\e$B$G;H$o$l$F$$$k\e(B JIS \e$B%3!<%I!"\e(BS \e$B$O\e(B Shift-JIS\e$B!"\e(BE \e$B$OF|K\8l\e(BEUC \e$B$r<($7$F$$$^$9!#\e(B
-\e$BB?9q8l$NI=<($NM-L5$O\e(B C-x C-k t \e$B$G\e(B ON/OFF\e$B$N%H%0%k$,$G$-$^$9!#\e(B
+>> \e$B$5$F\e(B C-s \e$B$H%?%$%W$7$F8!:w$r;O$a$^$7$g$&!#$f$C$/$j$H#1J8;z$:$D\e(B
+ "cursor" \e$B$H$$$&C18l$rF~NO$7$^$9!##1J8;zBG$DKh$K%+!<%=%k$,$I$&F0$/$+\e(B
+ \e$B8+$^$7$g$&!#\e(B
+ \e$B$5$"!"\e(B"cursor" \e$B$,#12s8+$D$+$j$^$7$?!#\e(B
+>> \e$B$b$&0lEY\e(B C-s \e$B$HBG$C$F<!$N\e(B "cursor" \e$B$r8+$D$1$^$7$g$&!#\e(B
+>> \e$B:#EY$O\e(B <Delete> \e$B$r#42sBG$C$F!"%+!<%=%k$NF0$-$r8+$F2<$5$$!#\e(B
+>> <Return> \e$B$HBG$C$F8!:w$r=*N;$7$^$7$g$&!#\e(B
- \e$B<!$NNc$O!"0lEYB?9q8lI=<($r\e(BOFF\e$B$7$F$+$i!"$b$&0lEY\e(BON\e$B$r9T$C$F$_$^$9!#\e(B
+\e$B2?$,5/$C$?$+J,$j$^$9$+!)%$%s%/%j%a%s%?%k8!:w$G$O!"JXMx$J$?$a$K%O%$%i%$\e(B
+\e$B%H$r$7!"$"$J$?$,$=$l$^$G$KBG$C$?J8;zNs$,8=$l$k$H$3$m$K9T$3$&$H$7$^$9!#\e(B
+\e$B<!$N\e(B "cursor" \e$B$K9T$/$K$O$b$&0lEY\e(B C-s \e$B$HBG$A$^$9!#$b$7$b$&$=$&$$$&J8;z\e(B
+\e$BNs$,L5$+$C$?$i!"%Y%k$r$J$i$7$F8!:w$,8=:_$O<:GT$7$F$$$k$3$H$rCN$i$;$^$9!#\e(B
+C-g \e$B$rBG$F$P8!:w$r=*$o$l$^$9!#\e(B
- >> C-x C-k t\e$B$r\e(B2\e$BEY9T$$$J$5$$!#\e(B
+\e$BCm0U!'%7%9%F%`$K$h$C$F$O\e(B C-s \e$B$H%?%$%W$9$k$H2hLL$,F0$+$J$/$J$j\e(B XEmacs
+\e$B$,I=<($7$h$&$H$9$k$b$N$,2?$b2hLL$K=P$J$/$J$j$^$9!#$3$l$O!"%U%m!<%3%s%H\e(B
+\e$B%m!<%k$H8F$P$l$k#O#S$N5!G=$,\e(B C-s \e$B$rB*$(!"\e(BXEmacs \e$B$KEO$5$J$$$h$&$K$7$F$$\e(B
+\e$B$k$N$G$9!#$3$l$r2r=|$9$k$K$O\e(B C-q \e$B$r%?%$%W$7$^$9!#$=$l$+$i\e(B XEmacs \e$B%^%K%e\e(B
+\e$B%"%k$N\e(B "Spontaneous Entry to Incremental Search (\e$BCN$i$L4V$K%$%s%/%j%a\e(B
+\e$B%s%?%k%5!<%A$K$J$k\e(B)" \e$B$N@a$rFI$s$G$/$@$5$$!#$3$N$d$C$+$$$J#O#S$N5!G=$K\e(B
+\e$B$I$&BP=h$9$l$PNI$$$+$,:\$C$F$$$^$9!#\e(B
- \e$BF~NO%b!<%I$,\e(BJIS\e$B%3!<%I$N@_Dj$H$J$C$F$$$k;~!"$b$7$"$J$?$N;H$C$F$$$kC<Kv\e(B
-\e$B$K%a%?!&%-!<$,IU$$$F$$$k$J$i!"%(%9%1!<%W!&%-!<$NBe$o$j$K$=$l$r;H$&$3$H$,=P\e(B
-\e$BMh$^$9!#$=$N;~!"%a%?!&%-!<$N;H$$J}$O%3%s%H%m!<%k!&%-!<$HF1MM$K2!$7$J$,$iJ8\e(B
-\e$B;z$r%?%$%W$7$^$9!#\e(BESC <\e$BJ8;z\e(B>\e$B$b\e(BM-<\e$BJ8;z\e(B>\e$B$bF1$8F/$-$r$7$^$9!#:#$^$G$N@bL@$G\e(BESC
-<\e$BJ8;z\e(B>\e$B$H9T$J$C$F$$$?$H$3$m$,!"\e(BM-<\e$BJ8;z\e(B>\e$B$H$J$j$^$9!#Cm0U$7$J$1$l$P$J$i$J$$$N\e(B
-\e$B$O!"%7%U%H\e(BJIS\e$B$d\e(BEUC\e$B%3!<%I$N;~$O;HMQ$G$-$^$;$s!#\e(B
+\e$B%$%s%/%j%a%s%?%k8!:w$NESCf$G\e(B <Delete> \e$B$rBG$D$H8!:wJ8;zNsCf$N#1HV8e$m$N\e(B
+\e$BJ8;z$,>C$($^$9!#$=$7$F!"%+!<%=%k$O!"A02s$N0LCV$KLa$j$^$9!#$?$H$($P!"\e(B
+"c" \e$B$H%?%$%W$7$F:G=i$N\e(B "c" \e$B$rC5$7$^$9!#$=$l$+$i\e(B "u" \e$B$rBG$D$H:G=i$N\e(B
+"cu" \e$B$N>l=j$K%+!<%=%k$,F0$-$^$9!#$=$3$G\e(B <Delete> \e$B$rBG$D$H\e(B "u" \e$B$r8!:wJ8\e(B
+\e$B;zNs$+$i>C$7$F!"%+!<%9%k$O:G=i$K\e(B "c" \e$B$,8=$l$?>l=j$KLa$j$^$9!#\e(B
- \e$B%3!<%IBN7O$N$N@Z$jBX$($O!"3F!9$N%P%C%U%!$KBP$7$F$N$_M-8z$G$9!#$=$l$>$l\e(B
-\e$B$N!"%3!<%IBN7O;XDj$K$D$$$F$O!"\e(BC-h a coding-system <Return>\e$B$G8+$k$3$H\e(B
-\e$B$,=PMh$^$9!#\e(B
- >> C-h a coding-system <Return>\e$B$G=P$F$/$k%I%-%e%a%s%HCf$N!"\e(B
- set-display-coding-system, set-file-coding-system,
- set-process-coding-system \e$B$N@bL@$rFI$_$J$5$$!#\e(B
+C-s \e$B$O!"8=:_$N%+!<%=%k0LCV0J9_$K=P$F$/$k8!:wJ8;zNs$rC5$7;O$a$^$9!#$b$7!"\e(B
+\e$BJ8>O$NA0$NJ}$rC5$7$?$+$C$?$i!"\e(BC-r \e$B$r%?%$%W$7$^$9!#$3$l$^$G$N\e(B C-s \e$B$K$D\e(B
+\e$B$$$F$N@bL@$O$9$Y$F\e(B C-r \e$B$K$bEv$F$O$^$j$^$9!#8!:w$NJ}8~$,H?BP$J$@$1$G$9!#\e(B
-\e$B8!:w\e(B
-=====
+\e$B!vJ#?t$N%&%#%s%I%&\e(B
+==================
- \e$BJ8;zNs$r!"%U%!%$%kFb$G!"A0J}Kt$O8eJ}$K!"C5$9;v$,$G$-$^$9!#8!:w$r;O$a$k\e(B
-\e$B%3%^%s%I$O!"%+!<%=%k0LCV0J9_$r8!:w$9$k$J$i$P\e(B C-s\e$B!"%+!<%=%k0LCV0JA0$J$i$P\e(B
-C-r \e$B$G$9!#\e(BC-s \e$B$r%?%$%W$9$k$H!"%(%3!<%(%j%"$K\e(B "I-search:"\e$B$H$$$&J8;zNs$,%W%m\e(B
-\e$B%s%W%H$H$7$FI=<($5$l$^$9!#\e(BESC\e$B$r2!$9$H!"=*N;$G$-$^$9!#\e(B
+XEmacs \e$B$NAGE($J5!G=$N0l$D$H$7$F!"0l$D$N2hLL$KF1;~$K$$$/$D$b$N%&%#%s%I\e(B
+\e$B%&$rI=<($9$k$3$H$,$G$-$^$9!#\e(B
+>> \e$B%+!<%=%k$r$3$N9T$K;}$C$F$-$F\e(B C-u 0 C-l \e$B$H%?%$%W$7$F2<$5$$!#\e(B
- >> C-s\e$B$G8!:w$,;O$^$j$^$9!#$=$l$+$i!"$f$C$/$j$H#1J8;z$:$D\e(B"cursor"\e$B$H$$\e(B
- \e$B$&C18l$rF~NO$7$^$9!##1J8;zF~NO$9$k$4$H$K!"%+!<%=%k$O!"$I$s$JF0$-\e(B
- \e$B$r$7$^$9$+\e(B?
+>> \e$B$=$l$+$i\e(B C-x 2 \e$B$H%?%$%W$72hLL$r#2$D$N%&%#%s%I%&$KJ,3d$7$^$7$g$&!#\e(B
+ \e$B$I$A$i$N%&%#%s%I%&$b$3$NF~Lg%,%$%I$rI=<($7$F$$$^$9!#%+!<%=%k$O>e$N\e(B
+ \e$B%&%#%s%I%&$K$"$j$^$9!#\e(B
- >> \e$B$b$EY\e(B C-s \e$B$r%?%$%W$9$k$H!"<!$N\e(B"cursor"\e$B$r8+$D$1$i$l$^$9!#\e(B
+>> C-M-v \e$B$H%?%$%W$72<$N%&%#%s%I%&$r%9%/%m!<%k$5$;$^$7$g$&!#\e(B
+ \e$B!J%a%?%-!<$,$J$$>l9g$O\e(B ESC C-v \e$B$H%?%$%W$7$^$9!#!K\e(B
- >> <Delete>\e$B$r#42sF~NO$7$F!"%+!<%=%k$NF0$-$r8+$J$5$$!#\e(B
+>> C-x o \e$B!J\e(B"o" \e$B$O\e(B "other\e$B!JB>J}!K\e(B" \e$B$r0UL#$7$^$9!K$r%?%$%W$72<$N%&%#%s%I\e(B
+ \e$B%&$K%+!<%=%k$r0\$7$F2<$5$$!#\e(B
+>> \e$B2<$N%&%#%s%I%&$G\e(B C-v \e$B$d\e(B M-v \e$B$r;H$C$F%9%/%m!<%k$5$;$^$7$g$&!#\e(B
+ \e$B$3$3$K=q$$$F$"$k;X<($O>e$N%&%#%s%I%&$GFI$_?J$s$G$/$@$5$$!#\e(B
- >> ESC\e$B$r2!$7$F!"=*N;$7$^$9!#\e(B
+>> \e$B$b$&0lEY\e(B C-x o \e$B$H%?%$%W$7!"%+!<%=%k$r>e$N%&%#%s%I%&$KLa$7$^$9!#\e(B
+ \e$B%+!<%=%k$O>e$N%&%#%s%I%&$N85$"$C$?0LCV$KLa$j$^$9!#\e(B
- \e$BC5$7$?$$J8;zNs$r%?%$%WCf$G$b!"%?%$%W$7$?J8;zItJ,$@$1$G!"8!:w$r;O$a$^$9!#\e(B
-\e$B<!$NJ8;z$rC5$9$K$O!":F$S\e(BC-s\e$B$r%?%$%W$7$^$9!#$b$7!"J8;zNs$,B8:_$7$J$+$C$?$i!"\e(B
-\e$B%a%C%;!<%8$,I=<($5$l$^$9!#\e(BC-g \e$B$G$b=*N;$G$-$^$9!#\e(B
+C-x o \e$B$r;H$C$F%&%#%s%I%&4V$r9T$C$?$jMh$?$j$G$-$^$9!#3F%&%#%s%I%&$O$=$l\e(B
+\e$B<+?H$N%+!<%=%k0LCV$rJ];}$7$F$$$^$9$,!"0lEY$K$O0l$D$N%&%#%s%I%&$@$1$,%+!<\e(B
+\e$B%=%k$rI=<($7$^$9!#DL>o$NJT=8%3%^%s%I$O3'%+!<%=%k$,$"$k%&%#%s%I%&$KBP$7\e(B
+\e$B$FF/$-$^$9!#$=$N%&%#%s%I%&$r\e(B "selected window (\e$BA*BrCf$N%&%#%s%I%&\e(B)" \e$B$H\e(B
+\e$B8F$S$^$9!#\e(B
- \e$B8!:w<B9TCf$K\e(B<Delete>\e$B$rF~NO$9$k$H!"8!:wJ8;zNs$N#1HV8e$m$NJ8;z$,>C$($^$9!#\e(B
-\e$B$=$7$F!"%+!<%=%k$O!"A02s$N0LCV$KLa$j$^$9!#$?$H$($P!"\e(B"cu"\e$B$H%?%$%W$7$F!":G=i\e(B
-\e$B$N\e(B"cu"\e$B$N0LCV$K%+!<%=%k$,F0$$$?$H$7$^$9!#$3$3$G\e(B<Delete>\e$B$rF~NO$9$k$H!"%5!<%A\e(B
-\e$B%i%$%s$N\e(B'u'\e$B$,>C$(!"%+!<%=%k$O!"\e(B'u'\e$B$r%?%$%W$9$kA0$K!"%+!<%=%k$,$"$C$?\e(B'c'\e$B$N0L\e(B
-\e$BCV$K!"0\F0$7$^$9!#\e(B
+C-M-v \e$B%3%^%s%I$O!"0l$D$N%&%#%s%I%&$GJ8>O$rJT=8Cf$KB>$N%&%#%s%I%&$r;2>H\e(B
+\e$B$7$F$$$k;~$KLrN)$A$^$9!#JT=8Cf$N>l=j$K%+!<%=%k$rJ]$C$?$^$^!"\e(BC-M-v \e$B$GB>\e(B
+\e$B$N%&%#%s%I%&$rFI$_?J$a$F9T$/$3$H$,$G$-$^$9!#\e(B
- \e$B8!:w<B9TCf$K!"\e(BC-s \e$B$d\e(B C-r \e$B0J30$N%3%s%H%m!<%kJ8;z$r%?%$%W$9$k$H!"8!:w$O\e(B
-\e$B=*N;$7$^$9!#\e(B
+C-M-v \e$B$O%3%s%H%m!<%k%a%?J8;z$N0lNc$G$9!#%a%?%-!<$,$"$k>l9g$O!"%3%s%H%m!<\e(B
+\e$B%k%-!<$H%a%?%-!<$r2!$7$J$,$i\e(B v \e$B$r%?%$%W$7$^$9!#%3%s%H%m!<%k%-!<$H%a%?\e(B
+\e$B%-!<$O$I$A$i$r@h$K2!$7$F$b9=$$$^$;$s!#$I$A$i$b$=$N8e$K%?%$%W$5$l$kJ8;z\e(B
+\e$B$KBP$9$k=$>~%-!<\e(B (modifier key) \e$B$H$7$FF/$/$+$i$G$9!#\e(B
- C-s \e$B$O!"8=:_$N%+!<%=%k0LCV0J9_$K=P$F$/$k8!:wJ8;zNs$rC5$7$^$9!#$b$7!"A0\e(B
-\e$B$NJ}$rC5$7$?$+$C$?$i!"\e(BC-r \e$B$r%?%$%W$9$k$3$H$G!"5UJ}8~8!:w$,$G$-$^$9!#\e(BC-s \e$B$H\e(B
-C-r \e$B$O!"8!:w$NJ}8~$,H?BP$J$@$1$G!"A4$FF1$8F/$-$r$7$^$9!#\e(B
+\e$B%a%?%-!<$,L5$$>l9g!"\e(BESC \e$B%-!<$r;H$$$^$9$,!"$3$N>l9g=gHV$,Bg;v$G$9!#$^$:\e(B
+ESC \e$B$r2!$7$F$+$iN%$7$F\e(B CTRL-v \e$B$rBG$A$^$9!#\e(BCTRL-ESC v \e$B$G$OBLL\$G$9!#$3\e(B
+\e$B$l$O\e(BESC \e$B$O$=$l<+BN$,0l$D$NJ8;z$G=$>~%-!<$G$O$J$$$+$i$G$9!#\e(B
-\e$B%j%+!<%7%V\e(B \e$B%(%G%#%F%#%s%0\e(B \e$B%l%Y%k\e(B
+>> \e$B>e$N%&%#%s%I%&$G\e(B C-x 1 \e$B$H%?%$%W$72<$N%&%#%s%I%&$r>C$7$^$7$g$&\e(B
- \e$B$H$-$I$-!"!JITK\0U$K!K%j%+!<%7%V\e(B \e$B%(%G%#%F%#%s%0\e(B \e$B%l%Y%k$H8F$P$l$k>uBV$K\e(B
-\e$BF~$k$3$H$,$"$j$^$9!#%a%8%c!<%b!<%I$N>.3g8L\e(B'()'\e$B$N2s$j$rCf3g8L\e(B'[]'\e$B$G0O$s$@$b\e(B
-\e$B$N$,%b!<%I%i%$%s>e$KI=<($5$l$^$9!#Nc$($P!"\e(B(Fundamental)\e$B$HI=<($5$l$kBe$o$j$K\e(B
-[(Fundamental)]\e$B$N$h$&$K$J$j$^$9!#\e(B
+\e$B!J$b$72<$N%&%#%s%I%&$G\e(B C-x 1 \e$B$H%?%$%W$9$k$H>e$N%&%#%s%I%&$,>C$($^$9!#\e(B
+\e$B$3$N%3%^%s%I$O!V8=:_<+J,$,$$$k%&%#%s%I%&$@$1$K$7$J$5$$!W$H$$$&$b$N$@$H\e(B
+\e$B;W$C$F2<$5$$!#!K\e(B
-\e$BCm0U\e(B: \e$B$3$3$G$O%j%+!<%7%V\e(B \e$B%(%G%#%F%#%s%0\e(B \e$B%l%Y%k<+BN$K$D$$$F$O@bL@$7\e(B
- \e$B$^$;$s!#\e(B
+\e$BF1$8%P%C%U%!$rN>J}$N%&%#%s%I%&$KI=<($9$kI,MW$O$"$j$^$;$s!#0lJ}$N%&%#%s\e(B
+\e$B%I%&$G\e(B C-x C-f \e$B$G%U%!%$%k$r3+$$$F$bB>J}$N%&%#%s%I%&$OJQ2=$7$^$;$s!#3F\e(B
+\e$B%&%#%s%I%&$K$*$$$FJL!9$N%U%!%$%k$r3+$/$3$H$,$G$-$k$N$G$9!#\e(B
- \e$B%j%+!<%7%V\e(B \e$B%(%G%#%F%#%s%0\e(B \e$B%l%Y%k$+$iH4$1$G$k$?$a$K$O!"\e(BM-x top-level
-<Return>\e$B$H%?%$%W$7$^$9!#\e(B
+>> C-x 4 C-f \e$B$H%?%$%W$7B3$1$F2?$+<+J,$N%U%!%$%kL>$rF~NO$7$F2<$5$$!#\e(B
+ <Return> \e$B$GF~NO$r=*$o$i$;$F2<$5$$!#:#;XDj$7$?%U%!%$%k$,2<$N%&%#%s%I\e(B
+ \e$B%&$K8=$l$^$9!#%+!<%=%k$b$=$C$A$K0\$j$^$9!#\e(B
- >> \e$B;n$7$F$_$F2<$5$$!#%9%/%j!<%s$NDl$K\e(B"Back to top level"\e$B$HI=<($5$l$^\e(B
- \e$B$9!#\e(B
+>> C-x o \e$B$H%?%$%W$7>e$N%&%#%s%I%&$KLa$C$F2<$5$$!#$=$l$+$i\e(B C-x 1 \e$B$G2<$N\e(B
+ \e$B%&%#%s%I%&$r>C$7$^$7$g$&!#\e(B
- \e$BK\Ev$O!"$3$N;n$_$,9T$o$l$?;~$O!"$9$G$K%H%C%W%l%Y%k$K$$$?$N$G$9!#\e(BM-x
-top-level\e$B$O!"2?$b1F6A$rM?$($F$$$^$;$s!#\e(B
- \e$B%j%+!<%7%V\e(B \e$B%(%G%#%F%#%s%0\e(B \e$B%l%Y%k$+$iH4$1=P$k$N$KBP$7$F$O\e(BC-g\e$B$O8z$-$^$;\e(B
-\e$B$s!#\e(B
+\e$B!v:F5"JT=8%l%Y%k\e(B (RECURSIVE EDITING LEVELS)
+\e$B;~!9!JITK\0U$K!K:F5"JT=8%l%Y%k$H8F$P$l$k>uBV$KF~$k$3$H$,$"$j$^$9!#%b!<\e(B
+\e$B%I%i%$%s$N%a%8%c!<%b!<%IL>$r0O$`4]3g8L\e(B "()" \e$B$,$5$i$Knl3g8L\e(B "[]" \e$B$G0O$^\e(B
+\e$B$l$^$9!#Nc$($P!"\e(B(Fundamental) \e$B$HI=<($5$l$kBe$o$j$K\e(B [(Fundamental)] \e$B$N\e(B
+\e$B$h$&$K$J$j$^$9!#\e(B
-\e$B%X%k%W\e(B
-======
+\e$B:F5"JT=8%l%Y%k$+$iH4$1=P$9$K$O\e(B ESC ESC ESC \e$B$H%?%$%W$7$^$9!#$3$l$OHFMQ\e(B
+\e$B!VH4$1=P$7!W%3%^%s%I$G$9!#M>J,$J%&%#%s%I%&$r>C$7$?$j!"%_%K%P%C%U%!$+$i\e(B
+\e$BH4$1$?$j$9$k$N$K$b;H$($^$9!#\e(B
- Emacs\e$B$K$O!"$?$/$5$s$NLr$KN)$D5!G=$,$"$j!"$3$3$G!"$9$Y$F$r@bL@$9$k$3$H\e(B
-\e$B$O!"IT2DG=$G$9!#$7$+$7!"$^$@CN$i$J$$B?$/$N5!G=$r3X$V$?$a$K$O!"\e(B<HELP>\e$B$H8F$P\e(B
-\e$B$l$k\e(B C-h \e$B$r%?%$%W$9$k$3$H$G!"$?$/$5$s$N>pJs$r<j$KF~$l$k$3$H$,$G$-$^$9!#\e(B
- \e$B;H$$J}$O!"\e(BC-h \e$B$r%?%$%W$7!"B3$$$FI,MW$J%*%W%7%g%s$r#1J8;z%?%$%W$7$^$9!#\e(B
-\e$B$o$+$i$J$1$l$P!"\e(BC-h ? \e$B$H%?%$%W$9$k$H!"$I$s$J%*%W%7%g%s$,$"$k$N$+I=<($5$l$^\e(B
-\e$B$9!#$b$7!"\e(BC-h \e$B$r%?%$%W$7$F$+$i5$$,JQ$o$C$?$i!"\e(BC-g \e$B$r%?%$%W$9$l$P!"<h$j>C$9\e(B
-\e$B$3$H$,$G$-$^$9!#\e(B
+>> M-x \e$B$H%?%$%W$7%_%K%P%C%U%!$KF~$C$F2<$5$$!#$=$l$+$i\e(B ESC ESC ESC \e$B$H%?\e(B
+ \e$B%$%W$7H4$1=P$7$F$_$^$7$g$&!#\e(B
- \e$B:G$b4pK\E*$J$b$N$O!"\e(BC-h c \e$B$G$9!#$3$l$KB3$$$F%-!<$rF~NO$9$k$H!"$=$N%3%^\e(B
-\e$B%s%I$K$D$$$F$NC;$$@bL@$rI=<($7$^$9!#\e(B
+C-g \e$B$G$O:F5"JT=8%l%Y%k$+$i$OH4$1=P$;$^$;$s!#$3$l$O!"\e(BC-g \e$B$,:F5"JT=8%l%Y\e(B
+\e$B%kFb$G$N%3%^%s%I$d0z?t$r<h$j>C$9$N$K;H$o$l$F$$$k$+$i$G$9!#\e(B
- >> C-h c C-p \e$B$H%?%$%W$7$F$_$J$5$$!#\e(B"C-p runs the command previous-
- line"\e$B$N$h$&$J%a%C%;!<%8$,I=<($5$l$k$O$:$G$9!#\e(B
- \e$B8+$?$3$H$O$"$k$,!"3P$($F$O$$$J$$%3%^%s%I$b;W$$=P$;$k$N$G$9!#\e(BC-x C-s \e$B$N\e(B
-\e$B$h$&$JJ#?t$G#1$D$N%3%^%s%I$b\e(BC-h c \e$B$N8e$m$KB3$1$i$l$^$9!#\e(B
+\e$B!v$b$C$H$b$C$H%X%k%W\e(B
+====================
- \e$B$b$C$H>\$7$/CN$j$?$+$C$?$i!"\e(Bc \e$B$NBe$o$j$K\e(B k \e$B$r;XDj$7$^$9!#\e(B
+\e$B$3$NF~Lg%,%$%I$G$O\e(B XEmacs \e$B$r;H$$;O$a$k$N$K==J,$J>pJs$rDs6!$7$?$D$b$j$G\e(B
+\e$B$9!#\e(BXEmacs \e$B$K$O$"$^$j$K$bB?$/$N5!G=$,$"$k$N$G!"$3$3$G$9$Y$F$r@bL@$9$k\e(B
+\e$B$N$OL5M}$G$9!#$=$l$G$bLr$KN)$D5!G=$r$b$C$HB?$/3X$S$?$$$H;W$&?M$N$?$a$K\e(B
+\e$B$O!"\e(BXEmacs \e$B$N%3%^%s%I$N@bL@$rFI$`$?$a$N%3%^%s%I$,$"$j$^$9!#$3$l$i$N\e(B
+\e$B!V%X%k%W!W%3%^%s%I$O3'\e(B Control-h \e$BJ8;z!J%X%k%WJ8;z$H8F$S$^$9!K$G;O$^$j\e(B
+\e$B$^$9!#\e(B
+
+\e$B%X%k%W5!G=$r;H$&$K$O!"\e(BC-h \e$B$KB3$$$F$I$s$J<oN`$N%X%k%W$,I,MW$+$r<($9#1J8\e(B
+\e$B;z$r%?%$%W$7$^$9!#$b$7$=$l$9$iJ,$i$J$$>l9g$O\e(B C-h ? \e$B$H%?%$%W$7$^$7$g$&!#\e(B
+\e$B$I$s$J<oN`$N%X%k%W$rDs6!$G$-$k$+$,<($5$l$^$9!#$b$7!"\e(BC-h \e$B$r%?%$%W$7$F$+\e(B
+\e$B$i5$$,JQ$o$C$?$i!"\e(BC-g \e$B$r%?%$%W$7$F<h$j>C$9$3$H$,$G$-$^$9!#\e(B
- >> C-h k C-p \e$B$H%?%$%W$7$F$_$J$5$$!#\e(B
+\e$B!J%5%$%H$K$h$C$F$O\e(B C-h \e$BJ8;z$r:FB+G{$7$^$9!#Am3gE*$J<jCJ$H$7$F$=$s$J$3\e(B
+\e$B$H$r$9$k$Y$-$G$O$"$j$^$;$s!#$=$&$$$&>l9g$O%7%9%F%`4IM}<T$KJ86g$r8@$$$^\e(B
+\e$B$7$g$&!#$^!"$H$b$+$/!"$b$7\e(B C-h \e$B$,2hLL$N2<$NJ}$K%X%k%W$N%a%C%;!<%8$r=P\e(B
+\e$B$5$J$1$l$P!"\e(BM-x help RET \e$B$r;n$7$F$_$F2<$5$$!#!K\e(B
- Emacs\e$B$N%&%#%s%I%&$K!"%3%^%s%I$NL>A0$H5!G=$,I=<($5$l$^$9!#FI$_=*$($?$i!"\e(B
-C-x 1 \e$B$H%?%$%W$9$k$H!"H4$1$i$l$^$9!#\e(B
+\e$B:G$b4pK\E*$J%X%k%W5!G=$O\e(B C-h c \e$B$G$9!#\e(BC-h\e$B!"$=$l$+$i\e(B c\e$B!"$=$7$F%3%^%s%I$N\e(B
+\e$BJ8;z<c$7$/$O$=$N%7!<%1%s%9$r%?%$%W$9$k$H!"$=$N%3%^%s%I$K$D$$$F$NC;$$@b\e(B
+\e$BL@$rI=<($7$^$9!#\e(B
- \e$BB>$K$bLr$KN)$D%*%W%7%g%s$,$"$j$^$9!#\e(B
+>> C-h c Control-p \e$B$H%?%$%W$7$F$_$^$7$g$&!#\e(B
+ \e$B0J2<$N$h$&$J%a%C%;!<%8$,I=<($5$l$k$O$:$G$9!#\e(B
- C-h f \e$B%U%!%s%/%7%g%sL>$rF~NO$9$k$H!"%U%!%s%/%7%g%s$rI=<($7$^$9!#\e(B
+ C-p runs the command previous-line
- >> C-h f previous-line \e$B$r%?%$%W$7!"\e(B<Return> \e$B$r2!$7$J$5$$!#\e(BC-p \e$B%3%^%s\e(B
- \e$B%I$r<B9T$9$k%U%!%s%/%7%g%s$K$D$$$F$N>pJs$rI=<($7$^$9!#\e(B
+\e$B$3$l$O!V%U%!%s%/%7%g%s$NL>A0!W$rI=<($7$?$N$G$9!#%U%!%s%/%7%g%sL>$O<g$K\e(B
+XEmacs \e$B$r%+%9%?%^%$%:$7$?$j3HD%$7$?$j$9$k$N$K;H$o$l$^$9!#$7$+$7!"%U%!\e(B
+\e$B%s%/%7%g%sL>$O$=$N%3%^%s%I$,2?$r$9$k$b$N$J$N$+$,J,$k$h$&$KIU$1$i$l$^$9\e(B
+\e$B$N$G!"4JC1$J@bL@$H$7$F$b$=$N$^$^Lr$KN)$A$^$9!#0lEY3X$s$@%3%^%s%I$K$D$$\e(B
+\e$B$F;W$$=P$9$K$O==J,$G$9!#\e(B
- C-h a \e$B%-!<%o!<%I$rF~NO$9$k$H!"L>A0$K$=$N%-!<%o!<%I$r4^$`!"A4$F$N%3\e(B
- \e$B%^%s%I$rI=<($7$^$9!#$3$l$i$N%3%^%s%I$O$9$Y$F\e(BESC x \e$B$G<B9T$G$-\e(B
- \e$B$^$9!#\e(B
+C-x C-s \e$B$d!J%a%?%-!<$d%"%k%H%-!<$,$J$$>l9g$N!K\e(B <ESC> v \e$B$J$I$NJ#?tJ8;z\e(B
+\e$B$N%3%^%s%I$r\e(B C-h c \e$B$N8e$K%?%$%W$9$k$3$H$b$G$-$^$9!#\e(B
- >> C-h a file \e$B$H%?%$%W$7!"\e(B<Return>\e$B$r2!$7$J$5$$!#L>A0$K\e(B"file"\e$B$H$$$&J8\e(B
- \e$B;z$r;}$DA4$F$N%3%^%s%I$rI=<($7$^$9!#$^$?!"\e(Bfind-file \e$B$d\e(B write-file
- \e$B$H$$$&L>$N\e(B C-x C-f \e$B$d\e(B C-x C-w \e$B$N$h$&$J%3%^%s%I$bI=<($5$l$^$9!#\e(B
+\e$B%3%^%s%I$K$D$$$F$b$C$HB?$/$N>pJs$,M_$7$1$l$P\e(B C-h c \e$B$NBe$o$j$K\e(B C-h k \e$B$r\e(B
+\e$B;H$$$^$9!#\e(B
-\e$B$*$o$j$K\e(B
-========
+>> C-h k Control-p \e$B$H%?%$%W$7$F$_$^$7$g$&!#\e(B
-\e$BK:$l$:$K!'\e(B \e$B=*N;$9$k$K$O!"\e(BC-x C-c \e$B$H$7$^$9!#\e(B
+XEmacs\e$B$N%&%#%s%I%&$K!"%3%^%s%I$NL>A0$HF1;~$K$=$N5!G=$N@bL@$,I=<($5$l$^\e(B
+\e$B$9!#FI$_=*$($?$i!"\e(Bq \e$B$H%?%$%W$7$F%X%k%W$N%F%-%9%H$r>C$7$^$7$g$&!#\e(B
+C-h \e$B$K$OB>$K$bLr$KN)$D%*%W%7%g%s$,$"$j$^$9!#\e(B
- \e$B$3$NF~LgJT$O!"$^$C$?$/$N=i?4<T$K$b$o$+$j$d$9$$$h$&$K$H0U?^$7$F$$$^$9!#\e(B
-\e$B$G$9$+$i!"$b$72?$+$o$+$j$K$/$$E@$,$"$C$?$J$i!"0l?M$G6rCT$r8@$&$N$G$O$J$/!"\e(B
-\e$BJ86g$r$D$1$F2<$5$$!#\e(B
+ C-h f \e$B%U%!%s%/%7%g%s$N@bL@!#%U%!%s%/%7%g%sL>$rF~NO$7$^$9!#\e(B
+>> C-h f previous-line<Return> \e$B$H%?%$%W$7$F$_$^$7$g$&!#\e(B
+ C-p \e$B%3%^%s%I$r<B9T$9$k%U%!%s%/%7%g%s$K$D$$$F$N$9$Y$F$N>pJs$rI=<($7\e(B
+ \e$B$^$9!#\e(B
- \e$B$b$7!"\e(BEMACS \e$B$r2?F|$+$G$b;H$C$F$_$l$P!"$=$l$r$d$a$F$7$^$&$3$H$J$I$G$-$J\e(B
-\e$B$/$J$k$G$7$g$&!#:G=i$O8MOG$&$+$bCN$l$^$;$s!#$7$+$7!"$=$l$O$I$s$J%(%G%#%?$G\e(B
-\e$B$bF1MM$G$9!#\e(BEMACS \e$B$N$h$&$K!"Hs>o$KB?$/$N$3$H$,$G$-$k>l9g$K$OFC$K$=$&$G$7$g\e(B
-\e$B$&!#$=$7$F!"\e(BEMACS \e$B$G$O!"<B:]!"2?$G$b$G$-$k$N$G$9$+$i!#\e(B
+ C-h a \e$B%O%$%Q!<%"%W%m%]%9!#%-!<%o!<%I$rF~NO$9$k$H!"$=$N%-!<%o!<\e(B
+ \e$B%I$rL>A0$K4^$`A4$F$N4X?t$HJQ?t$r%j%9%H%"%C%W$7$^$9!#\e(B
+ Meta-x \e$B$G5/F0$G$-$k%3%^%s%I$K$O:8B&$K%"%9%?%j%9%/$,IU\e(B
+ \e$B$-$^$9!#\e(B
+>> C-h a newline<Return> \e$B$H%?%$%W$7$F$_$F2<$5$$!#\e(B
+"newline"\e$B$H$$$&J8;zNs$rL>A0$N0lIt$K;}$DA4$F$N4X?t$HJQ?t$rI=<($7$^$9!#\e(B
+\e$B4X?t$dJQ?t$r$h$j>\$7$/CN$k$?$a$K\e(B <Return> \e$B$+??Cf$N%^%&%9%\%?%s$r2!$7$F\e(B
+\e$B$/$@$5$$!#\e(Bhyper-apropos \e$B$r=*N;$9$k$?$a$K$O\e(B `q' \e$B$rF~NO$7$^$9!#\e(B
-\e$B<U<-\e(B
-=====
- \e$B$3$NJ8=q$O!"\e(BJUNET\e$B$GN.$5$l$?\e(B"\e$BF|K\8l\e(B MicroEMACS (kemacs) \e$BF~LgJT\e(B" \e$B$r\e(BGNUE-
-macs (Nemacs)\e$B$N\e(BTutorial\e$BMQ$K=q$-49$($?$b$N$G$9!#\e(B
- Jonathan Payne \e$B$K$h$k\e(B "JOVE Tutorial" (19 January 86) \e$B$rJQ99$7$?$b$N$G\e(B
- \e$B$"$j!"$=$l$O$b$H$b$H$O!"\e(BCCA-UNIX\e$B$N\e(BSteve Zimmerman \e$B$K$h$C$FJQ99$5$l$?!"\e(B
- MIT \e$B$N\e(B "Teach-Emacs" \e$BF~LgJT\e(B (31 October 85) \e$B$r!J$5$i$K!KJQ99$7$?$b$N$G\e(B
- \e$B$7$?!#\e(B
+\e$B!v$*$o$j$K\e(B
+==========
- Update - February 1986 by Dana Hoggatt.
+\e$BK:$l$J$$$G!*\e(BXEmacs \e$B$r=*N;$9$k$K$O!"\e(BC-x C-c \e$B$G$9!#$^$?\e(B XEmacs \e$B$KLa$C$F\e(B
+\e$BMh$i$l$k$h$&$K0l;~E*$K%7%'%k$KLa$k$@$1$J$i\e(B C-z \e$B$G$9!#!J\e(BX \e$B$G$O!"$3$l$O\e(B
+\e$B8=:_$N\e(B XEmacs \e$B$N%U%l!<%`$r%"%$%3%s2=$7$^$9!#!K\e(B
- Update - December 1986 by Kim Leburg.
+\e$B$3$NF~Lg%,%$%I$O!"$^$C$?$/$N=i?4<T$K$b$o$+$j$d$9$$$h$&$K$H0U?^$7$F$$$^\e(B
+\e$B$9!#$G$9$+$i!"$b$72?$+$o$+$j$K$/$$E@$,$"$C$?$J$i!"<+J,$r@U$a$J$$$GJ86g\e(B
+\e$B$r$D$1$F2<$5$$!#\e(B
- Update/Translate - July 1987 by SANETO Takanori
-\e$BFCJL$J<U<-\e(B
-==========
+\e$B!v$3$NK]LuHG$K$D$$$F$N<U<-\e(B
+==========================
+
+\e$B$3$NJ8=q$O\e(B XEmacs Ver.21.2 \e$BIUB0$N1Q8lHG$NF~Lg%,%$%I$rF|K\8l$KK]Lu$7$?\e(B
+\e$B$b$N$G$9!#$=$N:]!"\e(BEmacs \e$BIUB0$NF|K\8l%,%$%I$r85$K=$@5$7$^$7$?!#$=$NF|K\\e(B
+\e$B8l%,%$%I$O!"85$O\e(B SANETO Takanori \e$B;a$,F|K\8l\e(B MicroXEmacs(kemacs) \e$BF~LgJT\e(B
+\e$B$H$7$FK]Lu$5$l!"$=$l$rNkLZM5?.;a\e(B <hironobu@sra.co.jp> \e$B$,\e(BNemacs/Mule \e$BMQ\e(B
+\e$B$KJQ99!"$5$i$K5HEDLP<y;a$,=$@5$5$l$?$b$N$G$9!#$3$l$i$NJ}!9$K?<$/46<U$7\e(B
+\e$B$^$9!#\e(B
- \e$B:G=i$K$3$l$NF|K\8lLu$r:n$i$l$?!"\e(BSANETO Takanori\e$B$5$s!#$3$NJ8>O$O\e(BGMW +
-Wnn + Nemacs\e$B$r;H$C$F=q$-$^$7$?!#$=$N$h$&$JAG@2$i$7$$%W%m%0%i%`$r:n$C$?J}!9\e(B
-\e$B$X46<U$N0U$rI=$7$?$$$H;W$$$^$9!#K]Lu$H$+!"F~NO$H$+$r?'!9$H<jEA$C$F$/$l$?!"\e(B
-\e$BF#86>M;R$5$s!"$I$&$b$"$j$,$H$&!#\e(B
+\e$B!vCx:n8"I=<(\e(B
+============
+\e$B$3$3$K85$N1Q8lHG$NCx:n8"I=<($r$=$N$^$^IU$1$^$9!#$3$NK]LuHG$b$3$l$K=>$$\e(B
+\e$B$^$9!#\e(B
+This tutorial descends from a long line of Emacs tutorials
+starting with the one written by Stuart Cracraft for the original Emacs.
+Ben Wing updated the tutorial for X Windows. Martin Buchholz and
+Hrvoje Niksic added more corrections for XEmacs.
+This version of the tutorial, like XEmacs, is copyrighted, and comes
+with permission to distribute copies on certain conditions:
-\e$B8mLu!"13!"$=$NB>!"$NJ8@U$O!"0J2<$N<T$K$"$j$^$9!#\e(B
+Copyright (c) 1985, 1996 Free Software Foundation
- \e$BNkLZM5?.\e(B hironobu@sra.co.jp
+ Permission is granted to anyone to make or distribute verbatim copies
+ of this document as received, in any medium, provided that the
+ copyright notice and permission notice are preserved,
+ and that the distributor grants the recipient permission
+ for further redistribution as permitted by this notice.
+ Permission is granted to distribute modified versions
+ of this document, or of portions of it,
+ under the above conditions, provided also that they
+ carry prominent notices stating who last altered them.
-Update/Add - December 1987 by Hironobu Suzuki
-Update/Add - November 1989 by Ken'ichi Handa
-Update/Add - January 1990 by Shigeki Yoshida
-Update/Add - March 1992 by Kenichi HANDA
+The conditions for copying XEmacs itself are more complex, but in the
+same spirit. Please read the file COPYING and then do give copies of
+XEmacs to your friends. Help stamp out software obstructionism
+("ownership") by using, writing, and sharing free software!
cl.info-1: 1164
cl.info-2: 46306
cl.info-3: 89087
-cl.info-4: 138385
-cl.info-5: 176381
-cl.info-6: 218986
+cl.info-4: 137810
+cl.info-5: 175806
+cl.info-6: 218409
\1f
Tag Table:
(Indirect)
Node: Multiple Values\7f111218
Node: Macros\7f113111
Node: Declarations\7f116329
-Node: Symbols\7f124821
-Node: Property Lists\7f125113
-Node: Creating Symbols\7f127862
-Node: Numbers\7f129940
-Node: Predicates on Numbers\7f130420
-Node: Numerical Functions\7f131449
-Node: Random Numbers\7f135676
-Node: Implementation Parameters\7f138385
-Node: Sequences\7f141957
-Node: Sequence Basics\7f142630
-Node: Mapping over Sequences\7f146208
-Node: Sequence Functions\7f152062
-Node: Searching Sequences\7f158237
-Node: Sorting Sequences\7f161274
-Node: Lists\7f163822
-Node: List Functions\7f164247
-Node: Substitution of Expressions\7f168510
-Node: Lists as Sets\7f170396
-Node: Association Lists\7f174458
-Node: Hash Tables\7f176161
-Node: Structures\7f176381
-Node: Assertions\7f191164
-Node: Efficiency Concerns\7f194107
-Node: Common Lisp Compatibility\7f200434
-Node: Old CL Compatibility\7f203590
-Node: Porting Common Lisp\7f207973
-Node: Function Index\7f218986
-Node: Variable Index\7f230192
+Node: Symbols\7f124815
+Node: Property Lists\7f125096
+Node: Creating Symbols\7f127287
+Node: Numbers\7f129365
+Node: Predicates on Numbers\7f129845
+Node: Numerical Functions\7f130874
+Node: Random Numbers\7f135101
+Node: Implementation Parameters\7f137810
+Node: Sequences\7f141382
+Node: Sequence Basics\7f142055
+Node: Mapping over Sequences\7f145633
+Node: Sequence Functions\7f151487
+Node: Searching Sequences\7f157662
+Node: Sorting Sequences\7f160699
+Node: Lists\7f163247
+Node: List Functions\7f163672
+Node: Substitution of Expressions\7f167935
+Node: Lists as Sets\7f169821
+Node: Association Lists\7f173883
+Node: Hash Tables\7f175586
+Node: Structures\7f175806
+Node: Assertions\7f190589
+Node: Efficiency Concerns\7f193532
+Node: Common Lisp Compatibility\7f199859
+Node: Old CL Compatibility\7f203015
+Node: Porting Common Lisp\7f207398
+Node: Function Index\7f218409
+Node: Variable Index\7f229558
\1f
End Tag Table
(declaim (inline foo bar))
(eval-when (compile load eval) (proclaim '(inline foo bar)))
- (proclaim-inline foo bar) ; XEmacs only
- (defsubst foo (...) ...) ; instead of defun; Emacs 19 only
+ (proclaim-inline foo bar) ; XEmacs only
+ (defsubst foo (...) ...) ; instead of defun; Emacs 19 only
*Please note:* This declaration remains in effect after the
containing source file is done. It is correct to use it to
* Menu:
-* Property Lists:: `remprop', `getf', `remf'
+* Property Lists:: `getf', `remf'
* Creating Symbols:: `gensym', `gentemp'
\1f
==============
These functions augment the standard Emacs Lisp functions `get' and
-`put' for operating on properties attached to symbols. There are also
+`put' for operating on properties attached to objects. There are also
functions for working with property lists as first-class data
-structures not attached to particular symbols.
-
- - 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.
- (This function was probably omitted from Emacs originally because,
- since `get' did not allow a DEFAULT, it was very difficult to
- distinguish between a missing property and a property whose value
- was `nil'; thus, setting a property to `nil' was close enough to
- `remprop' for most purposes.)
+structures not attached to particular objects.
- Function: getf place property &optional default
This function scans the list PLACE as if it were a property list,
function. In Emacs Lisp, it works just as well to use a regular
quote:
- (loop for x in y by #'cddr collect (mapcar #'plusp x)) ; Common Lisp
- (loop for x in y by 'cddr collect (mapcar 'plusp x)) ; Emacs Lisp
+ (loop for x in y by #'cddr collect (mapcar #'plusp x)) ; Common Lisp
+ (loop for x in y by 'cddr collect (mapcar 'plusp x)) ; Emacs Lisp
When `#'' introduces a `lambda' form, it is best to write out
`(function ...)' longhand in Emacs Lisp. You can use a regular
* remove-duplicates: Sequence Functions.
* remove-if: Sequence Functions.
* remove-if-not: Sequence Functions.
-* remprop: Property Lists.
* remq: Sequence Functions.
* replace: Sequence Functions.
* rest: List Functions.
undeclared. However, if it does have dependnacies, it must call
`emodules_load':
- int emodules_load (CONST char *module,
- CONST char *modname,
- CONST char *modver)
+ int emodules_load (const char *module,
+ const char *modname,
+ const char *modver)
The first argument MODULE is the name of the actual shared object or
DLL. You can omit the `.so', `.ell' or `.dll' extension of you wish.
\1f
Indirect:
internals.info-1: 1776
-internals.info-2: 45928
-internals.info-3: 93572
-internals.info-4: 141935
-internals.info-5: 183963
-internals.info-6: 233381
-internals.info-7: 282110
-internals.info-8: 331561
+internals.info-2: 46628
+internals.info-3: 94463
+internals.info-4: 143504
+internals.info-5: 193454
+internals.info-6: 243016
+internals.info-7: 286633
+internals.info-8: 335499
\1f
Tag Table:
(Indirect)
Node: Top\7f1776
-Node: A History of Emacs\7f6358
-Node: Through Version 18\7f7883
-Node: Lucid Emacs\7f11304
-Node: GNU Emacs 19\7f14322
-Node: GNU Emacs 20\7f16505
-Node: XEmacs\7f16932
-Node: XEmacs From the Outside\7f20111
-Node: The Lisp Language\7f21878
-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\7f60014
-Node: Rules When Writing New C Code\7f68572
-Node: General Coding Rules\7f69376
-Node: Writing Lisp Primitives\7f75113
-Node: Adding Global Lisp Variables\7f86282
-Node: Coding for Mule\7f89920
-Node: Character-Related Data Types\7f90899
-Node: Working With Character and Byte Positions\7f93572
-Node: Conversion to and from External Data\7f97322
-Node: General Guidelines for Writing Mule-Aware Code\7f102203
-Node: An Example of Mule-Aware Code\7f104234
-Node: Techniques for XEmacs Developers\7f106221
-Node: A Summary of the Various XEmacs Modules\7f109988
-Node: Low-Level Modules\7f110808
-Node: Basic Lisp Modules\7f118330
-Node: Modules for Standard Editing Operations\7f126651
-Node: Editor-Level Control Flow Modules\7f132539
-Node: Modules for the Basic Displayable Lisp Objects\7f135985
-Node: Modules for other Display-Related Lisp Objects\7f138507
-Node: Modules for the Redisplay Mechanism\7f139584
-Node: Modules for Interfacing with the File System\7f141935
-Node: Modules for Other Aspects of the Lisp Interpreter and Object System\7f145633
-Node: Modules for Interfacing with the Operating System\7f151086
-Node: Modules for Interfacing with X Windows\7f158747
-Node: Modules for Internationalization\7f162183
-Node: Allocation of Objects in XEmacs Lisp\7f164820
-Node: Introduction to Allocation\7f165374
-Node: Garbage Collection\7f170836
-Node: GCPROing\7f173789
-Node: Garbage Collection - Step by Step\7f180599
-Node: Invocation\7f180991
-Node: garbage_collect_1\7f183963
-Node: mark_object\7f193443
-Node: gc_sweep\7f195255
-Node: sweep_lcrecords_1\7f200318
-Node: compact_string_chars\7f201313
-Node: sweep_strings\7f203493
-Node: sweep_bit_vectors_1\7f204458
-Node: Integers and Characters\7f205134
-Node: Allocation from Frob Blocks\7f205886
-Node: lrecords\7f207490
-Node: Low-level allocation\7f219952
-Node: Pure Space\7f224120
-Node: Cons\7f224295
-Node: Vector\7f225011
-Node: Bit Vector\7f225588
-Node: Symbol\7f226081
-Node: Marker\7f226650
-Node: String\7f227205
-Node: Compiled Function\7f230818
-Node: Events and the Event Loop\7f230987
-Node: Introduction to Events\7f231466
-Node: Main Loop\7f233381
-Node: Specifics of the Event Gathering Mechanism\7f236956
-Node: Specifics About the Emacs Event\7f249409
-Node: The Event Stream Callback Routines\7f249664
-Node: Other Event Loop Functions\7f249909
-Node: Converting Events\7f251049
-Node: Dispatching Events; The Command Builder\7f251658
-Node: Evaluation; Stack Frames; Bindings\7f251893
-Node: Evaluation\7f252235
-Node: Dynamic Binding; The specbinding Stack; Unwind-Protects\7f258775
-Node: Simple Special Forms\7f261159
-Node: Catch and Throw\7f261941
-Node: Symbols and Variables\7f264516
-Node: Introduction to Symbols\7f264780
-Node: Obarrays\7f265818
-Node: Symbol Values\7f269351
-Node: Buffers and Textual Representation\7f271639
-Node: Introduction to Buffers\7f272297
-Node: The Text in a Buffer\7f274960
-Node: Buffer Lists\7f282110
-Node: Markers and Extents\7f284061
-Node: Bufbytes and Emchars\7f286326
-Node: The Buffer Object\7f286541
-Node: MULE Character Sets and Encodings\7f290021
-Node: Character Sets\7f291083
-Node: Encodings\7f294526
-Node: Japanese EUC (Extended Unix Code)\7f295593
-Node: JIS7\7f296407
-Node: Internal Mule Encodings\7f297757
-Node: Internal String Encoding\7f299587
-Node: Internal Character Encoding\7f301700
-Node: CCL\7f303424
-Node: The Lisp Reader and Compiler\7f310176
-Node: Lstreams\7f310389
-Node: Creating an Lstream\7f311420
-Node: Lstream Types\7f312630
-Node: Lstream Functions\7f312882
-Node: Lstream Methods\7f316448
-Node: Consoles; Devices; Frames; Windows\7f319590
-Node: Introduction to Consoles; Devices; Frames; Windows\7f319905
-Node: Point\7f322397
-Node: Window Hierarchy\7f323676
-Node: The Window Object\7f328124
-Node: The Redisplay Mechanism\7f331561
-Node: Critical Redisplay Sections\7f332353
-Node: Line Start Cache\7f333308
-Node: Redisplay Piece by Piece\7f336544
-Node: Extents\7f338580
-Node: Introduction to Extents\7f339118
-Node: Extent Ordering\7f340244
-Node: Format of the Extent Info\7f341485
-Node: Zero-Length Extents\7f343372
-Node: Mathematics of Extent Ordering\7f344770
-Node: Extent Fragments\7f349527
-Node: Faces\7f350613
-Node: Glyphs\7f350729
-Node: Specifiers\7f353747
-Node: Menus\7f353876
-Node: Subprocesses\7f356134
-Node: Interface to X Windows\7f358110
-Node: Index\7f358281
+Node: A History of Emacs\7f7030
+Node: Through Version 18\7f8555
+Node: Lucid Emacs\7f12003
+Node: GNU Emacs 19\7f15021
+Node: GNU Emacs 20\7f17204
+Node: XEmacs\7f17631
+Node: XEmacs From the Outside\7f20810
+Node: The Lisp Language\7f22577
+Node: XEmacs From the Perspective of Building\7f32120
+Node: XEmacs From the Inside\7f38245
+Node: The XEmacs Object System (Abstractly Speaking)\7f46628
+Node: How Lisp Objects Are Represented in C\7f60714
+Node: Rules When Writing New C Code\7f65391
+Node: General Coding Rules\7f66195
+Node: Writing Lisp Primitives\7f71915
+Node: Adding Global Lisp Variables\7f83084
+Node: Coding for Mule\7f86722
+Node: Character-Related Data Types\7f87701
+Node: Working With Character and Byte Positions\7f90698
+Node: Conversion to and from External Data\7f94463
+Node: General Guidelines for Writing Mule-Aware Code\7f100604
+Node: An Example of Mule-Aware Code\7f103292
+Node: Techniques for XEmacs Developers\7f105273
+Node: A Summary of the Various XEmacs Modules\7f113220
+Node: Low-Level Modules\7f114040
+Node: Basic Lisp Modules\7f121610
+Node: Modules for Standard Editing Operations\7f128220
+Node: Editor-Level Control Flow Modules\7f134108
+Node: Modules for the Basic Displayable Lisp Objects\7f137554
+Node: Modules for other Display-Related Lisp Objects\7f140076
+Node: Modules for the Redisplay Mechanism\7f141153
+Node: Modules for Interfacing with the File System\7f143504
+Node: Modules for Other Aspects of the Lisp Interpreter and Object System\7f147202
+Node: Modules for Interfacing with the Operating System\7f152655
+Node: Modules for Interfacing with X Windows\7f160316
+Node: Modules for Internationalization\7f163752
+Node: Allocation of Objects in XEmacs Lisp\7f166389
+Node: Introduction to Allocation\7f166910
+Node: Garbage Collection\7f170596
+Node: GCPROing\7f171752
+Node: Garbage Collection - Step by Step\7f178756
+Node: Invocation\7f179148
+Node: garbage_collect_1\7f182162
+Node: mark_object\7f191642
+Node: gc_sweep\7f193454
+Node: sweep_lcrecords_1\7f198517
+Node: compact_string_chars\7f199512
+Node: sweep_strings\7f201692
+Node: sweep_bit_vectors_1\7f202657
+Node: Integers and Characters\7f203333
+Node: Allocation from Frob Blocks\7f204085
+Node: lrecords\7f205689
+Node: Low-level allocation\7f217424
+Node: Cons\7f221531
+Node: Vector\7f222257
+Node: Bit Vector\7f222834
+Node: Symbol\7f223327
+Node: Marker\7f223681
+Node: String\7f224236
+Node: Compiled Function\7f227849
+Node: Dumping\7f228018
+Node: Overview\7f230239
+Node: Data descriptions\7f230809
+Node: Dumping phase\7f232814
+Node: Object inventory\7f233216
+Node: Address allocation\7f236070
+Node: The header\7f237457
+Node: Data dumping\7f237965
+Node: Pointers dumping\7f238626
+Node: Reloading phase\7f239844
+Node: Remaining issues\7f241605
+Node: Events and the Event Loop\7f242566
+Node: Introduction to Events\7f243016
+Node: Main Loop\7f244965
+Node: Specifics of the Event Gathering Mechanism\7f248540
+Node: Specifics About the Emacs Event\7f260993
+Node: The Event Stream Callback Routines\7f261248
+Node: Other Event Loop Functions\7f261493
+Node: Converting Events\7f262633
+Node: Dispatching Events; The Command Builder\7f263242
+Node: Evaluation; Stack Frames; Bindings\7f263477
+Node: Evaluation\7f263819
+Node: Dynamic Binding; The specbinding Stack; Unwind-Protects\7f270374
+Node: Simple Special Forms\7f272758
+Node: Catch and Throw\7f273541
+Node: Symbols and Variables\7f276116
+Node: Introduction to Symbols\7f276380
+Node: Obarrays\7f277448
+Node: Symbol Values\7f280981
+Node: Buffers and Textual Representation\7f283269
+Node: Introduction to Buffers\7f283927
+Node: The Text in a Buffer\7f286633
+Node: Buffer Lists\7f293783
+Node: Markers and Extents\7f295734
+Node: Bufbytes and Emchars\7f297999
+Node: The Buffer Object\7f298214
+Node: MULE Character Sets and Encodings\7f301694
+Node: Character Sets\7f302756
+Node: Encodings\7f306241
+Node: Japanese EUC (Extended Unix Code)\7f307308
+Node: JIS7\7f308140
+Node: Internal Mule Encodings\7f309490
+Node: Internal String Encoding\7f311320
+Node: Internal Character Encoding\7f313465
+Node: CCL\7f315189
+Node: The Lisp Reader and Compiler\7f321941
+Node: Lstreams\7f322154
+Node: Creating an Lstream\7f323185
+Node: Lstream Types\7f324412
+Node: Lstream Functions\7f324664
+Node: Lstream Methods\7f328230
+Node: Consoles; Devices; Frames; Windows\7f331372
+Node: Introduction to Consoles; Devices; Frames; Windows\7f331687
+Node: Point\7f334220
+Node: Window Hierarchy\7f335499
+Node: The Window Object\7f339947
+Node: The Redisplay Mechanism\7f343384
+Node: Critical Redisplay Sections\7f344176
+Node: Line Start Cache\7f345163
+Node: Redisplay Piece by Piece\7f348399
+Node: Extents\7f350436
+Node: Introduction to Extents\7f350970
+Node: Extent Ordering\7f352112
+Node: Format of the Extent Info\7f353353
+Node: Zero-Length Extents\7f355240
+Node: Mathematics of Extent Ordering\7f356638
+Node: Extent Fragments\7f361395
+Node: Faces\7f362481
+Node: Glyphs\7f362597
+Node: Specifiers\7f365614
+Node: Menus\7f365743
+Node: Subprocesses\7f368001
+Node: Interface to X Windows\7f369977
+Node: Index\7f370148
\1f
End Tag Table
* Rules When Writing New C Code::
* A Summary of the Various XEmacs Modules::
* Allocation of Objects in XEmacs Lisp::
+* Dumping::
* Events and the Event Loop::
* Evaluation; Stack Frames; Bindings::
* Symbols and Variables::
* Menus::
* Subprocesses::
* Interface to X Windows::
-* Index:: Index including concepts, functions, variables,
- and other terms.
+* Index::
- --- 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:
+--- The Detailed Node Listing ---
A History of Emacs
* Through Version 18:: Unification prevails.
* Lucid Emacs:: One version 19 Emacs.
* GNU Emacs 19:: The other version 19 Emacs.
+* GNU Emacs 20:: The other version 20 Emacs.
* XEmacs:: The continuation of Lucid Emacs.
Rules When Writing New C Code
* General Coding Rules::
* Writing Lisp Primitives::
* Adding Global Lisp Variables::
+* Coding for Mule::
* Techniques for XEmacs Developers::
+Coding for Mule
+
+* Character-Related Data Types::
+* Working With Character and Byte Positions::
+* Conversion to and from External Data::
+* General Guidelines for Writing Mule-Aware Code::
+* An Example of Mule-Aware Code::
+
A Summary of the Various XEmacs Modules
* Low-Level Modules::
* Allocation from Frob Blocks::
* lrecords::
* Low-level allocation::
-* Pure Space::
* Cons::
* Vector::
* Bit Vector::
* String::
* Compiled Function::
+Garbage Collection - Step by Step
+
+* Invocation::
+* garbage_collect_1::
+* mark_object::
+* gc_sweep::
+* sweep_lcrecords_1::
+* compact_string_chars::
+* sweep_strings::
+* sweep_bit_vectors_1::
+
+Dumping
+
+* Overview::
+* Data descriptions::
+* Dumping phase::
+* Reloading phase::
+
+Dumping phase
+
+* Object inventory::
+* Address allocation::
+* The header::
+* Data dumping::
+* Pointers dumping::
+
Events and the Event Loop
* Introduction to Events::
* Character Sets::
* Encodings::
* Internal Mule Encodings::
+* CCL::
Encodings
* Internal String Encoding::
* Internal Character Encoding::
-The Lisp Reader and Compiler
-
Lstreams
+* Creating an Lstream:: Creating an lstream object.
+* Lstream Types:: Different sorts of things that are streamed.
+* Lstream Functions:: Functions for working with lstreams.
+* Lstream Methods:: Creating new lstream types.
+
Consoles; Devices; Frames; Windows
* Introduction to Consoles; Devices; Frames; Windows::
* Point::
* Window Hierarchy::
+* The Window Object::
The Redisplay Mechanism
* Critical Redisplay Sections::
* Line Start Cache::
+* Redisplay Piece by Piece::
Extents
* Extent Ordering:: How extents are ordered internally.
* Format of the Extent Info:: The extent information in a buffer or string.
* Zero-Length Extents:: A weird special case.
-* Mathematics of Extent Ordering:: A rigorous foundation.
+* Mathematics of Extent Ordering:: A rigorous foundation.
* Extent Fragments:: Cached information useful for redisplay.
-Faces
-
-Glyphs
-
-Specifiers
-
-Menus
-
-Subprocesses
-
-Interface to X Windows
-
\1f
File: internals.info, Node: A History of Emacs, Next: XEmacs From the Outside, Prev: Top, Up: Top
* XEmacs:: The continuation of Lucid Emacs.
\1f
-File: internals.info, Node: Through Version 18, Next: Lucid Emacs, Up: A History of Emacs
+File: internals.info, Node: Through Version 18, Next: Lucid Emacs, Prev: A History of Emacs, Up: A History of Emacs
Through Version 18
==================
Unfortunately, there is no perfect language. Static typing allows a
compiler to catch programmer errors and produce more efficient code, but
-makes programming more tedious and less fun. For the forseeable future,
-an Ideal Editing and Programming Environment (and that is what XEmacs
-aspires to) will be programmable in multiple languages: high level ones
-like Lisp for user customization and prototyping, and lower level ones
-for infrastructure and industrial strength applications. If I had my
-way, XEmacs would be friendly towards the Python, Scheme, C++, ML,
-etc... communities. But there are serious technical difficulties to
+makes programming more tedious and less fun. For the foreseeable
+future, an Ideal Editing and Programming Environment (and that is what
+XEmacs aspires to) will be programmable in multiple languages: high
+level ones like Lisp for user customization and prototyping, and lower
+level ones for infrastructure and industrial strength applications. If
+I had my way, XEmacs would be friendly towards the Python, Scheme, C++,
+ML, etc... communities. But there are serious technical difficulties to
achieving that goal.
The word "application" in the previous paragraph was used
[ 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 ]
[ 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 ]
- <---> ^ <------------------------------------------------------>
- tag | a pointer to a structure, or an integer
- |
- mark bit
-
- The tag describes the type of the Lisp object. For integers and
-chars, the lower 28 bits contain the value of the integer or char; for
-all others, the lower 28 bits contain a pointer. The mark bit is used
-during garbage-collection, and is always 0 when garbage collection is
-not happening. (The way that garbage collection works, basically, is
-that it loops over all places where Lisp objects could exist--this
-includes all global variables in C that contain Lisp objects [including
-`Vobarray', the C equivalent of `obarray'; through this, all Lisp
-variables will get marked], plus various other places--and recursively
-scans through the Lisp objects, marking each object it finds by setting
-the mark bit. Then it goes through the lists of all objects allocated,
-freeing the ones that are not marked and turning off the mark bit of
-the ones that are marked.)
+ <---------------------------------------------------------> <->
+ a pointer to a structure, or an integer tag
+
+ A tag of 00 is used for all pointer object types, a tag of 10 is used
+for characters, and the other two tags 01 and 11 are joined together to
+form the integer object type. This representation gives us 31 bit
+integers and 30 bit characters, while pointers are represented directly
+without any bit masking or shifting. This representation, though,
+assumes that pointers to structs are always aligned to multiples of 4,
+so the lower 2 bits are always zero.
Lisp objects use the typedef `Lisp_Object', but the actual C type
used for the Lisp object can vary. It can be either a simple type
to represent the object (some compilers will use more general and less
efficient code for unions and structs even if they can fit in a machine
word). The union type, however, has the advantage of stricter type
-checking (if you accidentally pass an integer where a Lisp object is
-desired, you get a compile error), and it makes it easier to decode
-Lisp objects when debugging. The choice of which type to use is
+checking. If you accidentally pass an integer where a Lisp object is
+desired, you get a compile error. The choice of which type to use is
determined by the preprocessor constant `USE_UNION_TYPE' which is
defined via the `--use-union-type' option to `configure'.
- Note that there are only eight types that the tag can represent, but
-many more actual types than this. This is handled by having one of the
-tag types specify a meta-type called a "record"; for all such objects,
-the first four bytes of the pointed-to structure indicate what the
-actual type is.
-
- Note also that having 28 bits for pointers and integers restricts a
-lot of things to 256 megabytes of memory. (Basically, enough pointers
-and indices and whatnot get stuffed into Lisp objects that the total
-amount of memory used by XEmacs can't grow above 256 megabytes. In
-older versions of XEmacs and GNU Emacs, the tag was 5 bits wide,
-allowing for 32 types, which was more than the actual number of types
-that existed at the time, and no "record" type was necessary. However,
-this limited the editor to 64 megabytes total, which some users who
-edited large files might conceivably exceed.)
-
- Also, note that there is an implicit assumption here that all
-pointers are low enough that the top bits are all zero and can just be
-chopped off. On standard machines that allocate memory from the bottom
-up (and give each process its own address space), this works fine. Some
-machines, however, put the data space somewhere else in memory (e.g.
-beginning at 0x80000000). Those machines cope by defining
-`DATA_SEG_BITS' in the corresponding `m/' or `s/' file to the proper
-mask. Then, pointers retrieved from Lisp objects are automatically
-OR'ed with this value prior to being used.
-
- A corollary of the previous paragraph is that *(pointers to)
-stack-allocated structures cannot be put into Lisp objects*. The stack
-is generally located near the top of memory; if you put such a pointer
-into a Lisp object, it will get its top bits chopped off, and you will
-lose.
-
- Actually, there's an alternative representation of a `Lisp_Object',
-invented by Kyle Jones, that is used when the `--use-minimal-tagbits'
-option to `configure' is used. In this case the 2 lower bits are used
-for the tag bits. This representation assumes that pointers to structs
-are always aligned to multiples of 4, so the lower 2 bits are always
-zero.
-
- [ 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 ]
- [ 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 ]
-
- <---------------------------------------------------------> <->
- a pointer to a structure, or an integer tag
-
- A tag of 00 is used for all pointer object types, a tag of 10 is used
-for characters, and the other two tags 01 and 11 are joined together to
-form the integer object type. The markbit is moved to part of the
-structure being pointed at (integers and chars do not need to be marked,
-since no memory is allocated). This representation has these
-advantages:
-
- 1. 31 bits can be used for Lisp Integers.
-
- 2. _Any_ pointer can be represented directly, and no bit masking
- operations are necessary.
-
- The disadvantages are:
-
- 1. An extra level of indirection is needed when accessing the object
- types that were not record types. So checking whether a Lisp
- object is a cons cell becomes a slower operation.
-
- 2. Mark bits can no longer be stored directly in Lisp objects, so
- another place for them must be found. This means that a cons cell
- requires more memory than merely room for 2 lisp objects, leading
- to extra memory use.
-
- Various macros are used to construct Lisp objects and extract the
-components. Macros of the form `XINT()', `XCHAR()', `XSTRING()',
-`XSYMBOL()', etc. mask out the pointer/integer field and cast it to the
-appropriate type. All of the macros that construct pointers will `OR'
-with `DATA_SEG_BITS' if necessary. `XINT()' needs to be a bit tricky
-so that negative numbers are properly sign-extended: Usually it does
-this by shifting the number four bits to the left and then four bits to
-the right. This assumes that the right-shift operator does an
-arithmetic shift (i.e. it leaves the most-significant bit as-is rather
-than shifting in a zero, so that it mimics a divide-by-two even for
-negative numbers). Not all machines/compilers do this, and on the ones
-that don't, a more complicated definition is selected by defining
-`EXPLICIT_SIGN_EXTEND'.
-
- Note that when `ERROR_CHECK_TYPECHECK' is defined, the extractor
+ Various macros are used to convert between Lisp_Objects and the
+corresponding C type. Macros of the form `XINT()', `XCHAR()',
+`XSTRING()', `XSYMBOL()', do any required bit shifting and/or masking
+and cast it to the appropriate type. `XINT()' needs to be a bit tricky
+so that negative numbers are properly sign-extended. Since integers
+are stored left-shifted, if the right-shift operator does an arithmetic
+shift (i.e. it leaves the most-significant bit as-is rather than
+shifting in a zero, so that it mimics a divide-by-two even for negative
+numbers) the shift to remove the tag bit is enough. This is the case
+on all the systems we support.
+
+ Note that when `ERROR_CHECK_TYPECHECK' is defined, the converter
macros become more complicated--they check the tag bits and/or the type
field in the first four bytes of a record type to ensure that the
object is really of the correct type. This is great for catching places
These macros are of the form `XSETTYPE (LVALUE, RESULT)', i.e. they
have to be a statement rather than just used in an expression. The
reason for this is that standard C doesn't let you "construct" a
-structure (but GCC does). Granted, this sometimes isn't too convenient;
-for the case of integers, at least, you can use the function
-`make_int()', which constructs and _returns_ an integer Lisp object.
-Note that the `XSETTYPE()' macros are also affected by
+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. 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
the structure.
The C programmer is responsible for *guaranteeing* that a
-Lisp_Object is is the correct type before using the `XTYPE' macros.
-This is especially important in the case of lists. Use `XCAR' and
-`XCDR' if a Lisp_Object is certainly a cons cell, else use `Fcar()' and
-`Fcdr()'. Trust other C code, but not Lisp code. On the other hand,
-if XEmacs has an internal logic error, it's better to crash
-immediately, so sprinkle "unreachable" `abort()'s liberally about the
-source code.
+Lisp_Object is the correct type before using the `XTYPE' macros. This
+is especially important in the case of lists. Use `XCAR' and `XCDR' if
+a Lisp_Object is certainly a cons cell, else use `Fcar()' and `Fcdr()'.
+Trust other C code, but not Lisp code. On the other hand, if XEmacs
+has an internal logic error, it's better to crash immediately, so
+sprinkle `assert()'s and "unreachable" `abort()'s liberally about the
+source code. Where performance is an issue, use `type_checking_assert',
+`bufpos_checking_assert', and `gc_checking_assert', which do nothing
+unless the corresponding configure error checking flag was specified.
\1f
File: internals.info, Node: Rules When Writing New C Code, Next: A Summary of the Various XEmacs Modules, Prev: How Lisp Objects Are Represented in C, Up: Top
* Techniques for XEmacs Developers::
\1f
-File: internals.info, Node: General Coding Rules, Next: Writing Lisp Primitives, Up: Rules When Writing New C Code
+File: internals.info, Node: General Coding Rules, Next: Writing Lisp Primitives, Prev: Rules When Writing New C Code, Up: Rules When Writing New C Code
General Coding Rules
====================
work out correctly.
When including header files, always use angle brackets, not double
-quotes, except when the file to be included is in the same directory as
-the including file. If either file is a generated file, then that is
-not likely to be the case. In order to understand why we have this
-rule, imagine what happens when you do a build in the source directory
-using `./configure' and another build in another directory using
-`../work/configure'. There will be two different `config.h' files.
-Which one will be used if you `#include "config.h"'?
+quotes, except when the file to be included is always in the same
+directory as the including file. If either file is a generated file,
+then that is not likely to be the case. In order to understand why we
+have this rule, imagine what happens when you do a build in the source
+directory using `./configure' and another build in another directory
+using `../work/configure'. There will be two different `config.h'
+files. Which one will be used if you `#include "config.h"'?
*All global and static variables that are to be modifiable must be
declared uninitialized.* This means that you may not use the "declare
so that it becomes part of the (unmodifiable) code segment in the
dumped executable. This allows this memory to be shared among multiple
running XEmacs processes. XEmacs is careful to place as much constant
-data as possible into initialized variables (in particular, into what's
-called the "pure space"--see below) during the `temacs' phase.
+data as possible into initialized variables during the `temacs' phase.
*Please note:* This kludge only works on a few systems nowadays, and
is rapidly becoming irrelevant because most modern operating systems
The C source code makes heavy use of C preprocessor macros. One
popular macro style is:
- #define FOO(var, value) do { \
+ #define FOO(var, value) do { \
Lisp_Object FOO_value = (value); \
... /* compute using FOO_value */ \
(var) = bar; \
* An Example of Mule-Aware Code::
\1f
-File: internals.info, Node: Character-Related Data Types, Next: Working With Character and Byte Positions, Up: Coding for Mule
+File: internals.info, Node: Character-Related Data Types, Next: Working With Character and Byte Positions, Prev: Coding for Mule, Up: Coding for Mule
Character-Related Data Types
----------------------------
The data representing the text in a buffer or string is logically
a set of `Bufbyte's.
- XEmacs does not work with character formats all the time; when
- reading characters from the outside, it decodes them to an
+ XEmacs does not work with the same character formats all the time;
+ when reading characters from the outside, it decodes them to an
internal format, and likewise encodes them when writing.
`Bufbyte' (in fact `unsigned char') is the basic unit of XEmacs
- internal buffers and strings format.
+ internal buffers and strings format. A `Bufbyte *' is the type
+ that points at text encoded in the variable-width internal
+ encoding.
One character can correspond to one or more `Bufbyte's. In the
- current implementation, an ASCII character is represented by the
- same `Bufbyte', and extended characters are represented by a
- sequence of `Bufbyte's.
+ current Mule implementation, an ASCII character is represented by
+ the same `Bufbyte', and other characters are represented by a
+ sequence of two or more `Bufbyte's.
- Without Mule support, a `Bufbyte' is equivalent to an `Emchar'.
+ Without Mule support, there are exactly 256 characters, implicitly
+ Latin-1, and each character is represented using one `Bufbyte', and
+ there is a one-to-one correspondence between `Bufbyte's and
+ `Emchar's.
`Bufpos'
`Charcount'
A `Bufpos' represents a character position in a buffer or string.
A `Charcount' represents a number (count) of characters.
Logically, subtracting two `Bufpos' values yields a `Charcount'
- value. Although all of these are `typedef'ed to `int', we use
- them in preference to `int' to make it clear what sort of position
- is being used.
+ value. Although all of these are `typedef'ed to `EMACS_INT', we
+ use them in preference to `EMACS_INT' to make it clear what sort
+ of position is being used.
`Bufpos' and `Charcount' values are the only ones that are ever
visible to Lisp.
`Bytind'
`Bytecount'
A `Bytind' represents a byte position in a buffer or string. A
- `Bytecount' represents the distance between two positions in bytes.
- The relationship between `Bytind' and `Bytecount' is the same as
- the relationship between `Bufpos' and `Charcount'.
+ `Bytecount' represents the distance between two positions, in
+ bytes. The relationship between `Bytind' and `Bytecount' is the
+ same as the relationship between `Bufpos' and `Charcount'.
`Extbyte'
`Extcount'
is the distance between two `Extbyte's. Extbytes and Extcounts
are not all that frequent in XEmacs code.
+\1f
+File: internals.info, Node: Working With Character and Byte Positions, Next: Conversion to and from External Data, Prev: Character-Related Data Types, Up: Coding for Mule
+
+Working With Character and Byte Positions
+-----------------------------------------
+
+ Now that we have defined the basic character-related types, we can
+look at the macros and functions designed for work with them and for
+conversion between them. Most of these macros are defined in
+`buffer.h', and we don't discuss all of them here, but only the most
+important ones. Examining the existing code is the best way to learn
+about them.
+
+`MAX_EMCHAR_LEN'
+ This preprocessor constant is the maximum number of buffer bytes to
+ represent an Emacs character in the variable width internal
+ encoding. It is useful when allocating temporary strings to keep
+ a known number of characters. For instance:
+
+ {
+ Charcount cclen;
+ ...
+ {
+ /* Allocate place for CCLEN characters. */
+ Bufbyte *buf = (Bufbyte *)alloca (cclen * MAX_EMCHAR_LEN);
+ ...
+
+ If you followed the previous section, you can guess that,
+ logically, multiplying a `Charcount' value with `MAX_EMCHAR_LEN'
+ produces a `Bytecount' value.
+
+ In the current Mule implementation, `MAX_EMCHAR_LEN' equals 4.
+ Without Mule, it is 1.
+
+`charptr_emchar'
+`set_charptr_emchar'
+ The `charptr_emchar' macro takes a `Bufbyte' pointer and returns
+ the `Emchar' stored at that position. If it were a function, its
+ prototype would be:
+
+ Emchar charptr_emchar (Bufbyte *p);
+
+ `set_charptr_emchar' stores an `Emchar' to the specified byte
+ position. It returns the number of bytes stored:
+
+ Bytecount set_charptr_emchar (Bufbyte *p, Emchar c);
+
+ It is important to note that `set_charptr_emchar' is safe only for
+ appending a character at the end of a buffer, not for overwriting a
+ character in the middle. This is because the width of characters
+ varies, and `set_charptr_emchar' cannot resize the string if it
+ writes, say, a two-byte character where a single-byte character
+ used to reside.
+
+ A typical use of `set_charptr_emchar' can be demonstrated by this
+ example, which copies characters from buffer BUF to a temporary
+ string of Bufbytes.
+
+ {
+ Bufpos pos;
+ for (pos = beg; pos < end; pos++)
+ {
+ Emchar c = BUF_FETCH_CHAR (buf, pos);
+ p += set_charptr_emchar (buf, c);
+ }
+ }
+
+ Note how `set_charptr_emchar' is used to store the `Emchar' and
+ increment the counter, at the same time.
+
+`INC_CHARPTR'
+`DEC_CHARPTR'
+ These two macros increment and decrement a `Bufbyte' pointer,
+ respectively. They will adjust the pointer by the appropriate
+ number of bytes according to the byte length of the character
+ stored there. Both macros assume that the memory address is
+ located at the beginning of a valid character.
+
+ Without Mule support, `INC_CHARPTR (p)' and `DEC_CHARPTR (p)'
+ simply expand to `p++' and `p--', respectively.
+
+`bytecount_to_charcount'
+ Given a pointer to a text string and a length in bytes, return the
+ equivalent length in characters.
+
+ Charcount bytecount_to_charcount (Bufbyte *p, Bytecount bc);
+
+`charcount_to_bytecount'
+ Given a pointer to a text string and a length in characters,
+ return the equivalent length in bytes.
+
+ Bytecount charcount_to_bytecount (Bufbyte *p, Charcount cc);
+
+`charptr_n_addr'
+ Return a pointer to the beginning of the character offset CC (in
+ characters) from P.
+
+ Bufbyte *charptr_n_addr (Bufbyte *p, Charcount cc);
+
Foundation instead of in the original English.
\1f
-File: internals.info, Node: Working With Character and Byte Positions, Next: Conversion to and from External Data, Prev: Character-Related Data Types, Up: Coding for Mule
-
-Working With Character and Byte Positions
------------------------------------------
-
- Now that we have defined the basic character-related types, we can
-look at the macros and functions designed for work with them and for
-conversion between them. Most of these macros are defined in
-`buffer.h', and we don't discuss all of them here, but only the most
-important ones. Examining the existing code is the best way to learn
-about them.
-
-`MAX_EMCHAR_LEN'
- This preprocessor constant is the maximum number of buffer bytes
- per Emacs character, i.e. the byte length of an `Emchar'. It is
- useful when allocating temporary strings to keep a known number of
- characters. For instance:
-
- {
- Charcount cclen;
- ...
- {
- /* Allocate place for CCLEN characters. */
- Bufbyte *buf = (Bufbyte *)alloca (cclen * MAX_EMCHAR_LEN);
- ...
-
- If you followed the previous section, you can guess that,
- logically, multiplying a `Charcount' value with `MAX_EMCHAR_LEN'
- produces a `Bytecount' value.
-
- In the current Mule implementation, `MAX_EMCHAR_LEN' equals 4.
- Without Mule, it is 1.
-
-`charptr_emchar'
-`set_charptr_emchar'
- The `charptr_emchar' macro takes a `Bufbyte' pointer and returns
- the `Emchar' stored at that position. If it were a function, its
- prototype would be:
-
- Emchar charptr_emchar (Bufbyte *p);
-
- `set_charptr_emchar' stores an `Emchar' to the specified byte
- position. It returns the number of bytes stored:
-
- Bytecount set_charptr_emchar (Bufbyte *p, Emchar c);
-
- It is important to note that `set_charptr_emchar' is safe only for
- appending a character at the end of a buffer, not for overwriting a
- character in the middle. This is because the width of characters
- varies, and `set_charptr_emchar' cannot resize the string if it
- writes, say, a two-byte character where a single-byte character
- used to reside.
-
- A typical use of `set_charptr_emchar' can be demonstrated by this
- example, which copies characters from buffer BUF to a temporary
- string of Bufbytes.
-
- {
- Bufpos pos;
- for (pos = beg; pos < end; pos++)
- {
- Emchar c = BUF_FETCH_CHAR (buf, pos);
- p += set_charptr_emchar (buf, c);
- }
- }
-
- Note how `set_charptr_emchar' is used to store the `Emchar' and
- increment the counter, at the same time.
-
-`INC_CHARPTR'
-`DEC_CHARPTR'
- These two macros increment and decrement a `Bufbyte' pointer,
- respectively. They will adjust the pointer by the appropriate
- number of bytes according to the byte length of the character
- stored there. Both macros assume that the memory address is
- located at the beginning of a valid character.
-
- Without Mule support, `INC_CHARPTR (p)' and `DEC_CHARPTR (p)'
- simply expand to `p++' and `p--', respectively.
-
-`bytecount_to_charcount'
- Given a pointer to a text string and a length in bytes, return the
- equivalent length in characters.
-
- Charcount bytecount_to_charcount (Bufbyte *p, Bytecount bc);
-
-`charcount_to_bytecount'
- Given a pointer to a text string and a length in characters,
- return the equivalent length in bytes.
-
- Bytecount charcount_to_bytecount (Bufbyte *p, Charcount cc);
-
-`charptr_n_addr'
- Return a pointer to the beginning of the character offset CC (in
- characters) from P.
-
- Bufbyte *charptr_n_addr (Bufbyte *p, Charcount cc);
-
-\1f
File: internals.info, Node: Conversion to and from External Data, Next: General Guidelines for Writing Mule-Aware Code, Prev: Working With Character and Byte Positions, Up: Coding for Mule
Conversion to and from External Data
The interface to conversion between the internal and external
representations of text are the numerous conversion macros defined in
-`buffer.h'. Before looking at them, we'll look at the external formats
-supported by these macros.
-
- Currently meaningful formats are `FORMAT_BINARY', `FORMAT_FILENAME',
-`FORMAT_OS', and `FORMAT_CTEXT'. Here is a description of these.
-
-`FORMAT_BINARY'
- Binary format. This is the simplest format and is what we use in
- the absence of a more appropriate format. This converts according
- to the `binary' coding system:
-
- a. On input, bytes 0-255 are converted into characters 0-255.
+`buffer.h'. There used to be a fixed set of external formats supported
+by these macros, but now any coding system can be used with these
+macros. The coding system alias mechanism is used to create the
+following logical coding systems, which replace the fixed external
+formats. The (dontusethis-set-symbol-value-handler) mechanism was
+enhanced to make this possible (more work on that is needed - like
+remove the `dontusethis-' prefix).
+
+`Qbinary'
+ This is the simplest format and is what we use in the absence of a
+ more appropriate format. This converts according to the `binary'
+ coding system:
+
+ a. On input, bytes 0-255 are converted into (implicitly Latin-1)
+ characters 0-255. A non-Mule xemacs doesn't really know about
+ different character sets and the fonts to display them, so
+ the bytes can be treated as text in different 1-byte
+ encodings by simply setting the appropriate fonts. So in a
+ sense, non-Mule xemacs is a multi-lingual editor if, for
+ example, different fonts are used to display text in
+ different buffers, faces, or windows. The specifier
+ mechanism gives the user complete control over this kind of
+ behavior.
b. On output, characters 0-255 are converted into bytes 0-255
- and other characters are converted into `X'.
+ and other characters are converted into `~'.
-`FORMAT_FILENAME'
- Format used for filenames. In the original Mule, this is
- user-definable with the `pathname-coding-system' variable. For
- the moment, we just use the `binary' coding system.
+`Qfile_name'
+ Format used for filenames. This is user-definable via either the
+ `file-name-coding-system' or `pathname-coding-system' (now
+ obsolete) variables.
-`FORMAT_OS'
+`Qnative'
Format used for the external Unix environment--`argv[]', stuff
from `getenv()', stuff from the `/etc/passwd' file, etc.
+ Currently this is the same as Qfile_name. The two should be
+ distinguished for clarity and possible future separation.
+
+`Qctext'
+ Compound-text format. This is the standard X11 format used for
+ data stored in properties, selections, and the like. This is an
+ 8-bit no-lock-shift ISO2022 coding system. This is a real coding
+ system, unlike Qfile_name, which is user-definable.
+
+ There are two fundamental macros to convert between external and
+internal format.
+
+ `TO_INTERNAL_FORMAT' converts external data to internal format, and
+`TO_EXTERNAL_FORMAT' converts the other way around. The arguments each
+of these receives are a source type, a source, a sink type, a sink, and
+a coding system (or a symbol naming a coding system).
+
+ A typical call looks like
+ TO_EXTERNAL_FORMAT (LISP_STRING, str, C_STRING_MALLOC, ptr, Qfile_name);
+
+ which means that the contents of the lisp string `str' are written
+to a malloc'ed memory area which will be pointed to by `ptr', after the
+function returns. The conversion will be done using the `file-name'
+coding system, which will be controlled by the user indirectly by
+setting or binding the variable `file-name-coding-system'.
+
+ Some sources and sinks require two C variables to specify. We use
+some preprocessor magic to allow different source and sink types, and
+even different numbers of arguments to specify different types of
+sources and sinks.
+
+ So we can have a call that looks like
+ TO_INTERNAL_FORMAT (DATA, (ptr, len),
+ MALLOC, (ptr, len),
+ coding_system);
+
+ The parenthesized argument pairs are required to make the
+preprocessor magic work.
+
+ Here are the different source and sink types:
+
+``DATA, (ptr, len),''
+ input data is a fixed buffer of size LEN at address PTR
+
+``ALLOCA, (ptr, len),''
+ output data is placed in an alloca()ed buffer of size LEN pointed
+ to by PTR
+
+``MALLOC, (ptr, len),''
+ output data is in a malloc()ed buffer of size LEN pointed to by PTR
+
+``C_STRING_ALLOCA, ptr,''
+ equivalent to `ALLOCA (ptr, len_ignored)' on output.
+
+``C_STRING_MALLOC, ptr,''
+ equivalent to `MALLOC (ptr, len_ignored)' on output
+
+``C_STRING, ptr,''
+ equivalent to `DATA, (ptr, strlen (ptr) + 1)' on input
+
+``LISP_STRING, string,''
+ input or output is a Lisp_Object of type string
+
+``LISP_BUFFER, buffer,''
+ output is written to `(point)' in lisp buffer BUFFER
+
+``LISP_LSTREAM, lstream,''
+ input or output is a Lisp_Object of type lstream
- Perhaps should be the same as FORMAT_FILENAME.
-
-`FORMAT_CTEXT'
- Compound-text format. This is the standard X format used for data
- stored in properties, selections, and the like. This is an 8-bit
- no-lock-shift ISO2022 coding system.
-
- The macros to convert between these formats and the internal format,
-and vice versa, follow.
-
-`GET_CHARPTR_INT_DATA_ALLOCA'
-`GET_CHARPTR_EXT_DATA_ALLOCA'
- These two are the most basic conversion macros.
- `GET_CHARPTR_INT_DATA_ALLOCA' converts external data to internal
- format, and `GET_CHARPTR_EXT_DATA_ALLOCA' converts the other way
- around. The arguments each of these receives are PTR (pointer to
- the text in external format), LEN (length of texts in bytes), FMT
- (format of the external text), PTR_OUT (lvalue to which new text
- should be copied), and LEN_OUT (lvalue which will be assigned the
- length of the internal text in bytes). The resulting text is
- stored to a stack-allocated buffer. If the text doesn't need
- changing, these macros will do nothing, except for setting LEN_OUT.
-
- The macros above take many arguments which makes them unwieldy.
- For this reason, a number of convenience macros are defined with
- obvious functionality, but accepting less arguments. The general
- rule is that macros with `INT' in their name convert text to
- internal Emacs representation, whereas the `EXT' macros convert to
- external representation.
-
-`GET_C_CHARPTR_INT_DATA_ALLOCA'
-`GET_C_CHARPTR_EXT_DATA_ALLOCA'
- As their names imply, these macros work on C char pointers, which
- are zero-terminated, and thus do not need LEN or LEN_OUT
- parameters.
-
-`GET_STRING_EXT_DATA_ALLOCA'
-`GET_C_STRING_EXT_DATA_ALLOCA'
- These two macros convert a Lisp string into an external
- representation. The difference between them is that
- `GET_STRING_EXT_DATA_ALLOCA' stores its output to a generic
- string, providing LEN_OUT, the length of the resulting external
- string. On the other hand, `GET_C_STRING_EXT_DATA_ALLOCA' assumes
- that the caller will be satisfied with output string being
- zero-terminated.
-
- Note that for Lisp strings only one conversion direction makes
- sense.
-
-`GET_C_CHARPTR_EXT_BINARY_DATA_ALLOCA'
-`GET_CHARPTR_EXT_BINARY_DATA_ALLOCA'
-`GET_STRING_BINARY_DATA_ALLOCA'
-`GET_C_STRING_BINARY_DATA_ALLOCA'
-`GET_C_CHARPTR_EXT_FILENAME_DATA_ALLOCA'
-`...'
- These macros convert internal text to a specific external
- representation, with the external format being encoded into the
- name of the macro. Note that the `GET_STRING_...' and
- `GET_C_STRING...' macros lack the `EXT' tag, because they only
- make sense in that direction.
-
-`GET_C_CHARPTR_INT_BINARY_DATA_ALLOCA'
-`GET_CHARPTR_INT_BINARY_DATA_ALLOCA'
-`GET_C_CHARPTR_INT_FILENAME_DATA_ALLOCA'
-`...'
- These macros convert external text of a specific format to its
- internal representation, with the external format being incoded
- into the name of the macro.
+``LISP_OPAQUE, object,''
+ input or output is a Lisp_Object of type opaque
+
+ Often, the data is being converted to a '\0'-byte-terminated string,
+which is the format required by many external system C APIs. For these
+purposes, a source type of `C_STRING' or a sink type of
+`C_STRING_ALLOCA' or `C_STRING_MALLOC' is appropriate. Otherwise, we
+should try to keep XEmacs '\0'-byte-clean, which means using (ptr, len)
+pairs.
+
+ The sinks to be specified must be lvalues, unless they are the lisp
+object types `LISP_LSTREAM' or `LISP_BUFFER'.
+
+ For the sink types `ALLOCA' and `C_STRING_ALLOCA', the resulting
+text is stored in a stack-allocated buffer, which is automatically
+freed on returning from the function. However, the sink types `MALLOC'
+and `C_STRING_MALLOC' return `xmalloc()'ed memory. The caller is
+responsible for freeing this memory using `xfree()'.
+
+ Note that it doesn't make sense for `LISP_STRING' to be a source for
+`TO_INTERNAL_FORMAT' or a sink for `TO_EXTERNAL_FORMAT'. You'll get an
+assertion failure if you try.
\1f
File: internals.info, Node: General Guidelines for Writing Mule-Aware Code, Next: An Example of Mule-Aware Code, Prev: Conversion to and from External Data, Up: Coding for Mule
internal buffers literally.
This means that when a system function, such as `readdir', returns
- a string, you need to convert it using one of the conversion macros
- described in the previous chapter, before passing it further to
- Lisp. In the case of `readdir', you would use the
- `GET_C_CHARPTR_INT_FILENAME_DATA_ALLOCA' macro.
+ a string, you may need to convert it using one of the conversion
+ macros described in the previous chapter, before passing it
+ further to Lisp.
+
+ Actually, most of the basic system functions that accept
+ '\0'-terminated string arguments, like `stat()' and `open()', have
+ been *encapsulated* so that they are they `always' do internal to
+ external conversion themselves. This means you must pass
+ internally encoded data, typically the `XSTRING_DATA' of a
+ Lisp_String to these functions. This is actually a design bug,
+ since it unexpectedly changes the semantics of the system
+ functions. A better design would be to provide separate versions
+ of these system functions that accepted Lisp_Objects which were
+ lisp strings in place of their current `char *' arguments.
+
+ int stat_lisp (Lisp_Object path, struct stat *buf); /* Implement me */
Also note that many internal functions, such as `make_string',
accept Bufbytes, which removes the need for them to convert the
An Example of Mule-Aware Code
-----------------------------
- As an example of Mule-aware code, we shall will analyze the `string'
+ As an example of Mule-aware code, we will analyze the `string'
function, which conses up a Lisp string from the character arguments it
receives. Here is the definition, pasted from `alloc.c':
Techniques for XEmacs Developers
================================
- To make a quantified XEmacs, do: `make quantmacs'.
+ To make a purified XEmacs, do: `make puremacs'. To make a
+quantified XEmacs, do: `make quantmacs'.
- You simply can't dump Quantified and Purified images. Run the image
-like so: `quantmacs -batch -l loadup.el run-temacs XEMACS-ARGS...'.
+ You simply can't dump Quantified and Purified images (unless using
+the portable dumper). Purify gets confused when xemacs frees memory in
+one process that was allocated in a _different_ process on a different
+machine!. Run it like so:
+ temacs -batch -l loadup.el run-temacs XEMACS-ARGS...
Before you go through the trouble, are you compiling with all
-debugging and error-checking off? If not try that first. Be warned
+debugging and error-checking off? If not, try that first. Be warned
that while Quantify is directly responsible for quite a few
optimizations which have been made to XEmacs, doing a run which
generates results which can be acted upon is not necessarily a trivial
Function calls in elisp are especially expensive. Iterating over a
long list is going to be 30 times faster implemented in C than in Elisp.
+ Heavily used small code fragments need to be fast. The traditional
+way to implement such code fragments in C is with macros. But macros
+in C are known to be broken.
+
+ Macro arguments that are repeatedly evaluated may suffer from
+repeated side effects or suboptimal performance.
+
+ Variable names used in macros may collide with caller's variables,
+causing (at least) unwanted compiler warnings.
+
+ In order to solve these problems, and maintain statement semantics,
+one should use the `do { ... } while (0)' trick while trying to
+reference macro arguments exactly once using local variables.
+
+ Let's take a look at this poor macro definition:
+
+ #define MARK_OBJECT(obj) \
+ if (!marked_p (obj)) mark_object (obj), did_mark = 1
+
+ This macro evaluates its argument twice, and also fails if used like
+this:
+ if (flag) MARK_OBJECT (obj); else do_something();
+
+ A much better definition is
+
+ #define MARK_OBJECT(obj) do { \
+ Lisp_Object mo_obj = (obj); \
+ if (!marked_p (mo_obj)) \
+ { \
+ mark_object (mo_obj); \
+ did_mark = 1; \
+ } \
+ } while (0)
+
+ Notice the elimination of double evaluation by using the local
+variable with the obscure name. Writing safe and efficient macros
+requires great care. The one problem with macros that cannot be
+portably worked around is, since a C block has no value, a macro used
+as an expression rather than a statement cannot use the techniques just
+described to avoid multiple evaluation.
+
+ In most cases where a macro has function semantics, an inline
+function is a better implementation technique. Modern compiler
+optimizers tend to inline functions even if they have no `inline'
+keyword, and configure magic ensures that the `inline' keyword can be
+safely used as an additional compiler hint. Inline functions used in a
+single .c files are easy. The function must already be defined to be
+`static'. Just add another `inline' keyword to the definition.
+
+ inline static int
+ heavily_used_small_function (int arg)
+ {
+ ...
+ }
+
+ Inline functions in header files are trickier, because we would like
+to make the following optimization if the function is _not_ inlined
+(for example, because we're compiling for debugging). We would like the
+function to be defined externally exactly once, and each calling
+translation unit would create an external reference to the function,
+instead of including a definition of the inline function in the object
+code of every translation unit that uses it. This optimization is
+currently only available for gcc. But you don't have to worry about the
+trickiness; just define your inline functions in header files using this
+pattern:
+
+ INLINE_HEADER int
+ i_used_to_be_a_crufty_macro_but_look_at_me_now (int arg);
+ INLINE_HEADER int
+ i_used_to_be_a_crufty_macro_but_look_at_me_now (int arg)
+ {
+ ...
+ }
+
+ The declaration right before the definition is to prevent warnings
+when compiling with `gcc -Wmissing-declarations'. I consider issuing
+this warning for inline functions a gcc bug, but the gcc maintainers
+disagree.
+
+ Every header which contains inline functions, either directly by
+using `INLINE_HEADER' or indirectly by using `DECLARE_LRECORD' must be
+added to `inline.c''s includes to make the optimization described above
+work. (Optimization note: if all INLINE_HEADER functions are in fact
+inlined in all translation units, then the linker can just discard
+`inline.o', since it contains only unreferenced code).
+
To get started debugging XEmacs, take a look at the `.gdbinit' and
-`.dbxrc' files in the `src' directory. *Note Q2.1.15 - How to Debug an
-XEmacs problem with a debugger: (xemacs-faq)Q2.1.15 - How to Debug an
-XEmacs problem with a debugger.
+`.dbxrc' files in the `src' directory. See the section in the XEmacs
+FAQ on How to Debug an XEmacs problem with a debugger.
After making source code changes, run `make check' to ensure that
-you haven't introduced any regressions. If you're feeling ambitious,
-you can try to improve the test suite in `tests/automated'.
+you haven't introduced any regressions. If you want to make xemacs more
+reliable, please improve the test suite in `tests/automated'.
+
+ Did you make sure you didn't introduce any new compiler warnings?
+
+ Before submitting a patch, please try compiling at least once with
+
+ configure --with-mule --with-union-type --error-checking=all
Here are things to know when you create a new source file:
<...>' syntax, not the `#include "..."' syntax. The generated
headers are:
- `config.h puresize-adjust.h sheap-adjust.h paths.h Emacs.ad.h'
+ `config.h sheap-adjust.h paths.h Emacs.ad.h'
The basic rule is that you should assume builds using `--srcdir'
and the `#include <...>' syntax needs to be used when the
* 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
- `DECLARE_LRECORD', then it must be added to `inline.c''s includes.
- * Try compiling at least once with
+ Here is a checklist of things to do when creating a new lisp object
+type named FOO:
+
+ 1. create FOO.h
+
+ 2. create FOO.c
+
+ 3. add definitions of `syms_of_FOO', etc. to `FOO.c'
- gcc --with-mule --with-union-type --error-checking=all
+ 4. add declarations of `syms_of_FOO', etc. to `symsinit.h'
- * Did I mention that you should run the test suite?
- make check
+ 5. add calls to `syms_of_FOO', etc. to `emacs.c'
+
+ 6. add definitions of macros like `CHECK_FOO' and `FOOP' to `FOO.h'
+
+ 7. add the new type index to `enum lrecord_type'
+
+ 8. add a DEFINE_LRECORD_IMPLEMENTATION call to `FOO.c'
+
+ 9. add an INIT_LRECORD_IMPLEMENTATION call to `syms_of_FOO.c'
\1f
File: internals.info, Node: A Summary of the Various XEmacs Modules, Next: Allocation of Objects in XEmacs Lisp, Prev: Rules When Writing New C Code, Up: Top
* Modules for Internationalization::
\1f
-File: internals.info, Node: Low-Level Modules, Next: Basic Lisp Modules, Up: A Summary of the Various XEmacs Modules
+File: internals.info, Node: Low-Level Modules, Next: Basic Lisp Modules, Prev: A Summary of the Various XEmacs Modules, Up: A Summary of the Various XEmacs Modules
Low-Level Modules
=================
All initialization functions are prototyped in `symsinit.h'.
alloc.c
- pure.c
- puresize.h
The large module `alloc.c' implements all of the basic allocation and
garbage collection for Lisp objects. The most commonly used Lisp
subtypes in the subsystem; this provides a great deal of robustness to
the XEmacs code.
- `pure.c' contains the declaration of the "purespace" array. Pure
-space is a hack used to place some constant Lisp data into the code
-segment of the XEmacs executable, even though the data needs to be
-initialized through function calls. (See above in section VIII for more
-info about this.) During startup, certain sorts of data is
-automatically copied into pure space, and other data is copied manually
-in some of the basic Lisp files by calling the function `purecopy',
-which copies the object if possible (this only works in temacs, of
-course) and returns the new object. In particular, while temacs is
-executing, the Lisp reader automatically copies all compiled-function
-objects that it reads into pure space. Since compiled-function objects
-are large, are never modified, and typically comprise the majority of
-the contents of a compiled-Lisp file, this works well. While XEmacs is
-running, any attempt to modify an object that resides in pure space
-causes an error. Objects in pure space are never garbage collected -
-almost all of the time, they're intended to be permanent, and in any
-case you can't write into pure space to set the mark bits.
-
- `puresize.h' contains the declaration of the size of the pure space
-array. This depends on the optional features that are compiled in, any
-extra purespace requested by the user at compile time, and certain other
-factors (e.g. 64-bit machines need more pure space because their Lisp
-objects are larger). The smallest size that suffices should be used, so
-that there's no wasted space. If there's not enough pure space, you
-will get an error during the build process, specifying how much more
-pure space is needed.
-
eval.c
backtrace.h
Asian-language support, and is not currently used.
\1f
-File: internals.info, Node: Allocation of Objects in XEmacs Lisp, Next: Events and the Event Loop, Prev: A Summary of the Various XEmacs Modules, Up: Top
+File: internals.info, Node: Allocation of Objects in XEmacs Lisp, Next: Dumping, Prev: A Summary of the Various XEmacs Modules, Up: Top
Allocation of Objects in XEmacs Lisp
************************************
* Allocation from Frob Blocks::
* lrecords::
* Low-level allocation::
-* Pure Space::
* Cons::
* Vector::
* Bit Vector::
* Compiled Function::
\1f
-File: internals.info, Node: Introduction to Allocation, Next: Garbage Collection, Up: Allocation of Objects in XEmacs Lisp
+File: internals.info, Node: Introduction to Allocation, Next: Garbage Collection, Prev: Allocation of Objects in XEmacs Lisp, Up: Allocation of Objects in XEmacs Lisp
Introduction to Allocation
==========================
one C primitive for creating it.
Recall from section (VII) that a Lisp object, as stored in a 32-bit
-or 64-bit word, has a mark bit, a few tag bits, and a "value" that
-occupies the remainder of the bits. We can separate the different Lisp
-object types into four broad categories:
+or 64-bit word, has a few tag bits, and a "value" that occupies the
+remainder of the bits. We can separate the different Lisp object types
+into three broad categories:
* (a) Those for whom the value directly represents the contents of
the Lisp object. Only two types are in this category: integers and
necessary for such objects. Lisp objects of these types do not
need to be `GCPRO'ed.
- In the remaining three categories, the value is a pointer to a
-structure.
-
- * (b) Those for whom the tag directly specifies the type. Recall
- that there are only three tag bits; this means that at most five
- types can be specified this way. The most commonly-used types are
- stored in this format; this includes conses, strings, vectors, and
- sometimes symbols. With the exception of vectors, objects in this
- category are allocated in "frob blocks", i.e. large blocks of
- memory that are subdivided into individual objects. This saves a
- lot on malloc overhead, since there are typically quite a lot of
- these objects around, and the objects are small. (A cons, for
- example, occupies 8 bytes on 32-bit machines--4 bytes for each of
- the two objects it contains.) Vectors are individually
- `malloc()'ed since they are of variable size. (It would be
- possible, and desirable, to allocate vectors of certain small
- sizes out of frob blocks, but it isn't currently done.) Strings
- are handled specially: Each string is allocated in two parts, a
- fixed size structure containing a length and a data pointer, and
- the actual data of the string. The former structure is allocated
- in frob blocks as usual, and the latter data is stored in "string
- chars blocks" and is relocated during garbage collection to
- eliminate holes.
-
In the remaining two categories, the type is stored in the object
itself. The tag for all such objects is the generic "lrecord"
-(Lisp_Record) tag. The first four bytes (or eight, for 64-bit machines)
-of the object's structure are a pointer to a structure that describes
-the object's type, which includes method pointers and a pointer to a
-string naming the type. Note that it's possible to save some space by
-using a one- or two-byte tag, rather than a four- or eight-byte pointer
-to store the type, but it's not clear it's worth making the change.
-
- * (c) Those lrecords that are allocated in frob blocks (see above).
+(Lisp_Type_Record) tag. The first bytes of the object's structure are
+an integer (actually a char) characterising the object's type and some
+flags, in particular the mark bit used for garbage collection. A
+structure describing the type is accessible thru the
+lrecord_implementation_table indexed with said integer. This structure
+includes the method pointers and a pointer to a string naming the type.
+
+ * (b) Those lrecords that are allocated in frob blocks (see above).
This includes the objects that are most common and relatively
- small, and includes floats, compiled functions, symbols (when not
- in category (b)), extents, events, and markers. With the cleanup
- of frob blocks done in 19.12, it's not terribly hard to add more
- objects to this category, but it's a bit trickier than adding an
- object type to type (d) (esp. if the object needs a finalization
- method), and is not likely to save much space unless the object is
- small and there are many of them. (In fact, if there are very few
- of them, it might actually waste space.)
-
- * (d) Those lrecords that are individually `malloc()'ed. These are
+ small, and includes conses, strings, subrs, floats, compiled
+ functions, symbols, extents, events, and markers. With the
+ cleanup of frob blocks done in 19.12, it's not terribly hard to
+ add more objects to this category, but it's a bit trickier than
+ adding an object type to type (c) (esp. if the object needs a
+ finalization method), and is not likely to save much space unless
+ the object is small and there are many of them. (In fact, if there
+ are very few of them, it might actually waste space.)
+
+ * (c) Those lrecords that are individually `malloc()'ed. These are
called "lcrecords". All other types are in this category. Adding
a new type to this category is comparatively easy, and all types
added since 19.8 (when the current allocation scheme was devised,
have been in this category.
Note that bit vectors are a bit of a special case. They are simple
-lrecords as in category (c), but are individually `malloc()'ed like
+lrecords as in category (b), but are individually `malloc()'ed like
vectors. You can basically view them as exactly like vectors except
that their type is stored in lrecord fashion rather than in
directly-tagged fashion.
- Note that FSF Emacs redesigned their object system in 19.29 to follow
-a similar scheme. However, given RMS's expressed dislike for data
-abstraction, the FSF scheme is not nearly as clean or as easy to
-extend. (FSF calls items of type (c) `Lisp_Misc' and items of type (d)
-`Lisp_Vectorlike', with separate tags for each, although
-`Lisp_Vectorlike' is also used for vectors.)
-
\1f
File: internals.info, Node: Garbage Collection, Next: GCPROing, Prev: Introduction to Allocation, Up: Allocation of Objects in XEmacs Lisp
frob blocks, all vectors (which are chained in one big list), and all
lcrecords (which are likewise chained).
- Note that, when an object is marked, the mark has to occur inside of
-the object's structure, rather than in the 32-bit `Lisp_Object' holding
-the object's pointer; i.e. you can't just set the pointer's mark bit.
-This is because there may be many pointers to the same object. This
-means that the method of marking an object can differ depending on the
-type. The different marking methods are approximately as follows:
-
- 1. For conses, the mark bit of the car is set.
-
- 2. For strings, the mark bit of the string's plist is set.
-
- 3. For symbols when not lrecords, the mark bit of the symbol's plist
- is set.
-
- 4. For vectors, the length is negated after adding 1.
-
- 5. For lrecords, the pointer to the structure describing the type is
- changed (see below).
-
- 6. Integers and characters do not need to be marked, since no
- allocation occurs for them.
-
- The details of this are in the `mark_object()' function.
-
- Note that any code that operates during garbage collection has to be
-especially careful because of the fact that some objects may be marked
-and as such may not look like they normally do. In particular:
-
- Some object pointers may have their mark bit set. This will make
- `FOOBARP()' predicates fail. Use `GC_FOOBARP()' to deal with this.
-
- * Even if you clear the mark bit, `FOOBARP()' will still fail for
- lrecords because the implementation pointer has been changed (see
- below). `GC_FOOBARP()' will correctly deal with this.
-
- * Vectors have their size field munged, so anything that looks at
- this field will fail.
-
- * 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.
-
- Finally, note that garbage collection can be invoked explicitly by
-calling `garbage-collect' but is also called automatically by `eval',
-once a certain amount of memory has been allocated since the last
-garbage collection (according to `gc-cons-threshold').
+ Garbage collection can be invoked explicitly by calling
+`garbage-collect' but is also called automatically by `eval', once a
+certain amount of memory has been allocated since the last garbage
+collection (according to `gc-cons-threshold').
\1f
File: internals.info, Node: GCPROing, Next: Garbage Collection - Step by Step, Prev: Garbage Collection, Up: Allocation of Objects in XEmacs Lisp
all in-use objects must be reachable somehow or other from one of the
roots of accessibility. The roots of accessibility are:
- 1. All objects that have been `staticpro()'d. This is used for any
- global C variables that hold Lisp objects. A call to
- `staticpro()' happens implicitly as a result of any symbols
- declared with `defsymbol()' and any variables declared with
- `DEFVAR_FOO()'. You need to explicitly call `staticpro()' (in the
- `vars_of_foo()' method of a module) for other global C variables
- holding Lisp objects. (This typically includes internal lists and
- such things.)
+ 1. All objects that have been `staticpro()'d or
+ `staticpro_nodump()'ed. This is used for any global C variables
+ that hold Lisp objects. A call to `staticpro()' happens implicitly
+ as a result of any symbols declared with `defsymbol()' and any
+ variables declared with `DEFVAR_FOO()'. You need to explicitly
+ call `staticpro()' (in the `vars_of_foo()' method of a module) for
+ other global C variables holding Lisp objects. (This typically
+ includes internal lists and such things.). Use
+ `staticpro_nodump()' only in the rare cases when you do not want
+ the pointed variable to be saved at dump time but rather recompute
+ it at startup.
Note that `obarray' is one of the `staticpro()'d things.
Therefore, all functions and variables get marked through this.
* sweep_bit_vectors_1::
\1f
-File: internals.info, Node: Invocation, Next: garbage_collect_1, Up: Garbage Collection - Step by Step
+File: internals.info, Node: Invocation, Next: garbage_collect_1, Prev: Garbage Collection - Step by Step, Up: Garbage Collection - Step by Step
Invocation
----------
The upshot is that garbage collection can basically occur everywhere
`Feval', respectively `Ffuncall', is used - either directly or through
another function. Since calls to these two functions are hidden in
-various other functions, many calls to `garabge_collect_1' are not
+various other functions, many calls to `garbage_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 `or', `and', `if', `cond', `while', `setq', etc., miscellaneous
signals, as for example the ones raised by every `QUITE'-macro
triggered after pressing Ctrl-g.
+\1f
+File: internals.info, Node: garbage_collect_1, Next: mark_object, Prev: Invocation, Up: Garbage Collection - Step by Step
+
+`garbage_collect_1'
+-------------------
+
+ We can now describe exactly what happens after the invocation takes
+place.
+ 1. There are several cases in which the garbage collector is left
+ immediately: when we are already garbage collecting
+ (`gc_in_progress'), when the garbage collection is somehow
+ forbidden (`gc_currently_forbidden'), when we are currently
+ displaying something (`in_display') or when we are preparing for
+ the armageddon of the whole system (`preparing_for_armageddon').
+
+ 2. 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 `pre_gc_cursor' and `cursor_changed' take care of that.
+
+ 3. The state of `gc_currently_forbidden' must be restored after the
+ garbage collection, no matter what happens during the process. We
+ accomplish this by `record_unwind_protect'ing the suitable function
+ `restore_gc_inhibit' together with the current value of
+ `gc_currently_forbidden'.
+
+ 4. If we are concurrently running an interactive xemacs session, the
+ next step is simply to show the garbage collector's cursor/message.
+
+ 5. The following steps are the intrinsic steps of the garbage
+ collector, therefore `gc_in_progress' is set.
+
+ 6. For debugging purposes, it is possible to copy the current C stack
+ frame. However, this seems to be a currently unused feature.
+
+ 7. 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 (`clear_event_resource') and for specifiers
+ (`cleanup_specifiers').
+
+ 8. 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 `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:
+ * all constant symbols and static variables that are registered
+ via `staticpro' in the array `staticvec'. *Note Adding
+ Global Lisp Variables::.
+
+ * all Lisp objects that are created in C functions and that
+ must be protected from freeing them. They are registered in
+ the global list `gcprolist'. *Note GCPROing::.
+
+ * all local variables (i.e. their name fields `symbol' and old
+ values `old_values') that are bound during the evaluation by
+ the Lisp engine. They are stored in `specbinding' structs
+ pushed on a stack called `specpdl'. *Note Dynamic Binding;
+ The specbinding Stack; Unwind-Protects::.
+
+ * all catch blocks that the Lisp engine encounters during the
+ evaluation cause the creation of structs `catchtag' inserted
+ in the list `catchlist'. Their tag (`tag') and value (`val'
+ fields are freshly created objects and therefore have to be
+ marked. *Note Catch and Throw::.
+
+ * every function application pushes new structs `backtrace' on
+ the call stack of the Lisp engine (`backtrace_list'). The
+ unique parts that have to be marked are the fields for each
+ function (`function') and all their arguments (`args').
+ *Note Evaluation::.
+
+ * all objects that are used by the redisplay engine that must
+ not be freed are marked by a special function called
+ `mark_redisplay' (in `redisplay.c').
+
+ * 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
+ `mark_profiling_info'
+
+ 9. 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
+ `make-hash-table'.
+
+ Because there are complicated dependency rules about when and what
+ to mark while processing weak hash tables, the standard `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 `finish_marking_weak_hash_tables'. This
+ function iterates over each hash table entry `hentries' for each
+ weak hash table in `Vall_weak_hash_tables'. Depending on the type
+ of a table, the appropriate action is performed. If a table is
+ acting as `HASH_TABLE_KEY_WEAK', and a key already marked,
+ everything reachable from the `value' component is marked. If it is
+ acting as a `HASH_TABLE_VALUE_WEAK' and the value component is
+ already marked, the marking starts beginning only from the `key'
+ component. If it is a `HASH_TABLE_KEY_CAR_WEAK' and the car of
+ the key entry is already marked, we mark both the `key' and
+ `value' components. Finally, if the table is of the type
+ `HASH_TABLE_VALUE_CAR_WEAK' and the car of the value components is
+ already marked, again both the `key' and the `value' components
+ get marked.
+
+ Again, there are lists with comparable properties called weak
+ lists. There exist different peculiarities of their types called
+ `simple', `assoc', `key-assoc' and `value-assoc'. You can find
+ further details about them in the description to the function
+ `make-weak-list'. The scheme of their marking is similar: all weak
+ lists are listed in `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 `WEAK_LIST_SIMPLE' and the elem is
+ marked, we mark the `cons' part. If it is a `WEAK_LIST_ASSOC' and
+ not a pair or a pair with both marked car and cdr, we mark the
+ `cons' and the `elem'. If it is a `WEAK_LIST_KEY_ASSOC' and not a
+ pair or a pair with a marked car of the elem, we mark the `cons'
+ and the `elem'. Finally, if it is a `WEAK_LIST_VALUE_ASSOC' and
+ not a pair or a pair with a marked cdr of the elem, we mark both
+ the `cons' and the `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.
+
+ 10. 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 `prune_weak_hash_tables' does the job for weak hash
+ tables. Totally unmarked hash tables are removed from the list
+ `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 `key' and `value' is unmarked.
+
+ The same idea applies to the weak lists. It is accomplished by
+ `prune_weak_lists': An unmarked list is pruned from
+ `Vall_weak_lists' immediately. A marked list is treated more
+ carefully by going over it and removing just the unmarked pairs.
+
+ 11. The function `prune_specifiers' checks all listed specifiers held
+ in `Vall_specifiers' and removes the ones from the lists that are
+ unmarked.
+
+ 12. All syntax tables are stored in a list called
+ `Vall_syntax_tables'. The function `prune_syntax_tables' walks
+ through it and unlinks the tables that are unmarked.
+
+ 13. Next, we will attack the complete sweeping - the function
+ `gc_sweep' which holds the predominance.
+
+ 14. First, all the variables with respect to garbage collection are
+ reset. `consing_since_gc' - the counter of the created cells since
+ the last garbage collection - is set back to 0, and
+ `gc_in_progress' is not `true' anymore.
+
+ 15. In case the session is interactive, the displayed cursor and
+ message are removed again.
+
+ 16. The state of `gc_inhibit' is restored to the former value by
+ unwinding the stack.
+
+ 17. A small memory reserve is always held back that can be reached by
+ `breathing_space'. If nothing more is left, we create a new reserve
+ and exit.
+
+\1f
+File: internals.info, Node: mark_object, Next: gc_sweep, Prev: garbage_collect_1, Up: Garbage Collection - Step by Step
+
+`mark_object'
+-------------
+
+ The first thing that is checked while marking an object is whether
+the object is a real Lisp object `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. *Note 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 (`C_READONLY_RECORD_HEADER'). The object in question is
+already marked, and need not be marked for the second time (checked by
+`MARKED_RECORD_HEADER_P'). If it is a special, unmarkable object
+(`UNMARKABLE_RECORD_HEADER_P', apparently, these are objects that sit
+in some const space, and can therefore not be marked, see
+`this_one_is_unmarkable' in `alloc.c').
+
+ Now, the actual marking is feasible. We do so by once using the macro
+`MARK_RECORD_HEADER' to mark the object itself (actually the special
+flag in the lrecord header), and calling its special marker "method"
+`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 `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 `mark_object' process beginning with this next
+object.
+
Foundation instead of in the original English.
\1f
-File: internals.info, Node: garbage_collect_1, Next: mark_object, Prev: Invocation, Up: Garbage Collection - Step by Step
-
-`garbage_collect_1'
--------------------
-
- We can now describe exactly what happens after the invocation takes
-place.
- 1. There are several cases in which the garbage collector is left
- immediately: when we are already garbage collecting
- (`gc_in_progress'), when the garbage collection is somehow
- forbidden (`gc_currently_forbidden'), when we are currently
- displaying something (`in_display') or when we are preparing for
- the armageddon of the whole system (`preparing_for_armageddon').
-
- 2. 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 `pre_gc_curser' and `cursor_changed' take care of that.
-
- 3. The state of `gc_currently_forbidden' must be restored after the
- garbage collection, no matter what happens during the process. We
- accomplish this by `record_unwind_protect'ing the suitable function
- `restore_gc_inhibit' together with the current value of
- `gc_currently_forbidden'.
-
- 4. If we are concurrently running an interactive xemacs session, the
- next step is simply to show the garbage collector's cursor/message.
-
- 5. The following steps are the intrinsic steps of the garbage
- collector, therefore `gc_in_progress' is set.
-
- 6. For debugging purposes, it is possible to copy the current C stack
- frame. However, this seems to be a currently unused feature.
-
- 7. 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 (`clear_event_resource') and for specifiers
- (`cleanup_specifiers').
-
- 8. 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 `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:
- * all constant symbols and static variables that are registered
- via `staticpro' in the array `staticvec'. *Note Adding
- Global Lisp Variables::.
-
- * all Lisp objects that are created in C functions and that
- must be protected from freeing them. They are registered in
- the global list `gcprolist'. *Note GCPROing::.
-
- * all local variables (i.e. their name fields `symbol' and old
- values `old_values') that are bound during the evaluation by
- the Lisp engine. They are stored in `specbinding' structs
- pushed on a stack called `specpdl'. *Note Dynamic Binding;
- The specbinding Stack; Unwind-Protects::.
-
- * all catch blocks that the Lisp engine encounters during the
- evaluation cause the creation of structs `catchtag' inserted
- in the list `catchlist'. Their tag (`tag') and value (`val'
- fields are freshly created objects and therefore have to be
- marked. *Note Catch and Throw::.
-
- * every function application pushes new structs `backtrace' on
- the call stack of the Lisp engine (`backtrace_list'). The
- unique parts that have to be marked are the fields for each
- function (`function') and all their arguments (`args').
- *Note Evaluation::.
-
- * all objects that are used by the redisplay engine that must
- not be freed are marked by a special function called
- `mark_redisplay' (in `redisplay.c').
-
- * 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
- `mark_profiling_info'
-
- 9. 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
- `make-hash-table'.
-
- Because there are complicated dependency rules about when and what
- to mark while processing weak hash tables, the standard `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 `finish_marking_weak_hash_tables'. This
- function iterates over each hash table entry `hentries' for each
- weak hash table in `Vall_weak_hash_tables'. Depending on the type
- of a table, the appropriate action is performed. If a table is
- acting as `HASH_TABLE_KEY_WEAK', and a key already marked,
- everything reachable from the `value' component is marked. If it is
- acting as a `HASH_TABLE_VALUE_WEAK' and the value component is
- already marked, the marking starts beginning only from the `key'
- component. If it is a `HASH_TABLE_KEY_CAR_WEAK' and the car of
- the key entry is already marked, we mark both the `key' and
- `value' components. Finally, if the table is of the type
- `HASH_TABLE_VALUE_CAR_WEAK' and the car of the value components is
- already marked, again both the `key' and the `value' components
- get marked.
-
- Again, there are lists with comparable properties called weak
- lists. There exist different peculiarities of their types called
- `simple', `assoc', `key-assoc' and `value-assoc'. You can find
- further details about them in the description to the function
- `make-weak-list'. The scheme of their marking is similar: all weak
- lists are listed in `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 `WEAK_LIST_SIMPLE' and the elem is
- marked, we mark the `cons' part. If it is a `WEAK_LIST_ASSOC' and
- not a pair or a pair with both marked car and cdr, we mark the
- `cons' and the `elem'. If it is a `WEAK_LIST_KEY_ASSOC' and not a
- pair or a pair with a marked car of the elem, we mark the `cons'
- and the `elem'. Finally, if it is a `WEAK_LIST_VALUE_ASSOC' and
- not a pair or a pair with a marked cdr of the elem, we mark both
- the `cons' and the `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.
-
- 10. 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 `prune_weak_hash_tables' does the job for weak hash
- tables. Totally unmarked hash tables are removed from the list
- `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 `key' and `value' is unmarked.
-
- The same idea applies to the weak lists. It is accomplished by
- `prune_weak_lists': An unmarked list is pruned from
- `Vall_weak_lists' immediately. A marked list is treated more
- carefully by going over it and removing just the unmarked pairs.
-
- 11. The function `prune_specifiers' checks all listed specifiers held
- in `Vall_speficiers' and removes the ones from the lists that are
- unmarked.
-
- 12. All syntax tables are stored in a list called
- `Vall_syntax_tables'. The function `prune_syntax_tables' walks
- through it and unlinks the tables that are unmarked.
-
- 13. Next, we will attack the complete sweeping - the function
- `gc_sweep' which holds the predominance.
-
- 14. First, all the variables with respect to garbage collection are
- reset. `consing_since_gc' - the counter of the created cells since
- the last garbage collection - is set back to 0, and
- `gc_in_progress' is not `true' anymore.
-
- 15. In case the session is interactive, the displayed cursor and
- message are removed again.
-
- 16. The state of `gc_inhibit' is restored to the former value by
- unwinding the stack.
-
- 17. A small memory reserve is always held back that can be reached by
- `breathing_space'. If nothing more is left, we create a new reserve
- and exit.
-
-\1f
-File: internals.info, Node: mark_object, Next: gc_sweep, Prev: garbage_collect_1, Up: Garbage Collection - Step by Step
-
-`mark_object'
--------------
-
- The first thing that is checked while marking an object is whether
-the object is a real Lisp object `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. *Note 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 (`C_READONLY_RECORD_HEADER'). The object in question is
-already marked, and need not be marked for the second time (checked by
-`MARKED_RECORD_HEADER_P'). If it is a special, unmarkable object
-(`UNMARKABLE_RECORD_HEADER_P', apparently, these are objects that sit
-in some CONST space, and can therefore not be marked, see
-`this_one_is_unmarkable' in `alloc.c').
-
- Now, the actual marking is feasible. We do so by once using the macro
-`MARK_RECORD_HEADER' to mark the object itself (actually the special
-flag in the lrecord header), and calling its special marker "method"
-`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 `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 `mark_object' process beginning with this next
-object.
-
-\1f
File: internals.info, Node: gc_sweep, Next: sweep_lcrecords_1, Prev: mark_object, Up: Garbage Collection - Step by Step
`gc_sweep'
[see `lrecord.h']
All lrecords have at the beginning of their structure a `struct
-lrecord_header'. This just contains a pointer to a `struct
+lrecord_header'. This just contains a type number and some flags,
+including the mark bit. All builtin type numbers are defined as
+constants in `enum lrecord_type', to allow the compiler to generate
+more efficient code for `TYPEP'. The type number, thru the
+`lrecord_implementation_table', gives access to a `struct
lrecord_implementation', which is a structure containing method pointers
and such. There is one of these for each type, and it is a global,
constant, statically-declared structure that is declared in the
-`DEFINE_LRECORD_IMPLEMENTATION()' macro. (This macro actually declares
-an array of two `struct lrecord_implementation' structures. The first
-one contains all the standard method pointers, and is used in all
-normal circumstances. During garbage collection, however, the lrecord
-is "marked" by bumping its implementation pointer by one, so that it
-points to the second structure in the array. This structure contains a
-special indication in it that it's a "marked-object" structure: the
-finalize method is the special function `this_marks_a_marked_record()',
-and all other methods are null pointers. At the end of garbage
-collection, all lrecords will either be reclaimed or unmarked by
-decrementing their implementation pointers, so this second structure
-pointer will never remain past garbage collection.
-
- Simple lrecords (of type (c) above) just have a `struct
+`DEFINE_LRECORD_IMPLEMENTATION()' macro.
+
+ Simple lrecords (of type (b) above) just have a `struct
lrecord_header' at their beginning. lcrecords, however, actually have a
`struct lcrecord_header'. This, in turn, has a `struct lrecord_header'
at its beginning, so sanity is preserved; but it also has a pointer
Whenever you create an lrecord, you need to call either
`DEFINE_LRECORD_IMPLEMENTATION()' or
`DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION()'. This needs to be specified
-in a C file, at the top level. What this actually does is define and
-initialize the implementation structure for the lrecord. (And possibly
-declares a function `error_check_foo()' that implements the `XFOO()'
-macro when error-checking is enabled.) The arguments to the macros are
-the actual type name (this is used to construct the C variable name of
-the lrecord implementation structure and related structures using the
-`##' macro concatenation operator), a string that names the type on the
-Lisp level (this may not be the same as the C type name; typically, the
-C type name has underscores, while the Lisp string has dashes), various
-method pointers, and the name of the C structure that contains the
-object. The methods are used to encapsulate type-specific information
-about the object, such as how to print it or mark it for garbage
-collection, so that it's easy to add new object types without having to
-add a specific case for each new type in a bunch of different places.
+in a `.c' file, at the top level. What this actually does is define
+and initialize the implementation structure for the lrecord. (And
+possibly declares a function `error_check_foo()' that implements the
+`XFOO()' macro when error-checking is enabled.) The arguments to the
+macros are the actual type name (this is used to construct the C
+variable name of the lrecord implementation structure and related
+structures using the `##' macro concatenation operator), a string that
+names the type on the Lisp level (this may not be the same as the C
+type name; typically, the C type name has underscores, while the Lisp
+string has dashes), various method pointers, and the name of the C
+structure that contains the object. The methods are used to
+encapsulate type-specific information about the object, such as how to
+print it or mark it for garbage collection, so that it's easy to add
+new object types without having to add a specific case for each new
+type in a bunch of different places.
The difference between `DEFINE_LRECORD_IMPLEMENTATION()' and
`DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION()' is that the former is used
For the purpose of keeping allocation statistics, the allocation
engine keeps a list of all the different types that exist. Note that,
since `DEFINE_LRECORD_IMPLEMENTATION()' is a macro that is specified at
-top-level, there is no way for it to add to the list of all existing
-types. What happens instead is that each implementation structure
-contains in it a dynamically assigned number that is particular to that
-type. (Or rather, it contains a pointer to another structure that
-contains this number. This evasiveness is done so that the
-implementation structure can be declared const.) In the sweep stage of
-garbage collection, each lrecord is examined to see if its
-implementation structure has its dynamically-assigned number set. If
-not, it must be a new type, and it is added to the list of known types
-and a new number assigned. The number is used to index into an array
-holding the number of objects of each type and the total memory
-allocated for objects of that type. The statistics in this array are
-also computed during the sweep stage. These statistics are returned by
-the call to `garbage-collect' and are printed out at the end of the
-loadup phase.
+top-level, there is no way for it to initialize the global data
+structures containing type information, like
+`lrecord_implementations_table'. For this reason a call to
+`INIT_LRECORD_IMPLEMENTATION' must be added to the same source file
+containing `DEFINE_LRECORD_IMPLEMENTATION', but instead of to the top
+level, to one of the init functions, typically `syms_of_FOO.c'.
+`INIT_LRECORD_IMPLEMENTATION' must be called before an object of this
+type is used.
+
+ The type number is also used to index into an array holding the
+number of objects of each type and the total memory allocated for
+objects of that type. The statistics in this array are computed during
+the sweep stage. These statistics are returned by the call to
+`garbage-collect'.
Note that for every type defined with a `DEFINE_LRECORD_*()' macro,
there needs to be a `DECLARE_LRECORD_IMPLEMENTATION()' somewhere in a
configurations and opaques.
\1f
-File: internals.info, Node: Low-level allocation, Next: Pure Space, Prev: lrecords, Up: Allocation of Objects in XEmacs Lisp
+File: internals.info, Node: Low-level allocation, Next: Cons, Prev: lrecords, Up: Allocation of Objects in XEmacs Lisp
Low-level allocation
====================
the memory warnings are not functional.)
Allocated memory that is going to be used to make a Lisp object is
-created using `allocate_lisp_storage()'. This calls `xmalloc()' but
-also verifies that the pointer to the memory can fit into a Lisp word
-(remember that some bits are taken away for a type tag and a mark bit).
-If not, an error is issued through `memory_full()'.
+created using `allocate_lisp_storage()'. This just calls `xmalloc()'.
+It used to verify that the pointer to the memory can fit into a Lisp
+word, before the current Lisp object representation was introduced.
`allocate_lisp_storage()' is called by `alloc_lcrecord()',
`ALLOCATE_FIXED_TYPE()', and the vector and bit-vector creation
routines. These routines also call `INCREMENT_CONS_COUNTER()' at the
is reached.
\1f
-File: internals.info, Node: Pure Space, Next: Cons, Prev: Low-level allocation, Up: Allocation of Objects in XEmacs Lisp
-
-Pure Space
-==========
-
- Not yet documented.
-
-\1f
-File: internals.info, Node: Cons, Next: Vector, Prev: Pure Space, Up: Allocation of Objects in XEmacs Lisp
+File: internals.info, Node: Cons, Next: Vector, Prev: Low-level allocation, Up: Allocation of Objects in XEmacs Lisp
Cons
====
Symbol
======
- Symbols are also allocated in frob blocks. Note that the code
-exists for symbols to be either lrecords (category (c) above) or simple
-types (category (b) above), and are lrecords by default (I think),
-although there is no good reason for this.
-
- Note that symbols in the awful horrible obarray structure are
-chained through their `next' field.
+ Symbols are also allocated in frob blocks. Symbols in the awful
+horrible obarray structure are chained through their `next' field.
Remember that `intern' looks up a symbol in an obarray, creating one
if necessary.
Not yet documented.
\1f
-File: internals.info, Node: Events and the Event Loop, Next: Evaluation; Stack Frames; Bindings, Prev: Allocation of Objects in XEmacs Lisp, Up: Top
+File: internals.info, Node: Dumping, Next: Events and the Event Loop, Prev: Allocation of Objects in XEmacs Lisp, Up: Top
+
+Dumping
+*******
+
+What is dumping and its justification
+=====================================
+
+ The C code of XEmacs is just a Lisp engine with a lot of built-in
+primitives useful for writing an editor. The editor itself is written
+mostly in Lisp, and represents around 100K lines of code. Loading and
+executing the initialization of all this code takes a bit a time (five
+to ten times the usual startup time of current xemacs) and requires
+having all the lisp source files around. Having to reload them each
+time the editor is started would not be acceptable.
+
+ The traditional solution to this problem is called dumping: the build
+process first creates the lisp engine under the name `temacs', then
+runs it until it has finished loading and initializing all the lisp
+code, and eventually creates a new executable called `xemacs' including
+both the object code in `temacs' and all the contents of the memory
+after the initialization.
+
+ This solution, while working, has a huge problem: the creation of the
+new executable from the actual contents of memory is an extremely
+system-specific process, quite error-prone, and which interferes with a
+lot of system libraries (like malloc). It is even getting worse
+nowadays with libraries using constructors which are automatically
+called when the program is started (even before main()) which tend to
+crash when they are called multiple times, once before dumping and once
+after (IRIX 6.x libz.so pulls in some C++ image libraries thru
+dependencies which have this problem). Writing the dumper is also one
+of the most difficult parts of porting XEmacs to a new operating system.
+Basically, `dumping' is an operation that is just not officially
+supported on many operating systems.
+
+ The aim of the portable dumper is to solve the same problem as the
+system-specific dumper, that is to be able to reload quickly, using only
+a small number of files, the fully initialized lisp part of the editor,
+without any system-specific hacks.
+
+* Menu:
+
+* Overview::
+* Data descriptions::
+* Dumping phase::
+* Reloading phase::
+* Remaining issues::
+
+\1f
+File: internals.info, Node: Overview, Next: Data descriptions, Prev: Dumping, Up: Dumping
+
+Overview
+========
+
+ The portable dumping system has to:
+
+ 1. At dump time, write all initialized, non-quickly-rebuildable data
+ to a file [Note: currently named `xemacs.dmp', but the name will
+ change], along with all informations needed for the reloading.
+
+ 2. When starting xemacs, reload the dump file, relocate it to its new
+ starting address if needed, and reinitialize all pointers to this
+ data. Also, rebuild all the quickly rebuildable data.
+
+\1f
+File: internals.info, Node: Data descriptions, Next: Dumping phase, Prev: Overview, Up: Dumping
+
+Data descriptions
+=================
+
+ The more complex task of the dumper is to be able to write lisp
+objects (lrecords) and C structs to disk and reload them at a different
+address, updating all the pointers they include in the process. This
+is done by using external data descriptions that give information about
+the layout of the structures in memory.
+
+ The specification of these descriptions is in lrecord.h. A
+description of an lrecord is an array of struct lrecord_description.
+Each of these structs include a type, an offset in the structure and
+some optional parameters depending on the type. For instance, here is
+the string description:
+
+ static const struct lrecord_description string_description[] = {
+ { 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) },
+ { XD_END }
+ };
+
+ The first line indicates a member of type Bytecount, which is used by
+the next, indirect directive. The second means "there is a pointer to
+some opaque data in the field `data'". The length of said data is
+given by the expression `XD_INDIRECT(0, 1)', which means "the value in
+the 0th line of the description (welcome to C) plus one". The third
+line means "there is a Lisp_Object member `plist' in the Lisp_String
+structure". `XD_END' then ends the description.
+
+ This gives us all the information we need to move around what is
+pointed to by a structure (C or lrecord) and, by transitivity,
+everything that it points to. The only missing information for dumping
+is the size of the structure. For lrecords, this is part of the
+lrecord_implementation, so we don't need to duplicate it. For C
+structures we use a struct struct_description, which includes a size
+field and a pointer to an associated array of lrecord_description.
+
+\1f
+File: internals.info, Node: Dumping phase, Next: Reloading phase, Prev: Data descriptions, Up: Dumping
+
+Dumping phase
+=============
+
+ Dumping is done by calling the function pdump() (in alloc.c) which is
+invoked from Fdump_emacs (in emacs.c). This function performs a number
+of tasks.
+
+* Menu:
+
+* Object inventory::
+* Address allocation::
+* The header::
+* Data dumping::
+* Pointers dumping::
+
+\1f
+File: internals.info, Node: Object inventory, Next: Address allocation, Prev: Dumping phase, Up: Dumping phase
+
+Object inventory
+----------------
+
+ The first task is to build the list of the objects to dump. This
+includes:
+
+ * lisp objects
+
+ * C structures
+
+ We end up with one `pdump_entry_list_elmt' per object group (arrays
+of C structs are kept together) which includes a pointer to the first
+object of the group, the per-object size and the count of objects in the
+group, along with some other information which is initialized later.
+
+ These entries are linked together in `pdump_entry_list' structures
+and can be enumerated thru either:
+
+ 1. the `pdump_object_table', an array of `pdump_entry_list', one per
+ lrecord type, indexed by type number.
+
+ 2. the `pdump_opaque_data_list', used for the opaque data which does
+ not include pointers, and hence does not need descriptions.
+
+ 3. the `pdump_struct_table', which is a vector of
+ `struct_description'/`pdump_entry_list' pairs, used for non-opaque
+ C structures.
+
+ This uses a marking strategy similar to the garbage collector. Some
+differences though:
+
+ 1. We do not use the mark bit (which does not exist for C structures
+ anyway), we use a big hash table instead.
+
+ 2. We do not use the mark function of lrecords but instead rely on the
+ external descriptions. This happens essentially because we need to
+ follow pointers to C structures and opaque data in addition to
+ Lisp_Object members.
+
+ This is done by `pdump_register_object', which handles Lisp_Object
+variables, and pdump_register_struct which handles C structures, which
+both delegate the description management to pdump_register_sub.
+
+ The hash table doubles as a map object to pdump_entry_list_elmt (i.e.
+allows us to look up a pdump_entry_list_elmt with the object it points
+to). Entries are added with `pdump_add_entry()' and looked up with
+`pdump_get_entry()'. There is no need for entry removal. The hash
+value is computed quite basically from the object pointer by
+`pdump_make_hash()'.
+
+ The roots for the marking are:
+
+ 1. the `staticpro''ed variables (there is a special
+ `staticpro_nodump()' call for protected variables we do not want
+ to dump).
+
+ 2. the `pdump_wire''d variables (`staticpro' is equivalent to
+ `staticpro_nodump()' + `pdump_wire()').
+
+ 3. the `dumpstruct''ed variables, which points to C structures.
+
+ This does not include the GCPRO'ed variables, the specbinds, the
+catchtags, the backlist, the redisplay or the profiling info, since we
+do not want to rebuild the actual chain of lisp calls which end up to
+the dump-emacs call, only the global variables.
+
+ Weak lists and weak hash tables are dumped as if they were their
+non-weak equivalent (without changing their type, of course). This has
+not yet been a problem.
+
+\1f
+File: internals.info, Node: Address allocation, Next: The header, Prev: Object inventory, Up: Dumping phase
+
+Address allocation
+------------------
+
+ The next step is to allocate the offsets of each of the objects in
+the final dump file. This is done by `pdump_allocate_offset()' which
+is called indirectly by `pdump_scan_by_alignment()'.
+
+ The strategy to deal with alignment problems uses these facts:
+
+ 1. real world alignment requirements are powers of two.
+
+ 2. the C compiler is required to adjust the size of a struct so that
+ you can have an array of them next to each other. This means you
+ can have a upper bound of the alignment requirements of a given
+ structure by looking at which power of two its size is a multiple.
+
+ 3. the non-variant part of variable size lrecords has an alignment
+ requirement of 4.
+
+ Hence, for each lrecord type, C struct type or opaque data block the
+alignment requirement is computed as a power of two, with a minimum of
+2^2 for lrecords. `pdump_scan_by_alignment()' then scans all the
+`pdump_entry_list_elmt''s, the ones with the highest requirements
+first. This ensures the best packing.
+
+ The maximum alignment requirement we take into account is 2^8.
+
+ `pdump_allocate_offset()' only has to do a linear allocation,
+starting at offset 256 (this leaves room for the header and keep the
+alignments happy).
+
+\1f
+File: internals.info, Node: The header, Next: Data dumping, Prev: Address allocation, Up: Dumping phase
+
+The header
+----------
+
+ The next step creates the file and writes a header with a signature
+and some random informations in it (number of staticpro, number of
+assigned lrecord types, etc...). The reloc_address field, which
+indicates at which address the file should be loaded if we want to
+avoid post-reload relocation, is set to 0. It then seeks to offset 256
+(base offset for the objects).
+
+\1f
+File: internals.info, Node: Data dumping, Next: Pointers dumping, Prev: The header, Up: Dumping phase
+
+Data dumping
+------------
+
+ The data is dumped in the same order as the addresses were allocated
+by `pdump_dump_data()', called from `pdump_scan_by_alignment()'. This
+function copies the data to a temporary buffer, relocates all pointers
+in the object to the addresses allocated in step Address Allocation,
+and writes it to the file. Using the same order means that, if we are
+careful with lrecords whose size is not a multiple of 4, we are ensured
+that the object is always written at the offset in the file allocated
+in step Address Allocation.
+
+\1f
+File: internals.info, Node: Pointers dumping, Prev: Data dumping, Up: Dumping phase
+
+Pointers dumping
+----------------
+
+ A bunch of tables needed to reassign properly the global pointers are
+then written. They are:
+
+ 1. the staticpro array
+
+ 2. the dumpstruct array
+
+ 3. the lrecord_implementation_table array
+
+ 4. a vector of all the offsets to the objects in the file that
+ include a description (for faster relocation at reload time)
+
+ 5. the pdump_wired and pdump_wired_list arrays
+
+ For each of the arrays we write both the pointer to the variables and
+the relocated offset of the object they point to. Since these variables
+are global, the pointers are still valid when restarting the program and
+are used to regenerate the global pointers.
+
+ The `pdump_wired_list' array is a special case. The variables it
+points to are the head of weak linked lists of lisp objects of the same
+type. Not all objects of this list are dumped so the relocated pointer
+we associate with them points to the first dumped object of the list, or
+Qnil if none is available. This is also the reason why they are not
+used as roots for the purpose of object enumeration.
+
+ This is the end of the dumping part.
+
+\1f
+File: internals.info, Node: Reloading phase, Next: Remaining issues, Prev: Dumping phase, Up: Dumping
+
+Reloading phase
+===============
+
+File loading
+------------
+
+ The file is mmap'ed in memory (which ensures a PAGESIZE alignment, at
+least 4096), or if mmap is unavailable or fails, a 256-bytes aligned
+malloc is done and the file is loaded.
+
+ Some variables are reinitialized from the values found in the header.
+
+ The difference between the actual loading address and the
+reloc_address is computed and will be used for all the relocations.
+
+Putting back the staticvec
+--------------------------
+
+ The staticvec array is memcpy'd from the file and the variables it
+points to are reset to the relocated objects addresses.
+
+Putting back the dumpstructed variables
+---------------------------------------
+
+ The variables pointed to by dumpstruct in the dump phase are reset to
+the right relocated object addresses.
+
+lrecord_implementations_table
+-----------------------------
+
+ The lrecord_implementations_table is reset to its dump time state and
+the right lrecord_type_index values are put in.
+
+Object relocation
+-----------------
+
+ All the objects are relocated using their description and their
+offset by `pdump_reloc_one'. This step is unnecessary if the
+reloc_address is equal to the file loading address.
+
+Putting back the pdump_wire and pdump_wire_list variables
+---------------------------------------------------------
+
+ Same as Putting back the dumpstructed variables.
+
+Reorganize the hash tables
+--------------------------
+
+ Since some of the hash values in the lisp hash tables are
+address-dependent, their layout is now wrong. So we go through each of
+them and have them resorted by calling `pdump_reorganize_hash_table'.
+
+\1f
+File: internals.info, Node: Remaining issues, Prev: Reloading phase, Up: Dumping
+
+Remaining issues
+================
+
+ The build process will have to start a post-dump xemacs, ask it the
+loading address (which will, hopefully, be always the same between
+different xemacs invocations) and relocate the file to the new address.
+This way the object relocation phase will not have to be done, which
+means no writes in the objects and that, because of the use of mmap, the
+dumped data will be shared between all the xemacs running on the
+computer.
+
+ Some executable signature will be necessary to ensure that a given
+dump file is really associated with a given executable, or random
+crashes will occur. Maybe a random number set at compile or configure
+time thru a define. This will also allow for having
+differently-compiled xemacsen on the same system (mule and no-mule
+comes to mind).
+
+ The DOC file contents should probably end up in the dump file.
+
+\1f
+File: internals.info, Node: Events and the Event Loop, Next: Evaluation; Stack Frames; Bindings, Prev: Dumping, Up: Top
Events and the Event Loop
*************************
* Converting Events::
* Dispatching Events; The Command Builder::
-\1f
-File: internals.info, Node: Introduction to Events, Next: Main Loop, Up: Events and the Event Loop
-
-Introduction to Events
-======================
-
- An event is an object that encapsulates information about an
-interesting occurrence in the operating system. Events are generated
-either by user action, direct (e.g. typing on the keyboard or moving
-the mouse) or indirect (moving another window, thereby generating an
-expose event on an Emacs frame), or as a result of some other typically
-asynchronous action happening, such as output from a subprocess being
-ready or a timer expiring. Events come into the system in an
-asynchronous fashion (typically through a callback being called) and
-are converted into a synchronous event queue (first-in, first-out) in a
-process that we will call "collection".
-
- Note that each application has its own event queue. (It is
-immaterial whether the collection process directly puts the events in
-the proper application's queue, or puts them into a single system
-queue, which is later split up.)
-
- The most basic level of event collection is done by the operating
-system or window system. Typically, XEmacs does its own event
-collection as well. Often there are multiple layers of collection in
-XEmacs, with events from various sources being collected into a queue,
-which is then combined with other sources to go into another queue
-(i.e. a second level of collection), with perhaps another level on top
-of this, etc.
-
- XEmacs has its own types of events (called "Emacs events"), which
-provides an abstract layer on top of the system-dependent nature of the
-most basic events that are received. Part of the complex nature of the
-XEmacs event collection process involves converting from the
-operating-system events into the proper Emacs events--there may not be
-a one-to-one correspondence.
-
- Emacs events are documented in `events.h'; I'll discuss them later.
-
Foundation instead of in the original English.
\1f
+File: internals.info, Node: Introduction to Events, Next: Main Loop, Prev: Events and the Event Loop, Up: Events and the Event Loop
+
+Introduction to Events
+======================
+
+ An event is an object that encapsulates information about an
+interesting occurrence in the operating system. Events are generated
+either by user action, direct (e.g. typing on the keyboard or moving
+the mouse) or indirect (moving another window, thereby generating an
+expose event on an Emacs frame), or as a result of some other typically
+asynchronous action happening, such as output from a subprocess being
+ready or a timer expiring. Events come into the system in an
+asynchronous fashion (typically through a callback being called) and
+are converted into a synchronous event queue (first-in, first-out) in a
+process that we will call "collection".
+
+ Note that each application has its own event queue. (It is
+immaterial whether the collection process directly puts the events in
+the proper application's queue, or puts them into a single system
+queue, which is later split up.)
+
+ The most basic level of event collection is done by the operating
+system or window system. Typically, XEmacs does its own event
+collection as well. Often there are multiple layers of collection in
+XEmacs, with events from various sources being collected into a queue,
+which is then combined with other sources to go into another queue
+(i.e. a second level of collection), with perhaps another level on top
+of this, etc.
+
+ XEmacs has its own types of events (called "Emacs events"), which
+provides an abstract layer on top of the system-dependent nature of the
+most basic events that are received. Part of the complex nature of the
+XEmacs event collection process involves converting from the
+operating-system events into the proper Emacs events--there may not be
+a one-to-one correspondence.
+
+ Emacs events are documented in `events.h'; I'll discuss them later.
+
+\1f
File: internals.info, Node: Main Loop, Next: Specifics of the Event Gathering Mechanism, Prev: Introduction to Events, Up: Events and the Event Loop
Main Loop
* Catch and Throw::
\1f
-File: internals.info, Node: Evaluation, Next: Dynamic Binding; The specbinding Stack; Unwind-Protects, Up: Evaluation; Stack Frames; Bindings
+File: internals.info, Node: Evaluation, Next: Dynamic Binding; The specbinding Stack; Unwind-Protects, Prev: Evaluation; Stack Frames; Bindings, Up: Evaluation; Stack Frames; Bindings
Evaluation
==========
converted into an internal form for faster execution.
When a compiled function is executed for the first time by
-`funcall_compiled_function()', or when it is `Fpurecopy()'ed during the
-dump phase of building XEmacs, the byte-code instructions are converted
-from a `Lisp_String' (which is inefficient to access, especially in the
-presence of MULE) into a `Lisp_Opaque' object containing an array of
-unsigned char, which can be directly executed by the byte-code
-interpreter. At this time the byte code is also analyzed for validity
-and transformed into a more optimized form, so that
-`execute_optimized_program()' can really fly.
+`funcall_compiled_function()', or during the dump phase of building
+XEmacs, the byte-code instructions are converted from a `Lisp_String'
+(which is inefficient to access, especially in the presence of MULE)
+into a `Lisp_Opaque' object containing an array of unsigned char, which
+can be directly executed by the byte-code interpreter. At this time
+the byte code is also analyzed for validity and transformed into a more
+optimized form, so that `execute_optimized_program()' can really fly.
Here are some of the optimizations performed by the internal
byte-code transformer:
`nil', or `keywordp') symbols, so that the byte interpreter
doesn't have to.
- 3. The maxiumum number of variable bindings in the byte-code is
+ 3. The maximum number of variable bindings in the byte-code is
pre-computed, so that space on the `specpdl' stack can be
pre-reserved once for the whole function execution.
`specbind()' to create bindings and `unbind_to()' to undo the bindings
when finished.
- Note that, with the exeption of `Fprogn', these functions are
+ Note that, with the exception of `Fprogn', these functions are
typically called in real life only in interpreted code, since the byte
compiler knows how to convert calls to these functions directly into
byte code.
* Symbol Values::
\1f
-File: internals.info, Node: Introduction to Symbols, Next: Obarrays, Up: Symbols and Variables
+File: internals.info, Node: Introduction to Symbols, Next: Obarrays, Prev: Symbols and Variables, Up: Symbols and Variables
Introduction to Symbols
=======================
* The Buffer Object:: The Lisp object corresponding to a buffer.
\1f
-File: internals.info, Node: Introduction to Buffers, Next: The Text in a Buffer, Up: Buffers and Textual Representation
+File: internals.info, Node: Introduction to Buffers, Next: The Text in a Buffer, Prev: Buffers and Textual Representation, Up: Buffers and Textual Representation
Introduction to Buffers
=======================
window. (This latter distinction is explained in detail in the section
on windows.)
-\1f
-File: internals.info, Node: The Text in a Buffer, Next: Buffer Lists, Prev: Introduction to Buffers, Up: Buffers and Textual Representation
-
-The Text in a Buffer
-====================
-
- The text in a buffer consists of a sequence of zero or more
-characters. A "character" is an integer that logically represents a
-letter, number, space, or other unit of text. Most of the characters
-that you will typically encounter belong to the ASCII set of characters,
-but there are also characters for various sorts of accented letters,
-special symbols, Chinese and Japanese ideograms (i.e. Kanji, Katakana,
-etc.), Cyrillic and Greek letters, etc. The actual number of possible
-characters is quite large.
-
- For now, we can view a character as some non-negative integer that
-has some shape that defines how it typically appears (e.g. as an
-uppercase A). (The exact way in which a character appears depends on the
-font used to display the character.) The internal type of characters in
-the C code is an `Emchar'; this is just an `int', but using a symbolic
-type makes the code clearer.
-
- Between every character in a buffer is a "buffer position" or
-"character position". We can speak of the character before or after a
-particular buffer position, and when you insert a character at a
-particular position, all characters after that position end up at new
-positions. When we speak of the character "at" a position, we really
-mean the character after the position. (This schizophrenia between a
-buffer position being "between" a character and "on" a character is
-rampant in Emacs.)
-
- Buffer positions are numbered starting at 1. This means that
-position 1 is before the first character, and position 0 is not valid.
-If there are N characters in a buffer, then buffer position N+1 is
-after the last one, and position N+2 is not valid.
-
- The internal makeup of the Emchar integer varies depending on whether
-we have compiled with MULE support. If not, the Emchar integer is an
-8-bit integer with possible values from 0 - 255. 0 - 127 are the
-standard ASCII characters, while 128 - 255 are the characters from the
-ISO-8859-1 character set. If we have compiled with MULE support, an
-Emchar is a 19-bit integer, with the various bits having meanings
-according to a complex scheme that will be detailed later. The
-characters numbered 0 - 255 still have the same meanings as for the
-non-MULE case, though.
-
- Internally, the text in a buffer is represented in a fairly simple
-fashion: as a contiguous array of bytes, with a "gap" of some size in
-the middle. Although the gap is of some substantial size in bytes,
-there is no text contained within it: From the perspective of the text
-in the buffer, it does not exist. The gap logically sits at some buffer
-position, between two characters (or possibly at the beginning or end of
-the buffer). Insertion of text in a buffer at a particular position is
-always accomplished by first moving the gap to that position (i.e.
-through some block moving of text), then writing the text into the
-beginning of the gap, thereby shrinking the gap. If the gap shrinks
-down to nothing, a new gap is created. (What actually happens is that a
-new gap is "created" at the end of the buffer's text, which requires
-nothing more than changing a couple of indices; then the gap is "moved"
-to the position where the insertion needs to take place by moving up in
-memory all the text after that position.) Similarly, deletion occurs
-by moving the gap to the place where the text is to be deleted, and
-then simply expanding the gap to include the deleted text.
-("Expanding" and "shrinking" the gap as just described means just that
-the internal indices that keep track of where the gap is located are
-changed.)
-
- Note that the total amount of memory allocated for a buffer text
-never decreases while the buffer is live. Therefore, if you load up a
-20-megabyte file and then delete all but one character, there will be a
-20-megabyte gap, which won't get any smaller (except by inserting
-characters back again). Once the buffer is killed, the memory allocated
-for the buffer text will be freed, but it will still be sitting on the
-heap, taking up virtual memory, and will not be released back to the
-operating system. (However, if you have compiled XEmacs with rel-alloc,
-the situation is different. In this case, the space _will_ be released
-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
-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
-four bytes. The conversion between these two representations is complex
-and will be described later.
-
- In the non-MULE case, everything is very simple: An Emchar is an
-8-bit value, which fits neatly into one byte.
-
- If we are given a buffer position and want to retrieve the character
-at that position, we need to follow these steps:
-
- 1. Pretend there's no gap, and convert the buffer position into a
- "byte index" that indexes to the appropriate byte in the buffer's
- stream of textual bytes. By convention, byte indices begin at 1,
- just like buffer positions. In the non-MULE case, byte indices
- and buffer positions are identical, since one character equals one
- byte.
-
- 2. Convert the byte index into a "memory index", which takes the gap
- into account. The memory index is a direct index into the block of
- memory that stores the text of a buffer. This basically just
- involves checking to see if the byte index is past the gap, and if
- 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
- gap.
-
- 3. Fetch the appropriate bytes at the determined memory position.
-
- 4. Convert these bytes into an Emchar.
-
- In the non-Mule case, (3) and (4) boil down to a simple one-byte
-memory access.
-
- Note that we have defined three types of positions in a buffer:
-
- 1. "buffer positions" or "character positions", typedef `Bufpos'
-
- 2. "byte indices", typedef `Bytind'
-
- 3. "memory indices", typedef `Memind'
-
- All three typedefs are just `int's, but defining them this way makes
-things a lot clearer.
-
- Most code works with buffer positions. In particular, all Lisp code
-that refers to text in a buffer uses buffer positions. Lisp code does
-not know that byte indices or memory indices exist.
-
- Finally, we have a typedef for the bytes in a buffer. This is a
-`Bufbyte', which is an unsigned char. Referring to them as Bufbytes
-underscores the fact that we are working with a string of bytes in the
-internal Emacs buffer representation rather than in one of a number of
-possible alternative representations (e.g. EUC-encoded text, etc.).
-
Foundation instead of in the original English.
\1f
+File: internals.info, Node: The Text in a Buffer, Next: Buffer Lists, Prev: Introduction to Buffers, Up: Buffers and Textual Representation
+
+The Text in a Buffer
+====================
+
+ The text in a buffer consists of a sequence of zero or more
+characters. A "character" is an integer that logically represents a
+letter, number, space, or other unit of text. Most of the characters
+that you will typically encounter belong to the ASCII set of characters,
+but there are also characters for various sorts of accented letters,
+special symbols, Chinese and Japanese ideograms (i.e. Kanji, Katakana,
+etc.), Cyrillic and Greek letters, etc. The actual number of possible
+characters is quite large.
+
+ For now, we can view a character as some non-negative integer that
+has some shape that defines how it typically appears (e.g. as an
+uppercase A). (The exact way in which a character appears depends on the
+font used to display the character.) The internal type of characters in
+the C code is an `Emchar'; this is just an `int', but using a symbolic
+type makes the code clearer.
+
+ Between every character in a buffer is a "buffer position" or
+"character position". We can speak of the character before or after a
+particular buffer position, and when you insert a character at a
+particular position, all characters after that position end up at new
+positions. When we speak of the character "at" a position, we really
+mean the character after the position. (This schizophrenia between a
+buffer position being "between" a character and "on" a character is
+rampant in Emacs.)
+
+ Buffer positions are numbered starting at 1. This means that
+position 1 is before the first character, and position 0 is not valid.
+If there are N characters in a buffer, then buffer position N+1 is
+after the last one, and position N+2 is not valid.
+
+ The internal makeup of the Emchar integer varies depending on whether
+we have compiled with MULE support. If not, the Emchar integer is an
+8-bit integer with possible values from 0 - 255. 0 - 127 are the
+standard ASCII characters, while 128 - 255 are the characters from the
+ISO-8859-1 character set. If we have compiled with MULE support, an
+Emchar is a 19-bit integer, with the various bits having meanings
+according to a complex scheme that will be detailed later. The
+characters numbered 0 - 255 still have the same meanings as for the
+non-MULE case, though.
+
+ Internally, the text in a buffer is represented in a fairly simple
+fashion: as a contiguous array of bytes, with a "gap" of some size in
+the middle. Although the gap is of some substantial size in bytes,
+there is no text contained within it: From the perspective of the text
+in the buffer, it does not exist. The gap logically sits at some buffer
+position, between two characters (or possibly at the beginning or end of
+the buffer). Insertion of text in a buffer at a particular position is
+always accomplished by first moving the gap to that position (i.e.
+through some block moving of text), then writing the text into the
+beginning of the gap, thereby shrinking the gap. If the gap shrinks
+down to nothing, a new gap is created. (What actually happens is that a
+new gap is "created" at the end of the buffer's text, which requires
+nothing more than changing a couple of indices; then the gap is "moved"
+to the position where the insertion needs to take place by moving up in
+memory all the text after that position.) Similarly, deletion occurs
+by moving the gap to the place where the text is to be deleted, and
+then simply expanding the gap to include the deleted text.
+("Expanding" and "shrinking" the gap as just described means just that
+the internal indices that keep track of where the gap is located are
+changed.)
+
+ Note that the total amount of memory allocated for a buffer text
+never decreases while the buffer is live. Therefore, if you load up a
+20-megabyte file and then delete all but one character, there will be a
+20-megabyte gap, which won't get any smaller (except by inserting
+characters back again). Once the buffer is killed, the memory allocated
+for the buffer text will be freed, but it will still be sitting on the
+heap, taking up virtual memory, and will not be released back to the
+operating system. (However, if you have compiled XEmacs with rel-alloc,
+the situation is different. In this case, the space _will_ be released
+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
+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
+four bytes. The conversion between these two representations is complex
+and will be described later.
+
+ In the non-MULE case, everything is very simple: An Emchar is an
+8-bit value, which fits neatly into one byte.
+
+ If we are given a buffer position and want to retrieve the character
+at that position, we need to follow these steps:
+
+ 1. Pretend there's no gap, and convert the buffer position into a
+ "byte index" that indexes to the appropriate byte in the buffer's
+ stream of textual bytes. By convention, byte indices begin at 1,
+ just like buffer positions. In the non-MULE case, byte indices
+ and buffer positions are identical, since one character equals one
+ byte.
+
+ 2. Convert the byte index into a "memory index", which takes the gap
+ into account. The memory index is a direct index into the block of
+ memory that stores the text of a buffer. This basically just
+ involves checking to see if the byte index is past the gap, and if
+ 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
+ gap.
+
+ 3. Fetch the appropriate bytes at the determined memory position.
+
+ 4. Convert these bytes into an Emchar.
+
+ In the non-Mule case, (3) and (4) boil down to a simple one-byte
+memory access.
+
+ Note that we have defined three types of positions in a buffer:
+
+ 1. "buffer positions" or "character positions", typedef `Bufpos'
+
+ 2. "byte indices", typedef `Bytind'
+
+ 3. "memory indices", typedef `Memind'
+
+ All three typedefs are just `int's, but defining them this way makes
+things a lot clearer.
+
+ Most code works with buffer positions. In particular, all Lisp code
+that refers to text in a buffer uses buffer positions. Lisp code does
+not know that byte indices or memory indices exist.
+
+ Finally, we have a typedef for the bytes in a buffer. This is a
+`Bufbyte', which is an unsigned char. Referring to them as Bufbytes
+underscores the fact that we are working with a string of bytes in the
+internal Emacs buffer representation rather than in one of a number of
+possible alternative representations (e.g. EUC-encoded text, etc.).
+
+\1f
File: internals.info, Node: Buffer Lists, Next: Markers and Extents, Prev: The Text in a Buffer, Up: Buffers and Textual Representation
Buffer Lists
* CCL::
\1f
-File: internals.info, Node: Character Sets, Next: Encodings, Up: MULE Character Sets and Encodings
+File: internals.info, Node: Character Sets, Next: Encodings, Prev: MULE Character Sets and Encodings, Up: MULE Character Sets and Encodings
Character Sets
==============
* JIS7::
\1f
-File: internals.info, Node: Japanese EUC (Extended Unix Code), Next: JIS7, Up: Encodings
+File: internals.info, Node: Japanese EUC (Extended Unix Code), Next: JIS7, Prev: Encodings, Up: Encodings
Japanese EUC (Extended Unix Code)
---------------------------------
* Internal Character Encoding::
\1f
-File: internals.info, Node: Internal String Encoding, Next: Internal Character Encoding, Up: Internal Mule Encodings
+File: internals.info, Node: Internal String Encoding, Next: Internal Character Encoding, Prev: Internal Mule Encodings, Up: Internal Mule Encodings
Internal String Encoding
------------------------
* Lstream Methods:: Creating new lstream types.
\1f
-File: internals.info, Node: Creating an Lstream, Next: Lstream Types, Up: Lstreams
+File: internals.info, Node: Creating an Lstream, Next: Lstream Types, Prev: Lstreams, Up: Lstreams
Creating an Lstream
===================
Lstream Functions
=================
- - Function: Lstream * Lstream_new (Lstream_implementation *IMP, CONST
+ - Function: Lstream * Lstream_new (Lstream_implementation *IMP, const
char *MODE)
Allocate and return a new Lstream. This function is not really
meant to be called directly; rather, each stream type should
This function can be `NULL' if the stream is output-only.
- - Lstream Method: ssize_t writer (Lstream *STREAM, CONST unsigned char
+ - 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
* The Window Object::
\1f
-File: internals.info, Node: Introduction to Consoles; Devices; Frames; Windows, Next: Point, Up: Consoles; Devices; Frames; Windows
+File: internals.info, Node: Introduction to Consoles; Devices; Frames; Windows, Next: Point, Prev: Consoles; Devices; Frames; Windows, Up: Consoles; Devices; Frames; Windows
Introduction to Consoles; Devices; Frames; Windows
==================================================
display", "selected frame", and "selected window". Each of these
objects is distinguished in various ways, such as being the default
object for various functions that act on objects of that type. Note
-that every containing object rememembers the "selected" object among
-the objects that it contains: e.g. not only is there a selected window,
-but every frame remembers the last window in it that was selected, and
+that every containing object remembers the "selected" object among the
+objects that it contains: e.g. not only is there a selected window, but
+every frame remembers the last window in it that was selected, and
changing the selected frame causes the remembered window within it to
become the selected window. Similar relationships apply for consoles
to devices and devices to frames.
`save-window-excursion' does not save the selected window's value of
`point'.
-\1f
-File: internals.info, Node: Window Hierarchy, Next: The Window Object, Prev: Point, Up: Consoles; Devices; Frames; Windows
-
-Window Hierarchy
-================
-
- If a frame contains multiple windows (panes), they are always created
-by splitting an existing window along the horizontal or vertical axis.
-Terminology is a bit confusing here: to "split a window horizontally"
-means to create two side-by-side windows, i.e. to make a _vertical_ cut
-in a window. Likewise, to "split a window vertically" means to create
-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.
-The precise way in which the splits were made should not be important,
-and this is reflected internally. Internally, all windows are arranged
-in a tree, consisting of two types of windows, "combination" windows
-(which have children, and are covered completely by those children) and
-"leaf" windows, which have no children and are visible. Every
-combination window has two or more children, all arranged along the same
-axis. There are (logically) two subtypes of windows, depending on
-whether their children are horizontally or vertically arrayed. There is
-always one root window, which is either a leaf window (if the frame
-contains only one window) or a combination window (if the frame contains
-more than one window). In the latter case, the root window will have
-two or more children, either horizontally or vertically arrayed, and
-each of those children will be either a leaf window or another
-combination window.
-
- Here are some rules:
-
- 1. Horizontal combination windows can never have children that are
- horizontal combination windows; same for vertical.
-
- 2. Only leaf windows can be split (obviously) and this splitting does
- one of two things: (a) turns the leaf window into a combination
- window and creates two new leaf children, or (b) turns the leaf
- window into one of the two new leaves and creates the other leaf.
- Rule (1) dictates which of these two outcomes happens.
-
- 3. Every combination window must have at least two children.
-
- 4. Leaf windows can never become combination windows. They can be
- deleted, however. If this results in a violation of (3), the
- parent combination window also gets deleted.
-
- 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.
-
- 6. All windows have three fields governing their contents: these are
- "hchild" (a list of horizontally-arrayed children), "vchild" (a
- list of vertically-arrayed children), and "buffer" (the buffer
- contained in a leaf window). Exactly one of these will be
- non-nil. Remember that "horizontally-arrayed" means
- "side-by-side" and "vertically-arrayed" means "one above the
- other".
-
- 7. Leaf windows also have markers in their `start' (the first buffer
- position displayed in the window) and `pointm' (the window's
- stashed value of `point'--see above) fields, while combination
- windows have nil in these fields.
-
- 8. The list of children for a window is threaded through the `next'
- and `prev' fields of each child window.
-
- 9. *Deleted windows can be undeleted*. This happens as a result of
- restoring a window configuration, and is unlike frames, displays,
- and consoles, which, once deleted, can never be restored.
- Deleting a window does nothing except set a special `dead' bit to
- 1 and clear out the `next', `prev', `hchild', and `vchild' fields,
- for GC purposes.
-
- 10. Most frames actually have two top-level windows--one for the
- minibuffer and one (the "root") for everything else. The modeline
- (if present) separates these two. The `next' field of the root
- points to the minibuffer, and the `prev' field of the minibuffer
- points to the root. The other `next' and `prev' fields are `nil',
- and the frame points to both of these windows. Minibuffer-less
- frames have no minibuffer window, and the `next' and `prev' of the
- root window are `nil'. Minibuffer-only frames have no root
- window, and the `next' of the minibuffer window is `nil' but the
- `prev' points to itself. (#### This is an artifact that should be
- fixed.)
-
-\1f
-File: internals.info, Node: The Window Object, Prev: Window Hierarchy, Up: Consoles; Devices; Frames; Windows
-
-The Window Object
-=================
-
- Windows have the following accessible fields:
-
-`frame'
- The frame that this window is on.
-
-`mini_p'
- Non-`nil' if this window is a minibuffer window.
-
-`buffer'
- The buffer that the window is displaying. This may change often
- during the life of the window.
-
-`dedicated'
- Non-`nil' if this window is dedicated to its buffer.
-
-`pointm'
- This is the value of point in the current buffer when this window
- is selected; when it is not selected, it retains its previous
- value.
-
-`start'
- The position in the buffer that is the first character to be
- displayed in the window.
-
-`force_start'
- If this flag is non-`nil', it says that the window has been
- scrolled explicitly by the Lisp program. This affects what the
- next redisplay does if point is off the screen: instead of
- scrolling the window to show the text around point, it moves point
- to a location that is on the screen.
-
-`last_modified'
- The `modified' field of the window's buffer, as of the last time a
- redisplay completed in this window.
-
-`last_point'
- The buffer's value of point, as of the last time a redisplay
- completed in this window.
-
-`left'
- This is the left-hand edge of the window, measured in columns.
- (The leftmost column on the screen is column 0.)
-
-`top'
- This is the top edge of the window, measured in lines. (The top
- line on the screen is line 0.)
-
-`height'
- The height of the window, measured in lines.
-
-`width'
- The width of the window, measured in columns.
-
-`next'
- This is the window that is the next in the chain of siblings. It
- is `nil' in a window that is the rightmost or bottommost of a
- group of siblings.
-
-`prev'
- This is the window that is the previous in the chain of siblings.
- It is `nil' in a window that is the leftmost or topmost of a group
- of siblings.
-
-`parent'
- Internally, XEmacs arranges windows in a tree; each group of
- siblings has a parent window whose area includes all the siblings.
- This field points to a window's parent.
-
- Parent windows do not display buffers, and play little role in
- display except to shape their child windows. Emacs Lisp programs
- usually have no access to the parent windows; they operate on the
- windows at the leaves of the tree, which actually display buffers.
-
-`hscroll'
- This is the number of columns that the display in the window is
- scrolled horizontally to the left. Normally, this is 0.
-
-`use_time'
- This is the last time that the window was selected. The function
- `get-lru-window' uses this field.
-
-`display_table'
- The window's display table, or `nil' if none is specified for it.
-
-`update_mode_line'
- Non-`nil' means this window's mode line needs to be updated.
-
-`base_line_number'
- The line number of a certain position in the buffer, or `nil'.
- This is used for displaying the line number of point in the mode
- line.
-
-`base_line_pos'
- The position in the buffer for which the line number is known, or
- `nil' meaning none is known.
-
-`region_showing'
- If the region (or part of it) is highlighted in this window, this
- field holds the mark position that made one end of that region.
- Otherwise, this field is `nil'.
-
Foundation instead of in the original English.
\1f
+File: internals.info, Node: Window Hierarchy, Next: The Window Object, Prev: Point, Up: Consoles; Devices; Frames; Windows
+
+Window Hierarchy
+================
+
+ If a frame contains multiple windows (panes), they are always created
+by splitting an existing window along the horizontal or vertical axis.
+Terminology is a bit confusing here: to "split a window horizontally"
+means to create two side-by-side windows, i.e. to make a _vertical_ cut
+in a window. Likewise, to "split a window vertically" means to create
+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.
+The precise way in which the splits were made should not be important,
+and this is reflected internally. Internally, all windows are arranged
+in a tree, consisting of two types of windows, "combination" windows
+(which have children, and are covered completely by those children) and
+"leaf" windows, which have no children and are visible. Every
+combination window has two or more children, all arranged along the same
+axis. There are (logically) two subtypes of windows, depending on
+whether their children are horizontally or vertically arrayed. There is
+always one root window, which is either a leaf window (if the frame
+contains only one window) or a combination window (if the frame contains
+more than one window). In the latter case, the root window will have
+two or more children, either horizontally or vertically arrayed, and
+each of those children will be either a leaf window or another
+combination window.
+
+ Here are some rules:
+
+ 1. Horizontal combination windows can never have children that are
+ horizontal combination windows; same for vertical.
+
+ 2. Only leaf windows can be split (obviously) and this splitting does
+ one of two things: (a) turns the leaf window into a combination
+ window and creates two new leaf children, or (b) turns the leaf
+ window into one of the two new leaves and creates the other leaf.
+ Rule (1) dictates which of these two outcomes happens.
+
+ 3. Every combination window must have at least two children.
+
+ 4. Leaf windows can never become combination windows. They can be
+ deleted, however. If this results in a violation of (3), the
+ parent combination window also gets deleted.
+
+ 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.
+
+ 6. All windows have three fields governing their contents: these are
+ "hchild" (a list of horizontally-arrayed children), "vchild" (a
+ list of vertically-arrayed children), and "buffer" (the buffer
+ contained in a leaf window). Exactly one of these will be
+ non-nil. Remember that "horizontally-arrayed" means
+ "side-by-side" and "vertically-arrayed" means "one above the
+ other".
+
+ 7. Leaf windows also have markers in their `start' (the first buffer
+ position displayed in the window) and `pointm' (the window's
+ stashed value of `point'--see above) fields, while combination
+ windows have nil in these fields.
+
+ 8. The list of children for a window is threaded through the `next'
+ and `prev' fields of each child window.
+
+ 9. *Deleted windows can be undeleted*. This happens as a result of
+ restoring a window configuration, and is unlike frames, displays,
+ and consoles, which, once deleted, can never be restored.
+ Deleting a window does nothing except set a special `dead' bit to
+ 1 and clear out the `next', `prev', `hchild', and `vchild' fields,
+ for GC purposes.
+
+ 10. Most frames actually have two top-level windows--one for the
+ minibuffer and one (the "root") for everything else. The modeline
+ (if present) separates these two. The `next' field of the root
+ points to the minibuffer, and the `prev' field of the minibuffer
+ points to the root. The other `next' and `prev' fields are `nil',
+ and the frame points to both of these windows. Minibuffer-less
+ frames have no minibuffer window, and the `next' and `prev' of the
+ root window are `nil'. Minibuffer-only frames have no root
+ window, and the `next' of the minibuffer window is `nil' but the
+ `prev' points to itself. (#### This is an artifact that should be
+ fixed.)
+
+\1f
+File: internals.info, Node: The Window Object, Prev: Window Hierarchy, Up: Consoles; Devices; Frames; Windows
+
+The Window Object
+=================
+
+ Windows have the following accessible fields:
+
+`frame'
+ The frame that this window is on.
+
+`mini_p'
+ Non-`nil' if this window is a minibuffer window.
+
+`buffer'
+ The buffer that the window is displaying. This may change often
+ during the life of the window.
+
+`dedicated'
+ Non-`nil' if this window is dedicated to its buffer.
+
+`pointm'
+ This is the value of point in the current buffer when this window
+ is selected; when it is not selected, it retains its previous
+ value.
+
+`start'
+ The position in the buffer that is the first character to be
+ displayed in the window.
+
+`force_start'
+ If this flag is non-`nil', it says that the window has been
+ scrolled explicitly by the Lisp program. This affects what the
+ next redisplay does if point is off the screen: instead of
+ scrolling the window to show the text around point, it moves point
+ to a location that is on the screen.
+
+`last_modified'
+ The `modified' field of the window's buffer, as of the last time a
+ redisplay completed in this window.
+
+`last_point'
+ The buffer's value of point, as of the last time a redisplay
+ completed in this window.
+
+`left'
+ This is the left-hand edge of the window, measured in columns.
+ (The leftmost column on the screen is column 0.)
+
+`top'
+ This is the top edge of the window, measured in lines. (The top
+ line on the screen is line 0.)
+
+`height'
+ The height of the window, measured in lines.
+
+`width'
+ The width of the window, measured in columns.
+
+`next'
+ This is the window that is the next in the chain of siblings. It
+ is `nil' in a window that is the rightmost or bottommost of a
+ group of siblings.
+
+`prev'
+ This is the window that is the previous in the chain of siblings.
+ It is `nil' in a window that is the leftmost or topmost of a group
+ of siblings.
+
+`parent'
+ Internally, XEmacs arranges windows in a tree; each group of
+ siblings has a parent window whose area includes all the siblings.
+ This field points to a window's parent.
+
+ Parent windows do not display buffers, and play little role in
+ display except to shape their child windows. Emacs Lisp programs
+ usually have no access to the parent windows; they operate on the
+ windows at the leaves of the tree, which actually display buffers.
+
+`hscroll'
+ This is the number of columns that the display in the window is
+ scrolled horizontally to the left. Normally, this is 0.
+
+`use_time'
+ This is the last time that the window was selected. The function
+ `get-lru-window' uses this field.
+
+`display_table'
+ The window's display table, or `nil' if none is specified for it.
+
+`update_mode_line'
+ Non-`nil' means this window's mode line needs to be updated.
+
+`base_line_number'
+ The line number of a certain position in the buffer, or `nil'.
+ This is used for displaying the line number of point in the mode
+ line.
+
+`base_line_pos'
+ The position in the buffer for which the line number is known, or
+ `nil' meaning none is known.
+
+`region_showing'
+ If the region (or part of it) is highlighted in this window, this
+ field holds the mark position that made one end of that region.
+ Otherwise, this field is `nil'.
+
+\1f
File: internals.info, Node: The Redisplay Mechanism, Next: Extents, Prev: Consoles; Devices; Frames; Windows, Up: Top
The Redisplay Mechanism
* Redisplay Piece by Piece::
\1f
-File: internals.info, Node: Critical Redisplay Sections, Next: Line Start Cache, Up: The Redisplay Mechanism
+File: internals.info, Node: Critical Redisplay Sections, Next: Line Start Cache, Prev: The Redisplay Mechanism, Up: The Redisplay Mechanism
Critical Redisplay Sections
===========================
3. Output changes Implemented by `redisplay-output.c',
`redisplay-x.c', `redisplay-msw.c' and `redisplay-tty.c'
- Steps 1 and 2 are device-independant and relatively complex. Step 3
+ Steps 1 and 2 are device-independent and relatively complex. Step 3
is mostly device-dependent.
Determining the desired display
`display_line''s are held by each window representing the current
display and the desired display.
- The `display_line' structures are tighly tied to buffers which
+ The `display_line' structures are tightly tied to buffers which
presents a problem for redisplay as this connection is bogus for the
modeline. Hence the `display_line' generation routines are duplicated
for generating the modeline. This means that the modeline display code
* Extent Ordering:: How extents are ordered internally.
* Format of the Extent Info:: The extent information in a buffer or string.
* Zero-Length Extents:: A weird special case.
-* Mathematics of Extent Ordering:: A rigorous foundation.
+* Mathematics of Extent Ordering:: A rigorous foundation.
* Extent Fragments:: Cached information useful for redisplay.
\1f
-File: internals.info, Node: Introduction to Extents, Next: Extent Ordering, Up: Extents
+File: internals.info, Node: Introduction to Extents, Next: Extent Ordering, Prev: Extents, Up: Extents
Introduction to Extents
=======================
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
+image-instances for every displayable occurrence 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 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
+Unfortunately this also has hairy properties such as making the lwlib
code quite complex. And of course lwlib has to know at some level what
the widget is and how to set its properties.
* external widget: Modules for Interfacing with X Windows.
* flusher: Lstream Methods.
* Free Software Foundation: A History of Emacs.
-* frob block: Introduction to Allocation.
* FSF: A History of Emacs.
* FSF Emacs <1>: GNU Emacs 20.
* FSF Emacs: GNU Emacs 19.
* permanent objects: The XEmacs Object System (Abstractly Speaking).
* pi, calculating: XEmacs From the Outside.
* pseudo_closer: Lstream Methods.
-* pure space: Basic Lisp Modules.
* read syntax: The XEmacs Object System (Abstractly Speaking).
* read-eval-print: XEmacs From the Outside.
* reader: Lstream Methods.
-* record type: How Lisp Objects Are Represented in C.
* Redisplay Piece by Piece: Redisplay Piece by Piece.
* relocating allocator: Low-Level Modules.
* rename to XEmacs: XEmacs.
\1f
Indirect:
lispref.info-1: 2366
-lispref.info-2: 48386
-lispref.info-3: 96925
-lispref.info-4: 146765
-lispref.info-5: 195599
-lispref.info-6: 243284
-lispref.info-7: 291562
-lispref.info-8: 340698
-lispref.info-9: 387512
-lispref.info-10: 436964
-lispref.info-11: 485192
-lispref.info-12: 534964
-lispref.info-13: 582863
-lispref.info-14: 631086
-lispref.info-15: 679340
-lispref.info-16: 729096
-lispref.info-17: 777847
-lispref.info-18: 824752
-lispref.info-19: 872135
-lispref.info-20: 920976
-lispref.info-21: 970569
-lispref.info-22: 1017488
-lispref.info-23: 1064515
-lispref.info-24: 1113914
-lispref.info-25: 1163596
-lispref.info-26: 1213506
-lispref.info-27: 1262729
-lispref.info-28: 1311495
-lispref.info-29: 1360931
-lispref.info-30: 1402266
-lispref.info-31: 1451409
-lispref.info-32: 1500622
-lispref.info-33: 1550196
-lispref.info-34: 1598675
-lispref.info-35: 1644357
-lispref.info-36: 1686356
-lispref.info-37: 1731296
-lispref.info-38: 1780983
-lispref.info-39: 1830087
-lispref.info-40: 1879491
-lispref.info-41: 1928817
-lispref.info-42: 1977518
-lispref.info-43: 2022945
-lispref.info-44: 2061281
+lispref.info-2: 48665
+lispref.info-3: 97204
+lispref.info-4: 147044
+lispref.info-5: 195878
+lispref.info-6: 243565
+lispref.info-7: 291843
+lispref.info-8: 340452
+lispref.info-9: 388779
+lispref.info-10: 438231
+lispref.info-11: 486459
+lispref.info-12: 536231
+lispref.info-13: 584130
+lispref.info-14: 632353
+lispref.info-15: 680607
+lispref.info-16: 726799
+lispref.info-17: 775532
+lispref.info-18: 825530
+lispref.info-19: 875221
+lispref.info-20: 924062
+lispref.info-21: 972870
+lispref.info-22: 1019178
+lispref.info-23: 1068608
+lispref.info-24: 1117447
+lispref.info-25: 1162793
+lispref.info-26: 1210215
+lispref.info-27: 1255841
+lispref.info-28: 1305126
+lispref.info-29: 1352976
+lispref.info-30: 1401200
+lispref.info-31: 1450877
+lispref.info-32: 1499202
+lispref.info-33: 1548500
+lispref.info-34: 1589835
+lispref.info-35: 1636140
+lispref.info-36: 1685471
+lispref.info-37: 1733879
+lispref.info-38: 1782970
+lispref.info-39: 1832447
+lispref.info-40: 1880005
+lispref.info-41: 1924826
+lispref.info-42: 1962038
+lispref.info-43: 2006636
+lispref.info-44: 2053069
+lispref.info-45: 2093862
+lispref.info-46: 2143132
+lispref.info-47: 2156997
\1f
Tag Table:
(Indirect)
Node: Top\7f2366
-Node: Copying\7f48386
-Node: Introduction\7f67544
-Node: Caveats\7f69135
-Node: Lisp History\7f70866
-Node: Conventions\7f72122
-Node: Some Terms\7f72937
-Node: nil and t\7f73658
-Node: Evaluation Notation\7f75335
-Node: Printing Notation\7f76248
-Node: Error Messages\7f77122
-Node: Buffer Text Notation\7f77563
-Node: Format of Descriptions\7f78438
-Node: A Sample Function Description\7f79292
-Node: A Sample Variable Description\7f83278
-Node: Acknowledgements\7f84186
-Node: Lisp Data Types\7f86164
-Node: Printed Representation\7f88719
-Node: Comments\7f90761
-Node: Primitive Types\7f91658
-Node: Programming Types\7f93317
-Node: Integer Type\7f95269
-Node: Floating Point Type\7f96306
-Node: Character Type\7f96925
-Node: Symbol Type\7f104829
-Node: Sequence Type\7f107524
-Node: Cons Cell Type\7f109043
-Node: Dotted Pair Notation\7f113527
-Node: Association List Type\7f115648
-Node: Array Type\7f116531
-Node: String Type\7f117997
-Node: Vector Type\7f120678
-Node: Bit Vector Type\7f121450
-Node: Function Type\7f122312
-Node: Macro Type\7f123425
-Node: Primitive Function Type\7f124122
-Node: Compiled-Function Type\7f125648
-Node: Autoload Type\7f126202
-Node: Char Table Type\7f127216
-Node: Hash Table Type\7f127390
-Node: Range Table Type\7f128545
-Node: Weak List Type\7f129398
-Node: Editing Types\7f129548
-Node: Buffer Type\7f131175
-Node: Marker Type\7f133202
-Node: Extent Type\7f133926
-Node: Window Type\7f135194
-Node: Frame Type\7f136605
-Node: Device Type\7f137400
-Node: Console Type\7f138226
-Node: Window Configuration Type\7f139427
-Node: Event Type\7f140125
-Node: Process Type\7f140289
-Node: Stream Type\7f141324
-Node: Keymap Type\7f142447
-Node: Syntax Table Type\7f142985
-Node: Display Table Type\7f144008
-Node: Database Type\7f144447
-Node: Charset Type\7f144613
-Node: Coding System Type\7f144777
-Node: ToolTalk Message Type\7f144961
-Node: ToolTalk Pattern Type\7f145160
-Node: Window-System Types\7f145332
-Node: Face Type\7f146478
-Node: Glyph Type\7f146609
-Node: Specifier Type\7f146765
-Node: Font Instance Type\7f146938
-Node: Color Instance Type\7f147128
-Node: Image Instance Type\7f147325
-Node: Toolbar Button Type\7f147523
-Node: Subwindow Type\7f147716
-Node: X Resource Type\7f147895
-Node: Type Predicates\7f148048
-Node: Equality Predicates\7f157177
-Node: Numbers\7f161982
-Node: Integer Basics\7f163437
-Node: Float Basics\7f165786
-Node: Predicates on Numbers\7f167528
-Node: Comparison of Numbers\7f169161
-Node: Numeric Conversions\7f172982
-Node: Arithmetic Operations\7f174448
-Node: Rounding Operations\7f179913
-Node: Bitwise Operations\7f181018
-Node: Math Functions\7f190064
-Node: Random Numbers\7f192380
-Node: Strings and Characters\7f194146
-Node: String Basics\7f195599
-Node: Predicates for Strings\7f198017
-Node: Creating Strings\7f198780
-Node: Predicates for Characters\7f204097
-Node: Character Codes\7f205168
-Node: Text Comparison\7f206581
-Node: String Conversion\7f209943
-Node: Modifying Strings\7f213619
-Node: String Properties\7f214260
-Node: Formatting Strings\7f214903
-Node: Character Case\7f224521
-Node: Case Tables\7f227667
-Node: Char Tables\7f231565
-Node: Char Table Types\7f232957
-Node: Working With Char Tables\7f234532
-Node: Lists\7f236481
-Node: Cons Cells\7f237604
-Node: Lists as Boxes\7f238940
-Node: List-related Predicates\7f241582
-Node: List Elements\7f243284
-Node: Building Lists\7f248313
-Node: Modifying Lists\7f254305
-Node: Setcar\7f255117
-Node: Setcdr\7f257538
-Node: Rearrangement\7f260049
-Node: Sets And Lists\7f265635
-Node: Association Lists\7f269863
-Ref: Association Lists-Footnote-1\7f279154
-Node: Property Lists\7f279359
-Node: Working With Normal Plists\7f280907
-Node: Working With Lax Plists\7f283175
-Node: Converting Plists To/From Alists\7f285415
-Node: Weak Lists\7f286763
-Node: Sequences Arrays Vectors\7f288926
-Node: Sequence Functions\7f291562
-Node: Arrays\7f295221
-Node: Array Functions\7f298285
-Node: Vectors\7f300818
-Node: Vector Functions\7f302316
-Node: Bit Vectors\7f304887
-Node: Bit Vector Functions\7f305732
-Node: Symbols\7f307982
-Node: Symbol Components\7f309031
-Node: Definitions\7f313204
-Node: Creating Symbols\7f315429
-Node: Symbol Properties\7f322463
-Node: Plists and Alists\7f323979
-Node: Symbol Plists\7f325728
-Node: Other Plists\7f327537
-Node: Evaluation\7f329315
-Node: Intro Eval\7f330120
-Ref: Intro Eval-Footnote-1\7f333473
-Node: Eval\7f333608
-Node: Forms\7f338026
-Node: Self-Evaluating Forms\7f339185
-Node: Symbol Forms\7f340698
-Node: Classifying Lists\7f341615
-Node: Function Indirection\7f342371
-Node: Function Forms\7f345482
-Node: Macro Forms\7f346479
-Node: Special Forms\7f348079
-Node: Autoloading\7f350388
-Node: Quoting\7f350886
-Node: Control Structures\7f352247
-Node: Sequencing\7f353867
-Node: Conditionals\7f356732
-Node: Combining Conditions\7f360155
-Node: Iteration\7f363425
-Node: Nonlocal Exits\7f365204
-Node: Catch and Throw\7f365906
-Node: Examples of Catch\7f369745
-Node: Errors\7f371764
-Node: Signaling Errors\7f373253
-Node: Processing of Errors\7f377992
-Node: Handling Errors\7f380271
-Node: Error Symbols\7f387512
-Node: Cleanups\7f391468
-Node: Variables\7f395246
-Node: Global Variables\7f397015
-Node: Constant Variables\7f398091
-Node: Local Variables\7f398717
-Node: Void Variables\7f403654
-Node: Defining Variables\7f407170
-Node: Accessing Variables\7f414334
-Node: Setting Variables\7f415759
-Node: Variable Scoping\7f420278
-Node: Scope\7f421877
-Node: Extent\7f423402
-Node: Impl of Scope\7f424881
-Node: Using Scoping\7f426844
-Node: Buffer-Local Variables\7f428366
-Node: Intro to Buffer-Local\7f429202
-Node: Creating Buffer-Local\7f431745
-Node: Default Value\7f436964
-Node: Variable Aliases\7f440107
-Node: Functions\7f441892
-Node: What Is a Function\7f442986
-Node: Lambda Expressions\7f447032
-Node: Lambda Components\7f447942
-Node: Simple Lambda\7f449774
-Node: Argument List\7f451431
-Node: Function Documentation\7f455159
-Node: Function Names\7f457101
-Node: Defining Functions\7f459674
-Node: Calling Functions\7f462714
-Node: Mapping Functions\7f466563
-Node: Anonymous Functions\7f469251
-Node: Function Cells\7f472496
-Node: Inline Functions\7f477306
-Node: Related Topics\7f479116
-Node: Macros\7f480169
-Node: Simple Macro\7f481453
-Node: Expansion\7f482188
-Node: Compiling Macros\7f485192
-Node: Defining Macros\7f487028
-Node: Backquote\7f488345
-Node: Problems with Macros\7f490742
-Node: Argument Evaluation\7f491437
-Node: Surprising Local Vars\7f494352
-Node: Eval During Expansion\7f496420
-Node: Repeated Expansion\7f498113
-Node: Customization\7f500029
-Node: Common Keywords\7f500498
-Node: Group Definitions\7f503343
-Node: Variable Definitions\7f505535
-Node: Customization Types\7f510525
-Node: Simple Types\7f511960
-Node: Composite Types\7f514117
-Node: Splicing into Lists\7f518807
-Node: Type Keywords\7f520642
-Node: Loading\7f524162
-Node: How Programs Do Loading\7f525837
-Node: Autoload\7f534964
-Node: Repeated Loading\7f541043
-Node: Named Features\7f543156
-Node: Unloading\7f549588
-Node: Hooks for Loading\7f551744
-Node: Byte Compilation\7f552461
-Node: Speed of Byte-Code\7f554378
-Node: Compilation Functions\7f555585
-Node: Docs and Compilation\7f561972
-Node: Dynamic Loading\7f564625
-Node: Eval During Compile\7f566989
-Node: Compiled-Function Objects\7f568254
-Node: Disassembly\7f573052
-Node: Debugging\7f580306
-Node: Debugger\7f581718
-Node: Error Debugging\7f582863
-Node: Infinite Loops\7f585616
-Node: Function Debugging\7f586860
-Node: Explicit Debug\7f589650
-Node: Using Debugger\7f590421
-Node: Debugger Commands\7f592283
-Node: Invoking the Debugger\7f596600
-Node: Internals of Debugger\7f600515
-Node: Syntax Errors\7f605402
-Node: Excess Open\7f606650
-Node: Excess Close\7f608525
-Node: Compilation Errors\7f609946
-Node: Edebug\7f611234
-Node: Using Edebug\7f613342
-Node: Instrumenting\7f616039
-Node: Edebug Execution Modes\7f619528
-Node: Jumping\7f622638
-Node: Edebug Misc\7f624981
-Node: Breakpoints\7f626370
-Node: Global Break Condition\7f629176
-Node: Embedded Breakpoints\7f630131
-Node: Trapping Errors\7f631086
-Node: Edebug Views\7f633162
-Node: Edebug Eval\7f635127
-Node: Eval List\7f636304
-Node: Reading in Edebug\7f639689
-Node: Printing in Edebug\7f640488
-Node: Tracing\7f642203
-Node: Coverage Testing\7f644089
-Node: The Outside Context\7f646130
-Node: Checking Whether to Stop\7f647079
-Node: Edebug Display Update\7f647726
-Node: Edebug Recursive Edit\7f649749
-Node: Instrumenting Macro Calls\7f651404
-Node: Specification List\7f653886
-Node: Backtracking\7f663297
-Node: Debugging Backquote\7f665235
-Node: Specification Examples\7f668941
-Node: Edebug Options\7f671008
-Node: Read and Print\7f676345
-Node: Streams Intro\7f677322
-Node: Input Streams\7f679340
-Node: Input Functions\7f684241
-Node: Output Streams\7f686301
-Node: Output Functions\7f690352
-Node: Output Variables\7f694652
-Node: Minibuffers\7f699451
-Node: Intro to Minibuffers\7f700603
-Node: Text from Minibuffer\7f702791
-Node: Object from Minibuffer\7f707666
-Node: Minibuffer History\7f710893
-Node: Completion\7f713872
-Node: Basic Completion\7f715847
-Node: Minibuffer Completion\7f720876
-Node: Completion Commands\7f724453
-Node: High-Level Completion\7f729096
-Node: Reading File Names\7f733120
-Node: Programmed Completion\7f736804
-Node: Yes-or-No Queries\7f739186
-Node: Multiple Queries\7f744923
-Node: Reading a Password\7f748990
-Node: Minibuffer Misc\7f750327
-Node: Command Loop\7f755197
-Node: Command Overview\7f756541
-Node: Defining Commands\7f759819
-Node: Using Interactive\7f760567
-Node: Interactive Codes\7f765340
-Node: Interactive Examples\7f771132
-Node: Interactive Call\7f772446
-Node: Command Loop Info\7f777847
-Node: Events\7f782826
-Node: Event Types\7f784286
-Node: Event Contents\7f786209
-Node: Event Predicates\7f790685
-Node: Accessing Mouse Event Positions\7f792010
-Node: Frame-Level Event Position Info\7f792709
-Node: Window-Level Event Position Info\7f793749
-Node: Event Text Position Info\7f795513
-Node: Event Glyph Position Info\7f798005
-Node: Event Toolbar Position Info\7f799328
-Node: Other Event Position Info\7f799999
-Node: Accessing Other Event Info\7f800408
-Node: Working With Events\7f802028
-Node: Converting Events\7f808016
-Node: Reading Input\7f810968
-Node: Key Sequence Input\7f811970
-Node: Reading One Event\7f813924
-Node: Dispatching an Event\7f816741
-Node: Quoted Character Input\7f817192
-Node: Peeking and Discarding\7f818540
-Node: Waiting\7f822444
-Node: Quitting\7f824752
-Node: Prefix Command Arguments\7f829160
-Node: Recursive Editing\7f834247
-Node: Disabling Commands\7f839043
-Node: Command History\7f841111
-Node: Keyboard Macros\7f842848
-Node: Keymaps\7f845065
-Node: Keymap Terminology\7f846642
-Node: Format of Keymaps\7f849571
-Node: Creating Keymaps\7f849982
-Node: Inheritance and Keymaps\7f852061
-Node: Key Sequences\7f854433
-Node: Prefix Keys\7f859229
-Node: Active Keymaps\7f862814
-Node: Key Lookup\7f872135
-Node: Functions for Key Lookup\7f877298
-Node: Changing Key Bindings\7f882995
-Node: Key Binding Commands\7f889892
-Node: Scanning Keymaps\7f891957
-Node: Other Keymap Functions\7f900468
-Node: Menus\7f901090
-Node: Menu Format\7f901682
-Node: Menubar Format\7f910328
-Node: Menubar\7f910953
-Node: Modifying Menus\7f914066
-Node: Menu Filters\7f919080
-Node: Pop-Up Menus\7f920976
-Node: Menu Accelerators\7f923181
-Node: Creating Menu Accelerators\7f923937
-Node: Keyboard Menu Traversal\7f925297
-Node: Menu Accelerator Functions\7f926024
-Node: Buffers Menu\7f929101
-Node: Dialog Boxes\7f930395
-Node: Dialog Box Format\7f930562
-Node: Dialog Box Functions\7f931987
-Node: Toolbar\7f932384
-Node: Toolbar Intro\7f932709
-Node: Toolbar Descriptor Format\7f935118
-Node: Specifying the Toolbar\7f939612
-Node: Other Toolbar Variables\7f943217
-Node: Scrollbars\7f947643
-Node: Drag and Drop\7f947779
-Node: Supported Protocols\7f948855
-Node: OffiX DND\7f949358
-Node: CDE dt\7f950365
-Node: MSWindows OLE\7f950956
-Node: Loose ends\7f951127
-Node: Drop Interface\7f951519
-Node: Drag Interface\7f952541
-Node: Modes\7f952715
-Node: Major Modes\7f953666
-Node: Major Mode Conventions\7f956581
-Node: Example Major Modes\7f962536
-Node: Auto Major Mode\7f970569
-Node: Mode Help\7f978017
-Node: Derived Modes\7f979118
-Node: Minor Modes\7f981309
-Node: Minor Mode Conventions\7f982611
-Node: Keymaps and Minor Modes\7f985474
-Node: Modeline Format\7f986309
-Node: Modeline Data\7f988077
-Node: Modeline Variables\7f992347
-Node: %-Constructs\7f997063
-Node: Hooks\7f999974
-Node: Documentation\7f1006736
-Node: Documentation Basics\7f1008159
-Node: Accessing Documentation\7f1011209
-Node: Keys in Documentation\7f1017488
-Node: Describing Characters\7f1020967
-Node: Help Functions\7f1023316
-Node: Obsoleteness\7f1029767
-Node: Files\7f1032761
-Node: Visiting Files\7f1034686
-Node: Visiting Functions\7f1036191
-Node: Subroutines of Visiting\7f1041238
-Node: Saving Buffers\7f1043311
-Node: Reading from Files\7f1049404
-Node: Writing to Files\7f1051561
-Node: File Locks\7f1054278
-Node: Information about Files\7f1057331
-Node: Testing Accessibility\7f1058092
-Node: Kinds of Files\7f1061832
-Node: Truenames\7f1063513
-Node: File Attributes\7f1064515
-Node: Changing File Attributes\7f1069654
-Node: File Names\7f1075060
-Node: File Name Components\7f1076669
-Node: Directory Names\7f1079770
-Node: Relative File Names\7f1083223
-Node: File Name Expansion\7f1084301
-Node: Unique File Names\7f1088208
-Node: File Name Completion\7f1089823
-Node: User Name Completion\7f1092484
-Node: Contents of Directories\7f1093824
-Node: Create/Delete Dirs\7f1097137
-Node: Magic File Names\7f1098243
-Node: Partial Files\7f1103873
-Node: Intro to Partial Files\7f1104101
-Node: Creating a Partial File\7f1105341
-Node: Detached Partial Files\7f1106276
-Node: Format Conversion\7f1107398
-Node: Files and MS-DOS\7f1113914
-Node: Backups and Auto-Saving\7f1115978
-Node: Backup Files\7f1116653
-Node: Making Backups\7f1118050
-Node: Rename or Copy\7f1120799
-Node: Numbered Backups\7f1123292
-Node: Backup Names\7f1125536
-Node: Auto-Saving\7f1128828
-Node: Reverting\7f1136970
-Node: Buffers\7f1140128
-Node: Buffer Basics\7f1141545
-Node: Current Buffer\7f1143598
-Node: Buffer Names\7f1148286
-Node: Buffer File Name\7f1151491
-Node: Buffer Modification\7f1155610
-Node: Modification Time\7f1157803
-Node: Read Only Buffers\7f1161178
-Node: The Buffer List\7f1163596
-Node: Creating Buffers\7f1168426
-Node: Killing Buffers\7f1170572
-Node: Indirect Buffers\7f1174303
-Node: Windows\7f1176875
-Node: Basic Windows\7f1178353
-Node: Splitting Windows\7f1181451
-Node: Deleting Windows\7f1188340
-Node: Selecting Windows\7f1191020
-Node: Cyclic Window Ordering\7f1194149
-Node: Buffers and Windows\7f1198773
-Node: Displaying Buffers\7f1200614
-Node: Choosing Window\7f1205790
-Node: Window Point\7f1213506
-Node: Window Start\7f1215552
-Node: Vertical Scrolling\7f1220042
-Node: Horizontal Scrolling\7f1226179
-Node: Size of Window\7f1229688
-Node: Position of Window\7f1234406
-Node: Resizing Windows\7f1236646
-Node: Window Configurations\7f1242075
-Node: Frames\7f1245500
-Node: Creating Frames\7f1247269
-Node: Frame Properties\7f1248610
-Node: Property Access\7f1249426
-Node: Initial Properties\7f1250275
-Node: X Frame Properties\7f1252761
-Node: Size and Position\7f1257395
-Node: Frame Name\7f1259391
-Node: Frame Titles\7f1260305
-Node: Deleting Frames\7f1262129
-Node: Finding All Frames\7f1262729
-Node: Frames and Windows\7f1264723
-Node: Minibuffers and Frames\7f1266428
-Node: Input Focus\7f1267346
-Node: Visibility of Frames\7f1270423
-Node: Raising and Lowering\7f1272342
-Node: Frame Configurations\7f1274718
-Node: Frame Hooks\7f1275312
-Node: Consoles and Devices\7f1277117
-Node: Basic Console Functions\7f1279860
-Node: Basic Device Functions\7f1280283
-Node: Console Types and Device Classes\7f1280999
-Node: Connecting to a Console or Device\7f1283196
-Node: The Selected Console and Device\7f1285359
-Node: Console and Device I/O\7f1286385
-Node: Positions\7f1287149
-Node: Point\7f1288118
-Node: Motion\7f1291208
-Node: Character Motion\7f1291975
-Node: Word Motion\7f1294212
-Node: Buffer End Motion\7f1295713
-Node: Text Lines\7f1297210
-Node: Screen Lines\7f1301805
-Node: List Motion\7f1305868
-Node: Skipping Characters\7f1309276
-Node: Excursions\7f1311495
-Node: Narrowing\7f1314527
-Node: Markers\7f1319852
-Node: Overview of Markers\7f1320758
-Node: Predicates on Markers\7f1325450
-Node: Creating Markers\7f1326696
-Node: Information from Markers\7f1330733
-Node: Changing Markers\7f1331831
-Node: The Mark\7f1333209
-Node: The Region\7f1341703
-Node: Text\7f1347389
-Node: Near Point\7f1350088
-Node: Buffer Contents\7f1354275
-Node: Comparing Text\7f1355681
-Node: Insertion\7f1357089
-Node: Commands for Insertion\7f1360931
-Node: Deletion\7f1363887
-Node: User-Level Deletion\7f1367482
-Node: The Kill Ring\7f1371643
-Node: Kill Ring Concepts\7f1373817
-Node: Kill Functions\7f1374871
-Node: Yank Commands\7f1376776
-Node: Low-Level Kill Ring\7f1378647
-Node: Internals of Kill Ring\7f1381433
-Node: Undo\7f1384213
-Node: Maintaining Undo\7f1388542
-Node: Filling\7f1391162
-Node: Margins\7f1397156
-Node: Auto Filling\7f1401085
-Node: Sorting\7f1402266
-Node: Columns\7f1411566
-Node: Indentation\7f1414082
-Node: Primitive Indent\7f1414861
-Node: Mode-Specific Indent\7f1416105
-Node: Region Indent\7f1418616
-Node: Relative Indent\7f1421564
-Node: Indent Tabs\7f1423946
-Node: Motion by Indent\7f1425267
-Node: Case Changes\7f1426046
-Node: Text Properties\7f1429297
-Node: Examining Properties\7f1431110
-Node: Changing Properties\7f1432977
-Node: Property Search\7f1436568
-Node: Special Properties\7f1441279
-Node: Saving Properties\7f1441560
-Node: Substitution\7f1444702
-Node: Registers\7f1447972
-Node: Transposition\7f1450515
-Node: Change Hooks\7f1451409
-Node: Transformations\7f1453449
-Node: Searching and Matching\7f1457834
-Node: String Search\7f1458965
-Node: Regular Expressions\7f1463689
-Node: Syntax of Regexps\7f1465056
-Node: Regexp Example\7f1479435
-Node: Regexp Search\7f1481605
-Node: POSIX Regexps\7f1487693
-Node: Search and Replace\7f1489528
-Node: Match Data\7f1492893
-Node: Simple Match Data\7f1494023
-Node: Replacing Match\7f1498288
-Node: Entire Match Data\7f1500622
-Node: Saving Match Data\7f1502613
-Node: Searching and Case\7f1503994
-Node: Standard Regexps\7f1506028
-Node: Syntax Tables\7f1508226
-Node: Syntax Basics\7f1509340
-Node: Syntax Descriptors\7f1512312
-Node: Syntax Class Table\7f1514162
-Node: Syntax Flags\7f1520200
-Node: Syntax Table Functions\7f1523417
-Node: Motion and Syntax\7f1527281
-Node: Parsing Expressions\7f1528733
-Node: Standard Syntax Tables\7f1534802
-Node: Syntax Table Internals\7f1535646
-Node: Abbrevs\7f1536672
-Node: Abbrev Mode\7f1538475
-Node: Abbrev Tables\7f1539195
-Node: Defining Abbrevs\7f1540728
-Node: Abbrev Files\7f1542633
-Node: Abbrev Expansion\7f1544406
-Node: Standard Abbrev Tables\7f1549037
-Node: Extents\7f1550196
-Node: Intro to Extents\7f1551439
-Node: Creating and Modifying Extents\7f1555433
-Node: Extent Endpoints\7f1556940
-Node: Finding Extents\7f1560203
-Node: Mapping Over Extents\7f1563951
-Node: Extent Properties\7f1570068
-Node: Detached Extents\7f1580212
-Node: Extent Parents\7f1582071
-Node: Duplicable Extents\7f1583765
-Node: Extents and Events\7f1586986
-Node: Atomic Extents\7f1588893
-Node: Specifiers\7f1589340
-Node: Introduction to Specifiers\7f1591453
-Node: Specifiers In-Depth\7f1593763
-Node: Specifier Instancing\7f1598675
-Node: Specifier Types\7f1601937
-Node: Adding Specifications\7f1607011
-Node: Retrieving Specifications\7f1616373
-Node: Specifier Tag Functions\7f1620108
-Node: Specifier Instancing Functions\7f1623342
-Node: Specifier Example\7f1626749
-Node: Creating Specifiers\7f1629905
-Node: Specifier Validation Functions\7f1632154
-Node: Other Specification Functions\7f1634538
-Node: Faces and Window-System Objects\7f1638357
-Node: Faces\7f1638681
-Node: Merging Faces\7f1640298
-Node: Basic Face Functions\7f1642259
-Node: Face Properties\7f1644357
-Node: Face Convenience Functions\7f1654599
-Node: Other Face Display Functions\7f1657729
-Node: Fonts\7f1658542
-Node: Font Specifiers\7f1659243
-Node: Font Instances\7f1659484
-Node: Font Instance Names\7f1660451
-Node: Font Instance Size\7f1661292
-Node: Font Instance Characteristics\7f1662578
-Node: Font Convenience Functions\7f1663747
-Node: Colors\7f1665037
-Node: Color Specifiers\7f1665477
-Node: Color Instances\7f1665704
-Node: Color Instance Properties\7f1666448
-Node: Color Convenience Functions\7f1667074
-Node: Glyphs\7f1668127
-Node: Glyph Functions\7f1669719
-Node: Creating Glyphs\7f1670126
-Node: Glyph Properties\7f1671713
-Node: Glyph Convenience Functions\7f1680880
-Node: Glyph Dimensions\7f1684827
-Node: Images\7f1685907
-Node: Image Specifiers\7f1686356
-Node: Image Instantiator Conversion\7f1697777
-Node: Image Instances\7f1699142
-Node: Image Instance Types\7f1699893
-Node: Image Instance Functions\7f1702548
-Node: Glyph Types\7f1707117
-Node: Mouse Pointer\7f1708889
-Node: Redisplay Glyphs\7f1711892
-Node: Subwindows\7f1712925
-Node: Annotations\7f1713168
-Node: Annotation Basics\7f1714184
-Node: Annotation Primitives\7f1718122
-Node: Annotation Properties\7f1719451
-Node: Locating Annotations\7f1722491
-Node: Margin Primitives\7f1723328
-Node: Annotation Hooks\7f1725222
-Node: Display\7f1725882
-Node: Refresh Screen\7f1726860
-Node: Truncation\7f1728771
-Node: The Echo Area\7f1731296
-Node: Warnings\7f1737731
-Node: Invisible Text\7f1742167
-Node: Selective Display\7f1744746
-Node: Overlay Arrow\7f1748872
-Node: Temporary Displays\7f1750225
-Node: Blinking\7f1754346
-Node: Usual Display\7f1756531
-Node: Display Tables\7f1759080
-Node: Display Table Format\7f1759884
-Node: Active Display Table\7f1761326
-Node: Character Descriptors\7f1762518
-Node: Beeping\7f1763275
-Node: Hash Tables\7f1768041
-Node: Introduction to Hash Tables\7f1768649
-Node: Working With Hash Tables\7f1774672
-Node: Weak Hash Tables\7f1775789
-Node: Range Tables\7f1777588
-Node: Introduction to Range Tables\7f1778277
-Node: Working With Range Tables\7f1778708
-Node: Databases\7f1779593
-Node: Connecting to a Database\7f1779892
-Node: Working With a Database\7f1780983
-Node: Other Database Functions\7f1781841
-Node: Processes\7f1782415
-Node: Subprocess Creation\7f1784639
-Node: Synchronous Processes\7f1787928
-Node: MS-DOS Subprocesses\7f1794646
-Node: Asynchronous Processes\7f1795720
-Node: Deleting Processes\7f1799433
-Node: Process Information\7f1801304
-Node: Input to Processes\7f1805230
-Node: Signals to Processes\7f1807520
-Node: Output from Processes\7f1811940
-Node: Process Buffers\7f1812752
-Node: Filter Functions\7f1815619
-Node: Accepting Output\7f1821189
-Node: Sentinels\7f1822716
-Node: Process Window Size\7f1826206
-Node: Transaction Queues\7f1826555
-Node: Network\7f1828253
-Node: System Interface\7f1830087
-Node: Starting Up\7f1831357
-Node: Start-up Summary\7f1831951
-Node: Init File\7f1835505
-Node: Terminal-Specific\7f1837886
-Node: Command Line Arguments\7f1841045
-Node: Getting Out\7f1844534
-Node: Killing XEmacs\7f1845103
-Node: Suspending XEmacs\7f1846772
-Node: System Environment\7f1850114
-Node: User Identification\7f1856781
-Node: Time of Day\7f1860310
-Node: Time Conversion\7f1863097
-Node: Timers\7f1868137
-Node: Terminal Input\7f1870310
-Node: Input Modes\7f1870813
-Node: Translating Input\7f1873226
-Node: Recording Input\7f1877391
-Node: Terminal Output\7f1879491
-Node: Flow Control\7f1883114
-Node: Batch Mode\7f1886906
-Node: X-Windows\7f1888288
-Node: X Selections\7f1889159
-Node: X Server\7f1891369
-Node: Resources\7f1891820
-Node: Server Data\7f1897129
-Node: Grabs\7f1898336
-Node: X Miscellaneous\7f1899916
-Node: ToolTalk Support\7f1902301
-Node: XEmacs ToolTalk API Summary\7f1902518
-Node: Sending Messages\7f1903818
-Node: Example of Sending Messages\7f1904069
-Node: Elisp Interface for Sending Messages\7f1905131
-Node: Receiving Messages\7f1911523
-Node: Example of Receiving Messages\7f1911746
-Node: Elisp Interface for Receiving Messages\7f1912582
-Node: LDAP Support\7f1916407
-Node: Building XEmacs with LDAP support\7f1916903
-Node: XEmacs LDAP API\7f1917881
-Node: LDAP Variables\7f1918611
-Node: The High-Level LDAP API\7f1921087
-Node: The Low-Level LDAP API\7f1922192
-Node: The LDAP Lisp Object\7f1922466
-Node: Opening and Closing a LDAP Connection\7f1923019
-Node: Searching on a LDAP Server (Low-level)\7f1924802
-Node: Syntax of Search Filters\7f1926195
-Node: Internationalization\7f1927493
-Node: I18N Levels 1 and 2\7f1927830
-Node: I18N Level 3\7f1928536
-Node: Level 3 Basics\7f1928817
-Node: Level 3 Primitives\7f1929650
-Node: Dynamic Messaging\7f1931256
-Node: Domain Specification\7f1931719
-Node: Documentation String Extraction\7f1933622
-Node: I18N Level 4\7f1934540
-Node: MULE\7f1934732
-Node: Internationalization Terminology\7f1935843
-Node: Charsets\7f1944377
-Node: Charset Properties\7f1945073
-Node: Basic Charset Functions\7f1949759
-Node: Charset Property Functions\7f1951940
-Node: Predefined Charsets\7f1953982
-Node: MULE Characters\7f1956902
-Node: Composite Characters\7f1957749
-Node: ISO 2022\7f1959003
-Node: Coding Systems\7f1965145
-Node: Coding System Types\7f1967066
-Node: EOL Conversion\7f1968885
-Node: Coding System Properties\7f1970068
-Node: Basic Coding System Functions\7f1973920
-Node: Coding System Property Functions\7f1975824
-Node: Encoding and Decoding Text\7f1976382
-Node: Detection of Textual Encoding\7f1977518
-Node: Big5 and Shift-JIS Functions\7f1979054
-Node: CCL\7f1980142
-Node: CCL Syntax\7f1983246
-Node: CCL Statements\7f1984834
-Node: CCL Expressions\7f1989482
-Node: Calling CCL\7f1992021
-Node: CCL Examples\7f1995010
-Node: Category Tables\7f1995147
-Node: Tips\7f1997505
-Node: Style Tips\7f1998146
-Node: Compilation Tips\7f2007665
-Node: Documentation Tips\7f2009579
-Node: Comment Tips\7f2015088
-Node: Library Headers\7f2018090
-Node: Building XEmacs and Object Allocation\7f2022062
-Node: Building XEmacs\7f2022945
-Node: Pure Storage\7f2029280
-Node: Garbage Collection\7f2032068
-Node: Standard Errors\7f2043207
-Node: Standard Buffer-Local Variables\7f2047416
-Node: Standard Keymaps\7f2050049
-Node: Standard Hooks\7f2053781
-Node: Index\7f2061281
+Node: Copying\7f48665
+Node: Introduction\7f67823
+Node: Caveats\7f69414
+Node: Lisp History\7f71145
+Node: Conventions\7f72401
+Node: Some Terms\7f73216
+Node: nil and t\7f73937
+Node: Evaluation Notation\7f75614
+Node: Printing Notation\7f76527
+Node: Error Messages\7f77401
+Node: Buffer Text Notation\7f77842
+Node: Format of Descriptions\7f78717
+Node: A Sample Function Description\7f79571
+Node: A Sample Variable Description\7f83557
+Node: Acknowledgements\7f84465
+Node: Lisp Data Types\7f86443
+Node: Printed Representation\7f88998
+Node: Comments\7f91040
+Node: Primitive Types\7f91937
+Node: Programming Types\7f93596
+Node: Integer Type\7f95548
+Node: Floating Point Type\7f96585
+Node: Character Type\7f97204
+Node: Symbol Type\7f105108
+Node: Sequence Type\7f107803
+Node: Cons Cell Type\7f109322
+Node: Dotted Pair Notation\7f113806
+Node: Association List Type\7f115927
+Node: Array Type\7f116810
+Node: String Type\7f118276
+Node: Vector Type\7f120957
+Node: Bit Vector Type\7f121729
+Node: Function Type\7f122591
+Node: Macro Type\7f123704
+Node: Primitive Function Type\7f124401
+Node: Compiled-Function Type\7f125927
+Node: Autoload Type\7f126481
+Node: Char Table Type\7f127495
+Node: Hash Table Type\7f127669
+Node: Range Table Type\7f128824
+Node: Weak List Type\7f129677
+Node: Editing Types\7f129827
+Node: Buffer Type\7f131454
+Node: Marker Type\7f133481
+Node: Extent Type\7f134205
+Node: Window Type\7f135473
+Node: Frame Type\7f136884
+Node: Device Type\7f137679
+Node: Console Type\7f138505
+Node: Window Configuration Type\7f139706
+Node: Event Type\7f140404
+Node: Process Type\7f140568
+Node: Stream Type\7f141603
+Node: Keymap Type\7f142726
+Node: Syntax Table Type\7f143264
+Node: Display Table Type\7f144287
+Node: Database Type\7f144726
+Node: Charset Type\7f144892
+Node: Coding System Type\7f145056
+Node: ToolTalk Message Type\7f145240
+Node: ToolTalk Pattern Type\7f145439
+Node: Window-System Types\7f145611
+Node: Face Type\7f146757
+Node: Glyph Type\7f146888
+Node: Specifier Type\7f147044
+Node: Font Instance Type\7f147217
+Node: Color Instance Type\7f147407
+Node: Image Instance Type\7f147604
+Node: Toolbar Button Type\7f147802
+Node: Subwindow Type\7f147995
+Node: X Resource Type\7f148174
+Node: Type Predicates\7f148327
+Node: Equality Predicates\7f157456
+Node: Numbers\7f162261
+Node: Integer Basics\7f163716
+Node: Float Basics\7f166065
+Node: Predicates on Numbers\7f167807
+Node: Comparison of Numbers\7f169440
+Node: Numeric Conversions\7f173261
+Node: Arithmetic Operations\7f174727
+Node: Rounding Operations\7f180192
+Node: Bitwise Operations\7f181297
+Node: Math Functions\7f190343
+Node: Random Numbers\7f192659
+Node: Strings and Characters\7f194425
+Node: String Basics\7f195878
+Node: Predicates for Strings\7f198296
+Node: Creating Strings\7f199059
+Node: Predicates for Characters\7f204376
+Node: Character Codes\7f205447
+Node: Text Comparison\7f206860
+Node: String Conversion\7f210222
+Node: Modifying Strings\7f213898
+Node: String Properties\7f214539
+Node: Formatting Strings\7f215184
+Node: Character Case\7f224802
+Node: Case Tables\7f227948
+Node: Char Tables\7f231846
+Node: Char Table Types\7f233238
+Node: Working With Char Tables\7f234813
+Node: Lists\7f236762
+Node: Cons Cells\7f237885
+Node: Lists as Boxes\7f239221
+Node: List-related Predicates\7f241863
+Node: List Elements\7f243565
+Node: Building Lists\7f248594
+Node: Modifying Lists\7f254586
+Node: Setcar\7f255398
+Node: Setcdr\7f257819
+Node: Rearrangement\7f260330
+Node: Sets And Lists\7f265916
+Node: Association Lists\7f270144
+Ref: Association Lists-Footnote-1\7f279435
+Node: Property Lists\7f279640
+Node: Working With Normal Plists\7f281188
+Node: Working With Lax Plists\7f283456
+Node: Converting Plists To/From Alists\7f285696
+Node: Weak Lists\7f287044
+Node: Sequences Arrays Vectors\7f289207
+Node: Sequence Functions\7f291843
+Node: Arrays\7f295502
+Node: Array Functions\7f298566
+Node: Vectors\7f301099
+Node: Vector Functions\7f302597
+Node: Bit Vectors\7f305168
+Node: Bit Vector Functions\7f306013
+Node: Symbols\7f308263
+Node: Symbol Components\7f309312
+Node: Definitions\7f313485
+Node: Creating Symbols\7f315710
+Node: Symbol Properties\7f322744
+Node: Plists and Alists\7f324271
+Node: Object Plists\7f326020
+Node: Other Plists\7f328780
+Node: Evaluation\7f330582
+Node: Intro Eval\7f331387
+Ref: Intro Eval-Footnote-1\7f334740
+Node: Eval\7f334875
+Node: Forms\7f339293
+Node: Self-Evaluating Forms\7f340452
+Node: Symbol Forms\7f341965
+Node: Classifying Lists\7f342882
+Node: Function Indirection\7f343638
+Node: Function Forms\7f346749
+Node: Macro Forms\7f347746
+Node: Special Forms\7f349346
+Node: Autoloading\7f351655
+Node: Quoting\7f352153
+Node: Control Structures\7f353514
+Node: Sequencing\7f355134
+Node: Conditionals\7f357999
+Node: Combining Conditions\7f361422
+Node: Iteration\7f364692
+Node: Nonlocal Exits\7f366471
+Node: Catch and Throw\7f367173
+Node: Examples of Catch\7f371012
+Node: Errors\7f373031
+Node: Signaling Errors\7f374520
+Node: Processing of Errors\7f379259
+Node: Handling Errors\7f381538
+Node: Error Symbols\7f388779
+Node: Cleanups\7f392735
+Node: Variables\7f396513
+Node: Global Variables\7f398282
+Node: Constant Variables\7f399358
+Node: Local Variables\7f399984
+Node: Void Variables\7f404921
+Node: Defining Variables\7f408437
+Node: Accessing Variables\7f415601
+Node: Setting Variables\7f417026
+Node: Variable Scoping\7f421545
+Node: Scope\7f423144
+Node: Extent\7f424669
+Node: Impl of Scope\7f426148
+Node: Using Scoping\7f428111
+Node: Buffer-Local Variables\7f429633
+Node: Intro to Buffer-Local\7f430469
+Node: Creating Buffer-Local\7f433012
+Node: Default Value\7f438231
+Node: Variable Aliases\7f441374
+Node: Functions\7f443159
+Node: What Is a Function\7f444253
+Node: Lambda Expressions\7f448299
+Node: Lambda Components\7f449209
+Node: Simple Lambda\7f451041
+Node: Argument List\7f452698
+Node: Function Documentation\7f456426
+Node: Function Names\7f458368
+Node: Defining Functions\7f460941
+Node: Calling Functions\7f463981
+Node: Mapping Functions\7f467830
+Node: Anonymous Functions\7f470518
+Node: Function Cells\7f473763
+Node: Inline Functions\7f478573
+Node: Related Topics\7f480383
+Node: Macros\7f481436
+Node: Simple Macro\7f482720
+Node: Expansion\7f483455
+Node: Compiling Macros\7f486459
+Node: Defining Macros\7f488295
+Node: Backquote\7f489612
+Node: Problems with Macros\7f492009
+Node: Argument Evaluation\7f492704
+Node: Surprising Local Vars\7f495619
+Node: Eval During Expansion\7f497687
+Node: Repeated Expansion\7f499380
+Node: Customization\7f501296
+Node: Common Keywords\7f501765
+Node: Group Definitions\7f504610
+Node: Variable Definitions\7f506802
+Node: Customization Types\7f511792
+Node: Simple Types\7f513227
+Node: Composite Types\7f515384
+Node: Splicing into Lists\7f520074
+Node: Type Keywords\7f521909
+Node: Loading\7f525429
+Node: How Programs Do Loading\7f527104
+Node: Autoload\7f536231
+Node: Repeated Loading\7f542310
+Node: Named Features\7f544423
+Node: Unloading\7f550855
+Node: Hooks for Loading\7f553011
+Node: Byte Compilation\7f553728
+Node: Speed of Byte-Code\7f555645
+Node: Compilation Functions\7f556852
+Node: Docs and Compilation\7f563239
+Node: Dynamic Loading\7f565892
+Node: Eval During Compile\7f568256
+Node: Compiled-Function Objects\7f569521
+Node: Disassembly\7f574319
+Node: Debugging\7f581573
+Node: Debugger\7f582985
+Node: Error Debugging\7f584130
+Node: Infinite Loops\7f586883
+Node: Function Debugging\7f588127
+Node: Explicit Debug\7f590917
+Node: Using Debugger\7f591688
+Node: Debugger Commands\7f593550
+Node: Invoking the Debugger\7f597867
+Node: Internals of Debugger\7f601782
+Node: Syntax Errors\7f606669
+Node: Excess Open\7f607917
+Node: Excess Close\7f609792
+Node: Compilation Errors\7f611213
+Node: Edebug\7f612501
+Node: Using Edebug\7f614609
+Node: Instrumenting\7f617306
+Node: Edebug Execution Modes\7f620795
+Node: Jumping\7f623905
+Node: Edebug Misc\7f626248
+Node: Breakpoints\7f627637
+Node: Global Break Condition\7f630443
+Node: Embedded Breakpoints\7f631398
+Node: Trapping Errors\7f632353
+Node: Edebug Views\7f634429
+Node: Edebug Eval\7f636394
+Node: Eval List\7f637571
+Node: Reading in Edebug\7f640956
+Node: Printing in Edebug\7f641755
+Node: Tracing\7f643470
+Node: Coverage Testing\7f645356
+Node: The Outside Context\7f647397
+Node: Checking Whether to Stop\7f648346
+Node: Edebug Display Update\7f648993
+Node: Edebug Recursive Edit\7f651016
+Node: Instrumenting Macro Calls\7f652671
+Node: Specification List\7f655153
+Node: Backtracking\7f664564
+Node: Debugging Backquote\7f666502
+Node: Specification Examples\7f670208
+Node: Edebug Options\7f672275
+Node: Read and Print\7f677612
+Node: Streams Intro\7f678589
+Node: Input Streams\7f680607
+Node: Input Functions\7f685508
+Node: Output Streams\7f687568
+Node: Output Functions\7f691619
+Node: Output Variables\7f695919
+Node: Minibuffers\7f700718
+Node: Intro to Minibuffers\7f701870
+Node: Text from Minibuffer\7f704058
+Node: Object from Minibuffer\7f709144
+Node: Minibuffer History\7f713239
+Node: Completion\7f716218
+Node: Basic Completion\7f718193
+Node: Minibuffer Completion\7f723222
+Node: Completion Commands\7f726799
+Node: High-Level Completion\7f731456
+Node: Reading File Names\7f736198
+Node: Programmed Completion\7f739890
+Node: Yes-or-No Queries\7f742272
+Node: Multiple Queries\7f748009
+Node: Reading a Password\7f752076
+Node: Minibuffer Misc\7f753413
+Node: Command Loop\7f758283
+Node: Command Overview\7f759627
+Node: Defining Commands\7f762905
+Node: Using Interactive\7f763653
+Node: Interactive Codes\7f768426
+Node: Interactive Examples\7f774218
+Node: Interactive Call\7f775532
+Node: Command Loop Info\7f780933
+Node: Events\7f785912
+Node: Event Types\7f787372
+Node: Event Contents\7f789295
+Node: Event Predicates\7f793771
+Node: Accessing Mouse Event Positions\7f795096
+Node: Frame-Level Event Position Info\7f795795
+Node: Window-Level Event Position Info\7f796835
+Node: Event Text Position Info\7f798599
+Node: Event Glyph Position Info\7f801091
+Node: Event Toolbar Position Info\7f802414
+Node: Other Event Position Info\7f803085
+Node: Accessing Other Event Info\7f803494
+Node: Working With Events\7f805114
+Node: Converting Events\7f811102
+Node: Reading Input\7f814054
+Node: Key Sequence Input\7f815056
+Node: Reading One Event\7f817010
+Node: Dispatching an Event\7f819827
+Node: Quoted Character Input\7f820278
+Node: Peeking and Discarding\7f821626
+Node: Waiting\7f825530
+Node: Quitting\7f827838
+Node: Prefix Command Arguments\7f832246
+Node: Recursive Editing\7f837333
+Node: Disabling Commands\7f842129
+Node: Command History\7f844197
+Node: Keyboard Macros\7f845934
+Node: Keymaps\7f848151
+Node: Keymap Terminology\7f849728
+Node: Format of Keymaps\7f852657
+Node: Creating Keymaps\7f853068
+Node: Inheritance and Keymaps\7f855147
+Node: Key Sequences\7f857519
+Node: Prefix Keys\7f862315
+Node: Active Keymaps\7f865900
+Node: Key Lookup\7f875221
+Node: Functions for Key Lookup\7f880384
+Node: Changing Key Bindings\7f886081
+Node: Key Binding Commands\7f892978
+Node: Scanning Keymaps\7f895043
+Node: Other Keymap Functions\7f903554
+Node: Menus\7f904176
+Node: Menu Format\7f904768
+Node: Menubar Format\7f913414
+Node: Menubar\7f914039
+Node: Modifying Menus\7f917152
+Node: Menu Filters\7f922166
+Node: Pop-Up Menus\7f924062
+Node: Menu Accelerators\7f926267
+Node: Creating Menu Accelerators\7f927023
+Node: Keyboard Menu Traversal\7f928383
+Node: Menu Accelerator Functions\7f929110
+Node: Buffers Menu\7f932187
+Node: Dialog Boxes\7f933481
+Node: Dialog Box Format\7f933648
+Node: Dialog Box Functions\7f935073
+Node: Toolbar\7f935470
+Node: Toolbar Intro\7f935791
+Node: Toolbar Descriptor Format\7f938200
+Node: Specifying the Toolbar\7f942694
+Node: Other Toolbar Variables\7f946299
+Node: Gutter\7f950725
+Node: Gutter Intro\7f951201
+Node: Gutter Descriptor Format\7f953198
+Node: Specifying a Gutter\7f957652
+Node: Other Gutter Variables\7f961185
+Node: Common Gutter Widgets\7f965570
+Node: Buffer Tabs\7f966562
+Node: Progress Bars\7f966703
+Node: Scrollbars\7f966848
+Node: Drag and Drop\7f966983
+Node: Supported Protocols\7f968059
+Node: OffiX DND\7f968562
+Node: CDE dt\7f969569
+Node: MSWindows OLE\7f970160
+Node: Loose ends\7f970331
+Node: Drop Interface\7f970723
+Node: Drag Interface\7f971745
+Node: Modes\7f971919
+Node: Major Modes\7f972870
+Node: Major Mode Conventions\7f975785
+Node: Example Major Modes\7f981740
+Node: Auto Major Mode\7f989773
+Node: Mode Help\7f997221
+Node: Derived Modes\7f998322
+Node: Minor Modes\7f1000513
+Node: Minor Mode Conventions\7f1001815
+Node: Keymaps and Minor Modes\7f1004678
+Node: Modeline Format\7f1005513
+Node: Modeline Data\7f1007281
+Node: Modeline Variables\7f1011551
+Node: %-Constructs\7f1016267
+Node: Hooks\7f1019178
+Node: Documentation\7f1025940
+Node: Documentation Basics\7f1027363
+Node: Accessing Documentation\7f1030413
+Node: Keys in Documentation\7f1036692
+Node: Describing Characters\7f1040171
+Node: Help Functions\7f1042520
+Node: Obsoleteness\7f1048971
+Node: Files\7f1051965
+Node: Visiting Files\7f1053890
+Node: Visiting Functions\7f1055395
+Node: Subroutines of Visiting\7f1060442
+Node: Saving Buffers\7f1062515
+Node: Reading from Files\7f1068608
+Node: Writing to Files\7f1070765
+Node: File Locks\7f1073482
+Node: Information about Files\7f1076535
+Node: Testing Accessibility\7f1077296
+Node: Kinds of Files\7f1081036
+Node: Truenames\7f1082717
+Node: File Attributes\7f1083719
+Node: Changing File Attributes\7f1088858
+Node: File Names\7f1094264
+Node: File Name Components\7f1095873
+Node: Directory Names\7f1098974
+Node: Relative File Names\7f1102427
+Node: File Name Expansion\7f1103505
+Node: Unique File Names\7f1107412
+Node: File Name Completion\7f1109027
+Node: User Name Completion\7f1111688
+Node: Contents of Directories\7f1113028
+Node: Create/Delete Dirs\7f1116341
+Node: Magic File Names\7f1117447
+Node: Partial Files\7f1123077
+Node: Intro to Partial Files\7f1123305
+Node: Creating a Partial File\7f1124545
+Node: Detached Partial Files\7f1125480
+Node: Format Conversion\7f1126602
+Node: Files and MS-DOS\7f1133118
+Node: Backups and Auto-Saving\7f1135182
+Node: Backup Files\7f1135857
+Node: Making Backups\7f1137254
+Node: Rename or Copy\7f1140003
+Node: Numbered Backups\7f1142496
+Node: Backup Names\7f1144731
+Node: Auto-Saving\7f1148023
+Node: Reverting\7f1156165
+Node: Buffers\7f1159323
+Node: Buffer Basics\7f1160740
+Node: Current Buffer\7f1162793
+Node: Buffer Names\7f1167481
+Node: Buffer File Name\7f1170686
+Node: Buffer Modification\7f1174805
+Node: Modification Time\7f1176998
+Node: Read Only Buffers\7f1180373
+Node: The Buffer List\7f1182791
+Node: Creating Buffers\7f1187621
+Node: Killing Buffers\7f1189767
+Node: Indirect Buffers\7f1193498
+Node: Windows\7f1196070
+Node: Basic Windows\7f1197548
+Node: Splitting Windows\7f1200646
+Node: Deleting Windows\7f1207535
+Node: Selecting Windows\7f1210215
+Node: Cyclic Window Ordering\7f1213344
+Node: Buffers and Windows\7f1217968
+Node: Displaying Buffers\7f1219809
+Node: Choosing Window\7f1224985
+Node: Window Point\7f1232701
+Node: Window Start\7f1234747
+Node: Vertical Scrolling\7f1239237
+Node: Horizontal Scrolling\7f1245374
+Node: Size of Window\7f1248883
+Node: Position of Window\7f1253601
+Node: Resizing Windows\7f1255841
+Node: Window Configurations\7f1261270
+Node: Frames\7f1264695
+Node: Creating Frames\7f1267036
+Node: Frame Properties\7f1268377
+Node: Property Access\7f1269193
+Node: Initial Properties\7f1270042
+Node: X Frame Properties\7f1272528
+Node: Size and Position\7f1277162
+Node: Frame Name\7f1279158
+Node: Frame Titles\7f1280072
+Node: Deleting Frames\7f1281896
+Node: Finding All Frames\7f1282496
+Node: Frames and Windows\7f1284490
+Node: Minibuffers and Frames\7f1286195
+Node: Input Focus\7f1287113
+Node: Visibility of Frames\7f1290190
+Node: Raising and Lowering\7f1292109
+Node: Frame Configurations\7f1294485
+Node: Frame Hooks\7f1295079
+Node: Consoles and Devices\7f1296884
+Node: Basic Console Functions\7f1299627
+Node: Basic Device Functions\7f1300050
+Node: Console Types and Device Classes\7f1300766
+Node: Connecting to a Console or Device\7f1302963
+Node: The Selected Console and Device\7f1305126
+Node: Console and Device I/O\7f1306152
+Node: Positions\7f1306916
+Node: Point\7f1307885
+Node: Motion\7f1310975
+Node: Character Motion\7f1311742
+Node: Word Motion\7f1313979
+Node: Buffer End Motion\7f1315480
+Node: Text Lines\7f1316977
+Node: Screen Lines\7f1321572
+Node: List Motion\7f1325635
+Node: Skipping Characters\7f1329043
+Node: Excursions\7f1331262
+Node: Narrowing\7f1334294
+Node: Markers\7f1339619
+Node: Overview of Markers\7f1340525
+Node: Predicates on Markers\7f1345217
+Node: Creating Markers\7f1346463
+Node: Information from Markers\7f1350500
+Node: Changing Markers\7f1351598
+Node: The Mark\7f1352976
+Node: The Region\7f1361470
+Node: Text\7f1367156
+Node: Near Point\7f1369855
+Node: Buffer Contents\7f1374042
+Node: Comparing Text\7f1375448
+Node: Insertion\7f1376856
+Node: Commands for Insertion\7f1380698
+Node: Deletion\7f1383654
+Node: User-Level Deletion\7f1387249
+Node: The Kill Ring\7f1391410
+Node: Kill Ring Concepts\7f1393584
+Node: Kill Functions\7f1394638
+Node: Yank Commands\7f1396543
+Node: Low-Level Kill Ring\7f1398414
+Node: Internals of Kill Ring\7f1401200
+Node: Undo\7f1403980
+Node: Maintaining Undo\7f1408309
+Node: Filling\7f1410929
+Node: Margins\7f1416923
+Node: Auto Filling\7f1420852
+Node: Sorting\7f1422033
+Node: Columns\7f1431333
+Node: Indentation\7f1433849
+Node: Primitive Indent\7f1434628
+Node: Mode-Specific Indent\7f1435872
+Node: Region Indent\7f1438383
+Node: Relative Indent\7f1441331
+Node: Indent Tabs\7f1443713
+Node: Motion by Indent\7f1445034
+Node: Case Changes\7f1445813
+Node: Text Properties\7f1449064
+Node: Examining Properties\7f1450877
+Node: Changing Properties\7f1452744
+Node: Property Search\7f1456335
+Node: Special Properties\7f1461046
+Node: Saving Properties\7f1461327
+Node: Substitution\7f1464469
+Node: Registers\7f1467739
+Node: Transposition\7f1470282
+Node: Change Hooks\7f1471176
+Node: Transformations\7f1473216
+Node: Searching and Matching\7f1477601
+Node: String Search\7f1478732
+Node: Regular Expressions\7f1483456
+Node: Syntax of Regexps\7f1484823
+Node: Regexp Example\7f1499202
+Node: Regexp Search\7f1501372
+Node: POSIX Regexps\7f1507460
+Node: Search and Replace\7f1509295
+Node: Match Data\7f1512660
+Node: Simple Match Data\7f1513790
+Node: Replacing Match\7f1518055
+Node: Entire Match Data\7f1520389
+Node: Saving Match Data\7f1522380
+Node: Searching and Case\7f1523761
+Node: Standard Regexps\7f1525795
+Node: Syntax Tables\7f1527993
+Node: Syntax Basics\7f1529107
+Node: Syntax Descriptors\7f1532079
+Node: Syntax Class Table\7f1533929
+Node: Syntax Flags\7f1539967
+Node: Syntax Table Functions\7f1543184
+Node: Motion and Syntax\7f1547048
+Node: Parsing Expressions\7f1548500
+Node: Standard Syntax Tables\7f1554569
+Node: Syntax Table Internals\7f1555413
+Node: Abbrevs\7f1556439
+Node: Abbrev Mode\7f1558242
+Node: Abbrev Tables\7f1558962
+Node: Defining Abbrevs\7f1560495
+Node: Abbrev Files\7f1562400
+Node: Abbrev Expansion\7f1564173
+Node: Standard Abbrev Tables\7f1568804
+Node: Extents\7f1569963
+Node: Intro to Extents\7f1571206
+Node: Creating and Modifying Extents\7f1575200
+Node: Extent Endpoints\7f1576707
+Node: Finding Extents\7f1579970
+Node: Mapping Over Extents\7f1583718
+Node: Extent Properties\7f1589835
+Node: Detached Extents\7f1599979
+Node: Extent Parents\7f1601838
+Node: Duplicable Extents\7f1603532
+Node: Extents and Events\7f1606753
+Node: Atomic Extents\7f1608660
+Node: Specifiers\7f1609107
+Node: Introduction to Specifiers\7f1611220
+Node: Specifiers In-Depth\7f1613530
+Node: Specifier Instancing\7f1618442
+Node: Specifier Types\7f1621704
+Node: Adding Specifications\7f1626778
+Node: Retrieving Specifications\7f1636140
+Node: Specifier Tag Functions\7f1639875
+Node: Specifier Instancing Functions\7f1643109
+Node: Specifier Example\7f1646516
+Node: Creating Specifiers\7f1649672
+Node: Specifier Validation Functions\7f1651921
+Node: Other Specification Functions\7f1654305
+Node: Faces and Window-System Objects\7f1658124
+Node: Faces\7f1658448
+Node: Merging Faces\7f1660065
+Node: Basic Face Functions\7f1662026
+Node: Face Properties\7f1664124
+Node: Face Convenience Functions\7f1674366
+Node: Other Face Display Functions\7f1677496
+Node: Fonts\7f1678309
+Node: Font Specifiers\7f1679010
+Node: Font Instances\7f1679251
+Node: Font Instance Names\7f1680218
+Node: Font Instance Size\7f1681059
+Node: Font Instance Characteristics\7f1682345
+Node: Font Convenience Functions\7f1683514
+Node: Colors\7f1684804
+Node: Color Specifiers\7f1685244
+Node: Color Instances\7f1685471
+Node: Color Instance Properties\7f1686215
+Node: Color Convenience Functions\7f1686841
+Node: Glyphs\7f1687894
+Node: Glyph Functions\7f1689486
+Node: Creating Glyphs\7f1689893
+Node: Glyph Properties\7f1691480
+Node: Glyph Convenience Functions\7f1700647
+Node: Glyph Dimensions\7f1704594
+Node: Images\7f1705674
+Node: Image Specifiers\7f1706123
+Node: Image Instantiator Conversion\7f1717472
+Node: Image Instances\7f1718837
+Node: Image Instance Types\7f1719588
+Node: Image Instance Functions\7f1722243
+Node: Glyph Types\7f1726812
+Node: Mouse Pointer\7f1728584
+Node: Redisplay Glyphs\7f1731587
+Node: Subwindows\7f1732620
+Node: Annotations\7f1732863
+Node: Annotation Basics\7f1733879
+Node: Annotation Primitives\7f1737817
+Node: Annotation Properties\7f1739146
+Node: Locating Annotations\7f1742186
+Node: Margin Primitives\7f1743023
+Node: Annotation Hooks\7f1744917
+Node: Display\7f1745577
+Node: Refresh Screen\7f1746555
+Node: Truncation\7f1748466
+Node: The Echo Area\7f1750991
+Node: Warnings\7f1757426
+Node: Invisible Text\7f1761862
+Node: Selective Display\7f1764441
+Node: Overlay Arrow\7f1768567
+Node: Temporary Displays\7f1769920
+Node: Blinking\7f1774041
+Node: Usual Display\7f1776226
+Node: Display Tables\7f1778775
+Node: Display Table Format\7f1779579
+Node: Active Display Table\7f1781021
+Node: Character Descriptors\7f1782213
+Node: Beeping\7f1782970
+Node: Hash Tables\7f1787736
+Node: Introduction to Hash Tables\7f1788344
+Node: Working With Hash Tables\7f1794367
+Node: Weak Hash Tables\7f1795484
+Node: Range Tables\7f1797283
+Node: Introduction to Range Tables\7f1797972
+Node: Working With Range Tables\7f1798403
+Node: Databases\7f1799288
+Node: Connecting to a Database\7f1799587
+Node: Working With a Database\7f1800678
+Node: Other Database Functions\7f1801536
+Node: Processes\7f1802110
+Node: Subprocess Creation\7f1804334
+Node: Synchronous Processes\7f1807623
+Node: MS-DOS Subprocesses\7f1814341
+Node: Asynchronous Processes\7f1815415
+Node: Deleting Processes\7f1819128
+Node: Process Information\7f1820999
+Node: Input to Processes\7f1824925
+Node: Signals to Processes\7f1827215
+Node: Output from Processes\7f1831635
+Node: Process Buffers\7f1832447
+Node: Filter Functions\7f1835314
+Node: Accepting Output\7f1840884
+Node: Sentinels\7f1842411
+Node: Process Window Size\7f1845901
+Node: Transaction Queues\7f1846250
+Node: Network\7f1847948
+Node: System Interface\7f1849782
+Node: Starting Up\7f1851052
+Node: Start-up Summary\7f1851646
+Node: Init File\7f1855200
+Node: Terminal-Specific\7f1857581
+Node: Command Line Arguments\7f1860740
+Node: Getting Out\7f1864229
+Node: Killing XEmacs\7f1864798
+Node: Suspending XEmacs\7f1866467
+Node: System Environment\7f1869809
+Node: User Identification\7f1876476
+Node: Time of Day\7f1880005
+Node: Time Conversion\7f1882792
+Node: Timers\7f1887832
+Node: Terminal Input\7f1890005
+Node: Input Modes\7f1890508
+Node: Translating Input\7f1892921
+Node: Recording Input\7f1897086
+Node: Terminal Output\7f1899186
+Node: Flow Control\7f1902809
+Node: Batch Mode\7f1906601
+Node: X-Windows\7f1907983
+Node: X Selections\7f1908854
+Node: X Server\7f1911064
+Node: Resources\7f1911515
+Node: Server Data\7f1916824
+Node: Grabs\7f1918031
+Node: X Miscellaneous\7f1919611
+Node: ToolTalk Support\7f1921996
+Node: XEmacs ToolTalk API Summary\7f1922213
+Node: Sending Messages\7f1923513
+Node: Example of Sending Messages\7f1923764
+Node: Elisp Interface for Sending Messages\7f1924826
+Node: Receiving Messages\7f1931218
+Node: Example of Receiving Messages\7f1931441
+Node: Elisp Interface for Receiving Messages\7f1932277
+Node: LDAP Support\7f1936102
+Node: Building XEmacs with LDAP support\7f1936596
+Node: XEmacs LDAP API\7f1937573
+Node: LDAP Variables\7f1938625
+Node: The High-Level LDAP API\7f1941225
+Node: The Low-Level LDAP API\7f1944688
+Node: The LDAP Lisp Object\7f1945519
+Node: Opening and Closing a LDAP Connection\7f1946072
+Node: Low-level Operations on a LDAP Server\7f1947872
+Node: LDAP Internationalization\7f1950566
+Node: LDAP Internationalization Variables\7f1951471
+Node: Encoder/Decoder Functions\7f1953200
+Node: Syntax of Search Filters\7f1954239
+Node: PostgreSQL Support\7f1955537
+Node: Building XEmacs with PostgreSQL support\7f1955932
+Node: XEmacs PostgreSQL libpq API\7f1957199
+Node: libpq Lisp Variables\7f1959074
+Node: libpq Lisp Symbols and DataTypes\7f1962038
+Node: Synchronous Interface Functions\7f1975278
+Node: Asynchronous Interface Functions\7f1979769
+Node: Large Object Support\7f1983270
+Node: Other libpq Functions\7f1983897
+Node: Unimplemented libpq Functions\7f1986932
+Node: XEmacs PostgreSQL libpq Examples\7f1992251
+Node: Internationalization\7f1998342
+Node: I18N Levels 1 and 2\7f1998685
+Node: I18N Level 3\7f1999391
+Node: Level 3 Basics\7f1999672
+Node: Level 3 Primitives\7f2000505
+Node: Dynamic Messaging\7f2002111
+Node: Domain Specification\7f2002574
+Node: Documentation String Extraction\7f2004477
+Node: I18N Level 4\7f2005395
+Node: MULE\7f2005587
+Node: Internationalization Terminology\7f2006636
+Node: Charsets\7f2018835
+Node: Charset Properties\7f2019531
+Node: Basic Charset Functions\7f2024246
+Node: Charset Property Functions\7f2026427
+Node: Predefined Charsets\7f2028469
+Node: MULE Characters\7f2031389
+Node: Composite Characters\7f2032236
+Node: Coding Systems\7f2033496
+Node: Coding System Types\7f2035636
+Node: ISO 2022\7f2039620
+Node: EOL Conversion\7f2051897
+Node: Coding System Properties\7f2053069
+Node: Basic Coding System Functions\7f2057386
+Node: Coding System Property Functions\7f2059420
+Node: Encoding and Decoding Text\7f2059978
+Node: Detection of Textual Encoding\7f2061114
+Node: Big5 and Shift-JIS Functions\7f2062650
+Node: Predefined Coding Systems\7f2063776
+Node: CCL\7f2075870
+Node: CCL Syntax\7f2078974
+Node: CCL Statements\7f2080550
+Node: CCL Expressions\7f2085198
+Node: Calling CCL\7f2087737
+Node: CCL Examples\7f2090726
+Node: Category Tables\7f2090863
+Node: Tips\7f2093221
+Node: Style Tips\7f2093862
+Node: Compilation Tips\7f2103381
+Node: Documentation Tips\7f2105295
+Node: Comment Tips\7f2110804
+Node: Library Headers\7f2113806
+Node: Building XEmacs and Object Allocation\7f2117778
+Node: Building XEmacs\7f2118661
+Node: Pure Storage\7f2124996
+Node: Garbage Collection\7f2127784
+Node: Standard Errors\7f2138923
+Node: Standard Buffer-Local Variables\7f2143132
+Node: Standard Keymaps\7f2145765
+Node: Standard Hooks\7f2149497
+Node: Index\7f2156997
\1f
End Tag Table
* Menus:: Defining pull-down and pop-up menus.
* Dialog Boxes:: Creating dialog boxes.
* Toolbar:: Controlling the toolbar.
+* Gutter:: Controlling the gutter.
* Scrollbars:: Controlling the scrollbars.
* Drag and Drop:: Generic API to inter-application communication
via specific protocols.
* ToolTalk Support:: Interfacing with the ToolTalk message service.
* LDAP Support:: Interfacing with the Lightweight Directory
Access Protocol.
+* PostgreSQL Support:: Interfacing to the PostgreSQL libpq library.
* Internationalization:: How Emacs supports different languages and
cultural conventions.
* MULE:: Specifics of the Asian-language support.
* Specifying the Toolbar:: Setting a toolbar.
* Other Toolbar Variables:: Controlling the size of toolbars.
+Gutter
+
Scrollbars
Major and Minor Modes
* LDAP Variables:: Lisp variables related to LDAP
* The High-Level LDAP API:: High-level LDAP lisp functions
* The Low-Level LDAP API:: Low-level LDAP lisp primitives
+* LDAP Internationalization:: I18n variables and functions
The Low-Level LDAP API
* The LDAP Lisp Object::
* Opening and Closing a LDAP Connection::
-* Searching on a LDAP Server (Low-level)::
+* Low-level Operations on a LDAP Server::
+
+LDAP Internationalization
+
+* LDAP Internationalization Variables::
+* Encoder/Decoder Functions::
Internationalization
from the minibuffer on other occasions. However, if user is
supposed to edit default value, INITIAL-CONTENTS may be preferred.
- - Function: read-string prompt &optional initial history
+ - Function: read-string prompt &optional initial history default-value
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'.
The optional argument HISTORY, if non-nil, specifies a history
- list and optionally the initial position in the list.
+ list and optionally the initial position in the list. The optional
+ argument DEFAULT specifies a default value to return if the user
+ enters null input; it should be a string.
This function is a simplified interface to the
`read-from-minibuffer' function:
- (read-string PROMPT INITIAL)
+ (read-string PROMPT INITIAL HISTORY DEFAULT)
==
- (read-from-minibuffer PROMPT INITIAL nil nil nil)
+ (read-from-minibuffer PROMPT INITIAL nil nil
+ HISTORY nil DEFAULT)))
- Variable: minibuffer-local-map
This is the default local keymap for reading from the minibuffer.
This section describes functions for reading Lisp objects with the
minibuffer.
- - Function: read-minibuffer prompt &optional initial
+ - Function: read-expression prompt &optional initial history
+ default-value
This function reads a Lisp object using the minibuffer, and
returns it without evaluating it. The arguments PROMPT and
INITIAL are used as in `read-from-minibuffer'.
+ The optional argument HISTORY, if non-nil, specifies a history
+ list and optionally the initial position in the list. The optional
+ argument DEFAULT-VALUE specifies a default value to return if the
+ user enters null input; it should be a string.
+
This is a simplified interface to the `read-from-minibuffer'
function:
- (read-minibuffer PROMPT INITIAL)
+ (read-expression PROMPT INITIAL HISTORY DEFAULT-VALUE)
==
- (read-from-minibuffer PROMPT INITIAL nil t)
+ (read-from-minibuffer PROMPT INITIAL nil t
+ HISTORY nil DEFAULT-VALUE)
Here is an example in which we supply the string `"(testing)"' as
initial input:
- (read-minibuffer
+ (read-expression
"Enter an expression: " (format "%s" '(testing)))
;; Here is how the minibuffer is displayed:
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: read-minibuffer prompt &optional initial history
+ default-value
+ This is a FSF Emacs compatible function. Use `read-expression'
+ instead.
+
+ - Function: eval-minibuffer prompt &optional initial history
+ default-value
This function reads a Lisp expression using the minibuffer,
evaluates it, then returns the result. The arguments PROMPT and
INITIAL are used as in `read-from-minibuffer'.
+ The optional argument HISTORY, if non-nil, specifies a history
+ list and optionally the initial position in the list. The optional
+ argument DEFAULT-VALUE specifies a default value to return if the
+ user enters null input; it should be a string.
+
This function simply evaluates the result of a call to
- `read-minibuffer':
+ `read-expression':
(eval-minibuffer PROMPT INITIAL)
==
- (eval (read-minibuffer PROMPT INITIAL))
+ (eval (read-expression PROMPT INITIAL))
- - Function: edit-and-eval-command prompt form
+ - Function: edit-and-eval-command prompt command &optional history
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
+ `eval-minibuffer' is that here the initial COMMAND is not optional
and it is treated as a Lisp object to be converted to printed
representation rather than as a string of text. It is printed with
`prin1', so if it is a string, double-quote characters (`"')
the value of REQUIRE-MATCH, and regardless of whether the empty
string is included in COLLECTION.
- The function `completing-read' works by calling `read-minibuffer'.
+ The function `completing-read' works by calling `read-expression'.
It uses `minibuffer-local-completion-map' as the keymap if
REQUIRE-MATCH is `nil', and uses `minibuffer-local-must-match-map'
if REQUIRE-MATCH is non-`nil'. *Note Completion Commands::.
`minibuffer-completion-confirm'. For more information about them,
see *Note Completion Commands::.
-\1f
-File: lispref.info, Node: Completion Commands, Next: High-Level Completion, Prev: Minibuffer Completion, Up: Completion
-
-Minibuffer Commands That Do Completion
---------------------------------------
-
- This section describes the keymaps, commands and user options used in
-the minibuffer to do completion.
-
- - Variable: minibuffer-local-completion-map
- `completing-read' uses this value as the local keymap when an
- exact match of one of the completions is not required. By
- default, this keymap makes the following bindings:
-
- `?'
- `minibuffer-completion-help'
-
- <SPC>
- `minibuffer-complete-word'
-
- <TAB>
- `minibuffer-complete'
-
- with other characters bound as in `minibuffer-local-map' (*note
- Text from Minibuffer::).
-
- - Variable: minibuffer-local-must-match-map
- `completing-read' uses this value as the local keymap when an
- exact match of one of the completions is required. Therefore, no
- keys are bound to `exit-minibuffer', the command that exits the
- minibuffer unconditionally. By default, this keymap makes the
- following bindings:
-
- `?'
- `minibuffer-completion-help'
-
- <SPC>
- `minibuffer-complete-word'
-
- <TAB>
- `minibuffer-complete'
-
- `C-j'
- `minibuffer-complete-and-exit'
-
- <RET>
- `minibuffer-complete-and-exit'
-
- with other characters bound as in `minibuffer-local-map'.
-
- - Variable: minibuffer-completion-table
- The value of this variable is the alist or obarray used for
- completion in the minibuffer. This is the global variable that
- contains what `completing-read' passes to `try-completion'. It is
- used by minibuffer completion commands such as
- `minibuffer-complete-word'.
-
- - Variable: minibuffer-completion-predicate
- This variable's value is the predicate that `completing-read'
- passes to `try-completion'. The variable is also used by the other
- minibuffer completion functions.
-
- - Command: minibuffer-complete-word
- This function completes the minibuffer contents by at most a single
- word. Even if the minibuffer contents have only one completion,
- `minibuffer-complete-word' does not add any characters beyond the
- first character that is not a word constituent. *Note Syntax
- Tables::.
-
- - Command: minibuffer-complete
- This function completes the minibuffer contents as far as possible.
-
- - Command: minibuffer-complete-and-exit
- This function completes the minibuffer contents, and exits if
- confirmation is not required, i.e., if
- `minibuffer-completion-confirm' is `nil'. If confirmation _is_
- required, it is given by repeating this command immediately--the
- command is programmed to work without confirmation when run twice
- in succession.
-
- - Variable: minibuffer-completion-confirm
- When the value of this variable is non-`nil', XEmacs asks for
- confirmation of a completion before exiting the minibuffer. The
- function `minibuffer-complete-and-exit' checks the value of this
- variable before it exits.
-
- - Command: minibuffer-completion-help
- This function creates a list of the possible completions of the
- current minibuffer contents. It works by calling `all-completions'
- using the value of the variable `minibuffer-completion-table' as
- the COLLECTION argument, and the value of
- `minibuffer-completion-predicate' as the PREDICATE argument. The
- list of completions is displayed as text in a buffer named
- `*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
- normally a list of completions just returned by `all-completions',
- but it does not have to be. Each element may be a symbol or a
- string, either of which is simply printed, or a list of two
- strings, which is printed as if the strings were concatenated.
-
- This function is called by `minibuffer-completion-help'. The most
- common way to use it is together with
- `with-output-to-temp-buffer', like this:
-
- (with-output-to-temp-buffer "*Completions*"
- (display-completion-list
- (all-completions (buffer-string) my-alist)))
-
- - User Option: completion-auto-help
- If this variable is non-`nil', the completion commands
- automatically display a list of possible completions whenever
- nothing can be completed because the next character is not
- uniquely determined.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Completion Commands, Next: High-Level Completion, Prev: Minibuffer Completion, Up: Completion
+
+Minibuffer Commands That Do Completion
+--------------------------------------
+
+ This section describes the keymaps, commands and user options used in
+the minibuffer to do completion.
+
+ - Variable: minibuffer-local-completion-map
+ `completing-read' uses this value as the local keymap when an
+ exact match of one of the completions is not required. By
+ default, this keymap makes the following bindings:
+
+ `?'
+ `minibuffer-completion-help'
+
+ <SPC>
+ `minibuffer-complete-word'
+
+ <TAB>
+ `minibuffer-complete'
+
+ with other characters bound as in `minibuffer-local-map' (*note
+ Text from Minibuffer::).
+
+ - Variable: minibuffer-local-must-match-map
+ `completing-read' uses this value as the local keymap when an
+ exact match of one of the completions is required. Therefore, no
+ keys are bound to `exit-minibuffer', the command that exits the
+ minibuffer unconditionally. By default, this keymap makes the
+ following bindings:
+
+ `?'
+ `minibuffer-completion-help'
+
+ <SPC>
+ `minibuffer-complete-word'
+
+ <TAB>
+ `minibuffer-complete'
+
+ `C-j'
+ `minibuffer-complete-and-exit'
+
+ <RET>
+ `minibuffer-complete-and-exit'
+
+ with other characters bound as in `minibuffer-local-map'.
+
+ - Variable: minibuffer-completion-table
+ The value of this variable is the alist or obarray used for
+ completion in the minibuffer. This is the global variable that
+ contains what `completing-read' passes to `try-completion'. It is
+ used by minibuffer completion commands such as
+ `minibuffer-complete-word'.
+
+ - Variable: minibuffer-completion-predicate
+ This variable's value is the predicate that `completing-read'
+ passes to `try-completion'. The variable is also used by the other
+ minibuffer completion functions.
+
+ - Command: minibuffer-complete-word
+ This function completes the minibuffer contents by at most a single
+ word. Even if the minibuffer contents have only one completion,
+ `minibuffer-complete-word' does not add any characters beyond the
+ first character that is not a word constituent. *Note Syntax
+ Tables::.
+
+ - Command: minibuffer-complete
+ This function completes the minibuffer contents as far as possible.
+
+ - Command: minibuffer-complete-and-exit
+ This function completes the minibuffer contents, and exits if
+ confirmation is not required, i.e., if
+ `minibuffer-completion-confirm' is `nil'. If confirmation _is_
+ required, it is given by repeating this command immediately--the
+ command is programmed to work without confirmation when run twice
+ in succession.
+
+ - Variable: minibuffer-completion-confirm
+ When the value of this variable is non-`nil', XEmacs asks for
+ confirmation of a completion before exiting the minibuffer. The
+ function `minibuffer-complete-and-exit' checks the value of this
+ variable before it exits.
+
+ - Command: minibuffer-completion-help
+ This function creates a list of the possible completions of the
+ current minibuffer contents. It works by calling `all-completions'
+ using the value of the variable `minibuffer-completion-table' as
+ the COLLECTION argument, and the value of
+ `minibuffer-completion-predicate' as the PREDICATE argument. The
+ list of completions is displayed as text in a buffer named
+ `*Completions*'.
+
+ - Function: display-completion-list completions &rest cl-keys
+ 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
+ normally a list of completions just returned by `all-completions',
+ but it does not have to be. Each element may be a symbol or a
+ string, either of which is simply printed, or a list of two
+ strings, which is printed as if the strings were concatenated.
+
+ This function is called by `minibuffer-completion-help'. The most
+ common way to use it is together with
+ `with-output-to-temp-buffer', like this:
+
+ (with-output-to-temp-buffer "*Completions*"
+ (display-completion-list
+ (all-completions (buffer-string) my-alist)))
+
+ - User Option: completion-auto-help
+ If this variable is non-`nil', the completion commands
+ automatically display a list of possible completions whenever
+ nothing can be completed because the next character is not
+ uniquely determined.
+
+\1f
File: lispref.info, Node: High-Level Completion, Next: Reading File Names, Prev: Completion Commands, Up: Completion
High-Level Completion Functions
;; The user types `minibuffer.t <RET>'.
=> "minibuffer.texi"
- - Function: read-command prompt
+ - Function: read-command prompt &optinal default-value
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
`t', and a command name is a symbol for which `commandp' returns
`t'. *Note Interactive Call::.
+ The argument DEFAULT-VALUE specifies what to return if the user
+ enters null input. It can be a symbol or a string; if it is a
+ string, `read-command' interns it before returning it. If DEFAULT
+ is `nil', that means no default has been specified; then if the
+ user enters null input, the return value is `nil'.
+
(read-command "Command name? ")
;; After evaluation of the preceding expression,
(intern (completing-read PROMPT obarray
'commandp t nil))
- - Function: read-variable prompt
+ - Function: read-variable prompt &optional default-value
This function reads the name of a user variable and returns it as a
symbol.
+ The argument DEFAULT-VALUE specifies what to return if the user
+ enters null input. It can be a symbol or a string; if it is a
+ string, `read-variable' interns it before returning it. If DEFAULT
+ is `nil', that means no default has been specified; then if the
+ user enters null input, the return value is `nil'.
+
(read-variable "Variable name? ")
;; After evaluation of the preceding expression,
of the default directory.
- Function: read-file-name prompt &optional directory default existing
- initial
+ initial history
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>.
(three-b "*scratch*" "declarations.texi" "*mail*")
=> nil
-\1f
-File: lispref.info, Node: Interactive Call, Next: Command Loop Info, Prev: Defining Commands, Up: Command Loop
-
-Interactive Call
-================
-
- After the command loop has translated a key sequence into a
-definition, it invokes that definition using the function
-`command-execute'. If the definition is a function that is a command,
-`command-execute' calls `call-interactively', which reads the arguments
-and calls the command. You can also call these functions yourself.
-
- - Function: commandp object
- Returns `t' if OBJECT is suitable for calling interactively; that
- is, if OBJECT is a command. Otherwise, returns `nil'.
-
- The interactively callable objects include strings and vectors
- (treated as keyboard macros), lambda expressions that contain a
- top-level call to `interactive', compiled-function objects made
- from such lambda expressions, autoload objects that are declared
- as interactive (non-`nil' fourth argument to `autoload'), and some
- of the primitive functions.
-
- 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::).
-
- See `documentation' in *Note Accessing Documentation::, for a
- realistic example of using `commandp'.
-
- - 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
- or if it cannot be called interactively (i.e., is not a command).
- Note that keyboard macros (strings and vectors) are not accepted,
- even though they are considered commands, because they are not
- functions.
-
- If RECORD-FLAG is the symbol `lambda', the interactive calling
- arguments for `command' are read and returned as a list, but the
- function is not called on them.
-
- If RECORD-FLAG is `t', then this command and its arguments are
- unconditionally added to the list `command-history'. Otherwise,
- the command is added only if it uses the minibuffer to read an
- argument. *Note Command History::.
-
- - 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.
-
- A string or vector as COMMAND is executed with
- `execute-kbd-macro'. A function is passed to
- `call-interactively', along with the optional RECORD-FLAG.
-
- A symbol is handled by using its function definition in its place.
- A symbol with an `autoload' definition counts as a command if it
- was declared to stand for an interactively callable function.
- Such a definition is handled by loading the specified library and
- then rechecking the definition of the symbol.
-
- - Command: execute-extended-command prefix-argument
- This function reads a command name from the minibuffer using
- `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'.
-
- If the command asks for a prefix argument, it receives the value
- PREFIX-ARGUMENT. If `execute-extended-command' is called
- interactively, the current raw prefix argument is used for
- PREFIX-ARGUMENT, and thus passed on to whatever command is run.
-
- `execute-extended-command' is the normal definition of `M-x', so
- it uses the string `M-x ' as a prompt. (It would be better to
- take the prompt from the events used to invoke
- `execute-extended-command', but that is painful to implement.) A
- description of the value of the prefix argument, if any, also
- becomes part of the prompt.
-
- (execute-extended-command 1)
- ---------- Buffer: Minibuffer ----------
- 1 M-x forward-word RET
- ---------- Buffer: Minibuffer ----------
- => t
-
- - Function: interactive-p
- This function returns `t' if the containing function (the one that
- called `interactive-p') was called interactively, with the function
- `call-interactively'. (It makes no difference whether
- `call-interactively' was called from Lisp or directly from the
- editor command loop.) If the containing function was called by
- Lisp evaluation (or with `apply' or `funcall'), then it was not
- called interactively.
-
- The most common use of `interactive-p' is for deciding whether to
- print an informative message. As a special exception,
- `interactive-p' returns `nil' whenever a keyboard macro is being
- run. This is to suppress the informative messages and speed
- execution of the macro.
-
- For example:
-
- (defun foo ()
- (interactive)
- (and (interactive-p)
- (message "foo")))
- => foo
-
- (defun bar ()
- (interactive)
- (setq foobar (list (foo) (interactive-p))))
- => bar
-
- ;; Type `M-x foo'.
- -| foo
-
- ;; Type `M-x bar'.
- ;; This does not print anything.
-
- foobar
- => (nil t)
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Interactive Call, Next: Command Loop Info, Prev: Defining Commands, Up: Command Loop
+
+Interactive Call
+================
+
+ After the command loop has translated a key sequence into a
+definition, it invokes that definition using the function
+`command-execute'. If the definition is a function that is a command,
+`command-execute' calls `call-interactively', which reads the arguments
+and calls the command. You can also call these functions yourself.
+
+ - Function: commandp object
+ Returns `t' if OBJECT is suitable for calling interactively; that
+ is, if OBJECT is a command. Otherwise, returns `nil'.
+
+ The interactively callable objects include strings and vectors
+ (treated as keyboard macros), lambda expressions that contain a
+ top-level call to `interactive', compiled-function objects made
+ from such lambda expressions, autoload objects that are declared
+ as interactive (non-`nil' fourth argument to `autoload'), and some
+ of the primitive functions.
+
+ 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::).
+
+ See `documentation' in *Note Accessing Documentation::, for a
+ realistic example of using `commandp'.
+
+ - 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
+ or if it cannot be called interactively (i.e., is not a command).
+ Note that keyboard macros (strings and vectors) are not accepted,
+ even though they are considered commands, because they are not
+ functions.
+
+ If RECORD-FLAG is the symbol `lambda', the interactive calling
+ arguments for `command' are read and returned as a list, but the
+ function is not called on them.
+
+ If RECORD-FLAG is `t', then this command and its arguments are
+ unconditionally added to the list `command-history'. Otherwise,
+ the command is added only if it uses the minibuffer to read an
+ argument. *Note Command History::.
+
+ - 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.
+
+ A string or vector as COMMAND is executed with
+ `execute-kbd-macro'. A function is passed to
+ `call-interactively', along with the optional RECORD-FLAG.
+
+ A symbol is handled by using its function definition in its place.
+ A symbol with an `autoload' definition counts as a command if it
+ was declared to stand for an interactively callable function.
+ Such a definition is handled by loading the specified library and
+ then rechecking the definition of the symbol.
+
+ - Command: execute-extended-command prefix-argument
+ This function reads a command name from the minibuffer using
+ `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'.
+
+ If the command asks for a prefix argument, it receives the value
+ PREFIX-ARGUMENT. If `execute-extended-command' is called
+ interactively, the current raw prefix argument is used for
+ PREFIX-ARGUMENT, and thus passed on to whatever command is run.
+
+ `execute-extended-command' is the normal definition of `M-x', so
+ it uses the string `M-x ' as a prompt. (It would be better to
+ take the prompt from the events used to invoke
+ `execute-extended-command', but that is painful to implement.) A
+ description of the value of the prefix argument, if any, also
+ becomes part of the prompt.
+
+ (execute-extended-command 1)
+ ---------- Buffer: Minibuffer ----------
+ 1 M-x forward-word RET
+ ---------- Buffer: Minibuffer ----------
+ => t
+
+ - Function: interactive-p
+ This function returns `t' if the containing function (the one that
+ called `interactive-p') was called interactively, with the function
+ `call-interactively'. (It makes no difference whether
+ `call-interactively' was called from Lisp or directly from the
+ editor command loop.) If the containing function was called by
+ Lisp evaluation (or with `apply' or `funcall'), then it was not
+ called interactively.
+
+ The most common use of `interactive-p' is for deciding whether to
+ print an informative message. As a special exception,
+ `interactive-p' returns `nil' whenever a keyboard macro is being
+ run. This is to suppress the informative messages and speed
+ execution of the macro.
+
+ For example:
+
+ (defun foo ()
+ (interactive)
+ (and (interactive-p)
+ (message "foo")))
+ => foo
+
+ (defun bar ()
+ (interactive)
+ (setq foobar (list (foo) (interactive-p))))
+ => bar
+
+ ;; Type `M-x foo'.
+ -| foo
+
+ ;; Type `M-x bar'.
+ ;; This does not print anything.
+
+ foobar
+ => (nil t)
+
+\1f
File: lispref.info, Node: Command Loop Info, Next: Events, Prev: Interactive Call, Up: Command Loop
Information from the Command Loop
(discard-input))
=> nil
-\1f
-File: lispref.info, Node: Waiting, Next: Quitting, Prev: Reading Input, Up: Command Loop
-
-Waiting for Elapsed Time or Input
-=================================
-
- The wait functions are designed to wait for a certain amount of time
-to pass or until there is input. For example, you may wish to pause in
-the middle of a computation to allow the user time to view the display.
-`sit-for' pauses and updates the screen, and returns immediately if
-input comes in, while `sleep-for' pauses without updating the screen.
-
- Note that in FSF Emacs, the commands `sit-for' and `sleep-for' take
-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
- 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
- with no input arriving (see `input-pending-p' in *Note Peeking and
- Discarding::). Otherwise, the value is `nil'.
-
- The argument SECONDS need not be an integer. If it is a floating
- point number, `sit-for' waits for a fractional number of seconds.
-
- Redisplay is normally preempted if input arrives, and does not
- happen at all if input is available before it starts. (You can
- force screen updating in such a case by using `force-redisplay'.
- *Note Refresh Screen::.) If there is no input pending, you can
- force an update with no delay by using `(sit-for 0)'.
-
- If NODISP is non-`nil', then `sit-for' does not redisplay, but it
- still returns as soon as input is available (or when the timeout
- elapses).
-
- The usual purpose of `sit-for' is to give the user time to read
- text that you display.
-
- - 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'.
-
- The argument SECONDS need not be an integer. If it is a floating
- point number, `sleep-for' waits for a fractional number of seconds.
-
- Use `sleep-for' when you wish to guarantee a delay.
-
- *Note Time of Day::, for functions to get the current time.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Waiting, Next: Quitting, Prev: Reading Input, Up: Command Loop
+
+Waiting for Elapsed Time or Input
+=================================
+
+ The wait functions are designed to wait for a certain amount of time
+to pass or until there is input. For example, you may wish to pause in
+the middle of a computation to allow the user time to view the display.
+`sit-for' pauses and updates the screen, and returns immediately if
+input comes in, while `sleep-for' pauses without updating the screen.
+
+ Note that in FSF Emacs, the commands `sit-for' and `sleep-for' take
+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
+ 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
+ with no input arriving (see `input-pending-p' in *Note Peeking and
+ Discarding::). Otherwise, the value is `nil'.
+
+ The argument SECONDS need not be an integer. If it is a floating
+ point number, `sit-for' waits for a fractional number of seconds.
+
+ Redisplay is normally preempted if input arrives, and does not
+ happen at all if input is available before it starts. (You can
+ force screen updating in such a case by using `force-redisplay'.
+ *Note Refresh Screen::.) If there is no input pending, you can
+ force an update with no delay by using `(sit-for 0)'.
+
+ If NODISP is non-`nil', then `sit-for' does not redisplay, but it
+ still returns as soon as input is available (or when the timeout
+ elapses).
+
+ The usual purpose of `sit-for' is to give the user time to read
+ text that you display.
+
+ - 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'.
+
+ The argument SECONDS need not be an integer. If it is a floating
+ point number, `sleep-for' waits for a fractional number of seconds.
+
+ Use `sleep-for' when you wish to guarantee a delay.
+
+ *Note Time of Day::, for functions to get the current time.
+
+\1f
File: lispref.info, Node: Quitting, Next: Prefix Command Arguments, Prev: Waiting, Up: Command Loop
Quitting
using a dialog box.
\1f
-File: lispref.info, Node: Toolbar, Next: Scrollbars, Prev: Dialog Boxes, Up: Top
+File: lispref.info, Node: Toolbar, Next: Gutter, Prev: Dialog Boxes, Up: Top
Toolbar
*******
startup.
\1f
-File: lispref.info, Node: Scrollbars, Next: Drag and Drop, Prev: Toolbar, Up: Top
+File: lispref.info, Node: Gutter, Next: Scrollbars, Prev: Toolbar, Up: Top
-scrollbars
+Gutter
+******
+
+ A gutter is a rectangle displayed along one edge of a frame. It can
+contain arbitrary text or graphics.
+
+* Menu:
+
+* Gutter Intro:: An introduction.
+* Gutter Descriptor Format:: How to create a gutter.
+* Specifying a Gutter:: Setting a gutter's contents.
+* Other Gutter Variables:: Controlling the size of gutters.
+* Common Gutter Widgets:: Things to put in gutters.
+
+\1f
+File: lispref.info, Node: Gutter Intro, Next: Gutter Descriptor Format, Up: Gutter
+
+Gutter Intro
+============
+
+ A "gutter" is a rectangle displayed along one edge of a frame. It
+can contain arbitrary text or graphics. It could be considered a
+generalization of a toolbar, although toolbars are not currently
+implemented using gutters.
+
+ In XEmacs, a gutter can be displayed along any of the four edges of
+the frame, and two or more different edges can be displaying gutters
+simultaneously. The contents, thickness, and visibility of the gutters
+can be controlled separately, and the values can be per-buffer,
+per-frame, etc., using specifiers (*note Specifiers::).
+
+ Normally, there is one gutter displayed in a frame. Usually, this is
+the default gutter, containing buffer tabs, but modes cab override this
+and substitute their own gutter. This default gutter is usually
+positioned along the top of the frame, but this can be changed using
+`set-default-gutter-position'.
+
+ Note that, for each of the gutter properties (contents, thickness,
+and visibility), there is a separate specifier for each of the four
+gutter positions (top, bottom, left, and right), and an additional
+specifier for the "default" gutter, i.e. the gutter whose position is
+controlled by `set-default-gutter-position'. The way this works is
+that `set-default-gutter-position' arranges things so that the
+appropriate position-specific specifiers for the default position
+inherit from the corresponding default specifiers. That way, if the
+position-specific specifier does not give a value (which it usually
+doesn't), then the value from the default specifier applies. If you
+want to control the default gutter, you just change the default
+specifiers, and everything works. A package such as VM that wants to
+put its own gutter in a different location from the default just sets
+the position-specific specifiers, and if the user sets the default
+gutter to the same position, it will just not be visible.
+
+\1f
+File: lispref.info, Node: Gutter Descriptor Format, Next: Specifying a Gutter, Prev: Gutter Intro, Up: Gutter
+
+Gutter Descriptor Format
+========================
+
+ The contents of a gutter are specified using a "gutter descriptor".
+The format of a gutter descriptor is a list of "gutter button
+descriptors". Each gutter button descriptor is a vector in one of the
+following formats:
+
+ * `[GLYPH-LIST FUNCTION ENABLED-P HELP]'
+
+ * `[:style 2D-OR-3D]'
+
+ * `[:style 2D-OR-3D :size WIDTH-OR-HEIGHT]'
+
+ * `[:size WIDTH-OR-HEIGHT :style 2D-OR-3D]'
+
+ Optionally, one of the gutter button descriptors may be `nil'
+instead of a vector; this signifies the division between the gutter
+buttons that are to be displayed flush-left, and the buttons to be
+displayed flush-right.
+
+ The first vector format above specifies a normal gutter button; the
+others specify blank areas in the gutter.
+
+ For the first vector format:
+
+ * GLYPH-LIST should be a list of one to six glyphs (as created by
+ `make-glyph') or a symbol whose value is such a list. The first
+ glyph, which must be provided, is the glyph used to display the
+ gutter button when it is in the "up" (not pressed) state. The
+ optional second glyph is for displaying the button when it is in
+ the "down" (pressed) state. The optional third glyph is for when
+ the button is disabled. The last three glyphs are for displaying
+ the button in the "up", "down", and "disabled" states,
+ respectively, but are used when the user has called for captioned
+ gutter buttons (using `gutter-buttons-captioned-p'). The function
+ `gutter-make-button-list' is useful in creating these glyph lists.
+
+ * Even if you do not provide separate down-state and disabled-state
+ glyphs, the user will still get visual feedback to indicate which
+ state the button is in. Buttons in the up-state are displayed
+ with a shadowed border that gives a raised appearance to the
+ button. Buttons in the down-state are displayed with shadows that
+ give a recessed appearance. Buttons in the disabled state are
+ displayed with no shadows, giving a 2-d effect.
+
+ * If some of the gutter glyphs are not provided, they inherit as
+ follows:
+
+ UP: up
+ DOWN: down -> up
+ DISABLED: disabled -> up
+ CAP-UP: cap-up -> up
+ CAP-DOWN: cap-down -> cap-up -> down -> up
+ CAP-DISABLED: cap-disabled -> cap-up -> disabled -> up
+
+ * The second element FUNCTION is a function to be called when the
+ gutter button is activated (i.e. when the mouse is released over
+ the gutter button, if the press occurred in the gutter). It can
+ be any form accepted by `call-interactively', since this is how it
+ is invoked.
+
+ * The third element ENABLED-P specifies whether the gutter button is
+ enabled (disabled buttons do nothing when they are activated, and
+ are displayed differently; see above). It should be either a
+ boolean or a form that evaluates to a boolean.
+
+ * The fourth element HELP, if non-`nil', should be a string. This
+ string is displayed in the echo area when the mouse passes over the
+ gutter button.
+
+ For the other vector formats (specifying blank areas of the gutter):
+
+ * 2D-OR-3D should be one of the symbols `2d' or `3d', indicating
+ whether the area is displayed with shadows (giving it a raised,
+ 3-d appearance) or without shadows (giving it a flat appearance).
+
+ * WIDTH-OR-HEIGHT specifies the length, in pixels, of the blank
+ area. If omitted, it defaults to a device-specific value (8
+ pixels for X devices).
+
+ - Function: gutter-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
+ gutter button descriptor (typically, the result of this function
+ is assigned to a symbol, which is specified as the first argument
+ of the gutter button descriptor).
+
+ - Function: check-gutter-button-syntax button &optional noerror
+ Verify the syntax of entry BUTTON in a gutter description list.
+ If you want to verify the syntax of a gutter description list as a
+ whole, use `check-valid-instantiator' with a specifier type of
+ `gutter'.
+
+\1f
+File: lispref.info, Node: Specifying a Gutter, Next: Other Gutter Variables, Prev: Gutter Descriptor Format, Up: Gutter
+
+Specifying a Gutter
+===================
+
+ In order to specify the contents of a gutter, set one of the
+specifier variables `default-gutter', `top-gutter', `bottom-gutter',
+`left-gutter', or `right-gutter'. These are specifiers, which means
+you set them with `set-specifier' and query them with `specifier-specs'
+or `specifier-instance'. You will get an error if you try to set them
+using `setq'. The valid instantiators for these specifiers are gutter
+descriptors, as described above. *Note Specifiers::, for more
+information.
+
+ Most of the time, you will set `default-gutter', which allows the
+user to choose where the gutter should go.
+
+ - Specifier: default-gutter
+ The position of this gutter is specified in the function
+ `default-gutter-position'. If the corresponding position-specific
+ gutter (e.g. `top-gutter' if `default-gutter-position' is `top')
+ does not specify a gutter in a particular domain, then the value
+ of `default-gutter' in that domain, of any, will be used instead.
+
+ Note that the gutter at any particular position will not be displayed
+unless its thickness (width or height, depending on orientation) is
+non-zero and its visibility status is true. The thickness is controlled
+by the specifiers `top-gutter-height', `bottom-gutter-height',
+`left-gutter-width', and `right-gutter-width', and the visibility
+status is controlled by the specifiers `top-gutter-visible-p',
+`bottom-gutter-visible-p', `left-gutter-visible-p', and
+`right-gutter-visible-p' (*note Other Gutter Variables::).
+
+ - Function: set-default-gutter-position position
+ This function sets the position that the `default-gutter' will be
+ displayed at. Valid positions are the symbols `top', `bottom',
+ `left' and `right'. What this actually does is set the fallback
+ specifier for the position-specific specifier corresponding to the
+ given position to `default-gutter', and set the fallbacks for the
+ other position-specific specifiers to `nil'. It also does the
+ same thing for the position-specific thickness and visibility
+ specifiers, which inherit from one of `default-gutter-height' or
+ `default-gutter-width', and from `default-gutter-visible-p',
+ respectively (*note Other Gutter Variables::).
+
+ - Function: default-gutter-position
+ This function returns the position that the `default-gutter' will
+ be displayed at.
+
+ You can also explicitly set a gutter at a particular position. When
+redisplay determines what to display at a particular position in a
+particular domain (i.e. window), it first consults the position-specific
+gutter. If that does not yield a gutter descriptor, the
+`default-gutter' is consulted if `default-gutter-position' indicates
+this position.
+
+ - Specifier: top-gutter
+ Specifier for the gutter at the top of the frame.
+
+ - Specifier: bottom-gutter
+ Specifier for the gutter at the bottom of the frame.
+
+ - Specifier: left-gutter
+ Specifier for the gutter at the left edge of the frame.
+
+ - Specifier: right-gutter
+ Specifier for the gutter at the right edge of the frame.
+
+ - Function: gutter-specifier-p object
+ This function returns non-nil if OBJECT is a gutter specifier.
+ Gutter specifiers are the actual objects contained in the gutter
+ variables described above, and their valid instantiators are
+ gutter descriptors (*note Gutter Descriptor Format::).
+
+\1f
+File: lispref.info, Node: Other Gutter Variables, Next: Common Gutter Widgets, Prev: Specifying a Gutter, Up: Gutter
+
+Other Gutter Variables
+======================
+
+ The variables to control the gutter thickness, visibility status, and
+captioned status are all specifiers. *Note Specifiers::.
+
+ - Specifier: default-gutter-height
+ This specifies the height of the default gutter, if it's oriented
+ horizontally. The position of the default gutter is specified by
+ the function `set-default-gutter-position'. If the corresponding
+ position-specific gutter thickness specifier (e.g.
+ `top-gutter-height' if `default-gutter-position' is `top') does
+ not specify a thickness in a particular domain (a window or a
+ frame), then the value of `default-gutter-height' or
+ `default-gutter-width' (depending on the gutter orientation) in
+ that domain, if any, will be used instead.
+
+ - Specifier: default-gutter-width
+ This specifies the width of the default gutter, if it's oriented
+ vertically. This behaves like `default-gutter-height'.
+
+ Note that `default-gutter-height' is only used when
+`default-gutter-position' is `top' or `bottom', and
+`default-gutter-width' is only used when `default-gutter-position' is
+`left' or `right'.
+
+ - Specifier: top-gutter-height
+ This specifies the height of the top gutter.
+
+ - Specifier: bottom-gutter-height
+ This specifies the height of the bottom gutter.
+
+ - Specifier: left-gutter-width
+ This specifies the width of the left gutter.
+
+ - Specifier: right-gutter-width
+ This specifies the width of the right gutter.
+
+ Note that all of the position-specific gutter thickness specifiers
+have a fallback value of zero when they do not correspond to the
+default gutter. Therefore, you will have to set a non-zero thickness
+value if you want a position-specific gutter to be displayed.
+
+ - Specifier: default-gutter-visible-p
+ This specifies whether the default gutter is visible. The
+ position of the default gutter is specified by the function
+ `set-default-gutter-position'. If the corresponding
+ position-specific gutter visibility specifier (e.g.
+ `top-gutter-visible-p' if `default-gutter-position' is `top') does
+ not specify a visible-p value in a particular domain (a window or
+ a frame), then the value of `default-gutter-visible-p' in that
+ domain, if any, will be used instead.
+
+ - Specifier: top-gutter-visible-p
+ This specifies whether the top gutter is visible.
+
+ - Specifier: bottom-gutter-visible-p
+ This specifies whether the bottom gutter is visible.
+
+ - Specifier: left-gutter-visible-p
+ This specifies whether the left gutter is visible.
+
+ - Specifier: right-gutter-visible-p
+ This specifies whether the right gutter is visible.
+
+ `default-gutter-visible-p' and all of the position-specific gutter
+visibility specifiers have a fallback value of true.
+
+ Internally, gutter thickness and visibility specifiers are
+instantiated in both window and frame domains, for different purposes.
+The value in the domain of a frame's selected window specifies the
+actual gutter thickness or visibility that you will see in that frame.
+The value in the domain of a frame itself specifies the gutter
+thickness or visibility that is used in frame geometry calculations.
+
+ Thus, for example, if you set the frame width to 80 characters and
+the left gutter width for that frame to 68 pixels, then the frame will
+be sized to fit 80 characters plus a 68-pixel left gutter. If you then
+set the left gutter width to 0 for a particular buffer (or if that
+buffer does not specify a left gutter or has a nil value specified for
+`left-gutter-visible-p'), you will find that, when that buffer is
+displayed in the selected window, the window will have a width of 86 or
+87 characters - the frame is sized for a 68-pixel left gutter but the
+selected window specifies that the left gutter is not visible, so it is
+expanded to take up the slack.
+
+ - Specifier: gutter-buttons-captioned-p
+ Whether gutter buttons are captioned. This affects which glyphs
+ from a gutter button descriptor are chosen. *Note Gutter
+ Descriptor Format::.
+
+ You can also reset the gutter to what it was when XEmacs started up.
+
+ - Constant: initial-gutter-spec
+ The gutter descriptor used to initialize `default-gutter' at
+ startup.
+
+\1f
+File: lispref.info, Node: Common Gutter Widgets, Prev: Other Gutter Variables, Up: Gutter
+
+Common Gutter Widgets
+=====================
+
+ A gutter can contain arbitrary text. So, for example, in an Info
+buffer you could put the title of the current node in the top gutter,
+and it would not scroll out of view in a long node. (This is an
+artificial example, since usually the node name is sufficiently
+descriptive, and Info puts that in the mode line.)
+
+ A more common use for the gutter is to hold some kind of active
+widget. The buffer-tab facility, available in all XEmacs frames,
+creates an array of file-folder-like tabs, which the user can click with
+the mouse to switch buffers. W3 uses a progress-bar widget in the
+bottom gutter to give a visual indication of the progress of
+time-consuming operations like downloading.
+
+* Menu:
+
+* Buffer Tabs:: Tabbed divider index metaphor for switching buffers.
+* Progress Bars:: Visual indication of operation progress.
+
+\1f
+File: lispref.info, Node: Buffer Tabs, Next: Progress Bars, Up: Common Gutter Widgets
+
+Buffer Tabs
+===========
+
+ Not documented yet.
+
+\1f
+File: lispref.info, Node: Progress Bars, Prev: Buffer Tabs, Up: Common Gutter Widgets
+
+Progress Bars
+=============
+
+ Not documented yet.
+
+\1f
+File: lispref.info, Node: Scrollbars, Next: Drag and Drop, Prev: Gutter, Up: Top
+
+Scrollbars
**********
Not yet documented.
* Modeline Format:: Customizing the text that appears in the modeline.
* Hooks:: How to use hooks; how to write code that provides hooks.
-\1f
-File: lispref.info, Node: Major Modes, Next: Minor Modes, Up: Modes
-
-Major Modes
-===========
-
- Major modes specialize XEmacs for editing particular kinds of text.
-Each buffer has only one major mode at a time.
-
- The least specialized major mode is called "Fundamental mode". This
-mode has no mode-specific definitions or variable settings, so each
-XEmacs command behaves in its default manner, and each option is in its
-default state. All other major modes redefine various keys and options.
-For example, Lisp Interaction mode provides special key bindings for
-<LFD> (`eval-print-last-sexp'), <TAB> (`lisp-indent-line'), and other
-keys.
-
- When you need to write several editing commands to help you perform a
-specialized editing task, creating a new major mode is usually a good
-idea. In practice, writing a major mode is easy (in contrast to
-writing a minor mode, which is often difficult).
-
- If the new mode is similar to an old one, it is often unwise to
-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
-`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.
-
- Rmail Edit mode is an example of a case where one piece of text is
-put temporarily into a different major mode so it can be edited in a
-different way (with ordinary XEmacs commands rather than Rmail). In
-such cases, the temporary major mode usually has a command to switch
-back to the buffer's usual mode (Rmail mode, in this case). You might
-be tempted to present the temporary redefinitions inside a recursive
-edit and restore the usual ones when the user exits; but this is a bad
-idea because it constrains the user's options when it is done in more
-than one buffer: recursive edits must be exited most-recently-entered
-first. Using alternative major modes avoids this limitation. *Note
-Recursive Editing::.
-
- The standard XEmacs Lisp library directory contains the code for
-several major modes, in files including `text-mode.el', `texinfo.el',
-`lisp-mode.el', `c-mode.el', and `rmail.el'. You can look at these
-libraries to see how modes are written. Text mode is perhaps the
-simplest major mode aside from Fundamental mode. Rmail mode is a
-complicated and specialized mode.
-
-* Menu:
-
-* Major Mode Conventions:: Coding conventions for keymaps, etc.
-* Example Major Modes:: Text mode and Lisp modes.
-* Auto Major Mode:: How XEmacs chooses the major mode automatically.
-* Mode Help:: Finding out how to use a mode.
-* Derived Modes:: Defining a new major mode based on another major
- mode.
-
-\1f
-File: lispref.info, Node: Major Mode Conventions, Next: Example Major Modes, Up: Major Modes
-
-Major Mode Conventions
-----------------------
-
- The code for existing major modes follows various coding conventions,
-including conventions for local keymap and syntax table initialization,
-global names, and hooks. Please follow these conventions when you
-define a new major mode:
-
- * Define a command whose name ends in `-mode', with no arguments,
- that switches to the new mode in the current buffer. This command
- should set up the keymap, syntax table, and local variables in an
- existing buffer without changing the buffer's text.
-
- * Write a documentation string for this command that describes the
- special commands available in this mode. `C-h m'
- (`describe-mode') in your mode will display this string.
-
- The documentation string may include the special documentation
- substrings, `\[COMMAND]', `\{KEYMAP}', and `\<KEYMAP>', that
- enable the documentation to adapt automatically to the user's own
- key bindings. *Note Keys in Documentation::.
-
- * The major mode command should start by calling
- `kill-all-local-variables'. This is what gets rid of the local
- variables of the major mode previously in effect.
-
- * The major mode command should set the variable `major-mode' to the
- major mode command symbol. This is how `describe-mode' discovers
- which documentation to print.
-
- * The major mode command should set the variable `mode-name' to the
- "pretty" name of the mode, as a string. This appears in the mode
- line.
-
- * Since all global names are in the same name space, all the global
- variables, constants, and functions that are part of the mode
- should have names that start with the major mode name (or with an
- abbreviation of it if the name is long). *Note Style Tips::.
-
- * The major mode should usually have its own keymap, which is used
- as the local keymap in all buffers in that mode. The major mode
- function should call `use-local-map' to install this local map.
- *Note Active Keymaps::, for more information.
-
- This keymap should be kept in a global variable named
- `MODENAME-mode-map'. Normally the library that defines the mode
- sets this variable.
-
- * The mode may have its own syntax table or may share one with other
- related modes. If it has its own syntax table, it should store
- this in a variable named `MODENAME-mode-syntax-table'. *Note
- Syntax Tables::.
-
- * The mode may have its own abbrev table or may share one with other
- related modes. If it has its own abbrev table, it should store
- this in a variable named `MODENAME-mode-abbrev-table'. *Note
- Abbrev Tables::.
-
- * Use `defvar' to set mode-related variables, so that they are not
- reinitialized if they already have a value. (Such reinitialization
- could discard customizations made by the user.)
-
- * To make a buffer-local binding for an Emacs customization
- variable, use `make-local-variable' in the major mode command, not
- `make-variable-buffer-local'. The latter function would make the
- variable local to every buffer in which it is subsequently set,
- which would affect buffers that do not use this mode. It is
- undesirable for a mode to have such global effects. *Note
- Buffer-Local Variables::.
-
- It's ok to use `make-variable-buffer-local', if you wish, for a
- variable used only within a single Lisp package.
-
- * Each major mode should have a "mode hook" named
- `MODENAME-mode-hook'. The major mode command should run that
- hook, with `run-hooks', as the very last thing it does. *Note
- Hooks::.
-
- * The major mode command may also run the hooks of some more basic
- modes. For example, `indented-text-mode' runs `text-mode-hook' as
- well as `indented-text-mode-hook'. It may run these other hooks
- immediately before the mode's own hook (that is, after everything
- else), or it may run them earlier.
-
- * If something special should be done if the user switches a buffer
- from this mode to any other major mode, the mode can set a local
- value for `change-major-mode-hook'.
-
- * If this mode is appropriate only for specially-prepared text, then
- the major mode command symbol should have a property named
- `mode-class' with value `special', put on as follows:
-
- (put 'funny-mode 'mode-class 'special)
-
- This tells XEmacs that new buffers created while the current
- buffer has Funny mode should not inherit Funny mode. Modes such
- as Dired, Rmail, and Buffer List use this feature.
-
- * If you want to make the new mode the default for files with certain
- recognizable names, add an element to `auto-mode-alist' to select
- the mode for those file names. If you define the mode command to
- autoload, you should add this element in the same file that calls
- `autoload'. Otherwise, it is sufficient to add the element in the
- file that contains the mode definition. *Note Auto Major Mode::.
-
- * In the documentation, you should provide a sample `autoload' form
- and an example of how to add to `auto-mode-alist', that users can
- include in their `.emacs' files.
-
- * The top-level forms in the file defining the mode should be
- written so that they may be evaluated more than once without
- adverse consequences. Even if you never load the file more than
- once, someone else will.
-
- - Variable: change-major-mode-hook
- This normal hook is run by `kill-all-local-variables' before it
- does anything else. This gives major modes a way to arrange for
- something special to be done if the user switches to a different
- major mode. For best results, make this variable buffer-local, so
- that it will disappear after doing its job and will not interfere
- with the subsequent major mode. *Note Hooks::.
-
-\1f
-File: lispref.info, Node: Example Major Modes, Next: Auto Major Mode, Prev: Major Mode Conventions, Up: Major Modes
-
-Major Mode Examples
--------------------
-
- Text mode is perhaps the simplest mode besides Fundamental mode.
-Here are excerpts from `text-mode.el' that illustrate many of the
-conventions listed above:
-
- ;; Create mode-specific tables.
- (defvar text-mode-syntax-table nil
- "Syntax table used while in text mode.")
-
- (if text-mode-syntax-table
- () ; Do not change the table if it is already set up.
- (setq text-mode-syntax-table (make-syntax-table))
- (modify-syntax-entry ?\" ". " text-mode-syntax-table)
- (modify-syntax-entry ?\\ ". " text-mode-syntax-table)
- (modify-syntax-entry ?' "w " text-mode-syntax-table))
-
- (defvar text-mode-abbrev-table nil
- "Abbrev table used while in text mode.")
- (define-abbrev-table 'text-mode-abbrev-table ())
-
- (defvar text-mode-map nil) ; Create a mode-specific keymap.
-
- (if text-mode-map
- () ; Do not change the keymap if it is already set up.
- (setq text-mode-map (make-sparse-keymap))
- (define-key text-mode-map "\t" 'tab-to-tab-stop)
- (define-key text-mode-map "\es" 'center-line)
- (define-key text-mode-map "\eS" 'center-paragraph))
-
- Here is the complete major mode function definition for Text mode:
-
- (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.
- (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.
- (setq local-abbrev-table text-mode-abbrev-table)
- (set-syntax-table text-mode-syntax-table)
- (run-hooks 'text-mode-hook)) ; Finally, this permits the user to
- ; customize the mode with a hook.
-
- The three Lisp modes (Lisp mode, Emacs Lisp mode, and Lisp
-Interaction mode) have more features than Text mode and the code is
-correspondingly more complicated. Here are excerpts from
-`lisp-mode.el' that illustrate how these modes are written.
-
- ;; Create mode-specific table variables.
- (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
- ;; 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.
- (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)
- ...))
- ;; Create an abbrev table for lisp-mode.
- (define-abbrev-table 'lisp-mode-abbrev-table ())
-
- Much code is shared among the three Lisp modes. The following
-function sets various variables; it is called by each of the major Lisp
-mode functions:
-
- (defun lisp-mode-variables (lisp-syntax)
- ;; The `lisp-syntax' argument is `nil' in Emacs Lisp mode,
- ;; and `t' in the other two Lisp modes.
- (cond (lisp-syntax
- (if (not lisp-mode-syntax-table)
- ;; 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
- (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)
- (modify-syntax-entry ?\] "_ "
- lisp-mode-syntax-table)))
- (set-syntax-table lisp-mode-syntax-table)))
- (setq local-abbrev-table lisp-mode-abbrev-table)
- ...)
-
- Functions such as `forward-paragraph' use the value of the
-`paragraph-start' variable. Since Lisp code is different from ordinary
-text, the `paragraph-start' variable needs to be set specially to
-handle Lisp. Also, comments are indented in a special fashion in Lisp
-and the Lisp modes need their own mode-specific
-`comment-indent-function'. The code to set these variables is the rest
-of `lisp-mode-variables'.
-
- (make-local-variable 'paragraph-start)
- ;; 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)
- (setq comment-indent-function 'lisp-comment-indent))
-
- Each of the different Lisp modes has a slightly different keymap.
-For example, Lisp mode binds `C-c C-l' to `run-lisp', but the other
-Lisp modes do not. However, all Lisp modes have some commands in
-common. The following function adds these common commands to a given
-keymap.
-
- (defun lisp-mode-commands (map)
- (define-key map "\e\C-q" 'indent-sexp)
- (define-key map "\177" 'backward-delete-char-untabify)
- (define-key map "\t" 'lisp-indent-line))
-
- Here is an example of using `lisp-mode-commands' to initialize a
-keymap, as part of the code for Emacs Lisp mode. First we declare a
-variable with `defvar' to hold the mode-specific keymap. When this
-`defvar' executes, it sets the variable to `nil' if it was void. Then
-we set up the keymap if the variable is `nil'.
-
- This code avoids changing the keymap or the variable if it is already
-set up. This lets the user customize the keymap.
-
- (defvar emacs-lisp-mode-map () "")
- (if emacs-lisp-mode-map
- ()
- (setq emacs-lisp-mode-map (make-sparse-keymap))
- (define-key emacs-lisp-mode-map "\e\C-x" 'eval-defun)
- (lisp-mode-commands emacs-lisp-mode-map))
-
- Finally, here is the complete major mode function definition for
-Emacs Lisp mode.
-
- (defun emacs-lisp-mode ()
- "Major mode for editing Lisp code to run in XEmacs.
- Commands:
- 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'
- ; finds out what to describe.
- (setq mode-name "Emacs-Lisp") ; This goes into the modeline.
- (lisp-mode-variables nil) ; This defines various variables.
- (run-hooks 'emacs-lisp-mode-hook)) ; This permits the user to use a
- ; hook to customize the mode.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Major Modes, Next: Minor Modes, Up: Modes
+
+Major Modes
+===========
+
+ Major modes specialize XEmacs for editing particular kinds of text.
+Each buffer has only one major mode at a time.
+
+ The least specialized major mode is called "Fundamental mode". This
+mode has no mode-specific definitions or variable settings, so each
+XEmacs command behaves in its default manner, and each option is in its
+default state. All other major modes redefine various keys and options.
+For example, Lisp Interaction mode provides special key bindings for
+<LFD> (`eval-print-last-sexp'), <TAB> (`lisp-indent-line'), and other
+keys.
+
+ When you need to write several editing commands to help you perform a
+specialized editing task, creating a new major mode is usually a good
+idea. In practice, writing a major mode is easy (in contrast to
+writing a minor mode, which is often difficult).
+
+ If the new mode is similar to an old one, it is often unwise to
+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
+`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.
+
+ Rmail Edit mode is an example of a case where one piece of text is
+put temporarily into a different major mode so it can be edited in a
+different way (with ordinary XEmacs commands rather than Rmail). In
+such cases, the temporary major mode usually has a command to switch
+back to the buffer's usual mode (Rmail mode, in this case). You might
+be tempted to present the temporary redefinitions inside a recursive
+edit and restore the usual ones when the user exits; but this is a bad
+idea because it constrains the user's options when it is done in more
+than one buffer: recursive edits must be exited most-recently-entered
+first. Using alternative major modes avoids this limitation. *Note
+Recursive Editing::.
+
+ The standard XEmacs Lisp library directory contains the code for
+several major modes, in files including `text-mode.el', `texinfo.el',
+`lisp-mode.el', `c-mode.el', and `rmail.el'. You can look at these
+libraries to see how modes are written. Text mode is perhaps the
+simplest major mode aside from Fundamental mode. Rmail mode is a
+complicated and specialized mode.
+
+* Menu:
+
+* Major Mode Conventions:: Coding conventions for keymaps, etc.
+* Example Major Modes:: Text mode and Lisp modes.
+* Auto Major Mode:: How XEmacs chooses the major mode automatically.
+* Mode Help:: Finding out how to use a mode.
+* Derived Modes:: Defining a new major mode based on another major
+ mode.
+
+\1f
+File: lispref.info, Node: Major Mode Conventions, Next: Example Major Modes, Up: Major Modes
+
+Major Mode Conventions
+----------------------
+
+ The code for existing major modes follows various coding conventions,
+including conventions for local keymap and syntax table initialization,
+global names, and hooks. Please follow these conventions when you
+define a new major mode:
+
+ * Define a command whose name ends in `-mode', with no arguments,
+ that switches to the new mode in the current buffer. This command
+ should set up the keymap, syntax table, and local variables in an
+ existing buffer without changing the buffer's text.
+
+ * Write a documentation string for this command that describes the
+ special commands available in this mode. `C-h m'
+ (`describe-mode') in your mode will display this string.
+
+ The documentation string may include the special documentation
+ substrings, `\[COMMAND]', `\{KEYMAP}', and `\<KEYMAP>', that
+ enable the documentation to adapt automatically to the user's own
+ key bindings. *Note Keys in Documentation::.
+
+ * The major mode command should start by calling
+ `kill-all-local-variables'. This is what gets rid of the local
+ variables of the major mode previously in effect.
+
+ * The major mode command should set the variable `major-mode' to the
+ major mode command symbol. This is how `describe-mode' discovers
+ which documentation to print.
+
+ * The major mode command should set the variable `mode-name' to the
+ "pretty" name of the mode, as a string. This appears in the mode
+ line.
+
+ * Since all global names are in the same name space, all the global
+ variables, constants, and functions that are part of the mode
+ should have names that start with the major mode name (or with an
+ abbreviation of it if the name is long). *Note Style Tips::.
+
+ * The major mode should usually have its own keymap, which is used
+ as the local keymap in all buffers in that mode. The major mode
+ function should call `use-local-map' to install this local map.
+ *Note Active Keymaps::, for more information.
+
+ This keymap should be kept in a global variable named
+ `MODENAME-mode-map'. Normally the library that defines the mode
+ sets this variable.
+
+ * The mode may have its own syntax table or may share one with other
+ related modes. If it has its own syntax table, it should store
+ this in a variable named `MODENAME-mode-syntax-table'. *Note
+ Syntax Tables::.
+
+ * The mode may have its own abbrev table or may share one with other
+ related modes. If it has its own abbrev table, it should store
+ this in a variable named `MODENAME-mode-abbrev-table'. *Note
+ Abbrev Tables::.
+
+ * Use `defvar' to set mode-related variables, so that they are not
+ reinitialized if they already have a value. (Such reinitialization
+ could discard customizations made by the user.)
+
+ * To make a buffer-local binding for an Emacs customization
+ variable, use `make-local-variable' in the major mode command, not
+ `make-variable-buffer-local'. The latter function would make the
+ variable local to every buffer in which it is subsequently set,
+ which would affect buffers that do not use this mode. It is
+ undesirable for a mode to have such global effects. *Note
+ Buffer-Local Variables::.
+
+ It's ok to use `make-variable-buffer-local', if you wish, for a
+ variable used only within a single Lisp package.
+
+ * Each major mode should have a "mode hook" named
+ `MODENAME-mode-hook'. The major mode command should run that
+ hook, with `run-hooks', as the very last thing it does. *Note
+ Hooks::.
+
+ * The major mode command may also run the hooks of some more basic
+ modes. For example, `indented-text-mode' runs `text-mode-hook' as
+ well as `indented-text-mode-hook'. It may run these other hooks
+ immediately before the mode's own hook (that is, after everything
+ else), or it may run them earlier.
+
+ * If something special should be done if the user switches a buffer
+ from this mode to any other major mode, the mode can set a local
+ value for `change-major-mode-hook'.
+
+ * If this mode is appropriate only for specially-prepared text, then
+ the major mode command symbol should have a property named
+ `mode-class' with value `special', put on as follows:
+
+ (put 'funny-mode 'mode-class 'special)
+
+ This tells XEmacs that new buffers created while the current
+ buffer has Funny mode should not inherit Funny mode. Modes such
+ as Dired, Rmail, and Buffer List use this feature.
+
+ * If you want to make the new mode the default for files with certain
+ recognizable names, add an element to `auto-mode-alist' to select
+ the mode for those file names. If you define the mode command to
+ autoload, you should add this element in the same file that calls
+ `autoload'. Otherwise, it is sufficient to add the element in the
+ file that contains the mode definition. *Note Auto Major Mode::.
+
+ * In the documentation, you should provide a sample `autoload' form
+ and an example of how to add to `auto-mode-alist', that users can
+ include in their `.emacs' files.
+
+ * The top-level forms in the file defining the mode should be
+ written so that they may be evaluated more than once without
+ adverse consequences. Even if you never load the file more than
+ once, someone else will.
+
+ - Variable: change-major-mode-hook
+ This normal hook is run by `kill-all-local-variables' before it
+ does anything else. This gives major modes a way to arrange for
+ something special to be done if the user switches to a different
+ major mode. For best results, make this variable buffer-local, so
+ that it will disappear after doing its job and will not interfere
+ with the subsequent major mode. *Note Hooks::.
+
+\1f
+File: lispref.info, Node: Example Major Modes, Next: Auto Major Mode, Prev: Major Mode Conventions, Up: Major Modes
+
+Major Mode Examples
+-------------------
+
+ Text mode is perhaps the simplest mode besides Fundamental mode.
+Here are excerpts from `text-mode.el' that illustrate many of the
+conventions listed above:
+
+ ;; Create mode-specific tables.
+ (defvar text-mode-syntax-table nil
+ "Syntax table used while in text mode.")
+
+ (if text-mode-syntax-table
+ () ; Do not change the table if it is already set up.
+ (setq text-mode-syntax-table (make-syntax-table))
+ (modify-syntax-entry ?\" ". " text-mode-syntax-table)
+ (modify-syntax-entry ?\\ ". " text-mode-syntax-table)
+ (modify-syntax-entry ?' "w " text-mode-syntax-table))
+
+ (defvar text-mode-abbrev-table nil
+ "Abbrev table used while in text mode.")
+ (define-abbrev-table 'text-mode-abbrev-table ())
+
+ (defvar text-mode-map nil) ; Create a mode-specific keymap.
+
+ (if text-mode-map
+ () ; Do not change the keymap if it is already set up.
+ (setq text-mode-map (make-sparse-keymap))
+ (define-key text-mode-map "\t" 'tab-to-tab-stop)
+ (define-key text-mode-map "\es" 'center-line)
+ (define-key text-mode-map "\eS" 'center-paragraph))
+
+ Here is the complete major mode function definition for Text mode:
+
+ (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.
+ (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.
+ (setq local-abbrev-table text-mode-abbrev-table)
+ (set-syntax-table text-mode-syntax-table)
+ (run-hooks 'text-mode-hook)) ; Finally, this permits the user to
+ ; customize the mode with a hook.
+
+ The three Lisp modes (Lisp mode, Emacs Lisp mode, and Lisp
+Interaction mode) have more features than Text mode and the code is
+correspondingly more complicated. Here are excerpts from
+`lisp-mode.el' that illustrate how these modes are written.
+
+ ;; Create mode-specific table variables.
+ (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
+ ;; 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.
+ (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)
+ ...))
+ ;; Create an abbrev table for lisp-mode.
+ (define-abbrev-table 'lisp-mode-abbrev-table ())
+
+ Much code is shared among the three Lisp modes. The following
+function sets various variables; it is called by each of the major Lisp
+mode functions:
+
+ (defun lisp-mode-variables (lisp-syntax)
+ ;; The `lisp-syntax' argument is `nil' in Emacs Lisp mode,
+ ;; and `t' in the other two Lisp modes.
+ (cond (lisp-syntax
+ (if (not lisp-mode-syntax-table)
+ ;; 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
+ (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)
+ (modify-syntax-entry ?\] "_ "
+ lisp-mode-syntax-table)))
+ (set-syntax-table lisp-mode-syntax-table)))
+ (setq local-abbrev-table lisp-mode-abbrev-table)
+ ...)
+
+ Functions such as `forward-paragraph' use the value of the
+`paragraph-start' variable. Since Lisp code is different from ordinary
+text, the `paragraph-start' variable needs to be set specially to
+handle Lisp. Also, comments are indented in a special fashion in Lisp
+and the Lisp modes need their own mode-specific
+`comment-indent-function'. The code to set these variables is the rest
+of `lisp-mode-variables'.
+
+ (make-local-variable 'paragraph-start)
+ ;; 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)
+ (setq comment-indent-function 'lisp-comment-indent))
+
+ Each of the different Lisp modes has a slightly different keymap.
+For example, Lisp mode binds `C-c C-l' to `run-lisp', but the other
+Lisp modes do not. However, all Lisp modes have some commands in
+common. The following function adds these common commands to a given
+keymap.
+
+ (defun lisp-mode-commands (map)
+ (define-key map "\e\C-q" 'indent-sexp)
+ (define-key map "\177" 'backward-delete-char-untabify)
+ (define-key map "\t" 'lisp-indent-line))
+
+ Here is an example of using `lisp-mode-commands' to initialize a
+keymap, as part of the code for Emacs Lisp mode. First we declare a
+variable with `defvar' to hold the mode-specific keymap. When this
+`defvar' executes, it sets the variable to `nil' if it was void. Then
+we set up the keymap if the variable is `nil'.
+
+ This code avoids changing the keymap or the variable if it is already
+set up. This lets the user customize the keymap.
+
+ (defvar emacs-lisp-mode-map () "")
+ (if emacs-lisp-mode-map
+ ()
+ (setq emacs-lisp-mode-map (make-sparse-keymap))
+ (define-key emacs-lisp-mode-map "\e\C-x" 'eval-defun)
+ (lisp-mode-commands emacs-lisp-mode-map))
+
+ Finally, here is the complete major mode function definition for
+Emacs Lisp mode.
+
+ (defun emacs-lisp-mode ()
+ "Major mode for editing Lisp code to run in XEmacs.
+ Commands:
+ 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'
+ ; finds out what to describe.
+ (setq mode-name "Emacs-Lisp") ; This goes into the modeline.
+ (lisp-mode-variables nil) ; This defines various variables.
+ (run-hooks 'emacs-lisp-mode-hook)) ; This permits the user to use a
+ ; hook to customize the mode.
+
+\1f
File: lispref.info, Node: Auto Major Mode, Next: Mode Help, Prev: Example Major Modes, Up: Major Modes
How XEmacs Chooses a Major Mode
The value of `global-mode-string'. Currently, only `display-time'
modifies the value of `global-mode-string'.
-\1f
-File: lispref.info, Node: Hooks, Prev: Modeline Format, Up: Modes
-
-Hooks
-=====
-
- A "hook" is a variable where you can store a function or functions
-to be called on a particular occasion by an existing program. XEmacs
-provides hooks for the sake of customization. Most often, hooks are set
-up in the `.emacs' file, but Lisp programs can set them also. *Note
-Standard Hooks::, for a list of standard hook variables.
-
- Most of the hooks in XEmacs are "normal hooks". These variables
-contain lists of functions to be called with no arguments. The reason
-most hooks are normal hooks is so that you can use them in a uniform
-way. You can usually tell when a hook is a normal hook, because its
-name ends in `-hook'.
-
- The recommended way to add a hook function to a normal hook is by
-calling `add-hook' (see below). The hook functions may be any of the
-valid kinds of functions that `funcall' accepts (*note What Is a
-Function::). Most normal hook variables are initially void; `add-hook'
-knows how to deal with this.
-
- As for abnormal hooks, those whose names end in `-function' have a
-value that is a single function. Those whose names end in `-hooks'
-have a value that is a list of functions. Any hook that is abnormal is
-abnormal because a normal hook won't do the job; either the functions
-are called with arguments, or their values are meaningful. The name
-shows you that the hook is abnormal and that you should look at its
-documentation string to see how to use it properly.
-
- Major mode functions are supposed to run a hook called the "mode
-hook" as the last step of initialization. This makes it easy for a user
-to customize the behavior of the mode, by overriding the local variable
-assignments already made by the mode. But hooks are used in other
-contexts too. For example, the hook `suspend-hook' runs just before
-XEmacs suspends itself (*note Suspending XEmacs::).
-
- Here's an expression that uses a mode hook to turn on Auto Fill mode
-when in Lisp Interaction mode:
-
- (add-hook 'lisp-interaction-mode-hook 'turn-on-auto-fill)
-
- The next example shows how to use a hook to customize the way XEmacs
-formats C code. (People often have strong personal preferences for one
-format or another.) Here the hook function is an anonymous lambda
-expression.
-
- (add-hook 'c-mode-hook
- (function (lambda ()
- (setq c-indent-level 4
- c-argdecl-indent 0
- c-label-offset -4
- c-continued-statement-indent 0
- c-brace-offset 0
- comment-column 40))))
-
- (setq c++-mode-hook c-mode-hook)
-
- The final example shows how the appearance of the modeline can be
-modified for a particular class of buffers only.
-
- (add-hook 'text-mode-hook
- (function (lambda ()
- (setq modeline-format
- '(modeline-modified
- "Emacs: %14b"
- " "
- default-directory
- " "
- global-mode-string
- "%[("
- mode-name
- minor-mode-alist
- "%n"
- modeline-process
- ") %]---"
- (-3 . "%p")
- "-%-")))))
-
- At the appropriate time, XEmacs uses the `run-hooks' function to run
-particular hooks. This function calls the hook functions you have
-added with `add-hooks'.
-
- - 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
- the order specified.
-
- If a hook variable has a non-`nil' value, that value may be a
- function or a list of functions. If the value is a function
- (either a lambda expression or a symbol with a function
- definition), it is called. If it is a list, the elements are
- called, in order. The hook functions are called with no arguments.
-
- For example, here's how `emacs-lisp-mode' runs its mode hook:
-
- (run-hooks 'emacs-lisp-mode-hook)
-
- - 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,
-
- (add-hook 'text-mode-hook 'my-text-hook-function)
-
- adds `my-text-hook-function' to the hook called `text-mode-hook'.
-
- You can use `add-hook' for abnormal hooks as well as for normal
- hooks.
-
- It is best to design your hook functions so that the order in
- which they are executed does not matter. Any dependence on the
- order is "asking for trouble." However, the order is predictable:
- normally, FUNCTION goes at the front of the hook list, so it will
- be executed first (barring another `add-hook' call).
-
- If the optional argument APPEND is non-`nil', the new hook
- function goes at the end of the hook list and will be executed
- last.
-
- If LOCAL is non-`nil', that says to make the new hook function
- local to the current buffer. Before you can do this, you must
- make the hook itself buffer-local by calling `make-local-hook'
- (*not* `make-local-variable'). If the hook itself is not
- buffer-local, then the value of LOCAL makes no difference--the
- hook function is always global.
-
- - 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
- hook list instead of from the global hook list. If the hook
- itself is not buffer-local, then the value of LOCAL makes no
- difference.
-
- - 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.
-
- This function works by making `t' an element of the buffer-local
- value. That serves as a flag to use the hook functions in the
- default value of the hook variable as well as those in the local
- value. Since `run-hooks' understands this flag, `make-local-hook'
- works with all normal hooks. It works for only some non-normal
- hooks--those whose callers have been updated to understand this
- meaning of `t'.
-
- Do not use `make-local-variable' directly for hook variables; it is
- not sufficient.
-
-\1f
-File: lispref.info, Node: Documentation, Next: Files, Prev: Modes, Up: Top
-
-Documentation
-*************
-
- XEmacs Lisp has convenient on-line help facilities, most of which
-derive their information from the documentation strings associated with
-functions and variables. This chapter describes how to write good
-documentation strings for your Lisp programs, as well as how to write
-programs to access documentation.
-
- Note that the documentation strings for XEmacs are not the same thing
-as the XEmacs manual. Manuals have their own source files, written in
-the Texinfo language; documentation strings are specified in the
-definitions of the functions and variables they apply to. A collection
-of documentation strings is not sufficient as a manual because a good
-manual is not organized in that fashion; it is organized in terms of
-topics of discussion.
-
-* Menu:
-
-* Documentation Basics:: Good style for doc strings.
- Where to put them. How XEmacs stores them.
-* Accessing Documentation:: How Lisp programs can access doc strings.
-* Keys in Documentation:: Substituting current key bindings.
-* Describing Characters:: Making printable descriptions of
- non-printing characters and key sequences.
-* Help Functions:: Subroutines used by XEmacs help facilities.
-* Obsoleteness:: Upgrading Lisp functionality over time.
-
-\1f
-File: lispref.info, Node: Documentation Basics, Next: Accessing Documentation, Up: Documentation
-
-Documentation Basics
-====================
-
- A documentation string is written using the Lisp syntax for strings,
-with double-quote characters surrounding the text of the string. This
-is because it really is a Lisp string object. The string serves as
-documentation when it is written in the proper place in the definition
-of a function or variable. In a function definition, the documentation
-string follows the argument list. In a variable definition, the
-documentation string follows the initial value of the variable.
-
- When you write a documentation string, make the first line a complete
-sentence (or two complete sentences) since some commands, such as
-`apropos', show only the first line of a multi-line documentation
-string. Also, you should not indent the second line of a documentation
-string, if you have one, because that looks odd when you use `C-h f'
-(`describe-function') or `C-h v' (`describe-variable'). *Note
-Documentation Tips::.
-
- Documentation strings may contain several special substrings, which
-stand for key bindings to be looked up in the current keymaps when the
-documentation is displayed. This allows documentation strings to refer
-to the keys for related commands and be accurate even when a user
-rearranges the key bindings. (*Note Accessing Documentation::.)
-
- Within the Lisp world, a documentation string is accessible through
-the function or variable that it describes:
-
- * The documentation for a function is stored in 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
- property list under the property name `variable-documentation'.
- The function `documentation-property' knows how to extract it.
-
- To save space, the documentation for preloaded functions and
-variables (including primitive functions and autoloaded functions) is
-stored in the "internal doc file" `DOC'. The documentation for
-functions and variables loaded during the XEmacs session from
-byte-compiled files is stored in those very same byte-compiled files
-(*note Docs and Compilation::).
-
- XEmacs does not keep documentation strings in memory unless
-necessary. Instead, XEmacs maintains, for preloaded symbols, an
-integer offset into the internal doc file, and for symbols loaded from
-byte-compiled files, a list containing the filename of the
-byte-compiled file and an integer offset, in place of the documentation
-string. The functions `documentation' and `documentation-property' use
-that information to read the documentation from the appropriate file;
-this is transparent to the user.
-
- For information on the uses of documentation strings, see *Note
-Help: (emacs)Help.
-
- The `emacs/lib-src' directory contains two utilities that you can
-use to print nice-looking hardcopy for the file
-`emacs/etc/DOC-VERSION'. These are `sorted-doc.c' and `digest-doc.c'.
-
-\1f
-File: lispref.info, Node: Accessing Documentation, Next: Keys in Documentation, Prev: Documentation Basics, Up: Documentation
-
-Access to Documentation Strings
-===============================
-
- - 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'
- to substitute actual key bindings. (This substitution is not done
- if VERBATIM is non-`nil'; the VERBATIM argument exists only as of
- Emacs 19.)
-
- (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
- 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
- containing the actual (current) key bindings.
-
- The function `documentation' signals a `void-function' error if
- FUNCTION has no function definition. However, it is ok if the
- function definition has no documentation string. In that case,
- `documentation' returns `nil'.
-
- Here is an example of using the two functions, `documentation' and
-`documentation-property', to display the documentation strings for
-several symbols in a `*Help*' buffer.
-
- (defun describe-symbols (pattern)
- "Describe the XEmacs Lisp symbols matching PATTERN.
- All symbols that have PATTERN in their name are described
- in the `*Help*' buffer."
- (interactive "sDescribe symbols matching: ")
- (let ((describe-func
- (function
- (lambda (s)
- ;; Print description of symbol.
- (if (fboundp s) ; It is a function.
- (princ
- (format "%s\t%s\n%s\n\n" s
- (if (commandp s)
- (let ((keys (where-is-internal s)))
- (if keys
- (concat
- "Keys: "
- (mapconcat 'key-description
- keys " "))
- "Keys: none"))
- "Function")
- (or (documentation s)
- "not documented"))))
-
- (if (boundp s) ; It is a variable.
- (princ
- (format "%s\t%s\n%s\n\n" s
- (if (user-variable-p s)
- "Option " "Variable")
- (or (documentation-property
- s 'variable-documentation)
- "not documented")))))))
- sym-list)
-
- ;; 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.
- (with-output-to-temp-buffer "*Help*"
- (mapcar describe-func (sort sym-list 'string<))
- (print-help-return-message))))
-
- The `describe-symbols' function works like `apropos', but provides
-more information.
-
- (describe-symbols "goal")
-
- ---------- 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
- at the start of current run of vertical motion commands.
- When the `track-eol' feature is doing its job, the value is 9999.
- ---------- Buffer: *Help* ----------
-
- - 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
- records them in the in-core function definitions and variable
- property lists in place of the actual strings. *Note Building
- XEmacs::.
-
- XEmacs finds the file FILENAME in the `lib-src' directory. When
- the dumped XEmacs is later executed, the same file is found in the
- directory `doc-directory'. The usual value for FILENAME is `DOC',
- but this can be changed by modifying the variable
- `internal-doc-file-name'.
-
- - Variable: internal-doc-file-name
- This variable holds the name of the file containing documentation
- strings of built-in symbols, usually `DOC'. The full pathname of
- the internal doc file is `(concat doc-directory
- internal-doc-file-name)'.
-
- - Variable: doc-directory
- This variable holds the name of the directory which contains the
- "internal doc file" that contains documentation strings for
- built-in and preloaded functions and variables.
-
- In most cases, this is the same as `exec-directory'. They may be
- different when you run XEmacs from the directory where you built
- it, without actually installing it. See `exec-directory' in *Note
- Help Functions::.
-
- In older Emacs versions, `exec-directory' was used for this.
-
- - Variable: data-directory
- This variable holds the name of the directory in which XEmacs finds
- certain system independent documentation and text files that come
- with XEmacs. In older Emacs versions, `exec-directory' was used
- for this.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Hooks, Prev: Modeline Format, Up: Modes
+
+Hooks
+=====
+
+ A "hook" is a variable where you can store a function or functions
+to be called on a particular occasion by an existing program. XEmacs
+provides hooks for the sake of customization. Most often, hooks are set
+up in the `.emacs' file, but Lisp programs can set them also. *Note
+Standard Hooks::, for a list of standard hook variables.
+
+ Most of the hooks in XEmacs are "normal hooks". These variables
+contain lists of functions to be called with no arguments. The reason
+most hooks are normal hooks is so that you can use them in a uniform
+way. You can usually tell when a hook is a normal hook, because its
+name ends in `-hook'.
+
+ The recommended way to add a hook function to a normal hook is by
+calling `add-hook' (see below). The hook functions may be any of the
+valid kinds of functions that `funcall' accepts (*note What Is a
+Function::). Most normal hook variables are initially void; `add-hook'
+knows how to deal with this.
+
+ As for abnormal hooks, those whose names end in `-function' have a
+value that is a single function. Those whose names end in `-hooks'
+have a value that is a list of functions. Any hook that is abnormal is
+abnormal because a normal hook won't do the job; either the functions
+are called with arguments, or their values are meaningful. The name
+shows you that the hook is abnormal and that you should look at its
+documentation string to see how to use it properly.
+
+ Major mode functions are supposed to run a hook called the "mode
+hook" as the last step of initialization. This makes it easy for a user
+to customize the behavior of the mode, by overriding the local variable
+assignments already made by the mode. But hooks are used in other
+contexts too. For example, the hook `suspend-hook' runs just before
+XEmacs suspends itself (*note Suspending XEmacs::).
+
+ Here's an expression that uses a mode hook to turn on Auto Fill mode
+when in Lisp Interaction mode:
+
+ (add-hook 'lisp-interaction-mode-hook 'turn-on-auto-fill)
+
+ The next example shows how to use a hook to customize the way XEmacs
+formats C code. (People often have strong personal preferences for one
+format or another.) Here the hook function is an anonymous lambda
+expression.
+
+ (add-hook 'c-mode-hook
+ (function (lambda ()
+ (setq c-indent-level 4
+ c-argdecl-indent 0
+ c-label-offset -4
+ c-continued-statement-indent 0
+ c-brace-offset 0
+ comment-column 40))))
+
+ (setq c++-mode-hook c-mode-hook)
+
+ The final example shows how the appearance of the modeline can be
+modified for a particular class of buffers only.
+
+ (add-hook 'text-mode-hook
+ (function (lambda ()
+ (setq modeline-format
+ '(modeline-modified
+ "Emacs: %14b"
+ " "
+ default-directory
+ " "
+ global-mode-string
+ "%[("
+ mode-name
+ minor-mode-alist
+ "%n"
+ modeline-process
+ ") %]---"
+ (-3 . "%p")
+ "-%-")))))
+
+ At the appropriate time, XEmacs uses the `run-hooks' function to run
+particular hooks. This function calls the hook functions you have
+added with `add-hooks'.
+
+ - 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
+ the order specified.
+
+ If a hook variable has a non-`nil' value, that value may be a
+ function or a list of functions. If the value is a function
+ (either a lambda expression or a symbol with a function
+ definition), it is called. If it is a list, the elements are
+ called, in order. The hook functions are called with no arguments.
+
+ For example, here's how `emacs-lisp-mode' runs its mode hook:
+
+ (run-hooks 'emacs-lisp-mode-hook)
+
+ - 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,
+
+ (add-hook 'text-mode-hook 'my-text-hook-function)
+
+ adds `my-text-hook-function' to the hook called `text-mode-hook'.
+
+ You can use `add-hook' for abnormal hooks as well as for normal
+ hooks.
+
+ It is best to design your hook functions so that the order in
+ which they are executed does not matter. Any dependence on the
+ order is "asking for trouble." However, the order is predictable:
+ normally, FUNCTION goes at the front of the hook list, so it will
+ be executed first (barring another `add-hook' call).
+
+ If the optional argument APPEND is non-`nil', the new hook
+ function goes at the end of the hook list and will be executed
+ last.
+
+ If LOCAL is non-`nil', that says to make the new hook function
+ local to the current buffer. Before you can do this, you must
+ make the hook itself buffer-local by calling `make-local-hook'
+ (*not* `make-local-variable'). If the hook itself is not
+ buffer-local, then the value of LOCAL makes no difference--the
+ hook function is always global.
+
+ - 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
+ hook list instead of from the global hook list. If the hook
+ itself is not buffer-local, then the value of LOCAL makes no
+ difference.
+
+ - 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.
+
+ This function works by making `t' an element of the buffer-local
+ value. That serves as a flag to use the hook functions in the
+ default value of the hook variable as well as those in the local
+ value. Since `run-hooks' understands this flag, `make-local-hook'
+ works with all normal hooks. It works for only some non-normal
+ hooks--those whose callers have been updated to understand this
+ meaning of `t'.
+
+ Do not use `make-local-variable' directly for hook variables; it is
+ not sufficient.
+
+\1f
+File: lispref.info, Node: Documentation, Next: Files, Prev: Modes, Up: Top
+
+Documentation
+*************
+
+ XEmacs Lisp has convenient on-line help facilities, most of which
+derive their information from the documentation strings associated with
+functions and variables. This chapter describes how to write good
+documentation strings for your Lisp programs, as well as how to write
+programs to access documentation.
+
+ Note that the documentation strings for XEmacs are not the same thing
+as the XEmacs manual. Manuals have their own source files, written in
+the Texinfo language; documentation strings are specified in the
+definitions of the functions and variables they apply to. A collection
+of documentation strings is not sufficient as a manual because a good
+manual is not organized in that fashion; it is organized in terms of
+topics of discussion.
+
+* Menu:
+
+* Documentation Basics:: Good style for doc strings.
+ Where to put them. How XEmacs stores them.
+* Accessing Documentation:: How Lisp programs can access doc strings.
+* Keys in Documentation:: Substituting current key bindings.
+* Describing Characters:: Making printable descriptions of
+ non-printing characters and key sequences.
+* Help Functions:: Subroutines used by XEmacs help facilities.
+* Obsoleteness:: Upgrading Lisp functionality over time.
+
+\1f
+File: lispref.info, Node: Documentation Basics, Next: Accessing Documentation, Up: Documentation
+
+Documentation Basics
+====================
+
+ A documentation string is written using the Lisp syntax for strings,
+with double-quote characters surrounding the text of the string. This
+is because it really is a Lisp string object. The string serves as
+documentation when it is written in the proper place in the definition
+of a function or variable. In a function definition, the documentation
+string follows the argument list. In a variable definition, the
+documentation string follows the initial value of the variable.
+
+ When you write a documentation string, make the first line a complete
+sentence (or two complete sentences) since some commands, such as
+`apropos', show only the first line of a multi-line documentation
+string. Also, you should not indent the second line of a documentation
+string, if you have one, because that looks odd when you use `C-h f'
+(`describe-function') or `C-h v' (`describe-variable'). *Note
+Documentation Tips::.
+
+ Documentation strings may contain several special substrings, which
+stand for key bindings to be looked up in the current keymaps when the
+documentation is displayed. This allows documentation strings to refer
+to the keys for related commands and be accurate even when a user
+rearranges the key bindings. (*Note Accessing Documentation::.)
+
+ Within the Lisp world, a documentation string is accessible through
+the function or variable that it describes:
+
+ * The documentation for a function is stored in 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
+ property list under the property name `variable-documentation'.
+ The function `documentation-property' knows how to extract it.
+
+ To save space, the documentation for preloaded functions and
+variables (including primitive functions and autoloaded functions) is
+stored in the "internal doc file" `DOC'. The documentation for
+functions and variables loaded during the XEmacs session from
+byte-compiled files is stored in those very same byte-compiled files
+(*note Docs and Compilation::).
+
+ XEmacs does not keep documentation strings in memory unless
+necessary. Instead, XEmacs maintains, for preloaded symbols, an
+integer offset into the internal doc file, and for symbols loaded from
+byte-compiled files, a list containing the filename of the
+byte-compiled file and an integer offset, in place of the documentation
+string. The functions `documentation' and `documentation-property' use
+that information to read the documentation from the appropriate file;
+this is transparent to the user.
+
+ For information on the uses of documentation strings, see *Note
+Help: (emacs)Help.
+
+ The `emacs/lib-src' directory contains two utilities that you can
+use to print nice-looking hardcopy for the file
+`emacs/etc/DOC-VERSION'. These are `sorted-doc.c' and `digest-doc.c'.
+
+\1f
+File: lispref.info, Node: Accessing Documentation, Next: Keys in Documentation, Prev: Documentation Basics, Up: Documentation
+
+Access to Documentation Strings
+===============================
+
+ - 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'
+ to substitute actual key bindings. (This substitution is not done
+ if VERBATIM is non-`nil'; the VERBATIM argument exists only as of
+ Emacs 19.)
+
+ (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
+ 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
+ containing the actual (current) key bindings.
+
+ The function `documentation' signals a `void-function' error if
+ FUNCTION has no function definition. However, it is ok if the
+ function definition has no documentation string. In that case,
+ `documentation' returns `nil'.
+
+ Here is an example of using the two functions, `documentation' and
+`documentation-property', to display the documentation strings for
+several symbols in a `*Help*' buffer.
+
+ (defun describe-symbols (pattern)
+ "Describe the XEmacs Lisp symbols matching PATTERN.
+ All symbols that have PATTERN in their name are described
+ in the `*Help*' buffer."
+ (interactive "sDescribe symbols matching: ")
+ (let ((describe-func
+ (function
+ (lambda (s)
+ ;; Print description of symbol.
+ (if (fboundp s) ; It is a function.
+ (princ
+ (format "%s\t%s\n%s\n\n" s
+ (if (commandp s)
+ (let ((keys (where-is-internal s)))
+ (if keys
+ (concat
+ "Keys: "
+ (mapconcat 'key-description
+ keys " "))
+ "Keys: none"))
+ "Function")
+ (or (documentation s)
+ "not documented"))))
+
+ (if (boundp s) ; It is a variable.
+ (princ
+ (format "%s\t%s\n%s\n\n" s
+ (if (user-variable-p s)
+ "Option " "Variable")
+ (or (documentation-property
+ s 'variable-documentation)
+ "not documented")))))))
+ sym-list)
+
+ ;; 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.
+ (with-output-to-temp-buffer "*Help*"
+ (mapcar describe-func (sort sym-list 'string<))
+ (print-help-return-message))))
+
+ The `describe-symbols' function works like `apropos', but provides
+more information.
+
+ (describe-symbols "goal")
+
+ ---------- 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
+ at the start of current run of vertical motion commands.
+ When the `track-eol' feature is doing its job, the value is 9999.
+ ---------- Buffer: *Help* ----------
+
+ - 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
+ records them in the in-core function definitions and variable
+ property lists in place of the actual strings. *Note Building
+ XEmacs::.
+
+ XEmacs finds the file FILENAME in the `lib-src' directory. When
+ the dumped XEmacs is later executed, the same file is found in the
+ directory `doc-directory'. The usual value for FILENAME is `DOC',
+ but this can be changed by modifying the variable
+ `internal-doc-file-name'.
+
+ - Variable: internal-doc-file-name
+ This variable holds the name of the file containing documentation
+ strings of built-in symbols, usually `DOC'. The full pathname of
+ the internal doc file is `(concat doc-directory
+ internal-doc-file-name)'.
+
+ - Variable: doc-directory
+ This variable holds the name of the directory which contains the
+ "internal doc file" that contains documentation strings for
+ built-in and preloaded functions and variables.
+
+ In most cases, this is the same as `exec-directory'. They may be
+ different when you run XEmacs from the directory where you built
+ it, without actually installing it. See `exec-directory' in *Note
+ Help Functions::.
+
+ In older Emacs versions, `exec-directory' was used for this.
+
+ - Variable: data-directory
+ This variable holds the name of the directory in which XEmacs finds
+ certain system independent documentation and text files that come
+ with XEmacs. In older Emacs versions, `exec-directory' was used
+ for this.
+
+\1f
File: lispref.info, Node: Keys in Documentation, Next: Describing Characters, Prev: Accessing Documentation, Up: Documentation
Substituting Key Bindings in Documentation
add newlines at all. `nil' is the default value, but a few major
modes set it to `t' in particular buffers.
-\1f
-File: lispref.info, Node: Reading from Files, Next: Writing to Files, Prev: Saving Buffers, Up: Files
-
-Reading from Files
-==================
-
- You can copy a file from the disk and insert it into a buffer using
-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
- 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
- signaled if FILENAME is not the name of a file that can be read.
-
- The function `insert-file-contents' checks the file contents
- against the defined file formats, and converts the file contents if
- appropriate. *Note Format Conversion::. It also calls the
- functions in the list `after-insert-file-functions'; see *Note
- Saving Properties::.
-
- If VISIT is non-`nil', this function additionally marks the buffer
- as unmodified and sets up various fields in the buffer so that it
- is visiting the file FILENAME: these include the buffer's visited
- file name and its last save file modtime. This feature is used by
- `find-file-noselect' and you probably should not use it yourself.
-
- If BEG and END are non-`nil', they should be integers specifying
- the portion of the file to insert. In this case, VISIT must be
- `nil'. For example,
-
- (insert-file-contents filename nil 0 500)
-
- inserts the first 500 characters of a file.
-
- If the argument REPLACE is non-`nil', it means to replace the
- contents of the buffer (actually, just the accessible portion)
- with the contents of the file. This is better than simply
- deleting the buffer contents and inserting the whole file, because
- (1) it preserves some marker positions and (2) it puts less data
- in the undo list.
-
- If you want to pass a file name to another process so that another
-program can read the file, use the function `file-local-copy'; see
-*Note Magic File Names::.
-
-\1f
-File: lispref.info, Node: Writing to Files, Next: File Locks, Prev: Reading from Files, Up: Files
-
-Writing to Files
-================
-
- You can write the contents of a buffer, or part of a buffer, directly
-to a file on disk using the `append-to-file' and `write-region'
-functions. Don't use these functions to write to files that are being
-visited; that could cause confusion in the mechanisms for visiting.
-
- - Command: append-to-file start end filename
- 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
- it is overwritten. This function returns `nil'.
-
- 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
- This function writes the region delimited by START and END in the
- current buffer into the file specified by FILENAME.
-
- If START is a string, then `write-region' writes or appends that
- string, rather than text from the buffer.
-
- If APPEND is non-`nil', then the specified text is appended to the
- existing file contents (if any).
-
- If VISIT is `t', then XEmacs establishes an association between
- the buffer and the file: the buffer is then visiting that file.
- It also sets the last file modification time for the current
- buffer to FILENAME's modtime, and marks the buffer as not
- modified. This feature is used by `save-buffer', but you probably
- should not use it yourself.
-
- If VISIT is a string, it specifies the file name to visit. This
- way, you can write the data to one file (FILENAME) while recording
- the buffer as visiting another file (VISIT). The argument VISIT
- is used in the echo area message and also for file locking; VISIT
- is stored in `buffer-file-name'. This feature is used to
- implement `file-precious-flag'; don't use it yourself unless you
- really know what you're doing.
-
- The function `write-region' converts the data which it writes to
- the appropriate file formats specified by `buffer-file-format'.
- *Note Format Conversion::. It also calls the functions in the list
- `write-region-annotate-functions'; see *Note Saving Properties::.
-
- Normally, `write-region' displays a message `Wrote file FILENAME'
- in the echo area. If VISIT is neither `t' nor `nil' nor a string,
- then this message is inhibited. This feature is useful for
- programs that use files for internal purposes, files that the user
- does not need to know about.
-
-\1f
-File: lispref.info, Node: File Locks, Next: Information about Files, Prev: Writing to Files, Up: Files
-
-File Locks
-==========
-
- When two users edit the same file at the same time, they are likely
-to interfere with each other. XEmacs tries to prevent this situation
-from arising by recording a "file lock" when a file is being modified.
-XEmacs can then detect the first attempt to modify a buffer visiting a
-file that is locked by another XEmacs process, and ask the user what to
-do.
-
- File locks do not work properly when multiple machines can share
-file systems, such as with NFS. Perhaps a better file locking system
-will be implemented in the future. When file locks do not work, it is
-possible for two users to make changes simultaneously, but XEmacs can
-still warn the user who saves second. Also, the detection of
-modification of a buffer visiting a file changed on disk catches some
-cases of simultaneous editing; see *Note Modification Time::.
-
- - Function: file-locked-p &optional filename
- 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
- is locked by someone else.
-
- (file-locked-p "foo")
- => nil
-
- - 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
- visiting a file, or is not modified.
-
- - Function: unlock-buffer
- This function unlocks the file being visited in the current buffer,
- if the buffer is modified. If the buffer is not modified, then
- 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
- 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:
-
- * A value of `t' says to grab the lock on the file. Then this
- user may edit the file and OTHER-USER loses the lock.
-
- * A value of `nil' says to ignore the lock and let this user
- edit the file anyway.
-
- * This function may instead signal a `file-locked' error, in
- which case the change that the user was about to make does
- not take place.
-
- The error message for this error looks like this:
-
- error--> File is locked: FILE OTHER-USER
-
- where `file' is the name of the file and OTHER-USER is the
- name of the user who has locked the file.
-
- The default definition of this function asks the user to choose
- what to do. If you wish, you can replace the `ask-user-about-lock'
- function with your own version that decides in another way. The
- code for its usual definition is in `userlock.el'.
-
-\1f
-File: lispref.info, Node: Information about Files, Next: Changing File Attributes, Prev: File Locks, Up: Files
-
-Information about Files
-=======================
-
- The functions described in this section all operate on strings that
-designate file names. All the functions have names that begin with the
-word `file'. These functions all return information about actual files
-or directories, so their arguments must all exist as actual files or
-directories unless otherwise noted.
-
-* Menu:
-
-* Testing Accessibility:: Is a given file readable? Writable?
-* Kinds of Files:: Is it a directory? A symbolic link?
-* Truenames:: Eliminating symbolic links from a file name.
-* File Attributes:: How large is it? Any other names? Etc.
-
-\1f
-File: lispref.info, Node: Testing Accessibility, Next: Kinds of Files, Up: Information about Files
-
-Testing Accessibility
----------------------
-
- These functions test for permission to access a file in specific
-ways.
-
- - 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
- the file exists and you have execute permission on the containing
- directories, regardless of the protection of the file itself.)
-
- If the file does not exist, or if fascist access control policies
- prevent you from finding the attributes of the file, this function
- returns `nil'.
-
- - 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 "files.texi")
- => t
- (file-exists-p "/usr/spool/mqueue")
- => t
- (file-readable-p "/usr/spool/mqueue")
- => nil
-
- - 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
- 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
- exist, but the specified directory does exist and you can write in
- that directory.
-
- In the third example below, `foo' is not writable because the
- parent directory does not exist, even though the user could create
- such a directory.
-
- (file-writable-p "~/foo")
- => t
- (file-writable-p "/foo")
- => nil
- (file-writable-p "~/no-such-dir/foo")
- => nil
-
- - 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
- of DIRNAME may be either a directory name or the file name of a
- directory.
-
- Example: after the following,
-
- (file-accessible-directory-p "/foo")
- => nil
-
- we can deduce that any attempt to read a file in `/foo/' will give
- an error.
-
- - 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
- 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'.
-
- In the following example, assume that the file `aug-19' was written
- on the 19th, `aug-20' was written on the 20th, and the file
- `no-file' doesn't exist at all.
-
- (file-newer-than-file-p "aug-19" "aug-20")
- => nil
- (file-newer-than-file-p "aug-20" "aug-19")
- => t
- (file-newer-than-file-p "aug-19" "no-file")
- => t
- (file-newer-than-file-p "no-file" "aug-19")
- => nil
-
- You can use `file-attributes' to get a file's last modification
- time as a list of two numbers. *Note File Attributes::.
-
-\1f
-File: lispref.info, Node: Kinds of Files, Next: Truenames, Prev: Testing Accessibility, Up: Information about Files
-
-Distinguishing Kinds of Files
------------------------------
-
- This section describes how to distinguish various kinds of files,
-such as directories, symbolic links, and ordinary files.
-
- - Function: file-symlink-p filename
- 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
- link, or it may be a nonexistent file name.
-
- If the file FILENAME is not a symbolic link (or there is no such
- file), `file-symlink-p' returns `nil'.
-
- (file-symlink-p "foo")
- => nil
- (file-symlink-p "sym-link")
- => "foo"
- (file-symlink-p "sym-link2")
- => "sym-link"
- (file-symlink-p "/bin")
- => "/pub/bin"
-
-
- - Function: file-directory-p filename
- This function returns `t' if FILENAME is the name of an existing
- directory, `nil' otherwise.
-
- (file-directory-p "~rms")
- => t
- (file-directory-p "~rms/lewis/files.texi")
- => nil
- (file-directory-p "~rms/lewis/no-such-file")
- => nil
- (file-directory-p "$HOME")
- => nil
- (file-directory-p
- (substitute-in-file-name "$HOME"))
- => t
-
- - 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).
-
-\1f
-File: lispref.info, Node: Truenames, Next: File Attributes, Prev: Kinds of Files, Up: Information about Files
-
-Truenames
----------
-
- The "truename" of a file is the name that you get by following
-symbolic links until none remain, then expanding to get rid of `.' and
-`..' 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
- 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.
-
- If the filename is relative, DEFAULT is the directory to start
- with. If DEFAULT is `nil' or missing, the current buffer's value
- of `default-directory' is used.
-
- *Note Buffer File Name::, for related information.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Reading from Files, Next: Writing to Files, Prev: Saving Buffers, Up: Files
+
+Reading from Files
+==================
+
+ You can copy a file from the disk and insert it into a buffer using
+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
+ 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
+ signaled if FILENAME is not the name of a file that can be read.
+
+ The function `insert-file-contents' checks the file contents
+ against the defined file formats, and converts the file contents if
+ appropriate. *Note Format Conversion::. It also calls the
+ functions in the list `after-insert-file-functions'; see *Note
+ Saving Properties::.
+
+ If VISIT is non-`nil', this function additionally marks the buffer
+ as unmodified and sets up various fields in the buffer so that it
+ is visiting the file FILENAME: these include the buffer's visited
+ file name and its last save file modtime. This feature is used by
+ `find-file-noselect' and you probably should not use it yourself.
+
+ If BEG and END are non-`nil', they should be integers specifying
+ the portion of the file to insert. In this case, VISIT must be
+ `nil'. For example,
+
+ (insert-file-contents filename nil 0 500)
+
+ inserts the first 500 characters of a file.
+
+ If the argument REPLACE is non-`nil', it means to replace the
+ contents of the buffer (actually, just the accessible portion)
+ with the contents of the file. This is better than simply
+ deleting the buffer contents and inserting the whole file, because
+ (1) it preserves some marker positions and (2) it puts less data
+ in the undo list.
+
+ If you want to pass a file name to another process so that another
+program can read the file, use the function `file-local-copy'; see
+*Note Magic File Names::.
+
+\1f
+File: lispref.info, Node: Writing to Files, Next: File Locks, Prev: Reading from Files, Up: Files
+
+Writing to Files
+================
+
+ You can write the contents of a buffer, or part of a buffer, directly
+to a file on disk using the `append-to-file' and `write-region'
+functions. Don't use these functions to write to files that are being
+visited; that could cause confusion in the mechanisms for visiting.
+
+ - Command: append-to-file start end filename
+ 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
+ it is overwritten. This function returns `nil'.
+
+ 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
+ This function writes the region delimited by START and END in the
+ current buffer into the file specified by FILENAME.
+
+ If START is a string, then `write-region' writes or appends that
+ string, rather than text from the buffer.
+
+ If APPEND is non-`nil', then the specified text is appended to the
+ existing file contents (if any).
+
+ If VISIT is `t', then XEmacs establishes an association between
+ the buffer and the file: the buffer is then visiting that file.
+ It also sets the last file modification time for the current
+ buffer to FILENAME's modtime, and marks the buffer as not
+ modified. This feature is used by `save-buffer', but you probably
+ should not use it yourself.
+
+ If VISIT is a string, it specifies the file name to visit. This
+ way, you can write the data to one file (FILENAME) while recording
+ the buffer as visiting another file (VISIT). The argument VISIT
+ is used in the echo area message and also for file locking; VISIT
+ is stored in `buffer-file-name'. This feature is used to
+ implement `file-precious-flag'; don't use it yourself unless you
+ really know what you're doing.
+
+ The function `write-region' converts the data which it writes to
+ the appropriate file formats specified by `buffer-file-format'.
+ *Note Format Conversion::. It also calls the functions in the list
+ `write-region-annotate-functions'; see *Note Saving Properties::.
+
+ Normally, `write-region' displays a message `Wrote file FILENAME'
+ in the echo area. If VISIT is neither `t' nor `nil' nor a string,
+ then this message is inhibited. This feature is useful for
+ programs that use files for internal purposes, files that the user
+ does not need to know about.
+
+\1f
+File: lispref.info, Node: File Locks, Next: Information about Files, Prev: Writing to Files, Up: Files
+
+File Locks
+==========
+
+ When two users edit the same file at the same time, they are likely
+to interfere with each other. XEmacs tries to prevent this situation
+from arising by recording a "file lock" when a file is being modified.
+XEmacs can then detect the first attempt to modify a buffer visiting a
+file that is locked by another XEmacs process, and ask the user what to
+do.
+
+ File locks do not work properly when multiple machines can share
+file systems, such as with NFS. Perhaps a better file locking system
+will be implemented in the future. When file locks do not work, it is
+possible for two users to make changes simultaneously, but XEmacs can
+still warn the user who saves second. Also, the detection of
+modification of a buffer visiting a file changed on disk catches some
+cases of simultaneous editing; see *Note Modification Time::.
+
+ - Function: file-locked-p &optional filename
+ 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
+ is locked by someone else.
+
+ (file-locked-p "foo")
+ => nil
+
+ - 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
+ visiting a file, or is not modified.
+
+ - Function: unlock-buffer
+ This function unlocks the file being visited in the current buffer,
+ if the buffer is modified. If the buffer is not modified, then
+ 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
+ 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:
+
+ * A value of `t' says to grab the lock on the file. Then this
+ user may edit the file and OTHER-USER loses the lock.
+
+ * A value of `nil' says to ignore the lock and let this user
+ edit the file anyway.
+
+ * This function may instead signal a `file-locked' error, in
+ which case the change that the user was about to make does
+ not take place.
+
+ The error message for this error looks like this:
+
+ error--> File is locked: FILE OTHER-USER
+
+ where `file' is the name of the file and OTHER-USER is the
+ name of the user who has locked the file.
+
+ The default definition of this function asks the user to choose
+ what to do. If you wish, you can replace the `ask-user-about-lock'
+ function with your own version that decides in another way. The
+ code for its usual definition is in `userlock.el'.
+
+\1f
+File: lispref.info, Node: Information about Files, Next: Changing File Attributes, Prev: File Locks, Up: Files
+
+Information about Files
+=======================
+
+ The functions described in this section all operate on strings that
+designate file names. All the functions have names that begin with the
+word `file'. These functions all return information about actual files
+or directories, so their arguments must all exist as actual files or
+directories unless otherwise noted.
+
+* Menu:
+
+* Testing Accessibility:: Is a given file readable? Writable?
+* Kinds of Files:: Is it a directory? A symbolic link?
+* Truenames:: Eliminating symbolic links from a file name.
+* File Attributes:: How large is it? Any other names? Etc.
+
+\1f
+File: lispref.info, Node: Testing Accessibility, Next: Kinds of Files, Up: Information about Files
+
+Testing Accessibility
+---------------------
+
+ These functions test for permission to access a file in specific
+ways.
+
+ - 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
+ the file exists and you have execute permission on the containing
+ directories, regardless of the protection of the file itself.)
+
+ If the file does not exist, or if fascist access control policies
+ prevent you from finding the attributes of the file, this function
+ returns `nil'.
+
+ - 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 "files.texi")
+ => t
+ (file-exists-p "/usr/spool/mqueue")
+ => t
+ (file-readable-p "/usr/spool/mqueue")
+ => nil
+
+ - 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
+ 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
+ exist, but the specified directory does exist and you can write in
+ that directory.
+
+ In the third example below, `foo' is not writable because the
+ parent directory does not exist, even though the user could create
+ such a directory.
+
+ (file-writable-p "~/foo")
+ => t
+ (file-writable-p "/foo")
+ => nil
+ (file-writable-p "~/no-such-dir/foo")
+ => nil
+
+ - 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
+ of DIRNAME may be either a directory name or the file name of a
+ directory.
+
+ Example: after the following,
+
+ (file-accessible-directory-p "/foo")
+ => nil
+
+ we can deduce that any attempt to read a file in `/foo/' will give
+ an error.
+
+ - 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
+ 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'.
+
+ In the following example, assume that the file `aug-19' was written
+ on the 19th, `aug-20' was written on the 20th, and the file
+ `no-file' doesn't exist at all.
+
+ (file-newer-than-file-p "aug-19" "aug-20")
+ => nil
+ (file-newer-than-file-p "aug-20" "aug-19")
+ => t
+ (file-newer-than-file-p "aug-19" "no-file")
+ => t
+ (file-newer-than-file-p "no-file" "aug-19")
+ => nil
+
+ You can use `file-attributes' to get a file's last modification
+ time as a list of two numbers. *Note File Attributes::.
+
+\1f
+File: lispref.info, Node: Kinds of Files, Next: Truenames, Prev: Testing Accessibility, Up: Information about Files
+
+Distinguishing Kinds of Files
+-----------------------------
+
+ This section describes how to distinguish various kinds of files,
+such as directories, symbolic links, and ordinary files.
+
+ - Function: file-symlink-p filename
+ 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
+ link, or it may be a nonexistent file name.
+
+ If the file FILENAME is not a symbolic link (or there is no such
+ file), `file-symlink-p' returns `nil'.
+
+ (file-symlink-p "foo")
+ => nil
+ (file-symlink-p "sym-link")
+ => "foo"
+ (file-symlink-p "sym-link2")
+ => "sym-link"
+ (file-symlink-p "/bin")
+ => "/pub/bin"
+
+
+ - Function: file-directory-p filename
+ This function returns `t' if FILENAME is the name of an existing
+ directory, `nil' otherwise.
+
+ (file-directory-p "~rms")
+ => t
+ (file-directory-p "~rms/lewis/files.texi")
+ => nil
+ (file-directory-p "~rms/lewis/no-such-file")
+ => nil
+ (file-directory-p "$HOME")
+ => nil
+ (file-directory-p
+ (substitute-in-file-name "$HOME"))
+ => t
+
+ - 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).
+
+\1f
+File: lispref.info, Node: Truenames, Next: File Attributes, Prev: Kinds of Files, Up: Information about Files
+
+Truenames
+---------
+
+ The "truename" of a file is the name that you get by following
+symbolic links until none remain, then expanding to get rid of `.' and
+`..' 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
+ 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.
+
+ If the filename is relative, DEFAULT is the directory to start
+ with. If DEFAULT is `nil' or missing, the current buffer's value
+ of `default-directory' is used.
+
+ *Note Buffer File Name::, for related information.
+
+\1f
File: lispref.info, Node: File Attributes, Prev: Truenames, Up: Information about Files
Other Information about Files
`delete-file' does not work for files that are directories; you
must use `delete-directory' in that case.
-\1f
-File: lispref.info, Node: Magic File Names, Next: Partial Files, Prev: Create/Delete Dirs, Up: Files
-
-Making Certain File Names "Magic"
-=================================
-
- You can implement special handling for certain file names. This is
-called making those names "magic". You must supply a regular
-expression to define the class of names (all those that match the
-regular expression), plus a handler that implements all the primitive
-XEmacs file operations for file names that do match.
-
- The variable `file-name-handler-alist' holds a list of handlers,
-together with regular expressions that determine when to apply each
-handler. Each element has this form:
-
- (REGEXP . HANDLER)
-
-All the XEmacs primitives for file access and file name transformation
-check the given file name against `file-name-handler-alist'. If the
-file name matches REGEXP, the primitives handle that file by calling
-HANDLER.
-
- The first argument given to HANDLER is the name of the primitive;
-the remaining arguments are the arguments that were passed to that
-operation. (The first of these arguments is typically the file name
-itself.) For example, if you do this:
-
- (file-exists-p FILENAME)
-
-and FILENAME has handler HANDLER, then HANDLER is called like this:
-
- (funcall HANDLER 'file-exists-p FILENAME)
-
- Here are the operations that a magic file name handler gets to
-handle:
-
-`add-name-to-file', `copy-file', `delete-directory', `delete-file',
-`diff-latest-backup-file', `directory-file-name', `directory-files',
-`dired-compress-file', `dired-uncache', `expand-file-name',
-`file-accessible-directory-p', `file-attributes', `file-directory-p',
-`file-executable-p', `file-exists-p', `file-local-copy', `file-modes',
-`file-name-all-completions', `file-name-as-directory',
-`file-name-completion', `file-name-directory', `file-name-nondirectory',
-`file-name-sans-versions', `file-newer-than-file-p', `file-readable-p',
-`file-regular-p', `file-symlink-p', `file-truename', `file-writable-p',
-`get-file-buffer', `insert-directory', `insert-file-contents', `load',
-`make-directory', `make-symbolic-link', `rename-file', `set-file-modes',
-`set-visited-file-modtime', `unhandled-file-name-directory',
-`verify-visited-file-modtime', `write-region'.
-
- Handlers for `insert-file-contents' typically need to clear the
-buffer's modified flag, with `(set-buffer-modified-p nil)', if the
-VISIT argument is non-`nil'. This also has the effect of unlocking the
-buffer if it is locked.
-
- The handler function must handle all of the above operations, and
-possibly others to be added in the future. It need not implement all
-these operations itself--when it has nothing special to do for a
-certain operation, it can reinvoke the primitive, to handle the
-operation "in the usual way". It should always reinvoke the primitive
-for an operation it does not recognize. Here's one way to do this:
-
- (defun my-file-handler (operation &rest args)
- ;; First check for the specific operations
- ;; that we have special handling for.
- (cond ((eq operation 'insert-file-contents) ...)
- ((eq operation 'write-region) ...)
- ...
- ;; Handle any operation we don't know about.
- (t (let ((inhibit-file-name-handlers
- (cons 'my-file-handler
- (and (eq inhibit-file-name-operation operation)
- inhibit-file-name-handlers)))
- (inhibit-file-name-operation operation))
- (apply operation args)))))
-
- When a handler function decides to call the ordinary Emacs primitive
-for the operation at hand, it needs to prevent the primitive from
-calling the same handler once again, thus leading to an infinite
-recursion. The example above shows how to do this, with the variables
-`inhibit-file-name-handlers' and `inhibit-file-name-operation'. Be
-careful to use them exactly as shown above; the details are crucial for
-proper behavior in the case of multiple handlers, and for operations
-that have two file names that may each have handlers.
-
- - Variable: inhibit-file-name-handlers
- This variable holds a list of handlers whose use is presently
- inhibited for a certain operation.
-
- - Variable: inhibit-file-name-operation
- The operation for which certain handlers are presently inhibited.
-
- - 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
- This function copies file FILENAME to an ordinary non-magic file,
- if it isn't one already.
-
- If FILENAME specifies a "magic" file name, which programs outside
- Emacs cannot directly read or write, this copies the contents to
- an ordinary file and returns that file's name.
-
- If FILENAME is an ordinary file name, not magic, then this function
- does nothing and returns `nil'.
-
- - 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.
-
- This is useful for running a subprocess; every subprocess must
- have a non-magic directory to serve as its current directory, and
- this function is a good way to come up with one.
-
-\1f
-File: lispref.info, Node: Partial Files, Next: Format Conversion, Prev: Magic File Names, Up: Files
-
-Partial Files
-=============
-
-* Menu:
-
-* Intro to Partial Files::
-* Creating a Partial File::
-* Detached Partial Files::
-
-\1f
-File: lispref.info, Node: Intro to Partial Files, Next: Creating a Partial File, Up: Partial Files
-
-Intro to Partial Files
-----------------------
-
- A "partial file" is a section of a buffer (called the "master
-buffer") that is placed in its own buffer and treated as its own file.
-Changes made to the partial file are not reflected in the master buffer
-until the partial file is "saved" using the standard buffer save
-commands. Partial files can be "reverted" (from the master buffer)
-just like normal files. When a file part is active on a master buffer,
-that section of the master buffer is marked as read-only. Two file
-parts on the same master buffer are not allowed to overlap. Partial
-file buffers are indicated by the words `File Part' in the modeline.
-
- The master buffer knows about all the partial files that are active
-on it, and thus killing or reverting the master buffer will be handled
-properly. When the master buffer is saved, if there are any unsaved
-partial files active on it then the user will be given the opportunity
-to first save these files.
-
- When a partial file buffer is first modified, the master buffer is
-automatically marked as modified so that saving the master buffer will
-work correctly.
-
-\1f
-File: lispref.info, Node: Creating a Partial File, Next: Detached Partial Files, Prev: Intro to Partial Files, Up: Partial Files
-
-Creating a Partial File
------------------------
-
- - 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
- buffer, called the "master buffer". When the file-part buffer is
- saved, its changes are integrated back into the master buffer.
- When the master buffer is deleted, all file parts are deleted with
- it.
-
- When called from a function, expects four arguments, START, END,
- NAME, and BUFFER, all of which are optional and default to the
- beginning of BUFFER, the end of BUFFER, a name generated from
- BUFFER name, and the current buffer, respectively.
-
-\1f
-File: lispref.info, Node: Detached Partial Files, Prev: Creating a Partial File, Up: Partial Files
-
-Detached Partial Files
-----------------------
-
- Every partial file has an extent in the master buffer associated
-with it (called the "master extent"), marking where in the master
-buffer the partial file begins and ends. If the text in master buffer
-that is contained by the extent is deleted, then the extent becomes
-"detached", meaning that it no longer refers to a specific region of
-the master buffer. This can happen either when the text is deleted
-directly or when the master buffer is reverted. Neither of these should
-happen in normal usage because the master buffer should generally not be
-edited directly.
-
- Before doing any operation that references a partial file's master
-extent, XEmacs checks to make sure that the extent is not detached. If
-this is the case, XEmacs warns the user of this and the master extent is
-deleted out of the master buffer, disconnecting the file part. The file
-part's filename is cleared and thus must be explicitly specified if the
-detached file part is to be saved.
-
-\1f
-File: lispref.info, Node: Format Conversion, Next: Files and MS-DOS, Prev: Partial Files, Up: Files
-
-File Format Conversion
-======================
-
- The variable `format-alist' defines a list of "file formats", which
-describe textual representations used in files for the data (text,
-text-properties, and possibly other information) in an Emacs buffer.
-Emacs performs format conversion if appropriate when reading and writing
-files.
-
- - Variable: format-alist
- This list contains one format definition for each defined file
- format.
-
- Each format definition is a list of this form:
-
- (NAME DOC-STRING REGEXP FROM-FN TO-FN MODIFY MODE-FN)
-
- Here is what the elements in a format definition mean:
-
-NAME
- The name of this format.
-
-DOC-STRING
- A documentation string for the format.
-
-REGEXP
- A regular expression which is used to recognize files represented
- in this format.
-
-FROM-FN
- A function to call to decode data in this format (to convert file
- data into the usual Emacs data representation).
-
- The FROM-FN is called with two args, BEGIN and END, which specify
- the part of the buffer it should convert. It should convert the
- text by editing it in place. Since this can change the length of
- the text, FROM-FN should return the modified end position.
-
- One responsibility of FROM-FN is to make sure that the beginning
- of the file no longer matches REGEXP. Otherwise it is likely to
- get called again.
-
-TO-FN
- A function to call to encode data in this format (to convert the
- usual Emacs data representation into this format).
-
- The TO-FN is called with two args, BEGIN and END, which specify
- the part of the buffer it should convert. There are two ways it
- can do the conversion:
-
- * By editing the buffer in place. In this case, TO-FN should
- return the end-position of the range of text, as modified.
-
- * By returning a list of annotations. This is a list of
- elements of the form `(POSITION . STRING)', where POSITION is
- an integer specifying the relative position in the text to be
- written, and STRING is the annotation to add there. The list
- must be sorted in order of position when TO-FN returns it.
-
- When `write-region' actually writes the text from the buffer
- to the file, it intermixes the specified annotations at the
- corresponding positions. All this takes place without
- modifying the buffer.
-
-MODIFY
- A flag, `t' if the encoding function modifies the buffer, and
- `nil' if it works by returning a list of annotations.
-
-MODE
- A mode function to call after visiting a file converted from this
- format.
-
- The function `insert-file-contents' automatically recognizes file
-formats when it reads the specified file. It checks the text of the
-beginning of the file against the regular expressions of the format
-definitions, and if it finds a match, it calls the decoding function for
-that format. Then it checks all the known formats over again. It
-keeps checking them until none of them is applicable.
-
- Visiting a file, with `find-file-noselect' or the commands that use
-it, performs conversion likewise (because it calls
-`insert-file-contents'); it also calls the mode function for each
-format that it decodes. It stores a list of the format names in the
-buffer-local variable `buffer-file-format'.
-
- - Variable: buffer-file-format
- This variable states the format of the visited file. More
- precisely, this is a list of the file format names that were
- decoded in the course of visiting the current buffer's file. It
- is always local in all buffers.
-
- When `write-region' writes data into a file, it first calls the
-encoding functions for the formats listed in `buffer-file-format', in
-the order of appearance in the list.
-
- - 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
- This command finds the file FILE, converting it according to
- format FORMAT. It also makes FORMAT the default if the buffer is
- saved later.
-
- The argument FORMAT is a list of format names. If FORMAT is
- `nil', no conversion takes place. Interactively, typing just
- <RET> for FORMAT specifies `nil'.
-
- - 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::).
-
- The return value is like what `insert-file-contents' returns: a
- list of the absolute file name and the length of the data inserted
- (after conversion).
-
- The argument FORMAT is a list of format names. If FORMAT is
- `nil', no conversion takes place. Interactively, typing just
- <RET> for FORMAT specifies `nil'.
-
- - 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.
-
- The argument FORMAT is a list of format names. If FORMAT is
- `nil', no conversion takes place. Interactively, typing just
- <RET> for FORMAT specifies `nil'.
-
- - 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::).
-
- The return value is like what `insert-file-contents' returns: a
- list of the absolute file name and the length of the data inserted
- (after conversion).
-
- The argument FORMAT is a list of format names. If FORMAT is
- `nil', no conversion takes place. Interactively, typing just
- <RET> for FORMAT specifies `nil'.
-
- - Variable: auto-save-file-format
- This variable specifies the format to use for auto-saving. Its
- value is a list of format names, just like the value of
- `buffer-file-format'; but it is used instead of
- `buffer-file-format' for writing auto-save files. This variable
- is always local in all buffers.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Magic File Names, Next: Partial Files, Prev: Create/Delete Dirs, Up: Files
+
+Making Certain File Names "Magic"
+=================================
+
+ You can implement special handling for certain file names. This is
+called making those names "magic". You must supply a regular
+expression to define the class of names (all those that match the
+regular expression), plus a handler that implements all the primitive
+XEmacs file operations for file names that do match.
+
+ The variable `file-name-handler-alist' holds a list of handlers,
+together with regular expressions that determine when to apply each
+handler. Each element has this form:
+
+ (REGEXP . HANDLER)
+
+All the XEmacs primitives for file access and file name transformation
+check the given file name against `file-name-handler-alist'. If the
+file name matches REGEXP, the primitives handle that file by calling
+HANDLER.
+
+ The first argument given to HANDLER is the name of the primitive;
+the remaining arguments are the arguments that were passed to that
+operation. (The first of these arguments is typically the file name
+itself.) For example, if you do this:
+
+ (file-exists-p FILENAME)
+
+and FILENAME has handler HANDLER, then HANDLER is called like this:
+
+ (funcall HANDLER 'file-exists-p FILENAME)
+
+ Here are the operations that a magic file name handler gets to
+handle:
+
+`add-name-to-file', `copy-file', `delete-directory', `delete-file',
+`diff-latest-backup-file', `directory-file-name', `directory-files',
+`dired-compress-file', `dired-uncache', `expand-file-name',
+`file-accessible-directory-p', `file-attributes', `file-directory-p',
+`file-executable-p', `file-exists-p', `file-local-copy', `file-modes',
+`file-name-all-completions', `file-name-as-directory',
+`file-name-completion', `file-name-directory', `file-name-nondirectory',
+`file-name-sans-versions', `file-newer-than-file-p', `file-readable-p',
+`file-regular-p', `file-symlink-p', `file-truename', `file-writable-p',
+`get-file-buffer', `insert-directory', `insert-file-contents', `load',
+`make-directory', `make-symbolic-link', `rename-file', `set-file-modes',
+`set-visited-file-modtime', `unhandled-file-name-directory',
+`verify-visited-file-modtime', `write-region'.
+
+ Handlers for `insert-file-contents' typically need to clear the
+buffer's modified flag, with `(set-buffer-modified-p nil)', if the
+VISIT argument is non-`nil'. This also has the effect of unlocking the
+buffer if it is locked.
+
+ The handler function must handle all of the above operations, and
+possibly others to be added in the future. It need not implement all
+these operations itself--when it has nothing special to do for a
+certain operation, it can reinvoke the primitive, to handle the
+operation "in the usual way". It should always reinvoke the primitive
+for an operation it does not recognize. Here's one way to do this:
+
+ (defun my-file-handler (operation &rest args)
+ ;; First check for the specific operations
+ ;; that we have special handling for.
+ (cond ((eq operation 'insert-file-contents) ...)
+ ((eq operation 'write-region) ...)
+ ...
+ ;; Handle any operation we don't know about.
+ (t (let ((inhibit-file-name-handlers
+ (cons 'my-file-handler
+ (and (eq inhibit-file-name-operation operation)
+ inhibit-file-name-handlers)))
+ (inhibit-file-name-operation operation))
+ (apply operation args)))))
+
+ When a handler function decides to call the ordinary Emacs primitive
+for the operation at hand, it needs to prevent the primitive from
+calling the same handler once again, thus leading to an infinite
+recursion. The example above shows how to do this, with the variables
+`inhibit-file-name-handlers' and `inhibit-file-name-operation'. Be
+careful to use them exactly as shown above; the details are crucial for
+proper behavior in the case of multiple handlers, and for operations
+that have two file names that may each have handlers.
+
+ - Variable: inhibit-file-name-handlers
+ This variable holds a list of handlers whose use is presently
+ inhibited for a certain operation.
+
+ - Variable: inhibit-file-name-operation
+ The operation for which certain handlers are presently inhibited.
+
+ - 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
+ This function copies file FILENAME to an ordinary non-magic file,
+ if it isn't one already.
+
+ If FILENAME specifies a "magic" file name, which programs outside
+ Emacs cannot directly read or write, this copies the contents to
+ an ordinary file and returns that file's name.
+
+ If FILENAME is an ordinary file name, not magic, then this function
+ does nothing and returns `nil'.
+
+ - 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.
+
+ This is useful for running a subprocess; every subprocess must
+ have a non-magic directory to serve as its current directory, and
+ this function is a good way to come up with one.
+
+\1f
+File: lispref.info, Node: Partial Files, Next: Format Conversion, Prev: Magic File Names, Up: Files
+
+Partial Files
+=============
+
+* Menu:
+
+* Intro to Partial Files::
+* Creating a Partial File::
+* Detached Partial Files::
+
+\1f
+File: lispref.info, Node: Intro to Partial Files, Next: Creating a Partial File, Up: Partial Files
+
+Intro to Partial Files
+----------------------
+
+ A "partial file" is a section of a buffer (called the "master
+buffer") that is placed in its own buffer and treated as its own file.
+Changes made to the partial file are not reflected in the master buffer
+until the partial file is "saved" using the standard buffer save
+commands. Partial files can be "reverted" (from the master buffer)
+just like normal files. When a file part is active on a master buffer,
+that section of the master buffer is marked as read-only. Two file
+parts on the same master buffer are not allowed to overlap. Partial
+file buffers are indicated by the words `File Part' in the modeline.
+
+ The master buffer knows about all the partial files that are active
+on it, and thus killing or reverting the master buffer will be handled
+properly. When the master buffer is saved, if there are any unsaved
+partial files active on it then the user will be given the opportunity
+to first save these files.
+
+ When a partial file buffer is first modified, the master buffer is
+automatically marked as modified so that saving the master buffer will
+work correctly.
+
+\1f
+File: lispref.info, Node: Creating a Partial File, Next: Detached Partial Files, Prev: Intro to Partial Files, Up: Partial Files
+
+Creating a Partial File
+-----------------------
+
+ - 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
+ buffer, called the "master buffer". When the file-part buffer is
+ saved, its changes are integrated back into the master buffer.
+ When the master buffer is deleted, all file parts are deleted with
+ it.
+
+ When called from a function, expects four arguments, START, END,
+ NAME, and BUFFER, all of which are optional and default to the
+ beginning of BUFFER, the end of BUFFER, a name generated from
+ BUFFER name, and the current buffer, respectively.
+
+\1f
+File: lispref.info, Node: Detached Partial Files, Prev: Creating a Partial File, Up: Partial Files
+
+Detached Partial Files
+----------------------
+
+ Every partial file has an extent in the master buffer associated
+with it (called the "master extent"), marking where in the master
+buffer the partial file begins and ends. If the text in master buffer
+that is contained by the extent is deleted, then the extent becomes
+"detached", meaning that it no longer refers to a specific region of
+the master buffer. This can happen either when the text is deleted
+directly or when the master buffer is reverted. Neither of these should
+happen in normal usage because the master buffer should generally not be
+edited directly.
+
+ Before doing any operation that references a partial file's master
+extent, XEmacs checks to make sure that the extent is not detached. If
+this is the case, XEmacs warns the user of this and the master extent is
+deleted out of the master buffer, disconnecting the file part. The file
+part's filename is cleared and thus must be explicitly specified if the
+detached file part is to be saved.
+
+\1f
+File: lispref.info, Node: Format Conversion, Next: Files and MS-DOS, Prev: Partial Files, Up: Files
+
+File Format Conversion
+======================
+
+ The variable `format-alist' defines a list of "file formats", which
+describe textual representations used in files for the data (text,
+text-properties, and possibly other information) in an Emacs buffer.
+Emacs performs format conversion if appropriate when reading and writing
+files.
+
+ - Variable: format-alist
+ This list contains one format definition for each defined file
+ format.
+
+ Each format definition is a list of this form:
+
+ (NAME DOC-STRING REGEXP FROM-FN TO-FN MODIFY MODE-FN)
+
+ Here is what the elements in a format definition mean:
+
+NAME
+ The name of this format.
+
+DOC-STRING
+ A documentation string for the format.
+
+REGEXP
+ A regular expression which is used to recognize files represented
+ in this format.
+
+FROM-FN
+ A function to call to decode data in this format (to convert file
+ data into the usual Emacs data representation).
+
+ The FROM-FN is called with two args, BEGIN and END, which specify
+ the part of the buffer it should convert. It should convert the
+ text by editing it in place. Since this can change the length of
+ the text, FROM-FN should return the modified end position.
+
+ One responsibility of FROM-FN is to make sure that the beginning
+ of the file no longer matches REGEXP. Otherwise it is likely to
+ get called again.
+
+TO-FN
+ A function to call to encode data in this format (to convert the
+ usual Emacs data representation into this format).
+
+ The TO-FN is called with two args, BEGIN and END, which specify
+ the part of the buffer it should convert. There are two ways it
+ can do the conversion:
+
+ * By editing the buffer in place. In this case, TO-FN should
+ return the end-position of the range of text, as modified.
+
+ * By returning a list of annotations. This is a list of
+ elements of the form `(POSITION . STRING)', where POSITION is
+ an integer specifying the relative position in the text to be
+ written, and STRING is the annotation to add there. The list
+ must be sorted in order of position when TO-FN returns it.
+
+ When `write-region' actually writes the text from the buffer
+ to the file, it intermixes the specified annotations at the
+ corresponding positions. All this takes place without
+ modifying the buffer.
+
+MODIFY
+ A flag, `t' if the encoding function modifies the buffer, and
+ `nil' if it works by returning a list of annotations.
+
+MODE
+ A mode function to call after visiting a file converted from this
+ format.
+
+ The function `insert-file-contents' automatically recognizes file
+formats when it reads the specified file. It checks the text of the
+beginning of the file against the regular expressions of the format
+definitions, and if it finds a match, it calls the decoding function for
+that format. Then it checks all the known formats over again. It
+keeps checking them until none of them is applicable.
+
+ Visiting a file, with `find-file-noselect' or the commands that use
+it, performs conversion likewise (because it calls
+`insert-file-contents'); it also calls the mode function for each
+format that it decodes. It stores a list of the format names in the
+buffer-local variable `buffer-file-format'.
+
+ - Variable: buffer-file-format
+ This variable states the format of the visited file. More
+ precisely, this is a list of the file format names that were
+ decoded in the course of visiting the current buffer's file. It
+ is always local in all buffers.
+
+ When `write-region' writes data into a file, it first calls the
+encoding functions for the formats listed in `buffer-file-format', in
+the order of appearance in the list.
+
+ - 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
+ This command finds the file FILE, converting it according to
+ format FORMAT. It also makes FORMAT the default if the buffer is
+ saved later.
+
+ The argument FORMAT is a list of format names. If FORMAT is
+ `nil', no conversion takes place. Interactively, typing just
+ <RET> for FORMAT specifies `nil'.
+
+ - 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::).
+
+ The return value is like what `insert-file-contents' returns: a
+ list of the absolute file name and the length of the data inserted
+ (after conversion).
+
+ The argument FORMAT is a list of format names. If FORMAT is
+ `nil', no conversion takes place. Interactively, typing just
+ <RET> for FORMAT specifies `nil'.
+
+ - 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.
+
+ The argument FORMAT is a list of format names. If FORMAT is
+ `nil', no conversion takes place. Interactively, typing just
+ <RET> for FORMAT specifies `nil'.
+
+ - 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::).
+
+ The return value is like what `insert-file-contents' returns: a
+ list of the absolute file name and the length of the data inserted
+ (after conversion).
+
+ The argument FORMAT is a list of format names. If FORMAT is
+ `nil', no conversion takes place. Interactively, typing just
+ <RET> for FORMAT specifies `nil'.
+
+ - Variable: auto-save-file-format
+ This variable specifies the format to use for auto-saving. Its
+ value is a list of format names, just like the value of
+ `buffer-file-format'; but it is used instead of
+ `buffer-file-format' for writing auto-save files. This variable
+ is always local in all buffers.
+
+\1f
File: lispref.info, Node: Files and MS-DOS, Prev: Format Conversion, Up: Files
Files and MS-DOS
(*note Backup Names::) is responsible for determining which backup
versions to delete, but does not delete them itself.
- - User Option: trim-versions-without-asking
+ - User Option: delete-old-versions
If this variable is non-`nil', then saving a file deletes excess
backup versions silently. Otherwise, it asks the user whether to
delete them.
- Function: bufferp object
This function returns `t' if OBJECT is a buffer, `nil' otherwise.
-\1f
-File: lispref.info, Node: Current Buffer, Next: Buffer Names, Prev: Buffer Basics, Up: Buffers
-
-The Current Buffer
-==================
-
- There are, in general, many buffers in an Emacs session. At any
-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
-temporarily in order to operate on its contents, without changing what
-is displayed on the screen.
-
- The way to designate a current buffer in a Lisp program is by calling
-`set-buffer'. The specified buffer remains current until a new one is
-designated.
-
- When an editing command returns to the editor command loop, the
-command loop designates the buffer displayed in the selected window as
-current, to prevent confusion: the buffer that the cursor is in when
-Emacs reads a command is the buffer that the command will apply to.
-(*Note Command Loop::.) Therefore, `set-buffer' is not the way to
-switch visibly to a different buffer so that the user can edit it. For
-this, you must use the functions described in *Note Displaying
-Buffers::.
-
- However, Lisp functions that change to a different current buffer
-should not depend on the command loop to set it back afterwards.
-Editing commands written in XEmacs Lisp can be called from other
-programs as well as from the command loop. It is convenient for the
-caller if the subroutine does not change which buffer is current
-(unless, of course, that is the subroutine's purpose). Therefore, you
-should normally use `set-buffer' within a `save-excursion' that will
-restore the current buffer when your function is done (*note
-Excursions::). Here is an example, the code for the command
-`append-to-buffer' (with the documentation string abridged):
-
- (defun append-to-buffer (buffer start end)
- "Append to specified buffer the text of the region.
- ..."
- (interactive "BAppend to buffer: \nr")
- (let ((oldbuf (current-buffer)))
- (save-excursion
- (set-buffer (get-buffer-create buffer))
- (insert-buffer-substring oldbuf start end))))
-
-This function binds a local variable to the current buffer, and then
-`save-excursion' records the values of point, the mark, and the
-original buffer. Next, `set-buffer' makes another buffer current.
-Finally, `insert-buffer-substring' copies the string from the original
-current buffer to the new current buffer.
-
- If the buffer appended to happens to be displayed in some window,
-the next redisplay will show how its text has changed. Otherwise, you
-will not see the change immediately on the screen. The buffer becomes
-current temporarily during the execution of the command, but this does
-not cause it to be displayed.
-
- If you make local bindings (with `let' or function arguments) for a
-variable that may also have buffer-local bindings, make sure that the
-same buffer is current at the beginning and at the end of the local
-binding's scope. Otherwise you might bind it in one buffer and unbind
-it in another! There are two ways to do this. In simple cases, you may
-see that nothing ever changes the current buffer within the scope of the
-binding. Otherwise, use `save-excursion' to make sure that the buffer
-current at the beginning is current again whenever the variable is
-unbound.
-
- It is not reliable to change the current buffer back with
-`set-buffer', because that won't do the job if a quit happens while the
-wrong buffer is current. Here is what _not_ to do:
-
- (let (buffer-read-only
- (obuf (current-buffer)))
- (set-buffer ...)
- ...
- (set-buffer obuf))
-
-Using `save-excursion', as shown below, handles quitting, errors, and
-`throw', as well as ordinary evaluation.
-
- (let (buffer-read-only)
- (save-excursion
- (set-buffer ...)
- ...))
-
- - Function: current-buffer
- This function returns the current buffer.
-
- (current-buffer)
- => #<buffer buffers.texi>
-
- - 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
- Lisp programs can in any case work on it.
-
- This function returns the buffer identified by BUFFER-OR-NAME. An
- error is signaled if BUFFER-OR-NAME does not identify an existing
- buffer.
-
-\1f
-File: lispref.info, Node: Buffer Names, Next: Buffer File Name, Prev: Current Buffer, Up: Buffers
-
-Buffer Names
-============
-
- Each buffer has a unique name, which is a string. Many of the
-functions that work on buffers accept either a buffer or a buffer name
-as an argument. Any argument called BUFFER-OR-NAME is of this sort,
-and an error is signaled if it is neither a string nor a buffer. Any
-argument called BUFFER must be an actual buffer object, not a name.
-
- Buffers that are ephemeral and generally uninteresting to the user
-have names starting with a space, so that the `list-buffers' and
-`buffer-menu' commands don't mention them. A name starting with space
-also initially disables recording undo information; see *Note Undo::.
-
- - Function: buffer-name &optional buffer
- This function returns the name of BUFFER as a string. If BUFFER
- is not supplied, it defaults to the current buffer.
-
- If `buffer-name' returns `nil', it means that BUFFER has been
- killed. *Note Killing Buffers::.
-
- (buffer-name)
- => "buffers.texi"
-
- (setq foo (get-buffer "temp"))
- => #<buffer temp>
- (kill-buffer foo)
- => nil
- (buffer-name foo)
- => nil
- foo
- => #<killed buffer>
-
- - 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'.
-
- Ordinarily, `rename-buffer' signals an error if NEWNAME is already
- in use. However, if UNIQUE is non-`nil', it modifies NEWNAME to
- make a name that is not in use. Interactively, you can make
- UNIQUE non-`nil' with a numeric prefix argument.
-
- One application of this command is to rename the `*shell*' buffer
- to some other name, thus making it possible to create a second
- shell buffer under the name `*shell*'.
-
- - 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
- as given. (That is not very useful, so the argument is usually a
- name.) For example:
-
- (setq b (get-buffer "lewis"))
- => #<buffer lewis>
- (get-buffer b)
- => #<buffer lewis>
- (get-buffer "Frazzle-nots")
- => nil
-
- See also the function `get-buffer-create' in *Note Creating
- Buffers::.
-
- - 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
- buffer by appending a number inside of `<...>'.
-
- If IGNORE is given, it specifies a name that is okay to use (if it
- is in the sequence to be tried), even if a buffer with that name
- exists.
-
- See the related function `generate-new-buffer' in *Note Creating
- Buffers::.
-
-\1f
-File: lispref.info, Node: Buffer File Name, Next: Buffer Modification, Prev: Buffer Names, Up: Buffers
-
-Buffer File Name
-================
-
- The "buffer file name" is the name of the file that is visited in
-that buffer. When a buffer is not visiting a file, its buffer file name
-is `nil'. Most of the time, the buffer name is the same as the
-nondirectory part of the buffer file name, but the buffer file name and
-the buffer name are distinct and can be set independently. *Note
-Visiting Files::.
-
- - Function: buffer-file-name &optional buffer
- 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
- defaults to the current buffer.
-
- (buffer-file-name (other-buffer))
- => "/usr/user/lewis/manual/files.texi"
-
- - Variable: buffer-file-name
- This buffer-local variable contains the name of the file being
- visited in the current buffer, or `nil' if it is not visiting a
- file. It is a permanent local, unaffected by
- `kill-local-variables'.
-
- buffer-file-name
- => "/usr/user/lewis/manual/buffers.texi"
-
- It is risky to change this variable's value without doing various
- other things. See the definition of `set-visited-file-name' in
- `files.el'; some of the things done there, such as changing the
- buffer name, are not strictly necessary, but others are essential
- to avoid confusing XEmacs.
-
- - Variable: buffer-file-truename
- This buffer-local variable holds the truename of the file visited
- in the current buffer, or `nil' if no file is visited. It is a
- permanent local, unaffected by `kill-local-variables'. *Note
- Truenames::.
-
- - Variable: buffer-file-number
- This buffer-local variable holds the file number and directory
- device number of the file visited in the current buffer, or `nil'
- if no file or a nonexistent file is visited. It is a permanent
- local, unaffected by `kill-local-variables'. *Note Truenames::.
-
- The value is normally a list of the form `(FILENUM DEVNUM)'. This
- pair of numbers uniquely identifies the file among all files
- accessible on the system. See the function `file-attributes', in
- *Note File Attributes::, for more information about them.
-
- - 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
- compared against the visited file names of all live buffers.
-
- (get-file-buffer "buffers.texi")
- => #<buffer buffers.texi>
-
- In unusual circumstances, there can be more than one buffer
- 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
- 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
- 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
- the former visited file.
-
- If FILENAME is `nil' or the empty string, that stands for "no
- visited file". In this case, `set-visited-file-name' marks the
- buffer as having no visited file.
-
- When the function `set-visited-file-name' is called interactively,
- it prompts for FILENAME in the minibuffer.
-
- See also `clear-visited-file-modtime' and
- `verify-visited-file-modtime' in *Note Buffer Modification::.
-
- - Variable: list-buffers-directory
- This buffer-local variable records a string to display in a buffer
- listing in place of the visited file name, for buffers that don't
- have a visited file name. Dired buffers use this variable.
-
-\1f
-File: lispref.info, Node: Buffer Modification, Next: Modification Time, Prev: Buffer File Name, Up: Buffers
-
-Buffer Modification
-===================
-
- XEmacs keeps a flag called the "modified flag" for each buffer, to
-record whether you have changed the text of the buffer. This flag is
-set to `t' whenever you alter the contents of the buffer, and cleared
-to `nil' when you save it. Thus, the flag shows whether there are
-unsaved changes. The flag value is normally shown in the modeline
-(*note Modeline Variables::), and controls saving (*note Saving
-Buffers::) and auto-saving (*note Auto-Saving::).
-
- Some Lisp programs set the flag explicitly. For example, the
-function `set-visited-file-name' sets the flag to `t', because the text
-does not match the newly-visited file, even if it is unchanged from the
-file formerly visited.
-
- The functions that modify the contents of buffers are described in
-*Note Text::.
-
- - 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
- This function marks the current buffer as modified if FLAG is
- non-`nil', or as unmodified if the flag is `nil'.
-
- Another effect of calling this function is to cause unconditional
- redisplay of the modeline for the current buffer. In fact, the
- function `redraw-modeline' works by doing this:
-
- (set-buffer-modified-p (buffer-modified-p))
-
- - 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
- 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.
-
-\1f
-File: lispref.info, Node: Modification Time, Next: Read Only Buffers, Prev: Buffer Modification, Up: Buffers
-
-Comparison of Modification Time
-===============================
-
- Suppose that you visit a file and make changes in its buffer, and
-meanwhile the file itself is changed on disk. At this point, saving the
-buffer would overwrite the changes in the file. Occasionally this may
-be what you want, but usually it would lose valuable information.
-XEmacs therefore checks the file's modification time using the functions
-described below before saving the file.
-
- - Function: verify-visited-file-modtime buffer
- 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.
- The two should be the same unless some other process has written
- the file since XEmacs visited or saved it.
-
- The function returns `t' if the last actual modification time and
- XEmacs's recorded modification time are the same, `nil' otherwise.
-
- - Function: clear-visited-file-modtime
- This function clears out the record of the last modification time
- of the file being visited by the current buffer. As a result, the
- next attempt to save this buffer will not complain of a
- discrepancy in file modification times.
-
- This function is called in `set-visited-file-name' and other
- exceptional places where the usual test to avoid overwriting a
- changed file should not be done.
-
- - Function: visited-file-modtime
- This function returns the buffer's recorded last file modification
- time, as a list of the form `(HIGH . LOW)'. (This is the same
- format that `file-attributes' uses to return time values; see
- *Note File Attributes::.)
-
- - 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
- visited file.
-
- If TIME is not `nil', it should have the form `(HIGH . LOW)' or
- `(HIGH LOW)', in either case containing two integers, each of
- which holds 16 bits of the time.
-
- This function is useful if the buffer was not read from the file
- normally, or if the file itself has been changed for some known
- benign reason.
-
- - 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
- file on disk is newer than the last save-time of the buffer. This
- means some other program has probably altered the file.
-
- Depending on the user's answer, the function may return normally,
- in which case the modification of the buffer proceeds, or it may
- signal a `file-supersession' error with data `(FILENAME)', in which
- case the proposed buffer modification is not allowed.
-
- This function is called automatically by XEmacs on the proper
- occasions. It exists so you can customize XEmacs by redefining it.
- See the file `userlock.el' for the standard definition.
-
- See also the file locking mechanism in *Note File Locks::.
-
-\1f
-File: lispref.info, Node: Read Only Buffers, Next: The Buffer List, Prev: Modification Time, Up: Buffers
-
-Read-Only Buffers
-=================
-
- If a buffer is "read-only", then you cannot change its contents,
-although you may change your view of the contents by scrolling and
-narrowing.
-
- Read-only buffers are used in two kinds of situations:
-
- * A buffer visiting a write-protected file is normally read-only.
-
- Here, the purpose is to show the user that editing the buffer with
- the aim of saving it in the file may be futile or undesirable.
- The user who wants to change the buffer text despite this can do
- so after clearing the read-only flag with `C-x C-q'.
-
- * Modes such as Dired and Rmail make buffers read-only when altering
- the contents with the usual editing commands is probably a mistake.
-
- The special commands of these modes bind `buffer-read-only' to
- `nil' (with `let') or bind `inhibit-read-only' to `t' around the
- places where they change the text.
-
- - Variable: buffer-read-only
- This buffer-local variable specifies whether the buffer is
- read-only. The buffer is read-only if this variable is non-`nil'.
-
- - Variable: inhibit-read-only
- If this variable is non-`nil', then read-only buffers and read-only
- characters may be modified. Read-only characters in a buffer are
- those that have non-`nil' `read-only' properties (either text
- properties or extent properties). *Note Extent Properties::, for
- more information about text properties and extent properties.
-
- If `inhibit-read-only' is `t', all `read-only' character
- properties have no effect. If `inhibit-read-only' is a list, then
- `read-only' character properties have no effect if they are members
- of the list (comparison is done with `eq').
-
- - Command: toggle-read-only
- This command changes whether the current buffer is read-only. It
- is intended for interactive use; don't use it in programs. At any
- given point in a program, you should know whether you want the
- read-only flag on or off; so you can set `buffer-read-only'
- explicitly to the proper value, `t' or `nil'.
-
- - Function: barf-if-buffer-read-only
- This function signals a `buffer-read-only' error if the current
- buffer is read-only. *Note Interactive Call::, for another way to
- signal an error if the current buffer is read-only.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Current Buffer, Next: Buffer Names, Prev: Buffer Basics, Up: Buffers
+
+The Current Buffer
+==================
+
+ There are, in general, many buffers in an Emacs session. At any
+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
+temporarily in order to operate on its contents, without changing what
+is displayed on the screen.
+
+ The way to designate a current buffer in a Lisp program is by calling
+`set-buffer'. The specified buffer remains current until a new one is
+designated.
+
+ When an editing command returns to the editor command loop, the
+command loop designates the buffer displayed in the selected window as
+current, to prevent confusion: the buffer that the cursor is in when
+Emacs reads a command is the buffer that the command will apply to.
+(*Note Command Loop::.) Therefore, `set-buffer' is not the way to
+switch visibly to a different buffer so that the user can edit it. For
+this, you must use the functions described in *Note Displaying
+Buffers::.
+
+ However, Lisp functions that change to a different current buffer
+should not depend on the command loop to set it back afterwards.
+Editing commands written in XEmacs Lisp can be called from other
+programs as well as from the command loop. It is convenient for the
+caller if the subroutine does not change which buffer is current
+(unless, of course, that is the subroutine's purpose). Therefore, you
+should normally use `set-buffer' within a `save-excursion' that will
+restore the current buffer when your function is done (*note
+Excursions::). Here is an example, the code for the command
+`append-to-buffer' (with the documentation string abridged):
+
+ (defun append-to-buffer (buffer start end)
+ "Append to specified buffer the text of the region.
+ ..."
+ (interactive "BAppend to buffer: \nr")
+ (let ((oldbuf (current-buffer)))
+ (save-excursion
+ (set-buffer (get-buffer-create buffer))
+ (insert-buffer-substring oldbuf start end))))
+
+This function binds a local variable to the current buffer, and then
+`save-excursion' records the values of point, the mark, and the
+original buffer. Next, `set-buffer' makes another buffer current.
+Finally, `insert-buffer-substring' copies the string from the original
+current buffer to the new current buffer.
+
+ If the buffer appended to happens to be displayed in some window,
+the next redisplay will show how its text has changed. Otherwise, you
+will not see the change immediately on the screen. The buffer becomes
+current temporarily during the execution of the command, but this does
+not cause it to be displayed.
+
+ If you make local bindings (with `let' or function arguments) for a
+variable that may also have buffer-local bindings, make sure that the
+same buffer is current at the beginning and at the end of the local
+binding's scope. Otherwise you might bind it in one buffer and unbind
+it in another! There are two ways to do this. In simple cases, you may
+see that nothing ever changes the current buffer within the scope of the
+binding. Otherwise, use `save-excursion' to make sure that the buffer
+current at the beginning is current again whenever the variable is
+unbound.
+
+ It is not reliable to change the current buffer back with
+`set-buffer', because that won't do the job if a quit happens while the
+wrong buffer is current. Here is what _not_ to do:
+
+ (let (buffer-read-only
+ (obuf (current-buffer)))
+ (set-buffer ...)
+ ...
+ (set-buffer obuf))
+
+Using `save-excursion', as shown below, handles quitting, errors, and
+`throw', as well as ordinary evaluation.
+
+ (let (buffer-read-only)
+ (save-excursion
+ (set-buffer ...)
+ ...))
+
+ - Function: current-buffer
+ This function returns the current buffer.
+
+ (current-buffer)
+ => #<buffer buffers.texi>
+
+ - 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
+ Lisp programs can in any case work on it.
+
+ This function returns the buffer identified by BUFFER-OR-NAME. An
+ error is signaled if BUFFER-OR-NAME does not identify an existing
+ buffer.
+
+\1f
+File: lispref.info, Node: Buffer Names, Next: Buffer File Name, Prev: Current Buffer, Up: Buffers
+
+Buffer Names
+============
+
+ Each buffer has a unique name, which is a string. Many of the
+functions that work on buffers accept either a buffer or a buffer name
+as an argument. Any argument called BUFFER-OR-NAME is of this sort,
+and an error is signaled if it is neither a string nor a buffer. Any
+argument called BUFFER must be an actual buffer object, not a name.
+
+ Buffers that are ephemeral and generally uninteresting to the user
+have names starting with a space, so that the `list-buffers' and
+`buffer-menu' commands don't mention them. A name starting with space
+also initially disables recording undo information; see *Note Undo::.
+
+ - Function: buffer-name &optional buffer
+ This function returns the name of BUFFER as a string. If BUFFER
+ is not supplied, it defaults to the current buffer.
+
+ If `buffer-name' returns `nil', it means that BUFFER has been
+ killed. *Note Killing Buffers::.
+
+ (buffer-name)
+ => "buffers.texi"
+
+ (setq foo (get-buffer "temp"))
+ => #<buffer temp>
+ (kill-buffer foo)
+ => nil
+ (buffer-name foo)
+ => nil
+ foo
+ => #<killed buffer>
+
+ - 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'.
+
+ Ordinarily, `rename-buffer' signals an error if NEWNAME is already
+ in use. However, if UNIQUE is non-`nil', it modifies NEWNAME to
+ make a name that is not in use. Interactively, you can make
+ UNIQUE non-`nil' with a numeric prefix argument.
+
+ One application of this command is to rename the `*shell*' buffer
+ to some other name, thus making it possible to create a second
+ shell buffer under the name `*shell*'.
+
+ - 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
+ as given. (That is not very useful, so the argument is usually a
+ name.) For example:
+
+ (setq b (get-buffer "lewis"))
+ => #<buffer lewis>
+ (get-buffer b)
+ => #<buffer lewis>
+ (get-buffer "Frazzle-nots")
+ => nil
+
+ See also the function `get-buffer-create' in *Note Creating
+ Buffers::.
+
+ - 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
+ buffer by appending a number inside of `<...>'.
+
+ If IGNORE is given, it specifies a name that is okay to use (if it
+ is in the sequence to be tried), even if a buffer with that name
+ exists.
+
+ See the related function `generate-new-buffer' in *Note Creating
+ Buffers::.
+
+\1f
+File: lispref.info, Node: Buffer File Name, Next: Buffer Modification, Prev: Buffer Names, Up: Buffers
+
+Buffer File Name
+================
+
+ The "buffer file name" is the name of the file that is visited in
+that buffer. When a buffer is not visiting a file, its buffer file name
+is `nil'. Most of the time, the buffer name is the same as the
+nondirectory part of the buffer file name, but the buffer file name and
+the buffer name are distinct and can be set independently. *Note
+Visiting Files::.
+
+ - Function: buffer-file-name &optional buffer
+ 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
+ defaults to the current buffer.
+
+ (buffer-file-name (other-buffer))
+ => "/usr/user/lewis/manual/files.texi"
+
+ - Variable: buffer-file-name
+ This buffer-local variable contains the name of the file being
+ visited in the current buffer, or `nil' if it is not visiting a
+ file. It is a permanent local, unaffected by
+ `kill-local-variables'.
+
+ buffer-file-name
+ => "/usr/user/lewis/manual/buffers.texi"
+
+ It is risky to change this variable's value without doing various
+ other things. See the definition of `set-visited-file-name' in
+ `files.el'; some of the things done there, such as changing the
+ buffer name, are not strictly necessary, but others are essential
+ to avoid confusing XEmacs.
+
+ - Variable: buffer-file-truename
+ This buffer-local variable holds the truename of the file visited
+ in the current buffer, or `nil' if no file is visited. It is a
+ permanent local, unaffected by `kill-local-variables'. *Note
+ Truenames::.
+
+ - Variable: buffer-file-number
+ This buffer-local variable holds the file number and directory
+ device number of the file visited in the current buffer, or `nil'
+ if no file or a nonexistent file is visited. It is a permanent
+ local, unaffected by `kill-local-variables'. *Note Truenames::.
+
+ The value is normally a list of the form `(FILENUM DEVNUM)'. This
+ pair of numbers uniquely identifies the file among all files
+ accessible on the system. See the function `file-attributes', in
+ *Note File Attributes::, for more information about them.
+
+ - 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
+ compared against the visited file names of all live buffers.
+
+ (get-file-buffer "buffers.texi")
+ => #<buffer buffers.texi>
+
+ In unusual circumstances, there can be more than one buffer
+ 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
+ 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
+ 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
+ the former visited file.
+
+ If FILENAME is `nil' or the empty string, that stands for "no
+ visited file". In this case, `set-visited-file-name' marks the
+ buffer as having no visited file.
+
+ When the function `set-visited-file-name' is called interactively,
+ it prompts for FILENAME in the minibuffer.
+
+ See also `clear-visited-file-modtime' and
+ `verify-visited-file-modtime' in *Note Buffer Modification::.
+
+ - Variable: list-buffers-directory
+ This buffer-local variable records a string to display in a buffer
+ listing in place of the visited file name, for buffers that don't
+ have a visited file name. Dired buffers use this variable.
+
+\1f
+File: lispref.info, Node: Buffer Modification, Next: Modification Time, Prev: Buffer File Name, Up: Buffers
+
+Buffer Modification
+===================
+
+ XEmacs keeps a flag called the "modified flag" for each buffer, to
+record whether you have changed the text of the buffer. This flag is
+set to `t' whenever you alter the contents of the buffer, and cleared
+to `nil' when you save it. Thus, the flag shows whether there are
+unsaved changes. The flag value is normally shown in the modeline
+(*note Modeline Variables::), and controls saving (*note Saving
+Buffers::) and auto-saving (*note Auto-Saving::).
+
+ Some Lisp programs set the flag explicitly. For example, the
+function `set-visited-file-name' sets the flag to `t', because the text
+does not match the newly-visited file, even if it is unchanged from the
+file formerly visited.
+
+ The functions that modify the contents of buffers are described in
+*Note Text::.
+
+ - 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
+ This function marks the current buffer as modified if FLAG is
+ non-`nil', or as unmodified if the flag is `nil'.
+
+ Another effect of calling this function is to cause unconditional
+ redisplay of the modeline for the current buffer. In fact, the
+ function `redraw-modeline' works by doing this:
+
+ (set-buffer-modified-p (buffer-modified-p))
+
+ - 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
+ 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.
+
+\1f
+File: lispref.info, Node: Modification Time, Next: Read Only Buffers, Prev: Buffer Modification, Up: Buffers
+
+Comparison of Modification Time
+===============================
+
+ Suppose that you visit a file and make changes in its buffer, and
+meanwhile the file itself is changed on disk. At this point, saving the
+buffer would overwrite the changes in the file. Occasionally this may
+be what you want, but usually it would lose valuable information.
+XEmacs therefore checks the file's modification time using the functions
+described below before saving the file.
+
+ - Function: verify-visited-file-modtime buffer
+ 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.
+ The two should be the same unless some other process has written
+ the file since XEmacs visited or saved it.
+
+ The function returns `t' if the last actual modification time and
+ XEmacs's recorded modification time are the same, `nil' otherwise.
+
+ - Function: clear-visited-file-modtime
+ This function clears out the record of the last modification time
+ of the file being visited by the current buffer. As a result, the
+ next attempt to save this buffer will not complain of a
+ discrepancy in file modification times.
+
+ This function is called in `set-visited-file-name' and other
+ exceptional places where the usual test to avoid overwriting a
+ changed file should not be done.
+
+ - Function: visited-file-modtime
+ This function returns the buffer's recorded last file modification
+ time, as a list of the form `(HIGH . LOW)'. (This is the same
+ format that `file-attributes' uses to return time values; see
+ *Note File Attributes::.)
+
+ - 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
+ visited file.
+
+ If TIME is not `nil', it should have the form `(HIGH . LOW)' or
+ `(HIGH LOW)', in either case containing two integers, each of
+ which holds 16 bits of the time.
+
+ This function is useful if the buffer was not read from the file
+ normally, or if the file itself has been changed for some known
+ benign reason.
+
+ - 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
+ file on disk is newer than the last save-time of the buffer. This
+ means some other program has probably altered the file.
+
+ Depending on the user's answer, the function may return normally,
+ in which case the modification of the buffer proceeds, or it may
+ signal a `file-supersession' error with data `(FILENAME)', in which
+ case the proposed buffer modification is not allowed.
+
+ This function is called automatically by XEmacs on the proper
+ occasions. It exists so you can customize XEmacs by redefining it.
+ See the file `userlock.el' for the standard definition.
+
+ See also the file locking mechanism in *Note File Locks::.
+
+\1f
+File: lispref.info, Node: Read Only Buffers, Next: The Buffer List, Prev: Modification Time, Up: Buffers
+
+Read-Only Buffers
+=================
+
+ If a buffer is "read-only", then you cannot change its contents,
+although you may change your view of the contents by scrolling and
+narrowing.
+
+ Read-only buffers are used in two kinds of situations:
+
+ * A buffer visiting a write-protected file is normally read-only.
+
+ Here, the purpose is to show the user that editing the buffer with
+ the aim of saving it in the file may be futile or undesirable.
+ The user who wants to change the buffer text despite this can do
+ so after clearing the read-only flag with `C-x C-q'.
+
+ * Modes such as Dired and Rmail make buffers read-only when altering
+ the contents with the usual editing commands is probably a mistake.
+
+ The special commands of these modes bind `buffer-read-only' to
+ `nil' (with `let') or bind `inhibit-read-only' to `t' around the
+ places where they change the text.
+
+ - Variable: buffer-read-only
+ This buffer-local variable specifies whether the buffer is
+ read-only. The buffer is read-only if this variable is non-`nil'.
+
+ - Variable: inhibit-read-only
+ If this variable is non-`nil', then read-only buffers and read-only
+ characters may be modified. Read-only characters in a buffer are
+ those that have non-`nil' `read-only' properties (either text
+ properties or extent properties). *Note Extent Properties::, for
+ more information about text properties and extent properties.
+
+ If `inhibit-read-only' is `t', all `read-only' character
+ properties have no effect. If `inhibit-read-only' is a list, then
+ `read-only' character properties have no effect if they are members
+ of the list (comparison is done with `eq').
+
+ - Command: toggle-read-only
+ This command changes whether the current buffer is read-only. It
+ is intended for interactive use; don't use it in programs. At any
+ given point in a program, you should know whether you want the
+ read-only flag on or off; so you can set `buffer-read-only'
+ explicitly to the proper value, `t' or `nil'.
+
+ - Function: barf-if-buffer-read-only
+ This function signals a `buffer-read-only' error if the current
+ buffer is read-only. *Note Interactive Call::, for another way to
+ signal an error if the current buffer is read-only.
+
+\1f
File: lispref.info, Node: The Buffer List, Next: Creating Buffers, Prev: Read Only Buffers, Up: Buffers
The Buffer List
This function always returns `nil'.
-\1f
-File: lispref.info, Node: Selecting Windows, Next: Cyclic Window Ordering, Prev: Deleting Windows, Up: Windows
-
-Selecting Windows
-=================
-
- When a window is selected, the buffer in the window becomes the
-current buffer, and the cursor will appear in it.
-
- - Function: selected-window &optional device
- 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
- remembered as focus changes from device to device. Optional
- argument DEVICE specifies which device to return the selected
- window for, and defaults to the selected device.
-
- - 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.
-
- If optional argument NORECORD is non-`nil' then the global and
- per-frame buffer orderings are not modified, as by the function
- `record-buffer'.
-
- The return value is WINDOW.
-
- (setq w (next-window))
- (select-window w)
- => #<window 65 on windows.texi>
-
- - 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
- of windows; therefore, if the FORMS change them, the changes are
- permanent.
-
- The following functions choose one of the windows on the screen,
-offering various criteria for the choice.
-
- - 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.
-
- The selected window can be the least recently used window if it is
- the only window. A newly created window becomes the least
- recently used window until it is selected. A minibuffer window is
- never a candidate.
-
- The argument FRAME controls which windows are considered.
-
- * If it is `nil', consider windows on the selected frame.
-
- * If it is `t', consider windows on all frames.
-
- * If it is `visible', consider windows on all visible frames.
-
- * If it is 0, consider windows on all visible or iconified
- frames.
-
- * If it is a frame, consider windows on that 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
- candidate.
-
- If there are two windows of the same size, then the function
- returns the window that is first in the cyclic ordering of windows
- (see following section), starting from the selected window.
-
- The argument FRAME controls which set of windows are considered.
- See `get-lru-window', above.
-
-\1f
-File: lispref.info, Node: Cyclic Window Ordering, Next: Buffers and Windows, Prev: Selecting Windows, Up: Windows
-
-Cyclic Ordering of Windows
-==========================
-
- When you use the command `C-x o' (`other-window') to select the next
-window, it moves through all the windows on the screen in a specific
-cyclic order. For any given configuration of windows, this order never
-varies. It is called the "cyclic ordering of windows".
-
- This ordering generally goes from top to bottom, and from left to
-right. But it may go down first or go right first, depending on the
-order in which the windows were split.
-
- If the first split was vertical (into windows one above each other),
-and then the subwindows were split horizontally, then the ordering is
-left to right in the top of the frame, and then left to right in the
-next lower part of the frame, and so on. If the first split was
-horizontal, the ordering is top to bottom in the left part, and so on.
-In general, within each set of siblings at any level in the window tree,
-the order is left to right, or top to bottom.
-
- - Function: next-window &optional window minibuf all-frames
- 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
- visible, then this function returns WINDOW. If omitted, WINDOW
- defaults to the selected window.
-
- The value of the argument MINIBUF determines whether the
- minibuffer is included in the window order. Normally, when
- MINIBUF is `nil', the minibuffer is included if it is currently
- active; this is the behavior of `C-x o'. (The minibuffer window
- is active while the minibuffer is in use. *Note Minibuffers::.)
-
- If MINIBUF is `t', then the cyclic ordering includes the
- minibuffer window even if it is not active.
-
- If MINIBUF is neither `t' nor `nil', then the minibuffer window is
- not included even if it is active.
-
- The argument ALL-FRAMES specifies which frames to consider. Here
- are the possible values and their meanings:
-
- `nil'
- Consider all the windows in WINDOW's frame, plus the
- minibuffer used by that frame even if it lies in some other
- frame.
-
- `t'
- Consider all windows in all existing frames.
-
- `visible'
- Consider all windows in all visible frames. (To get useful
- results, you must ensure WINDOW is in a visible frame.)
-
- 0
- Consider all windows in all visible or iconified frames.
-
- anything else
- Consider precisely the windows in WINDOW's frame, and no
- others.
-
- This example assumes there are two windows, both displaying the
- buffer `windows.texi':
-
- (selected-window)
- => #<window 56 on windows.texi>
- (next-window (selected-window))
- => #<window 52 on windows.texi>
- (next-window (next-window (selected-window)))
- => #<window 56 on windows.texi>
-
- - 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
- 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'.
-
- In an interactive call, COUNT is the numeric prefix argument.
-
- The argument FRAME controls which set of windows are considered.
- * If it is `nil' or omitted, then windows on the selected frame
- are considered.
-
- * If it is a frame, then windows on that frame are considered.
-
- * If it is `t', then windows on all frames that currently exist
- (including invisible and iconified frames) are considered.
-
- * If it is the symbol `visible', then windows on all visible
- frames are considered.
-
- * If it is the number 0, then windows on all visible and
- iconified frames are considered.
-
- * If it is any other value, then the behavior is undefined.
-
- - 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.
-
- The optional arguments MINIBUF and ALL-FRAMES specify the set of
- windows to include in the scan. See `next-window', above, for
- details.
-
-\1f
-File: lispref.info, Node: Buffers and Windows, Next: Displaying Buffers, Prev: Cyclic Window Ordering, Up: Windows
-
-Buffers and Windows
-===================
-
- This section describes low-level functions to examine windows or to
-display buffers in windows in a precisely controlled fashion. *Note
-Displaying Buffers::, for related functions that find a window to use
-and specify a buffer for it. The functions described there are easier
-to use than these, but they employ heuristics in choosing or creating a
-window; use these functions when you need complete control.
-
- - Function: set-window-buffer window buffer-or-name
- 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
- 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
- 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
- cyclic ordering of windows, starting from the selected window.
- *Note Cyclic Window Ordering::.
-
- The argument ALL-FRAMES controls which windows to consider.
-
- * If it is `nil', consider windows on the selected frame.
-
- * If it is `t', consider windows on all frames.
-
- * If it is `visible', consider windows on all visible frames.
-
- * If it is 0, consider windows on all visible or iconified
- frames.
-
- * If it is a frame, consider windows on that frame.
-
-\1f
-File: lispref.info, Node: Displaying Buffers, Next: Choosing Window, Prev: Buffers and Windows, Up: Windows
-
-Displaying Buffers in Windows
-=============================
-
- In this section we describe convenient functions that choose a window
-automatically and use it to display a specified buffer. These functions
-can also split an existing window in certain circumstances. We also
-describe variables that parameterize the heuristics used for choosing a
-window. *Note Buffers and Windows::, for low-level functions that give
-you more precise control.
-
- Do not use the functions in this section in order to make a buffer
-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.
-
- - 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
- apply to it. Contrast this with `set-buffer', which makes
- BUFFER-OR-NAME the current buffer but does not display it in the
- selected window. *Note Current Buffer::.
-
- If BUFFER-OR-NAME does not identify an existing buffer, then a new
- buffer by that name is created. The major mode for the new buffer
- is set according to the variable `default-major-mode'. *Note Auto
- Major Mode::.
-
- Normally the specified buffer is put at the front of the buffer
- list. This affects the operation of `other-buffer'. However, if
- NORECORD is non-`nil', this is not done. *Note The Buffer List::.
-
- The `switch-to-buffer' function is often used interactively, as
- 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
- 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
- `switch-to-buffer'.
-
- The currently selected window is absolutely never used to do the
- job. If it is the only window, then it is split to make a
- distinct window for this purpose. If the selected window is
- 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
- 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
- within its frame.
-
- If the variable `pop-up-frames' is non-`nil', `pop-to-buffer'
- looks for a window in any visible frame already displaying the
- buffer; if there is one, it returns that window and makes it be
- selected within its frame. If there is none, it creates a new
- frame and displays the buffer in it.
-
- If `pop-up-frames' is `nil', then `pop-to-buffer' operates
- entirely within the selected frame. (If the selected frame has
- just a minibuffer, `pop-to-buffer' operates within the most
- recently selected frame that was not just a minibuffer.)
-
- If the variable `pop-up-windows' is non-`nil', windows may be
- split to create a new window that is different from the original
- window. For details, see *Note Choosing Window::.
-
- If OTHER-WINDOW is non-`nil', `pop-to-buffer' finds or creates
- another window even if BUFFER-OR-NAME is already visible in the
- selected window. Thus BUFFER-OR-NAME could end up displayed in
- two windows. On the other hand, if BUFFER-OR-NAME is already
- displayed in the selected window and OTHER-WINDOW is `nil', then
- the selected window is considered sufficient display for
- BUFFER-OR-NAME, so that nothing needs to be done.
-
- All the variables that affect `display-buffer' affect
- `pop-to-buffer' as well. *Note Choosing Window::.
-
- If BUFFER-OR-NAME is a string that does not name an existing
- buffer, a buffer by that name is created. The major mode for the
- new buffer is set according to the variable `default-major-mode'.
- *Note Auto Major Mode::.
-
- If ON-FRAME is non-`nil', it is the frame to pop to this buffer on.
-
- An example use of this function is found at the end of *Note
- Filter Functions::.
-
- - 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
- don't care which other buffer is used; you just want to make sure
- that BUFFER is no longer displayed.
-
- This function returns `nil'.
-
-\1f
-File: lispref.info, Node: Choosing Window, Next: Window Point, Prev: Displaying Buffers, Up: Windows
-
-Choosing a Window for Display
-=============================
-
- This section describes the basic facility that chooses a window to
-display a buffer in--`display-buffer'. All the higher-level functions
-and commands use this subroutine. Here we describe how to use
-`display-buffer' and how to customize it.
-
- - Command: display-buffer buffer-or-name &optional not-this-window
- 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
- unaltered by this function.
-
- If NOT-THIS-WINDOW is non-`nil', it means to display the specified
- buffer in a window other than the selected one, even if it is
- already on display in the selected window. This can cause the
- buffer to appear in two windows at once. Otherwise, if
- BUFFER-OR-NAME is already being displayed in any window, that is
- good enough, so this function does nothing.
-
- `display-buffer' returns the window chosen to display
- BUFFER-OR-NAME.
-
- Precisely how `display-buffer' finds or creates a window depends on
- the variables described below.
-
- A window can be marked as "dedicated" to a particular buffer. Then
-XEmacs will not automatically change which buffer appears in the
-window, such as `display-buffer' might normally do.
-
- - Function: window-dedicated-p window
- This function returns WINDOW's dedicated object, usually `t' or
- `nil'.
-
- - 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
- not be dedicated (but doesn't change which buffer appears in it
- currently).
-
- - User Option: pop-up-windows
- This variable controls whether `display-buffer' makes new windows.
- If it is non-`nil' and there is only one window, then that window
- is split. If it is `nil', then `display-buffer' does not split
- the single window, but uses it whole.
-
- - User Option: split-height-threshold
- This variable determines when `display-buffer' may split a window,
- if there are multiple windows. `display-buffer' always splits the
- largest window if it has at least this many lines. If the largest
- window is not this tall, it is split only if it is the sole window
- and `pop-up-windows' is non-`nil'.
-
- - User Option: pop-up-frames
- This variable controls whether `display-buffer' makes new frames.
- If it is non-`nil', `display-buffer' looks for an existing window
- already displaying the desired buffer, on any visible frame. If
- it finds one, it returns that window. Otherwise it makes a new
- frame. The variables `pop-up-windows' and
- `split-height-threshold' do not matter if `pop-up-frames' is
- non-`nil'.
-
- If `pop-up-frames' is `nil', then `display-buffer' either splits a
- window or reuses one.
-
- *Note Frames::, for more information.
-
- - Variable: pop-up-frame-function
- This variable specifies how to make a new frame if `pop-up-frames'
- is non-`nil'.
-
- Its value should be a function of no arguments. When
- `display-buffer' makes a new frame, it does so by calling that
- function, which should return a frame. The default value of the
- variable is a function that creates a frame using properties from
- `pop-up-frame-plist'.
-
- - Variable: pop-up-frame-plist
- This variable holds a plist specifying frame properties used when
- `display-buffer' makes a new frame. *Note Frame Properties::, for
- more information about frame properties.
-
- - Variable: special-display-buffer-names
- A list of buffer names for buffers that should be displayed
- specially. If the buffer's name is in this list, `display-buffer'
- handles the buffer specially.
-
- By default, special display means to give the buffer a dedicated
- frame.
-
- If an element is a list, instead of a string, then the CAR of the
- list is the buffer name, and the rest of the list says how to
- create the frame. There are two possibilities for the rest of the
- list. It can be a plist, specifying frame properties, or it can
- contain a function and arguments to give to it. (The function's
- first argument is always the buffer to be displayed; the arguments
- from the list come after that.)
-
- - Variable: special-display-regexps
- A list of regular expressions that specify buffers that should be
- displayed specially. If the buffer's name matches any of the
- regular expressions in this list, `display-buffer' handles the
- buffer specially.
-
- By default, special display means to give the buffer a dedicated
- frame.
-
- If an element is a list, instead of a string, then the CAR of the
- list is the regular expression, and the rest of the list says how
- to create the frame. See above, under
- `special-display-buffer-names'.
-
- - Variable: special-display-function
- This variable holds the function to call to display a buffer
- specially. It receives the buffer as an argument, and should
- return the window in which it is displayed.
-
- The default value of this variable is
- `special-display-popup-frame'.
-
- - 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
- creates a frame that will be dedicated to BUFFER.
-
- This function uses an existing window displaying BUFFER whether or
- not it is in a frame of its own; but if you set up the above
- variables in your init file, before BUFFER was created, then
- presumably the window was previously made by this function.
-
- - User Option: special-display-frame-plist
- This variable holds frame properties for
- `special-display-popup-frame' to use when it creates a frame.
-
- - Variable: same-window-buffer-names
- A list of buffer names for buffers that should be displayed in the
- selected window. If the buffer's name is in this list,
- `display-buffer' handles the buffer by switching to it in the
- selected window.
-
- - Variable: same-window-regexps
- A list of regular expressions that specify buffers that should be
- displayed in the selected window. If the buffer's name matches
- any of the regular expressions in this list, `display-buffer'
- handles the buffer by switching to it in the selected window.
-
- - Variable: display-buffer-function
- This variable is the most flexible way to customize the behavior of
- `display-buffer'. If it is non-`nil', it should be a function
- that `display-buffer' calls to do the work. The function should
- accept two arguments, the same two arguments that `display-buffer'
- received. It should choose or create a window, display the
- specified buffer, and then return the window.
-
- This hook takes precedence over all the other options and hooks
- described above.
-
- 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
- This function returns `t' if WINDOW is marked as dedicated;
- otherwise `nil'.
-
- - Function: set-window-dedicated-p window flag
- This function marks WINDOW as dedicated if FLAG is non-`nil', and
- nondedicated otherwise.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Selecting Windows, Next: Cyclic Window Ordering, Prev: Deleting Windows, Up: Windows
+
+Selecting Windows
+=================
+
+ When a window is selected, the buffer in the window becomes the
+current buffer, and the cursor will appear in it.
+
+ - Function: selected-window &optional device
+ 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
+ remembered as focus changes from device to device. Optional
+ argument DEVICE specifies which device to return the selected
+ window for, and defaults to the selected device.
+
+ - 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.
+
+ If optional argument NORECORD is non-`nil' then the global and
+ per-frame buffer orderings are not modified, as by the function
+ `record-buffer'.
+
+ The return value is WINDOW.
+
+ (setq w (next-window))
+ (select-window w)
+ => #<window 65 on windows.texi>
+
+ - 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
+ of windows; therefore, if the FORMS change them, the changes are
+ permanent.
+
+ The following functions choose one of the windows on the screen,
+offering various criteria for the choice.
+
+ - 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.
+
+ The selected window can be the least recently used window if it is
+ the only window. A newly created window becomes the least
+ recently used window until it is selected. A minibuffer window is
+ never a candidate.
+
+ The argument FRAME controls which windows are considered.
+
+ * If it is `nil', consider windows on the selected frame.
+
+ * If it is `t', consider windows on all frames.
+
+ * If it is `visible', consider windows on all visible frames.
+
+ * If it is 0, consider windows on all visible or iconified
+ frames.
+
+ * If it is a frame, consider windows on that 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
+ candidate.
+
+ If there are two windows of the same size, then the function
+ returns the window that is first in the cyclic ordering of windows
+ (see following section), starting from the selected window.
+
+ The argument FRAME controls which set of windows are considered.
+ See `get-lru-window', above.
+
+\1f
+File: lispref.info, Node: Cyclic Window Ordering, Next: Buffers and Windows, Prev: Selecting Windows, Up: Windows
+
+Cyclic Ordering of Windows
+==========================
+
+ When you use the command `C-x o' (`other-window') to select the next
+window, it moves through all the windows on the screen in a specific
+cyclic order. For any given configuration of windows, this order never
+varies. It is called the "cyclic ordering of windows".
+
+ This ordering generally goes from top to bottom, and from left to
+right. But it may go down first or go right first, depending on the
+order in which the windows were split.
+
+ If the first split was vertical (into windows one above each other),
+and then the subwindows were split horizontally, then the ordering is
+left to right in the top of the frame, and then left to right in the
+next lower part of the frame, and so on. If the first split was
+horizontal, the ordering is top to bottom in the left part, and so on.
+In general, within each set of siblings at any level in the window tree,
+the order is left to right, or top to bottom.
+
+ - Function: next-window &optional window minibuf all-frames
+ 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
+ visible, then this function returns WINDOW. If omitted, WINDOW
+ defaults to the selected window.
+
+ The value of the argument MINIBUF determines whether the
+ minibuffer is included in the window order. Normally, when
+ MINIBUF is `nil', the minibuffer is included if it is currently
+ active; this is the behavior of `C-x o'. (The minibuffer window
+ is active while the minibuffer is in use. *Note Minibuffers::.)
+
+ If MINIBUF is `t', then the cyclic ordering includes the
+ minibuffer window even if it is not active.
+
+ If MINIBUF is neither `t' nor `nil', then the minibuffer window is
+ not included even if it is active.
+
+ The argument ALL-FRAMES specifies which frames to consider. Here
+ are the possible values and their meanings:
+
+ `nil'
+ Consider all the windows in WINDOW's frame, plus the
+ minibuffer used by that frame even if it lies in some other
+ frame.
+
+ `t'
+ Consider all windows in all existing frames.
+
+ `visible'
+ Consider all windows in all visible frames. (To get useful
+ results, you must ensure WINDOW is in a visible frame.)
+
+ 0
+ Consider all windows in all visible or iconified frames.
+
+ anything else
+ Consider precisely the windows in WINDOW's frame, and no
+ others.
+
+ This example assumes there are two windows, both displaying the
+ buffer `windows.texi':
+
+ (selected-window)
+ => #<window 56 on windows.texi>
+ (next-window (selected-window))
+ => #<window 52 on windows.texi>
+ (next-window (next-window (selected-window)))
+ => #<window 56 on windows.texi>
+
+ - 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
+ 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'.
+
+ In an interactive call, COUNT is the numeric prefix argument.
+
+ The argument FRAME controls which set of windows are considered.
+ * If it is `nil' or omitted, then windows on the selected frame
+ are considered.
+
+ * If it is a frame, then windows on that frame are considered.
+
+ * If it is `t', then windows on all frames that currently exist
+ (including invisible and iconified frames) are considered.
+
+ * If it is the symbol `visible', then windows on all visible
+ frames are considered.
+
+ * If it is the number 0, then windows on all visible and
+ iconified frames are considered.
+
+ * If it is any other value, then the behavior is undefined.
+
+ - 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.
+
+ The optional arguments MINIBUF and ALL-FRAMES specify the set of
+ windows to include in the scan. See `next-window', above, for
+ details.
+
+\1f
+File: lispref.info, Node: Buffers and Windows, Next: Displaying Buffers, Prev: Cyclic Window Ordering, Up: Windows
+
+Buffers and Windows
+===================
+
+ This section describes low-level functions to examine windows or to
+display buffers in windows in a precisely controlled fashion. *Note
+Displaying Buffers::, for related functions that find a window to use
+and specify a buffer for it. The functions described there are easier
+to use than these, but they employ heuristics in choosing or creating a
+window; use these functions when you need complete control.
+
+ - Function: set-window-buffer window buffer-or-name
+ 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
+ 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
+ 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
+ cyclic ordering of windows, starting from the selected window.
+ *Note Cyclic Window Ordering::.
+
+ The argument ALL-FRAMES controls which windows to consider.
+
+ * If it is `nil', consider windows on the selected frame.
+
+ * If it is `t', consider windows on all frames.
+
+ * If it is `visible', consider windows on all visible frames.
+
+ * If it is 0, consider windows on all visible or iconified
+ frames.
+
+ * If it is a frame, consider windows on that frame.
+
+\1f
+File: lispref.info, Node: Displaying Buffers, Next: Choosing Window, Prev: Buffers and Windows, Up: Windows
+
+Displaying Buffers in Windows
+=============================
+
+ In this section we describe convenient functions that choose a window
+automatically and use it to display a specified buffer. These functions
+can also split an existing window in certain circumstances. We also
+describe variables that parameterize the heuristics used for choosing a
+window. *Note Buffers and Windows::, for low-level functions that give
+you more precise control.
+
+ Do not use the functions in this section in order to make a buffer
+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.
+
+ - 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
+ apply to it. Contrast this with `set-buffer', which makes
+ BUFFER-OR-NAME the current buffer but does not display it in the
+ selected window. *Note Current Buffer::.
+
+ If BUFFER-OR-NAME does not identify an existing buffer, then a new
+ buffer by that name is created. The major mode for the new buffer
+ is set according to the variable `default-major-mode'. *Note Auto
+ Major Mode::.
+
+ Normally the specified buffer is put at the front of the buffer
+ list. This affects the operation of `other-buffer'. However, if
+ NORECORD is non-`nil', this is not done. *Note The Buffer List::.
+
+ The `switch-to-buffer' function is often used interactively, as
+ 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
+ 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
+ `switch-to-buffer'.
+
+ The currently selected window is absolutely never used to do the
+ job. If it is the only window, then it is split to make a
+ distinct window for this purpose. If the selected window is
+ 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
+ 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
+ within its frame.
+
+ If the variable `pop-up-frames' is non-`nil', `pop-to-buffer'
+ looks for a window in any visible frame already displaying the
+ buffer; if there is one, it returns that window and makes it be
+ selected within its frame. If there is none, it creates a new
+ frame and displays the buffer in it.
+
+ If `pop-up-frames' is `nil', then `pop-to-buffer' operates
+ entirely within the selected frame. (If the selected frame has
+ just a minibuffer, `pop-to-buffer' operates within the most
+ recently selected frame that was not just a minibuffer.)
+
+ If the variable `pop-up-windows' is non-`nil', windows may be
+ split to create a new window that is different from the original
+ window. For details, see *Note Choosing Window::.
+
+ If OTHER-WINDOW is non-`nil', `pop-to-buffer' finds or creates
+ another window even if BUFFER-OR-NAME is already visible in the
+ selected window. Thus BUFFER-OR-NAME could end up displayed in
+ two windows. On the other hand, if BUFFER-OR-NAME is already
+ displayed in the selected window and OTHER-WINDOW is `nil', then
+ the selected window is considered sufficient display for
+ BUFFER-OR-NAME, so that nothing needs to be done.
+
+ All the variables that affect `display-buffer' affect
+ `pop-to-buffer' as well. *Note Choosing Window::.
+
+ If BUFFER-OR-NAME is a string that does not name an existing
+ buffer, a buffer by that name is created. The major mode for the
+ new buffer is set according to the variable `default-major-mode'.
+ *Note Auto Major Mode::.
+
+ If ON-FRAME is non-`nil', it is the frame to pop to this buffer on.
+
+ An example use of this function is found at the end of *Note
+ Filter Functions::.
+
+ - 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
+ don't care which other buffer is used; you just want to make sure
+ that BUFFER is no longer displayed.
+
+ This function returns `nil'.
+
+\1f
+File: lispref.info, Node: Choosing Window, Next: Window Point, Prev: Displaying Buffers, Up: Windows
+
+Choosing a Window for Display
+=============================
+
+ This section describes the basic facility that chooses a window to
+display a buffer in--`display-buffer'. All the higher-level functions
+and commands use this subroutine. Here we describe how to use
+`display-buffer' and how to customize it.
+
+ - Command: display-buffer buffer-or-name &optional not-this-window
+ 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
+ unaltered by this function.
+
+ If NOT-THIS-WINDOW is non-`nil', it means to display the specified
+ buffer in a window other than the selected one, even if it is
+ already on display in the selected window. This can cause the
+ buffer to appear in two windows at once. Otherwise, if
+ BUFFER-OR-NAME is already being displayed in any window, that is
+ good enough, so this function does nothing.
+
+ `display-buffer' returns the window chosen to display
+ BUFFER-OR-NAME.
+
+ Precisely how `display-buffer' finds or creates a window depends on
+ the variables described below.
+
+ A window can be marked as "dedicated" to a particular buffer. Then
+XEmacs will not automatically change which buffer appears in the
+window, such as `display-buffer' might normally do.
+
+ - Function: window-dedicated-p window
+ This function returns WINDOW's dedicated object, usually `t' or
+ `nil'.
+
+ - 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
+ not be dedicated (but doesn't change which buffer appears in it
+ currently).
+
+ - User Option: pop-up-windows
+ This variable controls whether `display-buffer' makes new windows.
+ If it is non-`nil' and there is only one window, then that window
+ is split. If it is `nil', then `display-buffer' does not split
+ the single window, but uses it whole.
+
+ - User Option: split-height-threshold
+ This variable determines when `display-buffer' may split a window,
+ if there are multiple windows. `display-buffer' always splits the
+ largest window if it has at least this many lines. If the largest
+ window is not this tall, it is split only if it is the sole window
+ and `pop-up-windows' is non-`nil'.
+
+ - User Option: pop-up-frames
+ This variable controls whether `display-buffer' makes new frames.
+ If it is non-`nil', `display-buffer' looks for an existing window
+ already displaying the desired buffer, on any visible frame. If
+ it finds one, it returns that window. Otherwise it makes a new
+ frame. The variables `pop-up-windows' and
+ `split-height-threshold' do not matter if `pop-up-frames' is
+ non-`nil'.
+
+ If `pop-up-frames' is `nil', then `display-buffer' either splits a
+ window or reuses one.
+
+ *Note Frames::, for more information.
+
+ - Variable: pop-up-frame-function
+ This variable specifies how to make a new frame if `pop-up-frames'
+ is non-`nil'.
+
+ Its value should be a function of no arguments. When
+ `display-buffer' makes a new frame, it does so by calling that
+ function, which should return a frame. The default value of the
+ variable is a function that creates a frame using properties from
+ `pop-up-frame-plist'.
+
+ - Variable: pop-up-frame-plist
+ This variable holds a plist specifying frame properties used when
+ `display-buffer' makes a new frame. *Note Frame Properties::, for
+ more information about frame properties.
+
+ - Variable: special-display-buffer-names
+ A list of buffer names for buffers that should be displayed
+ specially. If the buffer's name is in this list, `display-buffer'
+ handles the buffer specially.
+
+ By default, special display means to give the buffer a dedicated
+ frame.
+
+ If an element is a list, instead of a string, then the CAR of the
+ list is the buffer name, and the rest of the list says how to
+ create the frame. There are two possibilities for the rest of the
+ list. It can be a plist, specifying frame properties, or it can
+ contain a function and arguments to give to it. (The function's
+ first argument is always the buffer to be displayed; the arguments
+ from the list come after that.)
+
+ - Variable: special-display-regexps
+ A list of regular expressions that specify buffers that should be
+ displayed specially. If the buffer's name matches any of the
+ regular expressions in this list, `display-buffer' handles the
+ buffer specially.
+
+ By default, special display means to give the buffer a dedicated
+ frame.
+
+ If an element is a list, instead of a string, then the CAR of the
+ list is the regular expression, and the rest of the list says how
+ to create the frame. See above, under
+ `special-display-buffer-names'.
+
+ - Variable: special-display-function
+ This variable holds the function to call to display a buffer
+ specially. It receives the buffer as an argument, and should
+ return the window in which it is displayed.
+
+ The default value of this variable is
+ `special-display-popup-frame'.
+
+ - 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
+ creates a frame that will be dedicated to BUFFER.
+
+ This function uses an existing window displaying BUFFER whether or
+ not it is in a frame of its own; but if you set up the above
+ variables in your init file, before BUFFER was created, then
+ presumably the window was previously made by this function.
+
+ - User Option: special-display-frame-plist
+ This variable holds frame properties for
+ `special-display-popup-frame' to use when it creates a frame.
+
+ - Variable: same-window-buffer-names
+ A list of buffer names for buffers that should be displayed in the
+ selected window. If the buffer's name is in this list,
+ `display-buffer' handles the buffer by switching to it in the
+ selected window.
+
+ - Variable: same-window-regexps
+ A list of regular expressions that specify buffers that should be
+ displayed in the selected window. If the buffer's name matches
+ any of the regular expressions in this list, `display-buffer'
+ handles the buffer by switching to it in the selected window.
+
+ - Variable: display-buffer-function
+ This variable is the most flexible way to customize the behavior of
+ `display-buffer'. If it is non-`nil', it should be a function
+ that `display-buffer' calls to do the work. The function should
+ accept two arguments, the same two arguments that `display-buffer'
+ received. It should choose or create a window, display the
+ specified buffer, and then return the window.
+
+ This hook takes precedence over all the other options and hooks
+ described above.
+
+ 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
+ This function returns `t' if WINDOW is marked as dedicated;
+ otherwise `nil'.
+
+ - Function: set-window-dedicated-p window flag
+ This function marks WINDOW as dedicated if FLAG is non-`nil', and
+ nondedicated otherwise.
+
+\1f
File: lispref.info, Node: Window Point, Next: Window Start, Prev: Choosing Window, Up: Windows
Windows and Point
bottom)', all relative to `(0,0)' at the top left corner of the
window.
-\1f
-File: lispref.info, Node: Resizing Windows, Next: Window Configurations, Prev: Position of Window, Up: Windows
-
-Changing the Size of a Window
-=============================
-
- The window size functions fall into two classes: high-level commands
-that change the size of windows and low-level functions that access
-window size. XEmacs does not permit overlapping windows or gaps between
-windows, so resizing one window affects other windows.
-
- - Command: enlarge-window size &optional horizontal window
- 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
- another. If a window from which lines are stolen shrinks below
- `window-min-height' lines, that window disappears.
-
- If HORIZONTAL is non-`nil', this function makes WINDOW wider by
- SIZE columns, stealing columns instead of lines. If a window from
- which columns are stolen shrinks below `window-min-width' columns,
- that window disappears.
-
- If the requested size would exceed that of the window's frame,
- then the function makes the window occupy the entire height (or
- width) of the frame.
-
- If SIZE is negative, this function shrinks the window by -SIZE
- lines or columns. If that makes the window smaller than the
- minimum size (`window-min-height' and `window-min-width'),
- `enlarge-window' deletes the window.
-
- If WINDOW is non-`nil', it specifies a window to change instead of
- the selected window.
-
- `enlarge-window' returns `nil'.
-
- - 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
- 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
- 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
- `window-min-height' or `window-min-width', then it disappears.
-
- If SIZE is negative, the window is enlarged by -SIZE lines or
- columns.
-
- If WINDOW is non-`nil', it specifies a window to change instead of
- the selected window.
-
- - 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
- 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
- WINDOW specifies the window to change instead of the selected
- window.
-
- The following two variables constrain the window-size-changing
-functions to a minimum height and width.
-
- - User Option: window-min-height
- The value of this variable determines how short a window may become
- before it is automatically deleted. Making a window smaller than
- `window-min-height' automatically deletes it, and no window may be
- created shorter than this. The absolute minimum height is two
- (allowing one line for the mode line, and one line for the buffer
- display). Actions that change window sizes reset this variable to
- two if it is less than two. The default value is 4.
-
- - User Option: window-min-width
- The value of this variable determines how narrow a window may
- become before it automatically deleted. Making a window smaller
- than `window-min-width' automatically deletes it, and no window
- may be created narrower than this. The absolute minimum width is
- one; any value below that is ignored. The default value is 10.
-
- - Variable: window-size-change-functions
- This variable holds a list of functions to be called if the size
- of any window changes for any reason. The functions are called
- just once per redisplay, and just once for each frame on which
- size changes have occurred.
-
- Each function receives the frame as its sole argument. There is no
- direct way to find out which windows changed size, or precisely
- how; however, if your size-change function keeps track, after each
- change, of the windows that interest you, you can figure out what
- has changed by comparing the old size data with the new.
-
- Creating or deleting windows counts as a size change, and therefore
- causes these functions to be called. Changing the frame size also
- counts, because it changes the sizes of the existing windows.
-
- It is not a good idea to use `save-window-excursion' in these
- functions, because that always counts as a size change, and it
- would cause these functions to be called over and over. In most
- cases, `save-selected-window' is what you need here.
-
-\1f
-File: lispref.info, Node: Window Configurations, Prev: Resizing Windows, Up: Windows
-
-Window Configurations
-=====================
-
- A "window configuration" records the entire layout of a frame--all
-windows, their sizes, which buffers they contain, what part of each
-buffer is displayed, and the values of point and the mark. You can
-bring back an entire previous layout by restoring a window
-configuration previously saved.
-
- If you want to record all frames instead of just one, use a frame
-configuration instead of a window configuration. *Note Frame
-Configurations::.
-
- - Function: current-window-configuration
- This function returns a new object representing XEmacs's current
- window configuration, namely the number of windows, their sizes
- and current buffers, which window is the selected window, and for
- each window the displayed buffer, the display-start position, and
- 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
- 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
- `current-window-configuration'.
-
- This function always counts as a window size change and triggers
- execution of the `window-size-change-functions'. (It doesn't know
- how to tell whether the new configuration actually differs from
- the old one.)
-
- Here is a way of using this function to get the same effect as
- `save-window-excursion':
-
- (let ((config (current-window-configuration)))
- (unwind-protect
- (progn (split-window-vertically nil)
- ...)
- (set-window-configuration config)))
-
- - 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
- of the buffer that is visible. It also includes the choice of
- selected window. However, it does not include the value of point
- in the current buffer; use `save-excursion' if you wish to
- preserve that.
-
- Don't use this construct when `save-selected-window' is all you
- need.
-
- Exit from `save-window-excursion' always triggers execution of the
- `window-size-change-functions'. (It doesn't know how to tell
- whether the restored configuration actually differs from the one in
- effect at the end of the FORMS.)
-
- The return value is the value of the final form in FORMS. For
- example:
-
- (split-window)
- => #<window 25 on control.texi>
- (setq w (selected-window))
- => #<window 19 on control.texi>
- (save-window-excursion
- (delete-other-windows w)
- (switch-to-buffer "foo")
- 'do-something)
- => do-something
- ;; The frame is now split again.
-
- - 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,
-but none are implemented. It is not clear they are useful enough to be
-worth implementing.
-
-\1f
-File: lispref.info, Node: Frames, Next: Consoles and Devices, Prev: Windows, Up: Top
-
-Frames
-******
-
- A FRAME is a rectangle on the screen that contains one or more
-XEmacs windows. A frame initially contains a single main window (plus
-perhaps a minibuffer window), which you can subdivide vertically or
-horizontally into smaller windows.
-
- When XEmacs runs on a text-only terminal, it starts with one "TTY
-frame". If you create additional ones, XEmacs displays one and only
-one at any given time--on the terminal screen, of course.
-
- When XEmacs communicates directly with an X server, it does not have
-a TTY frame; instead, it starts with a single "X window frame". It can
-display multiple X window frames at the same time, each in its own X
-window.
-
- - Function: framep object
- This predicate returns `t' if OBJECT is a frame, and `nil'
- otherwise.
-
-* Menu:
-
-* Creating Frames:: Creating additional frames.
-* Frame Properties:: Controlling frame size, position, font, etc.
-* Frame Titles:: Automatic updating of frame titles.
-* Deleting Frames:: Frames last until explicitly deleted.
-* Finding All Frames:: How to examine all existing frames.
-* Frames and Windows:: A frame contains windows;
- display of text always works through windows.
-* Minibuffers and Frames:: How a frame finds the minibuffer to use.
-* Input Focus:: Specifying the selected frame.
-* Visibility of Frames:: Frames may be visible or invisible, or icons.
-* Raising and Lowering:: Raising a frame makes it hide other X windows;
- lowering it makes the others hide them.
-* Frame Configurations:: Saving the state of all frames.
-* Frame Hooks:: Hooks for customizing frame behavior.
-
- *Note Display::, for related information.
-
-\1f
-File: lispref.info, Node: Creating Frames, Next: Frame Properties, Up: Frames
-
-Creating Frames
-===============
-
- To create a new frame, call the function `make-frame'.
-
- - 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.
- *Note Consoles and Devices::.
-
- The argument PROPS is a property list (a list of alternating
- keyword-value specifications) of properties for the new frame. (An
- alist is accepted for backward compatibility but should not be
- passed in.) Any properties not mentioned in PROPS default
- according to the value of the variable `default-frame-plist'. For
- X devices, properties not specified in `default-frame-plist'
- default in turn from `default-x-frame-plist' and, if not specified
- there, from the X resources. For TTY devices,
- `default-tty-frame-plist' is consulted as well as
- `default-frame-plist'.
-
- The set of possible properties depends in principle on what kind of
- window system XEmacs uses to display its frames. *Note X Frame
- Properties::, for documentation of individual properties you can
- specify when creating an X window frame.
-
-\1f
-File: lispref.info, Node: Frame Properties, Next: Frame Titles, Prev: Creating Frames, Up: Frames
-
-Frame Properties
-================
-
- A frame has many properties that control its appearance and behavior.
-Just what properties a frame has depends on which display mechanism it
-uses.
-
- Frame properties exist for the sake of window systems. A terminal
-frame has few properties, mostly for compatibility's sake; only the
-height, width and `buffer-predicate' properties really do something.
-
-* Menu:
-
-* Property Access:: How to change a frame's properties.
-* Initial Properties:: Specifying frame properties when you make a frame.
-* X Frame Properties:: List of frame properties.
-* Size and Position:: Changing the size and position of a frame.
-* Frame Name:: The name of a frame (as opposed to its title).
-
-\1f
-File: lispref.info, Node: Property Access, Next: Initial Properties, Up: Frame Properties
-
-Access to Frame Properties
---------------------------
-
- These functions let you read and change the properties of a 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
- This function returns FRAME's value for the property PROPERTY.
-
- - 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
- This function sets the property PROP of frame FRAME to the value
- VAL.
-
-\1f
-File: lispref.info, Node: Initial Properties, Next: X Frame Properties, Prev: Property Access, Up: Frame Properties
-
-Initial Frame Properties
-------------------------
-
- You can specify the properties for the initial startup frame by
-setting `initial-frame-plist' in your `.emacs' file.
-
- - Variable: initial-frame-plist
- This variable's value is a plist of alternating property-value
- pairs used when creating the initial X window frame.
-
- XEmacs creates the initial frame before it reads your `~/.emacs'
- file. After reading that file, XEmacs checks
- `initial-frame-plist', and applies the property settings in the
- altered value to the already created initial frame.
-
- If these settings affect the frame geometry and appearance, you'll
- see the frame appear with the wrong ones and then change to the
- specified ones. If that bothers you, you can specify the same
- geometry and appearance with X resources; those do take affect
- before the frame is created. *Note X Resources: (xemacs)Resources
- X.
-
- X resource settings typically apply to all frames. If you want to
- specify some X resources solely for the sake of the initial frame,
- and you don't want them to apply to subsequent frames, here's how
- to achieve this: specify properties in `default-frame-plist' to
- override the X resources for subsequent frames; then, to prevent
- these from affecting the initial frame, specify the same
- properties in `initial-frame-plist' with values that match the X
- resources.
-
- If these properties specify a separate minibuffer-only frame via a
-`minibuffer' property of `nil', and you have not yet created one,
-XEmacs creates one for you.
-
- - Variable: minibuffer-frame-plist
- This variable's value is a plist of properties used when creating
- an initial minibuffer-only frame--if such a frame is needed,
- according to the properties for the main initial frame.
-
- - Variable: default-frame-plist
- This is a plist specifying default values of frame properties for
- subsequent XEmacs frames (not the initial ones).
-
- See also `special-display-frame-plist', in *Note Choosing Window::.
-
- If you use options that specify window appearance when you invoke
-XEmacs, they take effect by adding elements to `default-frame-plist'.
-One exception is `-geometry', which adds the specified position to
-`initial-frame-plist' instead. *Note Command Arguments:
-(xemacs)Command Arguments.
-
-\1f
-File: lispref.info, Node: X Frame Properties, Next: Size and Position, Prev: Initial Properties, Up: Frame Properties
-
-X Window Frame Properties
--------------------------
-
- Just what properties a frame has depends on what display mechanism it
-uses. Here is a table of the properties of an X window frame; of these,
-`name', `height', `width', and `buffer-predicate' provide meaningful
-information in non-X frames.
-
-`name'
- The name of the frame. Most window managers display the frame's
- name in the frame's border, at the top of the frame. If you don't
- specify a name, and you have more than one frame, XEmacs sets the
- frame name based on the buffer displayed in the frame's selected
- window.
-
- If you specify the frame name explicitly when you create the
- frame, the name is also used (instead of the name of the XEmacs
- executable) when looking up X resources for the frame.
-
-`display'
- The display on which to open this frame. It should be a string of
- the form `"HOST:DPY.SCREEN"', just like the `DISPLAY' environment
- variable.
-
-`left'
- The screen position of the left edge, in pixels, with respect to
- the left edge of the screen. The value may be a positive number
- POS, or a list of the form `(+ POS)' which permits specifying a
- negative POS value.
-
- A negative number -POS, or a list of the form `(- POS)', actually
- specifies the position of the right edge of the window with
- respect to the right edge of the screen. A positive value of POS
- counts toward the left. If the property is a negative integer
- -POS then POS is positive!
-
-`top'
- The screen position of the top edge, in pixels, with respect to the
- top edge of the screen. The value may be a positive number POS,
- or a list of the form `(+ POS)' which permits specifying a
- negative POS value.
-
- A negative number -POS, or a list of the form `(- POS)', actually
- specifies the position of the bottom edge of the window with
- respect to the bottom edge of the screen. A positive value of POS
- counts toward the top. If the property is a negative integer -POS
- then POS is positive!
-
-`icon-left'
- 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
- pixels, counting from the top edge of the screen. This takes
- effect if and when the frame is iconified.
-
-`user-position'
- Non-`nil' if the screen position of the frame was explicitly
- requested by the user (for example, with the `-geometry' option).
- Nothing automatically makes this property non-`nil'; it is up to
- Lisp programs that call `make-frame' to specify this property as
- well as specifying the `left' and `top' properties.
-
-`height'
- The height of the frame contents, in characters. (To get the
- height in pixels, call `frame-pixel-height'; see *Note Size and
- Position::.)
-
-`width'
- The width of the frame contents, in characters. (To get the
- height in pixels, call `frame-pixel-width'; see *Note Size and
- Position::.)
-
-`window-id'
- The number of the X window for the frame.
-
-`minibuffer'
- Whether this frame has its own minibuffer. The value `t' means
- yes, `nil' means no, `only' means this frame is just a minibuffer.
- If the value is a minibuffer window (in some other frame), the
- new frame uses that minibuffer. (Minibuffer-only and
- minibuffer-less frames are not yet implemented in XEmacs.)
-
-`buffer-predicate'
- The buffer-predicate function for this frame. The function
- `other-buffer' uses this predicate (from the selected frame) to
- decide which buffers it should consider, if the predicate is not
- `nil'. It calls the predicate with one arg, a buffer, once for
- each buffer; if the predicate returns a non-`nil' value, it
- considers that buffer.
-
-`scroll-bar-width'
- The width of the vertical scroll bar, in pixels.
-
-`cursor-color'
- The color for the cursor that shows point.
-
-`border-color'
- The color for the border of the frame.
-
-`border-width'
- The width in pixels of the window border.
-
-`internal-border-width'
- The distance in pixels between text and border.
-
-`unsplittable'
- If non-`nil', this frame's window is never split automatically.
-
-`inter-line-space'
- The space in pixels between adjacent lines of text. (Not currently
- implemented.)
-
-`modeline'
- Whether the frame has a modeline.
-
-\1f
-File: lispref.info, Node: Size and Position, Next: Frame Name, Prev: X Frame Properties, Up: Frame Properties
-
-Frame Size And Position
------------------------
-
- You can read or change the size and position of a frame using the
-frame properties `left', `top', `height', and `width'. Whatever
-geometry properties you don't specify are chosen by the window manager
-in its usual fashion.
-
- Here are some special features for working with sizes and positions:
-
- - 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
- 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
- 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
- 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
- is COLS by ROWS, but the actual size of the frame should not be
- changed. You should not normally use this option.)
-
- You can also use the functions `set-frame-height' and
-`set-frame-width' to set the height and width individually. The frame
-is the first argument and the size (in rows or columns) is the second.
-(There is an optional third argument, PRETEND, which has the same
-purpose as the corresponding argument in `set-frame-size'.)
-
-\1f
-File: lispref.info, Node: Frame Name, Prev: Size and Position, Up: Frame Properties
-
-The Name of a Frame (As Opposed to Its Title)
----------------------------------------------
-
- Under X, every frame has a name, which is not the same as the title
-of the frame. A frame's name is used to look up its resources and does
-not normally change over the lifetime of a frame. It is perfectly
-allowable, and quite common, for multiple frames to have the same name.
-
- - Function: frame-name &optional frame
- 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::.
-
- - Variable: default-frame-name
- This variable holds the default name to assign to newly-created
- frames. This can be overridden by arguments to `make-frame'. This
- must be a string.
-
-\1f
-File: lispref.info, Node: Frame Titles, Next: Deleting Frames, Prev: Frame Properties, Up: Frames
-
-Frame Titles
-============
-
- Every frame has a title; most window managers display the frame
-title at the top of the frame. You can specify an explicit title with
-the `name' frame property. But normally you don't specify this
-explicitly, and XEmacs computes the title automatically.
-
- XEmacs computes the frame title based on a template stored in the
-variable `frame-title-format'.
-
- - Variable: frame-title-format
- This variable specifies how to compute a title for a frame when
- you have not explicitly specified one.
-
- The variable's value is actually a modeline construct, just like
- `modeline-format'. *Note Modeline Data::.
-
- - Variable: frame-icon-title-format
- This variable specifies how to compute the title for an iconified
- 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
- 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
- `make-glyph'), or `nil'. If a glyph object is given, the glyph
- will be instantiated on the frame to produce an image instance
- object.
-
- If the given image instance has a mask, that will be used as the
- icon mask; however, not all window managers support this.
-
- The window manager is also not required to support color pixmaps,
- only bitmaps (one plane deep).
-
- If the image instance does not have a mask, then the optional
- third argument may be the image instance to use as the mask (it
- must be one plane deep). *Note Glyphs::.
-
-\1f
-File: lispref.info, Node: Deleting Frames, Next: Finding All Frames, Prev: Frame Titles, Up: Frames
-
-Deleting Frames
-===============
-
- Frames remain potentially visible until you explicitly "delete"
-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
- This function deletes the frame FRAME. By default, FRAME is the
- selected frame.
-
- - Function: frame-live-p frame
- The function `frame-live-p' returns non-`nil' if the frame FRAME
- has not been deleted.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Resizing Windows, Next: Window Configurations, Prev: Position of Window, Up: Windows
+
+Changing the Size of a Window
+=============================
+
+ The window size functions fall into two classes: high-level commands
+that change the size of windows and low-level functions that access
+window size. XEmacs does not permit overlapping windows or gaps between
+windows, so resizing one window affects other windows.
+
+ - Command: enlarge-window size &optional horizontal window
+ 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
+ another. If a window from which lines are stolen shrinks below
+ `window-min-height' lines, that window disappears.
+
+ If HORIZONTAL is non-`nil', this function makes WINDOW wider by
+ SIZE columns, stealing columns instead of lines. If a window from
+ which columns are stolen shrinks below `window-min-width' columns,
+ that window disappears.
+
+ If the requested size would exceed that of the window's frame,
+ then the function makes the window occupy the entire height (or
+ width) of the frame.
+
+ If SIZE is negative, this function shrinks the window by -SIZE
+ lines or columns. If that makes the window smaller than the
+ minimum size (`window-min-height' and `window-min-width'),
+ `enlarge-window' deletes the window.
+
+ If WINDOW is non-`nil', it specifies a window to change instead of
+ the selected window.
+
+ `enlarge-window' returns `nil'.
+
+ - 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
+ 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
+ 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
+ `window-min-height' or `window-min-width', then it disappears.
+
+ If SIZE is negative, the window is enlarged by -SIZE lines or
+ columns.
+
+ If WINDOW is non-`nil', it specifies a window to change instead of
+ the selected window.
+
+ - 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
+ 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
+ WINDOW specifies the window to change instead of the selected
+ window.
+
+ The following two variables constrain the window-size-changing
+functions to a minimum height and width.
+
+ - User Option: window-min-height
+ The value of this variable determines how short a window may become
+ before it is automatically deleted. Making a window smaller than
+ `window-min-height' automatically deletes it, and no window may be
+ created shorter than this. The absolute minimum height is two
+ (allowing one line for the mode line, and one line for the buffer
+ display). Actions that change window sizes reset this variable to
+ two if it is less than two. The default value is 4.
+
+ - User Option: window-min-width
+ The value of this variable determines how narrow a window may
+ become before it automatically deleted. Making a window smaller
+ than `window-min-width' automatically deletes it, and no window
+ may be created narrower than this. The absolute minimum width is
+ one; any value below that is ignored. The default value is 10.
+
+ - Variable: window-size-change-functions
+ This variable holds a list of functions to be called if the size
+ of any window changes for any reason. The functions are called
+ just once per redisplay, and just once for each frame on which
+ size changes have occurred.
+
+ Each function receives the frame as its sole argument. There is no
+ direct way to find out which windows changed size, or precisely
+ how; however, if your size-change function keeps track, after each
+ change, of the windows that interest you, you can figure out what
+ has changed by comparing the old size data with the new.
+
+ Creating or deleting windows counts as a size change, and therefore
+ causes these functions to be called. Changing the frame size also
+ counts, because it changes the sizes of the existing windows.
+
+ It is not a good idea to use `save-window-excursion' in these
+ functions, because that always counts as a size change, and it
+ would cause these functions to be called over and over. In most
+ cases, `save-selected-window' is what you need here.
+
+\1f
+File: lispref.info, Node: Window Configurations, Prev: Resizing Windows, Up: Windows
+
+Window Configurations
+=====================
+
+ A "window configuration" records the entire layout of a frame--all
+windows, their sizes, which buffers they contain, what part of each
+buffer is displayed, and the values of point and the mark. You can
+bring back an entire previous layout by restoring a window
+configuration previously saved.
+
+ If you want to record all frames instead of just one, use a frame
+configuration instead of a window configuration. *Note Frame
+Configurations::.
+
+ - Function: current-window-configuration
+ This function returns a new object representing XEmacs's current
+ window configuration, namely the number of windows, their sizes
+ and current buffers, which window is the selected window, and for
+ each window the displayed buffer, the display-start position, and
+ 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
+ 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
+ `current-window-configuration'.
+
+ This function always counts as a window size change and triggers
+ execution of the `window-size-change-functions'. (It doesn't know
+ how to tell whether the new configuration actually differs from
+ the old one.)
+
+ Here is a way of using this function to get the same effect as
+ `save-window-excursion':
+
+ (let ((config (current-window-configuration)))
+ (unwind-protect
+ (progn (split-window-vertically nil)
+ ...)
+ (set-window-configuration config)))
+
+ - 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
+ of the buffer that is visible. It also includes the choice of
+ selected window. However, it does not include the value of point
+ in the current buffer; use `save-excursion' if you wish to
+ preserve that.
+
+ Don't use this construct when `save-selected-window' is all you
+ need.
+
+ Exit from `save-window-excursion' always triggers execution of the
+ `window-size-change-functions'. (It doesn't know how to tell
+ whether the restored configuration actually differs from the one in
+ effect at the end of the FORMS.)
+
+ The return value is the value of the final form in FORMS. For
+ example:
+
+ (split-window)
+ => #<window 25 on control.texi>
+ (setq w (selected-window))
+ => #<window 19 on control.texi>
+ (save-window-excursion
+ (delete-other-windows w)
+ (switch-to-buffer "foo")
+ 'do-something)
+ => do-something
+ ;; The frame is now split again.
+
+ - 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,
+but none are implemented. It is not clear they are useful enough to be
+worth implementing.
+
+\1f
+File: lispref.info, Node: Frames, Next: Consoles and Devices, Prev: Windows, Up: Top
+
+Frames
+******
+
+ A FRAME is a rectangle on the screen that contains one or more
+XEmacs windows (*note Windows::). A frame initially contains a single
+main window (plus perhaps an echo area), which you can subdivide
+vertically or horizontally into smaller windows. Each window is
+associated with a modeline (*note Modeline Format::), and optionally two
+scrollbars (*note Scrollbars::). By default the vertical scrollbar is
+on, the horizontal scrollbar is off.
+
+ The frame may also contain menubars (*note Menubar::), toolbars
+(*note Toolbar Intro::), and gutters (*note Gutter Intro::). By default
+there is one of each at the top of the frame, with menubar topmost,
+toolbar next, and gutter lowest, immediately above the windows.
+(Warning: the gutter is a new, experimental, and unstable feature of
+XEmacs version 21.2.)
+
+ When XEmacs runs on a text-only terminal, it starts with one "TTY
+frame". If you create additional ones, XEmacs displays one and only
+one at any given time--on the terminal screen, of course.
+
+ When XEmacs communicates directly with an X server, it does not have
+a TTY frame; instead, it starts with a single "X window frame". It can
+display multiple X window frames at the same time, each in its own X
+window.
+
+ - Function: framep object
+ This predicate returns `t' if OBJECT is a frame, and `nil'
+ otherwise.
+
+* Menu:
+
+* Creating Frames:: Creating additional frames.
+* Frame Properties:: Controlling frame size, position, font, etc.
+* Frame Titles:: Automatic updating of frame titles.
+* Deleting Frames:: Frames last until explicitly deleted.
+* Finding All Frames:: How to examine all existing frames.
+* Frames and Windows:: A frame contains windows;
+ display of text always works through windows.
+* Minibuffers and Frames:: How a frame finds the minibuffer to use.
+* Input Focus:: Specifying the selected frame.
+* Visibility of Frames:: Frames may be visible or invisible, or icons.
+* Raising and Lowering:: Raising a frame makes it hide other X windows;
+ lowering it makes the others hide them.
+* Frame Configurations:: Saving the state of all frames.
+* Frame Hooks:: Hooks for customizing frame behavior.
+
+ *Note Display::, for related information.
+
+\1f
+File: lispref.info, Node: Creating Frames, Next: Frame Properties, Up: Frames
+
+Creating Frames
+===============
+
+ To create a new frame, call the function `make-frame'.
+
+ - 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.
+ *Note Consoles and Devices::.
+
+ The argument PROPS is a property list (a list of alternating
+ keyword-value specifications) of properties for the new frame. (An
+ alist is accepted for backward compatibility but should not be
+ passed in.) Any properties not mentioned in PROPS default
+ according to the value of the variable `default-frame-plist'. For
+ X devices, properties not specified in `default-frame-plist'
+ default in turn from `default-x-frame-plist' and, if not specified
+ there, from the X resources. For TTY devices,
+ `default-tty-frame-plist' is consulted as well as
+ `default-frame-plist'.
+
+ The set of possible properties depends in principle on what kind of
+ window system XEmacs uses to display its frames. *Note X Frame
+ Properties::, for documentation of individual properties you can
+ specify when creating an X window frame.
+
+\1f
+File: lispref.info, Node: Frame Properties, Next: Frame Titles, Prev: Creating Frames, Up: Frames
+
+Frame Properties
+================
+
+ A frame has many properties that control its appearance and behavior.
+Just what properties a frame has depends on which display mechanism it
+uses.
+
+ Frame properties exist for the sake of window systems. A terminal
+frame has few properties, mostly for compatibility's sake; only the
+height, width and `buffer-predicate' properties really do something.
+
+* Menu:
+
+* Property Access:: How to change a frame's properties.
+* Initial Properties:: Specifying frame properties when you make a frame.
+* X Frame Properties:: List of frame properties.
+* Size and Position:: Changing the size and position of a frame.
+* Frame Name:: The name of a frame (as opposed to its title).
+
+\1f
+File: lispref.info, Node: Property Access, Next: Initial Properties, Up: Frame Properties
+
+Access to Frame Properties
+--------------------------
+
+ These functions let you read and change the properties of a 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
+ This function returns FRAME's value for the property PROPERTY.
+
+ - 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
+ This function sets the property PROP of frame FRAME to the value
+ VAL.
+
+\1f
+File: lispref.info, Node: Initial Properties, Next: X Frame Properties, Prev: Property Access, Up: Frame Properties
+
+Initial Frame Properties
+------------------------
+
+ You can specify the properties for the initial startup frame by
+setting `initial-frame-plist' in your `.emacs' file.
+
+ - Variable: initial-frame-plist
+ This variable's value is a plist of alternating property-value
+ pairs used when creating the initial X window frame.
+
+ XEmacs creates the initial frame before it reads your `~/.emacs'
+ file. After reading that file, XEmacs checks
+ `initial-frame-plist', and applies the property settings in the
+ altered value to the already created initial frame.
+
+ If these settings affect the frame geometry and appearance, you'll
+ see the frame appear with the wrong ones and then change to the
+ specified ones. If that bothers you, you can specify the same
+ geometry and appearance with X resources; those do take affect
+ before the frame is created. *Note X Resources: (xemacs)Resources
+ X.
+
+ X resource settings typically apply to all frames. If you want to
+ specify some X resources solely for the sake of the initial frame,
+ and you don't want them to apply to subsequent frames, here's how
+ to achieve this: specify properties in `default-frame-plist' to
+ override the X resources for subsequent frames; then, to prevent
+ these from affecting the initial frame, specify the same
+ properties in `initial-frame-plist' with values that match the X
+ resources.
+
+ If these properties specify a separate minibuffer-only frame via a
+`minibuffer' property of `nil', and you have not yet created one,
+XEmacs creates one for you.
+
+ - Variable: minibuffer-frame-plist
+ This variable's value is a plist of properties used when creating
+ an initial minibuffer-only frame--if such a frame is needed,
+ according to the properties for the main initial frame.
+
+ - Variable: default-frame-plist
+ This is a plist specifying default values of frame properties for
+ subsequent XEmacs frames (not the initial ones).
+
+ See also `special-display-frame-plist', in *Note Choosing Window::.
+
+ If you use options that specify window appearance when you invoke
+XEmacs, they take effect by adding elements to `default-frame-plist'.
+One exception is `-geometry', which adds the specified position to
+`initial-frame-plist' instead. *Note Command Arguments:
+(xemacs)Command Arguments.
+
+\1f
+File: lispref.info, Node: X Frame Properties, Next: Size and Position, Prev: Initial Properties, Up: Frame Properties
+
+X Window Frame Properties
+-------------------------
+
+ Just what properties a frame has depends on what display mechanism it
+uses. Here is a table of the properties of an X window frame; of these,
+`name', `height', `width', and `buffer-predicate' provide meaningful
+information in non-X frames.
+
+`name'
+ The name of the frame. Most window managers display the frame's
+ name in the frame's border, at the top of the frame. If you don't
+ specify a name, and you have more than one frame, XEmacs sets the
+ frame name based on the buffer displayed in the frame's selected
+ window.
+
+ If you specify the frame name explicitly when you create the
+ frame, the name is also used (instead of the name of the XEmacs
+ executable) when looking up X resources for the frame.
+
+`display'
+ The display on which to open this frame. It should be a string of
+ the form `"HOST:DPY.SCREEN"', just like the `DISPLAY' environment
+ variable.
+
+`left'
+ The screen position of the left edge, in pixels, with respect to
+ the left edge of the screen. The value may be a positive number
+ POS, or a list of the form `(+ POS)' which permits specifying a
+ negative POS value.
+
+ A negative number -POS, or a list of the form `(- POS)', actually
+ specifies the position of the right edge of the window with
+ respect to the right edge of the screen. A positive value of POS
+ counts toward the left. If the property is a negative integer
+ -POS then POS is positive!
+
+`top'
+ The screen position of the top edge, in pixels, with respect to the
+ top edge of the screen. The value may be a positive number POS,
+ or a list of the form `(+ POS)' which permits specifying a
+ negative POS value.
+
+ A negative number -POS, or a list of the form `(- POS)', actually
+ specifies the position of the bottom edge of the window with
+ respect to the bottom edge of the screen. A positive value of POS
+ counts toward the top. If the property is a negative integer -POS
+ then POS is positive!
+
+`icon-left'
+ 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
+ pixels, counting from the top edge of the screen. This takes
+ effect if and when the frame is iconified.
+
+`user-position'
+ Non-`nil' if the screen position of the frame was explicitly
+ requested by the user (for example, with the `-geometry' option).
+ Nothing automatically makes this property non-`nil'; it is up to
+ Lisp programs that call `make-frame' to specify this property as
+ well as specifying the `left' and `top' properties.
+
+`height'
+ The height of the frame contents, in characters. (To get the
+ height in pixels, call `frame-pixel-height'; see *Note Size and
+ Position::.)
+
+`width'
+ The width of the frame contents, in characters. (To get the
+ height in pixels, call `frame-pixel-width'; see *Note Size and
+ Position::.)
+
+`window-id'
+ The number of the X window for the frame.
+
+`minibuffer'
+ Whether this frame has its own minibuffer. The value `t' means
+ yes, `nil' means no, `only' means this frame is just a minibuffer.
+ If the value is a minibuffer window (in some other frame), the
+ new frame uses that minibuffer. (Minibuffer-only and
+ minibuffer-less frames are not yet implemented in XEmacs.)
+
+`buffer-predicate'
+ The buffer-predicate function for this frame. The function
+ `other-buffer' uses this predicate (from the selected frame) to
+ decide which buffers it should consider, if the predicate is not
+ `nil'. It calls the predicate with one arg, a buffer, once for
+ each buffer; if the predicate returns a non-`nil' value, it
+ considers that buffer.
+
+`scroll-bar-width'
+ The width of the vertical scroll bar, in pixels.
+
+`cursor-color'
+ The color for the cursor that shows point.
+
+`border-color'
+ The color for the border of the frame.
+
+`border-width'
+ The width in pixels of the window border.
+
+`internal-border-width'
+ The distance in pixels between text and border.
+
+`unsplittable'
+ If non-`nil', this frame's window is never split automatically.
+
+`inter-line-space'
+ The space in pixels between adjacent lines of text. (Not currently
+ implemented.)
+
+`modeline'
+ Whether the frame has a modeline.
+
+\1f
+File: lispref.info, Node: Size and Position, Next: Frame Name, Prev: X Frame Properties, Up: Frame Properties
+
+Frame Size And Position
+-----------------------
+
+ You can read or change the size and position of a frame using the
+frame properties `left', `top', `height', and `width'. Whatever
+geometry properties you don't specify are chosen by the window manager
+in its usual fashion.
+
+ Here are some special features for working with sizes and positions:
+
+ - 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
+ 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
+ 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
+ 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
+ is COLS by ROWS, but the actual size of the frame should not be
+ changed. You should not normally use this option.)
+
+ You can also use the functions `set-frame-height' and
+`set-frame-width' to set the height and width individually. The frame
+is the first argument and the size (in rows or columns) is the second.
+(There is an optional third argument, PRETEND, which has the same
+purpose as the corresponding argument in `set-frame-size'.)
+
+\1f
+File: lispref.info, Node: Frame Name, Prev: Size and Position, Up: Frame Properties
+
+The Name of a Frame (As Opposed to Its Title)
+---------------------------------------------
+
+ Under X, every frame has a name, which is not the same as the title
+of the frame. A frame's name is used to look up its resources and does
+not normally change over the lifetime of a frame. It is perfectly
+allowable, and quite common, for multiple frames to have the same name.
+
+ - Function: frame-name &optional frame
+ 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::.
+
+ - Variable: default-frame-name
+ This variable holds the default name to assign to newly-created
+ frames. This can be overridden by arguments to `make-frame'. This
+ must be a string.
+
+\1f
+File: lispref.info, Node: Frame Titles, Next: Deleting Frames, Prev: Frame Properties, Up: Frames
+
+Frame Titles
+============
+
+ Every frame has a title; most window managers display the frame
+title at the top of the frame. You can specify an explicit title with
+the `name' frame property. But normally you don't specify this
+explicitly, and XEmacs computes the title automatically.
+
+ XEmacs computes the frame title based on a template stored in the
+variable `frame-title-format'.
+
+ - Variable: frame-title-format
+ This variable specifies how to compute a title for a frame when
+ you have not explicitly specified one.
+
+ The variable's value is actually a modeline construct, just like
+ `modeline-format'. *Note Modeline Data::.
+
+ - Variable: frame-icon-title-format
+ This variable specifies how to compute the title for an iconified
+ 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
+ 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
+ `make-glyph'), or `nil'. If a glyph object is given, the glyph
+ will be instantiated on the frame to produce an image instance
+ object.
+
+ If the given image instance has a mask, that will be used as the
+ icon mask; however, not all window managers support this.
+
+ The window manager is also not required to support color pixmaps,
+ only bitmaps (one plane deep).
+
+ If the image instance does not have a mask, then the optional
+ third argument may be the image instance to use as the mask (it
+ must be one plane deep). *Note Glyphs::.
+
+\1f
+File: lispref.info, Node: Deleting Frames, Next: Finding All Frames, Prev: Frame Titles, Up: Frames
+
+Deleting Frames
+===============
+
+ Frames remain potentially visible until you explicitly "delete"
+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
+ This function deletes the frame FRAME. By default, FRAME is the
+ selected frame.
+
+ - Function: frame-live-p frame
+ The function `frame-live-p' returns non-`nil' if the frame FRAME
+ has not been deleted.
+
+\1f
File: lispref.info, Node: Finding All Frames, Next: Frames and Windows, Prev: Deleting Frames, Up: Frames
Finding All Frames
This function returns the X display which DEVICE is connected to,
if DEVICE is an X device.
-\1f
-File: lispref.info, Node: The Selected Console and Device, Next: Console and Device I/O, Prev: Connecting to a Console or Device, Up: Consoles and Devices
-
-The Selected Console and Device
-===============================
-
- - 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
- user does something to select a different console, or until the
- next time this function is called.
-
- - Function: selected-console
- This function returns the console which is currently active.
-
- - Function: select-device device
- This function selects the device DEVICE.
-
- - 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.
-
-\1f
-File: lispref.info, Node: Console and Device I/O, Prev: The Selected Console and Device, Up: Consoles and Devices
-
-Console and Device I/O
-======================
-
- - Function: console-disable-input console
- This function disables input on console 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
- This function returns the output baud rate of DEVICE.
-
- - Function: set-device-baud-rate device rate
- This function sets the output baud rate of DEVICE to RATE.
-
-\1f
-File: lispref.info, Node: Positions, Next: Markers, Prev: Consoles and Devices, Up: Top
-
-Positions
-*********
-
- A "position" is the index of a character in the text of a buffer.
-More precisely, a position identifies the place between two characters
-(or before the first character, or after the last character), so we can
-speak of the character before or after a given position. However, we
-often speak of the character "at" a position, meaning the character
-after that position.
-
- Positions are usually represented as integers starting from 1, but
-can also be represented as "markers"--special objects that relocate
-automatically when text is inserted or deleted so they stay with the
-surrounding characters. *Note Markers::.
-
-* Menu:
-
-* Point:: The special position where editing takes place.
-* Motion:: Changing point.
-* Excursions:: Temporary motion and buffer changes.
-* Narrowing:: Restricting editing to a portion of the buffer.
-
-\1f
-File: lispref.info, Node: Point, Next: Motion, Up: Positions
-
-Point
-=====
-
- "Point" is a special buffer position used by many editing commands,
-including the self-inserting typed characters and text insertion
-functions. Other commands move point through the text to allow editing
-and insertion at different places.
-
- Like other positions, point designates a place between two characters
-(or before the first character, or after the last character), rather
-than a particular character. Usually terminals display the cursor over
-the character that immediately follows point; point is actually before
-the character on which the cursor sits.
-
- The value of point is a number between 1 and the buffer size plus 1.
-If narrowing is in effect (*note Narrowing::), then point is constrained
-to fall within the accessible portion of the buffer (possibly at one end
-of it).
-
- 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,
-which is independent of the value of point in other windows on the same
-buffer. This is why point can have different values in various windows
-that display the same buffer. When a buffer appears in only one window,
-the buffer's point and the window's point normally have the same value,
-so the distinction is rarely important. *Note Window Point::, for more
-details.
-
- - Function: point &optional buffer
- 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
- 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
- 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.
-
- - 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
- This function returns the total number of characters in BUFFER.
- 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.
-
- (buffer-size)
- => 35
- (point-max)
- => 36
-
- - Variable: buffer-saved-size
- The value of this buffer-local variable is the former length of the
- current buffer, as of the last time it was read in, saved or
- auto-saved.
-
-\1f
-File: lispref.info, Node: Motion, Next: Excursions, Prev: Point, Up: Positions
-
-Motion
-======
-
- Motion functions change the value of point, either relative to the
-current value of point, relative to the beginning or end of the buffer,
-or relative to the edges of the selected window. *Note Point::.
-
-* Menu:
-
-* Character Motion:: Moving in terms of characters.
-* Word Motion:: Moving in terms of words.
-* Buffer End Motion:: Moving to the beginning or end of the buffer.
-* Text Lines:: Moving in terms of lines of text.
-* Screen Lines:: Moving in terms of lines as displayed.
-* List Motion:: Moving by parsing lists and sexps.
-* Skipping Characters:: Skipping characters belonging to a certain set.
-
-\1f
-File: lispref.info, Node: Character Motion, Next: Word Motion, Up: Motion
-
-Motion by Characters
---------------------
-
- These functions move point based on a count of characters.
-`goto-char' is the fundamental primitive; the other functions use that.
-
- - Command: goto-char position &optional buffer
- 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
- moves point to the end. BUFFER defaults to the current buffer if
- omitted.
-
- If narrowing is in effect, POSITION still counts from the
- beginning of the buffer, but point cannot go outside the accessible
- portion. If POSITION is out of range, `goto-char' moves point to
- the beginning or the end of the accessible portion.
-
- When this function is called interactively, POSITION is the
- numeric prefix argument, if provided; otherwise it is read from the
- minibuffer.
-
- `goto-char' returns POSITION.
-
- - 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
- point past the beginning or end of the buffer (or the limits of
- the accessible portion, when narrowing is in effect), an error is
- signaled with error code `beginning-of-buffer' or `end-of-buffer'.
- BUFFER defaults to the current buffer if omitted.
-
- In an interactive call, COUNT is the numeric prefix argument.
-
- - 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
- point past the beginning or end of the buffer (or the limits of
- the accessible portion, when narrowing is in effect), an error is
- signaled with error code `beginning-of-buffer' or `end-of-buffer'.
- BUFFER defaults to the current buffer if omitted.
-
- In an interactive call, COUNT is the numeric prefix argument.
-
-\1f
-File: lispref.info, Node: Word Motion, Next: Buffer End Motion, Prev: Character Motion, Up: Motion
-
-Motion by Words
----------------
-
- These functions for parsing words use the syntax table to decide
-whether a given character is part of a word. *Note Syntax Tables::.
-
- - Command: forward-word count &optional buffer
- 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
- accessible portion when narrowing is in effect, point stops there
- and the value is `nil'. BUFFER defaults to the current buffer if
- omitted.
-
- In an interactive call, COUNT is set to the numeric prefix
- argument.
-
- - 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.
-
- In an interactive call, COUNT is set to the numeric prefix
- argument.
-
- This function is rarely used in programs, as it is more efficient
- to call `forward-word' with a negative argument.
-
- - Variable: words-include-escapes
- This variable affects the behavior of `forward-word' and everything
- that uses it. If it is non-`nil', then characters in the "escape"
- and "character quote" syntax classes count as part of words.
- Otherwise, they do not.
-
-\1f
-File: lispref.info, Node: Buffer End Motion, Next: Text Lines, Prev: Word Motion, Up: Motion
-
-Motion to an End of the Buffer
-------------------------------
-
- To move point to the beginning of the buffer, write:
-
- (goto-char (point-min))
-
-Likewise, to move to the end of the buffer, use:
-
- (goto-char (point-max))
-
- Here are two commands that users use to do these things. They are
-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
- 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',
- then it puts point N tenths of the way from the beginning of the
- buffer.
-
- In an interactive call, N is the numeric prefix argument, if
- provided; otherwise N defaults to `nil'.
-
- Don't use this function in Lisp programs!
-
- - 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
- point N tenths of the way from the end of the buffer.
-
- In an interactive call, N is the numeric prefix argument, if
- provided; otherwise N defaults to `nil'.
-
- Don't use this function in Lisp programs!
-
-\1f
-File: lispref.info, Node: Text Lines, Next: Screen Lines, Prev: Buffer End Motion, Up: Motion
-
-Motion by Text Lines
---------------------
-
- Text lines are portions of the buffer delimited by newline
-characters, which are regarded as part of the previous line. The first
-text line begins at the beginning of the buffer, and the last text line
-ends at the end of the buffer whether or not the last character is a
-newline. The division of the buffer into text lines is not affected by
-the width of the window, by line continuation in display, or by how
-tabs and control characters are displayed.
-
- - Command: goto-line line
- 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
- buffer. This is the only case in which `goto-line' does not
- necessarily move to the beginning of a line.
-
- If narrowing is in effect, then LINE still counts from the
- beginning of the buffer, but point cannot go outside the accessible
- portion. So `goto-line' moves point to the beginning or end of the
- accessible portion, if the line number specifies an inaccessible
- position.
-
- The return value of `goto-line' is the difference between LINE and
- the line number of the line to which point actually was able to
- move (in the full buffer, before taking account of narrowing).
- Thus, the value is positive if the scan encounters the real end of
- the buffer. The value is zero if scan encounters the end of the
- accessible portion but not the real end of the buffer.
-
- 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
- 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
- the current buffer if omitted.
-
- If this function reaches the end of the buffer (or of the
- accessible portion, if narrowing is in effect), it positions point
- there. No error is signaled.
-
- - 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
- buffer if omitted.
-
- If this function reaches the end of the buffer (or of the
- accessible portion, if narrowing is in effect), it positions point
- there. No error is signaled.
-
- - 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
- point to the beginning of the current line. BUFFER defaults to
- the current buffer if omitted.
-
- If `forward-line' encounters the beginning or end of the buffer (or
- of the accessible portion) before finding that many lines, it sets
- point there. No error is signaled.
-
- `forward-line' returns the difference between COUNT and the number
- of lines actually moved. If you attempt to move down five lines
- from the beginning of a buffer that has only three lines, point
- stops at the end of the last line, and the value will be 2.
-
- In an interactive call, COUNT is the numeric prefix argument.
-
- - 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
- and END are on the same line. This is because the text between
- them, considered in isolation, must contain at least one line
- unless it is empty.
-
- Here is an example of using `count-lines':
-
- (defun current-line ()
- "Return the vertical position of point..."
- (+ (count-lines (window-start) (point))
- (if (= (current-column) 0) 1 0)
- -1))
-
- Also see the functions `bolp' and `eolp' in *Note Near Point::.
-These functions do not move point, but test whether it is already at the
-beginning or end of a line.
-
-\1f
-File: lispref.info, Node: Screen Lines, Next: List Motion, Prev: Text Lines, Up: Motion
-
-Motion by Screen Lines
-----------------------
-
- The line functions in the previous section count text lines,
-delimited only by newline characters. By contrast, these functions
-count screen lines, which are defined by the way the text appears on
-the screen. A text line is a single screen line if it is short enough
-to fit the width of the selected window, but otherwise it may occupy
-several screen lines.
-
- In some cases, text lines are truncated on the screen rather than
-continued onto additional screen lines. In these cases,
-`vertical-motion' moves point much like `forward-line'. *Note
-Truncation::.
-
- Because the width of a given string depends on the flags that control
-the appearance of certain characters, `vertical-motion' behaves
-differently, for a given piece of text, depending on the buffer it is
-in, and even on the selected window (because the width, the truncation
-flag, and display table may vary between windows). *Note Usual
-Display::.
-
- These functions scan text to determine where screen lines break, and
-thus take time proportional to the distance scanned. If you intend to
-use them heavily, Emacs provides caches which may improve the
-performance of your code. *Note cache-long-line-scans: Text Lines.
-
- - Function: vertical-motion count &optional window pixels
- 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 may be used to specify a window other than the selected
- window in which to perform the motion.
-
- Normally, `vertical-motion' returns the number of lines moved. The
- value may be less in absolute value than COUNT if the beginning or
- end of the buffer was reached. If the optional third argument,
- PIXELS is non-`nil', the vertical pixel height of the motion which
- took place is returned instead of the actual number of lines
- moved. A motion of zero lines returns the height of the current
- line.
-
- Note that `vertical-motion' sets WINDOW's buffer's point, not
- 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
- 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
- window to move in, and defaults to the selected window. The
- optional third argument HOW specifies the stopping condition. A
- negative integer indicates that the motion should be no more than
- PIXELS. A positive value indicates that the motion should be at
- 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
- 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
- from the top of the window. If COUNT is negative, that specifies a
- position -COUNT lines from the bottom (or the last line of the
- buffer, if the buffer ends above the specified screen position).
-
- If COUNT is `nil', then point moves to the beginning of the line
- in the middle of the window. If the absolute value of COUNT is
- greater than the size of the window, then point moves to the place
- that would appear on that screen line if the window were tall
- enough. This will probably cause the next redisplay to scroll to
- bring that location onto the screen.
-
- In an interactive call, COUNT is the numeric prefix argument.
-
- The value returned is the window line number point has moved to,
- with the top line in the window numbered 0.
-
-\1f
-File: lispref.info, Node: List Motion, Next: Skipping Characters, Prev: Screen Lines, Up: Motion
-
-Moving over Balanced Expressions
---------------------------------
-
- Here are several functions concerned with balanced-parenthesis
-expressions (also called "sexps" in connection with moving across them
-in XEmacs). The syntax table controls how these functions interpret
-various characters; see *Note Syntax Tables::. *Note Parsing
-Expressions::, for lower-level primitives for scanning sexps or parts of
-sexps. For user-level commands, see *Note Lists and Sexps:
-(emacs)Lists and Sexps.
-
- - Command: forward-list &optional arg
- 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
- 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
- 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
- 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
- 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
- to 1 if omitted. If ARG is negative, move backward across that
- many balanced expressions. For example,
-
- ---------- Buffer: foo ----------
- (concat-!- "foo " (car x) y z)
- ---------- Buffer: foo ----------
-
- (forward-sexp 3)
- => nil
-
- ---------- Buffer: foo ----------
- (concat "foo " (car x) y-!- z)
- ---------- Buffer: foo ----------
-
- - 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
- 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
- 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
- 1 if omitted.
-
- - User Option: defun-prompt-regexp
- If non-`nil', this variable holds a regular expression that
- specifies what text can appear before the open-parenthesis that
- starts a defun. That is to say, a defun begins on a line that
- starts with a match for this regular expression, followed by a
- character with open-parenthesis syntax.
-
-\1f
-File: lispref.info, Node: Skipping Characters, Prev: List Motion, Up: Motion
-
-Skipping Characters
--------------------
-
- The following two functions move point over a specified set of
-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
- 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
- continues until it reaches a character that does not match. The
- function returns `nil'. BUFFER defaults to the current buffer if
- omitted.
-
- The argument CHARACTER-SET is like the inside of a `[...]' in a
- regular expression except that `]' is never special and `\' quotes
- `^', `-' or `\'. Thus, `"a-zA-Z"' skips over all letters,
- stopping before the first non-letter, and `"^a-zA-Z'" skips
- non-letters stopping before the first letter. *Note Regular
- Expressions::.
-
- If LIMIT is supplied (it must be a number or a marker), it
- specifies the maximum position in the buffer that point can be
- skipped to. Point will stop at or before LIMIT.
-
- In the following example, point is initially located directly
- before the `T'. After the form is evaluated, point is located at
- the end of that line (between the `t' of `hat' and the newline).
- The function skips all letters and spaces, but not newlines.
-
- ---------- Buffer: foo ----------
- I read "-!-The cat in the hat
- comes back" twice.
- ---------- Buffer: foo ----------
-
- (skip-chars-forward "a-zA-Z ")
- => nil
-
- ---------- Buffer: foo ----------
- I read "The cat in the hat-!-
- comes back" twice.
- ---------- Buffer: foo ----------
-
- - 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.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: The Selected Console and Device, Next: Console and Device I/O, Prev: Connecting to a Console or Device, Up: Consoles and Devices
+
+The Selected Console and Device
+===============================
+
+ - 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
+ user does something to select a different console, or until the
+ next time this function is called.
+
+ - Function: selected-console
+ This function returns the console which is currently active.
+
+ - Function: select-device device
+ This function selects the device DEVICE.
+
+ - 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.
+
+\1f
+File: lispref.info, Node: Console and Device I/O, Prev: The Selected Console and Device, Up: Consoles and Devices
+
+Console and Device I/O
+======================
+
+ - Function: console-disable-input console
+ This function disables input on console 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
+ This function returns the output baud rate of DEVICE.
+
+ - Function: set-device-baud-rate device rate
+ This function sets the output baud rate of DEVICE to RATE.
+
+\1f
+File: lispref.info, Node: Positions, Next: Markers, Prev: Consoles and Devices, Up: Top
+
+Positions
+*********
+
+ A "position" is the index of a character in the text of a buffer.
+More precisely, a position identifies the place between two characters
+(or before the first character, or after the last character), so we can
+speak of the character before or after a given position. However, we
+often speak of the character "at" a position, meaning the character
+after that position.
+
+ Positions are usually represented as integers starting from 1, but
+can also be represented as "markers"--special objects that relocate
+automatically when text is inserted or deleted so they stay with the
+surrounding characters. *Note Markers::.
+
+* Menu:
+
+* Point:: The special position where editing takes place.
+* Motion:: Changing point.
+* Excursions:: Temporary motion and buffer changes.
+* Narrowing:: Restricting editing to a portion of the buffer.
+
+\1f
+File: lispref.info, Node: Point, Next: Motion, Up: Positions
+
+Point
+=====
+
+ "Point" is a special buffer position used by many editing commands,
+including the self-inserting typed characters and text insertion
+functions. Other commands move point through the text to allow editing
+and insertion at different places.
+
+ Like other positions, point designates a place between two characters
+(or before the first character, or after the last character), rather
+than a particular character. Usually terminals display the cursor over
+the character that immediately follows point; point is actually before
+the character on which the cursor sits.
+
+ The value of point is a number between 1 and the buffer size plus 1.
+If narrowing is in effect (*note Narrowing::), then point is constrained
+to fall within the accessible portion of the buffer (possibly at one end
+of it).
+
+ 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,
+which is independent of the value of point in other windows on the same
+buffer. This is why point can have different values in various windows
+that display the same buffer. When a buffer appears in only one window,
+the buffer's point and the window's point normally have the same value,
+so the distinction is rarely important. *Note Window Point::, for more
+details.
+
+ - Function: point &optional buffer
+ 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
+ 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
+ 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.
+
+ - 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
+ This function returns the total number of characters in BUFFER.
+ 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.
+
+ (buffer-size)
+ => 35
+ (point-max)
+ => 36
+
+ - Variable: buffer-saved-size
+ The value of this buffer-local variable is the former length of the
+ current buffer, as of the last time it was read in, saved or
+ auto-saved.
+
+\1f
+File: lispref.info, Node: Motion, Next: Excursions, Prev: Point, Up: Positions
+
+Motion
+======
+
+ Motion functions change the value of point, either relative to the
+current value of point, relative to the beginning or end of the buffer,
+or relative to the edges of the selected window. *Note Point::.
+
+* Menu:
+
+* Character Motion:: Moving in terms of characters.
+* Word Motion:: Moving in terms of words.
+* Buffer End Motion:: Moving to the beginning or end of the buffer.
+* Text Lines:: Moving in terms of lines of text.
+* Screen Lines:: Moving in terms of lines as displayed.
+* List Motion:: Moving by parsing lists and sexps.
+* Skipping Characters:: Skipping characters belonging to a certain set.
+
+\1f
+File: lispref.info, Node: Character Motion, Next: Word Motion, Up: Motion
+
+Motion by Characters
+--------------------
+
+ These functions move point based on a count of characters.
+`goto-char' is the fundamental primitive; the other functions use that.
+
+ - Command: goto-char position &optional buffer
+ 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
+ moves point to the end. BUFFER defaults to the current buffer if
+ omitted.
+
+ If narrowing is in effect, POSITION still counts from the
+ beginning of the buffer, but point cannot go outside the accessible
+ portion. If POSITION is out of range, `goto-char' moves point to
+ the beginning or the end of the accessible portion.
+
+ When this function is called interactively, POSITION is the
+ numeric prefix argument, if provided; otherwise it is read from the
+ minibuffer.
+
+ `goto-char' returns POSITION.
+
+ - 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
+ point past the beginning or end of the buffer (or the limits of
+ the accessible portion, when narrowing is in effect), an error is
+ signaled with error code `beginning-of-buffer' or `end-of-buffer'.
+ BUFFER defaults to the current buffer if omitted.
+
+ In an interactive call, COUNT is the numeric prefix argument.
+
+ - 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
+ point past the beginning or end of the buffer (or the limits of
+ the accessible portion, when narrowing is in effect), an error is
+ signaled with error code `beginning-of-buffer' or `end-of-buffer'.
+ BUFFER defaults to the current buffer if omitted.
+
+ In an interactive call, COUNT is the numeric prefix argument.
+
+\1f
+File: lispref.info, Node: Word Motion, Next: Buffer End Motion, Prev: Character Motion, Up: Motion
+
+Motion by Words
+---------------
+
+ These functions for parsing words use the syntax table to decide
+whether a given character is part of a word. *Note Syntax Tables::.
+
+ - Command: forward-word count &optional buffer
+ 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
+ accessible portion when narrowing is in effect, point stops there
+ and the value is `nil'. BUFFER defaults to the current buffer if
+ omitted.
+
+ In an interactive call, COUNT is set to the numeric prefix
+ argument.
+
+ - 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.
+
+ In an interactive call, COUNT is set to the numeric prefix
+ argument.
+
+ This function is rarely used in programs, as it is more efficient
+ to call `forward-word' with a negative argument.
+
+ - Variable: words-include-escapes
+ This variable affects the behavior of `forward-word' and everything
+ that uses it. If it is non-`nil', then characters in the "escape"
+ and "character quote" syntax classes count as part of words.
+ Otherwise, they do not.
+
+\1f
+File: lispref.info, Node: Buffer End Motion, Next: Text Lines, Prev: Word Motion, Up: Motion
+
+Motion to an End of the Buffer
+------------------------------
+
+ To move point to the beginning of the buffer, write:
+
+ (goto-char (point-min))
+
+Likewise, to move to the end of the buffer, use:
+
+ (goto-char (point-max))
+
+ Here are two commands that users use to do these things. They are
+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
+ 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',
+ then it puts point N tenths of the way from the beginning of the
+ buffer.
+
+ In an interactive call, N is the numeric prefix argument, if
+ provided; otherwise N defaults to `nil'.
+
+ Don't use this function in Lisp programs!
+
+ - 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
+ point N tenths of the way from the end of the buffer.
+
+ In an interactive call, N is the numeric prefix argument, if
+ provided; otherwise N defaults to `nil'.
+
+ Don't use this function in Lisp programs!
+
+\1f
+File: lispref.info, Node: Text Lines, Next: Screen Lines, Prev: Buffer End Motion, Up: Motion
+
+Motion by Text Lines
+--------------------
+
+ Text lines are portions of the buffer delimited by newline
+characters, which are regarded as part of the previous line. The first
+text line begins at the beginning of the buffer, and the last text line
+ends at the end of the buffer whether or not the last character is a
+newline. The division of the buffer into text lines is not affected by
+the width of the window, by line continuation in display, or by how
+tabs and control characters are displayed.
+
+ - Command: goto-line line
+ 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
+ buffer. This is the only case in which `goto-line' does not
+ necessarily move to the beginning of a line.
+
+ If narrowing is in effect, then LINE still counts from the
+ beginning of the buffer, but point cannot go outside the accessible
+ portion. So `goto-line' moves point to the beginning or end of the
+ accessible portion, if the line number specifies an inaccessible
+ position.
+
+ The return value of `goto-line' is the difference between LINE and
+ the line number of the line to which point actually was able to
+ move (in the full buffer, before taking account of narrowing).
+ Thus, the value is positive if the scan encounters the real end of
+ the buffer. The value is zero if scan encounters the end of the
+ accessible portion but not the real end of the buffer.
+
+ 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
+ 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
+ the current buffer if omitted.
+
+ If this function reaches the end of the buffer (or of the
+ accessible portion, if narrowing is in effect), it positions point
+ there. No error is signaled.
+
+ - 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
+ buffer if omitted.
+
+ If this function reaches the end of the buffer (or of the
+ accessible portion, if narrowing is in effect), it positions point
+ there. No error is signaled.
+
+ - 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
+ point to the beginning of the current line. BUFFER defaults to
+ the current buffer if omitted.
+
+ If `forward-line' encounters the beginning or end of the buffer (or
+ of the accessible portion) before finding that many lines, it sets
+ point there. No error is signaled.
+
+ `forward-line' returns the difference between COUNT and the number
+ of lines actually moved. If you attempt to move down five lines
+ from the beginning of a buffer that has only three lines, point
+ stops at the end of the last line, and the value will be 2.
+
+ In an interactive call, COUNT is the numeric prefix argument.
+
+ - 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
+ and END are on the same line. This is because the text between
+ them, considered in isolation, must contain at least one line
+ unless it is empty.
+
+ Here is an example of using `count-lines':
+
+ (defun current-line ()
+ "Return the vertical position of point..."
+ (+ (count-lines (window-start) (point))
+ (if (= (current-column) 0) 1 0)
+ -1))
+
+ Also see the functions `bolp' and `eolp' in *Note Near Point::.
+These functions do not move point, but test whether it is already at the
+beginning or end of a line.
+
+\1f
+File: lispref.info, Node: Screen Lines, Next: List Motion, Prev: Text Lines, Up: Motion
+
+Motion by Screen Lines
+----------------------
+
+ The line functions in the previous section count text lines,
+delimited only by newline characters. By contrast, these functions
+count screen lines, which are defined by the way the text appears on
+the screen. A text line is a single screen line if it is short enough
+to fit the width of the selected window, but otherwise it may occupy
+several screen lines.
+
+ In some cases, text lines are truncated on the screen rather than
+continued onto additional screen lines. In these cases,
+`vertical-motion' moves point much like `forward-line'. *Note
+Truncation::.
+
+ Because the width of a given string depends on the flags that control
+the appearance of certain characters, `vertical-motion' behaves
+differently, for a given piece of text, depending on the buffer it is
+in, and even on the selected window (because the width, the truncation
+flag, and display table may vary between windows). *Note Usual
+Display::.
+
+ These functions scan text to determine where screen lines break, and
+thus take time proportional to the distance scanned. If you intend to
+use them heavily, Emacs provides caches which may improve the
+performance of your code. *Note cache-long-line-scans: Text Lines.
+
+ - Function: vertical-motion count &optional window pixels
+ 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 may be used to specify a window other than the selected
+ window in which to perform the motion.
+
+ Normally, `vertical-motion' returns the number of lines moved. The
+ value may be less in absolute value than COUNT if the beginning or
+ end of the buffer was reached. If the optional third argument,
+ PIXELS is non-`nil', the vertical pixel height of the motion which
+ took place is returned instead of the actual number of lines
+ moved. A motion of zero lines returns the height of the current
+ line.
+
+ Note that `vertical-motion' sets WINDOW's buffer's point, not
+ 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
+ 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
+ window to move in, and defaults to the selected window. The
+ optional third argument HOW specifies the stopping condition. A
+ negative integer indicates that the motion should be no more than
+ PIXELS. A positive value indicates that the motion should be at
+ 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
+ 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
+ from the top of the window. If COUNT is negative, that specifies a
+ position -COUNT lines from the bottom (or the last line of the
+ buffer, if the buffer ends above the specified screen position).
+
+ If COUNT is `nil', then point moves to the beginning of the line
+ in the middle of the window. If the absolute value of COUNT is
+ greater than the size of the window, then point moves to the place
+ that would appear on that screen line if the window were tall
+ enough. This will probably cause the next redisplay to scroll to
+ bring that location onto the screen.
+
+ In an interactive call, COUNT is the numeric prefix argument.
+
+ The value returned is the window line number point has moved to,
+ with the top line in the window numbered 0.
+
+\1f
+File: lispref.info, Node: List Motion, Next: Skipping Characters, Prev: Screen Lines, Up: Motion
+
+Moving over Balanced Expressions
+--------------------------------
+
+ Here are several functions concerned with balanced-parenthesis
+expressions (also called "sexps" in connection with moving across them
+in XEmacs). The syntax table controls how these functions interpret
+various characters; see *Note Syntax Tables::. *Note Parsing
+Expressions::, for lower-level primitives for scanning sexps or parts of
+sexps. For user-level commands, see *Note Lists and Sexps:
+(emacs)Lists and Sexps.
+
+ - Command: forward-list &optional arg
+ 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
+ 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
+ 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
+ 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
+ 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
+ to 1 if omitted. If ARG is negative, move backward across that
+ many balanced expressions. For example,
+
+ ---------- Buffer: foo ----------
+ (concat-!- "foo " (car x) y z)
+ ---------- Buffer: foo ----------
+
+ (forward-sexp 3)
+ => nil
+
+ ---------- Buffer: foo ----------
+ (concat "foo " (car x) y-!- z)
+ ---------- Buffer: foo ----------
+
+ - 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
+ 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
+ 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
+ 1 if omitted.
+
+ - User Option: defun-prompt-regexp
+ If non-`nil', this variable holds a regular expression that
+ specifies what text can appear before the open-parenthesis that
+ starts a defun. That is to say, a defun begins on a line that
+ starts with a match for this regular expression, followed by a
+ character with open-parenthesis syntax.
+
+\1f
+File: lispref.info, Node: Skipping Characters, Prev: List Motion, Up: Motion
+
+Skipping Characters
+-------------------
+
+ The following two functions move point over a specified set of
+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
+ 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
+ continues until it reaches a character that does not match. The
+ function returns `nil'. BUFFER defaults to the current buffer if
+ omitted.
+
+ The argument CHARACTER-SET is like the inside of a `[...]' in a
+ regular expression except that `]' is never special and `\' quotes
+ `^', `-' or `\'. Thus, `"a-zA-Z"' skips over all letters,
+ stopping before the first non-letter, and `"^a-zA-Z'" skips
+ non-letters stopping before the first letter. *Note Regular
+ Expressions::.
+
+ If LIMIT is supplied (it must be a number or a marker), it
+ specifies the maximum position in the buffer that point can be
+ skipped to. Point will stop at or before LIMIT.
+
+ In the following example, point is initially located directly
+ before the `T'. After the form is evaluated, point is located at
+ the end of that line (between the `t' of `hat' and the newline).
+ The function skips all letters and spaces, but not newlines.
+
+ ---------- Buffer: foo ----------
+ I read "-!-The cat in the hat
+ comes back" twice.
+ ---------- Buffer: foo ----------
+
+ (skip-chars-forward "a-zA-Z ")
+ => nil
+
+ ---------- Buffer: foo ----------
+ I read "The cat in the hat-!-
+ comes back" twice.
+ ---------- Buffer: foo ----------
+
+ - 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.
+
+\1f
File: lispref.info, Node: Excursions, Next: Narrowing, Prev: Motion, Up: Positions
Excursions
- Function: move-marker marker position &optional buffer
This is another name for `set-marker'.
-\1f
-File: lispref.info, Node: The Mark, Next: The Region, Prev: Changing Markers, Up: Markers
-
-The Mark
-========
-
- One special marker in each buffer is designated "the mark". It
-records a position for the user for the sake of commands such as `C-w'
-and `C-x <TAB>'. Lisp programs should set the mark only to values that
-have a potential use to the user, and never for their own internal
-purposes. For example, the `replace-regexp' command sets the mark to
-the value of point before doing any replacements, because this enables
-the user to move back there conveniently after the replace is finished.
-
- Once the mark "exists" in a buffer, it normally never ceases to
-exist. However, it may become "inactive", and usually does so after
-each command (other than simple motion commands and some commands that
-explicitly activate the mark). When the mark is active, the region
-between point and the mark is called the "active region" and is
-highlighted specially.
-
- Many commands are designed so that when called interactively they
-operate on the text between point and the mark. Such commands work
-only when an active region exists, i.e. when the mark is active. (The
-reason for this is to prevent you from accidentally deleting or
-changing large chunks of your text.) If you are writing such a command,
-don't examine the mark directly; instead, use `interactive' with the
-`r' specification. This provides the values of point and the mark as
-arguments to the command in an interactive call, but permits other Lisp
-programs to specify arguments explicitly, and automatically signals an
-error if the command is called interactively when no active region
-exists. *Note Interactive Codes::.
-
- Each buffer has its own value of the mark that is independent of the
-value of the mark in other buffers. (When a buffer is created, the mark
-exists but does not point anywhere. We consider this state as "the
-absence of a mark in that buffer.") However, only one active region can
-exist at a time. Activating the mark in one buffer automatically
-deactivates an active mark in any other buffer. Note that the user can
-explicitly activate a mark at any time by using the command
-`activate-region' (normally bound to `M-C-z') or by using the command
-`exchange-point-and-mark' (normally bound to `C-x C-x'), which has the
-side effect of activating the mark.
-
- Some people do not like active regions, so they disable this behavior
-by setting the variable `zmacs-regions' to `nil'. This makes the mark
-always active (except when a buffer is just created and the mark points
-nowhere), and turns off the highlighting of the region between point
-and the mark. Commands that explicitly retrieve the value of the mark
-should make sure that they behave correctly and consistently
-irrespective of the setting of `zmacs-regions'; some primitives are
-provided to ensure this behavior.
-
- In addition to the mark, each buffer has a "mark ring" which is a
-list of markers containing previous values of the mark. When editing
-commands change the mark, they should normally save the old value of the
-mark on the mark ring. The variable `mark-ring-max' specifies the
-maximum number of entries in the mark ring; once the list becomes this
-long, adding a new element deletes the last element.
-
- - Function: mark &optional force buffer
- This function returns BUFFER's mark position as an integer.
- BUFFER defaults to the current buffer if omitted.
-
- If the mark is inactive, `mark' normally returns `nil'. However,
- if FORCE is non-`nil', then `mark' returns the mark position
- anyway--or `nil', if the mark is not yet set for the buffer.
-
- (Remember that if ZMACS-REGIONS is `nil', the mark is always
- active as long as it exists, and the FORCE argument will have no
- effect.)
-
- 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
- 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
- this marker's position will directly affect the position of the
- mark. Don't do it unless that is the effect you want.
-
- If the mark is inactive, `mark-marker' normally returns `nil'.
- However, if FORCE is non-`nil', then `mark-marker' returns the
- mark anyway.
- (setq m (mark-marker))
- => #<marker at 3420 in markers.texi>
- (set-marker m 100)
- => #<marker at 100 in markers.texi>
- (mark-marker)
- => #<marker at 100 in markers.texi>
-
- Like any marker, this marker can be set to point at any buffer you
- like. We don't recommend that you make it point at any buffer
- 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
- 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.
-
- *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
- be lost. Normally, when a new mark is set, the old one should go
- on the `mark-ring'. For this reason, most applications should use
- `push-mark' and `pop-mark', not `set-mark'.
-
- Novice XEmacs Lisp programmers often try to use the mark for the
- wrong purposes. The mark saves a location for the user's
- convenience. An editing command should not alter the mark unless
- altering the mark is part of the user-level functionality of the
- command. (And, in that case, this effect should be documented.)
- To remember a location for internal use in the Lisp program, store
- it in a Lisp variable. For example:
-
- (let ((beg (point)))
- (forward-line 1)
- (delete-region beg (point))).
-
- - 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
- 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
- of point is used. `push-mark' returns `nil'.
-
- 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.
- To do that, specify `t' for the argument ACTIVATE.
-
- A `Mark set' message is displayed unless NOMSG is non-`nil'.
-
- - Function: pop-mark
- This function pops off the top element of `mark-ring' and makes
- that mark become the buffer's actual mark. This does not move
- point in the buffer, and it does nothing if `mark-ring' is empty.
- It deactivates the mark.
-
- The return value is not meaningful.
-
- - Variable: mark-ring
- The value of this buffer-local variable is the list of saved former
- marks of the current buffer, most recent first.
-
- mark-ring
- => (#<marker at 11050 in markers.texi>
- #<marker at 10832 in markers.texi>
- ...)
-
- - User Option: mark-ring-max
- The value of this variable is the maximum size of `mark-ring'. If
- more marks than this are pushed onto the `mark-ring', `push-mark'
- discards an old mark when it adds a new one.
-
- In additional to a per-buffer mark ring, there is a "global mark
-ring". Marks are pushed onto the global mark ring the first time you
-set a mark after switching buffers.
-
- - Variable: global-mark-ring
- The value of this variable is the list of saved former global
- marks, most recent first.
-
- - User Option: mark-ring-max
- The value of this variable is the maximum size of
- `global-mark-ring'. If more marks than this are pushed onto the
- `global-mark-ring', `push-mark' discards an old mark when it adds
- a new one.
-
- - Command: pop-global-mark
- This function pops a mark off the global mark ring and jumps to
- that location.
-
-\1f
-File: lispref.info, Node: The Region, Prev: The Mark, Up: Markers
-
-The Region
-==========
-
- The text between point and the mark is known as "the region".
-Various functions operate on text delimited by point and the mark, but
-only those functions specifically related to the region itself are
-described here.
-
- When `zmacs-regions' is non-`nil' (this is the default), the concept
-of an "active region" exists. The region is active when the
-corresponding mark is active. Note that only one active region at a
-time can exist--i.e. only one buffer's region is active at a time.
-*Note The Mark::, for more information about active regions.
-
- - User Option: zmacs-regions
- If non-`nil' (the default), active regions are used. *Note The
- Mark::, for a detailed explanation of what this means.
-
- A number of functions are provided for explicitly determining the
-bounds of the region and whether it is active. Few programs need to use
-these functions, however. A command designed to operate on a region
-should normally use `interactive' with the `r' specification to find
-the beginning and end of the region. This lets other Lisp programs
-specify the bounds explicitly as arguments and automatically respects
-the user's setting for ZMACS-REGIONS. (*Note Interactive Codes::.)
-
- - Function: region-beginning &optional buffer
- 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
- buffer if omitted.
-
- 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
- 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
- omitted.
-
- If the mark does not point anywhere, an error is signaled. Note
- that this function ignores whether the region is active.
-
- - Function: region-exists-p
- This function is non-`nil' if the region exists. If active regions
- are in use (i.e. `zmacs-regions' is true), this means that the
- region is active. Otherwise, this means that the user has pushed
- a mark in this buffer at some point in the past. If this function
- returns `nil', a function that uses the `r' interactive
- specification will cause an error when called interactively.
-
- - Function: region-active-p
- If `zmacs-regions' is true, this is equivalent to
- `region-exists-p'. Otherwise, this function always returns false.
- This function is used by commands such as
- `fill-paragraph-or-region' and `capitalize-region-or-word', which
- operate either on the active region or on something else (e.g. the
- word or paragraph at point).
-
- - Variable: zmacs-region-stays
- If a command sets this variable to true, the currently active
- region will remain activated when the command finishes. (Normally
- the region is deactivated when each command terminates.) If
- ZMACS-REGIONS is false, however, this has no effect. Under normal
- circumstances, you do not need to set this; use the interactive
- specification `_' instead, if you want the region to remain active.
-
- - Function: zmacs-activate-region
- This function activates the region in the current buffer (this is
- equivalent to activating the current buffer's mark). This will
- normally also highlight the text in the active region and set
- ZMACS-REGION-STAYS to `t'. (If ZMACS-REGIONS is false, however,
- this function has no effect.)
-
- - Function: zmacs-deactivate-region
- This function deactivates the region in the current buffer (this is
- equivalent to deactivating the current buffer's mark). This will
- normally also unhighlight the text in the active region and set
- ZMACS-REGION-STAYS to `nil'. (If ZMACS-REGIONS is false, however,
- this function has no effect.)
-
- - Function: zmacs-update-region
- This function updates the active region, if it's currently active.
- (If there is no active region, this function does nothing.) This
- has the effect of updating the highlighting on the text in the
- region; but you should never need to call this except under rather
- strange circumstances. The command loop automatically calls it
- when appropriate. Calling this function will call the hook
- `zmacs-update-region-hook', if the region is active.
-
- - Variable: zmacs-activate-region-hook
- This normal hook is called when a region becomes active. (Usually
- this happens as a result of a command that activates the region,
- such as `set-mark-command', `activate-region', or
- `exchange-point-and-mark'.) Note that calling
- `zmacs-activate-region' will call this hook, even if the region is
- already active. If ZMACS-REGIONS is false, however, this hook
- will never get called under any circumstances.
-
- - 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,
- this hook will never get called.
-
- - Variable: zmacs-update-region-hook
- This normal hook is called when an active region is "updated" by
- `zmacs-update-region'. This normally gets called at the end of
- each command that sets ZMACS-REGION-STAYS to `t', indicating that
- the region should remain activated. The motion commands do this.
-
-\1f
-File: lispref.info, Node: Text, Next: Searching and Matching, Prev: Markers, Up: Top
-
-Text
-****
-
- This chapter describes the functions that deal with the text in a
-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::).
-
- 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
-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
-signaled if either START or END is outside the accessible portion of
-the buffer. In an interactive call, point and the mark are used for
-these arguments.
-
- Throughout this chapter, "text" refers to the characters in the
-buffer, together with their properties (when relevant).
-
-* Menu:
-
-* Near Point:: Examining text in the vicinity of point.
-* Buffer Contents:: Examining text in a general fashion.
-* Comparing Text:: Comparing substrings of buffers.
-* Insertion:: Adding new text to a buffer.
-* Commands for Insertion:: User-level commands to insert text.
-* Deletion:: Removing text from a buffer.
-* User-Level Deletion:: User-level commands to delete text.
-* The Kill Ring:: Where removed text sometimes is saved for later use.
-* Undo:: Undoing changes to the text of a buffer.
-* Maintaining Undo:: How to enable and disable undo information.
- How to control how much information is kept.
-* Filling:: Functions for explicit filling.
-* Margins:: How to specify margins for filling commands.
-* Auto Filling:: How auto-fill mode is implemented to break lines.
-* Sorting:: Functions for sorting parts of the buffer.
-* Columns:: Computing horizontal positions, and using them.
-* Indentation:: Functions to insert or adjust indentation.
-* Case Changes:: Case conversion of parts of the buffer.
-* Text Properties:: Assigning Lisp property lists to text characters.
-* Substitution:: Replacing a given character wherever it appears.
-* Registers:: How registers are implemented. Accessing the text or
- position stored in a register.
-* Transposition:: Swapping two portions of a buffer.
-* Change Hooks:: Supplying functions to be run when text is changed.
-* Transformations:: MD5 and base64 support.
-
-\1f
-File: lispref.info, Node: Near Point, Next: Buffer Contents, Up: Text
-
-Examining Text Near Point
-=========================
-
- Many functions are provided to look at the characters around point.
-Several simple functions are described here. See also `looking-at' in
-*Note Regexp Search::.
-
- Many of these functions take an optional BUFFER argument. In all
-such cases, the current buffer will be used if this argument is
-omitted. (In FSF Emacs, and earlier versions of XEmacs, these functions
-usually did not have these optional BUFFER arguments and always
-operated on the current buffer.)
-
- - Function: char-after &optional position 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
- or beyond the end, then the value is `nil'. The default for
- POSITION is point. If optional argument BUFFER is `nil', the
- current buffer is assumed.
-
- In the following example, assume that the first character in the
- buffer is `@':
-
- (char-to-string (char-after 1))
- => "@"
-
- - Function: char-before &optional position buffer
- This function returns the character in the current buffer
- immediately before position POSITION. If POSITION is out of range
- for this purpose, either at or before the beginning of the buffer,
- or beyond the end, then the value is `nil'. The default for
- POSITION is point. If optional argument BUFFER is `nil', the
- current buffer is assumed.
-
- - 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.
- If optional argument BUFFER is `nil', the current buffer is
- assumed.
-
- Remember that point is always between characters, and the terminal
- cursor normally appears over the character following point.
- Therefore, the character returned by `following-char' is the
- character the cursor is over.
-
- In this example, point is between the `a' and the `c'.
-
- ---------- Buffer: foo ----------
- Gentlemen may cry ``Pea-!-ce! Peace!,''
- but there is no peace.
- ---------- Buffer: foo ----------
-
- (char-to-string (preceding-char))
- => "a"
- (char-to-string (following-char))
- => "c"
-
- - 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
- 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
- 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
- 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
- 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.
- The end of the buffer (or of its accessible portion) is always
- considered the end of a line.
-
-\1f
-File: lispref.info, Node: Buffer Contents, Next: Comparing Text, Prev: Near Point, Up: Text
-
-Examining Buffer Contents
-=========================
-
- This section describes two functions that allow a Lisp program to
-convert any portion of the text in the buffer into a string.
-
- - Function: buffer-substring start end &optional buffer
- - Function: buffer-string start end &optional buffer
- 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
- accessible portion of the buffer, `buffer-substring' signals an
- `args-out-of-range' error. If optional argument BUFFER is `nil',
- the current buffer is assumed.
-
- If the region delineated by START and END contains duplicable
- extents, they will be remembered in the string. *Note Duplicable
- Extents::.
-
- It is not necessary for START to be less than END; the arguments
- can be given in either order. But most often the smaller argument
- is written first.
-
- ---------- Buffer: foo ----------
- This is the contents of buffer foo
-
- ---------- Buffer: foo ----------
-
- (buffer-substring 1 10)
- => "This is t"
- (buffer-substring (point-max) 10)
- => "he contents of buffer foo
- "
-
-\1f
-File: lispref.info, Node: Comparing Text, Next: Insertion, Prev: Buffer Contents, Up: Text
-
-Comparing Text
-==============
-
- This function lets you compare portions of the text in a buffer,
-without copying them into strings first.
-
- - Function: compare-buffer-substrings buffer1 start1 end1 buffer2
- start2 end2
- 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.
- The last three arguments specify the other substring in the same
- way. You can use `nil' for BUFFER1, BUFFER2, or both to stand for
- the current buffer.
-
- The value is negative if the first substring is less, positive if
- the first is greater, and zero if they are equal. The absolute
- value of the result is one plus the index of the first differing
- characters within the substrings.
-
- This function ignores case when comparing characters if
- `case-fold-search' is non-`nil'. It always ignores text
- properties.
-
- Suppose the current buffer contains the text `foobarbar
- haha!rara!'; then in this example the two substrings are `rbar '
- and `rara!'. The value is 2 because the first substring is greater
- at the second character.
-
- (compare-buffer-substring nil 6 11 nil 16 21)
- => 2
-
-\1f
-File: lispref.info, Node: Insertion, Next: Commands for Insertion, Prev: Comparing Text, Up: Text
-
-Inserting Text
-==============
-
- "Insertion" means adding new text to a buffer. The inserted text
-goes at point--between the character before point and the character
-after point.
-
- Insertion relocates markers that point at positions after the
-insertion point, so that they stay with the surrounding text (*note
-Markers::). When a marker points at the place of insertion, insertion
-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
-inserted text.
-
- Some insertion functions leave point before the inserted text, while
-other functions leave it after. We call the former insertion "after
-point" and the latter insertion "before point".
-
- If a string with non-`nil' extent data is inserted, the remembered
-extents will also be inserted. *Note Duplicable Extents::.
-
- Insertion functions signal an error if the current buffer is
-read-only.
-
- These functions copy text characters from strings and buffers along
-with their properties. The inserted characters have exactly the same
-properties as the characters they were copied from. By contrast,
-characters specified as separate arguments, not part of a string or
-buffer, inherit their text properties from the neighboring text.
-
- - Function: insert &rest args
- 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
- 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
- value is `nil'.
-
- This function is unlike the other insertion functions in that it
- relocates markers initially pointing at the insertion point, to
- point after the inserted text.
-
- - 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
- 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
- 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
- arguments default to the beginning and end of the accessible
- portion of that buffer.) This function returns `nil'.
-
- In this example, the form is executed with buffer `bar' as the
- current buffer. We assume that buffer `bar' is initially empty.
-
- ---------- Buffer: foo ----------
- We hold these truths to be self-evident, that all
- ---------- Buffer: foo ----------
-
- (insert-buffer-substring "foo" 1 20)
- => nil
-
- ---------- Buffer: bar ----------
- We hold these truth-!-
- ---------- Buffer: bar ----------
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: The Mark, Next: The Region, Prev: Changing Markers, Up: Markers
+
+The Mark
+========
+
+ One special marker in each buffer is designated "the mark". It
+records a position for the user for the sake of commands such as `C-w'
+and `C-x <TAB>'. Lisp programs should set the mark only to values that
+have a potential use to the user, and never for their own internal
+purposes. For example, the `replace-regexp' command sets the mark to
+the value of point before doing any replacements, because this enables
+the user to move back there conveniently after the replace is finished.
+
+ Once the mark "exists" in a buffer, it normally never ceases to
+exist. However, it may become "inactive", and usually does so after
+each command (other than simple motion commands and some commands that
+explicitly activate the mark). When the mark is active, the region
+between point and the mark is called the "active region" and is
+highlighted specially.
+
+ Many commands are designed so that when called interactively they
+operate on the text between point and the mark. Such commands work
+only when an active region exists, i.e. when the mark is active. (The
+reason for this is to prevent you from accidentally deleting or
+changing large chunks of your text.) If you are writing such a command,
+don't examine the mark directly; instead, use `interactive' with the
+`r' specification. This provides the values of point and the mark as
+arguments to the command in an interactive call, but permits other Lisp
+programs to specify arguments explicitly, and automatically signals an
+error if the command is called interactively when no active region
+exists. *Note Interactive Codes::.
+
+ Each buffer has its own value of the mark that is independent of the
+value of the mark in other buffers. (When a buffer is created, the mark
+exists but does not point anywhere. We consider this state as "the
+absence of a mark in that buffer.") However, only one active region can
+exist at a time. Activating the mark in one buffer automatically
+deactivates an active mark in any other buffer. Note that the user can
+explicitly activate a mark at any time by using the command
+`activate-region' (normally bound to `M-C-z') or by using the command
+`exchange-point-and-mark' (normally bound to `C-x C-x'), which has the
+side effect of activating the mark.
+
+ Some people do not like active regions, so they disable this behavior
+by setting the variable `zmacs-regions' to `nil'. This makes the mark
+always active (except when a buffer is just created and the mark points
+nowhere), and turns off the highlighting of the region between point
+and the mark. Commands that explicitly retrieve the value of the mark
+should make sure that they behave correctly and consistently
+irrespective of the setting of `zmacs-regions'; some primitives are
+provided to ensure this behavior.
+
+ In addition to the mark, each buffer has a "mark ring" which is a
+list of markers containing previous values of the mark. When editing
+commands change the mark, they should normally save the old value of the
+mark on the mark ring. The variable `mark-ring-max' specifies the
+maximum number of entries in the mark ring; once the list becomes this
+long, adding a new element deletes the last element.
+
+ - Function: mark &optional force buffer
+ This function returns BUFFER's mark position as an integer.
+ BUFFER defaults to the current buffer if omitted.
+
+ If the mark is inactive, `mark' normally returns `nil'. However,
+ if FORCE is non-`nil', then `mark' returns the mark position
+ anyway--or `nil', if the mark is not yet set for the buffer.
+
+ (Remember that if ZMACS-REGIONS is `nil', the mark is always
+ active as long as it exists, and the FORCE argument will have no
+ effect.)
+
+ 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
+ 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
+ this marker's position will directly affect the position of the
+ mark. Don't do it unless that is the effect you want.
+
+ If the mark is inactive, `mark-marker' normally returns `nil'.
+ However, if FORCE is non-`nil', then `mark-marker' returns the
+ mark anyway.
+ (setq m (mark-marker))
+ => #<marker at 3420 in markers.texi>
+ (set-marker m 100)
+ => #<marker at 100 in markers.texi>
+ (mark-marker)
+ => #<marker at 100 in markers.texi>
+
+ Like any marker, this marker can be set to point at any buffer you
+ like. We don't recommend that you make it point at any buffer
+ 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
+ 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.
+
+ *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
+ be lost. Normally, when a new mark is set, the old one should go
+ on the `mark-ring'. For this reason, most applications should use
+ `push-mark' and `pop-mark', not `set-mark'.
+
+ Novice XEmacs Lisp programmers often try to use the mark for the
+ wrong purposes. The mark saves a location for the user's
+ convenience. An editing command should not alter the mark unless
+ altering the mark is part of the user-level functionality of the
+ command. (And, in that case, this effect should be documented.)
+ To remember a location for internal use in the Lisp program, store
+ it in a Lisp variable. For example:
+
+ (let ((beg (point)))
+ (forward-line 1)
+ (delete-region beg (point))).
+
+ - 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
+ 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
+ of point is used. `push-mark' returns `nil'.
+
+ 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.
+ To do that, specify `t' for the argument ACTIVATE.
+
+ A `Mark set' message is displayed unless NOMSG is non-`nil'.
+
+ - Function: pop-mark
+ This function pops off the top element of `mark-ring' and makes
+ that mark become the buffer's actual mark. This does not move
+ point in the buffer, and it does nothing if `mark-ring' is empty.
+ It deactivates the mark.
+
+ The return value is not meaningful.
+
+ - Variable: mark-ring
+ The value of this buffer-local variable is the list of saved former
+ marks of the current buffer, most recent first.
+
+ mark-ring
+ => (#<marker at 11050 in markers.texi>
+ #<marker at 10832 in markers.texi>
+ ...)
+
+ - User Option: mark-ring-max
+ The value of this variable is the maximum size of `mark-ring'. If
+ more marks than this are pushed onto the `mark-ring', `push-mark'
+ discards an old mark when it adds a new one.
+
+ In additional to a per-buffer mark ring, there is a "global mark
+ring". Marks are pushed onto the global mark ring the first time you
+set a mark after switching buffers.
+
+ - Variable: global-mark-ring
+ The value of this variable is the list of saved former global
+ marks, most recent first.
+
+ - User Option: mark-ring-max
+ The value of this variable is the maximum size of
+ `global-mark-ring'. If more marks than this are pushed onto the
+ `global-mark-ring', `push-mark' discards an old mark when it adds
+ a new one.
+
+ - Command: pop-global-mark
+ This function pops a mark off the global mark ring and jumps to
+ that location.
+
+\1f
+File: lispref.info, Node: The Region, Prev: The Mark, Up: Markers
+
+The Region
+==========
+
+ The text between point and the mark is known as "the region".
+Various functions operate on text delimited by point and the mark, but
+only those functions specifically related to the region itself are
+described here.
+
+ When `zmacs-regions' is non-`nil' (this is the default), the concept
+of an "active region" exists. The region is active when the
+corresponding mark is active. Note that only one active region at a
+time can exist--i.e. only one buffer's region is active at a time.
+*Note The Mark::, for more information about active regions.
+
+ - User Option: zmacs-regions
+ If non-`nil' (the default), active regions are used. *Note The
+ Mark::, for a detailed explanation of what this means.
+
+ A number of functions are provided for explicitly determining the
+bounds of the region and whether it is active. Few programs need to use
+these functions, however. A command designed to operate on a region
+should normally use `interactive' with the `r' specification to find
+the beginning and end of the region. This lets other Lisp programs
+specify the bounds explicitly as arguments and automatically respects
+the user's setting for ZMACS-REGIONS. (*Note Interactive Codes::.)
+
+ - Function: region-beginning &optional buffer
+ 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
+ buffer if omitted.
+
+ 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
+ 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
+ omitted.
+
+ If the mark does not point anywhere, an error is signaled. Note
+ that this function ignores whether the region is active.
+
+ - Function: region-exists-p
+ This function is non-`nil' if the region exists. If active regions
+ are in use (i.e. `zmacs-regions' is true), this means that the
+ region is active. Otherwise, this means that the user has pushed
+ a mark in this buffer at some point in the past. If this function
+ returns `nil', a function that uses the `r' interactive
+ specification will cause an error when called interactively.
+
+ - Function: region-active-p
+ If `zmacs-regions' is true, this is equivalent to
+ `region-exists-p'. Otherwise, this function always returns false.
+ This function is used by commands such as
+ `fill-paragraph-or-region' and `capitalize-region-or-word', which
+ operate either on the active region or on something else (e.g. the
+ word or paragraph at point).
+
+ - Variable: zmacs-region-stays
+ If a command sets this variable to true, the currently active
+ region will remain activated when the command finishes. (Normally
+ the region is deactivated when each command terminates.) If
+ ZMACS-REGIONS is false, however, this has no effect. Under normal
+ circumstances, you do not need to set this; use the interactive
+ specification `_' instead, if you want the region to remain active.
+
+ - Function: zmacs-activate-region
+ This function activates the region in the current buffer (this is
+ equivalent to activating the current buffer's mark). This will
+ normally also highlight the text in the active region and set
+ ZMACS-REGION-STAYS to `t'. (If ZMACS-REGIONS is false, however,
+ this function has no effect.)
+
+ - Function: zmacs-deactivate-region
+ This function deactivates the region in the current buffer (this is
+ equivalent to deactivating the current buffer's mark). This will
+ normally also unhighlight the text in the active region and set
+ ZMACS-REGION-STAYS to `nil'. (If ZMACS-REGIONS is false, however,
+ this function has no effect.)
+
+ - Function: zmacs-update-region
+ This function updates the active region, if it's currently active.
+ (If there is no active region, this function does nothing.) This
+ has the effect of updating the highlighting on the text in the
+ region; but you should never need to call this except under rather
+ strange circumstances. The command loop automatically calls it
+ when appropriate. Calling this function will call the hook
+ `zmacs-update-region-hook', if the region is active.
+
+ - Variable: zmacs-activate-region-hook
+ This normal hook is called when a region becomes active. (Usually
+ this happens as a result of a command that activates the region,
+ such as `set-mark-command', `activate-region', or
+ `exchange-point-and-mark'.) Note that calling
+ `zmacs-activate-region' will call this hook, even if the region is
+ already active. If ZMACS-REGIONS is false, however, this hook
+ will never get called under any circumstances.
+
+ - 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,
+ this hook will never get called.
+
+ - Variable: zmacs-update-region-hook
+ This normal hook is called when an active region is "updated" by
+ `zmacs-update-region'. This normally gets called at the end of
+ each command that sets ZMACS-REGION-STAYS to `t', indicating that
+ the region should remain activated. The motion commands do this.
+
+\1f
+File: lispref.info, Node: Text, Next: Searching and Matching, Prev: Markers, Up: Top
+
+Text
+****
+
+ This chapter describes the functions that deal with the text in a
+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::).
+
+ 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
+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
+signaled if either START or END is outside the accessible portion of
+the buffer. In an interactive call, point and the mark are used for
+these arguments.
+
+ Throughout this chapter, "text" refers to the characters in the
+buffer, together with their properties (when relevant).
+
+* Menu:
+
+* Near Point:: Examining text in the vicinity of point.
+* Buffer Contents:: Examining text in a general fashion.
+* Comparing Text:: Comparing substrings of buffers.
+* Insertion:: Adding new text to a buffer.
+* Commands for Insertion:: User-level commands to insert text.
+* Deletion:: Removing text from a buffer.
+* User-Level Deletion:: User-level commands to delete text.
+* The Kill Ring:: Where removed text sometimes is saved for later use.
+* Undo:: Undoing changes to the text of a buffer.
+* Maintaining Undo:: How to enable and disable undo information.
+ How to control how much information is kept.
+* Filling:: Functions for explicit filling.
+* Margins:: How to specify margins for filling commands.
+* Auto Filling:: How auto-fill mode is implemented to break lines.
+* Sorting:: Functions for sorting parts of the buffer.
+* Columns:: Computing horizontal positions, and using them.
+* Indentation:: Functions to insert or adjust indentation.
+* Case Changes:: Case conversion of parts of the buffer.
+* Text Properties:: Assigning Lisp property lists to text characters.
+* Substitution:: Replacing a given character wherever it appears.
+* Registers:: How registers are implemented. Accessing the text or
+ position stored in a register.
+* Transposition:: Swapping two portions of a buffer.
+* Change Hooks:: Supplying functions to be run when text is changed.
+* Transformations:: MD5 and base64 support.
+
+\1f
+File: lispref.info, Node: Near Point, Next: Buffer Contents, Up: Text
+
+Examining Text Near Point
+=========================
+
+ Many functions are provided to look at the characters around point.
+Several simple functions are described here. See also `looking-at' in
+*Note Regexp Search::.
+
+ Many of these functions take an optional BUFFER argument. In all
+such cases, the current buffer will be used if this argument is
+omitted. (In FSF Emacs, and earlier versions of XEmacs, these functions
+usually did not have these optional BUFFER arguments and always
+operated on the current buffer.)
+
+ - Function: char-after &optional position 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
+ or beyond the end, then the value is `nil'. The default for
+ POSITION is point. If optional argument BUFFER is `nil', the
+ current buffer is assumed.
+
+ In the following example, assume that the first character in the
+ buffer is `@':
+
+ (char-to-string (char-after 1))
+ => "@"
+
+ - Function: char-before &optional position buffer
+ This function returns the character in the current buffer
+ immediately before position POSITION. If POSITION is out of range
+ for this purpose, either at or before the beginning of the buffer,
+ or beyond the end, then the value is `nil'. The default for
+ POSITION is point. If optional argument BUFFER is `nil', the
+ current buffer is assumed.
+
+ - 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.
+ If optional argument BUFFER is `nil', the current buffer is
+ assumed.
+
+ Remember that point is always between characters, and the terminal
+ cursor normally appears over the character following point.
+ Therefore, the character returned by `following-char' is the
+ character the cursor is over.
+
+ In this example, point is between the `a' and the `c'.
+
+ ---------- Buffer: foo ----------
+ Gentlemen may cry ``Pea-!-ce! Peace!,''
+ but there is no peace.
+ ---------- Buffer: foo ----------
+
+ (char-to-string (preceding-char))
+ => "a"
+ (char-to-string (following-char))
+ => "c"
+
+ - 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
+ 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
+ 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
+ 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
+ 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.
+ The end of the buffer (or of its accessible portion) is always
+ considered the end of a line.
+
+\1f
+File: lispref.info, Node: Buffer Contents, Next: Comparing Text, Prev: Near Point, Up: Text
+
+Examining Buffer Contents
+=========================
+
+ This section describes two functions that allow a Lisp program to
+convert any portion of the text in the buffer into a string.
+
+ - Function: buffer-substring start end &optional buffer
+ - Function: buffer-string start end &optional buffer
+ 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
+ accessible portion of the buffer, `buffer-substring' signals an
+ `args-out-of-range' error. If optional argument BUFFER is `nil',
+ the current buffer is assumed.
+
+ If the region delineated by START and END contains duplicable
+ extents, they will be remembered in the string. *Note Duplicable
+ Extents::.
+
+ It is not necessary for START to be less than END; the arguments
+ can be given in either order. But most often the smaller argument
+ is written first.
+
+ ---------- Buffer: foo ----------
+ This is the contents of buffer foo
+
+ ---------- Buffer: foo ----------
+
+ (buffer-substring 1 10)
+ => "This is t"
+ (buffer-substring (point-max) 10)
+ => "he contents of buffer foo
+ "
+
+\1f
+File: lispref.info, Node: Comparing Text, Next: Insertion, Prev: Buffer Contents, Up: Text
+
+Comparing Text
+==============
+
+ This function lets you compare portions of the text in a buffer,
+without copying them into strings first.
+
+ - Function: compare-buffer-substrings buffer1 start1 end1 buffer2
+ start2 end2
+ 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.
+ The last three arguments specify the other substring in the same
+ way. You can use `nil' for BUFFER1, BUFFER2, or both to stand for
+ the current buffer.
+
+ The value is negative if the first substring is less, positive if
+ the first is greater, and zero if they are equal. The absolute
+ value of the result is one plus the index of the first differing
+ characters within the substrings.
+
+ This function ignores case when comparing characters if
+ `case-fold-search' is non-`nil'. It always ignores text
+ properties.
+
+ Suppose the current buffer contains the text `foobarbar
+ haha!rara!'; then in this example the two substrings are `rbar '
+ and `rara!'. The value is 2 because the first substring is greater
+ at the second character.
+
+ (compare-buffer-substring nil 6 11 nil 16 21)
+ => 2
+
+\1f
+File: lispref.info, Node: Insertion, Next: Commands for Insertion, Prev: Comparing Text, Up: Text
+
+Inserting Text
+==============
+
+ "Insertion" means adding new text to a buffer. The inserted text
+goes at point--between the character before point and the character
+after point.
+
+ Insertion relocates markers that point at positions after the
+insertion point, so that they stay with the surrounding text (*note
+Markers::). When a marker points at the place of insertion, insertion
+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
+inserted text.
+
+ Some insertion functions leave point before the inserted text, while
+other functions leave it after. We call the former insertion "after
+point" and the latter insertion "before point".
+
+ If a string with non-`nil' extent data is inserted, the remembered
+extents will also be inserted. *Note Duplicable Extents::.
+
+ Insertion functions signal an error if the current buffer is
+read-only.
+
+ These functions copy text characters from strings and buffers along
+with their properties. The inserted characters have exactly the same
+properties as the characters they were copied from. By contrast,
+characters specified as separate arguments, not part of a string or
+buffer, inherit their text properties from the neighboring text.
+
+ - Function: insert &rest args
+ 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
+ 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
+ value is `nil'.
+
+ This function is unlike the other insertion functions in that it
+ relocates markers initially pointing at the insertion point, to
+ point after the inserted text.
+
+ - 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
+ 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
+ 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
+ arguments default to the beginning and end of the accessible
+ portion of that buffer.) This function returns `nil'.
+
+ In this example, the form is executed with buffer `bar' as the
+ current buffer. We assume that buffer `bar' is initially empty.
+
+ ---------- Buffer: foo ----------
+ We hold these truths to be self-evident, that all
+ ---------- Buffer: foo ----------
+
+ (insert-buffer-substring "foo" 1 20)
+ => nil
+
+ ---------- Buffer: bar ----------
+ We hold these truth-!-
+ ---------- Buffer: bar ----------
+
+\1f
File: lispref.info, Node: Commands for Insertion, Next: Deletion, Prev: Insertion, Up: Text
User-Level Insertion Commands
The normal use of this hook is to set the X server's primary
selection to the newly killed text.
-\1f
-File: lispref.info, Node: Internals of Kill Ring, Prev: Low-Level Kill Ring, Up: The Kill Ring
-
-Internals of the Kill Ring
---------------------------
-
- The variable `kill-ring' holds the kill ring contents, in the form
-of a list of strings. The most recent kill is always at the front of
-the list.
-
- The `kill-ring-yank-pointer' variable points to a link in the kill
-ring list, whose CAR is the text to yank next. We say it identifies
-the "front" of the ring. Moving `kill-ring-yank-pointer' to a
-different link is called "rotating the kill ring". We call the kill
-ring a "ring" because the functions that move the yank pointer wrap
-around from the end of the list to the beginning, or vice-versa.
-Rotation of the kill ring is virtual; it does not change the value of
-`kill-ring'.
-
- Both `kill-ring' and `kill-ring-yank-pointer' are Lisp variables
-whose values are normally lists. The word "pointer" in the name of the
-`kill-ring-yank-pointer' indicates that the variable's purpose is to
-identify one element of the list for use by the next yank command.
-
- The value of `kill-ring-yank-pointer' is always `eq' to one of the
-links in the kill ring list. The element it identifies is the CAR of
-that link. Kill commands, which change the kill ring, also set this
-variable to the value of `kill-ring'. The effect is to rotate the ring
-so that the newly killed text is at the front.
-
- Here is a diagram that shows the variable `kill-ring-yank-pointer'
-pointing to the second entry in the kill ring `("some text" "a
-different piece of text" "yet older text")'.
-
- kill-ring kill-ring-yank-pointer
- | |
- | ___ ___ ---> ___ ___ ___ ___
- --> |___|___|------> |___|___|--> |___|___|--> nil
- | | |
- | | |
- | | -->"yet older text"
- | |
- | --> "a different piece of text"
- |
- --> "some text"
-
-This state of affairs might occur after `C-y' (`yank') immediately
-followed by `M-y' (`yank-pop').
-
- - Variable: kill-ring
- This variable holds the list of killed text sequences, most
- recently killed first.
-
- - Variable: kill-ring-yank-pointer
- This variable's value indicates which element of the kill ring is
- at the "front" of the ring for yanking. More precisely, the value
- is a tail of the value of `kill-ring', and its CAR is the kill
- string that `C-y' should yank.
-
- - User Option: kill-ring-max
- The value of this variable is the maximum length to which the kill
- ring can grow, before elements are thrown away at the end. The
- default value for `kill-ring-max' is 30.
-
-\1f
-File: lispref.info, Node: Undo, Next: Maintaining Undo, Prev: The Kill Ring, Up: Text
-
-Undo
-====
-
- Most buffers have an "undo list", which records all changes made to
-the buffer's text so that they can be undone. (The buffers that don't
-have one are usually special-purpose buffers for which XEmacs assumes
-that undoing is not useful.) All the primitives that modify the text
-in the buffer automatically add elements to the front of the undo list,
-which is in the variable `buffer-undo-list'.
-
- - Variable: buffer-undo-list
- This variable's value is the undo list of the current buffer. A
- value of `t' disables the recording of undo information.
-
- Here are the kinds of elements an undo list can have:
-
-`INTEGER'
- This kind of element records a previous value of point. Ordinary
- cursor motion does not get any sort of undo record, but deletion
- commands use these entries to record where point was before the
- command.
-
-`(BEG . END)'
- This kind of element indicates how to delete text that was
- inserted. Upon insertion, the text occupied the range BEG-END in
- the buffer.
-
-`(TEXT . POSITION)'
- This kind of element indicates how to reinsert text that was
- deleted. The deleted text itself is the string TEXT. The place to
- reinsert it is `(abs POSITION)'.
-
-`(t HIGH . LOW)'
- This kind of element indicates that an unmodified buffer became
- modified. The elements HIGH and LOW are two integers, each
- recording 16 bits of the visited file's modification time as of
- when it was previously visited or saved. `primitive-undo' uses
- those values to determine whether to mark the buffer as unmodified
- once again; it does so only if the file's modification time
- matches those numbers.
-
-`(nil PROPERTY VALUE BEG . END)'
- This kind of element records a change in a text property. Here's
- how you might undo the change:
-
- (put-text-property BEG END PROPERTY VALUE)
-
-`POSITION'
- This element indicates where point was at an earlier time.
- Undoing this element sets point to POSITION. Deletion normally
- creates an element of this kind as well as a reinsertion element.
-
-`nil'
- This element is a boundary. The elements between two boundaries
- are called a "change group"; normally, each change group
- corresponds to one keyboard command, and undo commands normally
- undo an entire group as a unit.
-
- - Function: undo-boundary
- This function places a boundary element in the undo list. The undo
- command stops at such a boundary, and successive undo commands undo
- to earlier and earlier boundaries. This function returns `nil'.
-
- The editor command loop automatically creates an undo boundary
- before each key sequence is executed. Thus, each undo normally
- undoes the effects of one command. Self-inserting input
- characters are an exception. The command loop makes a boundary
- for the first such character; the next 19 consecutive
- self-inserting input characters do not make boundaries, and then
- the 20th does, and so on as long as self-inserting characters
- continue.
-
- All buffer modifications add a boundary whenever the previous
- undoable change was made in some other buffer. This way, a
- command that modifies several buffers makes a boundary in each
- buffer it changes.
-
- Calling this function explicitly is useful for splitting the
- effects of a command into more than one unit. For example,
- `query-replace' calls `undo-boundary' after each replacement, so
- that the user can undo individual replacements one by one.
-
- - 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
- to have it in C.
-
- `primitive-undo' adds elements to the buffer's undo list when it
- changes the buffer. Undo commands avoid confusion by saving the
- undo list value at the beginning of a sequence of undo operations.
- Then the undo operations use and update the saved value. The new
- elements added by undoing are not part of this saved value, so
- they don't interfere with continuing to undo.
-
-\1f
-File: lispref.info, Node: Maintaining Undo, Next: Filling, Prev: Undo, Up: Text
-
-Maintaining Undo Lists
-======================
-
- This section describes how to enable and disable undo information for
-a given buffer. It also explains how the undo list is truncated
-automatically so it doesn't get too big.
-
- Recording of undo information in a newly created buffer is normally
-enabled to start with; but if the buffer name starts with a space, the
-undo recording is initially disabled. You can explicitly enable or
-disable undo recording with the following two functions, or by setting
-`buffer-undo-list' yourself.
-
- - Command: buffer-enable-undo &optional buffer-or-name
- 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
- function does nothing if undo recording is already enabled in the
- buffer. It returns `nil'.
-
- 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
- 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
- changes. If the undo list of BUFFER is already disabled, this
- function has no effect.
-
- This function returns `nil'. It cannot be called interactively.
-
- The name `buffer-flush-undo' is not considered obsolete, but the
- preferred name `buffer-disable-undo' is new as of Emacs versions
- 19.
-
- As editing continues, undo lists get longer and longer. To prevent
-them from using up all available memory space, garbage collection trims
-them back to size limits you can set. (For this purpose, the "size" of
-an undo list measures the cons cells that make up the list, plus the
-strings of deleted text.) Two variables control the range of acceptable
-sizes: `undo-limit' and `undo-strong-limit'.
-
- - Variable: undo-limit
- This is the soft limit for the acceptable size of an undo list.
- The change group at which this size is exceeded is the last one
- kept.
-
- - Variable: undo-strong-limit
- This is the upper limit for the acceptable size of an undo list.
- The change group at which this size is exceeded is discarded
- itself (along with all older change groups). There is one
- exception: the very latest change group is never discarded no
- matter how big it is.
-
-\1f
-File: lispref.info, Node: Filling, Next: Margins, Prev: Maintaining Undo, Up: Text
-
-Filling
-=======
-
- "Filling" means adjusting the lengths of lines (by moving the line
-breaks) so that they are nearly (but no greater than) a specified
-maximum width. Additionally, lines can be "justified", which means
-inserting spaces to make the left and/or right margins line up
-precisely. The width is controlled by the variable `fill-column'. For
-ease of reading, lines should be no longer than 70 or so columns.
-
- You can use Auto Fill mode (*note Auto Filling::) to fill text
-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
-filling functions don't actually do anything.
-
- Several of the filling functions have an argument JUSTIFY. If it is
-non-`nil', that requests some kind of justification. It can be `left',
-`right', `full', or `center', to request a specific style of
-justification. If it is `t', that means to use the current
-justification style for this part of the text (see
-`current-justification', below).
-
- When you call the filling functions interactively, using a prefix
-argument implies the value `full' for 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
- 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
- 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
- the same fashion.
-
- The first two arguments, START and END, are the beginning and end
- of the region to be filled. The third and fourth arguments,
- JUSTIFY and MAIL-FLAG, are optional. If JUSTIFY is non-`nil', the
- paragraphs are justified as well as filled. If MAIL-FLAG is
- non-`nil', it means the function is operating on a mail message
- and therefore should not fill the header lines.
-
- Ordinarily, `fill-individual-paragraphs' regards each change in
- indentation as starting a new paragraph. If
- `fill-individual-varying-indent' is non-`nil', then only separator
- lines separate paragraphs. That mode can handle indented
- paragraphs with additional indentation on the first line.
-
- - User Option: fill-individual-varying-indent
- This variable alters the action of `fill-individual-paragraphs' as
- described above.
-
- - 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
- as filling when JUSTIFY is non-`nil'.
-
- In an interactive call, any prefix argument requests justification.
-
- In Adaptive Fill mode, which is enabled by default,
- `fill-region-as-paragraph' on an indented paragraph when there is
- no fill prefix uses the indentation of the second line of the
- paragraph as the fill prefix.
-
- - 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'.
-
- The argument HOW, if non-`nil' specifies explicitly the style of
- justification. It can be `left', `right', `full', `center', or
- `none'. If it is `t', that means to do follow specified
- justification style (see `current-justification', below). `nil'
- means to do full justification.
-
- If EOP is non-`nil', that means do left-justification when
- `current-justification' specifies full justification. This is used
- for the last line of a paragraph; even if the paragraph as a whole
- is fully justified, the last line should not be.
-
- If NOSQUEEZE is non-`nil', that means do not change interior
- whitespace.
-
- - User Option: default-justification
- This variable's value specifies the style of justification to use
- for text that doesn't specify a style with a text property. The
- possible values are `left', `right', `full', `center', or `none'.
- The default value is `left'.
-
- - Function: current-justification
- This function returns the proper justification style to use for
- filling the text around point.
-
- - Variable: fill-paragraph-function
- This variable provides a way for major modes to override the
- filling of paragraphs. If the value is non-`nil',
- `fill-paragraph' calls this function to do the work. If the
- function returns a non-`nil' value, `fill-paragraph' assumes the
- job is done, and immediately returns that value.
-
- The usual use of this feature is to fill comments in programming
- language modes. If the function needs to fill a paragraph in the
- usual way, it can do so as follows:
-
- (let ((fill-paragraph-function nil))
- (fill-paragraph arg))
-
- - Variable: use-hard-newlines
- If this variable is non-`nil', the filling functions do not delete
- newlines that have the `hard' text property. These "hard
- newlines" act as paragraph separators.
-
-\1f
-File: lispref.info, Node: Margins, Next: Auto Filling, Prev: Filling, Up: Text
-
-Margins for Filling
-===================
-
- - User Option: fill-prefix
- This variable specifies a string of text that appears at the
- beginning of normal text lines and should be disregarded when
- filling them. Any line that fails to start with the fill prefix
- is considered the start of a paragraph; so is any line that starts
- with the fill prefix followed by additional whitespace. Lines
- that start with the fill prefix but no additional whitespace are
- ordinary text lines that can be filled together. The resulting
- filled lines also start with the fill prefix.
-
- The fill prefix follows the left margin whitespace, if any.
-
- - User Option: fill-column
- This buffer-local variable specifies the maximum width of filled
- 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::).
-
- 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 line will be too long for people to read comfortably, and this
- can make the text seem clumsy.
-
- - Variable: default-fill-column
- The value of this variable is the default value for `fill-column'
- in buffers that do not override it. This is the same as
- `(default-value 'fill-column)'.
-
- The default value for `default-fill-column' is 70.
-
- - 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
- 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.
-
- - Function: current-left-margin
- This function returns the proper left margin value to use for
- filling the text around point. The value is the sum of the
- `left-margin' property of the character at the start of the
- current line (or zero if none), and the value of the variable
- `left-margin'.
-
- - Function: current-fill-column
- This function returns the proper fill column value to use for
- filling the text around point. The value is the value of the
- `fill-column' variable, minus the value of the `right-margin'
- property of the character after point.
-
- - 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',
- `move-to-left-margin' moves forward N-1 lines first.
-
- 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
- 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
- function delete non-whitespace.
-
- - Function: indent-to-left-margin
- This is the default `indent-line-function', used in Fundamental
- mode, Text mode, etc. Its effect is to adjust the indentation at
- the beginning of the current line to the value specified by the
- variable `left-margin'. This may involve either inserting or
- deleting whitespace.
-
- - Variable: left-margin
- This variable specifies the base left margin column. In
- Fundamental mode, <LFD> indents to this column. This variable
- automatically becomes buffer-local when set in any fashion.
-
-\1f
-File: lispref.info, Node: Auto Filling, Next: Sorting, Prev: Margins, Up: Text
-
-Auto Filling
-============
-
- Auto Fill mode is a minor mode that fills lines automatically as text
-is inserted. This section describes the hook used by Auto Fill mode.
-For a description of functions that you can call explicitly to fill and
-justify existing text, see *Note Filling::.
-
- Auto Fill mode also enables the functions that change the margins and
-justification style to refill portions of the text. *Note Margins::.
-
- - Variable: auto-fill-function
- The value of this variable should be a function (of no arguments)
- to be called after self-inserting a space or a newline. It may be
- `nil', in which case nothing special is done in that case.
-
- The value of `auto-fill-function' is `do-auto-fill' when Auto-Fill
- mode is enabled. That is a function whose sole purpose is to
- implement the usual strategy for breaking a line.
-
- In older Emacs versions, this variable was named
- `auto-fill-hook', but since it is not called with the
- standard convention for hooks, it was renamed to
- `auto-fill-function' in version 19.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Internals of Kill Ring, Prev: Low-Level Kill Ring, Up: The Kill Ring
+
+Internals of the Kill Ring
+--------------------------
+
+ The variable `kill-ring' holds the kill ring contents, in the form
+of a list of strings. The most recent kill is always at the front of
+the list.
+
+ The `kill-ring-yank-pointer' variable points to a link in the kill
+ring list, whose CAR is the text to yank next. We say it identifies
+the "front" of the ring. Moving `kill-ring-yank-pointer' to a
+different link is called "rotating the kill ring". We call the kill
+ring a "ring" because the functions that move the yank pointer wrap
+around from the end of the list to the beginning, or vice-versa.
+Rotation of the kill ring is virtual; it does not change the value of
+`kill-ring'.
+
+ Both `kill-ring' and `kill-ring-yank-pointer' are Lisp variables
+whose values are normally lists. The word "pointer" in the name of the
+`kill-ring-yank-pointer' indicates that the variable's purpose is to
+identify one element of the list for use by the next yank command.
+
+ The value of `kill-ring-yank-pointer' is always `eq' to one of the
+links in the kill ring list. The element it identifies is the CAR of
+that link. Kill commands, which change the kill ring, also set this
+variable to the value of `kill-ring'. The effect is to rotate the ring
+so that the newly killed text is at the front.
+
+ Here is a diagram that shows the variable `kill-ring-yank-pointer'
+pointing to the second entry in the kill ring `("some text" "a
+different piece of text" "yet older text")'.
+
+ kill-ring kill-ring-yank-pointer
+ | |
+ | ___ ___ ---> ___ ___ ___ ___
+ --> |___|___|------> |___|___|--> |___|___|--> nil
+ | | |
+ | | |
+ | | -->"yet older text"
+ | |
+ | --> "a different piece of text"
+ |
+ --> "some text"
+
+This state of affairs might occur after `C-y' (`yank') immediately
+followed by `M-y' (`yank-pop').
+
+ - Variable: kill-ring
+ This variable holds the list of killed text sequences, most
+ recently killed first.
+
+ - Variable: kill-ring-yank-pointer
+ This variable's value indicates which element of the kill ring is
+ at the "front" of the ring for yanking. More precisely, the value
+ is a tail of the value of `kill-ring', and its CAR is the kill
+ string that `C-y' should yank.
+
+ - User Option: kill-ring-max
+ The value of this variable is the maximum length to which the kill
+ ring can grow, before elements are thrown away at the end. The
+ default value for `kill-ring-max' is 30.
+
+\1f
+File: lispref.info, Node: Undo, Next: Maintaining Undo, Prev: The Kill Ring, Up: Text
+
+Undo
+====
+
+ Most buffers have an "undo list", which records all changes made to
+the buffer's text so that they can be undone. (The buffers that don't
+have one are usually special-purpose buffers for which XEmacs assumes
+that undoing is not useful.) All the primitives that modify the text
+in the buffer automatically add elements to the front of the undo list,
+which is in the variable `buffer-undo-list'.
+
+ - Variable: buffer-undo-list
+ This variable's value is the undo list of the current buffer. A
+ value of `t' disables the recording of undo information.
+
+ Here are the kinds of elements an undo list can have:
+
+`INTEGER'
+ This kind of element records a previous value of point. Ordinary
+ cursor motion does not get any sort of undo record, but deletion
+ commands use these entries to record where point was before the
+ command.
+
+`(BEG . END)'
+ This kind of element indicates how to delete text that was
+ inserted. Upon insertion, the text occupied the range BEG-END in
+ the buffer.
+
+`(TEXT . POSITION)'
+ This kind of element indicates how to reinsert text that was
+ deleted. The deleted text itself is the string TEXT. The place to
+ reinsert it is `(abs POSITION)'.
+
+`(t HIGH . LOW)'
+ This kind of element indicates that an unmodified buffer became
+ modified. The elements HIGH and LOW are two integers, each
+ recording 16 bits of the visited file's modification time as of
+ when it was previously visited or saved. `primitive-undo' uses
+ those values to determine whether to mark the buffer as unmodified
+ once again; it does so only if the file's modification time
+ matches those numbers.
+
+`(nil PROPERTY VALUE BEG . END)'
+ This kind of element records a change in a text property. Here's
+ how you might undo the change:
+
+ (put-text-property BEG END PROPERTY VALUE)
+
+`POSITION'
+ This element indicates where point was at an earlier time.
+ Undoing this element sets point to POSITION. Deletion normally
+ creates an element of this kind as well as a reinsertion element.
+
+`nil'
+ This element is a boundary. The elements between two boundaries
+ are called a "change group"; normally, each change group
+ corresponds to one keyboard command, and undo commands normally
+ undo an entire group as a unit.
+
+ - Function: undo-boundary
+ This function places a boundary element in the undo list. The undo
+ command stops at such a boundary, and successive undo commands undo
+ to earlier and earlier boundaries. This function returns `nil'.
+
+ The editor command loop automatically creates an undo boundary
+ before each key sequence is executed. Thus, each undo normally
+ undoes the effects of one command. Self-inserting input
+ characters are an exception. The command loop makes a boundary
+ for the first such character; the next 19 consecutive
+ self-inserting input characters do not make boundaries, and then
+ the 20th does, and so on as long as self-inserting characters
+ continue.
+
+ All buffer modifications add a boundary whenever the previous
+ undoable change was made in some other buffer. This way, a
+ command that modifies several buffers makes a boundary in each
+ buffer it changes.
+
+ Calling this function explicitly is useful for splitting the
+ effects of a command into more than one unit. For example,
+ `query-replace' calls `undo-boundary' after each replacement, so
+ that the user can undo individual replacements one by one.
+
+ - 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
+ to have it in C.
+
+ `primitive-undo' adds elements to the buffer's undo list when it
+ changes the buffer. Undo commands avoid confusion by saving the
+ undo list value at the beginning of a sequence of undo operations.
+ Then the undo operations use and update the saved value. The new
+ elements added by undoing are not part of this saved value, so
+ they don't interfere with continuing to undo.
+
+\1f
+File: lispref.info, Node: Maintaining Undo, Next: Filling, Prev: Undo, Up: Text
+
+Maintaining Undo Lists
+======================
+
+ This section describes how to enable and disable undo information for
+a given buffer. It also explains how the undo list is truncated
+automatically so it doesn't get too big.
+
+ Recording of undo information in a newly created buffer is normally
+enabled to start with; but if the buffer name starts with a space, the
+undo recording is initially disabled. You can explicitly enable or
+disable undo recording with the following two functions, or by setting
+`buffer-undo-list' yourself.
+
+ - Command: buffer-enable-undo &optional buffer-or-name
+ 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
+ function does nothing if undo recording is already enabled in the
+ buffer. It returns `nil'.
+
+ 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
+ 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
+ changes. If the undo list of BUFFER is already disabled, this
+ function has no effect.
+
+ This function returns `nil'. It cannot be called interactively.
+
+ The name `buffer-flush-undo' is not considered obsolete, but the
+ preferred name `buffer-disable-undo' is new as of Emacs versions
+ 19.
+
+ As editing continues, undo lists get longer and longer. To prevent
+them from using up all available memory space, garbage collection trims
+them back to size limits you can set. (For this purpose, the "size" of
+an undo list measures the cons cells that make up the list, plus the
+strings of deleted text.) Two variables control the range of acceptable
+sizes: `undo-limit' and `undo-strong-limit'.
+
+ - Variable: undo-limit
+ This is the soft limit for the acceptable size of an undo list.
+ The change group at which this size is exceeded is the last one
+ kept.
+
+ - Variable: undo-strong-limit
+ This is the upper limit for the acceptable size of an undo list.
+ The change group at which this size is exceeded is discarded
+ itself (along with all older change groups). There is one
+ exception: the very latest change group is never discarded no
+ matter how big it is.
+
+\1f
+File: lispref.info, Node: Filling, Next: Margins, Prev: Maintaining Undo, Up: Text
+
+Filling
+=======
+
+ "Filling" means adjusting the lengths of lines (by moving the line
+breaks) so that they are nearly (but no greater than) a specified
+maximum width. Additionally, lines can be "justified", which means
+inserting spaces to make the left and/or right margins line up
+precisely. The width is controlled by the variable `fill-column'. For
+ease of reading, lines should be no longer than 70 or so columns.
+
+ You can use Auto Fill mode (*note Auto Filling::) to fill text
+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
+filling functions don't actually do anything.
+
+ Several of the filling functions have an argument JUSTIFY. If it is
+non-`nil', that requests some kind of justification. It can be `left',
+`right', `full', or `center', to request a specific style of
+justification. If it is `t', that means to use the current
+justification style for this part of the text (see
+`current-justification', below).
+
+ When you call the filling functions interactively, using a prefix
+argument implies the value `full' for 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
+ 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
+ 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
+ the same fashion.
+
+ The first two arguments, START and END, are the beginning and end
+ of the region to be filled. The third and fourth arguments,
+ JUSTIFY and MAIL-FLAG, are optional. If JUSTIFY is non-`nil', the
+ paragraphs are justified as well as filled. If MAIL-FLAG is
+ non-`nil', it means the function is operating on a mail message
+ and therefore should not fill the header lines.
+
+ Ordinarily, `fill-individual-paragraphs' regards each change in
+ indentation as starting a new paragraph. If
+ `fill-individual-varying-indent' is non-`nil', then only separator
+ lines separate paragraphs. That mode can handle indented
+ paragraphs with additional indentation on the first line.
+
+ - User Option: fill-individual-varying-indent
+ This variable alters the action of `fill-individual-paragraphs' as
+ described above.
+
+ - 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
+ as filling when JUSTIFY is non-`nil'.
+
+ In an interactive call, any prefix argument requests justification.
+
+ In Adaptive Fill mode, which is enabled by default,
+ `fill-region-as-paragraph' on an indented paragraph when there is
+ no fill prefix uses the indentation of the second line of the
+ paragraph as the fill prefix.
+
+ - 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'.
+
+ The argument HOW, if non-`nil' specifies explicitly the style of
+ justification. It can be `left', `right', `full', `center', or
+ `none'. If it is `t', that means to do follow specified
+ justification style (see `current-justification', below). `nil'
+ means to do full justification.
+
+ If EOP is non-`nil', that means do left-justification when
+ `current-justification' specifies full justification. This is used
+ for the last line of a paragraph; even if the paragraph as a whole
+ is fully justified, the last line should not be.
+
+ If NOSQUEEZE is non-`nil', that means do not change interior
+ whitespace.
+
+ - User Option: default-justification
+ This variable's value specifies the style of justification to use
+ for text that doesn't specify a style with a text property. The
+ possible values are `left', `right', `full', `center', or `none'.
+ The default value is `left'.
+
+ - Function: current-justification
+ This function returns the proper justification style to use for
+ filling the text around point.
+
+ - Variable: fill-paragraph-function
+ This variable provides a way for major modes to override the
+ filling of paragraphs. If the value is non-`nil',
+ `fill-paragraph' calls this function to do the work. If the
+ function returns a non-`nil' value, `fill-paragraph' assumes the
+ job is done, and immediately returns that value.
+
+ The usual use of this feature is to fill comments in programming
+ language modes. If the function needs to fill a paragraph in the
+ usual way, it can do so as follows:
+
+ (let ((fill-paragraph-function nil))
+ (fill-paragraph arg))
+
+ - Variable: use-hard-newlines
+ If this variable is non-`nil', the filling functions do not delete
+ newlines that have the `hard' text property. These "hard
+ newlines" act as paragraph separators.
+
+\1f
+File: lispref.info, Node: Margins, Next: Auto Filling, Prev: Filling, Up: Text
+
+Margins for Filling
+===================
+
+ - User Option: fill-prefix
+ This variable specifies a string of text that appears at the
+ beginning of normal text lines and should be disregarded when
+ filling them. Any line that fails to start with the fill prefix
+ is considered the start of a paragraph; so is any line that starts
+ with the fill prefix followed by additional whitespace. Lines
+ that start with the fill prefix but no additional whitespace are
+ ordinary text lines that can be filled together. The resulting
+ filled lines also start with the fill prefix.
+
+ The fill prefix follows the left margin whitespace, if any.
+
+ - User Option: fill-column
+ This buffer-local variable specifies the maximum width of filled
+ 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::).
+
+ 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 line will be too long for people to read comfortably, and this
+ can make the text seem clumsy.
+
+ - Variable: default-fill-column
+ The value of this variable is the default value for `fill-column'
+ in buffers that do not override it. This is the same as
+ `(default-value 'fill-column)'.
+
+ The default value for `default-fill-column' is 70.
+
+ - 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
+ 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.
+
+ - Function: current-left-margin
+ This function returns the proper left margin value to use for
+ filling the text around point. The value is the sum of the
+ `left-margin' property of the character at the start of the
+ current line (or zero if none), and the value of the variable
+ `left-margin'.
+
+ - Function: current-fill-column
+ This function returns the proper fill column value to use for
+ filling the text around point. The value is the value of the
+ `fill-column' variable, minus the value of the `right-margin'
+ property of the character after point.
+
+ - 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',
+ `move-to-left-margin' moves forward N-1 lines first.
+
+ 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
+ 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
+ function delete non-whitespace.
+
+ - Function: indent-to-left-margin
+ This is the default `indent-line-function', used in Fundamental
+ mode, Text mode, etc. Its effect is to adjust the indentation at
+ the beginning of the current line to the value specified by the
+ variable `left-margin'. This may involve either inserting or
+ deleting whitespace.
+
+ - Variable: left-margin
+ This variable specifies the base left margin column. In
+ Fundamental mode, <LFD> indents to this column. This variable
+ automatically becomes buffer-local when set in any fashion.
+
+\1f
+File: lispref.info, Node: Auto Filling, Next: Sorting, Prev: Margins, Up: Text
+
+Auto Filling
+============
+
+ Auto Fill mode is a minor mode that fills lines automatically as text
+is inserted. This section describes the hook used by Auto Fill mode.
+For a description of functions that you can call explicitly to fill and
+justify existing text, see *Note Filling::.
+
+ Auto Fill mode also enables the functions that change the margins and
+justification style to refill portions of the text. *Note Margins::.
+
+ - Variable: auto-fill-function
+ The value of this variable should be a function (of no arguments)
+ to be called after self-inserting a space or a newline. It may be
+ `nil', in which case nothing special is done in that case.
+
+ The value of `auto-fill-function' is `do-auto-fill' when Auto-Fill
+ mode is enabled. That is a function whose sole purpose is to
+ implement the usual strategy for breaking a line.
+
+ In older Emacs versions, this variable was named
+ `auto-fill-hook', but since it is not called with the
+ standard convention for hooks, it was renamed to
+ `auto-fill-function' in version 19.
+
+\1f
File: lispref.info, Node: Sorting, Next: Columns, Prev: Auto Filling, Up: Text
Sorting Text
* Saving Properties:: Saving text properties in files, and reading
them back.
-\1f
-File: lispref.info, Node: Examining Properties, Next: Changing Properties, Up: Text Properties
-
-Examining Text Properties
--------------------------
-
- The simplest way to examine text properties is to ask for the value
-of a particular property of a particular character. For that, use
-`get-text-property'. Use `text-properties-at' to get the entire
-property list of a character. *Note Property Search::, for functions
-to examine the properties of a number of characters at once.
-
- These functions handle both strings and buffers. (Keep in mind that
-positions in a string start from 0, whereas positions in a buffer start
-from 1.)
-
- - 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
- 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
- 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.
-
- - Variable: default-text-properties
- This variable holds a property list giving default values for text
- properties. Whenever a character does not specify a value for a
- property, the value stored in this list is used instead. Here is
- an example:
-
- (setq default-text-properties '(foo 69))
- ;; Make sure character 1 has no properties of its own.
- (set-text-properties 1 2 nil)
- ;; What we get, when we ask, is the default value.
- (get-text-property 1 'foo)
- => 69
-
-\1f
-File: lispref.info, Node: Changing Properties, Next: Property Search, Prev: Examining Properties, Up: Text Properties
-
-Changing Text Properties
-------------------------
-
- The primitives for changing properties apply to a specified range of
-text. The function `set-text-properties' (see end of section) sets the
-entire property list of the text in that range; more often, it is
-useful to add, change, or delete just certain properties specified by
-name.
-
- Since text properties are considered part of the buffer's contents,
-and can affect how the buffer looks on the screen, any change in the
-text properties is considered a buffer modification. Buffer text
-property changes are undoable (*note Undo::).
-
- - 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
- 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::):
- a list whose elements include the property names followed
- alternately by the corresponding values.
-
- The return value is `t' if the function actually changed some
- property's value; `nil' otherwise (if PROPS is `nil' or its values
- agree with those in the text).
-
- For example, here is how to set the `comment' and `face'
- properties of a range of text:
-
- (add-text-properties START END
- '(comment t face highlight))
-
- - 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::):
- 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
- `face' property.
-
- (remove-text-properties START END '(face nil))
-
- The return value is `t' if the function actually changed some
- 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
- 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.
-
- The argument PROPS is the new property list. It should be a list
- whose elements are property names alternating with corresponding
- values.
-
- After `set-text-properties' returns, all the characters in the
- specified range have identical properties.
-
- If PROPS is `nil', the effect is to get rid of all properties from
- the specified range of text. Here's an example:
-
- (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
-its properties.
-
-\1f
-File: lispref.info, Node: Property Search, Next: Special Properties, Prev: Changing Properties, Up: Text Properties
-
-Property Search Functions
--------------------------
-
- In typical use of text properties, most of the time several or many
-consecutive characters have the same value for a property. Rather than
-writing your programs to examine characters one by one, it is much
-faster to process chunks of text that have the same property value.
-
- Here are functions you can use to do this. They use `eq' for
-comparing property values. In all cases, OBJECT defaults to the
-current buffer.
-
- For high performance, it's very important to use the LIMIT argument
-to these functions, especially the ones that search for a single
-property--otherwise, they may spend a long time scanning to the end of
-the buffer, if the property you are interested in does not change.
-
- Remember that a position is always between two characters; the
-position returned by these functions is between two characters with
-different properties.
-
- - 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
- words, it returns the position of the first character beyond POS
- whose properties are not identical to those of the character just
- after POS.
-
- If LIMIT is non-`nil', then the scan ends at position LIMIT. If
- there is no property change before that point,
- `next-property-change' returns LIMIT.
-
- The value is `nil' if the properties remain unchanged all the way
- to the end of OBJECT and LIMIT is `nil'. If the value is
- non-`nil', it is a position greater than or equal to POS. The
- value equals POS only when LIMIT equals POS.
-
- Here is an example of how to scan the buffer by chunks of text
- within which all properties are constant:
-
- (while (not (eobp))
- (let ((plist (text-properties-at (point)))
- (next-change
- (or (next-property-change (point) (current-buffer))
- (point-max))))
- Process text from point to NEXT-CHANGE...
- (goto-char next-change)))
-
- - 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
- words, it returns the position of the first character beyond POS
- whose PROP property differs from that of the character just after
- POS.
-
- If LIMIT is non-`nil', then the scan ends at position LIMIT. If
- there is no property change before that point,
- `next-single-property-change' returns LIMIT.
-
- The value is `nil' if the property remains unchanged all the way to
- the end of OBJECT and LIMIT is `nil'. If the value is non-`nil',
- 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
- 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
- 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
- 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.
- Otherwise, it returns `nil'.
-
- The optional fifth argument, OBJECT, specifies the string or
- 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
- 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
- character. Otherwise, it returns `nil'.
-
- The optional fifth argument, OBJECT, specifies the string or
- buffer to scan. Positions are relative to OBJECT. The default
- for OBJECT is the current buffer.
-
-\1f
-File: lispref.info, Node: Special Properties, Next: Saving Properties, Prev: Property Search, Up: Text Properties
-
-Properties with Special Meanings
---------------------------------
-
- The predefined properties are the same as those for extents. *Note
-Extent Properties::.
-
-\1f
-File: lispref.info, Node: Saving Properties, Prev: Special Properties, Up: Text Properties
-
-Saving Text Properties in Files
--------------------------------
-
- You can save text properties in files, and restore text properties
-when inserting the files, using these two hooks:
-
- - Variable: write-region-annotate-functions
- This variable's value is a list of functions for `write-region' to
- run to encode text properties in some fashion as annotations to
- the text being written in the file. *Note Writing to Files::.
-
- Each function in the list is called with two arguments: the start
- and end of the region to be written. These functions should not
- alter the contents of the buffer. Instead, they should return
- lists indicating annotations to write in the file in addition to
- the text in the buffer.
-
- Each function should return a list of elements of the form
- `(POSITION . STRING)', where POSITION is an integer specifying the
- relative position in the text to be written, and STRING is the
- annotation to add there.
-
- Each list returned by one of these functions must be already
- sorted in increasing order by POSITION. If there is more than one
- function, `write-region' merges the lists destructively into one
- sorted list.
-
- When `write-region' actually writes the text from the buffer to the
- file, it intermixes the specified annotations at the corresponding
- positions. All this takes place without modifying the buffer.
-
- - Variable: after-insert-file-functions
- This variable holds a list of functions for `insert-file-contents'
- to call after inserting a file's contents. These functions should
- scan the inserted text for annotations, and convert them to the
- text properties they stand for.
-
- Each function receives one argument, the length of the inserted
- text; point indicates the start of that text. The function should
- scan that text for annotations, delete them, and create the text
- properties that the annotations specify. The function should
- return the updated length of the inserted text, as it stands after
- those changes. The value returned by one function becomes the
- argument to the next function.
-
- These functions should always return with point at the beginning of
- the inserted text.
-
- The intended use of `after-insert-file-functions' is for converting
- some sort of textual annotations into actual text properties. But
- other uses may be possible.
-
- We invite users to write Lisp programs to store and retrieve text
-properties in files, using these hooks, and thus to experiment with
-various data formats and find good ones. Eventually we hope users will
-produce good, general extensions we can install in Emacs.
-
- We suggest not trying to handle arbitrary Lisp objects as property
-names or property values--because a program that general is probably
-difficult to write, and slow. Instead, choose a set of possible data
-types that are reasonably flexible, and not too hard to encode.
-
- *Note Format Conversion::, for a related feature.
-
-\1f
-File: lispref.info, Node: Substitution, Next: Registers, Prev: Text Properties, Up: Text
-
-Substituting for a Character Code
-=================================
-
- The following functions replace characters within a specified region
-based on their character codes.
-
- - Function: subst-char-in-region start end old-char new-char &optional
- noundo
- 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::).
-
- `subst-char-in-region' does not move point and returns `nil'.
-
- ---------- Buffer: foo ----------
- This is the contents of the buffer before.
- ---------- Buffer: foo ----------
-
- (subst-char-in-region 1 20 ?i ?X)
- => nil
-
- ---------- Buffer: foo ----------
- ThXs Xs the contents of the buffer before.
- ---------- Buffer: foo ----------
-
- - 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.
-
- If TABLE is a string, its Nth element is the mapping for the
- character with code N.
-
- If TABLE is a vector, its Nth element is the mapping for character
- with code N. Legal mappings are characters, strings, or `nil'
- (meaning don't replace.)
-
- If TABLE is a char-table, its elements describe the mapping
- between characters and their replacements. The char-table should
- be of type `char' or `generic'.
-
- When the TABLE is a string or vector and its length is less than
- the total number of characters (256 without Mule), any characters
- with codes larger than the length of TABLE are not altered by the
- translation.
-
- The return value of `translate-region' is the number of characters
- that were actually changed by the translation. This does not
- count characters that were mapped into themselves in the
- translation table.
-
- *NOTE*: Prior to XEmacs 21.2, the TABLE argument was allowed only
- to be a string. This is still the case in FSF Emacs.
-
- The following example creates a char-table that is passed to
- `translate-region', which translates character `a' to `the letter
- a', removes character `b', and translates character `c' to newline.
-
- ---------- Buffer: foo ----------
- Here is a sentence in the buffer.
- ---------- Buffer: foo ----------
-
- (let ((table (make-char-table 'generic)))
- (put-char-table ?a "the letter a" table)
- (put-char-table ?b "" table)
- (put-char-table ?c ?\n table)
- (translate-region (point-min) (point-max) table))
- => 3
-
- ---------- Buffer: foo ----------
- Here is the letter a senten
- e in the uffer.
- ---------- Buffer: foo ----------
-
-\1f
-File: lispref.info, Node: Registers, Next: Transposition, Prev: Substitution, Up: Text
-
-Registers
-=========
-
- A register is a sort of variable used in XEmacs editing that can
-hold a marker, a string, a rectangle, a window configuration (of one
-frame), or a frame configuration (of all frames). Each register is
-named by a single character. All characters, including control and
-meta characters (but with the exception of `C-g'), can be used to name
-registers. Thus, there are 255 possible registers. A register is
-designated in Emacs Lisp by a character that is its name.
-
- The functions in this section return unpredictable values unless
-otherwise stated.
-
- - Variable: register-alist
- This variable is an alist of elements of the form `(NAME .
- CONTENTS)'. Normally, there is one element for each XEmacs
- register that has been used.
-
- The object NAME is a character (an integer) identifying the
- register. The object CONTENTS is a string, marker, or list
- representing the register contents. A string represents text
- stored in the register. A marker represents a position. A list
- represents a rectangle; its elements are strings, one per line of
- the rectangle.
-
- - 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
- 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
- This command displays what is contained in register REG.
-
- - Command: insert-register reg &optional beforep
- This command inserts contents of register REG into the current
- buffer.
-
- Normally, this command puts point before the inserted text, and the
- mark after it. However, if the optional second argument BEFOREP
- is non-`nil', it puts the mark before and point after. You can
- pass a non-`nil' second argument BEFOREP to this function
- interactively by supplying any prefix argument.
-
- If the register contains a rectangle, then the rectangle is
- inserted with its upper left corner at point. This means that
- text is inserted in the current line and underneath it on
- successive lines.
-
- If the register contains something other than saved text (a
- string) or a rectangle (a list), currently useless things happen.
- This may be changed in the future.
-
-\1f
-File: lispref.info, Node: Transposition, Next: Change Hooks, Prev: Registers, Up: Text
-
-Transposition of Text
-=====================
-
- This subroutine is used by the transposition commands.
-
- - 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.
-
- Normally, `transpose-regions' relocates markers with the transposed
- text; a marker previously positioned within one of the two
- transposed portions moves along with that portion, thus remaining
- between the same two characters in their new position. However,
- if LEAVE-MARKERS is non-`nil', `transpose-regions' does not do
- this--it leaves all markers unrelocated.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Examining Properties, Next: Changing Properties, Up: Text Properties
+
+Examining Text Properties
+-------------------------
+
+ The simplest way to examine text properties is to ask for the value
+of a particular property of a particular character. For that, use
+`get-text-property'. Use `text-properties-at' to get the entire
+property list of a character. *Note Property Search::, for functions
+to examine the properties of a number of characters at once.
+
+ These functions handle both strings and buffers. (Keep in mind that
+positions in a string start from 0, whereas positions in a buffer start
+from 1.)
+
+ - 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
+ 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
+ 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.
+
+ - Variable: default-text-properties
+ This variable holds a property list giving default values for text
+ properties. Whenever a character does not specify a value for a
+ property, the value stored in this list is used instead. Here is
+ an example:
+
+ (setq default-text-properties '(foo 69))
+ ;; Make sure character 1 has no properties of its own.
+ (set-text-properties 1 2 nil)
+ ;; What we get, when we ask, is the default value.
+ (get-text-property 1 'foo)
+ => 69
+
+\1f
+File: lispref.info, Node: Changing Properties, Next: Property Search, Prev: Examining Properties, Up: Text Properties
+
+Changing Text Properties
+------------------------
+
+ The primitives for changing properties apply to a specified range of
+text. The function `set-text-properties' (see end of section) sets the
+entire property list of the text in that range; more often, it is
+useful to add, change, or delete just certain properties specified by
+name.
+
+ Since text properties are considered part of the buffer's contents,
+and can affect how the buffer looks on the screen, any change in the
+text properties is considered a buffer modification. Buffer text
+property changes are undoable (*note Undo::).
+
+ - 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
+ 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::):
+ a list whose elements include the property names followed
+ alternately by the corresponding values.
+
+ The return value is `t' if the function actually changed some
+ property's value; `nil' otherwise (if PROPS is `nil' or its values
+ agree with those in the text).
+
+ For example, here is how to set the `comment' and `face'
+ properties of a range of text:
+
+ (add-text-properties START END
+ '(comment t face highlight))
+
+ - 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::):
+ 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
+ `face' property.
+
+ (remove-text-properties START END '(face nil))
+
+ The return value is `t' if the function actually changed some
+ 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
+ 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.
+
+ The argument PROPS is the new property list. It should be a list
+ whose elements are property names alternating with corresponding
+ values.
+
+ After `set-text-properties' returns, all the characters in the
+ specified range have identical properties.
+
+ If PROPS is `nil', the effect is to get rid of all properties from
+ the specified range of text. Here's an example:
+
+ (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
+its properties.
+
+\1f
+File: lispref.info, Node: Property Search, Next: Special Properties, Prev: Changing Properties, Up: Text Properties
+
+Property Search Functions
+-------------------------
+
+ In typical use of text properties, most of the time several or many
+consecutive characters have the same value for a property. Rather than
+writing your programs to examine characters one by one, it is much
+faster to process chunks of text that have the same property value.
+
+ Here are functions you can use to do this. They use `eq' for
+comparing property values. In all cases, OBJECT defaults to the
+current buffer.
+
+ For high performance, it's very important to use the LIMIT argument
+to these functions, especially the ones that search for a single
+property--otherwise, they may spend a long time scanning to the end of
+the buffer, if the property you are interested in does not change.
+
+ Remember that a position is always between two characters; the
+position returned by these functions is between two characters with
+different properties.
+
+ - 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
+ words, it returns the position of the first character beyond POS
+ whose properties are not identical to those of the character just
+ after POS.
+
+ If LIMIT is non-`nil', then the scan ends at position LIMIT. If
+ there is no property change before that point,
+ `next-property-change' returns LIMIT.
+
+ The value is `nil' if the properties remain unchanged all the way
+ to the end of OBJECT and LIMIT is `nil'. If the value is
+ non-`nil', it is a position greater than or equal to POS. The
+ value equals POS only when LIMIT equals POS.
+
+ Here is an example of how to scan the buffer by chunks of text
+ within which all properties are constant:
+
+ (while (not (eobp))
+ (let ((plist (text-properties-at (point)))
+ (next-change
+ (or (next-property-change (point) (current-buffer))
+ (point-max))))
+ Process text from point to NEXT-CHANGE...
+ (goto-char next-change)))
+
+ - 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
+ words, it returns the position of the first character beyond POS
+ whose PROP property differs from that of the character just after
+ POS.
+
+ If LIMIT is non-`nil', then the scan ends at position LIMIT. If
+ there is no property change before that point,
+ `next-single-property-change' returns LIMIT.
+
+ The value is `nil' if the property remains unchanged all the way to
+ the end of OBJECT and LIMIT is `nil'. If the value is non-`nil',
+ 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
+ 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
+ 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
+ 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.
+ Otherwise, it returns `nil'.
+
+ The optional fifth argument, OBJECT, specifies the string or
+ 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
+ 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
+ character. Otherwise, it returns `nil'.
+
+ The optional fifth argument, OBJECT, specifies the string or
+ buffer to scan. Positions are relative to OBJECT. The default
+ for OBJECT is the current buffer.
+
+\1f
+File: lispref.info, Node: Special Properties, Next: Saving Properties, Prev: Property Search, Up: Text Properties
+
+Properties with Special Meanings
+--------------------------------
+
+ The predefined properties are the same as those for extents. *Note
+Extent Properties::.
+
+\1f
+File: lispref.info, Node: Saving Properties, Prev: Special Properties, Up: Text Properties
+
+Saving Text Properties in Files
+-------------------------------
+
+ You can save text properties in files, and restore text properties
+when inserting the files, using these two hooks:
+
+ - Variable: write-region-annotate-functions
+ This variable's value is a list of functions for `write-region' to
+ run to encode text properties in some fashion as annotations to
+ the text being written in the file. *Note Writing to Files::.
+
+ Each function in the list is called with two arguments: the start
+ and end of the region to be written. These functions should not
+ alter the contents of the buffer. Instead, they should return
+ lists indicating annotations to write in the file in addition to
+ the text in the buffer.
+
+ Each function should return a list of elements of the form
+ `(POSITION . STRING)', where POSITION is an integer specifying the
+ relative position in the text to be written, and STRING is the
+ annotation to add there.
+
+ Each list returned by one of these functions must be already
+ sorted in increasing order by POSITION. If there is more than one
+ function, `write-region' merges the lists destructively into one
+ sorted list.
+
+ When `write-region' actually writes the text from the buffer to the
+ file, it intermixes the specified annotations at the corresponding
+ positions. All this takes place without modifying the buffer.
+
+ - Variable: after-insert-file-functions
+ This variable holds a list of functions for `insert-file-contents'
+ to call after inserting a file's contents. These functions should
+ scan the inserted text for annotations, and convert them to the
+ text properties they stand for.
+
+ Each function receives one argument, the length of the inserted
+ text; point indicates the start of that text. The function should
+ scan that text for annotations, delete them, and create the text
+ properties that the annotations specify. The function should
+ return the updated length of the inserted text, as it stands after
+ those changes. The value returned by one function becomes the
+ argument to the next function.
+
+ These functions should always return with point at the beginning of
+ the inserted text.
+
+ The intended use of `after-insert-file-functions' is for converting
+ some sort of textual annotations into actual text properties. But
+ other uses may be possible.
+
+ We invite users to write Lisp programs to store and retrieve text
+properties in files, using these hooks, and thus to experiment with
+various data formats and find good ones. Eventually we hope users will
+produce good, general extensions we can install in Emacs.
+
+ We suggest not trying to handle arbitrary Lisp objects as property
+names or property values--because a program that general is probably
+difficult to write, and slow. Instead, choose a set of possible data
+types that are reasonably flexible, and not too hard to encode.
+
+ *Note Format Conversion::, for a related feature.
+
+\1f
+File: lispref.info, Node: Substitution, Next: Registers, Prev: Text Properties, Up: Text
+
+Substituting for a Character Code
+=================================
+
+ The following functions replace characters within a specified region
+based on their character codes.
+
+ - Function: subst-char-in-region start end old-char new-char &optional
+ noundo
+ 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::).
+
+ `subst-char-in-region' does not move point and returns `nil'.
+
+ ---------- Buffer: foo ----------
+ This is the contents of the buffer before.
+ ---------- Buffer: foo ----------
+
+ (subst-char-in-region 1 20 ?i ?X)
+ => nil
+
+ ---------- Buffer: foo ----------
+ ThXs Xs the contents of the buffer before.
+ ---------- Buffer: foo ----------
+
+ - 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.
+
+ If TABLE is a string, its Nth element is the mapping for the
+ character with code N.
+
+ If TABLE is a vector, its Nth element is the mapping for character
+ with code N. Legal mappings are characters, strings, or `nil'
+ (meaning don't replace.)
+
+ If TABLE is a char-table, its elements describe the mapping
+ between characters and their replacements. The char-table should
+ be of type `char' or `generic'.
+
+ When the TABLE is a string or vector and its length is less than
+ the total number of characters (256 without Mule), any characters
+ with codes larger than the length of TABLE are not altered by the
+ translation.
+
+ The return value of `translate-region' is the number of characters
+ that were actually changed by the translation. This does not
+ count characters that were mapped into themselves in the
+ translation table.
+
+ *NOTE*: Prior to XEmacs 21.2, the TABLE argument was allowed only
+ to be a string. This is still the case in FSF Emacs.
+
+ The following example creates a char-table that is passed to
+ `translate-region', which translates character `a' to `the letter
+ a', removes character `b', and translates character `c' to newline.
+
+ ---------- Buffer: foo ----------
+ Here is a sentence in the buffer.
+ ---------- Buffer: foo ----------
+
+ (let ((table (make-char-table 'generic)))
+ (put-char-table ?a "the letter a" table)
+ (put-char-table ?b "" table)
+ (put-char-table ?c ?\n table)
+ (translate-region (point-min) (point-max) table))
+ => 3
+
+ ---------- Buffer: foo ----------
+ Here is the letter a senten
+ e in the uffer.
+ ---------- Buffer: foo ----------
+
+\1f
+File: lispref.info, Node: Registers, Next: Transposition, Prev: Substitution, Up: Text
+
+Registers
+=========
+
+ A register is a sort of variable used in XEmacs editing that can
+hold a marker, a string, a rectangle, a window configuration (of one
+frame), or a frame configuration (of all frames). Each register is
+named by a single character. All characters, including control and
+meta characters (but with the exception of `C-g'), can be used to name
+registers. Thus, there are 255 possible registers. A register is
+designated in Emacs Lisp by a character that is its name.
+
+ The functions in this section return unpredictable values unless
+otherwise stated.
+
+ - Variable: register-alist
+ This variable is an alist of elements of the form `(NAME .
+ CONTENTS)'. Normally, there is one element for each XEmacs
+ register that has been used.
+
+ The object NAME is a character (an integer) identifying the
+ register. The object CONTENTS is a string, marker, or list
+ representing the register contents. A string represents text
+ stored in the register. A marker represents a position. A list
+ represents a rectangle; its elements are strings, one per line of
+ the rectangle.
+
+ - 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
+ 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
+ This command displays what is contained in register REG.
+
+ - Command: insert-register reg &optional beforep
+ This command inserts contents of register REG into the current
+ buffer.
+
+ Normally, this command puts point before the inserted text, and the
+ mark after it. However, if the optional second argument BEFOREP
+ is non-`nil', it puts the mark before and point after. You can
+ pass a non-`nil' second argument BEFOREP to this function
+ interactively by supplying any prefix argument.
+
+ If the register contains a rectangle, then the rectangle is
+ inserted with its upper left corner at point. This means that
+ text is inserted in the current line and underneath it on
+ successive lines.
+
+ If the register contains something other than saved text (a
+ string) or a rectangle (a list), currently useless things happen.
+ This may be changed in the future.
+
+\1f
+File: lispref.info, Node: Transposition, Next: Change Hooks, Prev: Registers, Up: Text
+
+Transposition of Text
+=====================
+
+ This subroutine is used by the transposition commands.
+
+ - 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.
+
+ Normally, `transpose-regions' relocates markers with the transposed
+ text; a marker previously positioned within one of the two
+ transposed portions moves along with that portion, thus remaining
+ between the same two characters in their new position. However,
+ if LEAVE-MARKERS is non-`nil', `transpose-regions' does not do
+ this--it leaves all markers unrelocated.
+
+\1f
File: lispref.info, Node: Change Hooks, Next: Transformations, Prev: Transposition, Up: Text
Change Hooks
(re-search-forward
(concat "\\s-" (regexp-quote string) "\\s-"))
-\1f
-File: lispref.info, Node: Regexp Example, Prev: Syntax of Regexps, Up: Regular Expressions
-
-Complex Regexp Example
-----------------------
-
- Here is a complicated regexp, used by XEmacs to recognize the end of
-a sentence together with any whitespace that follows. It is the value
-of the variable `sentence-end'.
-
- First, we show the regexp as a string in Lisp syntax to distinguish
-spaces from tab characters. The string constant begins and ends with a
-double-quote. `\"' stands for a double-quote as part of the string,
-`\\' for a backslash as part of the string, `\t' for a tab and `\n' for
-a newline.
-
- "[.?!][]\"')}]*\\($\\| $\\|\t\\| \\)[ \t\n]*"
-
- In contrast, if you evaluate the variable `sentence-end', you will
-see the following:
-
- sentence-end
- =>
- "[.?!][]\"')}]*\\($\\| $\\| \\| \\)[
- ]*"
-
-In this output, tab and newline appear as themselves.
-
- This regular expression contains four parts in succession and can be
-deciphered as follows:
-
-`[.?!]'
- The first part of the pattern is a character set that matches any
- one of three characters: period, question mark, and exclamation
- mark. The match must begin with one of these three characters.
-
-`[]\"')}]*'
- The second part of the pattern matches any closing braces and
- quotation marks, zero or more of them, that may follow the period,
- question mark or exclamation mark. The `\"' is Lisp syntax for a
- double-quote in a string. The `*' at the end indicates that the
- immediately preceding regular expression (a character set, in this
- case) may be repeated zero or more times.
-
-`\\($\\| $\\|\t\\| \\)'
- The third part of the pattern matches the whitespace that follows
- the end of a sentence: the end of a line, or a tab, or two spaces.
- The double backslashes mark the parentheses and vertical bars as
- regular expression syntax; the parentheses delimit a group and the
- vertical bars separate alternatives. The dollar sign is used to
- match the end of a line.
-
-`[ \t\n]*'
- Finally, the last part of the pattern matches any additional
- whitespace beyond the minimum needed to end a sentence.
-
-\1f
-File: lispref.info, Node: Regexp Search, Next: POSIX Regexps, Prev: Regular Expressions, Up: Searching and Matching
-
-Regular Expression Searching
-============================
-
- In XEmacs, you can search for the next match for a regexp either
-incrementally or not. Incremental search commands are described in the
-`The XEmacs Reference Manual'. *Note Regular Expression Search:
-(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
- 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
- REGEXP, and leaves point at the end of the first match found. It
- returns the new value of point.
-
- If LIMIT is non-`nil' (it must be a position in the current
- buffer), then it is the upper bound to the search. No match
- extending after that position is accepted.
-
- What happens when the search fails depends on the value of
- NOERROR. If NOERROR is `nil', a `search-failed' error is
- signaled. If NOERROR is `t', `re-search-forward' does nothing and
- returns `nil'. If NOERROR is neither `nil' nor `t', then
- `re-search-forward' moves point to LIMIT (or the end of the
- buffer) and returns `nil'.
-
- If REPEAT is supplied (it must be a positive number), then the
- search is repeated that many times (each time starting at the end
- of the previous time's match). If these successive searches
- succeed, the function succeeds, moving point and returning its new
- value. Otherwise the search fails.
-
- In the following example, point is initially before the `T'.
- Evaluating the search call moves point to the end of that line
- (between the `t' of `hat' and the newline).
-
- ---------- Buffer: foo ----------
- I read "-!-The cat in the hat
- comes back" twice.
- ---------- Buffer: foo ----------
-
- (re-search-forward "[a-z]+" nil t 5)
- => 27
-
- ---------- Buffer: foo ----------
- I read "The cat in the hat-!-
- comes back" twice.
- ---------- Buffer: foo ----------
-
- - 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.
-
- This function is analogous to `re-search-forward', but they are not
- simple mirror images. `re-search-forward' finds the match whose
- beginning is as close as possible to the starting point. If
- `re-search-backward' were a perfect mirror image, it would find the
- match whose end is as close as possible. However, in fact it
- finds the match whose beginning is as close as possible. The
- reason is that matching a regular expression at a given spot
- always works from beginning to end, and starts at a specified
- beginning position.
-
- A true mirror-image of `re-search-forward' would require a special
- feature for matching regexps from end to beginning. It's not
- worth the trouble of implementing that.
-
- - 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
- STRING.
-
- For example,
-
- (string-match
- "quick" "The quick brown fox jumped quickly.")
- => 4
- (string-match
- "quick" "The quick brown fox jumped quickly." 8)
- => 27
-
- The index of the first character of the string is 0, the index of
- the second character is 1, and so on.
-
- After this function returns, the index of the first character
- beyond the match is available as `(match-end 0)'. *Note Match
- Data::.
-
- (string-match
- "quick" "The quick brown fox jumped quickly." 8)
- => 27
-
- (match-end 0)
- => 32
-
- - 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
- white-space.
-
- (split-string "foo bar")
- => ("foo" "bar")
-
- (split-string "something")
- => ("something")
-
- (split-string "a:b:c" ":")
- => ("a" "b" "c")
-
- (split-string ":a::b:c" ":")
- => ("" "a" "" "b" "c")
-
- - 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
- 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
- "anchored" and it can succeed only starting with the first
- character following point. The result is `t' if so, `nil'
- otherwise.
-
- This function does not move point, but it updates the match data,
- which you can access using `match-beginning' and `match-end'.
- *Note Match Data::.
-
- In this example, point is located directly before the `T'. If it
- were anywhere else, the result would be `nil'.
-
- ---------- Buffer: foo ----------
- I read "-!-The cat in the hat
- comes back" twice.
- ---------- Buffer: foo ----------
-
- (looking-at "The cat in the hat$")
- => t
-
-\1f
-File: lispref.info, Node: POSIX Regexps, Next: Search and Replace, Prev: Regexp Search, Up: Searching and Matching
-
-POSIX Regular Expression Searching
-==================================
-
- The usual regular expression functions do backtracking when necessary
-to handle the `\|' and repetition constructs, but they continue this
-only until they find _some_ match. Then they succeed and report the
-first match found.
-
- This section describes alternative search functions which perform the
-full backtracking specified by the POSIX standard for regular expression
-matching. They continue backtracking until they have tried all
-possibilities and found all matches, so they can report the longest
-match, as required by POSIX. This is much slower, so use these
-functions only when you really need the longest match.
-
- In Emacs versions prior to 19.29, these functions did not exist, and
-the functions described above implemented full POSIX backtracking.
-
- - Function: posix-search-forward regexp &optional limit noerror repeat
- 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
- 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
- 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
- This is like `string-match' except that it performs the full
- backtracking specified by the POSIX standard for regular expression
- matching.
-
-\1f
-File: lispref.info, Node: Search and Replace, Next: Match Data, Prev: POSIX Regexps, Up: Searching and Matching
-
-Search and Replace
-==================
-
- - 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;
- otherwise, it asks the user what to do about each one.
-
- If REGEXP-FLAG is non-`nil', then FROM-STRING is considered a
- regular expression; otherwise, it must match literally. If
- DELIMITED-FLAG is non-`nil', then only replacements surrounded by
- word boundaries are considered.
-
- The argument REPLACEMENTS specifies what to replace occurrences
- with. If it is a string, that string is used. It can also be a
- list of strings, to be used in cyclic order.
-
- If REPEAT-COUNT is non-`nil', it should be an integer. Then it
- specifies how many times to use each of the strings in the
- REPLACEMENTS list before advancing cyclicly to the next one.
-
- Normally, the keymap `query-replace-map' defines the possible user
- responses for queries. The argument MAP, if non-`nil', is a
- keymap to use instead of `query-replace-map'.
-
- - Variable: query-replace-map
- This variable holds a special keymap that defines the valid user
- responses for `query-replace' and related functions, as well as
- `y-or-n-p' and `map-y-or-n-p'. It is unusual in two ways:
-
- * The "key bindings" are not commands, just symbols that are
- meaningful to the functions that use this map.
-
- * Prefix keys are not supported; each key binding must be for a
- single event key sequence. This is because the functions
- don't use read key sequence to get the input; instead, they
- read a single event and look it up "by hand."
-
- Here are the meaningful "bindings" for `query-replace-map'. Several
-of them are meaningful only for `query-replace' and friends.
-
-`act'
- Do take the action being considered--in other words, "yes."
-
-`skip'
- Do not take action for this question--in other words, "no."
-
-`exit'
- Answer this question "no," and give up on the entire series of
- questions, assuming that the answers will be "no."
-
-`act-and-exit'
- Answer this question "yes," and give up on the entire series of
- questions, assuming that subsequent answers will be "no."
-
-`act-and-show'
- Answer this question "yes," but show the results--don't advance yet
- to the next question.
-
-`automatic'
- Answer this question and all subsequent questions in the series
- with "yes," without further user interaction.
-
-`backup'
- Move back to the previous place that a question was asked about.
-
-`edit'
- Enter a recursive edit to deal with this question--instead of any
- other action that would normally be taken.
-
-`delete-and-edit'
- Delete the text being considered, then enter a recursive edit to
- replace it.
-
-`recenter'
- Redisplay and center the window, then ask the same question again.
-
-`quit'
- Perform a quit right away. Only `y-or-n-p' and related functions
- use this answer.
-
-`help'
- Display some help, then ask again.
-
-\1f
-File: lispref.info, Node: Match Data, Next: Searching and Case, Prev: Search and Replace, Up: Searching and Matching
-
-The Match Data
-==============
-
- XEmacs keeps track of the positions of the start and end of segments
-of text found during a regular expression search. This means, for
-example, that you can search for a complex pattern, such as a date in
-an Rmail message, and then extract parts of the match under control of
-the pattern.
-
- Because the match data normally describe the most recent search only,
-you must be careful not to do another search inadvertently between the
-search you wish to refer back to and the use of the match data. If you
-can't avoid another intervening search, you must save and restore the
-match data around it, to prevent it from being overwritten.
-
-* Menu:
-
-* Simple Match Data:: Accessing single items of match data,
- such as where a particular subexpression started.
-* Replacing Match:: Replacing a substring that was matched.
-* Entire Match Data:: Accessing the entire match data at once, as a list.
-* Saving Match Data:: Saving and restoring the match data.
-
-\1f
-File: lispref.info, Node: Simple Match Data, Next: Replacing Match, Up: Match Data
-
-Simple Match Data Access
-------------------------
-
- This section explains how to use the match data to find out what was
-matched by the last search or match operation.
-
- You can ask about the entire matching text, or about a particular
-parenthetical subexpression of a regular expression. The COUNT
-argument in the functions below specifies which. If COUNT is zero, you
-are asking about the entire match. If COUNT is positive, it specifies
-which subexpression you want.
-
- Recall that the subexpressions of a regular expression are those
-expressions grouped with escaped parentheses, `\(...\)'. The COUNTth
-subexpression is found by counting occurrences of `\(' from the
-beginning of the whole regular expression. The first subexpression is
-numbered 1, the second 2, and so on. Only regular expressions can have
-subexpressions--after a simple string search, the only information
-available is about the entire match.
-
- - Function: match-string count &optional in-string
- 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
- parenthetical subexpression, if COUNT is positive. If COUNT is
- out of range, or if that subexpression didn't match anything, the
- value is `nil'.
-
- If the last such operation was done against a string with
- `string-match', then you should pass the same string as the
- argument IN-STRING. Otherwise, after a buffer search or match,
- you should omit IN-STRING or pass `nil' for it; but you should
- 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
- This function returns the position of the start of text matched by
- the last regular expression searched for, or a subexpression of it.
-
- If COUNT is zero, then the value is the position of the start of
- the entire match. Otherwise, COUNT specifies a subexpression in
- the regular expression, and the value of the function is the
- starting position of the match for that subexpression.
-
- The value is `nil' for a subexpression inside a `\|' alternative
- that wasn't used in the match.
-
- - 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.
-
- Here is an example of using the match data, with a comment showing
-the positions within the text:
-
- (string-match "\\(qu\\)\\(ick\\)"
- "The quick fox jumped quickly.")
- ;0123456789
- => 4
-
- (match-string 0 "The quick fox jumped quickly.")
- => "quick"
- (match-string 1 "The quick fox jumped quickly.")
- => "qu"
- (match-string 2 "The quick fox jumped quickly.")
- => "ick"
-
- (match-beginning 1) ; The beginning of the match
- => 4 ; with `qu' is at index 4.
-
- (match-beginning 2) ; The beginning of the match
- => 6 ; with `ick' is at index 6.
-
- (match-end 1) ; The end of the match
- => 6 ; with `qu' is at index 6.
-
- (match-end 2) ; The end of the match
- => 9 ; with `ick' is at index 9.
-
- Here is another example. Point is initially located at the beginning
-of the line. Searching moves point to between the space and the word
-`in'. The beginning of the entire match is at the 9th character of the
-buffer (`T'), and the beginning of the match for the first
-subexpression is at the 13th character (`c').
-
- (list
- (re-search-forward "The \\(cat \\)")
- (match-beginning 0)
- (match-beginning 1))
- => (9 9 13)
-
- ---------- Buffer: foo ----------
- I read "The cat -!-in the hat comes back" twice.
- ^ ^
- 9 13
- ---------- Buffer: foo ----------
-
-(In this case, the index returned is a buffer position; the first
-character of the buffer counts as 1.)
-
-\1f
-File: lispref.info, Node: Replacing Match, Next: Entire Match Data, Prev: Simple Match Data, Up: Match Data
-
-Replacing the Text That Matched
--------------------------------
-
- This function replaces the text matched by the last search with
-REPLACEMENT.
-
- - Function: replace-match replacement &optional fixedcase literal
- string
- This function replaces the text in the buffer (or in STRING) that
- was matched by the last search. It replaces that text with
- REPLACEMENT.
-
- If you did the last search in a buffer, you should specify `nil'
- for STRING. Then `replace-match' does the replacement by editing
- the buffer; it leaves point at the end of the replacement text,
- and returns `t'.
-
- If you did the search in a string, pass the same string as STRING.
- Then `replace-match' does the replacement by constructing and
- returning a new string.
-
- If FIXEDCASE is non-`nil', then the case of the replacement text
- is not changed; otherwise, the replacement text is converted to a
- different case depending upon the capitalization of the text to be
- replaced. If the original text is all upper case, the replacement
- text is converted to upper case. If the first word of the
- original text is capitalized, then the first word of the
- replacement text is capitalized. If the original text contains
- just one word, and that word is a capital letter, `replace-match'
- considers this a capitalized first word rather than all upper case.
-
- If `case-replace' is `nil', then case conversion is not done,
- regardless of the value of FIXED-CASE. *Note Searching and Case::.
-
- If LITERAL is non-`nil', then REPLACEMENT is inserted exactly as
- it is, the only alterations being case changes as needed. If it
- is `nil' (the default), then the character `\' is treated
- specially. If a `\' appears in REPLACEMENT, then it must be part
- of one of the following sequences:
-
- `\&'
- `\&' stands for the entire text being replaced.
-
- `\N'
- `\N', where N is a digit, stands for the text that matched
- the Nth subexpression in the original regexp. Subexpressions
- are those expressions grouped inside `\(...\)'.
-
- `\\'
- `\\' stands for a single `\' in the replacement text.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Regexp Example, Prev: Syntax of Regexps, Up: Regular Expressions
+
+Complex Regexp Example
+----------------------
+
+ Here is a complicated regexp, used by XEmacs to recognize the end of
+a sentence together with any whitespace that follows. It is the value
+of the variable `sentence-end'.
+
+ First, we show the regexp as a string in Lisp syntax to distinguish
+spaces from tab characters. The string constant begins and ends with a
+double-quote. `\"' stands for a double-quote as part of the string,
+`\\' for a backslash as part of the string, `\t' for a tab and `\n' for
+a newline.
+
+ "[.?!][]\"')}]*\\($\\| $\\|\t\\| \\)[ \t\n]*"
+
+ In contrast, if you evaluate the variable `sentence-end', you will
+see the following:
+
+ sentence-end
+ =>
+ "[.?!][]\"')}]*\\($\\| $\\| \\| \\)[
+ ]*"
+
+In this output, tab and newline appear as themselves.
+
+ This regular expression contains four parts in succession and can be
+deciphered as follows:
+
+`[.?!]'
+ The first part of the pattern is a character set that matches any
+ one of three characters: period, question mark, and exclamation
+ mark. The match must begin with one of these three characters.
+
+`[]\"')}]*'
+ The second part of the pattern matches any closing braces and
+ quotation marks, zero or more of them, that may follow the period,
+ question mark or exclamation mark. The `\"' is Lisp syntax for a
+ double-quote in a string. The `*' at the end indicates that the
+ immediately preceding regular expression (a character set, in this
+ case) may be repeated zero or more times.
+
+`\\($\\| $\\|\t\\| \\)'
+ The third part of the pattern matches the whitespace that follows
+ the end of a sentence: the end of a line, or a tab, or two spaces.
+ The double backslashes mark the parentheses and vertical bars as
+ regular expression syntax; the parentheses delimit a group and the
+ vertical bars separate alternatives. The dollar sign is used to
+ match the end of a line.
+
+`[ \t\n]*'
+ Finally, the last part of the pattern matches any additional
+ whitespace beyond the minimum needed to end a sentence.
+
+\1f
+File: lispref.info, Node: Regexp Search, Next: POSIX Regexps, Prev: Regular Expressions, Up: Searching and Matching
+
+Regular Expression Searching
+============================
+
+ In XEmacs, you can search for the next match for a regexp either
+incrementally or not. Incremental search commands are described in the
+`The XEmacs Reference Manual'. *Note Regular Expression Search:
+(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
+ 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
+ REGEXP, and leaves point at the end of the first match found. It
+ returns the new value of point.
+
+ If LIMIT is non-`nil' (it must be a position in the current
+ buffer), then it is the upper bound to the search. No match
+ extending after that position is accepted.
+
+ What happens when the search fails depends on the value of
+ NOERROR. If NOERROR is `nil', a `search-failed' error is
+ signaled. If NOERROR is `t', `re-search-forward' does nothing and
+ returns `nil'. If NOERROR is neither `nil' nor `t', then
+ `re-search-forward' moves point to LIMIT (or the end of the
+ buffer) and returns `nil'.
+
+ If REPEAT is supplied (it must be a positive number), then the
+ search is repeated that many times (each time starting at the end
+ of the previous time's match). If these successive searches
+ succeed, the function succeeds, moving point and returning its new
+ value. Otherwise the search fails.
+
+ In the following example, point is initially before the `T'.
+ Evaluating the search call moves point to the end of that line
+ (between the `t' of `hat' and the newline).
+
+ ---------- Buffer: foo ----------
+ I read "-!-The cat in the hat
+ comes back" twice.
+ ---------- Buffer: foo ----------
+
+ (re-search-forward "[a-z]+" nil t 5)
+ => 27
+
+ ---------- Buffer: foo ----------
+ I read "The cat in the hat-!-
+ comes back" twice.
+ ---------- Buffer: foo ----------
+
+ - 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.
+
+ This function is analogous to `re-search-forward', but they are not
+ simple mirror images. `re-search-forward' finds the match whose
+ beginning is as close as possible to the starting point. If
+ `re-search-backward' were a perfect mirror image, it would find the
+ match whose end is as close as possible. However, in fact it
+ finds the match whose beginning is as close as possible. The
+ reason is that matching a regular expression at a given spot
+ always works from beginning to end, and starts at a specified
+ beginning position.
+
+ A true mirror-image of `re-search-forward' would require a special
+ feature for matching regexps from end to beginning. It's not
+ worth the trouble of implementing that.
+
+ - 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
+ STRING.
+
+ For example,
+
+ (string-match
+ "quick" "The quick brown fox jumped quickly.")
+ => 4
+ (string-match
+ "quick" "The quick brown fox jumped quickly." 8)
+ => 27
+
+ The index of the first character of the string is 0, the index of
+ the second character is 1, and so on.
+
+ After this function returns, the index of the first character
+ beyond the match is available as `(match-end 0)'. *Note Match
+ Data::.
+
+ (string-match
+ "quick" "The quick brown fox jumped quickly." 8)
+ => 27
+
+ (match-end 0)
+ => 32
+
+ - 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
+ white-space.
+
+ (split-string "foo bar")
+ => ("foo" "bar")
+
+ (split-string "something")
+ => ("something")
+
+ (split-string "a:b:c" ":")
+ => ("a" "b" "c")
+
+ (split-string ":a::b:c" ":")
+ => ("" "a" "" "b" "c")
+
+ - 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
+ 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
+ "anchored" and it can succeed only starting with the first
+ character following point. The result is `t' if so, `nil'
+ otherwise.
+
+ This function does not move point, but it updates the match data,
+ which you can access using `match-beginning' and `match-end'.
+ *Note Match Data::.
+
+ In this example, point is located directly before the `T'. If it
+ were anywhere else, the result would be `nil'.
+
+ ---------- Buffer: foo ----------
+ I read "-!-The cat in the hat
+ comes back" twice.
+ ---------- Buffer: foo ----------
+
+ (looking-at "The cat in the hat$")
+ => t
+
+\1f
+File: lispref.info, Node: POSIX Regexps, Next: Search and Replace, Prev: Regexp Search, Up: Searching and Matching
+
+POSIX Regular Expression Searching
+==================================
+
+ The usual regular expression functions do backtracking when necessary
+to handle the `\|' and repetition constructs, but they continue this
+only until they find _some_ match. Then they succeed and report the
+first match found.
+
+ This section describes alternative search functions which perform the
+full backtracking specified by the POSIX standard for regular expression
+matching. They continue backtracking until they have tried all
+possibilities and found all matches, so they can report the longest
+match, as required by POSIX. This is much slower, so use these
+functions only when you really need the longest match.
+
+ In Emacs versions prior to 19.29, these functions did not exist, and
+the functions described above implemented full POSIX backtracking.
+
+ - Function: posix-search-forward regexp &optional limit noerror repeat
+ 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
+ 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
+ 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
+ This is like `string-match' except that it performs the full
+ backtracking specified by the POSIX standard for regular expression
+ matching.
+
+\1f
+File: lispref.info, Node: Search and Replace, Next: Match Data, Prev: POSIX Regexps, Up: Searching and Matching
+
+Search and Replace
+==================
+
+ - 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;
+ otherwise, it asks the user what to do about each one.
+
+ If REGEXP-FLAG is non-`nil', then FROM-STRING is considered a
+ regular expression; otherwise, it must match literally. If
+ DELIMITED-FLAG is non-`nil', then only replacements surrounded by
+ word boundaries are considered.
+
+ The argument REPLACEMENTS specifies what to replace occurrences
+ with. If it is a string, that string is used. It can also be a
+ list of strings, to be used in cyclic order.
+
+ If REPEAT-COUNT is non-`nil', it should be an integer. Then it
+ specifies how many times to use each of the strings in the
+ REPLACEMENTS list before advancing cyclicly to the next one.
+
+ Normally, the keymap `query-replace-map' defines the possible user
+ responses for queries. The argument MAP, if non-`nil', is a
+ keymap to use instead of `query-replace-map'.
+
+ - Variable: query-replace-map
+ This variable holds a special keymap that defines the valid user
+ responses for `query-replace' and related functions, as well as
+ `y-or-n-p' and `map-y-or-n-p'. It is unusual in two ways:
+
+ * The "key bindings" are not commands, just symbols that are
+ meaningful to the functions that use this map.
+
+ * Prefix keys are not supported; each key binding must be for a
+ single event key sequence. This is because the functions
+ don't use read key sequence to get the input; instead, they
+ read a single event and look it up "by hand."
+
+ Here are the meaningful "bindings" for `query-replace-map'. Several
+of them are meaningful only for `query-replace' and friends.
+
+`act'
+ Do take the action being considered--in other words, "yes."
+
+`skip'
+ Do not take action for this question--in other words, "no."
+
+`exit'
+ Answer this question "no," and give up on the entire series of
+ questions, assuming that the answers will be "no."
+
+`act-and-exit'
+ Answer this question "yes," and give up on the entire series of
+ questions, assuming that subsequent answers will be "no."
+
+`act-and-show'
+ Answer this question "yes," but show the results--don't advance yet
+ to the next question.
+
+`automatic'
+ Answer this question and all subsequent questions in the series
+ with "yes," without further user interaction.
+
+`backup'
+ Move back to the previous place that a question was asked about.
+
+`edit'
+ Enter a recursive edit to deal with this question--instead of any
+ other action that would normally be taken.
+
+`delete-and-edit'
+ Delete the text being considered, then enter a recursive edit to
+ replace it.
+
+`recenter'
+ Redisplay and center the window, then ask the same question again.
+
+`quit'
+ Perform a quit right away. Only `y-or-n-p' and related functions
+ use this answer.
+
+`help'
+ Display some help, then ask again.
+
+\1f
+File: lispref.info, Node: Match Data, Next: Searching and Case, Prev: Search and Replace, Up: Searching and Matching
+
+The Match Data
+==============
+
+ XEmacs keeps track of the positions of the start and end of segments
+of text found during a regular expression search. This means, for
+example, that you can search for a complex pattern, such as a date in
+an Rmail message, and then extract parts of the match under control of
+the pattern.
+
+ Because the match data normally describe the most recent search only,
+you must be careful not to do another search inadvertently between the
+search you wish to refer back to and the use of the match data. If you
+can't avoid another intervening search, you must save and restore the
+match data around it, to prevent it from being overwritten.
+
+* Menu:
+
+* Simple Match Data:: Accessing single items of match data,
+ such as where a particular subexpression started.
+* Replacing Match:: Replacing a substring that was matched.
+* Entire Match Data:: Accessing the entire match data at once, as a list.
+* Saving Match Data:: Saving and restoring the match data.
+
+\1f
+File: lispref.info, Node: Simple Match Data, Next: Replacing Match, Up: Match Data
+
+Simple Match Data Access
+------------------------
+
+ This section explains how to use the match data to find out what was
+matched by the last search or match operation.
+
+ You can ask about the entire matching text, or about a particular
+parenthetical subexpression of a regular expression. The COUNT
+argument in the functions below specifies which. If COUNT is zero, you
+are asking about the entire match. If COUNT is positive, it specifies
+which subexpression you want.
+
+ Recall that the subexpressions of a regular expression are those
+expressions grouped with escaped parentheses, `\(...\)'. The COUNTth
+subexpression is found by counting occurrences of `\(' from the
+beginning of the whole regular expression. The first subexpression is
+numbered 1, the second 2, and so on. Only regular expressions can have
+subexpressions--after a simple string search, the only information
+available is about the entire match.
+
+ - Function: match-string count &optional in-string
+ 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
+ parenthetical subexpression, if COUNT is positive. If COUNT is
+ out of range, or if that subexpression didn't match anything, the
+ value is `nil'.
+
+ If the last such operation was done against a string with
+ `string-match', then you should pass the same string as the
+ argument IN-STRING. Otherwise, after a buffer search or match,
+ you should omit IN-STRING or pass `nil' for it; but you should
+ 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
+ This function returns the position of the start of text matched by
+ the last regular expression searched for, or a subexpression of it.
+
+ If COUNT is zero, then the value is the position of the start of
+ the entire match. Otherwise, COUNT specifies a subexpression in
+ the regular expression, and the value of the function is the
+ starting position of the match for that subexpression.
+
+ The value is `nil' for a subexpression inside a `\|' alternative
+ that wasn't used in the match.
+
+ - 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.
+
+ Here is an example of using the match data, with a comment showing
+the positions within the text:
+
+ (string-match "\\(qu\\)\\(ick\\)"
+ "The quick fox jumped quickly.")
+ ;0123456789
+ => 4
+
+ (match-string 0 "The quick fox jumped quickly.")
+ => "quick"
+ (match-string 1 "The quick fox jumped quickly.")
+ => "qu"
+ (match-string 2 "The quick fox jumped quickly.")
+ => "ick"
+
+ (match-beginning 1) ; The beginning of the match
+ => 4 ; with `qu' is at index 4.
+
+ (match-beginning 2) ; The beginning of the match
+ => 6 ; with `ick' is at index 6.
+
+ (match-end 1) ; The end of the match
+ => 6 ; with `qu' is at index 6.
+
+ (match-end 2) ; The end of the match
+ => 9 ; with `ick' is at index 9.
+
+ Here is another example. Point is initially located at the beginning
+of the line. Searching moves point to between the space and the word
+`in'. The beginning of the entire match is at the 9th character of the
+buffer (`T'), and the beginning of the match for the first
+subexpression is at the 13th character (`c').
+
+ (list
+ (re-search-forward "The \\(cat \\)")
+ (match-beginning 0)
+ (match-beginning 1))
+ => (9 9 13)
+
+ ---------- Buffer: foo ----------
+ I read "The cat -!-in the hat comes back" twice.
+ ^ ^
+ 9 13
+ ---------- Buffer: foo ----------
+
+(In this case, the index returned is a buffer position; the first
+character of the buffer counts as 1.)
+
+\1f
+File: lispref.info, Node: Replacing Match, Next: Entire Match Data, Prev: Simple Match Data, Up: Match Data
+
+Replacing the Text That Matched
+-------------------------------
+
+ This function replaces the text matched by the last search with
+REPLACEMENT.
+
+ - Function: replace-match replacement &optional fixedcase literal
+ string
+ This function replaces the text in the buffer (or in STRING) that
+ was matched by the last search. It replaces that text with
+ REPLACEMENT.
+
+ If you did the last search in a buffer, you should specify `nil'
+ for STRING. Then `replace-match' does the replacement by editing
+ the buffer; it leaves point at the end of the replacement text,
+ and returns `t'.
+
+ If you did the search in a string, pass the same string as STRING.
+ Then `replace-match' does the replacement by constructing and
+ returning a new string.
+
+ If FIXEDCASE is non-`nil', then the case of the replacement text
+ is not changed; otherwise, the replacement text is converted to a
+ different case depending upon the capitalization of the text to be
+ replaced. If the original text is all upper case, the replacement
+ text is converted to upper case. If the first word of the
+ original text is capitalized, then the first word of the
+ replacement text is capitalized. If the original text contains
+ just one word, and that word is a capital letter, `replace-match'
+ considers this a capitalized first word rather than all upper case.
+
+ If `case-replace' is `nil', then case conversion is not done,
+ regardless of the value of FIXED-CASE. *Note Searching and Case::.
+
+ If LITERAL is non-`nil', then REPLACEMENT is inserted exactly as
+ it is, the only alterations being case changes as needed. If it
+ is `nil' (the default), then the character `\' is treated
+ specially. If a `\' appears in REPLACEMENT, then it must be part
+ of one of the following sequences:
+
+ `\&'
+ `\&' stands for the entire text being replaced.
+
+ `\N'
+ `\N', where N is a digit, stands for the text that matched
+ the Nth subexpression in the original regexp. Subexpressions
+ are those expressions grouped inside `\(...\)'.
+
+ `\\'
+ `\\' stands for a single `\' in the replacement text.
+
+\1f
File: lispref.info, Node: Entire Match Data, Next: Saving Match Data, Prev: Replacing Match, Up: Match Data
Accessing the Entire Match Data
flag. Optional argument BUFFER defaults to the current buffer if
omitted.
-\1f
-File: lispref.info, Node: Parsing Expressions, Next: Standard Syntax Tables, Prev: Motion and Syntax, Up: Syntax Tables
-
-Parsing Balanced Expressions
-============================
-
- Here are several functions for parsing and scanning balanced
-expressions, also known as "sexps", in which parentheses match in
-pairs. The syntax table controls the interpretation of characters, so
-these functions can be used for Lisp expressions when in Lisp mode and
-for C expressions when in C mode. *Note List Motion::, for convenient
-higher-level functions for moving over balanced expressions.
-
- - Function: parse-partial-sexp start limit &optional target-depth
- stop-before state stop-comment buffer
- 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
- the location where parsing stops. It returns a value describing
- the status of the parse at the point where it stops.
-
- If STATE is `nil', START is assumed to be at the top level of
- parenthesis structure, such as the beginning of a function
- definition. Alternatively, you might wish to resume parsing in the
- middle of the structure. To do this, you must provide a STATE
- argument that describes the initial status of parsing.
-
- If the third argument TARGET-DEPTH is non-`nil', parsing stops if
- the depth in parentheses becomes equal to TARGET-DEPTH. The depth
- starts at 0, or at whatever is given in STATE.
-
- If the fourth argument STOP-BEFORE is non-`nil', parsing stops
- when it comes to any character that starts a sexp. If
- STOP-COMMENT is non-`nil', parsing stops when it comes to the
- start of a comment.
-
- The fifth argument STATE is an eight-element list of the same form
- as the value of this function, described below. The return value
- of one call may be used to initialize the state of the parse on
- another call to `parse-partial-sexp'.
-
- The result is a list of eight elements describing the final state
- of the parse:
-
- 0. The depth in parentheses, counting from 0.
-
- 1. The character position of the start of the innermost
- parenthetical grouping containing the stopping point; `nil'
- if none.
-
- 2. The character position of the start of the last complete
- subexpression terminated; `nil' if none.
-
- 3. Non-`nil' if inside a string. More precisely, this is the
- character that will terminate the string.
-
- 4. `t' if inside a comment (of either style).
-
- 5. `t' if point is just after a quote character.
-
- 6. The minimum parenthesis depth encountered during this scan.
-
- 7. `t' if inside a comment of style "b".
-
- Elements 0, 3, 4, 5 and 7 are significant in the argument STATE.
-
- This function is most often used to compute indentation for
- languages that have nested parentheses.
-
- - 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 DEPTH is nonzero, parenthesis depth counting begins from that
- value. The only candidates for stopping are places where the
- depth in parentheses becomes zero; `scan-lists' counts COUNT such
- places and then stops. Thus, a positive value for DEPTH means go
- out DEPTH levels of parenthesis.
-
- Scanning ignores comments if `parse-sexp-ignore-comments' is
- non-`nil'.
-
- If the scan reaches the beginning or end of the buffer (or its
- accessible portion), and the depth is not zero, an error is
- signaled. If the depth is zero but the count is not used up,
- `nil' is returned.
-
- If optional arg BUFFER is non-`nil', scanning occurs in that
- buffer instead of in the current buffer.
-
- 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
- This function scans forward COUNT sexps from character position
- FROM. It returns the character position where the scan stops.
-
- Scanning ignores comments if `parse-sexp-ignore-comments' is
- non-`nil'.
-
- If the scan reaches the beginning or end of (the accessible part
- of) the buffer in the middle of a parenthetical grouping, an error
- is signaled. If it reaches the beginning or end between groupings
- but before count is used up, `nil' is returned.
-
- If optional arg BUFFER is non-`nil', scanning occurs in that
- buffer instead of in the current buffer.
-
- If optional arg NOERROR is non-`nil', `scan-sexps' will return nil
- instead of signalling an error.
-
- - Variable: parse-sexp-ignore-comments
- If the value is non-`nil', then comments are treated as whitespace
- by the functions in this section and by `forward-sexp'.
-
- In older Emacs versions, this feature worked only when the comment
- terminator is something like `*/', and appears only to end a
- comment. In languages where newlines terminate comments, it was
- necessary make this variable `nil', since not every newline is the
- end of a comment. This limitation no longer exists.
-
- You can use `forward-comment' to move forward or backward over one
-comment or several comments.
-
- - 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
- stopped. It also stops after satisfying COUNT.
-
- Optional argument BUFFER defaults to the current buffer.
-
- To move forward over all comments and whitespace following point, use
-`(forward-comment (buffer-size))'. `(buffer-size)' is a good argument
-to use, because the number of comments in the buffer cannot exceed that
-many.
-
-\1f
-File: lispref.info, Node: Standard Syntax Tables, Next: Syntax Table Internals, Prev: Parsing Expressions, Up: Syntax Tables
-
-Some Standard Syntax Tables
-===========================
-
- Most of the major modes in XEmacs have their own syntax tables. Here
-are several of them:
-
- - Function: standard-syntax-table
- This function returns the standard syntax table, which is the
- syntax table used in Fundamental mode.
-
- - Variable: text-mode-syntax-table
- The value of this variable is the syntax table used in Text mode.
-
- - Variable: c-mode-syntax-table
- The value of this variable is the syntax table for C-mode buffers.
-
- - Variable: emacs-lisp-mode-syntax-table
- The value of this variable is the syntax table used in Emacs Lisp
- mode by editing commands. (It has no effect on the Lisp `read'
- function.)
-
-\1f
-File: lispref.info, Node: Syntax Table Internals, Prev: Standard Syntax Tables, Up: Syntax Tables
-
-Syntax Table Internals
-======================
-
- Each element of a syntax table is an integer that encodes the syntax
-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::).
-
- The low 8 bits of each element of a syntax table indicate the syntax
-class.
-
-Integer
- Class
-
-0
- whitespace
-
-1
- punctuation
-
-2
- word
-
-3
- symbol
-
-4
- open parenthesis
-
-5
- close parenthesis
-
-6
- expression prefix
-
-7
- string quote
-
-8
- paired delimiter
-
-9
- escape
-
-10
- character quote
-
-11
- comment-start
-
-12
- comment-end
-
-13
- inherit
-
- The next 8 bits are the matching opposite parenthesis (if the
-character has parenthesis syntax); otherwise, they are not meaningful.
-The next 6 bits are the flags.
-
-\1f
-File: lispref.info, Node: Abbrevs, Next: Extents, Prev: Syntax Tables, Up: Top
-
-Abbrevs And Abbrev Expansion
-****************************
-
- An abbreviation or "abbrev" is a string of characters that may be
-expanded to a longer string. The user can insert the abbrev string and
-find it replaced automatically with the expansion of the abbrev. This
-saves typing.
-
- The set of abbrevs currently in effect is recorded in an "abbrev
-table". Each buffer has a local abbrev table, but normally all buffers
-in the same major mode share one abbrev table. There is also a global
-abbrev table. Normally both are used.
-
- An abbrev table is represented as an obarray containing a symbol for
-each abbreviation. The symbol's name is the abbreviation; its value is
-the expansion; its function definition is the hook function to do the
-expansion (*note Defining Abbrevs::); its property list cell contains
-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,
-normally they are never used except by the code that handles abbrevs.
-Therefore, it is safe to use them in an extremely nonstandard way.
-*Note Creating Symbols::.
-
- For the user-level commands for abbrevs, see *Note Abbrev Mode:
-(emacs)Abbrevs.
-
-* Menu:
-
-* Abbrev Mode:: Setting up XEmacs for abbreviation.
-* Tables: Abbrev Tables. Creating and working with abbrev tables.
-* Defining Abbrevs:: Specifying abbreviations and their expansions.
-* Files: Abbrev Files. Saving abbrevs in files.
-* Expansion: Abbrev Expansion. Controlling expansion; expansion subroutines.
-* Standard Abbrev Tables:: Abbrev tables used by various major modes.
-
-\1f
-File: lispref.info, Node: Abbrev Mode, Next: Abbrev Tables, Up: Abbrevs
-
-Setting Up Abbrev Mode
-======================
-
- Abbrev mode is a minor mode controlled by the value of the variable
-`abbrev-mode'.
-
- - Variable: abbrev-mode
- A non-`nil' value of this variable turns on the automatic expansion
- of abbrevs when their abbreviations are inserted into a buffer.
- If the value is `nil', abbrevs may be defined, but they are not
- expanded automatically.
-
- This variable automatically becomes local when set in any fashion.
-
- - Variable: default-abbrev-mode
- This is the value of `abbrev-mode' for buffers that do not
- override it. This is the same as `(default-value 'abbrev-mode)'.
-
-\1f
-File: lispref.info, Node: Abbrev Tables, Next: Defining Abbrevs, Prev: Abbrev Mode, Up: Abbrevs
-
-Abbrev Tables
-=============
-
- This section describes how to create and manipulate abbrev tables.
-
- - Function: make-abbrev-table
- 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
- This function undefines all the abbrevs in abbrev table TABLE,
- leaving it empty. The function returns `nil'.
-
- - 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
- of the form `(ABBREVNAME EXPANSION HOOK USECOUNT)'. The value is
- always `nil'.
-
- - Variable: abbrev-table-name-list
- 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
- 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'.
-
- If HUMAN is non-`nil', the description is human-oriented.
- Otherwise the description is a Lisp expression--a call to
- `define-abbrev-table' that would define NAME exactly as it is
- currently defined.
-
-\1f
-File: lispref.info, Node: Defining Abbrevs, Next: Abbrev Files, Prev: Abbrev Tables, Up: Abbrevs
-
-Defining Abbrevs
-================
-
- These functions define an abbrev in a specified abbrev table.
-`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
- 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,
- `"global"' or `"mode-specific"'); this is used in prompting the
- user. The argument ARG is the number of words in the expansion.
-
- The return value is the symbol that internally represents the new
- abbrev, or `nil' if the user declines to confirm redefining an
- existing abbrev.
-
- - 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.
-
- The argument NAME should be a string. The argument EXPANSION
- should be a string, or `nil' to undefine the abbrev.
-
- The argument HOOK is a function or `nil'. If HOOK is non-`nil',
- then it is called with no arguments after the abbrev is replaced
- with EXPANSION; point is located at the end of EXPANSION when HOOK
- is called.
-
- The use count of the abbrev is initialized to zero.
-
- - User Option: only-global-abbrevs
- If this variable is non-`nil', it means that the user plans to use
- global abbrevs only. This tells the commands that define
- mode-specific abbrevs to define global ones instead. This
- variable does not alter the behavior of the functions in this
- section; it is examined by their callers.
-
-\1f
-File: lispref.info, Node: Abbrev Files, Next: Abbrev Expansion, Prev: Defining Abbrevs, Up: Abbrevs
-
-Saving Abbrevs in Files
-=======================
-
- A file of saved abbrev definitions is actually a file of Lisp code.
-The abbrevs are saved in the form of a Lisp program to define the same
-abbrev tables with the same contents. Therefore, you can load the file
-with `load' (*note How Programs Do Loading::). However, the function
-`quietly-read-abbrev-file' is provided as a more convenient interface.
-
- User-level facilities such as `save-some-buffers' can save abbrevs
-in a file automatically, under the control of variables described here.
-
- - User Option: abbrev-file-name
- This is the default file name for reading and saving abbrevs.
-
- - Function: quietly-read-abbrev-file filename
- 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.
- `save-abbrevs' is set to `t' so that changes will be saved.
-
- This function does not display any messages. It returns `nil'.
-
- - User Option: save-abbrevs
- A non-`nil' value for `save-abbrev' means that XEmacs should save
- abbrevs when files are saved. `abbrev-file-name' specifies the
- file to save the abbrevs in.
-
- - Variable: abbrevs-changed
- This variable is set non-`nil' by defining or altering any
- abbrevs. This serves as a flag for various XEmacs commands to
- offer to save your abbrevs.
-
- - 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'.
-
-\1f
-File: lispref.info, Node: Abbrev Expansion, Next: Standard Abbrev Tables, Prev: Abbrev Files, Up: Abbrevs
-
-Looking Up and Expanding Abbreviations
-======================================
-
- Abbrevs are usually expanded by commands for interactive use,
-including `self-insert-command'. This section describes the
-subroutines used in writing such functions, as well as the variables
-they use for communication.
-
- - Function: abbrev-symbol abbrev &optional table
- 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
- to look it up in. If TABLE is `nil', this function tries first
- the current buffer's local abbrev table, and second the global
- abbrev 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
- `abbrev-symbol'.
-
- - Command: expand-abbrev
- This command expands the abbrev before point, if any. If point
- 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
- 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
- as usual.
-
- - User Option: abbrev-all-caps
- When this is set non-`nil', an abbrev entered entirely in upper
- case is expanded using all upper case. Otherwise, an abbrev
- entered entirely in upper case is expanded by capitalizing each
- word of the expansion.
-
- - Variable: abbrev-start-location
- This is the buffer position for `expand-abbrev' to use as the start
- of the next abbrev to be expanded. (`nil' means use the word
- before point instead.) `abbrev-start-location' is set to `nil'
- each time `expand-abbrev' is called. This variable is also set by
- `abbrev-prefix-mark'.
-
- - Variable: abbrev-start-location-buffer
- The value of this variable is the buffer for which
- `abbrev-start-location' has been set. Trying to expand an abbrev
- in any other buffer clears `abbrev-start-location'. This variable
- is set by `abbrev-prefix-mark'.
-
- - Variable: last-abbrev
- This is the `abbrev-symbol' of the last abbrev expanded. This
- information is left by `expand-abbrev' for the sake of the
- `unexpand-abbrev' command.
-
- - Variable: last-abbrev-location
- This is the location of the last abbrev expanded. This contains
- information left by `expand-abbrev' for the sake of the
- `unexpand-abbrev' command.
-
- - Variable: last-abbrev-text
- This is the exact expansion text of the last abbrev expanded,
- after case conversion (if any). Its value is `nil' if the abbrev
- has already been unexpanded. This contains information left by
- `expand-abbrev' for the sake of the `unexpand-abbrev' command.
-
- - Variable: pre-abbrev-expand-hook
- This is a normal hook whose functions are executed, in sequence,
- just before any expansion of an abbrev. *Note Hooks::. Since it
- is a normal hook, the hook functions receive no arguments.
- However, they can find the abbrev to be expanded by looking in the
- buffer before point.
-
- The following sample code shows a simple use of
-`pre-abbrev-expand-hook'. If the user terminates an abbrev with a
-punctuation character, the hook function asks for confirmation. Thus,
-this hook allows the user to decide whether to expand the abbrev, and
-aborts expansion if it is not confirmed.
-
- (add-hook 'pre-abbrev-expand-hook 'query-if-not-space)
-
- ;; This is the function invoked by `pre-abbrev-expand-hook'.
-
- ;; If the user terminated the abbrev with a space, the function does
- ;; nothing (that is, it returns so that the abbrev can expand). If the
- ;; user entered some other character, this function asks whether
- ;; expansion should continue.
-
- ;; If the user answers the prompt with `y', the function returns
- ;; `nil' (because of the `not' function), but that is
- ;; acceptable; the return value has no effect on expansion.
-
- (defun query-if-not-space ()
- (if (/= ?\ (preceding-char))
- (if (not (y-or-n-p "Do you want to expand this abbrev? "))
- (error "Not expanding this abbrev"))))
-
-\1f
-File: lispref.info, Node: Standard Abbrev Tables, Prev: Abbrev Expansion, Up: Abbrevs
-
-Standard Abbrev Tables
-======================
-
- Here we list the variables that hold the abbrev tables for the
-preloaded major modes of XEmacs.
-
- - Variable: global-abbrev-table
- This is the abbrev table for mode-independent abbrevs. The abbrevs
- defined in it apply to all buffers. Each buffer may also have a
- local abbrev table, whose abbrev definitions take precedence over
- those in the global table.
-
- - Variable: local-abbrev-table
- The value of this buffer-local variable is the (mode-specific)
- abbreviation table of the current buffer.
-
- - Variable: fundamental-mode-abbrev-table
- This is the local abbrev table used in Fundamental mode; in other
- words, it is the local abbrev table in all buffers in Fundamental
- mode.
-
- - Variable: text-mode-abbrev-table
- This is the local abbrev table used in Text mode.
-
- - Variable: c-mode-abbrev-table
- This is the local abbrev table used in C mode.
-
- - Variable: lisp-mode-abbrev-table
- This is the local abbrev table used in Lisp mode and Emacs Lisp
- mode.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Parsing Expressions, Next: Standard Syntax Tables, Prev: Motion and Syntax, Up: Syntax Tables
+
+Parsing Balanced Expressions
+============================
+
+ Here are several functions for parsing and scanning balanced
+expressions, also known as "sexps", in which parentheses match in
+pairs. The syntax table controls the interpretation of characters, so
+these functions can be used for Lisp expressions when in Lisp mode and
+for C expressions when in C mode. *Note List Motion::, for convenient
+higher-level functions for moving over balanced expressions.
+
+ - Function: parse-partial-sexp start limit &optional target-depth
+ stop-before state stop-comment buffer
+ 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
+ the location where parsing stops. It returns a value describing
+ the status of the parse at the point where it stops.
+
+ If STATE is `nil', START is assumed to be at the top level of
+ parenthesis structure, such as the beginning of a function
+ definition. Alternatively, you might wish to resume parsing in the
+ middle of the structure. To do this, you must provide a STATE
+ argument that describes the initial status of parsing.
+
+ If the third argument TARGET-DEPTH is non-`nil', parsing stops if
+ the depth in parentheses becomes equal to TARGET-DEPTH. The depth
+ starts at 0, or at whatever is given in STATE.
+
+ If the fourth argument STOP-BEFORE is non-`nil', parsing stops
+ when it comes to any character that starts a sexp. If
+ STOP-COMMENT is non-`nil', parsing stops when it comes to the
+ start of a comment.
+
+ The fifth argument STATE is an eight-element list of the same form
+ as the value of this function, described below. The return value
+ of one call may be used to initialize the state of the parse on
+ another call to `parse-partial-sexp'.
+
+ The result is a list of eight elements describing the final state
+ of the parse:
+
+ 0. The depth in parentheses, counting from 0.
+
+ 1. The character position of the start of the innermost
+ parenthetical grouping containing the stopping point; `nil'
+ if none.
+
+ 2. The character position of the start of the last complete
+ subexpression terminated; `nil' if none.
+
+ 3. Non-`nil' if inside a string. More precisely, this is the
+ character that will terminate the string.
+
+ 4. `t' if inside a comment (of either style).
+
+ 5. `t' if point is just after a quote character.
+
+ 6. The minimum parenthesis depth encountered during this scan.
+
+ 7. `t' if inside a comment of style "b".
+
+ Elements 0, 3, 4, 5 and 7 are significant in the argument STATE.
+
+ This function is most often used to compute indentation for
+ languages that have nested parentheses.
+
+ - 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 DEPTH is nonzero, parenthesis depth counting begins from that
+ value. The only candidates for stopping are places where the
+ depth in parentheses becomes zero; `scan-lists' counts COUNT such
+ places and then stops. Thus, a positive value for DEPTH means go
+ out DEPTH levels of parenthesis.
+
+ Scanning ignores comments if `parse-sexp-ignore-comments' is
+ non-`nil'.
+
+ If the scan reaches the beginning or end of the buffer (or its
+ accessible portion), and the depth is not zero, an error is
+ signaled. If the depth is zero but the count is not used up,
+ `nil' is returned.
+
+ If optional arg BUFFER is non-`nil', scanning occurs in that
+ buffer instead of in the current buffer.
+
+ 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
+ This function scans forward COUNT sexps from character position
+ FROM. It returns the character position where the scan stops.
+
+ Scanning ignores comments if `parse-sexp-ignore-comments' is
+ non-`nil'.
+
+ If the scan reaches the beginning or end of (the accessible part
+ of) the buffer in the middle of a parenthetical grouping, an error
+ is signaled. If it reaches the beginning or end between groupings
+ but before count is used up, `nil' is returned.
+
+ If optional arg BUFFER is non-`nil', scanning occurs in that
+ buffer instead of in the current buffer.
+
+ If optional arg NOERROR is non-`nil', `scan-sexps' will return nil
+ instead of signalling an error.
+
+ - Variable: parse-sexp-ignore-comments
+ If the value is non-`nil', then comments are treated as whitespace
+ by the functions in this section and by `forward-sexp'.
+
+ In older Emacs versions, this feature worked only when the comment
+ terminator is something like `*/', and appears only to end a
+ comment. In languages where newlines terminate comments, it was
+ necessary make this variable `nil', since not every newline is the
+ end of a comment. This limitation no longer exists.
+
+ You can use `forward-comment' to move forward or backward over one
+comment or several comments.
+
+ - 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
+ stopped. It also stops after satisfying COUNT.
+
+ Optional argument BUFFER defaults to the current buffer.
+
+ To move forward over all comments and whitespace following point, use
+`(forward-comment (buffer-size))'. `(buffer-size)' is a good argument
+to use, because the number of comments in the buffer cannot exceed that
+many.
+
+\1f
+File: lispref.info, Node: Standard Syntax Tables, Next: Syntax Table Internals, Prev: Parsing Expressions, Up: Syntax Tables
+
+Some Standard Syntax Tables
+===========================
+
+ Most of the major modes in XEmacs have their own syntax tables. Here
+are several of them:
+
+ - Function: standard-syntax-table
+ This function returns the standard syntax table, which is the
+ syntax table used in Fundamental mode.
+
+ - Variable: text-mode-syntax-table
+ The value of this variable is the syntax table used in Text mode.
+
+ - Variable: c-mode-syntax-table
+ The value of this variable is the syntax table for C-mode buffers.
+
+ - Variable: emacs-lisp-mode-syntax-table
+ The value of this variable is the syntax table used in Emacs Lisp
+ mode by editing commands. (It has no effect on the Lisp `read'
+ function.)
+
+\1f
+File: lispref.info, Node: Syntax Table Internals, Prev: Standard Syntax Tables, Up: Syntax Tables
+
+Syntax Table Internals
+======================
+
+ Each element of a syntax table is an integer that encodes the syntax
+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::).
+
+ The low 8 bits of each element of a syntax table indicate the syntax
+class.
+
+Integer
+ Class
+
+0
+ whitespace
+
+1
+ punctuation
+
+2
+ word
+
+3
+ symbol
+
+4
+ open parenthesis
+
+5
+ close parenthesis
+
+6
+ expression prefix
+
+7
+ string quote
+
+8
+ paired delimiter
+
+9
+ escape
+
+10
+ character quote
+
+11
+ comment-start
+
+12
+ comment-end
+
+13
+ inherit
+
+ The next 8 bits are the matching opposite parenthesis (if the
+character has parenthesis syntax); otherwise, they are not meaningful.
+The next 6 bits are the flags.
+
+\1f
+File: lispref.info, Node: Abbrevs, Next: Extents, Prev: Syntax Tables, Up: Top
+
+Abbrevs And Abbrev Expansion
+****************************
+
+ An abbreviation or "abbrev" is a string of characters that may be
+expanded to a longer string. The user can insert the abbrev string and
+find it replaced automatically with the expansion of the abbrev. This
+saves typing.
+
+ The set of abbrevs currently in effect is recorded in an "abbrev
+table". Each buffer has a local abbrev table, but normally all buffers
+in the same major mode share one abbrev table. There is also a global
+abbrev table. Normally both are used.
+
+ An abbrev table is represented as an obarray containing a symbol for
+each abbreviation. The symbol's name is the abbreviation; its value is
+the expansion; its function definition is the hook function to do the
+expansion (*note Defining Abbrevs::); its property list cell contains
+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,
+normally they are never used except by the code that handles abbrevs.
+Therefore, it is safe to use them in an extremely nonstandard way.
+*Note Creating Symbols::.
+
+ For the user-level commands for abbrevs, see *Note Abbrev Mode:
+(emacs)Abbrevs.
+
+* Menu:
+
+* Abbrev Mode:: Setting up XEmacs for abbreviation.
+* Tables: Abbrev Tables. Creating and working with abbrev tables.
+* Defining Abbrevs:: Specifying abbreviations and their expansions.
+* Files: Abbrev Files. Saving abbrevs in files.
+* Expansion: Abbrev Expansion. Controlling expansion; expansion subroutines.
+* Standard Abbrev Tables:: Abbrev tables used by various major modes.
+
+\1f
+File: lispref.info, Node: Abbrev Mode, Next: Abbrev Tables, Up: Abbrevs
+
+Setting Up Abbrev Mode
+======================
+
+ Abbrev mode is a minor mode controlled by the value of the variable
+`abbrev-mode'.
+
+ - Variable: abbrev-mode
+ A non-`nil' value of this variable turns on the automatic expansion
+ of abbrevs when their abbreviations are inserted into a buffer.
+ If the value is `nil', abbrevs may be defined, but they are not
+ expanded automatically.
+
+ This variable automatically becomes local when set in any fashion.
+
+ - Variable: default-abbrev-mode
+ This is the value of `abbrev-mode' for buffers that do not
+ override it. This is the same as `(default-value 'abbrev-mode)'.
+
+\1f
+File: lispref.info, Node: Abbrev Tables, Next: Defining Abbrevs, Prev: Abbrev Mode, Up: Abbrevs
+
+Abbrev Tables
+=============
+
+ This section describes how to create and manipulate abbrev tables.
+
+ - Function: make-abbrev-table
+ 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
+ This function undefines all the abbrevs in abbrev table TABLE,
+ leaving it empty. The function returns `nil'.
+
+ - 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
+ of the form `(ABBREVNAME EXPANSION HOOK USECOUNT)'. The value is
+ always `nil'.
+
+ - Variable: abbrev-table-name-list
+ 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
+ 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'.
+
+ If HUMAN is non-`nil', the description is human-oriented.
+ Otherwise the description is a Lisp expression--a call to
+ `define-abbrev-table' that would define NAME exactly as it is
+ currently defined.
+
+\1f
+File: lispref.info, Node: Defining Abbrevs, Next: Abbrev Files, Prev: Abbrev Tables, Up: Abbrevs
+
+Defining Abbrevs
+================
+
+ These functions define an abbrev in a specified abbrev table.
+`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
+ 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,
+ `"global"' or `"mode-specific"'); this is used in prompting the
+ user. The argument ARG is the number of words in the expansion.
+
+ The return value is the symbol that internally represents the new
+ abbrev, or `nil' if the user declines to confirm redefining an
+ existing abbrev.
+
+ - 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.
+
+ The argument NAME should be a string. The argument EXPANSION
+ should be a string, or `nil' to undefine the abbrev.
+
+ The argument HOOK is a function or `nil'. If HOOK is non-`nil',
+ then it is called with no arguments after the abbrev is replaced
+ with EXPANSION; point is located at the end of EXPANSION when HOOK
+ is called.
+
+ The use count of the abbrev is initialized to zero.
+
+ - User Option: only-global-abbrevs
+ If this variable is non-`nil', it means that the user plans to use
+ global abbrevs only. This tells the commands that define
+ mode-specific abbrevs to define global ones instead. This
+ variable does not alter the behavior of the functions in this
+ section; it is examined by their callers.
+
+\1f
+File: lispref.info, Node: Abbrev Files, Next: Abbrev Expansion, Prev: Defining Abbrevs, Up: Abbrevs
+
+Saving Abbrevs in Files
+=======================
+
+ A file of saved abbrev definitions is actually a file of Lisp code.
+The abbrevs are saved in the form of a Lisp program to define the same
+abbrev tables with the same contents. Therefore, you can load the file
+with `load' (*note How Programs Do Loading::). However, the function
+`quietly-read-abbrev-file' is provided as a more convenient interface.
+
+ User-level facilities such as `save-some-buffers' can save abbrevs
+in a file automatically, under the control of variables described here.
+
+ - User Option: abbrev-file-name
+ This is the default file name for reading and saving abbrevs.
+
+ - Function: quietly-read-abbrev-file filename
+ 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.
+ `save-abbrevs' is set to `t' so that changes will be saved.
+
+ This function does not display any messages. It returns `nil'.
+
+ - User Option: save-abbrevs
+ A non-`nil' value for `save-abbrev' means that XEmacs should save
+ abbrevs when files are saved. `abbrev-file-name' specifies the
+ file to save the abbrevs in.
+
+ - Variable: abbrevs-changed
+ This variable is set non-`nil' by defining or altering any
+ abbrevs. This serves as a flag for various XEmacs commands to
+ offer to save your abbrevs.
+
+ - 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'.
+
+\1f
+File: lispref.info, Node: Abbrev Expansion, Next: Standard Abbrev Tables, Prev: Abbrev Files, Up: Abbrevs
+
+Looking Up and Expanding Abbreviations
+======================================
+
+ Abbrevs are usually expanded by commands for interactive use,
+including `self-insert-command'. This section describes the
+subroutines used in writing such functions, as well as the variables
+they use for communication.
+
+ - Function: abbrev-symbol abbrev &optional table
+ 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
+ to look it up in. If TABLE is `nil', this function tries first
+ the current buffer's local abbrev table, and second the global
+ abbrev 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
+ `abbrev-symbol'.
+
+ - Command: expand-abbrev
+ This command expands the abbrev before point, if any. If point
+ 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
+ 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
+ as usual.
+
+ - User Option: abbrev-all-caps
+ When this is set non-`nil', an abbrev entered entirely in upper
+ case is expanded using all upper case. Otherwise, an abbrev
+ entered entirely in upper case is expanded by capitalizing each
+ word of the expansion.
+
+ - Variable: abbrev-start-location
+ This is the buffer position for `expand-abbrev' to use as the start
+ of the next abbrev to be expanded. (`nil' means use the word
+ before point instead.) `abbrev-start-location' is set to `nil'
+ each time `expand-abbrev' is called. This variable is also set by
+ `abbrev-prefix-mark'.
+
+ - Variable: abbrev-start-location-buffer
+ The value of this variable is the buffer for which
+ `abbrev-start-location' has been set. Trying to expand an abbrev
+ in any other buffer clears `abbrev-start-location'. This variable
+ is set by `abbrev-prefix-mark'.
+
+ - Variable: last-abbrev
+ This is the `abbrev-symbol' of the last abbrev expanded. This
+ information is left by `expand-abbrev' for the sake of the
+ `unexpand-abbrev' command.
+
+ - Variable: last-abbrev-location
+ This is the location of the last abbrev expanded. This contains
+ information left by `expand-abbrev' for the sake of the
+ `unexpand-abbrev' command.
+
+ - Variable: last-abbrev-text
+ This is the exact expansion text of the last abbrev expanded,
+ after case conversion (if any). Its value is `nil' if the abbrev
+ has already been unexpanded. This contains information left by
+ `expand-abbrev' for the sake of the `unexpand-abbrev' command.
+
+ - Variable: pre-abbrev-expand-hook
+ This is a normal hook whose functions are executed, in sequence,
+ just before any expansion of an abbrev. *Note Hooks::. Since it
+ is a normal hook, the hook functions receive no arguments.
+ However, they can find the abbrev to be expanded by looking in the
+ buffer before point.
+
+ The following sample code shows a simple use of
+`pre-abbrev-expand-hook'. If the user terminates an abbrev with a
+punctuation character, the hook function asks for confirmation. Thus,
+this hook allows the user to decide whether to expand the abbrev, and
+aborts expansion if it is not confirmed.
+
+ (add-hook 'pre-abbrev-expand-hook 'query-if-not-space)
+
+ ;; This is the function invoked by `pre-abbrev-expand-hook'.
+
+ ;; If the user terminated the abbrev with a space, the function does
+ ;; nothing (that is, it returns so that the abbrev can expand). If the
+ ;; user entered some other character, this function asks whether
+ ;; expansion should continue.
+
+ ;; If the user answers the prompt with `y', the function returns
+ ;; `nil' (because of the `not' function), but that is
+ ;; acceptable; the return value has no effect on expansion.
+
+ (defun query-if-not-space ()
+ (if (/= ?\ (preceding-char))
+ (if (not (y-or-n-p "Do you want to expand this abbrev? "))
+ (error "Not expanding this abbrev"))))
+
+\1f
+File: lispref.info, Node: Standard Abbrev Tables, Prev: Abbrev Expansion, Up: Abbrevs
+
+Standard Abbrev Tables
+======================
+
+ Here we list the variables that hold the abbrev tables for the
+preloaded major modes of XEmacs.
+
+ - Variable: global-abbrev-table
+ This is the abbrev table for mode-independent abbrevs. The abbrevs
+ defined in it apply to all buffers. Each buffer may also have a
+ local abbrev table, whose abbrev definitions take precedence over
+ those in the global table.
+
+ - Variable: local-abbrev-table
+ The value of this buffer-local variable is the (mode-specific)
+ abbreviation table of the current buffer.
+
+ - Variable: fundamental-mode-abbrev-table
+ This is the local abbrev table used in Fundamental mode; in other
+ words, it is the local abbrev table in all buffers in Fundamental
+ mode.
+
+ - Variable: text-mode-abbrev-table
+ This is the local abbrev table used in Text mode.
+
+ - Variable: c-mode-abbrev-table
+ This is the local abbrev table used in C mode.
+
+ - Variable: lisp-mode-abbrev-table
+ This is the local abbrev table used in Lisp mode and Emacs Lisp
+ mode.
+
+\1f
File: lispref.info, Node: Extents, Next: Specifiers, Prev: Abbrevs, Up: Top
Extents
This function returns T if `map-extents' would visit EXTENT if
called with the given arguments.
-\1f
-File: lispref.info, Node: Extent Properties, Next: Detached Extents, Prev: Mapping Over Extents, Up: Extents
-
-Properties of Extents
-=====================
-
- Each extent has a property list associating property names with
-values. Some property names have predefined meanings, and can usually
-only assume particular values. Assigning other values to such a
-property either cause the value to be converted into a legal value
-(e.g., assigning anything but `nil' to a Boolean property will cause
-the value of `t' to be assigned to the property) or will cause an
-error. Property names without predefined meanings can be assigned any
-value. An undefined property is equivalent to a property with a value
-of `nil', or with a particular default value in the case of properties
-with predefined meanings. Note that, when an extent is created, the
-`end-open' and `detachable' properties are set on it.
-
- If an extent has a parent, all of its properties actually derive
-from that parent (or from the root ancestor if the parent in turn has a
-parent), and setting a property of the extent actually sets that
-property on the parent. *Note Extent Parents::.
-
- - Function: extent-property extent property
- This function returns the value of PROPERTY in EXTENT. If
- PROPERTY is undefined, `nil' is returned.
-
- - 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
- 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
- Change some properties of EXTENT. PLIST is a property list. This
- is useful to change many extent properties at once.
-
- The following table lists the properties with predefined meanings,
-along with their allowable values.
-
-`detached'
- (Boolean) Whether the extent is detached. Setting this is the
- same as calling `detach-extent'. *Note Detached Extents::.
-
-`destroyed'
- (Boolean) Whether the extent has been deleted. Setting this is
- the same as calling `delete-extent'.
-
-`priority'
- (integer) The extent's redisplay priority. Defaults to 0. *Note
- priority: Intro to Extents. This property can also be set with
- `set-extent-priority' and accessed with `extent-priority'.
-
-`start-open'
- (Boolean) Whether the start position of the extent is open,
- meaning that characters inserted at that position go outside of
- the extent. *Note Extent Endpoints::.
-
-`start-closed'
- (Boolean) Same as `start-open' but with the opposite sense.
- Setting this property clears `start-open' and vice-versa.
-
-`end-open'
- (Boolean) Whether the end position of the extent is open, meaning
- that characters inserted at that position go outside of the
- extent. This is `t' by default. *Note Extent Endpoints::.
-
-`end-closed'
- (Boolean) Same as `end-open' but with the opposite sense. Setting
- this property clears `end-open' and vice-versa.
-
-`read-only'
- (Boolean) Whether text within this extent will be unmodifiable.
-
-`face'
- (face, face name, list of faces or face names, or `nil') The face
- in which to display the extent's text. This property can also be
- set with `set-extent-face' and accessed with `extent-face'. Note
- that if a list of faces is specified, the faces are merged
- together, with faces earlier in the list having priority over
- faces later in the list.
-
-`mouse-face'
- (face, face name, list of faces or face names, or `nil') The face
- used to display the extent when the mouse moves over it. This
- property can also be set with `set-extent-mouse-face' and accessed
- with `extent-mouse-face'. Note that if a list of faces is
- specified, the faces are merged together, with faces earlier in
- the list having priority over faces later in the list. *Note
- Extents and Events::.
-
-`pointer'
- (pointer glyph) The glyph used as the pointer when the mouse
- moves over the extent. This takes precedence over the
- `text-pointer-glyph' and `nontext-pointer-glyph' variables. If
- for any reason this glyph is an invalid pointer, the standard
- glyphs will be used as fallbacks. *Note Mouse Pointer::.
-
-`detachable'
- (Boolean) Whether this extent becomes detached when all of the
- text it covers is deleted. This is `t' by default. *Note
- Detached Extents::.
-
-`duplicable'
- (Boolean) Whether this extent should be copied into strings, so
- that kill, yank, and undo commands will restore or copy it. *Note
- Duplicable Extents::.
-
-`unique'
- (Boolean) Meaningful only in conjunction with `duplicable'. When
- this is set, there may be only one instance of this extent
- attached at a time. *Note Duplicable Extents::.
-
-`invisible'
- (Boolean) If `t', text under this extent will not be displayed -
- it will look as if the text is not there at all.
-
-`keymap'
- (keymap or `nil') This keymap is consulted for mouse clicks on this
- extent or keypresses made while `point' is within the extent.
- *Note Extents and Events::.
-
-`copy-function'
- This is a hook that is run when a duplicable extent is about to be
- copied from a buffer to a string (or the kill ring). *Note
- Duplicable Extents::.
-
-`paste-function'
- This is a hook that is run when a duplicable extent is about to be
- copied from a string (or the kill ring) into a buffer. *Note
- Duplicable Extents::.
-
-`begin-glyph'
- (glyph or `nil') This extent's begin glyph. *Note Annotations::.
-
-`end-glyph'
- (glyph or `nil') This extent's end glyph. *Note Annotations::.
-
-`begin-glyph-layout'
- (`text', `whitespace', `inside-margin', or `outside-margin') The
- layout policy for this extent's begin glyph. Defaults to `text'.
- *Note Annotations::.
-
-`end-glyph-layout'
- (`text', `whitespace', `inside-margin', or `outside-margin') The
- layout policy for this extent's end glyph. Defaults to `text'.
- *Note Annotations::.
-
-`initial-redisplay-function'
- (any funcallable object) The function to be called the first time
- (a part of) the extent is redisplayed. It will be called with the
- extent as its argument.
-
- This is used by `lazy-shot' to implement lazy font-locking. The
- functionality is still experimental, and may change without further
- notice.
-
- The following convenience functions are provided for accessing
-particular properties of an 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'.
-
- Note that you can use `eq' to compare lists of faces as returned
- by `extent-face'. In other words, if you set the face of two
- different extents to two lists that are `equal' but not `eq', then
- the return value of `extent-face' on the two extents will return
- the identical list.
-
- - 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
- This function returns the `priority' property of EXTENT.
-
- - Function: extent-keymap extent
- This function returns the `keymap' property of 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
- 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
- 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
- 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
- This function sets the `priority' property of EXTENT to PRI.
-
- - Function: set-extent-face extent face
- This function sets the `face' property of EXTENT to 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
- 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
- This function sets the `begin-glyph-layout' property of EXTENT to
- 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
- 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
- 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
- This function sets the `initial-redisplay-function' property of the
- extent to FUNCTION.
-
-\1f
-File: lispref.info, Node: Detached Extents, Next: Extent Parents, Prev: Extent Properties, Up: Extents
-
-Detached Extents
-================
-
- A detached extent is an extent that is not attached to a buffer or
-string but can be re-inserted. Detached extents have a start position
-and end position of `nil'. Extents can be explicitly detached using
-`detach-extent'. An extent is also detached when all of its characters
-are all killed by a deletion, if its `detachable' property is set; if
-this property is not set, the extent becomes a zero-length extent.
-(Zero-length extents with the `detachable' property set behave
-specially. *Note zero-length extents: Extent Endpoints.)
-
- - Function: detach-extent extent
- 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
- This function returns `nil' if EXTENT is detached, and `t'
- otherwise.
-
- - 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
- 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
- extent will first be copied as if with `copy-extent'. This
- function operates the same as if `insert' were called on a string
- whose extent data calls for EXTENT to be inserted, except that if
- NO-HOOKS is non-`nil', EXTENT's `paste-function' will not be
- invoked. *Note Duplicable Extents::.
-
-\1f
-File: lispref.info, Node: Extent Parents, Next: Duplicable Extents, Prev: Detached Extents, Up: Extents
-
-Extent Parents
-==============
-
- An extent can have a parent extent set for it. If this is the case,
-the extent derives all its properties from that extent and has no
-properties of its own. The only "properties" that the extent keeps are
-the buffer or string it refers to and the start and end points. (More
-correctly, the extent's own properties are shadowed. If you later
-change the extent to have no parent, its own properties will become
-visible again.)
-
- It is possible for an extent's parent to itself have a parent, and
-so on. Through this, a whole tree of extents can be created, all
-deriving their properties from one root extent. Note, however, that
-you cannot create an inheritance loop--this is explicitly disallowed.
-
- Parent extents are used to implement the extents over the modeline.
-
- - Function: set-extent-parent extent parent
- 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
- This function return the parents (if any) of EXTENT, or `nil'.
-
- - 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
- 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.
-
-\1f
-File: lispref.info, Node: Duplicable Extents, Next: Extents and Events, Prev: Extent Parents, Up: Extents
-
-Duplicable Extents
-==================
-
- If an extent has the `duplicable' property, it will be copied into
-strings, so that kill, yank, and undo commands will restore or copy it.
-
- Specifically:
-
- * 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
- `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.
-
- * Similarly, when text is copied or cut into the kill ring, any
- duplicable extents will be remembered and reinserted later when
- the text is pasted back into a buffer.
-
- * When `concat' is called on strings, the extents in the strings are
- copied into the resulting string.
-
- * When `substring' is called on a string, the relevant extents are
- copied into the resulting string.
-
- * When a duplicable extent is detached by `detach-extent' or string
- deletion, or inserted by `insert-extent' or string insertion, the
- action is recorded by the undo mechanism so that it can be undone
- later. Note that if an extent gets detached and then a later undo
- causes the extent to get reinserted, the new extent will not be
- `eq' to the original extent.
-
- * Extent motion, face changes, and attachment via `make-extent' are
- not recorded by the undo mechanism. This means that extent changes
- which are to be undo-able must be performed by character editing,
- or by insertion and detachment of duplicable extents.
-
- * A duplicable extent's `copy-function' property, if non-`nil',
- should be a function, and will be run when a duplicable extent is
- about to be copied from a buffer to a string (or the kill ring).
- It is called with three arguments: the extent and the buffer
- positions within it which are being copied. If this function
- returns `nil', then the extent will not be copied; otherwise it
- will.
-
- * A duplicable extent's `paste-function' property, if non-`nil',
- should be a function, and will be run when a duplicable extent is
- about to be copied from a string (or the kill ring) into a buffer.
- It is called with three arguments: the original extent and the
- buffer positions which the copied extent will occupy. (This hook
- is run after the corresponding text has already been inserted into
- the buffer.) Note that the extent argument may be detached when
- this function is run. If this function returns `nil', no extent
- will be inserted. Otherwise, there will be an extent covering the
- range in question.
-
- Note: if the extent to be copied is already attached to the buffer
- and overlaps the new range, the extent will simply be extended and
- the `paste-function' will not be called.
-
-\1f
-File: lispref.info, Node: Extents and Events, Next: Atomic Extents, Prev: Duplicable Extents, Up: Extents
-
-Interaction of Extents with Keyboard and Mouse Events
-=====================================================
-
- If an extent has the `mouse-face' property set, it will be
-highlighted when the mouse passes over it. Highlighting is accomplished
-by merging the extent's face with the face or faces specified by the
-`mouse-face' property. The effect is as if a pseudo-extent with the
-`mouse-face' face were inserted after the extent in the display order
-(*note Extent Endpoints::, display order).
-
- - Variable: mouse-highlight-priority
- This variable holds the priority to use when merging in the
- highlighting pseudo-extent. The default is 1000. This is
- purposely set very high so that the highlighting pseudo-extent
- shows up even if there are other extents with various priorities
- at the same location.
-
- You can also explicitly cause an extent to be highlighted. Only one
-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
- 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
- This function is similar to `highlight-extent' but highlights or
- de-highlights the extent regardless of whether it has the
- `mouse-face' property.
-
- If an extent has a `keymap' property, this keymap will be consulted
-for mouse clicks on the extent and keypresses made while `point' is
-within the extent. The behavior of mouse clicks and keystrokes not
-defined in the keymap is as normal for the buffer.
-
-\1f
-File: lispref.info, Node: Atomic Extents, Prev: Extents and Events, Up: Extents
-
-Atomic Extents
-==============
-
- If the Lisp file `atomic-extents' is loaded, then the atomic extent
-facility is available. An "atomic extent" is an extent for which
-`point' cannot be positioned anywhere within it. This ensures that
-when selecting text, either all or none of the extent is selected.
-
- To make an extent atomic, set its `atomic' property.
-
-\1f
-File: lispref.info, Node: Specifiers, Next: Faces and Window-System Objects, Prev: Extents, Up: Top
-
-Specifiers
-**********
-
- A specifier is an object used to keep track of a property whose value
-may vary depending on the particular situation (e.g. particular buffer
-displayed in a particular window) that it is used in. The value of many
-built-in properties, such as the font, foreground, background, and such
-properties of a face and variables such as `modeline-shadow-thickness'
-and `top-toolbar-height', is actually a specifier object. The
-specifier object, in turn, is "instanced" in a particular situation to
-yield the real value of the property in that situation.
-
- - Function: specifierp object
- This function returns non-`nil' if OBJECT is a specifier.
-
-* Menu:
-
-* Introduction to Specifiers:: Specifiers provide a clean way for
- display and other properties to vary
- (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
- a specifier in a particular context.
-* Specifier Types:: Specifiers come in different flavors.
-* 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.
-* Specifier Tag Functions:: Working with specifier tags.
-* Specifier Instancing Functions::
- Functions to instance a specifier.
-* Specifier Example:: Making all this stuff clearer.
-* Creating Specifiers:: Creating specifiers for your own use.
-* Specifier Validation Functions::
- Validating the components of a specifier.
-* Other Specification Functions::
- Other ways of working with specifications.
-
-\1f
-File: lispref.info, Node: Introduction to Specifiers, Next: Specifiers In-Depth, Up: Specifiers
-
-Introduction to Specifiers
-==========================
-
- Sometimes you may want the value of a property to vary depending on
-the context the property is used in. A simple example of this in XEmacs
-is buffer-local variables. For example, the variable
-`modeline-format', which controls the format of the modeline, can have
-different values depending on the particular buffer being edited. The
-variable has a default value which most modes will use, but a
-specialized package such as Calendar might change the variable so as to
-tailor the modeline to its own purposes.
-
- Other properties (such as those that can be changed by the
-`modify-frame-parameters' function, for example the color of the text
-cursor) can have frame-local values, although it might also make sense
-for them to have buffer-local values. In other cases, you might want
-the property to vary depending on the particular window within the
-frame that applies (e.g. the top or bottom window in a split frame), the
-device type that that frame appears on (X or tty), etc. Perhaps you can
-envision some more complicated scenario where you want a particular
-value in a specified buffer, another value in all other buffers
-displayed on a particular frame, another value in all other buffers
-displayed in all other frames on any mono (two-color, e.g. black and
-white only) displays, and a default value in all other circumstances.
-
- A "specifier" is a generalization of this, allowing a great deal of
-flexibility in controlling exactly what value a property has in which
-circumstances. It is most commonly used for display properties, such as
-an image or the foreground color of a face. As a simple example, you
-can specify that the foreground of the default face be
-
- * blue for a particular buffer
-
- * green for all other buffers
-
- As a more complicated example, you could specify that the foreground
-of the default face be
-
- * forest green for all buffers displayed in a particular Emacs
- window, or green if the X server doesn't recognize the color
- `forest green'
-
- * blue for all buffers displayed in a particular frame
-
- * red for all other buffers displayed on a color device
-
- * white for all other buffers
-
-\1f
-File: lispref.info, Node: Specifiers In-Depth, Next: Specifier Instancing, Prev: Introduction to Specifiers, Up: Specifiers
-
-In-Depth Overview of a Specifier
-================================
-
- A specifier object encapsulates a set of "specifications", each of
-which says what its value should be if a particular condition applies.
-For example, one specification might be "The value should be
-darkseagreen2 on X devices" another might be "The value should be blue
-in the *Help* buffer". In specifier terminology, these conditions are
-called "locales" and the values are called "instantiators". Given a
-specifier, a logical question is "What is its value in a particular
-situation?" This involves looking through the specifications to see
-which ones apply to this particular situation, and perhaps preferring
-one over another if more than one applies. In specifier terminology, a
-"particular situation" is called a "domain", and determining its value
-in a particular domain is called "instancing". Most of the time, a
-domain is identified by a particular window. For example, if the
-redisplay engine is drawing text in the default face in a particular
-window, it retrieves the specifier for the foreground color of the
-default face and "instances" it in the domain given by that window; in
-other words, it asks the specifier, "What is your value in this
-window?".
-
- More specifically, a specifier contains a set of "specifications",
-each of which associates a "locale" (a window object, a buffer object,
-a frame object, a device object, or the symbol `global') with an
-"inst-list", which is a list of one or more "inst-pairs". (For each
-possible locale, there can be at most one specification containing that
-locale.) Each inst-pair is a cons of a "tag set" (an unordered list of
-zero or more symbols, or "tags") and an "instantiator" (the allowed
-form of this varies depending on the type of specifier). In a given
-specification, there may be more than one inst-pair with the same tag
-set; this is unlike for locales.
-
- The tag set is used to restrict the sorts of devices over which the
-instantiator is valid and to uniquely identify instantiators added by a
-particular application, so that different applications can work on the
-same specifier and not interfere with each other. Each tag can have a
-"predicate" associated with it, which is a function of one argument (a
-device) that specifies whether the tag matches that particular device.
-(If a tag does not have a predicate, it matches all devices.) All tags
-in a tag set must match a device for the associated inst-pair to be
-instantiable over that device. (A null tag set is perfectly valid.)
-
- The valid device types (normally `x', `tty', and `stream') and
-device classes (normally `color', `grayscale', and `mono') can always
-be used as tags, and match devices of the associated type or class
-(*note Consoles and Devices::). User-defined tags may be defined, with
-an optional predicate specified. An application can create its own
-tag, use it to mark all its instantiators, and be fairly confident that
-it will not interfere with other applications that modify the same
-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
-instantiators.
-
- When a specifier is instanced in a domain, both the locale and the
-tag set can be viewed as specifying necessary conditions that must
-apply in that domain for an instantiator to be considered as a possible
-result of the instancing. More specific locales always override more
-general locales (thus, there is no particular ordering of the
-specifications in a specifier); however, the tag sets are simply
-considered in the order that the inst-pairs occur in the
-specification's inst-list.
-
- Note also that the actual object that results from the instancing
-(called an "instance object") may not be the same as the instantiator
-from which it was derived. For some specifier types (such as integer
-specifiers and boolean specifiers), the instantiator will be returned
-directly as the instance object. For other types, however, this is not
-the case. For example, for font specifiers, the instantiator is a
-font-description string and the instance object is a font-instance
-object, which describes how the font is displayed on a particular
-device. A font-instance object encapsulates such things as the actual
-font name used to display the font on that device (a font-description
-string under X is usually a wildcard specification that may resolve to
-different font names, with possibly different foundries, widths, etc.,
-on different devices), the extra properties of that font on that
-device, etc. Furthermore, this conversion (called "instantiation")
-might fail--a font or color might not exist on a particular device, for
-example.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Extent Properties, Next: Detached Extents, Prev: Mapping Over Extents, Up: Extents
+
+Properties of Extents
+=====================
+
+ Each extent has a property list associating property names with
+values. Some property names have predefined meanings, and can usually
+only assume particular values. Assigning other values to such a
+property either cause the value to be converted into a legal value
+(e.g., assigning anything but `nil' to a Boolean property will cause
+the value of `t' to be assigned to the property) or will cause an
+error. Property names without predefined meanings can be assigned any
+value. An undefined property is equivalent to a property with a value
+of `nil', or with a particular default value in the case of properties
+with predefined meanings. Note that, when an extent is created, the
+`end-open' and `detachable' properties are set on it.
+
+ If an extent has a parent, all of its properties actually derive
+from that parent (or from the root ancestor if the parent in turn has a
+parent), and setting a property of the extent actually sets that
+property on the parent. *Note Extent Parents::.
+
+ - Function: extent-property extent property
+ This function returns the value of PROPERTY in EXTENT. If
+ PROPERTY is undefined, `nil' is returned.
+
+ - 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
+ 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
+ Change some properties of EXTENT. PLIST is a property list. This
+ is useful to change many extent properties at once.
+
+ The following table lists the properties with predefined meanings,
+along with their allowable values.
+
+`detached'
+ (Boolean) Whether the extent is detached. Setting this is the
+ same as calling `detach-extent'. *Note Detached Extents::.
+
+`destroyed'
+ (Boolean) Whether the extent has been deleted. Setting this is
+ the same as calling `delete-extent'.
+
+`priority'
+ (integer) The extent's redisplay priority. Defaults to 0. *Note
+ priority: Intro to Extents. This property can also be set with
+ `set-extent-priority' and accessed with `extent-priority'.
+
+`start-open'
+ (Boolean) Whether the start position of the extent is open,
+ meaning that characters inserted at that position go outside of
+ the extent. *Note Extent Endpoints::.
+
+`start-closed'
+ (Boolean) Same as `start-open' but with the opposite sense.
+ Setting this property clears `start-open' and vice-versa.
+
+`end-open'
+ (Boolean) Whether the end position of the extent is open, meaning
+ that characters inserted at that position go outside of the
+ extent. This is `t' by default. *Note Extent Endpoints::.
+
+`end-closed'
+ (Boolean) Same as `end-open' but with the opposite sense. Setting
+ this property clears `end-open' and vice-versa.
+
+`read-only'
+ (Boolean) Whether text within this extent will be unmodifiable.
+
+`face'
+ (face, face name, list of faces or face names, or `nil') The face
+ in which to display the extent's text. This property can also be
+ set with `set-extent-face' and accessed with `extent-face'. Note
+ that if a list of faces is specified, the faces are merged
+ together, with faces earlier in the list having priority over
+ faces later in the list.
+
+`mouse-face'
+ (face, face name, list of faces or face names, or `nil') The face
+ used to display the extent when the mouse moves over it. This
+ property can also be set with `set-extent-mouse-face' and accessed
+ with `extent-mouse-face'. Note that if a list of faces is
+ specified, the faces are merged together, with faces earlier in
+ the list having priority over faces later in the list. *Note
+ Extents and Events::.
+
+`pointer'
+ (pointer glyph) The glyph used as the pointer when the mouse
+ moves over the extent. This takes precedence over the
+ `text-pointer-glyph' and `nontext-pointer-glyph' variables. If
+ for any reason this glyph is an invalid pointer, the standard
+ glyphs will be used as fallbacks. *Note Mouse Pointer::.
+
+`detachable'
+ (Boolean) Whether this extent becomes detached when all of the
+ text it covers is deleted. This is `t' by default. *Note
+ Detached Extents::.
+
+`duplicable'
+ (Boolean) Whether this extent should be copied into strings, so
+ that kill, yank, and undo commands will restore or copy it. *Note
+ Duplicable Extents::.
+
+`unique'
+ (Boolean) Meaningful only in conjunction with `duplicable'. When
+ this is set, there may be only one instance of this extent
+ attached at a time. *Note Duplicable Extents::.
+
+`invisible'
+ (Boolean) If `t', text under this extent will not be displayed -
+ it will look as if the text is not there at all.
+
+`keymap'
+ (keymap or `nil') This keymap is consulted for mouse clicks on this
+ extent or keypresses made while `point' is within the extent.
+ *Note Extents and Events::.
+
+`copy-function'
+ This is a hook that is run when a duplicable extent is about to be
+ copied from a buffer to a string (or the kill ring). *Note
+ Duplicable Extents::.
+
+`paste-function'
+ This is a hook that is run when a duplicable extent is about to be
+ copied from a string (or the kill ring) into a buffer. *Note
+ Duplicable Extents::.
+
+`begin-glyph'
+ (glyph or `nil') This extent's begin glyph. *Note Annotations::.
+
+`end-glyph'
+ (glyph or `nil') This extent's end glyph. *Note Annotations::.
+
+`begin-glyph-layout'
+ (`text', `whitespace', `inside-margin', or `outside-margin') The
+ layout policy for this extent's begin glyph. Defaults to `text'.
+ *Note Annotations::.
+
+`end-glyph-layout'
+ (`text', `whitespace', `inside-margin', or `outside-margin') The
+ layout policy for this extent's end glyph. Defaults to `text'.
+ *Note Annotations::.
+
+`initial-redisplay-function'
+ (any funcallable object) The function to be called the first time
+ (a part of) the extent is redisplayed. It will be called with the
+ extent as its argument.
+
+ This is used by `lazy-shot' to implement lazy font-locking. The
+ functionality is still experimental, and may change without further
+ notice.
+
+ The following convenience functions are provided for accessing
+particular properties of an 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'.
+
+ Note that you can use `eq' to compare lists of faces as returned
+ by `extent-face'. In other words, if you set the face of two
+ different extents to two lists that are `equal' but not `eq', then
+ the return value of `extent-face' on the two extents will return
+ the identical list.
+
+ - 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
+ This function returns the `priority' property of EXTENT.
+
+ - Function: extent-keymap extent
+ This function returns the `keymap' property of 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
+ 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
+ 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
+ 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
+ This function sets the `priority' property of EXTENT to PRI.
+
+ - Function: set-extent-face extent face
+ This function sets the `face' property of EXTENT to 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
+ 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
+ This function sets the `begin-glyph-layout' property of EXTENT to
+ 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
+ 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
+ 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
+ This function sets the `initial-redisplay-function' property of the
+ extent to FUNCTION.
+
+\1f
+File: lispref.info, Node: Detached Extents, Next: Extent Parents, Prev: Extent Properties, Up: Extents
+
+Detached Extents
+================
+
+ A detached extent is an extent that is not attached to a buffer or
+string but can be re-inserted. Detached extents have a start position
+and end position of `nil'. Extents can be explicitly detached using
+`detach-extent'. An extent is also detached when all of its characters
+are all killed by a deletion, if its `detachable' property is set; if
+this property is not set, the extent becomes a zero-length extent.
+(Zero-length extents with the `detachable' property set behave
+specially. *Note zero-length extents: Extent Endpoints.)
+
+ - Function: detach-extent extent
+ 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
+ This function returns `nil' if EXTENT is detached, and `t'
+ otherwise.
+
+ - 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
+ 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
+ extent will first be copied as if with `copy-extent'. This
+ function operates the same as if `insert' were called on a string
+ whose extent data calls for EXTENT to be inserted, except that if
+ NO-HOOKS is non-`nil', EXTENT's `paste-function' will not be
+ invoked. *Note Duplicable Extents::.
+
+\1f
+File: lispref.info, Node: Extent Parents, Next: Duplicable Extents, Prev: Detached Extents, Up: Extents
+
+Extent Parents
+==============
+
+ An extent can have a parent extent set for it. If this is the case,
+the extent derives all its properties from that extent and has no
+properties of its own. The only "properties" that the extent keeps are
+the buffer or string it refers to and the start and end points. (More
+correctly, the extent's own properties are shadowed. If you later
+change the extent to have no parent, its own properties will become
+visible again.)
+
+ It is possible for an extent's parent to itself have a parent, and
+so on. Through this, a whole tree of extents can be created, all
+deriving their properties from one root extent. Note, however, that
+you cannot create an inheritance loop--this is explicitly disallowed.
+
+ Parent extents are used to implement the extents over the modeline.
+
+ - Function: set-extent-parent extent parent
+ 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
+ This function return the parents (if any) of EXTENT, or `nil'.
+
+ - 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
+ 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.
+
+\1f
+File: lispref.info, Node: Duplicable Extents, Next: Extents and Events, Prev: Extent Parents, Up: Extents
+
+Duplicable Extents
+==================
+
+ If an extent has the `duplicable' property, it will be copied into
+strings, so that kill, yank, and undo commands will restore or copy it.
+
+ Specifically:
+
+ * 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
+ `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.
+
+ * Similarly, when text is copied or cut into the kill ring, any
+ duplicable extents will be remembered and reinserted later when
+ the text is pasted back into a buffer.
+
+ * When `concat' is called on strings, the extents in the strings are
+ copied into the resulting string.
+
+ * When `substring' is called on a string, the relevant extents are
+ copied into the resulting string.
+
+ * When a duplicable extent is detached by `detach-extent' or string
+ deletion, or inserted by `insert-extent' or string insertion, the
+ action is recorded by the undo mechanism so that it can be undone
+ later. Note that if an extent gets detached and then a later undo
+ causes the extent to get reinserted, the new extent will not be
+ `eq' to the original extent.
+
+ * Extent motion, face changes, and attachment via `make-extent' are
+ not recorded by the undo mechanism. This means that extent changes
+ which are to be undo-able must be performed by character editing,
+ or by insertion and detachment of duplicable extents.
+
+ * A duplicable extent's `copy-function' property, if non-`nil',
+ should be a function, and will be run when a duplicable extent is
+ about to be copied from a buffer to a string (or the kill ring).
+ It is called with three arguments: the extent and the buffer
+ positions within it which are being copied. If this function
+ returns `nil', then the extent will not be copied; otherwise it
+ will.
+
+ * A duplicable extent's `paste-function' property, if non-`nil',
+ should be a function, and will be run when a duplicable extent is
+ about to be copied from a string (or the kill ring) into a buffer.
+ It is called with three arguments: the original extent and the
+ buffer positions which the copied extent will occupy. (This hook
+ is run after the corresponding text has already been inserted into
+ the buffer.) Note that the extent argument may be detached when
+ this function is run. If this function returns `nil', no extent
+ will be inserted. Otherwise, there will be an extent covering the
+ range in question.
+
+ Note: if the extent to be copied is already attached to the buffer
+ and overlaps the new range, the extent will simply be extended and
+ the `paste-function' will not be called.
+
+\1f
+File: lispref.info, Node: Extents and Events, Next: Atomic Extents, Prev: Duplicable Extents, Up: Extents
+
+Interaction of Extents with Keyboard and Mouse Events
+=====================================================
+
+ If an extent has the `mouse-face' property set, it will be
+highlighted when the mouse passes over it. Highlighting is accomplished
+by merging the extent's face with the face or faces specified by the
+`mouse-face' property. The effect is as if a pseudo-extent with the
+`mouse-face' face were inserted after the extent in the display order
+(*note Extent Endpoints::, display order).
+
+ - Variable: mouse-highlight-priority
+ This variable holds the priority to use when merging in the
+ highlighting pseudo-extent. The default is 1000. This is
+ purposely set very high so that the highlighting pseudo-extent
+ shows up even if there are other extents with various priorities
+ at the same location.
+
+ You can also explicitly cause an extent to be highlighted. Only one
+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
+ 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
+ This function is similar to `highlight-extent' but highlights or
+ de-highlights the extent regardless of whether it has the
+ `mouse-face' property.
+
+ If an extent has a `keymap' property, this keymap will be consulted
+for mouse clicks on the extent and keypresses made while `point' is
+within the extent. The behavior of mouse clicks and keystrokes not
+defined in the keymap is as normal for the buffer.
+
+\1f
+File: lispref.info, Node: Atomic Extents, Prev: Extents and Events, Up: Extents
+
+Atomic Extents
+==============
+
+ If the Lisp file `atomic-extents' is loaded, then the atomic extent
+facility is available. An "atomic extent" is an extent for which
+`point' cannot be positioned anywhere within it. This ensures that
+when selecting text, either all or none of the extent is selected.
+
+ To make an extent atomic, set its `atomic' property.
+
+\1f
+File: lispref.info, Node: Specifiers, Next: Faces and Window-System Objects, Prev: Extents, Up: Top
+
+Specifiers
+**********
+
+ A specifier is an object used to keep track of a property whose value
+may vary depending on the particular situation (e.g. particular buffer
+displayed in a particular window) that it is used in. The value of many
+built-in properties, such as the font, foreground, background, and such
+properties of a face and variables such as `modeline-shadow-thickness'
+and `top-toolbar-height', is actually a specifier object. The
+specifier object, in turn, is "instanced" in a particular situation to
+yield the real value of the property in that situation.
+
+ - Function: specifierp object
+ This function returns non-`nil' if OBJECT is a specifier.
+
+* Menu:
+
+* Introduction to Specifiers:: Specifiers provide a clean way for
+ display and other properties to vary
+ (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
+ a specifier in a particular context.
+* Specifier Types:: Specifiers come in different flavors.
+* 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.
+* Specifier Tag Functions:: Working with specifier tags.
+* Specifier Instancing Functions::
+ Functions to instance a specifier.
+* Specifier Example:: Making all this stuff clearer.
+* Creating Specifiers:: Creating specifiers for your own use.
+* Specifier Validation Functions::
+ Validating the components of a specifier.
+* Other Specification Functions::
+ Other ways of working with specifications.
+
+\1f
+File: lispref.info, Node: Introduction to Specifiers, Next: Specifiers In-Depth, Up: Specifiers
+
+Introduction to Specifiers
+==========================
+
+ Sometimes you may want the value of a property to vary depending on
+the context the property is used in. A simple example of this in XEmacs
+is buffer-local variables. For example, the variable
+`modeline-format', which controls the format of the modeline, can have
+different values depending on the particular buffer being edited. The
+variable has a default value which most modes will use, but a
+specialized package such as Calendar might change the variable so as to
+tailor the modeline to its own purposes.
+
+ Other properties (such as those that can be changed by the
+`modify-frame-parameters' function, for example the color of the text
+cursor) can have frame-local values, although it might also make sense
+for them to have buffer-local values. In other cases, you might want
+the property to vary depending on the particular window within the
+frame that applies (e.g. the top or bottom window in a split frame), the
+device type that that frame appears on (X or tty), etc. Perhaps you can
+envision some more complicated scenario where you want a particular
+value in a specified buffer, another value in all other buffers
+displayed on a particular frame, another value in all other buffers
+displayed in all other frames on any mono (two-color, e.g. black and
+white only) displays, and a default value in all other circumstances.
+
+ A "specifier" is a generalization of this, allowing a great deal of
+flexibility in controlling exactly what value a property has in which
+circumstances. It is most commonly used for display properties, such as
+an image or the foreground color of a face. As a simple example, you
+can specify that the foreground of the default face be
+
+ * blue for a particular buffer
+
+ * green for all other buffers
+
+ As a more complicated example, you could specify that the foreground
+of the default face be
+
+ * forest green for all buffers displayed in a particular Emacs
+ window, or green if the X server doesn't recognize the color
+ `forest green'
+
+ * blue for all buffers displayed in a particular frame
+
+ * red for all other buffers displayed on a color device
+
+ * white for all other buffers
+
+\1f
+File: lispref.info, Node: Specifiers In-Depth, Next: Specifier Instancing, Prev: Introduction to Specifiers, Up: Specifiers
+
+In-Depth Overview of a Specifier
+================================
+
+ A specifier object encapsulates a set of "specifications", each of
+which says what its value should be if a particular condition applies.
+For example, one specification might be "The value should be
+darkseagreen2 on X devices" another might be "The value should be blue
+in the *Help* buffer". In specifier terminology, these conditions are
+called "locales" and the values are called "instantiators". Given a
+specifier, a logical question is "What is its value in a particular
+situation?" This involves looking through the specifications to see
+which ones apply to this particular situation, and perhaps preferring
+one over another if more than one applies. In specifier terminology, a
+"particular situation" is called a "domain", and determining its value
+in a particular domain is called "instancing". Most of the time, a
+domain is identified by a particular window. For example, if the
+redisplay engine is drawing text in the default face in a particular
+window, it retrieves the specifier for the foreground color of the
+default face and "instances" it in the domain given by that window; in
+other words, it asks the specifier, "What is your value in this
+window?".
+
+ More specifically, a specifier contains a set of "specifications",
+each of which associates a "locale" (a window object, a buffer object,
+a frame object, a device object, or the symbol `global') with an
+"inst-list", which is a list of one or more "inst-pairs". (For each
+possible locale, there can be at most one specification containing that
+locale.) Each inst-pair is a cons of a "tag set" (an unordered list of
+zero or more symbols, or "tags") and an "instantiator" (the allowed
+form of this varies depending on the type of specifier). In a given
+specification, there may be more than one inst-pair with the same tag
+set; this is unlike for locales.
+
+ The tag set is used to restrict the sorts of devices over which the
+instantiator is valid and to uniquely identify instantiators added by a
+particular application, so that different applications can work on the
+same specifier and not interfere with each other. Each tag can have a
+"predicate" associated with it, which is a function of one argument (a
+device) that specifies whether the tag matches that particular device.
+(If a tag does not have a predicate, it matches all devices.) All tags
+in a tag set must match a device for the associated inst-pair to be
+instantiable over that device. (A null tag set is perfectly valid.)
+
+ The valid device types (normally `x', `tty', and `stream') and
+device classes (normally `color', `grayscale', and `mono') can always
+be used as tags, and match devices of the associated type or class
+(*note Consoles and Devices::). User-defined tags may be defined, with
+an optional predicate specified. An application can create its own
+tag, use it to mark all its instantiators, and be fairly confident that
+it will not interfere with other applications that modify the same
+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
+instantiators.
+
+ When a specifier is instanced in a domain, both the locale and the
+tag set can be viewed as specifying necessary conditions that must
+apply in that domain for an instantiator to be considered as a possible
+result of the instancing. More specific locales always override more
+general locales (thus, there is no particular ordering of the
+specifications in a specifier); however, the tag sets are simply
+considered in the order that the inst-pairs occur in the
+specification's inst-list.
+
+ Note also that the actual object that results from the instancing
+(called an "instance object") may not be the same as the instantiator
+from which it was derived. For some specifier types (such as integer
+specifiers and boolean specifiers), the instantiator will be returned
+directly as the instance object. For other types, however, this is not
+the case. For example, for font specifiers, the instantiator is a
+font-description string and the instance object is a font-instance
+object, which describes how the font is displayed on a particular
+device. A font-instance object encapsulates such things as the actual
+font name used to display the font on that device (a font-description
+string under X is usually a wildcard specification that may resolve to
+different font names, with possibly different foundries, widths, etc.,
+on different devices), the extra properties of that font on that
+device, etc. Furthermore, this conversion (called "instantiation")
+might fail--a font or color might not exist on a particular device, for
+example.
+
+\1f
File: lispref.info, Node: Specifier Instancing, Next: Specifier Types, Prev: Specifiers In-Depth, Up: Specifiers
How a Specifier Is Instanced
If NOERROR is `nil', signal an error if the spec-list is invalid;
otherwise return `t'.
-\1f
-File: lispref.info, Node: Retrieving Specifications, Next: Specifier Tag Functions, Prev: Adding Specifications, Up: Specifiers
-
-Retrieving the Specifications from a Specifier
-==============================================
-
- - Function: specifier-spec-list specifier &optional locale tag-set
- exact-p
- This function returns the spec-list of specifications for
- SPECIFIER in LOCALE.
-
- If LOCALE is a particular locale (a window, buffer, frame, device,
- or the symbol `global'), a spec-list consisting of the
- specification for that locale will be returned.
-
- If LOCALE is a locale type (i.e. a symbol `window', `buffer',
- `frame', or `device'), a spec-list of the specifications for all
- locales of that type will be returned.
-
- If LOCALE is `nil' or the symbol `all', a spec-list of all
- specifications in SPECIFIER will be returned.
-
- LOCALE can also be a list of locales, locale types, and/or `all';
- the result is as if `specifier-spec-list' were called on each
- element of the list and the results concatenated together.
-
- Only instantiators where TAG-SET (a list of zero or more tags) is
- a subset of (or possibly equal to) the instantiator's tag set are
- returned. (The default value of` nil' is a subset of all tag sets,
- so in this case no instantiators will be screened out.) If EXACT-P
- 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
- This function returns the specification(s) for SPECIFIER in LOCALE.
-
- If LOCALE is a single locale or is a list of one element
- containing a single locale, then a "short form" of the
- instantiators for that locale will be returned. Otherwise, this
- function is identical to `specifier-spec-list'.
-
- The "short form" is designed for readability and not for ease of
- use in Lisp programs, and is as follows:
-
- 1. If there is only one instantiator, then an inst-pair (i.e.
- cons of tag and instantiator) will be returned; otherwise a
- list of inst-pairs will be returned.
-
- 2. For each inst-pair returned, if the instantiator's tag is
- `any', the tag will be removed and the instantiator itself
- will be returned instead of the inst-pair.
-
- 3. If there is only one instantiator, its value is `nil', and
- its tag is `any', a one-element list containing `nil' will be
- returned rather than just `nil', to distinguish this case
- from there being no instantiators at all.
-
-
- - 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
- removed from the specifier, or to implement simple inheritance
- behavior (e.g. this method is used to ensure that faces other than
- `default' inherit their attributes from `default'). By design,
- you cannot change the fallback value, and specifiers created with
- `make-specifier' will never have a fallback (although a similar,
- Lisp-accessible capability may be provided in the future to allow
- for inheritance).
-
- The fallback value will be an inst-list that is instanced like any
- other inst-list, a specifier of the same type as SPECIFIER
- (results in inheritance), or `nil' for no fallback.
-
- When you instance a specifier, you can explicitly request that the
- fallback not be consulted. (The C code does this, for example, when
- merging faces.) See `specifier-instance'.
-
-\1f
-File: lispref.info, Node: Specifier Tag Functions, Next: Specifier Instancing Functions, Prev: Retrieving Specifications, Up: Specifiers
-
-Working With Specifier Tags
-===========================
-
- A specifier tag set is an entity that is attached to an instantiator
-and can be used to restrict the scope of that instantiator to a
-particular device class or device type and/or to mark instantiators
-added by a particular package so that they can be later removed.
-
- A specifier tag set consists of a list of zero of more specifier
-tags, each of which is a symbol that is recognized by XEmacs as a tag.
-(The valid device types and device classes are always tags, as are any
-tags defined by `define-specifier-tag'.) It is called a "tag set" (as
-opposed to a list) because the order of the tags or the number of times
-a particular tag occurs does not matter.
-
- Each tag has a predicate associated with it, which specifies whether
-that tag applies to a particular device. The tags which are device
-types and classes match devices of that type or class. User-defined
-tags can have any predicate, or none (meaning that all devices match).
-When attempting to instance a specifier, a particular instantiator is
-only considered if the device of the domain being instanced over matches
-all tags in the tag set attached to that instantiator.
-
- Most of the time, a tag set is not specified, and the instantiator
-gets a null tag set, which matches all devices.
-
- - Function: valid-specifier-tag-p tag
- This function returns non-`nil' if TAG is a valid specifier tag.
-
- - 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
- 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
- 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
- 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
- PREDICATE is omitted, the tag matches all devices.
-
- You can redefine an existing user-defined specifier tag. However,
- 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
- This function returns a list of all specifier tags matching
- DEVICE. DEVICE defaults to the selected device if omitted.
-
- - Function: specifier-tag-list
- This function returns a list of all currently-defined specifier
- tags. This includes the built-in ones (the device types and
- classes).
-
- - Function: specifier-tag-predicate tag
- This function returns the predicate for the given specifier tag.
-
-\1f
-File: lispref.info, Node: Specifier Instancing Functions, Next: Specifier Example, Prev: Specifier Tag Functions, Up: Specifiers
-
-Functions for Instancing a Specifier
-====================================
-
- - 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.
-
- DOMAIN should be a window, frame, or device. Other values that
- are legal as a locale (e.g. a buffer) are not valid as a domain
- because they do not provide enough information to identify a
- particular device (see `valid-specifier-domain-p'). DOMAIN
- defaults to the selected window if omitted.
-
- "Instantiating" a specifier in a particular domain means
- determining the specifier's "value" in that domain. This is
- accomplished by searching through the specifications in the
- specifier that correspond to all locales that can be derived from
- the given domain, from specific to general. In most cases, the
- domain is an Emacs window. In that case specifications are
- searched for as follows:
-
- 1. A specification whose locale is the window itself;
-
- 2. A specification whose locale is the window's buffer;
-
- 3. A specification whose locale is the window's frame;
-
- 4. A specification whose locale is the window's frame's device;
-
- 5. A specification whose locale is the symbol `global'.
-
- If all of those fail, then the C-code-provided fallback value for
- this specifier is consulted (see `specifier-fallback'). If it is
- an inst-list, then this function attempts to instantiate that list
- just as when a specification is located in the first five steps
- above. If the fallback is a specifier, `specifier-instance' is
- called recursively on this specifier and the return value used.
- Note, however, that if the optional argument NO-FALLBACK is
- non-`nil', the fallback value will not be consulted.
-
- Note that there may be more than one specification matching a
- particular locale; all such specifications are considered before
- looking for any specifications for more general locales. Any
- particular specification that is found may be rejected because it
- is tagged to a particular device class (e.g. `color') or device
- type (e.g. `x') or both and the device for the given domain does
- not match this, or because the specification is not valid for the
- device of the given domain (e.g. the font or color name does not
- exist for this particular X server).
-
- The returned value is dependent on the type of specifier. For
- example, for a font specifier (as returned by the `face-font'
- 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
- 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.
- If the instantiation fails, DEFAULT is returned. In most
- circumstances, you should not use this function; use
- `specifier-instance' instead.
-
-\1f
-File: lispref.info, Node: Specifier Example, Next: Creating Specifiers, Prev: Specifier Instancing Functions, Up: Specifiers
-
-Example of Specifier Usage
-==========================
-
- Now let us present an example to clarify the theoretical discussions
-we have been through. In this example, we will use the general
-specifier functions for clarity. Keep in mind that many types of
-specifiers, and some other types of objects that are associated with
-specifiers (e.g. faces), provide convenience functions making it easier
-to work with objects of that type.
-
- Let us consider the background color of the default face. A
-specifier is used to specify how that color will appear in different
-domains. First, let's retrieve the specifier:
-
- (setq sp (face-property 'default 'background))
- => #<color-specifier 0x3da>
-
- (specifier-specs sp)
- => ((#<buffer "device.c"> (nil . "forest green"))
- (#<window on "Makefile" 0x8a2b> (nil . "hot pink"))
- (#<x-frame "emacs" 0x4ac> (nil . "puke orange")
- (nil . "moccasin"))
- (#<x-frame "VM" 0x4ac> (nil . "magenta"))
- (global ((tty) . "cyan") (nil . "white"))
- )
-
- Then, say we want to determine what the background color of the
-default face is for the window currently displaying the buffer
-`*scratch*'. We call
-
- (get-buffer-window "*scratch*")
- => #<window on "*scratch*" 0x4ad>
- (window-frame (get-buffer-window "*scratch*"))
- => #<x-frame "emacs" 0x4ac>
- (specifier-instance sp (get-buffer-window "*scratch*"))
- => #<color-instance moccasin 47=(FFFF,E4E4,B5B5) 0x6309>
-
- Note that we passed a window to `specifier-instance', not a buffer.
-We cannot pass a buffer because a buffer by itself does not provide
-enough information. The buffer might not be displayed anywhere at all,
-or could be displayed in many different frames on different devices.
-
- The result is arrived at like this:
-
- 1. First, we look for a specification matching the buffer displayed
- in the window, i.e. `*scratch*'. There are none, so we proceed.
-
- 2. Then, we look for a specification matching the window itself.
- Again, there are none.
-
- 3. Then, we look for a specification matching the window's frame. The
- specification `(#<x-frame "emacs" 0x4ac> . "puke orange")' is
- found. We call the instantiation method for colors, passing it the
- locale we were searching over (i.e. the window, in this case) and
- the instantiator (`"puke orange"'). However, the particular device
- which this window is on (let's say it's an X connection) doesn't
- recognize the color `"puke orange"', so the specification is
- rejected.
-
- 4. So we continue looking for a specification matching the window's
- frame. We find `(#<x-frame "emacs" 0x4ac> . "moccasin")'. Again,
- we call the instantiation method for colors. This time, the X
- server our window is on recognizes the color `moccasin', and so the
- instantiation method succeeds and returns a color instance.
-
-\1f
-File: lispref.info, Node: Creating Specifiers, Next: Specifier Validation Functions, Prev: Specifier Example, Up: Specifiers
-
-Creating New Specifier Objects
-==============================
-
- - Function: make-specifier type
- This function creates a new specifier.
-
- A specifier is an object that can be used to keep track of a
- property whose value can be per-buffer, per-window, per-frame, or
- per-device, and can further be restricted to a particular
- device-type or device-class. Specifiers are used, for example,
- for the various built-in properties of a face; this allows a face
- to have different values in different frames, buffers, etc. For
- more information, see `specifier-instance', `specifier-specs', and
- `add-spec-to-specifier'; or, for a detailed description of
- specifiers, including how they are instantiated over a particular
- domain (i.e. how their value in that domain is determined), see
- the chapter on specifiers in the XEmacs Lisp Reference Manual.
-
- TYPE specifies the particular type of specifier, and should be one
- of the symbols `generic', `integer', `natnum', `boolean', `color',
- `font', `image', `face-boolean', or `toolbar'.
-
- For more information on particular types of specifiers, see the
- functions `generic-specifier-p', `integer-specifier-p',
- `natnum-specifier-p', `boolean-specifier-p', `color-specifier-p',
- `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
- This function creates and initialize a new specifier.
-
- This is a front-end onto `make-specifier' that allows you to create
- a specifier and add specs to it at the same time. TYPE specifies
- the specifier type. SPEC-LIST supplies the specification(s) to be
- added to the specifier. Normally, almost any reasonable
- abbreviation of the full spec-list form is accepted, and is
- converted to the full form; however, if optional argument
- DONT-CANONICALIZE is non-`nil', this conversion is not performed,
- and the SPEC-LIST must already be in full form. See
- `canonicalize-spec-list'.
-
-\1f
-File: lispref.info, Node: Specifier Validation Functions, Next: Other Specification Functions, Prev: Creating Specifiers, Up: Specifiers
-
-Functions for Checking the Validity of Specifier Components
-===========================================================
-
- - 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
- 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
- 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
- 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
- This function returns non-`nil' if TAG is a valid specifier tag.
-
- - 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
- This function returns non-`nil' if INST-LIST is valid for
- specifier type 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
- This function signals an error if INSTANTIATOR is invalid for
- SPECIFIER-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
- This function signals an error if SPEC-LIST is invalid for
- specifier type TYPE.
-
-\1f
-File: lispref.info, Node: Other Specification Functions, Prev: Specifier Validation Functions, Up: Specifiers
-
-Other Functions for Working with Specifications in a Specifier
-==============================================================
-
- - 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'.
-
- If DEST is `nil' or omitted, a new specifier will be created and
- the specifications copied into it. Otherwise, the specifications
- will be copied into the existing specifier in DEST.
-
- If LOCALE is `nil' or the symbol `all', all specifications will be
- copied. If LOCALE is a particular locale, the specification for
- that particular locale will be copied. If LOCALE is a locale
- type, the specifications for all locales of that type will be
- copied. LOCALE can also be a list of locales, locale types,
- and/or `all'; this is equivalent to calling `copy-specifier' for
- each of the elements of the list. See `specifier-spec-list' for
- more information about LOCALE.
-
- Only instantiators where TAG-SET (a list of zero or more tags) is
- a subset of (or possibly equal to) the instantiator's tag set are
- copied. (The default value of `nil' is a subset of all tag sets,
- so in this case no instantiators will be screened out.) If EXACT-P
- is non-`nil', however, TAG-SET must be equal to an instantiator's
- tag set for the instantiator to be copied.
-
- Optional argument HOW-TO-ADD specifies what to do with existing
- specifications in DEST. If nil, then whichever locales or locale
- 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
- This function removes specification(s) for SPECIFIER.
-
- If LOCALE is a particular locale (a buffer, window, frame, device,
- or the symbol `global'), the specification for that locale will be
- removed.
-
- If instead, LOCALE is a locale type (i.e. a symbol `buffer',
- `window', `frame', or `device'), the specifications for all
- locales of that type will be removed.
-
- If LOCALE is `nil' or the symbol `all', all specifications will be
- removed.
-
- LOCALE can also be a list of locales, locale types, and/or `all';
- this is equivalent to calling `remove-specifier' for each of the
- elements in the list.
-
- Only instantiators where TAG-SET (a list of zero or more tags) is
- a subset of (or possibly equal to) the instantiator's tag set are
- removed. (The default value of `nil' is a subset of all tag sets,
- so in this case no instantiators will be screened out.) If EXACT-P
- 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
- This function applies FUNC to the specification(s) for LOCALE in
- SPECIFIER.
-
- If LOCALE is a locale, FUNC will be called for that locale. If
- LOCALE is a locale type, FUNC will be mapped over all locales of
- that type. If LOCALE is `nil' or the symbol `all', FUNC will be
- mapped over all locales in SPECIFIER.
-
- FUNC is called with four arguments: the SPECIFIER, the locale
- being mapped over, the inst-list for that locale, and the optional
- MAPARG. If any invocation of FUNC returns non-`nil', the mapping
- 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
- Given a specifier LOCALE, this function returns its type.
-
-\1f
-File: lispref.info, Node: Faces and Window-System Objects, Next: Glyphs, Prev: Specifiers, Up: Top
-
-Faces and Window-System Objects
-*******************************
-
-* Menu:
-
-* Faces:: Controlling the way text looks.
-* Fonts:: Controlling the typeface of text.
-* Colors:: Controlling the color of text and pixmaps.
-
-\1f
-File: lispref.info, Node: Faces, Next: Fonts, Up: Faces and Window-System Objects
-
-Faces
-=====
-
- A "face" is a named collection of graphical properties: font,
-foreground color, background color, background pixmap, optional
-underlining, and (on TTY devices) whether the text is to be highlighted,
-dimmed, blinking, or displayed in reverse video. Faces control the
-display of text on the screen. Every face has a name, which is a symbol
-such as `default' or `modeline'.
-
- Each built-in property of a face is controlled using a specifier,
-which allows it to have separate values in particular buffers, frames,
-windows, and devices and to further vary according to device type (X or
-TTY) and device class (color, mono, or grayscale). *Note Specifiers::,
-for more information.
-
- The face named `default' is used for ordinary text. The face named
-`modeline' is used for displaying the modeline. The face named
-`highlight' is used for highlighted extents (*note Extents::). The
-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.
-
-* Menu:
-
-* Merging Faces:: How XEmacs decides which face to use
- for a character.
-* Basic Face Functions:: How to define and examine faces.
-* Face Properties:: How to access and modify a face's properties.
-* Face Convenience Functions:: Convenience functions for accessing
- particular properties of a face.
-* Other Face Display Functions:: Other functions pertaining to how a
- a face appears.
-
-\1f
-File: lispref.info, Node: Merging Faces, Next: Basic Face Functions, Up: Faces
-
-Merging Faces for Display
--------------------------
-
- Here are all the ways to specify which face to use for display of
-text:
-
- * With defaults. Each frame has a "default face", which is used for
- all text that doesn't somehow specify another face. The face named
- `default' applies to the text area, while the faces `left-margin'
- and `right-margin' apply to the left and right margin areas.
-
- * With text properties. A character may have a `face' property; if
- so, it's displayed with that face. (Text properties are actually
- implemented in terms of extents.) *Note Text Properties::.
-
- * With extents. An extent may have a `face' property, which applies
- to all the text covered by the extent; in addition, if the
- `highlight' property is set, the `highlight' property applies when
- the mouse moves over the extent or if the extent is explicitly
- highlighted. *Note Extents::.
-
- * With annotations. Annotations that are inserted into a buffer can
- specify their own face. (Annotations are actually implemented in
- terms of extents.) *Note Annotations::.
-
- If these various sources together specify more than one face for a
-particular character, XEmacs merges the properties of the various faces
-specified. Extents, text properties, and annotations all use the same
-underlying representation (as extents). When multiple extents cover one
-character, an extent with higher priority overrides those with lower
-priority. *Note Extents::. If no extent covers a particular character,
-the `default' face is used.
-
- If a background pixmap is specified, it determines what will be
-displayed in the background of text characters. If the background
-pixmap is actually a pixmap, with its colors specified, those colors are
-used; if it is a bitmap, the face's foreground and background colors are
-used to color it.
-
-\1f
-File: lispref.info, Node: Basic Face Functions, Next: Face Properties, Prev: Merging Faces, Up: Faces
-
-Basic Functions for Working with Faces
---------------------------------------
-
- The properties a face can specify include the font, the foreground
-color, the background color, the background pixmap, the underlining,
-the display table, and (for TTY devices) whether the text is to be
-highlighted, dimmed, blinking, or displayed in reverse video. The face
-can also leave these unspecified, causing them to assume the value of
-the corresponding property of the `default' face.
-
- Here are the basic primitives for working with faces.
-
- - 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
- an explanatory string used for descriptive purposes. If optional
- argument TEMPORARY is non-`nil', the face will automatically
- disappear when there are no more references to it anywhere in text
- or Lisp code (otherwise, the face will continue to exist
- indefinitely even if it is not used).
-
- - 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
- This function returns whether the given object is a face.
-
- - 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::).
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Retrieving Specifications, Next: Specifier Tag Functions, Prev: Adding Specifications, Up: Specifiers
+
+Retrieving the Specifications from a Specifier
+==============================================
+
+ - Function: specifier-spec-list specifier &optional locale tag-set
+ exact-p
+ This function returns the spec-list of specifications for
+ SPECIFIER in LOCALE.
+
+ If LOCALE is a particular locale (a window, buffer, frame, device,
+ or the symbol `global'), a spec-list consisting of the
+ specification for that locale will be returned.
+
+ If LOCALE is a locale type (i.e. a symbol `window', `buffer',
+ `frame', or `device'), a spec-list of the specifications for all
+ locales of that type will be returned.
+
+ If LOCALE is `nil' or the symbol `all', a spec-list of all
+ specifications in SPECIFIER will be returned.
+
+ LOCALE can also be a list of locales, locale types, and/or `all';
+ the result is as if `specifier-spec-list' were called on each
+ element of the list and the results concatenated together.
+
+ Only instantiators where TAG-SET (a list of zero or more tags) is
+ a subset of (or possibly equal to) the instantiator's tag set are
+ returned. (The default value of` nil' is a subset of all tag sets,
+ so in this case no instantiators will be screened out.) If EXACT-P
+ 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
+ This function returns the specification(s) for SPECIFIER in LOCALE.
+
+ If LOCALE is a single locale or is a list of one element
+ containing a single locale, then a "short form" of the
+ instantiators for that locale will be returned. Otherwise, this
+ function is identical to `specifier-spec-list'.
+
+ The "short form" is designed for readability and not for ease of
+ use in Lisp programs, and is as follows:
+
+ 1. If there is only one instantiator, then an inst-pair (i.e.
+ cons of tag and instantiator) will be returned; otherwise a
+ list of inst-pairs will be returned.
+
+ 2. For each inst-pair returned, if the instantiator's tag is
+ `any', the tag will be removed and the instantiator itself
+ will be returned instead of the inst-pair.
+
+ 3. If there is only one instantiator, its value is `nil', and
+ its tag is `any', a one-element list containing `nil' will be
+ returned rather than just `nil', to distinguish this case
+ from there being no instantiators at all.
+
+
+ - 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
+ removed from the specifier, or to implement simple inheritance
+ behavior (e.g. this method is used to ensure that faces other than
+ `default' inherit their attributes from `default'). By design,
+ you cannot change the fallback value, and specifiers created with
+ `make-specifier' will never have a fallback (although a similar,
+ Lisp-accessible capability may be provided in the future to allow
+ for inheritance).
+
+ The fallback value will be an inst-list that is instanced like any
+ other inst-list, a specifier of the same type as SPECIFIER
+ (results in inheritance), or `nil' for no fallback.
+
+ When you instance a specifier, you can explicitly request that the
+ fallback not be consulted. (The C code does this, for example, when
+ merging faces.) See `specifier-instance'.
+
+\1f
+File: lispref.info, Node: Specifier Tag Functions, Next: Specifier Instancing Functions, Prev: Retrieving Specifications, Up: Specifiers
+
+Working With Specifier Tags
+===========================
+
+ A specifier tag set is an entity that is attached to an instantiator
+and can be used to restrict the scope of that instantiator to a
+particular device class or device type and/or to mark instantiators
+added by a particular package so that they can be later removed.
+
+ A specifier tag set consists of a list of zero of more specifier
+tags, each of which is a symbol that is recognized by XEmacs as a tag.
+(The valid device types and device classes are always tags, as are any
+tags defined by `define-specifier-tag'.) It is called a "tag set" (as
+opposed to a list) because the order of the tags or the number of times
+a particular tag occurs does not matter.
+
+ Each tag has a predicate associated with it, which specifies whether
+that tag applies to a particular device. The tags which are device
+types and classes match devices of that type or class. User-defined
+tags can have any predicate, or none (meaning that all devices match).
+When attempting to instance a specifier, a particular instantiator is
+only considered if the device of the domain being instanced over matches
+all tags in the tag set attached to that instantiator.
+
+ Most of the time, a tag set is not specified, and the instantiator
+gets a null tag set, which matches all devices.
+
+ - Function: valid-specifier-tag-p tag
+ This function returns non-`nil' if TAG is a valid specifier tag.
+
+ - 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
+ 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
+ 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
+ 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
+ PREDICATE is omitted, the tag matches all devices.
+
+ You can redefine an existing user-defined specifier tag. However,
+ 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
+ This function returns a list of all specifier tags matching
+ DEVICE. DEVICE defaults to the selected device if omitted.
+
+ - Function: specifier-tag-list
+ This function returns a list of all currently-defined specifier
+ tags. This includes the built-in ones (the device types and
+ classes).
+
+ - Function: specifier-tag-predicate tag
+ This function returns the predicate for the given specifier tag.
+
+\1f
+File: lispref.info, Node: Specifier Instancing Functions, Next: Specifier Example, Prev: Specifier Tag Functions, Up: Specifiers
+
+Functions for Instancing a Specifier
+====================================
+
+ - 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.
+
+ DOMAIN should be a window, frame, or device. Other values that
+ are legal as a locale (e.g. a buffer) are not valid as a domain
+ because they do not provide enough information to identify a
+ particular device (see `valid-specifier-domain-p'). DOMAIN
+ defaults to the selected window if omitted.
+
+ "Instantiating" a specifier in a particular domain means
+ determining the specifier's "value" in that domain. This is
+ accomplished by searching through the specifications in the
+ specifier that correspond to all locales that can be derived from
+ the given domain, from specific to general. In most cases, the
+ domain is an Emacs window. In that case specifications are
+ searched for as follows:
+
+ 1. A specification whose locale is the window itself;
+
+ 2. A specification whose locale is the window's buffer;
+
+ 3. A specification whose locale is the window's frame;
+
+ 4. A specification whose locale is the window's frame's device;
+
+ 5. A specification whose locale is the symbol `global'.
+
+ If all of those fail, then the C-code-provided fallback value for
+ this specifier is consulted (see `specifier-fallback'). If it is
+ an inst-list, then this function attempts to instantiate that list
+ just as when a specification is located in the first five steps
+ above. If the fallback is a specifier, `specifier-instance' is
+ called recursively on this specifier and the return value used.
+ Note, however, that if the optional argument NO-FALLBACK is
+ non-`nil', the fallback value will not be consulted.
+
+ Note that there may be more than one specification matching a
+ particular locale; all such specifications are considered before
+ looking for any specifications for more general locales. Any
+ particular specification that is found may be rejected because it
+ is tagged to a particular device class (e.g. `color') or device
+ type (e.g. `x') or both and the device for the given domain does
+ not match this, or because the specification is not valid for the
+ device of the given domain (e.g. the font or color name does not
+ exist for this particular X server).
+
+ The returned value is dependent on the type of specifier. For
+ example, for a font specifier (as returned by the `face-font'
+ 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
+ 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.
+ If the instantiation fails, DEFAULT is returned. In most
+ circumstances, you should not use this function; use
+ `specifier-instance' instead.
+
+\1f
+File: lispref.info, Node: Specifier Example, Next: Creating Specifiers, Prev: Specifier Instancing Functions, Up: Specifiers
+
+Example of Specifier Usage
+==========================
+
+ Now let us present an example to clarify the theoretical discussions
+we have been through. In this example, we will use the general
+specifier functions for clarity. Keep in mind that many types of
+specifiers, and some other types of objects that are associated with
+specifiers (e.g. faces), provide convenience functions making it easier
+to work with objects of that type.
+
+ Let us consider the background color of the default face. A
+specifier is used to specify how that color will appear in different
+domains. First, let's retrieve the specifier:
+
+ (setq sp (face-property 'default 'background))
+ => #<color-specifier 0x3da>
+
+ (specifier-specs sp)
+ => ((#<buffer "device.c"> (nil . "forest green"))
+ (#<window on "Makefile" 0x8a2b> (nil . "hot pink"))
+ (#<x-frame "emacs" 0x4ac> (nil . "puke orange")
+ (nil . "moccasin"))
+ (#<x-frame "VM" 0x4ac> (nil . "magenta"))
+ (global ((tty) . "cyan") (nil . "white"))
+ )
+
+ Then, say we want to determine what the background color of the
+default face is for the window currently displaying the buffer
+`*scratch*'. We call
+
+ (get-buffer-window "*scratch*")
+ => #<window on "*scratch*" 0x4ad>
+ (window-frame (get-buffer-window "*scratch*"))
+ => #<x-frame "emacs" 0x4ac>
+ (specifier-instance sp (get-buffer-window "*scratch*"))
+ => #<color-instance moccasin 47=(FFFF,E4E4,B5B5) 0x6309>
+
+ Note that we passed a window to `specifier-instance', not a buffer.
+We cannot pass a buffer because a buffer by itself does not provide
+enough information. The buffer might not be displayed anywhere at all,
+or could be displayed in many different frames on different devices.
+
+ The result is arrived at like this:
+
+ 1. First, we look for a specification matching the buffer displayed
+ in the window, i.e. `*scratch*'. There are none, so we proceed.
+
+ 2. Then, we look for a specification matching the window itself.
+ Again, there are none.
+
+ 3. Then, we look for a specification matching the window's frame. The
+ specification `(#<x-frame "emacs" 0x4ac> . "puke orange")' is
+ found. We call the instantiation method for colors, passing it the
+ locale we were searching over (i.e. the window, in this case) and
+ the instantiator (`"puke orange"'). However, the particular device
+ which this window is on (let's say it's an X connection) doesn't
+ recognize the color `"puke orange"', so the specification is
+ rejected.
+
+ 4. So we continue looking for a specification matching the window's
+ frame. We find `(#<x-frame "emacs" 0x4ac> . "moccasin")'. Again,
+ we call the instantiation method for colors. This time, the X
+ server our window is on recognizes the color `moccasin', and so the
+ instantiation method succeeds and returns a color instance.
+
+\1f
+File: lispref.info, Node: Creating Specifiers, Next: Specifier Validation Functions, Prev: Specifier Example, Up: Specifiers
+
+Creating New Specifier Objects
+==============================
+
+ - Function: make-specifier type
+ This function creates a new specifier.
+
+ A specifier is an object that can be used to keep track of a
+ property whose value can be per-buffer, per-window, per-frame, or
+ per-device, and can further be restricted to a particular
+ device-type or device-class. Specifiers are used, for example,
+ for the various built-in properties of a face; this allows a face
+ to have different values in different frames, buffers, etc. For
+ more information, see `specifier-instance', `specifier-specs', and
+ `add-spec-to-specifier'; or, for a detailed description of
+ specifiers, including how they are instantiated over a particular
+ domain (i.e. how their value in that domain is determined), see
+ the chapter on specifiers in the XEmacs Lisp Reference Manual.
+
+ TYPE specifies the particular type of specifier, and should be one
+ of the symbols `generic', `integer', `natnum', `boolean', `color',
+ `font', `image', `face-boolean', or `toolbar'.
+
+ For more information on particular types of specifiers, see the
+ functions `generic-specifier-p', `integer-specifier-p',
+ `natnum-specifier-p', `boolean-specifier-p', `color-specifier-p',
+ `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
+ This function creates and initialize a new specifier.
+
+ This is a front-end onto `make-specifier' that allows you to create
+ a specifier and add specs to it at the same time. TYPE specifies
+ the specifier type. SPEC-LIST supplies the specification(s) to be
+ added to the specifier. Normally, almost any reasonable
+ abbreviation of the full spec-list form is accepted, and is
+ converted to the full form; however, if optional argument
+ DONT-CANONICALIZE is non-`nil', this conversion is not performed,
+ and the SPEC-LIST must already be in full form. See
+ `canonicalize-spec-list'.
+
+\1f
+File: lispref.info, Node: Specifier Validation Functions, Next: Other Specification Functions, Prev: Creating Specifiers, Up: Specifiers
+
+Functions for Checking the Validity of Specifier Components
+===========================================================
+
+ - 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
+ 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
+ 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
+ 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
+ This function returns non-`nil' if TAG is a valid specifier tag.
+
+ - 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
+ This function returns non-`nil' if INST-LIST is valid for
+ specifier type 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
+ This function signals an error if INSTANTIATOR is invalid for
+ SPECIFIER-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
+ This function signals an error if SPEC-LIST is invalid for
+ specifier type TYPE.
+
+\1f
+File: lispref.info, Node: Other Specification Functions, Prev: Specifier Validation Functions, Up: Specifiers
+
+Other Functions for Working with Specifications in a Specifier
+==============================================================
+
+ - 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'.
+
+ If DEST is `nil' or omitted, a new specifier will be created and
+ the specifications copied into it. Otherwise, the specifications
+ will be copied into the existing specifier in DEST.
+
+ If LOCALE is `nil' or the symbol `all', all specifications will be
+ copied. If LOCALE is a particular locale, the specification for
+ that particular locale will be copied. If LOCALE is a locale
+ type, the specifications for all locales of that type will be
+ copied. LOCALE can also be a list of locales, locale types,
+ and/or `all'; this is equivalent to calling `copy-specifier' for
+ each of the elements of the list. See `specifier-spec-list' for
+ more information about LOCALE.
+
+ Only instantiators where TAG-SET (a list of zero or more tags) is
+ a subset of (or possibly equal to) the instantiator's tag set are
+ copied. (The default value of `nil' is a subset of all tag sets,
+ so in this case no instantiators will be screened out.) If EXACT-P
+ is non-`nil', however, TAG-SET must be equal to an instantiator's
+ tag set for the instantiator to be copied.
+
+ Optional argument HOW-TO-ADD specifies what to do with existing
+ specifications in DEST. If nil, then whichever locales or locale
+ 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
+ This function removes specification(s) for SPECIFIER.
+
+ If LOCALE is a particular locale (a buffer, window, frame, device,
+ or the symbol `global'), the specification for that locale will be
+ removed.
+
+ If instead, LOCALE is a locale type (i.e. a symbol `buffer',
+ `window', `frame', or `device'), the specifications for all
+ locales of that type will be removed.
+
+ If LOCALE is `nil' or the symbol `all', all specifications will be
+ removed.
+
+ LOCALE can also be a list of locales, locale types, and/or `all';
+ this is equivalent to calling `remove-specifier' for each of the
+ elements in the list.
+
+ Only instantiators where TAG-SET (a list of zero or more tags) is
+ a subset of (or possibly equal to) the instantiator's tag set are
+ removed. (The default value of `nil' is a subset of all tag sets,
+ so in this case no instantiators will be screened out.) If EXACT-P
+ 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
+ This function applies FUNC to the specification(s) for LOCALE in
+ SPECIFIER.
+
+ If LOCALE is a locale, FUNC will be called for that locale. If
+ LOCALE is a locale type, FUNC will be mapped over all locales of
+ that type. If LOCALE is `nil' or the symbol `all', FUNC will be
+ mapped over all locales in SPECIFIER.
+
+ FUNC is called with four arguments: the SPECIFIER, the locale
+ being mapped over, the inst-list for that locale, and the optional
+ MAPARG. If any invocation of FUNC returns non-`nil', the mapping
+ 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
+ Given a specifier LOCALE, this function returns its type.
+
+\1f
+File: lispref.info, Node: Faces and Window-System Objects, Next: Glyphs, Prev: Specifiers, Up: Top
+
+Faces and Window-System Objects
+*******************************
+
+* Menu:
+
+* Faces:: Controlling the way text looks.
+* Fonts:: Controlling the typeface of text.
+* Colors:: Controlling the color of text and pixmaps.
+
+\1f
+File: lispref.info, Node: Faces, Next: Fonts, Up: Faces and Window-System Objects
+
+Faces
+=====
+
+ A "face" is a named collection of graphical properties: font,
+foreground color, background color, background pixmap, optional
+underlining, and (on TTY devices) whether the text is to be highlighted,
+dimmed, blinking, or displayed in reverse video. Faces control the
+display of text on the screen. Every face has a name, which is a symbol
+such as `default' or `modeline'.
+
+ Each built-in property of a face is controlled using a specifier,
+which allows it to have separate values in particular buffers, frames,
+windows, and devices and to further vary according to device type (X or
+TTY) and device class (color, mono, or grayscale). *Note Specifiers::,
+for more information.
+
+ The face named `default' is used for ordinary text. The face named
+`modeline' is used for displaying the modeline. The face named
+`highlight' is used for highlighted extents (*note Extents::). The
+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.
+
+* Menu:
+
+* Merging Faces:: How XEmacs decides which face to use
+ for a character.
+* Basic Face Functions:: How to define and examine faces.
+* Face Properties:: How to access and modify a face's properties.
+* Face Convenience Functions:: Convenience functions for accessing
+ particular properties of a face.
+* Other Face Display Functions:: Other functions pertaining to how a
+ a face appears.
+
+\1f
+File: lispref.info, Node: Merging Faces, Next: Basic Face Functions, Up: Faces
+
+Merging Faces for Display
+-------------------------
+
+ Here are all the ways to specify which face to use for display of
+text:
+
+ * With defaults. Each frame has a "default face", which is used for
+ all text that doesn't somehow specify another face. The face named
+ `default' applies to the text area, while the faces `left-margin'
+ and `right-margin' apply to the left and right margin areas.
+
+ * With text properties. A character may have a `face' property; if
+ so, it's displayed with that face. (Text properties are actually
+ implemented in terms of extents.) *Note Text Properties::.
+
+ * With extents. An extent may have a `face' property, which applies
+ to all the text covered by the extent; in addition, if the
+ `highlight' property is set, the `highlight' property applies when
+ the mouse moves over the extent or if the extent is explicitly
+ highlighted. *Note Extents::.
+
+ * With annotations. Annotations that are inserted into a buffer can
+ specify their own face. (Annotations are actually implemented in
+ terms of extents.) *Note Annotations::.
+
+ If these various sources together specify more than one face for a
+particular character, XEmacs merges the properties of the various faces
+specified. Extents, text properties, and annotations all use the same
+underlying representation (as extents). When multiple extents cover one
+character, an extent with higher priority overrides those with lower
+priority. *Note Extents::. If no extent covers a particular character,
+the `default' face is used.
+
+ If a background pixmap is specified, it determines what will be
+displayed in the background of text characters. If the background
+pixmap is actually a pixmap, with its colors specified, those colors are
+used; if it is a bitmap, the face's foreground and background colors are
+used to color it.
+
+\1f
+File: lispref.info, Node: Basic Face Functions, Next: Face Properties, Prev: Merging Faces, Up: Faces
+
+Basic Functions for Working with Faces
+--------------------------------------
+
+ The properties a face can specify include the font, the foreground
+color, the background color, the background pixmap, the underlining,
+the display table, and (for TTY devices) whether the text is to be
+highlighted, dimmed, blinking, or displayed in reverse video. The face
+can also leave these unspecified, causing them to assume the value of
+the corresponding property of the `default' face.
+
+ Here are the basic primitives for working with faces.
+
+ - 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
+ an explanatory string used for descriptive purposes. If optional
+ argument TEMPORARY is non-`nil', the face will automatically
+ disappear when there are no more references to it anywhere in text
+ or Lisp code (otherwise, the face will continue to exist
+ indefinitely even if it is not used).
+
+ - 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
+ This function returns whether the given object is a face.
+
+ - 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::).
+
+\1f
File: lispref.info, Node: Face Properties, Next: Face Convenience Functions, Prev: Basic Face Functions, Up: Faces
Face Properties
- Function: color-specifier-p object
This function returns non-`nil' if OBJECT is a color specifier.
-\1f
-File: lispref.info, Node: Color Instances, Next: Color Instance Properties, Prev: Color Specifiers, Up: Colors
-
-Color Instances
----------------
-
- A "color-instance object" is an object describing the way a color
-specifier is instanced in a particular domain. Functions such as
-`face-background-instance' return a color-instance object. For example,
-
- (face-background-instance 'default (next-window))
- => #<color-instance moccasin 47=(FFFF,E4E4,B5B5) 0x678d>
-
- The color-instance object returned describes the way the background
-color of the `default' face is displayed in the next window after the
-selected one.
-
- - Function: color-instance-p object
- This function returns non-`nil' if OBJECT is a color-instance.
-
-\1f
-File: lispref.info, Node: Color Instance Properties, Next: Color Convenience Functions, Prev: Color Instances, Up: Colors
-
-Color Instance Properties
--------------------------
-
- - Function: color-instance-name color-instance
- This function returns the name used to allocate 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-instance-rgb-components
- (face-background-instance 'default (next-window)))
- => (65535 58596 46517)
-
-\1f
-File: lispref.info, Node: Color Convenience Functions, Prev: Color Instance Properties, Up: Colors
-
-Color Convenience Functions
----------------------------
-
- - 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
- 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
- selected window if omitted. This is equivalent to using
- `specifier-instance' and applying `color-instance-rgb-components'
- to the result.
-
- (color-rgb-components (face-background 'default (next-window)))
- => (65535 58596 46517)
-
-\1f
-File: lispref.info, Node: Glyphs, Next: Annotations, Prev: Faces and Window-System Objects, Up: Top
-
-Glyphs
-******
-
- A "glyph" is an object that is used for pixmaps and images of all
-sorts, as well as for things that "act" like pixmaps, such as
-non-textual strings ("annotations") displayed in a buffer or in the
-margins. It is used in begin-glyphs and end-glyphs attached to extents,
-marginal and textual annotations, overlay arrows (`overlay-arrow-*'
-variables), toolbar buttons, mouse pointers, frame icons, truncation and
-continuation markers, and the like. (Basically, any place there is an
-image or something that acts like an image, there will be a glyph object
-representing it.)
-
- The actual image that is displayed (as opposed to its position or
-clipping) is defined by an "image specifier" object contained within
-the glyph. The separation between an image specifier object and a
-glyph object is made because the glyph includes other properties than
-just the actual image: e.g. the face it is displayed in (for text
-images), the alignment of the image (when it is in a buffer), etc.
-
- - Function: glyphp object
- This function returns `t' if OBJECT is a glyph.
-
-* Menu:
-
-* Glyph Functions:: Functions for working with glyphs.
-* Images:: Graphical images displayed in a frame.
-* Glyph Types:: Each glyph has a particular type.
-* Mouse Pointer:: Controlling the mouse pointer.
-* Redisplay Glyphs:: Glyphs controlling various redisplay functions.
-* Subwindows:: Inserting an externally-controlled subwindow
- into a buffer.
-
-\1f
-File: lispref.info, Node: Glyph Functions, Next: Images, Up: Glyphs
-
-Glyph Functions
-===============
-
-* Menu:
-
-* Creating Glyphs:: Creating new glyphs.
-* Glyph Properties:: Accessing and modifying a glyph's properties.
-* Glyph Convenience Functions::
- Convenience functions for accessing particular
- properties of a glyph.
-* Glyph Dimensions:: Determining the height, width, etc. of a glyph.
-
-\1f
-File: lispref.info, Node: Creating Glyphs, Next: Glyph Properties, Up: Glyph Functions
-
-Creating Glyphs
----------------
-
- - 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
- typically an image instantiator (a string or a vector; *Note Image
- Specifiers::), but can also be a list of such instantiators (each
- one in turn is tried until an image is successfully produced), a
- cons of a locale (frame, buffer, etc.) and an instantiator, a list
- of such conses, or any other form accepted by
- `canonicalize-spec-list'. *Note Specifiers::, for more
- information about specifiers.
-
- TYPE specifies the type of the glyph, which specifies in which
- contexts the glyph can be used, and controls the allowable image
- types into which the glyph's image can be instantiated. TYPE
- should be one of `buffer' (used for glyphs in an extent, the
- modeline, the toolbar, or elsewhere in a buffer), `pointer' (used
- 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
- This function creates a new, uninitialized glyph of type TYPE.
-
- - 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
- This function is equivalent to calling `make-glyph' with a TYPE of
- `icon'.
-
-\1f
-File: lispref.info, Node: Glyph Properties, Next: Glyph Convenience Functions, Prev: Creating Glyphs, Up: Glyph Functions
-
-Glyph Properties
-----------------
-
- Each glyph has a list of properties, which control all of the
-aspects of the glyph's appearance. The following symbols have
-predefined meanings:
-
-`image'
- The image used to display the glyph.
-
-`baseline'
- Percent above baseline that glyph is to be displayed. Only for
- glyphs displayed inside of a buffer.
-
-`contrib-p'
- Whether the glyph contributes to the height of the line it's on.
- Only for glyphs displayed inside of a buffer.
-
-`face'
- Face of this glyph (_not_ a specifier).
-
- - 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
- specifier and you cannot change this; but you can change the
- specifications within the specifier, and that is what this
- function will do. For user-defined properties, you can use this
- function to either change the actual value of the property or, if
- this value is a specifier, change the specifications within it.
-
- If PROPERTY is a built-in property, the specifications to be added
- to this property can be supplied in many different ways:
-
- * If VALUE is a simple instantiator (e.g. a string naming a
- pixmap filename) or a list of instantiators, then the
- instantiator(s) will be added as a specification of the
- property for the given LOCALE (which defaults to `global' if
- omitted).
-
- * If VALUE is a list of specifications (each of which is a cons
- of a locale and a list of instantiators), then LOCALE must be
- `nil' (it does not make sense to explicitly specify a locale
- in this case), and specifications will be added as given.
-
- * If VALUE is a specifier (as would be returned by
- `glyph-property' if no LOCALE argument is given), then some
- or all of the specifications in the specifier will be added
- to the property. In this case, the function is really
- equivalent to `copy-specifier' and LOCALE has the same
- semantics (if it is a particular locale, the specification
- for the locale will be copied; if a locale type,
- specifications for all locales of that type will be copied;
- if `nil' or `all', then all specifications will be copied).
-
- HOW-TO-ADD should be either `nil' or one of the symbols `prepend',
- `append', `remove-tag-set-prepend', `remove-tag-set-append',
- `remove-locale', `remove-locale-type', or `remove-all'. See
- `copy-specifier' and `add-spec-to-specifier' for a description of
- what each of these means. Most of the time, you do not need to
- worry about this argument; the default behavior usually is fine.
-
- In general, it is OK to pass an instance object (e.g. as returned
- by `glyph-property-instance') as an instantiator in place of an
- actual instantiator. In such a case, the instantiator used to
- create that instance object will be used (for example, if you set
- a font-instance object as the value of the `font' property, then
- the font name used to create that object will be used instead).
- If some cases, however, doing this conversion does not make sense,
- and this will be noted in the documentation for particular types
- of instance objects.
-
- If PROPERTY is not a built-in property, then this function will
- simply set its value if LOCALE is `nil'. However, if LOCALE is
- given, then this function will attempt to add VALUE as the
- instantiator for the given LOCALE, using `add-spec-to-specifier'.
- 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
- This function returns GLYPH's value of the given PROPERTY.
-
- If LOCALE is omitted, the GLYPH's actual value for PROPERTY will
- be returned. For built-in properties, this will be a specifier
- object of a type appropriate to the property (e.g. a font or color
- specifier). For other properties, this could be anything.
-
- If LOCALE is supplied, then instead of returning the actual value,
- the specification(s) for the given locale or locale type will be
- returned. This will only work if the actual value of PROPERTY is
- a specifier (this will always be the case for built-in properties,
- but may or may not apply to user-defined properties). If the
- actual value of PROPERTY is not a specifier, this value will
- simply be returned regardless of LOCALE.
-
- The return value will be a list of instantiators (e.g. vectors
- specifying pixmap data), or a list of specifications, each of
- which is a cons of a locale and a list of instantiators.
- Specifically, if LOCALE is a particular locale (a buffer, window,
- frame, device, or `global'), a list of instantiators for that
- locale will be returned. Otherwise, if LOCALE is a locale type
- (one of the symbols `buffer', `window', `frame', or `device'), the
- specifications for all locales of that type will be returned.
- Finally, if LOCALE is `all', the specifications for all locales of
- all types will be returned.
-
- The specifications in a specifier determine what the value of
- PROPERTY will be in a particular "domain" or set of circumstances,
- which is typically a particular Emacs window along with the buffer
- it contains and the frame and device it lies within. The value is
- derived from the instantiator associated with the most specific
- locale (in the order buffer, window, frame, device, and `global')
- that matches the domain in question. In other words, given a
- domain (i.e. an Emacs window, usually), the specifier for PROPERTY
- will first be searched for a specification whose locale is the
- buffer contained within that window; then for a specification
- whose locale is the window itself; then for a specification whose
- locale is the frame that the window is contained within; etc. The
- first instantiator that is valid for the domain (usually this
- means that the instantiator is recognized by the device [i.e. the
- X server or TTY device] that the domain is on). The function
- `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
- This function returns the instance of GLYPH's PROPERTY in the
- specified DOMAIN.
-
- Under most circumstances, DOMAIN will be a particular window, and
- the returned instance describes how the specified property
- actually is displayed for that window and the particular buffer in
- it. Note that this may not be the same as how the property
- appears when the buffer is displayed in a different window or
- frame, or how the property appears in the same window if you
- switch to another buffer in that window; and in those cases, the
- returned instance would be different.
-
- The returned instance is an image-instance object, and you can
- query it using the appropriate image instance functions. For
- example, you could use `image-instance-depth' to find out the
- depth (number of color planes) of a pixmap displayed in a
- particular window. The results might be different from the
- results you would get for another window (perhaps the user
- specified a different image for the frame that window is on; or
- perhaps the same image was specified but the window is on a
- different X server, and that X server has different color
- capabilities from this one).
-
- DOMAIN defaults to the selected window if omitted.
-
- DOMAIN can be a frame or device, instead of a window. The value
- returned for such a domain is used in special circumstances when a
- more specific domain does not apply; for example, a frame value
- might be used for coloring a toolbar, which is conceptually
- attached to a frame rather than a particular window. The value is
- also useful in determining what the value would be for a
- particular window within the frame or device, if it is not
- overridden by a more specific specification.
-
- If PROPERTY does not name a built-in property, its value will
- simply be returned unless it is a specifier object, in which case
- it will be instanced using `specifier-instance'.
-
- 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
- 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,
- TAG-SET, and EXACT-P arguments.
-
-\1f
-File: lispref.info, Node: Glyph Convenience Functions, Next: Glyph Dimensions, Prev: Glyph Properties, Up: Glyph Functions
-
-Glyph Convenience Functions
----------------------------
-
- The following functions are provided for working with specific
-properties of a glyph. Note that these are exactly like calling the
-general functions described above and passing in the appropriate value
-for PROPERTY.
-
- Remember that if you want to determine the "value" of a specific
-glyph property, you probably want to use the `*-instance' functions.
-For example, to determine whether a glyph contributes to its line
-height, use `glyph-contrib-p-instance', not `glyph-contrib-p'. (The
-latter will return a boolean specifier or a list of specifications, and
-you probably aren't concerned with these.)
-
- - Function: glyph-image glyph &optional locale
- 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
- This function is equivalent to calling `set-glyph-property' with a
- property of `image'.
-
- - 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
- instance.
-
- Normally DOMAIN will be a window or `nil' (meaning the selected
- 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
- 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
- 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
- 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
- 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
- This function is equivalent to calling `set-glyph-property' with a
- property of `baseline'.
-
- - 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
- return value will be an integer or `nil'.
-
- Normally DOMAIN will be a window or `nil' (meaning the selected
- window), and an instance object describing the baseline value
- appears in that particular window and buffer will be returned.
-
- - 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
- This function changes the face of GLYPH to FACE.
-
-\1f
-File: lispref.info, Node: Glyph Dimensions, Prev: Glyph Convenience Functions, Up: Glyph Functions
-
-Glyph Dimensions
-----------------
-
- - 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
- 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
- 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
- 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
- that redisplay will.
-
-\1f
-File: lispref.info, Node: Images, Next: Glyph Types, Prev: Glyph Functions, Up: Glyphs
-
-Images
-======
-
-* Menu:
-
-* Image Specifiers:: Specifying how an image will appear.
-* Image Instantiator Conversion::
- Conversion is applied to image instantiators
- at the time they are added to an
- image specifier or at the time they
- are passed to `make-image-instance'.
-* Image Instances:: What an image specifier gets instanced as.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Color Instances, Next: Color Instance Properties, Prev: Color Specifiers, Up: Colors
+
+Color Instances
+---------------
+
+ A "color-instance object" is an object describing the way a color
+specifier is instanced in a particular domain. Functions such as
+`face-background-instance' return a color-instance object. For example,
+
+ (face-background-instance 'default (next-window))
+ => #<color-instance moccasin 47=(FFFF,E4E4,B5B5) 0x678d>
+
+ The color-instance object returned describes the way the background
+color of the `default' face is displayed in the next window after the
+selected one.
+
+ - Function: color-instance-p object
+ This function returns non-`nil' if OBJECT is a color-instance.
+
+\1f
+File: lispref.info, Node: Color Instance Properties, Next: Color Convenience Functions, Prev: Color Instances, Up: Colors
+
+Color Instance Properties
+-------------------------
+
+ - Function: color-instance-name color-instance
+ This function returns the name used to allocate 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-instance-rgb-components
+ (face-background-instance 'default (next-window)))
+ => (65535 58596 46517)
+
+\1f
+File: lispref.info, Node: Color Convenience Functions, Prev: Color Instance Properties, Up: Colors
+
+Color Convenience Functions
+---------------------------
+
+ - 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
+ 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
+ selected window if omitted. This is equivalent to using
+ `specifier-instance' and applying `color-instance-rgb-components'
+ to the result.
+
+ (color-rgb-components (face-background 'default (next-window)))
+ => (65535 58596 46517)
+
+\1f
+File: lispref.info, Node: Glyphs, Next: Annotations, Prev: Faces and Window-System Objects, Up: Top
+
+Glyphs
+******
+
+ A "glyph" is an object that is used for pixmaps and images of all
+sorts, as well as for things that "act" like pixmaps, such as
+non-textual strings ("annotations") displayed in a buffer or in the
+margins. It is used in begin-glyphs and end-glyphs attached to extents,
+marginal and textual annotations, overlay arrows (`overlay-arrow-*'
+variables), toolbar buttons, mouse pointers, frame icons, truncation and
+continuation markers, and the like. (Basically, any place there is an
+image or something that acts like an image, there will be a glyph object
+representing it.)
+
+ The actual image that is displayed (as opposed to its position or
+clipping) is defined by an "image specifier" object contained within
+the glyph. The separation between an image specifier object and a
+glyph object is made because the glyph includes other properties than
+just the actual image: e.g. the face it is displayed in (for text
+images), the alignment of the image (when it is in a buffer), etc.
+
+ - Function: glyphp object
+ This function returns `t' if OBJECT is a glyph.
+
+* Menu:
+
+* Glyph Functions:: Functions for working with glyphs.
+* Images:: Graphical images displayed in a frame.
+* Glyph Types:: Each glyph has a particular type.
+* Mouse Pointer:: Controlling the mouse pointer.
+* Redisplay Glyphs:: Glyphs controlling various redisplay functions.
+* Subwindows:: Inserting an externally-controlled subwindow
+ into a buffer.
+
+\1f
+File: lispref.info, Node: Glyph Functions, Next: Images, Up: Glyphs
+
+Glyph Functions
+===============
+
+* Menu:
+
+* Creating Glyphs:: Creating new glyphs.
+* Glyph Properties:: Accessing and modifying a glyph's properties.
+* Glyph Convenience Functions::
+ Convenience functions for accessing particular
+ properties of a glyph.
+* Glyph Dimensions:: Determining the height, width, etc. of a glyph.
+
+\1f
+File: lispref.info, Node: Creating Glyphs, Next: Glyph Properties, Up: Glyph Functions
+
+Creating Glyphs
+---------------
+
+ - 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
+ typically an image instantiator (a string or a vector; *Note Image
+ Specifiers::), but can also be a list of such instantiators (each
+ one in turn is tried until an image is successfully produced), a
+ cons of a locale (frame, buffer, etc.) and an instantiator, a list
+ of such conses, or any other form accepted by
+ `canonicalize-spec-list'. *Note Specifiers::, for more
+ information about specifiers.
+
+ TYPE specifies the type of the glyph, which specifies in which
+ contexts the glyph can be used, and controls the allowable image
+ types into which the glyph's image can be instantiated. TYPE
+ should be one of `buffer' (used for glyphs in an extent, the
+ modeline, the toolbar, or elsewhere in a buffer), `pointer' (used
+ 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
+ This function creates a new, uninitialized glyph of type TYPE.
+
+ - 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
+ This function is equivalent to calling `make-glyph' with a TYPE of
+ `icon'.
+
+\1f
+File: lispref.info, Node: Glyph Properties, Next: Glyph Convenience Functions, Prev: Creating Glyphs, Up: Glyph Functions
+
+Glyph Properties
+----------------
+
+ Each glyph has a list of properties, which control all of the
+aspects of the glyph's appearance. The following symbols have
+predefined meanings:
+
+`image'
+ The image used to display the glyph.
+
+`baseline'
+ Percent above baseline that glyph is to be displayed. Only for
+ glyphs displayed inside of a buffer.
+
+`contrib-p'
+ Whether the glyph contributes to the height of the line it's on.
+ Only for glyphs displayed inside of a buffer.
+
+`face'
+ Face of this glyph (_not_ a specifier).
+
+ - 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
+ specifier and you cannot change this; but you can change the
+ specifications within the specifier, and that is what this
+ function will do. For user-defined properties, you can use this
+ function to either change the actual value of the property or, if
+ this value is a specifier, change the specifications within it.
+
+ If PROPERTY is a built-in property, the specifications to be added
+ to this property can be supplied in many different ways:
+
+ * If VALUE is a simple instantiator (e.g. a string naming a
+ pixmap filename) or a list of instantiators, then the
+ instantiator(s) will be added as a specification of the
+ property for the given LOCALE (which defaults to `global' if
+ omitted).
+
+ * If VALUE is a list of specifications (each of which is a cons
+ of a locale and a list of instantiators), then LOCALE must be
+ `nil' (it does not make sense to explicitly specify a locale
+ in this case), and specifications will be added as given.
+
+ * If VALUE is a specifier (as would be returned by
+ `glyph-property' if no LOCALE argument is given), then some
+ or all of the specifications in the specifier will be added
+ to the property. In this case, the function is really
+ equivalent to `copy-specifier' and LOCALE has the same
+ semantics (if it is a particular locale, the specification
+ for the locale will be copied; if a locale type,
+ specifications for all locales of that type will be copied;
+ if `nil' or `all', then all specifications will be copied).
+
+ HOW-TO-ADD should be either `nil' or one of the symbols `prepend',
+ `append', `remove-tag-set-prepend', `remove-tag-set-append',
+ `remove-locale', `remove-locale-type', or `remove-all'. See
+ `copy-specifier' and `add-spec-to-specifier' for a description of
+ what each of these means. Most of the time, you do not need to
+ worry about this argument; the default behavior usually is fine.
+
+ In general, it is OK to pass an instance object (e.g. as returned
+ by `glyph-property-instance') as an instantiator in place of an
+ actual instantiator. In such a case, the instantiator used to
+ create that instance object will be used (for example, if you set
+ a font-instance object as the value of the `font' property, then
+ the font name used to create that object will be used instead).
+ If some cases, however, doing this conversion does not make sense,
+ and this will be noted in the documentation for particular types
+ of instance objects.
+
+ If PROPERTY is not a built-in property, then this function will
+ simply set its value if LOCALE is `nil'. However, if LOCALE is
+ given, then this function will attempt to add VALUE as the
+ instantiator for the given LOCALE, using `add-spec-to-specifier'.
+ 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
+ This function returns GLYPH's value of the given PROPERTY.
+
+ If LOCALE is omitted, the GLYPH's actual value for PROPERTY will
+ be returned. For built-in properties, this will be a specifier
+ object of a type appropriate to the property (e.g. a font or color
+ specifier). For other properties, this could be anything.
+
+ If LOCALE is supplied, then instead of returning the actual value,
+ the specification(s) for the given locale or locale type will be
+ returned. This will only work if the actual value of PROPERTY is
+ a specifier (this will always be the case for built-in properties,
+ but may or may not apply to user-defined properties). If the
+ actual value of PROPERTY is not a specifier, this value will
+ simply be returned regardless of LOCALE.
+
+ The return value will be a list of instantiators (e.g. vectors
+ specifying pixmap data), or a list of specifications, each of
+ which is a cons of a locale and a list of instantiators.
+ Specifically, if LOCALE is a particular locale (a buffer, window,
+ frame, device, or `global'), a list of instantiators for that
+ locale will be returned. Otherwise, if LOCALE is a locale type
+ (one of the symbols `buffer', `window', `frame', or `device'), the
+ specifications for all locales of that type will be returned.
+ Finally, if LOCALE is `all', the specifications for all locales of
+ all types will be returned.
+
+ The specifications in a specifier determine what the value of
+ PROPERTY will be in a particular "domain" or set of circumstances,
+ which is typically a particular Emacs window along with the buffer
+ it contains and the frame and device it lies within. The value is
+ derived from the instantiator associated with the most specific
+ locale (in the order buffer, window, frame, device, and `global')
+ that matches the domain in question. In other words, given a
+ domain (i.e. an Emacs window, usually), the specifier for PROPERTY
+ will first be searched for a specification whose locale is the
+ buffer contained within that window; then for a specification
+ whose locale is the window itself; then for a specification whose
+ locale is the frame that the window is contained within; etc. The
+ first instantiator that is valid for the domain (usually this
+ means that the instantiator is recognized by the device [i.e. the
+ X server or TTY device] that the domain is on). The function
+ `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
+ This function returns the instance of GLYPH's PROPERTY in the
+ specified DOMAIN.
+
+ Under most circumstances, DOMAIN will be a particular window, and
+ the returned instance describes how the specified property
+ actually is displayed for that window and the particular buffer in
+ it. Note that this may not be the same as how the property
+ appears when the buffer is displayed in a different window or
+ frame, or how the property appears in the same window if you
+ switch to another buffer in that window; and in those cases, the
+ returned instance would be different.
+
+ The returned instance is an image-instance object, and you can
+ query it using the appropriate image instance functions. For
+ example, you could use `image-instance-depth' to find out the
+ depth (number of color planes) of a pixmap displayed in a
+ particular window. The results might be different from the
+ results you would get for another window (perhaps the user
+ specified a different image for the frame that window is on; or
+ perhaps the same image was specified but the window is on a
+ different X server, and that X server has different color
+ capabilities from this one).
+
+ DOMAIN defaults to the selected window if omitted.
+
+ DOMAIN can be a frame or device, instead of a window. The value
+ returned for such a domain is used in special circumstances when a
+ more specific domain does not apply; for example, a frame value
+ might be used for coloring a toolbar, which is conceptually
+ attached to a frame rather than a particular window. The value is
+ also useful in determining what the value would be for a
+ particular window within the frame or device, if it is not
+ overridden by a more specific specification.
+
+ If PROPERTY does not name a built-in property, its value will
+ simply be returned unless it is a specifier object, in which case
+ it will be instanced using `specifier-instance'.
+
+ 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
+ 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,
+ TAG-SET, and EXACT-P arguments.
+
+\1f
+File: lispref.info, Node: Glyph Convenience Functions, Next: Glyph Dimensions, Prev: Glyph Properties, Up: Glyph Functions
+
+Glyph Convenience Functions
+---------------------------
+
+ The following functions are provided for working with specific
+properties of a glyph. Note that these are exactly like calling the
+general functions described above and passing in the appropriate value
+for PROPERTY.
+
+ Remember that if you want to determine the "value" of a specific
+glyph property, you probably want to use the `*-instance' functions.
+For example, to determine whether a glyph contributes to its line
+height, use `glyph-contrib-p-instance', not `glyph-contrib-p'. (The
+latter will return a boolean specifier or a list of specifications, and
+you probably aren't concerned with these.)
+
+ - Function: glyph-image glyph &optional locale
+ 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
+ This function is equivalent to calling `set-glyph-property' with a
+ property of `image'.
+
+ - 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
+ instance.
+
+ Normally DOMAIN will be a window or `nil' (meaning the selected
+ 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
+ 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
+ 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
+ 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
+ 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
+ This function is equivalent to calling `set-glyph-property' with a
+ property of `baseline'.
+
+ - 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
+ return value will be an integer or `nil'.
+
+ Normally DOMAIN will be a window or `nil' (meaning the selected
+ window), and an instance object describing the baseline value
+ appears in that particular window and buffer will be returned.
+
+ - 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
+ This function changes the face of GLYPH to FACE.
+
+\1f
+File: lispref.info, Node: Glyph Dimensions, Prev: Glyph Convenience Functions, Up: Glyph Functions
+
+Glyph Dimensions
+----------------
+
+ - 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
+ 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
+ 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
+ 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
+ that redisplay will.
+
+\1f
+File: lispref.info, Node: Images, Next: Glyph Types, Prev: Glyph Functions, Up: Glyphs
+
+Images
+======
+
+* Menu:
+
+* Image Specifiers:: Specifying how an image will appear.
+* Image Instantiator Conversion::
+ Conversion is applied to image instantiators
+ at the time they are added to an
+ image specifier or at the time they
+ are passed to `make-image-instance'.
+* Image Instances:: What an image specifier gets instanced as.
+
+\1f
File: lispref.info, Node: Image Specifiers, Next: Image Instantiator Conversion, Up: Images
Image Specifiers
keyword-value pairs. The "format" field should be a symbol, one of
`nothing'
- (Don't display anything; no keywords are valid for this. Can only
- be instanced as `nothing'.)
+ Don't display anything; no keywords are valid for this. Can only
+ be instanced as `nothing'.
`string'
- (Display this image as a text string. Can only be instanced as
+ Display this image as a text string. Can only be instanced as
`text', although support for instancing as `mono-pixmap' should be
- added.)
+ added.
`formatted-string'
- (Display this image as a text string with replaceable fields,
- similar to a modeline format string; not currently implemented.)
+ Display this image as a text string with replaceable fields,
+ similar to a modeline format string; not currently implemented.
`xbm'
- (An X bitmap; only if X support was compiled into this XEmacs.
- Can be instanced as `mono-pixmap', `color-pixmap', or `pointer'.)
+ An X bitmap; only if X support was compiled into this XEmacs. Can
+ be instanced as `mono-pixmap', `color-pixmap', or `pointer'.
`xpm'
- (An XPM pixmap; only if XPM support was compiled into this XEmacs.
+ An XPM pixmap; only if XPM support was compiled into this XEmacs.
Can be instanced as `color-pixmap', `mono-pixmap', or `pointer'.
XPM is an add-on library for X that was designed to rectify the
shortcomings of the XBM format. Most implementations of X include
the XPM library as a standard part. If your vendor does not, it
is highly recommended that you download it and install it. You
- can get it from the standard XEmacs FTP site, among other places.)
+ can get it from the standard XEmacs FTP site, among other places.
`xface'
- (An X-Face bitmap, used to encode people's faces in e-mail
- messages; only if X-Face support was compiled into this XEmacs.
- Can be instanced as `mono-pixmap', `color-pixmap', or `pointer'.)
+ An X-Face bitmap, used to encode people's faces in e-mail messages;
+ only if X-Face support was compiled into this XEmacs. Can be
+ instanced as `mono-pixmap', `color-pixmap', or `pointer'.
`gif'
- (A GIF87 or GIF89 image; only if GIF support was compiled into this
+ A GIF87 or GIF89 image; only if GIF support was compiled into this
XEmacs. Can be instanced as `color-pixmap'. Note that XEmacs
includes GIF decoding functions as a standard part of it, so if
you have X support, you will normally have GIF support, unless you
- explicitly disable it at configure time.)
+ explicitly disable it at configure time.
`jpeg'
- (A JPEG-format image; only if JPEG support was compiled into this
+ A JPEG-format image; only if JPEG support was compiled into this
XEmacs. Can be instanced as `color-pixmap'. If you have the JPEG
libraries present on your system when XEmacs is built, XEmacs will
automatically detect this and use them, unless you explicitly
- disable it at configure time.)
+ disable it at configure time.
`png'
- (A PNG/GIF24 image; only if PNG support was compiled into this
- XEmacs. Can be instanced as `color-pixmap'.)
+ A PNG/GIF24 image; only if PNG support was compiled into this
+ XEmacs. Can be instanced as `color-pixmap'.
`tiff'
- (A TIFF-format image; only if TIFF support was compiled into this
- XEmacs. Not currently implemented.)
+ A TIFF-format image; only if TIFF support was compiled into this
+ XEmacs.
`cursor-font'
- (One of the standard cursor-font names, such as `watch' or
+ One of the standard cursor-font names, such as `watch' or
`right_ptr' under X. Under X, this is, more specifically, any of
the standard cursor names from appendix B of the Xlib manual [also
known as the file `<X11/cursorfont.h>'] minus the `XC_' prefix. On
other window systems, the valid names will be specific to the type
- of window system. Can only be instanced as `pointer'.)
+ of window system. Can only be instanced as `pointer'.
`font'
- (A glyph from a font; i.e. the name of a font, and glyph index
- into it of the form `FONT fontname index [[mask-font] mask-index]'.
+ A glyph from a font; i.e. the name of a font, and glyph index into
+ it of the form `FONT fontname index [[mask-font] mask-index]'.
Only if X support was compiled into this XEmacs. Currently can
only be instanced as `pointer', although this should probably be
- fixed.)
+ fixed.
`subwindow'
- (An embedded X window; not currently implemented.)
+ An embedded X window; not currently implemented.
`autodetect'
- (XEmacs tries to guess what format the data is in. If X support
+ XEmacs tries to guess what format the data is in. If X support
exists, the data string will be checked to see if it names a
filename. If so, and this filename contains XBM or XPM data, the
appropriate sort of pixmap or pointer will be created. [This
image-instance types and the string names a valid cursor-font
name, the image will be created as a pointer. Otherwise, the
image will be displayed as text. If no X support exists, the
- image will always be displayed as text.)
+ image will always be displayed as text.
The valid keywords are:
`:data'
- (Inline data. For most formats above, this should be a string.
- For XBM images, this should be a list of three elements: width,
+ Inline data. For most formats above, this should be a string. For
+ XBM images, this should be a list of three elements: width,
height, and a string of bit data. This keyword is not valid for
- instantiator format `nothing'.)
+ instantiator format `nothing'.
`:file'
- (Data is contained in a file. The value is the name of this file.
+ Data is contained in a file. The value is the name of this file.
If both `:data' and `:file' are specified, the image is created
from what is specified in `:data' and the string in `:file'
becomes the value of the `image-instance-file-name' function when
applied to the resulting image-instance. This keyword is not
valid for instantiator formats `nothing', `string',
- `formatted-string', `cursor-font', `font', and `autodetect'.)
+ `formatted-string', `cursor-font', `font', and `autodetect'.
`:foreground'
`:background'
- (For `xbm', `xface', `cursor-font', and `font'. These keywords
+ For `xbm', `xface', `cursor-font', and `font'. These keywords
allow you to explicitly specify foreground and background colors.
The argument should be anything acceptable to
`make-color-instance'. This will cause what would be a
`mono-pixmap' to instead be colorized as a two-color color-pixmap,
and specifies the foreground and/or background colors for a pointer
- instead of black and white.)
+ instead of black and white.
`:mask-data'
- (For `xbm' and `xface'. This specifies a mask to be used with the
+ For `xbm' and `xface'. This specifies a mask to be used with the
bitmap. The format is a list of width, height, and bits, like for
- `:data'.)
+ `:data'.
`:mask-file'
- (For `xbm' and `xface'. This specifies a file containing the mask
+ For `xbm' and `xface'. This specifies a file containing the mask
data. If neither a mask file nor inline mask data is given for an
XBM image, and the XBM image comes from a file, XEmacs will look
for a mask file with the same name as the image file but with
`Mask' or `msk' appended. For example, if you specify the XBM file
`left_ptr' [usually located in `/usr/include/X11/bitmaps'], the
- associated mask file `left_ptrmsk' will automatically be picked
- up.)
+ associated mask file `left_ptrmsk' will automatically be picked up.
`:hotspot-x'
`:hotspot-y'
- (For `xbm' and `xface'. These keywords specify a hotspot if the
+ For `xbm' and `xface'. These keywords specify a hotspot if the
image is instantiated as a `pointer'. Note that if the XBM image
file specifies a hotspot, it will automatically be picked up if no
- explicit hotspot is given.)
+ explicit hotspot is given.
`:color-symbols'
- (Only for `xpm'. This specifies an alist that maps strings that
+ Only for `xpm'. This specifies an alist that maps strings that
specify symbolic color names to the actual color to be used for
that symbolic color (in the form of a string or a color-specifier
object). If this is not specified, the contents of
- `xpm-color-symbols' are used to generate the alist.)
+ `xpm-color-symbols' are used to generate the alist.
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
* Annotation Hooks:: Hooks called at certain times during an
annotation's lifetime.
-\1f
-File: lispref.info, Node: Annotation Basics, Next: Annotation Primitives, Up: Annotations
-
-Annotation Basics
-=================
-
- Marginal annotations are notes associated with a particular location
-in a buffer. They may be displayed in a margin created on the
-left-hand or right-hand side of the frame, in any whitespace at the
-beginning or end of a line, or inside of the text itself. Every
-annotation may have an associated action to be performed when the
-annotation is selected. The term "annotation" is used to refer to an
-individual note. The term "margin" is generically used to refer to the
-whitespace before the first character on a line or after the last
-character on a line.
-
- Each annotation has the following characteristics:
-GLYPH
- This is a glyph object and is used as the displayed representation
- of the annotation.
-
-DOWN-GLYPH
- If given, this glyph is used as the displayed representation of
- the annotation when the mouse is pressed down over the annotation.
-
-FACE
- The face with which to display the glyph.
-
-SIDE
- Which side of the text (left or right) the annotation is displayed
- at.
-
-ACTION
- If non-`nil', this field must contain a function capable of being
- the first argument to `funcall'. This function is normally
- evaluated with a single argument, the value of the DATA field,
- each time the annotation is selected. However, if the WITH-EVENT
- parameter to `make-annotation' is non-`nil', the function is
- called with two arguments. The first argument is the same as
- before, and the second argument is the event (a button-up event,
- usually) that activated the annotation.
-
-DATA
- Not used internally. This field can contain any E-Lisp object.
- It is passed as the first argument to ACTION described above.
-
-MENU
- A menu displayed when the right mouse button is pressed over the
- annotation.
-
- The margin is divided into "outside" and "inside". The outside
-margin is space on the left or right side of the frame which normal text
-cannot be displayed in. The inside margin is that space between the
-leftmost or rightmost point at which text can be displayed and where the
-first or last character actually is.
-
- There are four different "layout types" which affect the exact
-location an annotation appears.
-
-`outside-margin'
- The annotation is placed in the outside margin area. as close as
- possible to the edge of the frame. If the outside margin is not
- wide enough for an annotation to fit, it is not displayed.
-
-`inside-margin'
- The annotation is placed in the inside margin area, as close as
- possible to the edge of the frame. If the inside margin is not
- wide enough for the annotation to fit, it will be displayed using
- any available outside margin space if and only if the specifier
- `use-left-overflow' or `use-right-overflow' (depending on which
- side the annotation appears in) is non-`nil'.
-
-`whitespace'
- The annotation is placed in the inside margin area, as close as
- possible to the first or last non-whitespace character on a line.
- If the inside margin is not wide enough for the annotation to fit,
- it will be displayed if and only if the specifier
- `use-left-overflow' or `use-right-overflow' (depending on which
- side the annotation appears in) is non-`nil'.
-
-`text'
- The annotation is placed at the position it is inserted. It will
- create enough space for itself inside of the text area. It does
- not take up a place in the logical buffer, only in the display of
- the buffer.
-
- The current layout policy is that all `whitespace' annotations are
-displayed first. Next, all `inside-margin' annotations are displayed
-using any remaining space. Finally as many `outside-margin'
-annotations are displayed as possible. The `text' annotations will
-always display as they create their own space to display in.
-
-\1f
-File: lispref.info, Node: Annotation Primitives, Next: Annotation Properties, Prev: Annotation Basics, Up: Annotations
-
-Annotation Primitives
-=====================
-
- - 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
- LAYOUT. If POS is `nil', point is used. If LAYOUT is `nil',
- `whitespace' is used. If BUFFER is `nil', the current buffer is
- used.
-
- If WITH-EVENT is non-`nil', then when an annotation is activated,
- the triggering event is passed as the second arg to the annotation
- function. If D-GLYPH is non-`nil' then it is used as the glyph
- that will be displayed when button1 is down. If RIGHTP is
- non-`nil' then the glyph will be displayed on the right side of
- the buffer instead of the left.
-
- The newly created annotation is returned.
-
- - Function: delete-annotation annotation
- This function removes ANNOTATION from its buffer. This does not
- modify the buffer text.
-
- - Function: annotationp annotation
- This function returns `t' if ANNOTATION is an annotation, `nil'
- otherwise.
-
-\1f
-File: lispref.info, Node: Annotation Properties, Next: Margin Primitives, Prev: Annotation Primitives, Up: Annotations
-
-Annotation Properties
-=====================
-
- - Function: annotation-glyph annotation
- This function returns the glyph object used to display ANNOTATION.
-
- - 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
- 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
- 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
- This function returns the face associated with ANNOTATION.
-
- - Function: set-annotation-face annotation face
- This function sets the face associated with ANNOTATION to FACE.
-
- - Function: annotation-layout annotation
- This function returns the layout policy of ANNOTATION.
-
- - Function: set-annotation-layout annotation layout
- This function sets the layout policy of ANNOTATION to LAYOUT.
-
- - 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
- This function returns the data associated with ANNOTATION.
-
- - Function: set-annotation-data annotation data
- This function sets the data field of ANNOTATION to DATA. DATA is
- returned.
-
- - Function: annotation-action annotation
- This function returns the action associated with ANNOTATION.
-
- - Function: set-annotation-action annotation action
- This function sets the action field of ANNOTATION to ACTION.
- ACTION is returned..
-
- - Function: annotation-menu annotation
- This function returns the menu associated with ANNOTATION.
-
- - 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
- This function returns `t' if there is enough available space to
- display ANNOTATION, `nil' otherwise.
-
- - Function: annotation-width annotation
- This function returns the width of ANNOTATION in pixels.
-
- - Function: hide-annotation annotation
- This function removes ANNOTATION's glyph, making it invisible.
-
- - Function: reveal-annotation annotation
- This function restores ANNOTATION's glyph, making it visible.
-
-\1f
-File: lispref.info, Node: Locating Annotations, Next: Annotation Hooks, Prev: Margin Primitives, Up: Annotations
-
-Locating Annotations
-====================
-
- - 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
- 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
- This function returns a list of all annotations in BUFFER. If
- BUFFER is `nil', the current buffer is used.
-
- - Function: all-annotations
- This function returns a list of all annotations in all buffers in
- existence.
-
-\1f
-File: lispref.info, Node: Margin Primitives, Next: Locating Annotations, Prev: Annotation Properties, Up: Annotations
-
-Margin Primitives
-=================
-
- The margin widths are controllable on a buffer-local, window-local,
-frame-local, device-local, or device-type-local basis through the use
-of specifiers. *Note Specifiers::.
-
- - Specifier: left-margin-width
- This is a specifier variable controlling the width of the left
- outside margin, in characters. Use `set-specifier' to change its
- value.
-
- - Specifier: right-margin-width
- This is a specifier variable controlling the width of the right
- outside margin, in characters. Use `set-specifier' to change its
- value.
-
- - Specifier: use-left-overflow
- If non-`nil', use the left outside margin as extra whitespace when
- displaying `whitespace' and `inside-margin' annotations. Defaults
- to `nil'. This is a specifier variable; use `set-specifier' to
- change its value.
-
- - Specifier: use-right-overflow
- If non-`nil', use the right outside margin as extra whitespace when
- displaying `whitespace' and `inside-margin' annotations. Defaults
- to `nil'. This is a specifier variable; use `set-specifier' to
- change its value.
-
- - 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
- This function returns the width in pixels of the right outside
- margin of WINDOW. If WINDOW is `nil', the selected window is
- assumed.
-
- The margin colors are controlled by the faces `left-margin' and
-`right-margin'. These can be set using the X resources
-`Emacs.left-margin.background' and `Emacs.left-margin.foreground';
-likewise for the right margin.
-
-\1f
-File: lispref.info, Node: Annotation Hooks, Prev: Locating Annotations, Up: Annotations
-
-Annotation Hooks
-================
-
- The following three hooks are provided for use with the marginal
-annotations:
-
-`before-delete-annotation-hook'
- This hook is called immediately before an annotation is destroyed.
- It is passed a single argument, the annotation being destroyed.
-
-`after-delete-annotation-hook'
- This normal hook is called immediately after an annotation is
- destroyed.
-
-`make-annotation-hook'
- This hook is called immediately after an annotation is created.
- It is passed a single argument, the newly created annotation.
-
-\1f
-File: lispref.info, Node: Display, Next: Hash Tables, Prev: Annotations, Up: Top
-
-Emacs Display
-*************
-
- This chapter describes a number of other features related to the
-display that XEmacs presents to the user.
-
-* Menu:
-
-* Refresh Screen:: Clearing the screen and redrawing everything on it.
-* Truncation:: Folding or wrapping long text lines.
-* The Echo Area:: Where messages are displayed.
-* Warnings:: Display of Warnings.
-* Invisible Text:: Hiding part of the buffer text.
-* Selective Display:: Hiding part of the buffer text (the old way).
-* Overlay Arrow:: Display of an arrow to indicate position.
-* Temporary Displays:: Displays that go away automatically.
-* Blinking:: How XEmacs shows the matching open parenthesis.
-* Usual Display:: The usual conventions for displaying nonprinting chars.
-* Display Tables:: How to specify other conventions.
-* Beeping:: Audible signal to the user.
-
-\1f
-File: lispref.info, Node: Refresh Screen, Next: Truncation, Up: Display
-
-Refreshing the Screen
-=====================
-
- The function `redraw-frame' redisplays the entire contents of a
-given frame. *Note Frames::.
-
- - Function: redraw-frame frame
- This function clears and redisplays frame FRAME.
-
- Even more powerful is `redraw-display':
-
- - 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.
-
- Processing user input takes absolute priority over redisplay. If you
-call these functions when input is available, they do nothing
-immediately, but a full redisplay does happen eventually--after all the
-input has been processed.
-
- Normally, suspending and resuming XEmacs also refreshes the screen.
-Some terminal emulators record separate contents for display-oriented
-programs such as XEmacs and for ordinary sequential display. If you are
-using such a terminal, you might want to inhibit the redisplay on
-resumption. *Note Suspending XEmacs::.
-
- - Variable: no-redraw-on-reenter
- This variable controls whether XEmacs redraws the entire screen
- after it has been suspended and resumed. Non-`nil' means yes,
- `nil' means no.
-
- The above functions do not actually cause the display to be updated;
-rather, they clear out the internal display records that XEmacs
-maintains, so that the next time the display is updated it will be
-redrawn from scratch. Normally this occurs the next time that
-`next-event' or `sit-for' is called; however, a display update will not
-occur if there is input pending. *Note Command Loop::.
-
- - Function: force-cursor-redisplay
- This function causes an immediate update of the cursor on the
- selected frame. (This function does not exist in FSF Emacs.)
-
-\1f
-File: lispref.info, Node: Truncation, Next: The Echo Area, Prev: Refresh Screen, Up: Display
-
-Truncation
-==========
-
- When a line of text extends beyond the right edge of a window, the
-line can either be truncated or continued on the next line. When a line
-is truncated, this is normally shown with a `\' in the rightmost column
-of the window on X displays, and with a `$' on TTY devices. When a
-line is continued or "wrapped" onto the next line, this is shown with a
-curved arrow in the rightmost column of the window (or with a `\' on
-TTY devices). The additional screen lines used to display a long text
-line are called "continuation" lines.
-
- Normally, whenever line truncation is in effect for a particular
-window, a horizontal scrollbar is displayed in that window if the
-device supports scrollbars. *Note Scrollbars::.
-
- Note that continuation is different from filling; continuation
-happens on the screen only, not in the buffer contents, and it breaks a
-line precisely at the right margin, not at a word boundary. *Note
-Filling::.
-
- - User Option: truncate-lines
- This buffer-local variable controls how XEmacs displays lines that
- extend beyond the right edge of the window. If it is non-`nil',
- then XEmacs does not display continuation lines; rather each line
- of text occupies exactly one screen line, and a backslash appears
- at the edge of any line that extends to or beyond the edge of the
- window. The default is `nil'.
-
- If the variable `truncate-partial-width-windows' is non-`nil',
- then truncation is always used for side-by-side windows (within one
- frame) regardless of the value of `truncate-lines'.
-
- - User Option: default-truncate-lines
- This variable is the default value for `truncate-lines', for
- buffers that do not have local values for it.
-
- - 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;
- 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
-flexibility in how glyphs can be controlled. (This differs from FSF
-Emacs, which uses display tables to control these images.)
-
- For details, *Note Redisplay Glyphs::.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Annotation Basics, Next: Annotation Primitives, Up: Annotations
+
+Annotation Basics
+=================
+
+ Marginal annotations are notes associated with a particular location
+in a buffer. They may be displayed in a margin created on the
+left-hand or right-hand side of the frame, in any whitespace at the
+beginning or end of a line, or inside of the text itself. Every
+annotation may have an associated action to be performed when the
+annotation is selected. The term "annotation" is used to refer to an
+individual note. The term "margin" is generically used to refer to the
+whitespace before the first character on a line or after the last
+character on a line.
+
+ Each annotation has the following characteristics:
+GLYPH
+ This is a glyph object and is used as the displayed representation
+ of the annotation.
+
+DOWN-GLYPH
+ If given, this glyph is used as the displayed representation of
+ the annotation when the mouse is pressed down over the annotation.
+
+FACE
+ The face with which to display the glyph.
+
+SIDE
+ Which side of the text (left or right) the annotation is displayed
+ at.
+
+ACTION
+ If non-`nil', this field must contain a function capable of being
+ the first argument to `funcall'. This function is normally
+ evaluated with a single argument, the value of the DATA field,
+ each time the annotation is selected. However, if the WITH-EVENT
+ parameter to `make-annotation' is non-`nil', the function is
+ called with two arguments. The first argument is the same as
+ before, and the second argument is the event (a button-up event,
+ usually) that activated the annotation.
+
+DATA
+ Not used internally. This field can contain any E-Lisp object.
+ It is passed as the first argument to ACTION described above.
+
+MENU
+ A menu displayed when the right mouse button is pressed over the
+ annotation.
+
+ The margin is divided into "outside" and "inside". The outside
+margin is space on the left or right side of the frame which normal text
+cannot be displayed in. The inside margin is that space between the
+leftmost or rightmost point at which text can be displayed and where the
+first or last character actually is.
+
+ There are four different "layout types" which affect the exact
+location an annotation appears.
+
+`outside-margin'
+ The annotation is placed in the outside margin area. as close as
+ possible to the edge of the frame. If the outside margin is not
+ wide enough for an annotation to fit, it is not displayed.
+
+`inside-margin'
+ The annotation is placed in the inside margin area, as close as
+ possible to the edge of the frame. If the inside margin is not
+ wide enough for the annotation to fit, it will be displayed using
+ any available outside margin space if and only if the specifier
+ `use-left-overflow' or `use-right-overflow' (depending on which
+ side the annotation appears in) is non-`nil'.
+
+`whitespace'
+ The annotation is placed in the inside margin area, as close as
+ possible to the first or last non-whitespace character on a line.
+ If the inside margin is not wide enough for the annotation to fit,
+ it will be displayed if and only if the specifier
+ `use-left-overflow' or `use-right-overflow' (depending on which
+ side the annotation appears in) is non-`nil'.
+
+`text'
+ The annotation is placed at the position it is inserted. It will
+ create enough space for itself inside of the text area. It does
+ not take up a place in the logical buffer, only in the display of
+ the buffer.
+
+ The current layout policy is that all `whitespace' annotations are
+displayed first. Next, all `inside-margin' annotations are displayed
+using any remaining space. Finally as many `outside-margin'
+annotations are displayed as possible. The `text' annotations will
+always display as they create their own space to display in.
+
+\1f
+File: lispref.info, Node: Annotation Primitives, Next: Annotation Properties, Prev: Annotation Basics, Up: Annotations
+
+Annotation Primitives
+=====================
+
+ - 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
+ LAYOUT. If POS is `nil', point is used. If LAYOUT is `nil',
+ `whitespace' is used. If BUFFER is `nil', the current buffer is
+ used.
+
+ If WITH-EVENT is non-`nil', then when an annotation is activated,
+ the triggering event is passed as the second arg to the annotation
+ function. If D-GLYPH is non-`nil' then it is used as the glyph
+ that will be displayed when button1 is down. If RIGHTP is
+ non-`nil' then the glyph will be displayed on the right side of
+ the buffer instead of the left.
+
+ The newly created annotation is returned.
+
+ - Function: delete-annotation annotation
+ This function removes ANNOTATION from its buffer. This does not
+ modify the buffer text.
+
+ - Function: annotationp annotation
+ This function returns `t' if ANNOTATION is an annotation, `nil'
+ otherwise.
+
+\1f
+File: lispref.info, Node: Annotation Properties, Next: Margin Primitives, Prev: Annotation Primitives, Up: Annotations
+
+Annotation Properties
+=====================
+
+ - Function: annotation-glyph annotation
+ This function returns the glyph object used to display ANNOTATION.
+
+ - 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
+ 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
+ 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
+ This function returns the face associated with ANNOTATION.
+
+ - Function: set-annotation-face annotation face
+ This function sets the face associated with ANNOTATION to FACE.
+
+ - Function: annotation-layout annotation
+ This function returns the layout policy of ANNOTATION.
+
+ - Function: set-annotation-layout annotation layout
+ This function sets the layout policy of ANNOTATION to LAYOUT.
+
+ - 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
+ This function returns the data associated with ANNOTATION.
+
+ - Function: set-annotation-data annotation data
+ This function sets the data field of ANNOTATION to DATA. DATA is
+ returned.
+
+ - Function: annotation-action annotation
+ This function returns the action associated with ANNOTATION.
+
+ - Function: set-annotation-action annotation action
+ This function sets the action field of ANNOTATION to ACTION.
+ ACTION is returned..
+
+ - Function: annotation-menu annotation
+ This function returns the menu associated with ANNOTATION.
+
+ - 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
+ This function returns `t' if there is enough available space to
+ display ANNOTATION, `nil' otherwise.
+
+ - Function: annotation-width annotation
+ This function returns the width of ANNOTATION in pixels.
+
+ - Function: hide-annotation annotation
+ This function removes ANNOTATION's glyph, making it invisible.
+
+ - Function: reveal-annotation annotation
+ This function restores ANNOTATION's glyph, making it visible.
+
+\1f
+File: lispref.info, Node: Locating Annotations, Next: Annotation Hooks, Prev: Margin Primitives, Up: Annotations
+
+Locating Annotations
+====================
+
+ - 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
+ 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
+ This function returns a list of all annotations in BUFFER. If
+ BUFFER is `nil', the current buffer is used.
+
+ - Function: all-annotations
+ This function returns a list of all annotations in all buffers in
+ existence.
+
+\1f
+File: lispref.info, Node: Margin Primitives, Next: Locating Annotations, Prev: Annotation Properties, Up: Annotations
+
+Margin Primitives
+=================
+
+ The margin widths are controllable on a buffer-local, window-local,
+frame-local, device-local, or device-type-local basis through the use
+of specifiers. *Note Specifiers::.
+
+ - Specifier: left-margin-width
+ This is a specifier variable controlling the width of the left
+ outside margin, in characters. Use `set-specifier' to change its
+ value.
+
+ - Specifier: right-margin-width
+ This is a specifier variable controlling the width of the right
+ outside margin, in characters. Use `set-specifier' to change its
+ value.
+
+ - Specifier: use-left-overflow
+ If non-`nil', use the left outside margin as extra whitespace when
+ displaying `whitespace' and `inside-margin' annotations. Defaults
+ to `nil'. This is a specifier variable; use `set-specifier' to
+ change its value.
+
+ - Specifier: use-right-overflow
+ If non-`nil', use the right outside margin as extra whitespace when
+ displaying `whitespace' and `inside-margin' annotations. Defaults
+ to `nil'. This is a specifier variable; use `set-specifier' to
+ change its value.
+
+ - 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
+ This function returns the width in pixels of the right outside
+ margin of WINDOW. If WINDOW is `nil', the selected window is
+ assumed.
+
+ The margin colors are controlled by the faces `left-margin' and
+`right-margin'. These can be set using the X resources
+`Emacs.left-margin.background' and `Emacs.left-margin.foreground';
+likewise for the right margin.
+
+\1f
+File: lispref.info, Node: Annotation Hooks, Prev: Locating Annotations, Up: Annotations
+
+Annotation Hooks
+================
+
+ The following three hooks are provided for use with the marginal
+annotations:
+
+`before-delete-annotation-hook'
+ This hook is called immediately before an annotation is destroyed.
+ It is passed a single argument, the annotation being destroyed.
+
+`after-delete-annotation-hook'
+ This normal hook is called immediately after an annotation is
+ destroyed.
+
+`make-annotation-hook'
+ This hook is called immediately after an annotation is created.
+ It is passed a single argument, the newly created annotation.
+
+\1f
+File: lispref.info, Node: Display, Next: Hash Tables, Prev: Annotations, Up: Top
+
+Emacs Display
+*************
+
+ This chapter describes a number of other features related to the
+display that XEmacs presents to the user.
+
+* Menu:
+
+* Refresh Screen:: Clearing the screen and redrawing everything on it.
+* Truncation:: Folding or wrapping long text lines.
+* The Echo Area:: Where messages are displayed.
+* Warnings:: Display of Warnings.
+* Invisible Text:: Hiding part of the buffer text.
+* Selective Display:: Hiding part of the buffer text (the old way).
+* Overlay Arrow:: Display of an arrow to indicate position.
+* Temporary Displays:: Displays that go away automatically.
+* Blinking:: How XEmacs shows the matching open parenthesis.
+* Usual Display:: The usual conventions for displaying nonprinting chars.
+* Display Tables:: How to specify other conventions.
+* Beeping:: Audible signal to the user.
+
+\1f
+File: lispref.info, Node: Refresh Screen, Next: Truncation, Up: Display
+
+Refreshing the Screen
+=====================
+
+ The function `redraw-frame' redisplays the entire contents of a
+given frame. *Note Frames::.
+
+ - Function: redraw-frame frame
+ This function clears and redisplays frame FRAME.
+
+ Even more powerful is `redraw-display':
+
+ - 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.
+
+ Processing user input takes absolute priority over redisplay. If you
+call these functions when input is available, they do nothing
+immediately, but a full redisplay does happen eventually--after all the
+input has been processed.
+
+ Normally, suspending and resuming XEmacs also refreshes the screen.
+Some terminal emulators record separate contents for display-oriented
+programs such as XEmacs and for ordinary sequential display. If you are
+using such a terminal, you might want to inhibit the redisplay on
+resumption. *Note Suspending XEmacs::.
+
+ - Variable: no-redraw-on-reenter
+ This variable controls whether XEmacs redraws the entire screen
+ after it has been suspended and resumed. Non-`nil' means yes,
+ `nil' means no.
+
+ The above functions do not actually cause the display to be updated;
+rather, they clear out the internal display records that XEmacs
+maintains, so that the next time the display is updated it will be
+redrawn from scratch. Normally this occurs the next time that
+`next-event' or `sit-for' is called; however, a display update will not
+occur if there is input pending. *Note Command Loop::.
+
+ - Function: force-cursor-redisplay
+ This function causes an immediate update of the cursor on the
+ selected frame. (This function does not exist in FSF Emacs.)
+
+\1f
+File: lispref.info, Node: Truncation, Next: The Echo Area, Prev: Refresh Screen, Up: Display
+
+Truncation
+==========
+
+ When a line of text extends beyond the right edge of a window, the
+line can either be truncated or continued on the next line. When a line
+is truncated, this is normally shown with a `\' in the rightmost column
+of the window on X displays, and with a `$' on TTY devices. When a
+line is continued or "wrapped" onto the next line, this is shown with a
+curved arrow in the rightmost column of the window (or with a `\' on
+TTY devices). The additional screen lines used to display a long text
+line are called "continuation" lines.
+
+ Normally, whenever line truncation is in effect for a particular
+window, a horizontal scrollbar is displayed in that window if the
+device supports scrollbars. *Note Scrollbars::.
+
+ Note that continuation is different from filling; continuation
+happens on the screen only, not in the buffer contents, and it breaks a
+line precisely at the right margin, not at a word boundary. *Note
+Filling::.
+
+ - User Option: truncate-lines
+ This buffer-local variable controls how XEmacs displays lines that
+ extend beyond the right edge of the window. If it is non-`nil',
+ then XEmacs does not display continuation lines; rather each line
+ of text occupies exactly one screen line, and a backslash appears
+ at the edge of any line that extends to or beyond the edge of the
+ window. The default is `nil'.
+
+ If the variable `truncate-partial-width-windows' is non-`nil',
+ then truncation is always used for side-by-side windows (within one
+ frame) regardless of the value of `truncate-lines'.
+
+ - User Option: default-truncate-lines
+ This variable is the default value for `truncate-lines', for
+ buffers that do not have local values for it.
+
+ - 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;
+ 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
+flexibility in how glyphs can be controlled. (This differs from FSF
+Emacs, which uses display tables to control these images.)
+
+ For details, *Note Redisplay Glyphs::.
+
+\1f
File: lispref.info, Node: The Echo Area, Next: Warnings, Prev: Truncation, Up: Display
The Echo Area
Display according to the standard interpretation (*note Usual
Display::).
-\1f
-File: lispref.info, Node: Beeping, Prev: Display Tables, Up: Display
-
-Beeping
-=======
-
- You can make XEmacs ring a bell, play a sound, or blink the screen to
-attract the user's attention. Be conservative about how often you do
-this; frequent bells can become irritating. Also be careful not to use
-beeping alone when signaling an error is appropriate. (*Note Errors::.)
-
- - Function: ding &optional dont-terminate sound device
- 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
- should be a symbol specifying which sound to make. This sound
- will be played if `visible-bell' is `nil'. (This only works if
- sound support was compiled into the executable and you are running
- on the console of a Sun SparcStation, SGI, HP9000s700, or Linux
- PC. Otherwise you just get a beep.) The optional third argument
- specifies what device to make the sound on, and defaults to the
- selected device.
-
- - Function: beep &optional dont-terminate sound device
- This is a synonym for `ding'.
-
- - User Option: visible-bell
- This variable determines whether XEmacs should flash the screen to
- represent a bell. Non-`nil' means yes, `nil' means no. On TTY
- devices, this is effective only if the Termcap entry for the
- terminal type has the visible bell flag (`vb') set.
-
- - Variable: sound-alist
- This variable holds an alist associating names with sounds. When
- `beep' or `ding' is called with one of the name symbols, the
- associated sound will be generated instead of the standard beep.
-
- Each element of `sound-alist' is a list describing a sound. The
- first element of the list is the name of the sound being defined.
- Subsequent elements of the list are alternating keyword/value
- pairs:
-
- `sound'
- A string of raw sound data, or the name of another sound to
- play. The symbol `t' here means use the default X beep.
-
- `volume'
- An integer from 0-100, defaulting to `bell-volume'.
-
- `pitch'
- If using the default X beep, the pitch (Hz) to generate.
-
- `duration'
- If using the default X beep, the duration (milliseconds).
-
- For compatibility, elements of `sound-alist' may also be:
-
- * `( sound-name . <sound> )'
-
- * `( sound-name <volume> <sound> )'
-
- You should probably add things to this list by calling the function
- `load-sound-file'.
-
- Caveats:
-
- - You can only play audio data if running on the console screen
- of a Sun SparcStation, SGI, or HP9000s700.
-
- - The pitch, duration, and volume options are available
- everywhere, but many X servers ignore the `pitch' option.
-
- The following beep-types are used by XEmacs itself:
-
- `auto-save-error'
- when an auto-save does not succeed
-
- `command-error'
- when the XEmacs command loop catches an error
-
- `undefined-key'
- when you type a key that is undefined
-
- `undefined-click'
- when you use an undefined mouse-click combination
-
- `no-completion'
- during completing-read
-
- `y-or-n-p'
- when you type something other than 'y' or 'n'
-
- `yes-or-no-p'
- when you type something other than 'yes' or 'no'
-
- `default'
- used when nothing else is appropriate.
-
- Other lisp packages may use other beep types, but these are the
- ones that the C kernel of XEmacs uses.
-
- - User Option: bell-volume
- This variable specifies the default volume for sounds, from 0 to
- 100.
-
- - Command: load-default-sounds
- This function loads and installs some sound files as beep-types.
-
- - 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
- 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
- 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.
-
-\1f
-File: lispref.info, Node: Hash Tables, Next: Range Tables, Prev: Display, Up: Top
-
-Hash Tables
-***********
-
- - Function: hash-table-p object
- This function returns `t' if OBJECT is a hash table, else `nil'.
-
-* Menu:
-
-* Introduction to Hash Tables:: Hash tables are fast data structures for
- implementing simple tables (i.e. finite
- mappings from keys to values).
-* Working With Hash Tables:: Hash table functions.
-* Weak Hash Tables:: Hash tables with special garbage-collection
- behavior.
-
-\1f
-File: lispref.info, Node: Introduction to Hash Tables, Next: Working With Hash Tables, Up: Hash Tables
-
-Introduction to Hash Tables
-===========================
-
- A "hash table" is a data structure that provides mappings from
-arbitrary Lisp objects called "keys" to other arbitrary Lisp objects
-called "values". A key/value pair is sometimes called an "entry" in
-the hash table. There are many ways other than hash tables of
-implementing the same sort of mapping, e.g. association lists (*note
-Association Lists::) and property lists (*note Property Lists::), but
-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".
-
- Internally, hash tables are hashed using the "linear probing" hash
-table implementation method. This method hashes each key to a
-particular spot in the hash table, and then scans forward sequentially
-until a blank entry is found. To look up a key, hash to the appropriate
-spot, then search forward for the key until either a key is found or a
-blank entry stops the search. This method is used in preference to
-double hashing because of changes in recent hardware. The penalty for
-non-sequential access to memory has been increasing, and this
-compensates for the problem of clustering that linear probing entails.
-
- When hash tables are created, the user may (but is not required to)
-specify initial properties that influence performance.
-
- Use the `:size' parameter to specify the number of entries that are
-likely to be stored in the hash table, to avoid the overhead of resizing
-the table. But if the pre-allocated space for the entries is never
-used, it is simply wasted and makes XEmacs slower. Excess unused hash
-table entries exact a small continuous performance penalty, since they
-must be scanned at every garbage collection. If the number of entries
-in the hash table is unknown, simply avoid using the `:size' keyword.
-
- Use the `:rehash-size' and `:rehash-threshold' keywords to adjust
-the algorithm for deciding when to rehash the hash table. For
-temporary hash tables that are going to be very heavily used, use a
-small rehash threshold, for example, 0.4 and a large rehash size, for
-example 2.0. For permanent hash tables that will be infrequently used,
-specify a large rehash threshold, for example 0.8.
-
- Hash tables can also be created by the lisp reader using structure
-syntax, for example:
- #s(hash-table size 20 data (foo 1 bar 2))
-
- The structure syntax accepts the same keywords as `make-hash-table'
-(without the `:' character), as well as the additional keyword `data',
-which specifies the initial hash table contents.
-
- - Function: make-hash-table &key `test' `size' `rehash-size'
- `rehash-threshold' `weakness'
- This function returns a new empty hash table object.
-
- 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 `: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.
-
- 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 to either the key or the value is in a weak hash
- table, then the pair will be removed from the hash table, and the
- key and value collected. A non-weak hash table (or any other
- pointer) would prevent the object from being collected.
-
- A key-weak hash table is similar to a fully-weak hash table except
- that a key-value pair will be removed only if the key remains
- unmarked outside of weak hash tables. The pair will remain in the
- hash table if the key is pointed to by something other than a weak
- hash table, even if the value is not.
-
- A value-weak hash table is similar to a fully-weak hash table
- except that a key-value pair will be removed only if the value
- remains unmarked outside of weak hash tables. The pair will
- remain in the hash table if the value is pointed to by something
- other than a weak hash table, even if the key is not.
-
- - 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
- This function returns the number of entries in 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
- This function returns the current number of slots in HASH-TABLE,
- whether occupied or not.
-
- - 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
- 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
- This function returns the weakness of HASH-TABLE. This can be one
- of `nil', `t', `key' or `value'.
-
-\1f
-File: lispref.info, Node: Working With Hash Tables, Next: Weak Hash Tables, Prev: Introduction to Hash Tables, Up: Hash Tables
-
-Working With Hash Tables
-========================
-
- - Function: puthash key value hash-table
- This function hashes KEY to VALUE in HASH-TABLE.
-
- - 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
- 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
- This function removes all entries from HASH-TABLE, leaving it
- empty.
-
- - 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.
-
- FUNCTION may not modify HASH-TABLE, with the one exception that
- FUNCTION may remhash or puthash the entry currently being
- processed by FUNCTION.
-
-\1f
-File: lispref.info, Node: Weak Hash Tables, Prev: Working With Hash Tables, Up: Hash Tables
-
-Weak Hash Tables
-================
-
- A "weak hash table" is a special variety of hash table whose
-elements do not count as GC referents. For any key-value pair in such a
-hash table, if either the key or value (or in some cases, if one
-particular one of the two) has no references to it outside of weak hash
-tables (and similar structures such as weak lists), the pair will be
-removed from the table, and the key and value collected. A non-weak
-hash table (or any other pointer) would prevent the objects from being
-collected.
-
- Weak hash tables are useful for keeping track of information in a
-non-obtrusive way, for example to implement caching. If the cache
-contains objects such as buffers, markers, image instances, etc. that
-will eventually disappear and get garbage-collected, using a weak hash
-table ensures that these objects are collected normally rather than
-remaining around forever, long past their actual period of use.
-(Otherwise, you'd have to explicitly map over the hash table every so
-often and remove unnecessary elements.)
-
- There are three types of weak hash tables:
-
-fully weak hash tables
- In these hash tables, a pair disappears if either the key or the
- value is unreferenced outside of the table.
-
-key-weak hash tables
- In these hash tables, a pair disappears if the key is unreferenced
- outside of the table, regardless of how the value is referenced.
-
-value-weak hash tables
- In these hash tables, a pair disappears if the value is
- unreferenced outside of the table, regardless of how the key is
- referenced.
-
- Also see *Note Weak Lists::.
-
- Weak hash tables are created by specifying the `:weakness' keyword to
-`make-hash-table'.
-
-\1f
-File: lispref.info, Node: Range Tables, Next: Databases, Prev: Hash Tables, Up: Top
-
-Range Tables
-************
-
- A range table is a table that efficiently associated values with
-ranges of integers.
-
- Note that range tables have a read syntax, like this:
-
- #s(range-table data ((-3 2) foo (5 20) bar))
-
- This maps integers in the range (-3, 2) to `foo' and integers in the
-range (5, 20) to `bar'.
-
- - Function: range-table-p object
- Return non-`nil' if OBJECT is a range table.
-
-* Menu:
-
-* Introduction to Range Tables:: Range tables efficiently map ranges of
- integers to values.
-* Working With Range Tables:: Range table functions.
-
-\1f
-File: lispref.info, Node: Introduction to Range Tables, Next: Working With Range Tables, Up: Range Tables
-
-Introduction to Range Tables
-============================
-
- - Function: make-range-table
- Make a new, empty range 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.
-
-\1f
-File: lispref.info, Node: Working With Range Tables, Prev: Introduction to Range Tables, Up: Range Tables
-
-Working With Range Tables
-=========================
-
- - 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
- This function sets the value for range (START, END) to be VAL in
- TABLE.
-
- - Function: remove-range-table start end table
- This function removes the value for range (START, END) in TABLE.
-
- - Function: clear-range-table table
- This function flushes 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.
-
-\1f
-File: lispref.info, Node: Databases, Next: Processes, Prev: Range Tables, Up: Top
-
-Databases
-*********
-
- - Function: databasep object
- This function returns non-`nil' if OBJECT is a database.
-
-* Menu:
-
-* Connecting to a Database::
-* Working With a Database::
-* Other Database Functions::
-
-\1f
-File: lispref.info, Node: Connecting to a Database, Next: Working With a Database, Up: Databases
-
-Connecting to a Database
-========================
-
- - 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
- creation flags.
-
- TYPE can have the value `'dbm' or `'berkeley_db' to select the
- type of database file to use. (Note: XEmacs may not support both
- of these types.)
-
- For a TYPE of `'dbm', there are no subtypes, so SUBTYPE should by
- `nil'.
-
- For a TYPE of `'berkeley_db', the following subtypes are
- available: `'hash', `'btree', and `'recno'. See the manpages for
- the Berkeley DB functions to more information about these types.
-
- - Function: close-database obj
- This function closes database OBJ.
-
- - Function: database-live-p obj
- This function returns `t' iff OBJ is an active database, else
- `nil'.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Beeping, Prev: Display Tables, Up: Display
+
+Beeping
+=======
+
+ You can make XEmacs ring a bell, play a sound, or blink the screen to
+attract the user's attention. Be conservative about how often you do
+this; frequent bells can become irritating. Also be careful not to use
+beeping alone when signaling an error is appropriate. (*Note Errors::.)
+
+ - Function: ding &optional dont-terminate sound device
+ 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
+ should be a symbol specifying which sound to make. This sound
+ will be played if `visible-bell' is `nil'. (This only works if
+ sound support was compiled into the executable and you are running
+ on the console of a Sun SparcStation, SGI, HP9000s700, or Linux
+ PC. Otherwise you just get a beep.) The optional third argument
+ specifies what device to make the sound on, and defaults to the
+ selected device.
+
+ - Function: beep &optional dont-terminate sound device
+ This is a synonym for `ding'.
+
+ - User Option: visible-bell
+ This variable determines whether XEmacs should flash the screen to
+ represent a bell. Non-`nil' means yes, `nil' means no. On TTY
+ devices, this is effective only if the Termcap entry for the
+ terminal type has the visible bell flag (`vb') set.
+
+ - Variable: sound-alist
+ This variable holds an alist associating names with sounds. When
+ `beep' or `ding' is called with one of the name symbols, the
+ associated sound will be generated instead of the standard beep.
+
+ Each element of `sound-alist' is a list describing a sound. The
+ first element of the list is the name of the sound being defined.
+ Subsequent elements of the list are alternating keyword/value
+ pairs:
+
+ `sound'
+ A string of raw sound data, or the name of another sound to
+ play. The symbol `t' here means use the default X beep.
+
+ `volume'
+ An integer from 0-100, defaulting to `bell-volume'.
+
+ `pitch'
+ If using the default X beep, the pitch (Hz) to generate.
+
+ `duration'
+ If using the default X beep, the duration (milliseconds).
+
+ For compatibility, elements of `sound-alist' may also be:
+
+ * `( sound-name . <sound> )'
+
+ * `( sound-name <volume> <sound> )'
+
+ You should probably add things to this list by calling the function
+ `load-sound-file'.
+
+ Caveats:
+
+ - You can only play audio data if running on the console screen
+ of a Sun SparcStation, SGI, or HP9000s700.
+
+ - The pitch, duration, and volume options are available
+ everywhere, but many X servers ignore the `pitch' option.
+
+ The following beep-types are used by XEmacs itself:
+
+ `auto-save-error'
+ when an auto-save does not succeed
+
+ `command-error'
+ when the XEmacs command loop catches an error
+
+ `undefined-key'
+ when you type a key that is undefined
+
+ `undefined-click'
+ when you use an undefined mouse-click combination
+
+ `no-completion'
+ during completing-read
+
+ `y-or-n-p'
+ when you type something other than 'y' or 'n'
+
+ `yes-or-no-p'
+ when you type something other than 'yes' or 'no'
+
+ `default'
+ used when nothing else is appropriate.
+
+ Other lisp packages may use other beep types, but these are the
+ ones that the C kernel of XEmacs uses.
+
+ - User Option: bell-volume
+ This variable specifies the default volume for sounds, from 0 to
+ 100.
+
+ - Command: load-default-sounds
+ This function loads and installs some sound files as beep-types.
+
+ - 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
+ 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
+ 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.
+
+\1f
+File: lispref.info, Node: Hash Tables, Next: Range Tables, Prev: Display, Up: Top
+
+Hash Tables
+***********
+
+ - Function: hash-table-p object
+ This function returns `t' if OBJECT is a hash table, else `nil'.
+
+* Menu:
+
+* Introduction to Hash Tables:: Hash tables are fast data structures for
+ implementing simple tables (i.e. finite
+ mappings from keys to values).
+* Working With Hash Tables:: Hash table functions.
+* Weak Hash Tables:: Hash tables with special garbage-collection
+ behavior.
+
+\1f
+File: lispref.info, Node: Introduction to Hash Tables, Next: Working With Hash Tables, Up: Hash Tables
+
+Introduction to Hash Tables
+===========================
+
+ A "hash table" is a data structure that provides mappings from
+arbitrary Lisp objects called "keys" to other arbitrary Lisp objects
+called "values". A key/value pair is sometimes called an "entry" in
+the hash table. There are many ways other than hash tables of
+implementing the same sort of mapping, e.g. association lists (*note
+Association Lists::) and property lists (*note Property Lists::), but
+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".
+
+ Internally, hash tables are hashed using the "linear probing" hash
+table implementation method. This method hashes each key to a
+particular spot in the hash table, and then scans forward sequentially
+until a blank entry is found. To look up a key, hash to the appropriate
+spot, then search forward for the key until either a key is found or a
+blank entry stops the search. This method is used in preference to
+double hashing because of changes in recent hardware. The penalty for
+non-sequential access to memory has been increasing, and this
+compensates for the problem of clustering that linear probing entails.
+
+ When hash tables are created, the user may (but is not required to)
+specify initial properties that influence performance.
+
+ Use the `:size' parameter to specify the number of entries that are
+likely to be stored in the hash table, to avoid the overhead of resizing
+the table. But if the pre-allocated space for the entries is never
+used, it is simply wasted and makes XEmacs slower. Excess unused hash
+table entries exact a small continuous performance penalty, since they
+must be scanned at every garbage collection. If the number of entries
+in the hash table is unknown, simply avoid using the `:size' keyword.
+
+ Use the `:rehash-size' and `:rehash-threshold' keywords to adjust
+the algorithm for deciding when to rehash the hash table. For
+temporary hash tables that are going to be very heavily used, use a
+small rehash threshold, for example, 0.4 and a large rehash size, for
+example 2.0. For permanent hash tables that will be infrequently used,
+specify a large rehash threshold, for example 0.8.
+
+ Hash tables can also be created by the lisp reader using structure
+syntax, for example:
+ #s(hash-table size 20 data (foo 1 bar 2))
+
+ The structure syntax accepts the same keywords as `make-hash-table'
+(without the `:' character), as well as the additional keyword `data',
+which specifies the initial hash table contents.
+
+ - Function: make-hash-table &key `test' `size' `rehash-size'
+ `rehash-threshold' `weakness'
+ This function returns a new empty hash table object.
+
+ 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 `: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.
+
+ 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 to either the key or the value is in a weak hash
+ table, then the pair will be removed from the hash table, and the
+ key and value collected. A non-weak hash table (or any other
+ pointer) would prevent the object from being collected.
+
+ A key-weak hash table is similar to a fully-weak hash table except
+ that a key-value pair will be removed only if the key remains
+ unmarked outside of weak hash tables. The pair will remain in the
+ hash table if the key is pointed to by something other than a weak
+ hash table, even if the value is not.
+
+ A value-weak hash table is similar to a fully-weak hash table
+ except that a key-value pair will be removed only if the value
+ remains unmarked outside of weak hash tables. The pair will
+ remain in the hash table if the value is pointed to by something
+ other than a weak hash table, even if the key is not.
+
+ - 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
+ This function returns the number of entries in 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
+ This function returns the current number of slots in HASH-TABLE,
+ whether occupied or not.
+
+ - 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
+ 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
+ This function returns the weakness of HASH-TABLE. This can be one
+ of `nil', `t', `key' or `value'.
+
+\1f
+File: lispref.info, Node: Working With Hash Tables, Next: Weak Hash Tables, Prev: Introduction to Hash Tables, Up: Hash Tables
+
+Working With Hash Tables
+========================
+
+ - Function: puthash key value hash-table
+ This function hashes KEY to VALUE in HASH-TABLE.
+
+ - 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
+ 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
+ This function removes all entries from HASH-TABLE, leaving it
+ empty.
+
+ - 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.
+
+ FUNCTION may not modify HASH-TABLE, with the one exception that
+ FUNCTION may remhash or puthash the entry currently being
+ processed by FUNCTION.
+
+\1f
+File: lispref.info, Node: Weak Hash Tables, Prev: Working With Hash Tables, Up: Hash Tables
+
+Weak Hash Tables
+================
+
+ A "weak hash table" is a special variety of hash table whose
+elements do not count as GC referents. For any key-value pair in such a
+hash table, if either the key or value (or in some cases, if one
+particular one of the two) has no references to it outside of weak hash
+tables (and similar structures such as weak lists), the pair will be
+removed from the table, and the key and value collected. A non-weak
+hash table (or any other pointer) would prevent the objects from being
+collected.
+
+ Weak hash tables are useful for keeping track of information in a
+non-obtrusive way, for example to implement caching. If the cache
+contains objects such as buffers, markers, image instances, etc. that
+will eventually disappear and get garbage-collected, using a weak hash
+table ensures that these objects are collected normally rather than
+remaining around forever, long past their actual period of use.
+(Otherwise, you'd have to explicitly map over the hash table every so
+often and remove unnecessary elements.)
+
+ There are three types of weak hash tables:
+
+fully weak hash tables
+ In these hash tables, a pair disappears if either the key or the
+ value is unreferenced outside of the table.
+
+key-weak hash tables
+ In these hash tables, a pair disappears if the key is unreferenced
+ outside of the table, regardless of how the value is referenced.
+
+value-weak hash tables
+ In these hash tables, a pair disappears if the value is
+ unreferenced outside of the table, regardless of how the key is
+ referenced.
+
+ Also see *Note Weak Lists::.
+
+ Weak hash tables are created by specifying the `:weakness' keyword to
+`make-hash-table'.
+
+\1f
+File: lispref.info, Node: Range Tables, Next: Databases, Prev: Hash Tables, Up: Top
+
+Range Tables
+************
+
+ A range table is a table that efficiently associated values with
+ranges of integers.
+
+ Note that range tables have a read syntax, like this:
+
+ #s(range-table data ((-3 2) foo (5 20) bar))
+
+ This maps integers in the range (-3, 2) to `foo' and integers in the
+range (5, 20) to `bar'.
+
+ - Function: range-table-p object
+ Return non-`nil' if OBJECT is a range table.
+
+* Menu:
+
+* Introduction to Range Tables:: Range tables efficiently map ranges of
+ integers to values.
+* Working With Range Tables:: Range table functions.
+
+\1f
+File: lispref.info, Node: Introduction to Range Tables, Next: Working With Range Tables, Up: Range Tables
+
+Introduction to Range Tables
+============================
+
+ - Function: make-range-table
+ Make a new, empty range 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.
+
+\1f
+File: lispref.info, Node: Working With Range Tables, Prev: Introduction to Range Tables, Up: Range Tables
+
+Working With Range Tables
+=========================
+
+ - 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
+ This function sets the value for range (START, END) to be VAL in
+ TABLE.
+
+ - Function: remove-range-table start end table
+ This function removes the value for range (START, END) in TABLE.
+
+ - Function: clear-range-table table
+ This function flushes 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.
+
+\1f
+File: lispref.info, Node: Databases, Next: Processes, Prev: Range Tables, Up: Top
+
+Databases
+*********
+
+ - Function: databasep object
+ This function returns non-`nil' if OBJECT is a database.
+
+* Menu:
+
+* Connecting to a Database::
+* Working With a Database::
+* Other Database Functions::
+
+\1f
+File: lispref.info, Node: Connecting to a Database, Next: Working With a Database, Up: Databases
+
+Connecting to a Database
+========================
+
+ - 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
+ creation flags.
+
+ TYPE can have the value `'dbm' or `'berkeley_db' to select the
+ type of database file to use. (Note: XEmacs may not support both
+ of these types.)
+
+ For a TYPE of `'dbm', there are no subtypes, so SUBTYPE should by
+ `nil'.
+
+ For a TYPE of `'berkeley_db', the following subtypes are
+ available: `'hash', `'btree', and `'recno'. See the manpages for
+ the Berkeley DB functions to more information about these types.
+
+ - Function: close-database obj
+ This function closes database OBJ.
+
+ - Function: database-live-p obj
+ This function returns `t' iff OBJ is an active database, else
+ `nil'.
+
+\1f
File: lispref.info, Node: Working With a Database, Next: Other Database Functions, Prev: Connecting to a Database, Up: Databases
Working With a Database
* Accepting Output:: Explicitly permitting subprocess output.
Waiting for subprocess output.
-\1f
-File: lispref.info, Node: Process Buffers, Next: Filter Functions, Up: Output from Processes
-
-Process Buffers
----------------
-
- A process can (and usually does) have an "associated buffer", which
-is an ordinary Emacs buffer that is used for two purposes: storing the
-output from the process, and deciding when to kill the process. You
-can also use the buffer to identify a process to operate on, since in
-normal practice only one process is associated with any given buffer.
-Many applications of processes also use the buffer for editing input to
-be sent to the process, but this is not built into XEmacs Lisp.
-
- Unless the process has a filter function (*note Filter Functions::),
-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
- This function returns the associated buffer of the process PROCESS.
-
- (process-buffer (get-process "shell"))
- => #<buffer *shell*>
-
- - 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.
-
- If PROCESS does not have a buffer, `process-mark' returns a marker
- that points nowhere.
-
- Insertion of process output in a buffer uses this marker to decide
- where to insert, and updates it to point after the inserted text.
- That is why successive batches of output are inserted
- consecutively.
-
- Filter functions normally should use this marker in the same
- fashion as is done by direct insertion of output in the buffer. A
- good example of a filter function that uses `process-mark' is
- found at the end of the following section.
-
- When the user is expected to enter input in the process buffer for
- transmission to the process, the process marker is useful for
- distinguishing the new input from previous output.
-
- - 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
- 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
- created.) It is usually a bad idea to have more than one process
- associated with the same buffer.
-
- (get-buffer-process "*shell*")
- => #<process shell>
-
- Killing the process's buffer deletes the process, which kills the
- 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
-
-Process Filter Functions
-------------------------
-
- A process "filter function" is a function that receives the standard
-output from the associated process. If a process has a filter, then
-_all_ output from that process is passed to the filter. The process
-buffer is used directly for output from the process only when there is
-no filter.
-
- A filter function must accept two arguments: the associated process
-and a string, which is the output. The function is then free to do
-whatever it chooses with the output.
-
- A filter function runs only while XEmacs is waiting (e.g., for
-terminal input, or for time to elapse, or for process output). This
-avoids the timing errors that could result from running filters at
-random places in the middle of other Lisp programs. You may explicitly
-cause Emacs to wait, so that filter functions will run, by calling
-`sit-for' or `sleep-for' (*note Waiting::), or `accept-process-output'
-(*note Accepting Output::). Emacs is also waiting when the command loop
-is reading input.
-
- Quitting is normally inhibited within a filter function--otherwise,
-the effect of typing `C-g' at command level or to quit a user command
-would be unpredictable. If you want to permit quitting inside a filter
-function, bind `inhibit-quit' to `nil'. *Note Quitting::.
-
- If an error happens during execution of a filter function, it is
-caught automatically, so that it doesn't stop the execution of whatever
-program was running when the filter function was started. However, if
-`debug-on-error' is non-`nil', the error-catching is turned off. This
-makes it possible to use the Lisp debugger to debug the filter
-function. *Note Debugger::.
-
- Many filter functions sometimes or always insert the text in the
-process's buffer, mimicking the actions of XEmacs when there is no
-filter. Such filter functions need to use `set-buffer' in order to be
-sure to insert in that buffer. To avoid setting the current buffer
-semipermanently, these filter functions must use `unwind-protect' to
-make sure to restore the previous current buffer. They should also
-update the process marker, and in some cases update the value of point.
-Here is how to do these things:
-
- (defun ordinary-insertion-filter (proc string)
- (let ((old-buffer (current-buffer)))
- (unwind-protect
- (let (moving)
- (set-buffer (process-buffer proc))
- (setq moving (= (point) (process-mark proc)))
- (save-excursion
- ;; Insert the text, moving the process-marker.
- (goto-char (process-mark proc))
- (insert string)
- (set-marker (process-mark proc) (point)))
- (if moving (goto-char (process-mark proc))))
- (set-buffer old-buffer))))
-
-The reason to use an explicit `unwind-protect' rather than letting
-`save-excursion' restore the current buffer is so as to preserve the
-change in point made by `goto-char'.
-
- To make the filter force the process buffer to be visible whenever
-new text arrives, insert the following line just before the
-`unwind-protect':
-
- (display-buffer (process-buffer proc))
-
- To force point to move to the end of the new output no matter where
-it was previously, eliminate the variable `moving' and call `goto-char'
-unconditionally.
-
- In earlier Emacs versions, every filter function that did regexp
-searching or matching had to explicitly save and restore the match data.
-Now Emacs does this automatically; filter functions never need to do it
-explicitly. *Note Match Data::.
-
- A filter function that writes the output into the buffer of the
-process should check whether the buffer is still alive. If it tries to
-insert into a dead buffer, it will get an error. If the buffer is dead,
-`(buffer-name (process-buffer PROCESS))' returns `nil'.
-
- The output to the function may come in chunks of any size. A program
-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
- 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
- is changed. (Output received during this time is not discarded,
- but is queued, and will be processed as soon as the filter is
- changed.)
-
- - 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.
-
- Here is an example of use of a filter function:
-
- (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~
- backup.err david.psf resume-Dec.psf
- backup.mss dland syllabus.mss
- "
- "#backups.mss# backup.mss~ kolstad.mss
- ")
-
-\1f
-File: lispref.info, Node: Accepting Output, Prev: Filter Functions, Up: Output from Processes
-
-Accepting Output from Processes
--------------------------------
-
- Output from asynchronous subprocesses normally arrives only while
-XEmacs is waiting for some sort of external event, such as elapsed time
-or terminal input. Occasionally it is useful in a Lisp program to
-explicitly permit output to arrive at a specific point, or even to wait
-until output arrives from a process.
-
- - Function: accept-process-output &optional process seconds millisec
- 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
- function does not return until some output has been received from
- PROCESS.
-
- The arguments SECONDS and MILLISEC let you specify timeout
- periods. The former specifies a period measured in seconds and the
- latter specifies one measured in milliseconds. The two time
- periods thus specified are added together, and
- `accept-process-output' returns after that much time whether or
- not there has been any subprocess output. Note that SECONDS is
- allowed to be a floating-point number; thus, there is no need to
- ever use MILLISEC. (It is retained for compatibility purposes.)
-
- The function `accept-process-output' returns non-`nil' if it did
- get some output, or `nil' if the timeout expired before output
- arrived.
-
-\1f
-File: lispref.info, Node: Sentinels, Next: Process Window Size, Prev: Output from Processes, Up: Processes
-
-Sentinels: Detecting Process Status Changes
-===========================================
-
- A "process sentinel" is a function that is called whenever the
-associated process changes status for any reason, including signals
-(whether sent by XEmacs or caused by the process's own actions) that
-terminate, stop, or continue the process. The process sentinel is also
-called if the process exits. The sentinel receives two arguments: the
-process for which the event occurred, and a string describing the type
-of event.
-
- The string describing the event looks like one of the following:
-
- * `"finished\n"'.
-
- * `"exited abnormally with code EXITCODE\n"'.
-
- * `"NAME-OF-SIGNAL\n"'.
-
- * `"NAME-OF-SIGNAL (core dumped)\n"'.
-
- A sentinel runs only while XEmacs is waiting (e.g., for terminal
-input, or for time to elapse, or for process output). This avoids the
-timing errors that could result from running them at random places in
-the middle of other Lisp programs. A program can wait, so that
-sentinels will run, by calling `sit-for' or `sleep-for' (*note
-Waiting::), or `accept-process-output' (*note Accepting Output::).
-Emacs is also waiting when the command loop is reading input.
-
- Quitting is normally inhibited within a sentinel--otherwise, the
-effect of typing `C-g' at command level or to quit a user command would
-be unpredictable. If you want to permit quitting inside a sentinel,
-bind `inhibit-quit' to `nil'. *Note Quitting::.
-
- A sentinel that writes the output into the buffer of the process
-should check whether the buffer is still alive. If it tries to insert
-into a dead buffer, it will get an error. If the buffer is dead,
-`(buffer-name (process-buffer PROCESS))' returns `nil'.
-
- If an error happens during execution of a sentinel, it is caught
-automatically, so that it doesn't stop the execution of whatever
-programs was running when the sentinel was started. However, if
-`debug-on-error' is non-`nil', the error-catching is turned off. This
-makes it possible to use the Lisp debugger to debug the sentinel.
-*Note Debugger::.
-
- In earlier Emacs versions, every sentinel that did regexp searching
-or matching had to explicitly save and restore the match data. Now
-Emacs does this automatically; sentinels never need to do it explicitly.
-*Note Match Data::.
-
- - Function: set-process-sentinel process sentinel
- 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
- process's buffer when the process status changes.
-
- (defun msg-me (process event)
- (princ
- (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
- This function returns the sentinel of PROCESS, or `nil' if it has
- none.
-
- - Function: waiting-for-user-input-p
- While a sentinel or filter function is running, this function
- returns non-`nil' if XEmacs was waiting for keyboard input from
- the user at the time the sentinel or filter function was called,
- `nil' if it was not.
-
-\1f
-File: lispref.info, Node: Process Window Size, Next: Transaction Queues, Prev: Sentinels, Up: Processes
-
-Process Window Size
-===================
-
- - 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.
-
-\1f
-File: lispref.info, Node: Transaction Queues, Next: Network, Prev: Process Window Size, Up: Processes
-
-Transaction Queues
-==================
-
- You can use a "transaction queue" for more convenient communication
-with subprocesses using transactions. First use `tq-create' to create
-a transaction queue communicating with a specified process. Then you
-can call `tq-enqueue' to send a transaction.
-
- - Function: tq-create process
- 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
- This function sends a transaction to queue QUEUE. Specifying the
- queue has the effect of specifying the subprocess to talk to.
-
- The argument QUESTION is the outgoing message that starts the
- transaction. The argument FN is the function to call when the
- corresponding answer comes back; it is called with two arguments:
- CLOSURE, and the answer received.
-
- The argument REGEXP is a regular expression that should match the
- entire answer, but nothing less; that's how `tq-enqueue' determines
- where the answer ends.
-
- The return value of `tq-enqueue' itself is not meaningful.
-
- - Function: tq-close queue
- Shut down transaction queue QUEUE, waiting for all pending
- transactions to complete, and then terminate the connection or
- child process.
-
- Transaction queues are implemented by means of a filter function.
-*Note Filter Functions::.
-
-\1f
-File: lispref.info, Node: Network, Prev: Transaction Queues, Up: Processes
-
-Network Connections
-===================
-
- XEmacs Lisp programs can open TCP network connections to other
-processes on the same machine or other machines. A network connection
-is handled by Lisp much like a subprocess, and is represented by a
-process object. However, the process you are communicating with is not
-a child of the XEmacs process, so you can't kill it or send it signals.
-All you can do is send and receive data. `delete-process' closes the
-connection, but does not kill the process at the other end; that
-process must decide what to do about closure of the connection.
-
- You can distinguish process objects representing network connections
-from those representing subprocesses with the `process-status'
-function. It always returns either `open' or `closed' for a network
-connection, and it never returns either of those values for a real
-subprocess. *Note Process Information::.
-
- - Function: open-network-stream name buffer-or-name host service
- This function opens a TCP connection for a service to a host. It
- returns a process object to represent the connection.
-
- The NAME argument specifies the name for the process object. It
- is modified as necessary to make it unique.
-
- The BUFFER-OR-NAME argument is the buffer to associate with the
- connection. Output from the connection is inserted in the buffer,
- unless you specify a filter function to handle the output. If
- BUFFER-OR-NAME is `nil', it means that the connection is not
- associated with any buffer.
-
- The arguments HOST and SERVICE specify where to connect to; HOST
- is the host name or IP address (a string), and SERVICE is the name
- of a defined network service (a string) or a port number (an
- integer).
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Process Buffers, Next: Filter Functions, Up: Output from Processes
+
+Process Buffers
+---------------
+
+ A process can (and usually does) have an "associated buffer", which
+is an ordinary Emacs buffer that is used for two purposes: storing the
+output from the process, and deciding when to kill the process. You
+can also use the buffer to identify a process to operate on, since in
+normal practice only one process is associated with any given buffer.
+Many applications of processes also use the buffer for editing input to
+be sent to the process, but this is not built into XEmacs Lisp.
+
+ Unless the process has a filter function (*note Filter Functions::),
+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
+ This function returns the associated buffer of the process PROCESS.
+
+ (process-buffer (get-process "shell"))
+ => #<buffer *shell*>
+
+ - 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.
+
+ If PROCESS does not have a buffer, `process-mark' returns a marker
+ that points nowhere.
+
+ Insertion of process output in a buffer uses this marker to decide
+ where to insert, and updates it to point after the inserted text.
+ That is why successive batches of output are inserted
+ consecutively.
+
+ Filter functions normally should use this marker in the same
+ fashion as is done by direct insertion of output in the buffer. A
+ good example of a filter function that uses `process-mark' is
+ found at the end of the following section.
+
+ When the user is expected to enter input in the process buffer for
+ transmission to the process, the process marker is useful for
+ distinguishing the new input from previous output.
+
+ - 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
+ 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
+ created.) It is usually a bad idea to have more than one process
+ associated with the same buffer.
+
+ (get-buffer-process "*shell*")
+ => #<process shell>
+
+ Killing the process's buffer deletes the process, which kills the
+ 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
+
+Process Filter Functions
+------------------------
+
+ A process "filter function" is a function that receives the standard
+output from the associated process. If a process has a filter, then
+_all_ output from that process is passed to the filter. The process
+buffer is used directly for output from the process only when there is
+no filter.
+
+ A filter function must accept two arguments: the associated process
+and a string, which is the output. The function is then free to do
+whatever it chooses with the output.
+
+ A filter function runs only while XEmacs is waiting (e.g., for
+terminal input, or for time to elapse, or for process output). This
+avoids the timing errors that could result from running filters at
+random places in the middle of other Lisp programs. You may explicitly
+cause Emacs to wait, so that filter functions will run, by calling
+`sit-for' or `sleep-for' (*note Waiting::), or `accept-process-output'
+(*note Accepting Output::). Emacs is also waiting when the command loop
+is reading input.
+
+ Quitting is normally inhibited within a filter function--otherwise,
+the effect of typing `C-g' at command level or to quit a user command
+would be unpredictable. If you want to permit quitting inside a filter
+function, bind `inhibit-quit' to `nil'. *Note Quitting::.
+
+ If an error happens during execution of a filter function, it is
+caught automatically, so that it doesn't stop the execution of whatever
+program was running when the filter function was started. However, if
+`debug-on-error' is non-`nil', the error-catching is turned off. This
+makes it possible to use the Lisp debugger to debug the filter
+function. *Note Debugger::.
+
+ Many filter functions sometimes or always insert the text in the
+process's buffer, mimicking the actions of XEmacs when there is no
+filter. Such filter functions need to use `set-buffer' in order to be
+sure to insert in that buffer. To avoid setting the current buffer
+semipermanently, these filter functions must use `unwind-protect' to
+make sure to restore the previous current buffer. They should also
+update the process marker, and in some cases update the value of point.
+Here is how to do these things:
+
+ (defun ordinary-insertion-filter (proc string)
+ (let ((old-buffer (current-buffer)))
+ (unwind-protect
+ (let (moving)
+ (set-buffer (process-buffer proc))
+ (setq moving (= (point) (process-mark proc)))
+ (save-excursion
+ ;; Insert the text, moving the process-marker.
+ (goto-char (process-mark proc))
+ (insert string)
+ (set-marker (process-mark proc) (point)))
+ (if moving (goto-char (process-mark proc))))
+ (set-buffer old-buffer))))
+
+The reason to use an explicit `unwind-protect' rather than letting
+`save-excursion' restore the current buffer is so as to preserve the
+change in point made by `goto-char'.
+
+ To make the filter force the process buffer to be visible whenever
+new text arrives, insert the following line just before the
+`unwind-protect':
+
+ (display-buffer (process-buffer proc))
+
+ To force point to move to the end of the new output no matter where
+it was previously, eliminate the variable `moving' and call `goto-char'
+unconditionally.
+
+ In earlier Emacs versions, every filter function that did regexp
+searching or matching had to explicitly save and restore the match data.
+Now Emacs does this automatically; filter functions never need to do it
+explicitly. *Note Match Data::.
+
+ A filter function that writes the output into the buffer of the
+process should check whether the buffer is still alive. If it tries to
+insert into a dead buffer, it will get an error. If the buffer is dead,
+`(buffer-name (process-buffer PROCESS))' returns `nil'.
+
+ The output to the function may come in chunks of any size. A program
+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
+ 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
+ is changed. (Output received during this time is not discarded,
+ but is queued, and will be processed as soon as the filter is
+ changed.)
+
+ - 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.
+
+ Here is an example of use of a filter function:
+
+ (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~
+ backup.err david.psf resume-Dec.psf
+ backup.mss dland syllabus.mss
+ "
+ "#backups.mss# backup.mss~ kolstad.mss
+ ")
+
+\1f
+File: lispref.info, Node: Accepting Output, Prev: Filter Functions, Up: Output from Processes
+
+Accepting Output from Processes
+-------------------------------
+
+ Output from asynchronous subprocesses normally arrives only while
+XEmacs is waiting for some sort of external event, such as elapsed time
+or terminal input. Occasionally it is useful in a Lisp program to
+explicitly permit output to arrive at a specific point, or even to wait
+until output arrives from a process.
+
+ - Function: accept-process-output &optional process seconds millisec
+ 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
+ function does not return until some output has been received from
+ PROCESS.
+
+ The arguments SECONDS and MILLISEC let you specify timeout
+ periods. The former specifies a period measured in seconds and the
+ latter specifies one measured in milliseconds. The two time
+ periods thus specified are added together, and
+ `accept-process-output' returns after that much time whether or
+ not there has been any subprocess output. Note that SECONDS is
+ allowed to be a floating-point number; thus, there is no need to
+ ever use MILLISEC. (It is retained for compatibility purposes.)
+
+ The function `accept-process-output' returns non-`nil' if it did
+ get some output, or `nil' if the timeout expired before output
+ arrived.
+
+\1f
+File: lispref.info, Node: Sentinels, Next: Process Window Size, Prev: Output from Processes, Up: Processes
+
+Sentinels: Detecting Process Status Changes
+===========================================
+
+ A "process sentinel" is a function that is called whenever the
+associated process changes status for any reason, including signals
+(whether sent by XEmacs or caused by the process's own actions) that
+terminate, stop, or continue the process. The process sentinel is also
+called if the process exits. The sentinel receives two arguments: the
+process for which the event occurred, and a string describing the type
+of event.
+
+ The string describing the event looks like one of the following:
+
+ * `"finished\n"'.
+
+ * `"exited abnormally with code EXITCODE\n"'.
+
+ * `"NAME-OF-SIGNAL\n"'.
+
+ * `"NAME-OF-SIGNAL (core dumped)\n"'.
+
+ A sentinel runs only while XEmacs is waiting (e.g., for terminal
+input, or for time to elapse, or for process output). This avoids the
+timing errors that could result from running them at random places in
+the middle of other Lisp programs. A program can wait, so that
+sentinels will run, by calling `sit-for' or `sleep-for' (*note
+Waiting::), or `accept-process-output' (*note Accepting Output::).
+Emacs is also waiting when the command loop is reading input.
+
+ Quitting is normally inhibited within a sentinel--otherwise, the
+effect of typing `C-g' at command level or to quit a user command would
+be unpredictable. If you want to permit quitting inside a sentinel,
+bind `inhibit-quit' to `nil'. *Note Quitting::.
+
+ A sentinel that writes the output into the buffer of the process
+should check whether the buffer is still alive. If it tries to insert
+into a dead buffer, it will get an error. If the buffer is dead,
+`(buffer-name (process-buffer PROCESS))' returns `nil'.
+
+ If an error happens during execution of a sentinel, it is caught
+automatically, so that it doesn't stop the execution of whatever
+programs was running when the sentinel was started. However, if
+`debug-on-error' is non-`nil', the error-catching is turned off. This
+makes it possible to use the Lisp debugger to debug the sentinel.
+*Note Debugger::.
+
+ In earlier Emacs versions, every sentinel that did regexp searching
+or matching had to explicitly save and restore the match data. Now
+Emacs does this automatically; sentinels never need to do it explicitly.
+*Note Match Data::.
+
+ - Function: set-process-sentinel process sentinel
+ 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
+ process's buffer when the process status changes.
+
+ (defun msg-me (process event)
+ (princ
+ (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
+ This function returns the sentinel of PROCESS, or `nil' if it has
+ none.
+
+ - Function: waiting-for-user-input-p
+ While a sentinel or filter function is running, this function
+ returns non-`nil' if XEmacs was waiting for keyboard input from
+ the user at the time the sentinel or filter function was called,
+ `nil' if it was not.
+
+\1f
+File: lispref.info, Node: Process Window Size, Next: Transaction Queues, Prev: Sentinels, Up: Processes
+
+Process Window Size
+===================
+
+ - 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.
+
+\1f
+File: lispref.info, Node: Transaction Queues, Next: Network, Prev: Process Window Size, Up: Processes
+
+Transaction Queues
+==================
+
+ You can use a "transaction queue" for more convenient communication
+with subprocesses using transactions. First use `tq-create' to create
+a transaction queue communicating with a specified process. Then you
+can call `tq-enqueue' to send a transaction.
+
+ - Function: tq-create process
+ 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
+ This function sends a transaction to queue QUEUE. Specifying the
+ queue has the effect of specifying the subprocess to talk to.
+
+ The argument QUESTION is the outgoing message that starts the
+ transaction. The argument FN is the function to call when the
+ corresponding answer comes back; it is called with two arguments:
+ CLOSURE, and the answer received.
+
+ The argument REGEXP is a regular expression that should match the
+ entire answer, but nothing less; that's how `tq-enqueue' determines
+ where the answer ends.
+
+ The return value of `tq-enqueue' itself is not meaningful.
+
+ - Function: tq-close queue
+ Shut down transaction queue QUEUE, waiting for all pending
+ transactions to complete, and then terminate the connection or
+ child process.
+
+ Transaction queues are implemented by means of a filter function.
+*Note Filter Functions::.
+
+\1f
+File: lispref.info, Node: Network, Prev: Transaction Queues, Up: Processes
+
+Network Connections
+===================
+
+ XEmacs Lisp programs can open TCP network connections to other
+processes on the same machine or other machines. A network connection
+is handled by Lisp much like a subprocess, and is represented by a
+process object. However, the process you are communicating with is not
+a child of the XEmacs process, so you can't kill it or send it signals.
+All you can do is send and receive data. `delete-process' closes the
+connection, but does not kill the process at the other end; that
+process must decide what to do about closure of the connection.
+
+ You can distinguish process objects representing network connections
+from those representing subprocesses with the `process-status'
+function. It always returns either `open' or `closed' for a network
+connection, and it never returns either of those values for a real
+subprocess. *Note Process Information::.
+
+ - Function: open-network-stream name buffer-or-name host service
+ This function opens a TCP connection for a service to a host. It
+ returns a process object to represent the connection.
+
+ The NAME argument specifies the name for the process object. It
+ is modified as necessary to make it unique.
+
+ The BUFFER-OR-NAME argument is the buffer to associate with the
+ connection. Output from the connection is inserted in the buffer,
+ unless you specify a filter function to handle the output. If
+ BUFFER-OR-NAME is `nil', it means that the connection is not
+ associated with any buffer.
+
+ The arguments HOST and SERVICE specify where to connect to; HOST
+ is the host name or IP address (a string), and SERVICE is the name
+ of a defined network service (a string) or a port number (an
+ integer).
+
+\1f
File: lispref.info, Node: System Interface, Next: X-Windows, Prev: Processes, Up: Top
Operating System Interface
3. Return "C:\", as a fallback, but issue a warning.
-\1f
-File: lispref.info, Node: Time of Day, Next: Time Conversion, Prev: User Identification, Up: System Interface
-
-Time of Day
-===========
-
- This section explains how to determine the current time and the time
-zone.
-
- - 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
- you can reliably use `substring' to extract pieces of it. It is
- wise to count the characters from the beginning of the string
- rather than from the end, as additional information may be added
- at the end.
-
- The argument TIME-VALUE, if given, specifies a time to format
- 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::).
-
- (current-time-string)
- => "Wed Oct 14 22:21:05 1987"
-
- - Function: current-time
- This function returns the system's time value as a list of three
- integers: `(HIGH LOW MICROSEC)'. The integers HIGH and LOW
- combine to give the number of seconds since 0:00 January 1, 1970,
- which is HIGH * 2**16 + LOW.
-
- The third element, MICROSEC, gives the microseconds since the
- start of the current second (or 0 for systems that return time
- only on the resolution of a second).
-
- The first two elements can be compared with file time values such
- as you get with the function `file-attributes'. *Note File
- Attributes::.
-
- - Function: current-time-zone &optional time-value
- This function returns a list describing the time zone that the
- user is in.
-
- The value has the form `(OFFSET NAME)'. Here OFFSET is an integer
- giving the number of seconds ahead of UTC (east of Greenwich). A
- negative value means west of Greenwich. The second element, NAME
- is a string giving the name of the time zone. Both elements
- change when daylight savings time begins or ends; if the user has
- specified a time zone that does not use a seasonal time
- adjustment, then the value is constant through time.
-
- If the operating system doesn't supply all the information
- necessary to compute the value, both elements of the list are
- `nil'.
-
- The argument TIME-VALUE, if given, specifies a time to analyze
- 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::).
-
-\1f
-File: lispref.info, Node: Time Conversion, Next: Timers, Prev: Time of Day, Up: System Interface
-
-Time Conversion
-===============
-
- These functions convert time values (lists of two or three integers)
-to strings or to calendrical information. There is also a function to
-convert calendrical information to a time value. You can get time
-values from the functions `current-time' (*note Time of Day::) and
-`file-attributes' (*note File Attributes::).
-
- - 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
- say to substitute parts of the time. Here is a table of what the
- `%'-sequences mean:
-
- `%a'
- This stands for the abbreviated name of the day of week.
-
- `%A'
- This stands for the full name of the day of week.
-
- `%b'
- This stands for the abbreviated name of the month.
-
- `%B'
- This stands for the full name of the month.
-
- `%c'
- This is a synonym for `%x %X'.
-
- `%C'
- This has a locale-specific meaning. In the default locale
- (named C), it is equivalent to `%A, %B %e, %Y'.
-
- `%d'
- This stands for the day of month, zero-padded.
-
- `%D'
- This is a synonym for `%m/%d/%y'.
-
- `%e'
- This stands for the day of month, blank-padded.
-
- `%h'
- This is a synonym for `%b'.
-
- `%H'
- This stands for the hour (00-23).
-
- `%I'
- This stands for the hour (00-12).
-
- `%j'
- This stands for the day of the year (001-366).
-
- `%k'
- This stands for the hour (0-23), blank padded.
-
- `%l'
- This stands for the hour (1-12), blank padded.
-
- `%m'
- This stands for the month (01-12).
-
- `%M'
- This stands for the minute (00-59).
-
- `%n'
- This stands for a newline.
-
- `%p'
- This stands for `AM' or `PM', as appropriate.
-
- `%r'
- This is a synonym for `%I:%M:%S %p'.
-
- `%R'
- This is a synonym for `%H:%M'.
-
- `%S'
- This stands for the seconds (00-60).
-
- `%t'
- This stands for a tab character.
-
- `%T'
- This is a synonym for `%H:%M:%S'.
-
- `%U'
- This stands for the week of the year (01-52), assuming that
- weeks start on Sunday.
-
- `%w'
- This stands for the numeric day of week (0-6). Sunday is day
- 0.
-
- `%W'
- This stands for the week of the year (01-52), assuming that
- weeks start on Monday.
-
- `%x'
- This has a locale-specific meaning. In the default locale
- (named C), it is equivalent to `%D'.
-
- `%X'
- This has a locale-specific meaning. In the default locale
- (named C), it is equivalent to `%T'.
-
- `%y'
- This stands for the year without century (00-99).
-
- `%Y'
- This stands for the year with century.
-
- `%Z'
- This stands for the time zone abbreviation.
-
- - Function: decode-time time
- This function converts a time value into calendrical information.
- The return value is a list of nine elements, as follows:
-
- (SECONDS MINUTES HOUR DAY MONTH YEAR DOW DST ZONE)
-
- Here is what the elements mean:
-
- SEC
- The number of seconds past the minute, as an integer between
- 0 and 59.
-
- MINUTE
- The number of minutes past the hour, as an integer between 0
- and 59.
-
- HOUR
- The hour of the day, as an integer between 0 and 23.
-
- DAY
- The day of the month, as an integer between 1 and 31.
-
- MONTH
- The month of the year, as an integer between 1 and 12.
-
- YEAR
- The year, an integer typically greater than 1900.
-
- DOW
- The day of week, as an integer between 0 and 6, where 0
- stands for Sunday.
-
- DST
- `t' if daylight savings time is effect, otherwise `nil'.
-
- ZONE
- An integer indicating the time zone, as the number of seconds
- east of Greenwich.
-
- Note that Common Lisp has different meanings for DOW and 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'.
-
- Year numbers less than 100 are treated just like other year
- numbers. If you want them to stand for years above 1900, you must
- alter them yourself before you call `encode-time'.
-
- The optional argument ZONE defaults to the current time zone and
- its daylight savings time rules. If specified, it can be either a
- list (as you would get from `current-time-zone') or an integer (as
- you would get from `decode-time'). The specified zone is used
- without any further alteration for daylight savings time.
-
-\1f
-File: lispref.info, Node: Timers, Next: Terminal Input, Prev: Time Conversion, Up: System Interface
-
-Timers for Delayed Execution
-============================
-
- You can set up a timer to call a function at a specified future time.
-
- - Function: add-timeout secs function object &optional resignal
- 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
- seconds have elapsed, with one argument, the given OBJECT. If the
- optional RESIGNAL argument is provided, then after this timeout
- expires, `add-timeout' will automatically be called again with
- RESIGNAL as the first argument.
-
- This function returns an object which is the "id" of this
- particular timeout. You can pass that object to `disable-timeout'
- to turn off the timeout before it has been signalled.
-
- The number of seconds may be expressed as a floating-point number,
- in which case some fractional part of a second will be used.
- Caveat: the usable timeout granularity will vary from system to
- system.
-
- Adding a timeout causes a timeout event to be returned by
- `next-event', and the function will be invoked by
- `dispatch-event', so if XEmacs is in a tight loop, the function
- will not be invoked until the next call to sit-for or until the
- return to top-level (the same is true of process filters).
-
- WARNING: if you are thinking of calling add-timeout from inside of
- a callback function as a way of resignalling a timeout, think
- again. There is a race condition. That's why the RESIGNAL
- argument exists.
-
- (NOTE: In FSF Emacs, this function is called `run-at-time' and has
- different semantics.)
-
- - 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
- not cause anything special to happen. (NOTE: In FSF Emacs, this
- function is called `cancel-timer'.)
-
-\1f
-File: lispref.info, Node: Terminal Input, Next: Terminal Output, Prev: Timers, Up: System Interface
-
-Terminal Input
-==============
-
- This section describes functions and variables for recording or
-manipulating terminal input. See *Note Display::, for related
-functions.
-
-* Menu:
-
-* Input Modes:: Options for how input is processed.
-* Translating Input:: Low level conversion of some characters or events
- into others.
-* Recording Input:: Saving histories of recent or all input events.
-
-\1f
-File: lispref.info, Node: Input Modes, Next: Translating Input, Up: Terminal Input
-
-Input Modes
------------
-
- - 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
- directly with X, it ignores this argument and uses interrupts if
- that is the way it knows how to communicate.
-
- If FLOW is non-`nil', then XEmacs uses XON/XOFF (`C-q', `C-s')
- flow control for output to the terminal. This has no effect except
- in CBREAK mode. *Note Flow Control::.
-
- The default setting is system dependent. Some systems always use
- CBREAK mode regardless of what is specified.
-
- The argument META controls support for input character codes above
- 127. If META is `t', XEmacs converts characters with the 8th bit
- set into Meta characters. If META is `nil', XEmacs disregards the
- 8th bit; this is necessary when the terminal uses it as a parity
- bit. If META is neither `t' nor `nil', XEmacs uses all 8 bits of
- input unchanged. This is good for terminals using European 8-bit
- character sets.
-
- If QUIT-CHAR is non-`nil', it specifies the character to use for
- quitting. Normally this character is `C-g'. *Note Quitting::.
-
- The `current-input-mode' function returns the input mode settings
-XEmacs is currently using.
-
- - Function: current-input-mode
- This function returns current mode for reading keyboard input. It
- returns a list, corresponding to the arguments of `set-input-mode',
- of the form `(INTERRUPT FLOW META QUIT)' in which:
- INTERRUPT
- is non-`nil' when XEmacs is using interrupt-driven input. If
- `nil', Emacs is using CBREAK mode.
-
- FLOW
- is non-`nil' if XEmacs uses XON/XOFF (`C-q', `C-s') flow
- control for output to the terminal. This value has no effect
- unless INTERRUPT is non-`nil'.
-
- META
- is `t' if XEmacs treats the eighth bit of input characters as
- the meta bit; `nil' means XEmacs clears the eighth bit of
- every input character; any other value means XEmacs uses all
- eight bits as the basic character code.
-
- QUIT
- is the character XEmacs currently uses for quitting, usually
- `C-g'.
-
-\1f
-File: lispref.info, Node: Translating Input, Next: Recording Input, Prev: Input Modes, Up: Terminal Input
-
-Translating Input Events
-------------------------
-
- This section describes features for translating input events into
-other input events before they become part of key sequences.
-
- - Variable: function-key-map
- This variable holds a keymap that describes the character sequences
- sent by function keys on an ordinary character terminal. This
- keymap uses the same data structure as other keymaps, but is used
- differently: it specifies translations to make while reading
- 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
- is replaced with the events in V.
-
- For example, VT100 terminals send `<ESC> O P' when the keypad PF1
- key is pressed. Therefore, we want XEmacs to translate that
- sequence of events into the single event `pf1'. We accomplish
- this by "binding" `<ESC> O P' to `[pf1]' in `function-key-map',
- when using a VT100.
-
- Thus, typing `C-c <PF1>' sends the character sequence `C-c <ESC> O
- P'; later the function `read-key-sequence' translates this back
- into `C-c <PF1>', which it returns as the vector `[?\C-c pf1]'.
-
- Entries in `function-key-map' are ignored if they conflict with
- bindings made in the minor mode, local, or global keymaps. The
- intent is that the character sequences that function keys send
- should not have command bindings in their own right.
-
- The value of `function-key-map' is usually set up automatically
- according to the terminal's Terminfo or Termcap entry, but
- sometimes those need help from terminal-specific Lisp files.
- XEmacs comes with terminal-specific files for many common
- terminals; their main purpose is to make entries in
- `function-key-map' beyond those that can be deduced from Termcap
- and Terminfo. *Note Terminal-Specific::.
-
- Emacs versions 18 and earlier used totally different means of
- detecting the character sequences that represent function keys.
-
- - Variable: key-translation-map
- This variable is another keymap used just like `function-key-map'
- to translate input events into other events. It differs from
- `function-key-map' in two ways:
-
- * `key-translation-map' goes to work after `function-key-map' is
- finished; it receives the results of translation by
- `function-key-map'.
-
- * `key-translation-map' overrides actual key bindings.
-
- The intent of `key-translation-map' is for users to map one
- character set to another, including ordinary characters normally
- bound to `self-insert-command'.
-
- You can use `function-key-map' or `key-translation-map' for more
-than simple aliases, by using a function, instead of a key sequence, as
-the "translation" of a key. Then this function is called to compute
-the translation of that key.
-
- The key translation function receives one argument, which is the
-prompt that was specified in `read-key-sequence'--or `nil' if the key
-sequence is being read by the editor command loop. In most cases you
-can ignore the prompt value.
-
- If the function reads input itself, it can have the effect of
-altering the event that follows. For example, here's how to define
-`C-c h' to turn the character that follows into a Hyper character:
-
- (defun hyperify (prompt)
- (let ((e (read-event)))
- (vector (if (numberp e)
- (logior (lsh 1 20) e)
- (if (memq 'hyper (event-modifiers e))
- e
- (add-event-modifier "H-" e))))))
-
- (defun add-event-modifier (string e)
- (let ((symbol (if (symbolp e) e (car e))))
- (setq symbol (intern (concat string
- (symbol-name symbol))))
- (if (symbolp e)
- symbol
- (cons symbol (cdr e)))))
-
- (define-key function-key-map "\C-ch" 'hyperify)
-
- The `iso-transl' library uses this feature to provide a way of
-inputting non-ASCII Latin-1 characters.
-
-\1f
-File: lispref.info, Node: Recording Input, Prev: Translating Input, Up: Terminal Input
-
-Recording Input
----------------
-
- - 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.
-
- All input events are included, whether or not they were used as
- parts of key sequences. Thus, you always get the last 100 inputs,
- not counting keyboard macros. (Events from keyboard macros are
- excluded because they are less interesting for debugging; it
- should be enough to see the events that invoked the macros.)
-
- If NUMBER is specified, not more than NUMBER events will be
- returned. You may change the number of stored events using
- `set-recent-keys-ring-size'.
-
- - Function: recent-keys-ring-size
- This function returns the number of recent events stored
- 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
- This function changes the number of events stored by XEmacs and
- returned by `recent-keys'.
-
- For example, `(set-recent-keys-ring-size 250)' will make XEmacs
- remember last 250 events and will make `recent-keys' return last
- 250 events by default.
-
- - 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
- non-character event is expressed using its printed representation
- surrounded by `<...>'.
-
- You close the dribble file by calling this function with an
- argument of `nil'.
-
- This function is normally used to record the input necessary to
- trigger an XEmacs bug, for the sake of a bug report.
-
- (open-dribble-file "~/dribble")
- => nil
-
- See also the `open-termscript' function (*note Terminal Output::).
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Time of Day, Next: Time Conversion, Prev: User Identification, Up: System Interface
+
+Time of Day
+===========
+
+ This section explains how to determine the current time and the time
+zone.
+
+ - 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
+ you can reliably use `substring' to extract pieces of it. It is
+ wise to count the characters from the beginning of the string
+ rather than from the end, as additional information may be added
+ at the end.
+
+ The argument TIME-VALUE, if given, specifies a time to format
+ 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::).
+
+ (current-time-string)
+ => "Wed Oct 14 22:21:05 1987"
+
+ - Function: current-time
+ This function returns the system's time value as a list of three
+ integers: `(HIGH LOW MICROSEC)'. The integers HIGH and LOW
+ combine to give the number of seconds since 0:00 January 1, 1970,
+ which is HIGH * 2**16 + LOW.
+
+ The third element, MICROSEC, gives the microseconds since the
+ start of the current second (or 0 for systems that return time
+ only on the resolution of a second).
+
+ The first two elements can be compared with file time values such
+ as you get with the function `file-attributes'. *Note File
+ Attributes::.
+
+ - Function: current-time-zone &optional time-value
+ This function returns a list describing the time zone that the
+ user is in.
+
+ The value has the form `(OFFSET NAME)'. Here OFFSET is an integer
+ giving the number of seconds ahead of UTC (east of Greenwich). A
+ negative value means west of Greenwich. The second element, NAME
+ is a string giving the name of the time zone. Both elements
+ change when daylight savings time begins or ends; if the user has
+ specified a time zone that does not use a seasonal time
+ adjustment, then the value is constant through time.
+
+ If the operating system doesn't supply all the information
+ necessary to compute the value, both elements of the list are
+ `nil'.
+
+ The argument TIME-VALUE, if given, specifies a time to analyze
+ 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::).
+
+\1f
+File: lispref.info, Node: Time Conversion, Next: Timers, Prev: Time of Day, Up: System Interface
+
+Time Conversion
+===============
+
+ These functions convert time values (lists of two or three integers)
+to strings or to calendrical information. There is also a function to
+convert calendrical information to a time value. You can get time
+values from the functions `current-time' (*note Time of Day::) and
+`file-attributes' (*note File Attributes::).
+
+ - 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
+ say to substitute parts of the time. Here is a table of what the
+ `%'-sequences mean:
+
+ `%a'
+ This stands for the abbreviated name of the day of week.
+
+ `%A'
+ This stands for the full name of the day of week.
+
+ `%b'
+ This stands for the abbreviated name of the month.
+
+ `%B'
+ This stands for the full name of the month.
+
+ `%c'
+ This is a synonym for `%x %X'.
+
+ `%C'
+ This has a locale-specific meaning. In the default locale
+ (named C), it is equivalent to `%A, %B %e, %Y'.
+
+ `%d'
+ This stands for the day of month, zero-padded.
+
+ `%D'
+ This is a synonym for `%m/%d/%y'.
+
+ `%e'
+ This stands for the day of month, blank-padded.
+
+ `%h'
+ This is a synonym for `%b'.
+
+ `%H'
+ This stands for the hour (00-23).
+
+ `%I'
+ This stands for the hour (00-12).
+
+ `%j'
+ This stands for the day of the year (001-366).
+
+ `%k'
+ This stands for the hour (0-23), blank padded.
+
+ `%l'
+ This stands for the hour (1-12), blank padded.
+
+ `%m'
+ This stands for the month (01-12).
+
+ `%M'
+ This stands for the minute (00-59).
+
+ `%n'
+ This stands for a newline.
+
+ `%p'
+ This stands for `AM' or `PM', as appropriate.
+
+ `%r'
+ This is a synonym for `%I:%M:%S %p'.
+
+ `%R'
+ This is a synonym for `%H:%M'.
+
+ `%S'
+ This stands for the seconds (00-60).
+
+ `%t'
+ This stands for a tab character.
+
+ `%T'
+ This is a synonym for `%H:%M:%S'.
+
+ `%U'
+ This stands for the week of the year (01-52), assuming that
+ weeks start on Sunday.
+
+ `%w'
+ This stands for the numeric day of week (0-6). Sunday is day
+ 0.
+
+ `%W'
+ This stands for the week of the year (01-52), assuming that
+ weeks start on Monday.
+
+ `%x'
+ This has a locale-specific meaning. In the default locale
+ (named C), it is equivalent to `%D'.
+
+ `%X'
+ This has a locale-specific meaning. In the default locale
+ (named C), it is equivalent to `%T'.
+
+ `%y'
+ This stands for the year without century (00-99).
+
+ `%Y'
+ This stands for the year with century.
+
+ `%Z'
+ This stands for the time zone abbreviation.
+
+ - Function: decode-time time
+ This function converts a time value into calendrical information.
+ The return value is a list of nine elements, as follows:
+
+ (SECONDS MINUTES HOUR DAY MONTH YEAR DOW DST ZONE)
+
+ Here is what the elements mean:
+
+ SEC
+ The number of seconds past the minute, as an integer between
+ 0 and 59.
+
+ MINUTE
+ The number of minutes past the hour, as an integer between 0
+ and 59.
+
+ HOUR
+ The hour of the day, as an integer between 0 and 23.
+
+ DAY
+ The day of the month, as an integer between 1 and 31.
+
+ MONTH
+ The month of the year, as an integer between 1 and 12.
+
+ YEAR
+ The year, an integer typically greater than 1900.
+
+ DOW
+ The day of week, as an integer between 0 and 6, where 0
+ stands for Sunday.
+
+ DST
+ `t' if daylight savings time is effect, otherwise `nil'.
+
+ ZONE
+ An integer indicating the time zone, as the number of seconds
+ east of Greenwich.
+
+ Note that Common Lisp has different meanings for DOW and 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'.
+
+ Year numbers less than 100 are treated just like other year
+ numbers. If you want them to stand for years above 1900, you must
+ alter them yourself before you call `encode-time'.
+
+ The optional argument ZONE defaults to the current time zone and
+ its daylight savings time rules. If specified, it can be either a
+ list (as you would get from `current-time-zone') or an integer (as
+ you would get from `decode-time'). The specified zone is used
+ without any further alteration for daylight savings time.
+
+\1f
+File: lispref.info, Node: Timers, Next: Terminal Input, Prev: Time Conversion, Up: System Interface
+
+Timers for Delayed Execution
+============================
+
+ You can set up a timer to call a function at a specified future time.
+
+ - Function: add-timeout secs function object &optional resignal
+ 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
+ seconds have elapsed, with one argument, the given OBJECT. If the
+ optional RESIGNAL argument is provided, then after this timeout
+ expires, `add-timeout' will automatically be called again with
+ RESIGNAL as the first argument.
+
+ This function returns an object which is the "id" of this
+ particular timeout. You can pass that object to `disable-timeout'
+ to turn off the timeout before it has been signalled.
+
+ The number of seconds may be expressed as a floating-point number,
+ in which case some fractional part of a second will be used.
+ Caveat: the usable timeout granularity will vary from system to
+ system.
+
+ Adding a timeout causes a timeout event to be returned by
+ `next-event', and the function will be invoked by
+ `dispatch-event', so if XEmacs is in a tight loop, the function
+ will not be invoked until the next call to sit-for or until the
+ return to top-level (the same is true of process filters).
+
+ WARNING: if you are thinking of calling add-timeout from inside of
+ a callback function as a way of resignalling a timeout, think
+ again. There is a race condition. That's why the RESIGNAL
+ argument exists.
+
+ (NOTE: In FSF Emacs, this function is called `run-at-time' and has
+ different semantics.)
+
+ - 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
+ not cause anything special to happen. (NOTE: In FSF Emacs, this
+ function is called `cancel-timer'.)
+
+\1f
+File: lispref.info, Node: Terminal Input, Next: Terminal Output, Prev: Timers, Up: System Interface
+
+Terminal Input
+==============
+
+ This section describes functions and variables for recording or
+manipulating terminal input. See *Note Display::, for related
+functions.
+
+* Menu:
+
+* Input Modes:: Options for how input is processed.
+* Translating Input:: Low level conversion of some characters or events
+ into others.
+* Recording Input:: Saving histories of recent or all input events.
+
+\1f
+File: lispref.info, Node: Input Modes, Next: Translating Input, Up: Terminal Input
+
+Input Modes
+-----------
+
+ - 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
+ directly with X, it ignores this argument and uses interrupts if
+ that is the way it knows how to communicate.
+
+ If FLOW is non-`nil', then XEmacs uses XON/XOFF (`C-q', `C-s')
+ flow control for output to the terminal. This has no effect except
+ in CBREAK mode. *Note Flow Control::.
+
+ The default setting is system dependent. Some systems always use
+ CBREAK mode regardless of what is specified.
+
+ The argument META controls support for input character codes above
+ 127. If META is `t', XEmacs converts characters with the 8th bit
+ set into Meta characters. If META is `nil', XEmacs disregards the
+ 8th bit; this is necessary when the terminal uses it as a parity
+ bit. If META is neither `t' nor `nil', XEmacs uses all 8 bits of
+ input unchanged. This is good for terminals using European 8-bit
+ character sets.
+
+ If QUIT-CHAR is non-`nil', it specifies the character to use for
+ quitting. Normally this character is `C-g'. *Note Quitting::.
+
+ The `current-input-mode' function returns the input mode settings
+XEmacs is currently using.
+
+ - Function: current-input-mode
+ This function returns current mode for reading keyboard input. It
+ returns a list, corresponding to the arguments of `set-input-mode',
+ of the form `(INTERRUPT FLOW META QUIT)' in which:
+ INTERRUPT
+ is non-`nil' when XEmacs is using interrupt-driven input. If
+ `nil', Emacs is using CBREAK mode.
+
+ FLOW
+ is non-`nil' if XEmacs uses XON/XOFF (`C-q', `C-s') flow
+ control for output to the terminal. This value has no effect
+ unless INTERRUPT is non-`nil'.
+
+ META
+ is `t' if XEmacs treats the eighth bit of input characters as
+ the meta bit; `nil' means XEmacs clears the eighth bit of
+ every input character; any other value means XEmacs uses all
+ eight bits as the basic character code.
+
+ QUIT
+ is the character XEmacs currently uses for quitting, usually
+ `C-g'.
+
+\1f
+File: lispref.info, Node: Translating Input, Next: Recording Input, Prev: Input Modes, Up: Terminal Input
+
+Translating Input Events
+------------------------
+
+ This section describes features for translating input events into
+other input events before they become part of key sequences.
+
+ - Variable: function-key-map
+ This variable holds a keymap that describes the character sequences
+ sent by function keys on an ordinary character terminal. This
+ keymap uses the same data structure as other keymaps, but is used
+ differently: it specifies translations to make while reading
+ 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
+ is replaced with the events in V.
+
+ For example, VT100 terminals send `<ESC> O P' when the keypad PF1
+ key is pressed. Therefore, we want XEmacs to translate that
+ sequence of events into the single event `pf1'. We accomplish
+ this by "binding" `<ESC> O P' to `[pf1]' in `function-key-map',
+ when using a VT100.
+
+ Thus, typing `C-c <PF1>' sends the character sequence `C-c <ESC> O
+ P'; later the function `read-key-sequence' translates this back
+ into `C-c <PF1>', which it returns as the vector `[?\C-c pf1]'.
+
+ Entries in `function-key-map' are ignored if they conflict with
+ bindings made in the minor mode, local, or global keymaps. The
+ intent is that the character sequences that function keys send
+ should not have command bindings in their own right.
+
+ The value of `function-key-map' is usually set up automatically
+ according to the terminal's Terminfo or Termcap entry, but
+ sometimes those need help from terminal-specific Lisp files.
+ XEmacs comes with terminal-specific files for many common
+ terminals; their main purpose is to make entries in
+ `function-key-map' beyond those that can be deduced from Termcap
+ and Terminfo. *Note Terminal-Specific::.
+
+ Emacs versions 18 and earlier used totally different means of
+ detecting the character sequences that represent function keys.
+
+ - Variable: key-translation-map
+ This variable is another keymap used just like `function-key-map'
+ to translate input events into other events. It differs from
+ `function-key-map' in two ways:
+
+ * `key-translation-map' goes to work after `function-key-map' is
+ finished; it receives the results of translation by
+ `function-key-map'.
+
+ * `key-translation-map' overrides actual key bindings.
+
+ The intent of `key-translation-map' is for users to map one
+ character set to another, including ordinary characters normally
+ bound to `self-insert-command'.
+
+ You can use `function-key-map' or `key-translation-map' for more
+than simple aliases, by using a function, instead of a key sequence, as
+the "translation" of a key. Then this function is called to compute
+the translation of that key.
+
+ The key translation function receives one argument, which is the
+prompt that was specified in `read-key-sequence'--or `nil' if the key
+sequence is being read by the editor command loop. In most cases you
+can ignore the prompt value.
+
+ If the function reads input itself, it can have the effect of
+altering the event that follows. For example, here's how to define
+`C-c h' to turn the character that follows into a Hyper character:
+
+ (defun hyperify (prompt)
+ (let ((e (read-event)))
+ (vector (if (numberp e)
+ (logior (lsh 1 20) e)
+ (if (memq 'hyper (event-modifiers e))
+ e
+ (add-event-modifier "H-" e))))))
+
+ (defun add-event-modifier (string e)
+ (let ((symbol (if (symbolp e) e (car e))))
+ (setq symbol (intern (concat string
+ (symbol-name symbol))))
+ (if (symbolp e)
+ symbol
+ (cons symbol (cdr e)))))
+
+ (define-key function-key-map "\C-ch" 'hyperify)
+
+ The `iso-transl' library uses this feature to provide a way of
+inputting non-ASCII Latin-1 characters.
+
+\1f
+File: lispref.info, Node: Recording Input, Prev: Translating Input, Up: Terminal Input
+
+Recording Input
+---------------
+
+ - 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.
+
+ All input events are included, whether or not they were used as
+ parts of key sequences. Thus, you always get the last 100 inputs,
+ not counting keyboard macros. (Events from keyboard macros are
+ excluded because they are less interesting for debugging; it
+ should be enough to see the events that invoked the macros.)
+
+ If NUMBER is specified, not more than NUMBER events will be
+ returned. You may change the number of stored events using
+ `set-recent-keys-ring-size'.
+
+ - Function: recent-keys-ring-size
+ This function returns the number of recent events stored
+ 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
+ This function changes the number of events stored by XEmacs and
+ returned by `recent-keys'.
+
+ For example, `(set-recent-keys-ring-size 250)' will make XEmacs
+ remember last 250 events and will make `recent-keys' return last
+ 250 events by default.
+
+ - 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
+ non-character event is expressed using its printed representation
+ surrounded by `<...>'.
+
+ You close the dribble file by calling this function with an
+ argument of `nil'.
+
+ This function is normally used to record the input necessary to
+ trigger an XEmacs bug, for the sake of a bug report.
+
+ (open-dribble-file "~/dribble")
+ => nil
+
+ See also the `open-termscript' function (*note Terminal Output::).
+
+\1f
File: lispref.info, Node: Terminal Output, Next: Flow Control, Prev: Terminal Input, Up: System Interface
Terminal Output
(let ((m (make-tooltalk-message random-query-message)))
(send-tooltalk-message m))
-\1f
-File: lispref.info, Node: Elisp Interface for Sending Messages, Prev: Example of Sending Messages, Up: Sending Messages
-
-Elisp Interface for Sending Messages
-------------------------------------
-
- - 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.
- For example:
-
- (make-tooltalk-message
- '(class TT_NOTICE
- scope TT_SESSION
- address TT_PROCEDURE
- op "do-something"
- args ("arg1" 12345 (TT_INOUT "arg3" "string"))))
-
- Values must always be strings, integers, or symbols that represent
- ToolTalk constants. Attribute names are the same as those
- supported by `set-tooltalk-message-attribute', plus `args'.
-
- The value of `args' should be a list of message arguments where
- each message argument has the following form:
-
- `(mode [value [type]])' or just `value'
-
- Where MODE is one of `TT_IN', `TT_OUT', or `TT_INOUT' and TYPE is
- a string. If TYPE isn't specified then `int' is used if VALUE is
- a number; otherwise `string' is used. If TYPE is `string' then
- VALUE is converted to a string (if it isn't a string already) with
- `prin1-to-string'. If only a value is specified then MODE
- defaults to `TT_IN'. If MODE is `TT_OUT' then VALUE and TYPE
- don't need to be specified. You can find out more about the
- semantics and uses of ToolTalk message arguments in chapter 4 of
- the `ToolTalk Programmer's Guide'.
-
-
- - 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
- 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
- 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
- extracts the value. String attribute values are copied and
- enumerated type values (except disposition) are converted to
- symbols; e.g. `TT_HANDLER' is `'TT_HANDLER', `uid' and `gid' are
- represented by fixnums (small integers), `opnum' is converted to a
- string, and `disposition' is converted to a fixnum. We convert
- `opnum' (a C int) to a string (e.g. `123' => `"123"') because
- there's no guarantee that opnums will fit within the range of
- XEmacs Lisp integers.
-
- [TBD] Use the `plist' attribute instead of C API `user' attribute
- for user-defined message data. To retrieve the value of a message
- property, specify the indicator for ARGN. For example, to get the
- value of a property called `rflag', use
-
- (get-tooltalk-message-attribute msg 'plist 'rflag)
-
- To get the value of a message argument use one of the `arg_val'
- (strings), `arg_ival' (integers), or `arg_bval' (strings with
- embedded nulls), attributes. For example, to get the integer
- value of the third argument:
-
- (get-tooltalk-message-attribute msg 'arg_ival 2)
-
- As you can see, argument numbers are zero-based. The type of each
- arguments can be retrieved with the `arg_type' attribute; however
- ToolTalk doesn't define any semantics for the string value of
- `arg_type'. Conventionally `string' is used for strings and `int'
- for 32 bit integers. Note that XEmacs Lisp stores the lengths of
- strings explicitly (unlike C) so treating the value returned by
- `arg_bval' like a string is fine.
-
-
- - Function: set-tooltalk-message-attribute value msg attribute
- &optional argn
- Initialize one ToolTalk message attribute.
-
- Attribute names and values are the same as for
- `get-tooltalk-message-attribute'. A property list is provided for
- user data (instead of the `user' message attribute); see
- `get-tooltalk-message-attribute'.
-
- Callbacks are handled slightly differently than in the C ToolTalk
- API. The value of CALLBACK should be the name of a function of one
- argument. It will be called each time the state of the message
- changes. This is usually used to notice when the message's state
- has changed to `TT_HANDLED' (or `TT_FAILED'), so that reply
- argument values can be used.
-
- If one of the argument attributes is specified as `arg_val',
- `arg_ival', or `arg_bval', then ARGN must be the number of an
- already created argument. Arguments can be added to a message
- with `add-tooltalk-message-arg'.
-
-
- - 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
- semantics for TYPE, so only the participants in the protocol
- you're using need to agree what types mean (if anything).
- Conventionally `string' is used for strings and `int' for 32 bit
- integers. Arguments can initialized by providing a value or with
- `set-tooltalk-message-attribute'; the latter is necessary if you
- want to initialize the argument with a string that can contain
- embedded nulls (use `arg_bval').
-
-
- - Function: create-tooltalk-message
- Create a new ToolTalk message. The message's session attribute is
- initialized to the default session. Other attributes can be
- initialized with `set-tooltalk-message-attribute'.
- `make-tooltalk-message' is the preferred way to create and
- initialize a message.
-
-
- - 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
- for you.
-
-\1f
-File: lispref.info, Node: Receiving Messages, Prev: Sending Messages, Up: ToolTalk Support
-
-Receiving Messages
-==================
-
-* Menu:
-
-* Example of Receiving Messages::
-* Elisp Interface for Receiving Messages::
-
-\1f
-File: lispref.info, Node: Example of Receiving Messages, Next: Elisp Interface for Receiving Messages, Up: Receiving Messages
-
-Example of Receiving Messages
------------------------------
-
- Here's a simple example of a handler for a message that tells XEmacs
-to display a string in the mini-buffer area. The message operation is
-called `emacs-display-string'. Its first (0th) argument is the string
-to display.
-
- (defun tooltalk-display-string-handler (msg)
- (message (get-tooltalk-message-attribute msg 'arg_val 0)))
-
- (defvar display-string-pattern
- '(category TT_HANDLE
- scope TT_SESSION
- op "emacs-display-string"
- callback tooltalk-display-string-handler))
-
- (let ((p (make-tooltalk-pattern display-string-pattern)))
- (register-tooltalk-pattern p))
-
-\1f
-File: lispref.info, Node: Elisp Interface for Receiving Messages, Prev: Example of Receiving Messages, Up: Receiving Messages
-
-Elisp Interface for Receiving Messages
---------------------------------------
-
- - 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
- lists of valid attributes. For example:
-
- (make-tooltalk-pattern
- '(category TT_OBSERVE
- scope TT_SESSION
- op ("operation1" "operation2")
- args ("arg1" 12345 (TT_INOUT "arg3" "string"))))
-
- Attribute names are the same as those supported by
- `add-tooltalk-pattern-attribute', plus `'args'.
-
- Values must always be strings, integers, or symbols that represent
- ToolTalk constants or lists of same. When a list of values is
- provided all of the list elements are added to the attribute. In
- the example above, messages whose `op' attribute is `"operation1"'
- or `"operation2"' would match the pattern.
-
- The value of ARGS should be a list of pattern arguments where each
- pattern argument has the following form:
-
- `(mode [value [type]])' or just `value'
-
- Where MODE is one of `TT_IN', `TT_OUT', or `TT_INOUT' and TYPE is
- a string. If TYPE isn't specified then `int' is used if VALUE is
- a number; otherwise `string' is used. If TYPE is `string' then
- VALUE is converted to a string (if it isn't a string already) with
- `prin1-to-string'. If only a value is specified then MODE
- defaults to `TT_IN'. If MODE is `TT_OUT' then VALUE and TYPE
- don't need to be specified. You can find out more about the
- semantics and uses of ToolTalk pattern arguments in chapter 3 of
- the `ToolTalk Programmer's Guide'.
-
-
- - Function: register-tooltalk-pattern pat
- XEmacs will begin receiving messages that match this pattern.
-
- - Function: unregister-tooltalk-pattern pat
- XEmacs will stop receiving messages that match this pattern.
-
- - 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
- example, the name of the attribute for the
- `tt_pattern_disposition_add' attribute is `disposition'. The
- `category' attribute is handled specially, since a pattern can only
- be a member of one category (`TT_OBSERVE' or `TT_HANDLE').
-
- Callbacks are handled slightly differently than in the C ToolTalk
- API. The value of CALLBACK should be the name of a function of one
- argument. It will be called each time the pattern matches an
- incoming message.
-
- - 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
- integer then an integer argument (`tt_pattern_iarg_add') is added;
- otherwise a string argument is added. At present there's no way
- to add a binary data argument.
-
-
- - Function: create-tooltalk-pattern
- Create a new ToolTalk pattern and initialize its session attribute
- to be the default session.
-
- - Function: destroy-tooltalk-pattern pat
- Apply `tt_pattern_destroy' to the pattern. This effectively
- unregisters the pattern.
-
- - Function: describe-tooltalk-message msg &optional stream
- Print the message's attributes and arguments to STREAM. This is
- often useful for debugging.
-
-\1f
-File: lispref.info, Node: LDAP Support, Next: Internationalization, Prev: ToolTalk Support, Up: Top
-
-LDAP Support
-************
-
- XEmacs can be linked with a LDAP client library to provide Elisp
-primitives to access directory servers using the Lightweight Directory
-Access Protocol.
-
-* Menu:
-
-* Building XEmacs with LDAP support:: How to add LDAP support to XEmacs
-* XEmacs LDAP API:: Lisp access to LDAP functions
-* Syntax of Search Filters:: A brief summary of RFC 1558
-
-\1f
-File: lispref.info, Node: Building XEmacs with LDAP support, Next: XEmacs LDAP API, Prev: LDAP Support, Up: LDAP Support
-
-Building XEmacs with LDAP support
-=================================
-
- LDAP support must be added to XEmacs at build time since it requires
-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/>)
-
- * University of Michigan's LDAP 3.3
- (<http://www.umich.edu/~dirsvcs/ldap/>)
-
- * 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.
-
- The standard XEmacs configure script autodetects an installed LDAP
-library provided the library itself and the corresponding header files
-can be found in the library and include paths. A successful detection
-will be signalled in the final output of the configure script.
-
-\1f
-File: lispref.info, Node: XEmacs LDAP API, Next: Syntax of Search Filters, Prev: Building XEmacs with LDAP support, Up: LDAP Support
-
-XEmacs LDAP API
-===============
-
- XEmacs LDAP API consists of two layers: a low-level layer which
-tries to stay as close as possible to the C API (where practical) and a
-higher-level layer which provides more convenient primitives to
-effectively use LDAP.
-
- As of XEmacs 21.0, only interfaces to basic LDAP search functions are
-provided, broader support is planned in future versions.
-
-* Menu:
-
-* LDAP Variables:: Lisp variables related to LDAP
-* The High-Level LDAP API:: High-level LDAP lisp functions
-* The Low-Level LDAP API:: Low-level LDAP lisp primitives
-
-\1f
-File: lispref.info, Node: LDAP Variables, Next: The High-Level LDAP API, Prev: XEmacs LDAP API, Up: XEmacs LDAP API
-
-LDAP Variables
---------------
-
- - Variable: ldap-default-host
- The default LDAP server hostname. A TCP port number can be
- appended to that name using a colon as a separator.
-
- - Variable: ldap-default-port
- Default TCP port for LDAP connections. Initialized from the LDAP
- library. Default value is 389.
-
- - Variable: ldap-default-base
- Default base for LDAP searches. This is a string using the syntax
- of RFC 1779. For instance, "o¬ME, cÿ" limits the search to the
- Acme organization in the United States.
-
- - 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
- 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
- properties:
- `binddn'
- The distinguished name of the user to bind as. This may look
- like `cÿ, o¬me, cnÿnny Bugs', see RFC 1779 for details.
-
- `passwd'
- The password to use for authentication.
-
- `auth'
- The authentication method to use, possible values depend on
- the LDAP library XEmacs was compiled with, they may include
- `simple', `krbv41' and `krbv42'.
-
- `base'
- The base for the search. This may look like `cÿ, o¬me', see
- RFC 1779 for syntax details.
-
- `scope'
- 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.
-
- `deref'
- The dereference policy is one of the symbols `never',
- `always', `search' or `find' and defines how aliases are
- dereferenced.
- `never'
- Aliases are never dereferenced
-
- `always'
- Aliases are always dereferenced
-
- `search'
- Aliases are dereferenced when searching
-
- `find'
- Aliases are dereferenced when locating the base object
- for the search
-
- `timelimit'
- The timeout limit for the connection in seconds.
-
- `sizelimit'
- The maximum number of matches to return for searches
- performed on this connection.
-
-\1f
-File: lispref.info, Node: The High-Level LDAP API, Next: The Low-Level LDAP API, Prev: LDAP Variables, Up: XEmacs LDAP API
-
-The High-Level LDAP API
------------------------
-
- As of this writing the high-level Lisp LDAP API only provides for
-LDAP searches. Further support is planned in the future.
-
- The `ldap-search' function provides the most convenient interface to
-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::
-
- - 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'.
-
-\1f
-File: lispref.info, Node: The Low-Level LDAP API, Prev: The High-Level LDAP API, Up: XEmacs LDAP API
-
-The Low-Level LDAP API
-----------------------
-
-* Menu:
-
-* The LDAP Lisp Object::
-* Opening and Closing a LDAP Connection::
-* Searching on a LDAP Server (Low-level)::
-
-\1f
-File: lispref.info, Node: The LDAP Lisp Object, Next: Opening and Closing a LDAP Connection, Prev: The Low-Level LDAP API, Up: The Low-Level LDAP API
-
-The LDAP Lisp Object
-....................
-
- An internal built-in `ldap' lisp object represents a LDAP connection.
-
- - Function: ldapp object
- This function returns non-`nil' if OBJECT is a `ldap' object.
-
- - Function: ldap-host ldap
- Return the server host of the connection represented by LDAP
-
- - Function: ldap-live-p ldap
- Return non-`nil' if LDAP is an active LDAP connection
-
-\1f
-File: lispref.info, Node: Opening and Closing a LDAP Connection, Next: Searching on a LDAP Server (Low-level), Prev: The LDAP Lisp Object, Up: The Low-Level LDAP API
-
-Opening and Closing a LDAP Connection
-.....................................
-
- - 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:
- `port'
- The TCP port to use for the connection if different from
- `ldap-default-port' or the library builtin value
-
- `auth'
- The authentication method to use, possible values depend on
- the LDAP library XEmacs was compiled with, they may include
- `simple', `krbv41' and `krbv42'.
-
- `binddn'
- The distinguished name of the user to bind as. This may look
- like `cÿ, o¬me, cnÿnny Bugs', see RFC 1779 for details.
-
- `passwd'
- The password to use for authentication.
-
- `deref'
- The dereference policy is one of the symbols `never',
- `always', `search' or `find' and defines how aliases are
- dereferenced.
- `never'
- Aliases are never dereferenced
-
- `always'
- Aliases are always dereferenced
-
- `search'
- Aliases are dereferenced when searching
-
- `find'
- Aliases are dereferenced when locating the base object
- for the search The default is `never'.
-
- `timelimit'
- The timeout limit for the connection in seconds.
-
- `sizelimit'
- The maximum number of matches to return for searches
- performed on this connection.
-
- - Function: ldap-close ldap
- Close the connection represented by LDAP
-
-\1f
-File: lispref.info, Node: Searching on a LDAP Server (Low-level), Prev: Opening and Closing a LDAP Connection, Up: The Low-Level LDAP API
-
-Searching on a LDAP Server (Low-level)
-......................................
-
- `ldap-search-internal' is the low-level primitive to perform a
-search on a LDAP server. It works directly on an open LDAP connection
-thus requiring a preliminary call to `ldap-open'. Multiple searches
-can be made on the same connection, then the session must be closed
-with `ldap-close'.
-
- - Function: ldap-search-internal ldap filter base scope attrs attrsonly
- 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',
- `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
- which attributes to retrieve for each matching entry. If `nil' all
- available attributes are returned. If `attrsonly' is non-`nil'
- then only the attributes are retrieved, not their associated values
- The function returns a list of matching entries. Each entry being
- itself an alist of attribute/values.
-
-\1f
-File: lispref.info, Node: Syntax of Search Filters, Prev: XEmacs LDAP API, Up: LDAP Support
-
-Syntax of Search Filters
-========================
-
- LDAP search functions use RFC1558 syntax to describe the search
-filter. In that syntax simple filters have the form:
-
- (<attr> <filtertype> <value>)
-
- `<attr>' is an attribute name such as `cn' for Common Name, `o' for
-Organization, etc...
-
- `<value>' is the corresponding value. This is generally an exact
-string but may also contain `*' characters as wildcards
-
- `filtertype' is one `=' `~=', `<=', `>=' which respectively describe
-equality, approximate equality, inferiority and superiority.
-
- Thus `(cn=John Smith)' matches all records having a canonical name
-equal to John Smith.
-
- A special case is the presence filter `(<attr>=*' which matches
-records containing a particular attribute. For instance `(mail=*)'
-matches all records containing a `mail' attribute.
-
- Simple filters can be connected together with the logical operators
-`&', `|' and `!' which stand for the usual and, or and not operators.
-
- `(&(objectClass=Person)(mail=*)(|(sn=Smith)(givenname=John)))'
-matches records of class `Person' containing a `mail' attribute and
-corresponding to people whose last name is `Smith' or whose first name
-is `John'.
-
-\1f
-File: lispref.info, Node: Internationalization, Next: MULE, Prev: LDAP Support, Up: Top
-
-Internationalization
-********************
-
-* Menu:
-
-* I18N Levels 1 and 2:: Support for different time, date, and currency formats.
-* I18N Level 3:: Support for localized messages.
-* I18N Level 4:: Support for Asian languages.
-
-\1f
-File: lispref.info, Node: I18N Levels 1 and 2, Next: I18N Level 3, Up: Internationalization
-
-I18N Levels 1 and 2
-===================
-
- XEmacs is now compliant with I18N levels 1 and 2. Specifically,
-this means that it is 8-bit clean and correctly handles time and date
-functions. XEmacs will correctly display the entire ISO-Latin 1
-character set.
-
- The compose key may now be used to create any character in the
-ISO-Latin 1 character set not directly available via the keyboard.. In
-order for the compose key to work it is necessary to load the file
-`x-compose.el'. At any time while composing a character, `C-h' will
-display all valid completions and the character which would be produced.
-
-\1f
-File: lispref.info, Node: I18N Level 3, Next: I18N Level 4, Prev: I18N Levels 1 and 2, Up: Internationalization
-
-I18N Level 3
-============
-
-* Menu:
-
-* Level 3 Basics::
-* Level 3 Primitives::
-* Dynamic Messaging::
-* Domain Specification::
-* Documentation String Extraction::
-
Foundation instead of in the original English.
\1f
-File: lispref.info, Node: Level 3 Basics, Next: Level 3 Primitives, Up: I18N Level 3
-
-Level 3 Basics
---------------
-
- XEmacs now provides alpha-level functionality for I18N Level 3.
-This means that everything necessary for full messaging is available,
-but not every file has been converted.
-
- The two message files which have been created are `src/emacs.po' and
-`lisp/packages/mh-e.po'. Both files need to be converted using
-`msgfmt', and the resulting `.mo' files placed in some locale's
-`LC_MESSAGES' directory. The test "translations" in these files are
-the original messages prefixed by `TRNSLT_'.
-
- The domain for a variable is stored on the variable's property list
-under the property name VARIABLE-DOMAIN. The function
-`documentation-property' uses this information when translating a
-variable's documentation.
+File: lispref.info, Node: Elisp Interface for Sending Messages, Prev: Example of Sending Messages, Up: Sending Messages
+
+Elisp Interface for Sending Messages
+------------------------------------
+
+ - 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.
+ For example:
+
+ (make-tooltalk-message
+ '(class TT_NOTICE
+ scope TT_SESSION
+ address TT_PROCEDURE
+ op "do-something"
+ args ("arg1" 12345 (TT_INOUT "arg3" "string"))))
+
+ Values must always be strings, integers, or symbols that represent
+ ToolTalk constants. Attribute names are the same as those
+ supported by `set-tooltalk-message-attribute', plus `args'.
+
+ The value of `args' should be a list of message arguments where
+ each message argument has the following form:
+
+ `(mode [value [type]])' or just `value'
+
+ Where MODE is one of `TT_IN', `TT_OUT', or `TT_INOUT' and TYPE is
+ a string. If TYPE isn't specified then `int' is used if VALUE is
+ a number; otherwise `string' is used. If TYPE is `string' then
+ VALUE is converted to a string (if it isn't a string already) with
+ `prin1-to-string'. If only a value is specified then MODE
+ defaults to `TT_IN'. If MODE is `TT_OUT' then VALUE and TYPE
+ don't need to be specified. You can find out more about the
+ semantics and uses of ToolTalk message arguments in chapter 4 of
+ the `ToolTalk Programmer's Guide'.
+
+
+ - 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
+ 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
+ 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
+ extracts the value. String attribute values are copied and
+ enumerated type values (except disposition) are converted to
+ symbols; e.g. `TT_HANDLER' is `'TT_HANDLER', `uid' and `gid' are
+ represented by fixnums (small integers), `opnum' is converted to a
+ string, and `disposition' is converted to a fixnum. We convert
+ `opnum' (a C int) to a string (e.g. `123' => `"123"') because
+ there's no guarantee that opnums will fit within the range of
+ XEmacs Lisp integers.
+
+ [TBD] Use the `plist' attribute instead of C API `user' attribute
+ for user-defined message data. To retrieve the value of a message
+ property, specify the indicator for ARGN. For example, to get the
+ value of a property called `rflag', use
+
+ (get-tooltalk-message-attribute msg 'plist 'rflag)
+
+ To get the value of a message argument use one of the `arg_val'
+ (strings), `arg_ival' (integers), or `arg_bval' (strings with
+ embedded nulls), attributes. For example, to get the integer
+ value of the third argument:
+
+ (get-tooltalk-message-attribute msg 'arg_ival 2)
+
+ As you can see, argument numbers are zero-based. The type of each
+ arguments can be retrieved with the `arg_type' attribute; however
+ ToolTalk doesn't define any semantics for the string value of
+ `arg_type'. Conventionally `string' is used for strings and `int'
+ for 32 bit integers. Note that XEmacs Lisp stores the lengths of
+ strings explicitly (unlike C) so treating the value returned by
+ `arg_bval' like a string is fine.
+
+
+ - Function: set-tooltalk-message-attribute value msg attribute
+ &optional argn
+ Initialize one ToolTalk message attribute.
+
+ Attribute names and values are the same as for
+ `get-tooltalk-message-attribute'. A property list is provided for
+ user data (instead of the `user' message attribute); see
+ `get-tooltalk-message-attribute'.
+
+ Callbacks are handled slightly differently than in the C ToolTalk
+ API. The value of CALLBACK should be the name of a function of one
+ argument. It will be called each time the state of the message
+ changes. This is usually used to notice when the message's state
+ has changed to `TT_HANDLED' (or `TT_FAILED'), so that reply
+ argument values can be used.
+
+ If one of the argument attributes is specified as `arg_val',
+ `arg_ival', or `arg_bval', then ARGN must be the number of an
+ already created argument. Arguments can be added to a message
+ with `add-tooltalk-message-arg'.
+
+
+ - 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
+ semantics for TYPE, so only the participants in the protocol
+ you're using need to agree what types mean (if anything).
+ Conventionally `string' is used for strings and `int' for 32 bit
+ integers. Arguments can initialized by providing a value or with
+ `set-tooltalk-message-attribute'; the latter is necessary if you
+ want to initialize the argument with a string that can contain
+ embedded nulls (use `arg_bval').
+
+
+ - Function: create-tooltalk-message
+ Create a new ToolTalk message. The message's session attribute is
+ initialized to the default session. Other attributes can be
+ initialized with `set-tooltalk-message-attribute'.
+ `make-tooltalk-message' is the preferred way to create and
+ initialize a message.
+
+
+ - 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
+ for you.
\1f
-File: lispref.info, Node: Level 3 Primitives, Next: Dynamic Messaging, Prev: Level 3 Basics, Up: I18N Level 3
-
-Level 3 Primitives
-------------------
-
- - 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
- 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
- This function associates a pathname with a message domain. Here's
- how the path to message file is constructed under SunOS 5.x:
-
- `{pathname}/{LANG}/LC_MESSAGES/{domain}.mo'
-
- If `I18N3' was not enabled when XEmacs was compiled, this function
- does nothing.
+File: lispref.info, Node: Receiving Messages, Prev: Sending Messages, Up: ToolTalk Support
- - Special Form: domain string
- This function specifies the text domain used for translating
- documentation strings and interactive prompts of a function. For
- example, write:
+Receiving Messages
+==================
- (defun foo (arg) "Doc string" (domain "emacs-foo") ...)
-
- to specify `emacs-foo' as the text domain of the function `foo'.
- The "call" to `domain' is actually a declaration rather than a
- function; when actually called, `domain' just returns `nil'.
-
- - 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'.
-
-\1f
-File: lispref.info, Node: Dynamic Messaging, Next: Domain Specification, Prev: Level 3 Primitives, Up: I18N Level 3
-
-Dynamic Messaging
------------------
+* Menu:
- The `format' function has been extended to permit you to change the
-order of parameter insertion. For example, the conversion format
-`%1$s' inserts parameter one as a string, while `%2$s' inserts
-parameter two. This is useful when creating translations which require
-you to change the word order.
+* Example of Receiving Messages::
+* Elisp Interface for Receiving Messages::
\1f
-File: lispref.info, Node: Domain Specification, Next: Documentation String Extraction, Prev: Dynamic Messaging, Up: I18N Level 3
-
-Domain Specification
---------------------
-
- The default message domain of XEmacs is `emacs'. For add-on
-packages, it is best to use a different domain. For example, let us
-say we want to convert the "gorilla" package to use the domain
-`emacs-gorilla'. To translate the message "What gorilla?", use
-`dgettext' as follows:
-
- (dgettext "emacs-gorilla" "What gorilla?")
-
- A function (or macro) which has a documentation string or an
-interactive prompt needs to be associated with the domain in order for
-the documentation or prompt to be translated. This is done with the
-`domain' special form as follows:
+File: lispref.info, Node: Example of Receiving Messages, Next: Elisp Interface for Receiving Messages, Up: Receiving Messages
- (defun scratch (location)
- "Scratch the specified location."
- (domain "emacs-gorilla")
- (interactive "sScratch: ")
- ... )
-
- It is most efficient to specify the domain in the first line of the
-function body, before the `interactive' form.
-
- For variables and constants which have documentation strings,
-specify the domain after the documentation.
-
- - Special Form: defvar symbol [value [doc-string [domain]]]
- Example:
- (defvar weight 250 "Weight of gorilla, in pounds." "emacs-gorilla")
+Example of Receiving Messages
+-----------------------------
- - Special Form: defconst symbol [value [doc-string [domain]]]
- Example:
- (defconst limbs 4 "Number of limbs" "emacs-gorilla")
+ Here's a simple example of a handler for a message that tells XEmacs
+to display a string in the mini-buffer area. The message operation is
+called `emacs-display-string'. Its first (0th) argument is the string
+to display.
- Autoloaded functions which are specified in `loaddefs.el' do not need
-to have a domain specification, because their documentation strings are
-extracted into the main message base. However, for autoloaded functions
-which are specified in a separate package, use following syntax:
+ (defun tooltalk-display-string-handler (msg)
+ (message (get-tooltalk-message-attribute msg 'arg_val 0)))
+
+ (defvar display-string-pattern
+ '(category TT_HANDLE
+ scope TT_SESSION
+ op "emacs-display-string"
+ callback tooltalk-display-string-handler))
+
+ (let ((p (make-tooltalk-pattern display-string-pattern)))
+ (register-tooltalk-pattern p))
- - Function: autoload symbol filename &optional docstring interactive
- macro domain
- Example:
- (autoload 'explore "jungle" "Explore the jungle." nil nil "emacs-gorilla")
+\1f
+File: lispref.info, Node: Elisp Interface for Receiving Messages, Prev: Example of Receiving Messages, Up: Receiving Messages
+
+Elisp Interface for Receiving Messages
+--------------------------------------
+
+ - 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
+ lists of valid attributes. For example:
+
+ (make-tooltalk-pattern
+ '(category TT_OBSERVE
+ scope TT_SESSION
+ op ("operation1" "operation2")
+ args ("arg1" 12345 (TT_INOUT "arg3" "string"))))
+
+ Attribute names are the same as those supported by
+ `add-tooltalk-pattern-attribute', plus `'args'.
+
+ Values must always be strings, integers, or symbols that represent
+ ToolTalk constants or lists of same. When a list of values is
+ provided all of the list elements are added to the attribute. In
+ the example above, messages whose `op' attribute is `"operation1"'
+ or `"operation2"' would match the pattern.
+
+ The value of ARGS should be a list of pattern arguments where each
+ pattern argument has the following form:
+
+ `(mode [value [type]])' or just `value'
+
+ Where MODE is one of `TT_IN', `TT_OUT', or `TT_INOUT' and TYPE is
+ a string. If TYPE isn't specified then `int' is used if VALUE is
+ a number; otherwise `string' is used. If TYPE is `string' then
+ VALUE is converted to a string (if it isn't a string already) with
+ `prin1-to-string'. If only a value is specified then MODE
+ defaults to `TT_IN'. If MODE is `TT_OUT' then VALUE and TYPE
+ don't need to be specified. You can find out more about the
+ semantics and uses of ToolTalk pattern arguments in chapter 3 of
+ the `ToolTalk Programmer's Guide'.
+
+
+ - Function: register-tooltalk-pattern pat
+ XEmacs will begin receiving messages that match this pattern.
+
+ - Function: unregister-tooltalk-pattern pat
+ XEmacs will stop receiving messages that match this pattern.
+
+ - 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
+ example, the name of the attribute for the
+ `tt_pattern_disposition_add' attribute is `disposition'. The
+ `category' attribute is handled specially, since a pattern can only
+ be a member of one category (`TT_OBSERVE' or `TT_HANDLE').
+
+ Callbacks are handled slightly differently than in the C ToolTalk
+ API. The value of CALLBACK should be the name of a function of one
+ argument. It will be called each time the pattern matches an
+ incoming message.
+
+ - 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
+ integer then an integer argument (`tt_pattern_iarg_add') is added;
+ otherwise a string argument is added. At present there's no way
+ to add a binary data argument.
+
+
+ - Function: create-tooltalk-pattern
+ Create a new ToolTalk pattern and initialize its session attribute
+ to be the default session.
+
+ - Function: destroy-tooltalk-pattern pat
+ Apply `tt_pattern_destroy' to the pattern. This effectively
+ unregisters the pattern.
+
+ - Function: describe-tooltalk-message msg &optional stream
+ Print the message's attributes and arguments to STREAM. This is
+ often useful for debugging.
\1f
-File: lispref.info, Node: Documentation String Extraction, Prev: Domain Specification, Up: I18N Level 3
+File: lispref.info, Node: LDAP Support, Next: PostgreSQL Support, Prev: ToolTalk Support, Up: Top
-Documentation String Extraction
--------------------------------
+LDAP Support
+************
- The utility `etc/make-po' scans the file `DOC' to extract
-documentation strings and creates a message file `doc.po'. This file
-may then be inserted within `emacs.po'.
+ XEmacs can be linked with a LDAP client library to provide Elisp
+primitives to access directory servers using the Lightweight Directory
+Access Protocol.
- Currently, `make-po' is hard-coded to read from `DOC' and write to
-`doc.po'. In order to extract documentation strings from an add-on
-package, first run `make-docfile' on the package to produce the `DOC'
-file. Then run `make-po -p' with the `-p' argument to indicate that we
-are extracting documentation for an add-on package.
+* Menu:
- (The `-p' argument is a kludge to make up for a subtle difference
-between pre-loaded documentation and add-on documentation: For add-on
-packages, the final carriage returns in the strings produced by
-`make-docfile' must be ignored.)
+* Building XEmacs with LDAP support:: How to add LDAP support to XEmacs
+* XEmacs LDAP API:: Lisp access to LDAP functions
+* Syntax of Search Filters:: A brief summary of RFC 1558
\1f
-File: lispref.info, Node: I18N Level 4, Prev: I18N Level 3, Up: Internationalization
+File: lispref.info, Node: Building XEmacs with LDAP support, Next: XEmacs LDAP API, Prev: LDAP Support, Up: LDAP Support
-I18N Level 4
-============
+Building XEmacs with LDAP support
+=================================
- The Asian-language support in XEmacs is called "MULE". *Note MULE::.
+ LDAP support must be added to XEmacs at build time since it requires
+linking to an external LDAP client library. As of 21.2, XEmacs has been
+successfully built and tested with
-\1f
-File: lispref.info, Node: MULE, Next: Tips, Prev: Internationalization, Up: Top
+ * OpenLDAP 1.2 (<http://www.openldap.org/>)
-MULE
-****
+ * University of Michigan's LDAP 3.3
+ (<http://www.umich.edu/~dirsvcs/ldap/>)
- "MULE" is the name originally given to the version of GNU Emacs
-extended for multi-lingual (and in particular Asian-language) support.
-"MULE" is short for "MUlti-Lingual Emacs". It was originally called
-Nemacs ("Nihon Emacs" where "Nihon" is the Japanese word for "Japan"),
-when it only provided support for Japanese. XEmacs refers to its
-multi-lingual support as "MULE support" since it is based on "MULE".
-
-* Menu:
+ * LDAP SDK 1.0 from Netscape Corp. (<http://developer.netscape.com/>)
-* Internationalization Terminology::
- Definition of various internationalization terms.
-* Charsets:: Sets of related characters.
-* MULE Characters:: Working with characters in XEmacs/MULE.
-* Composite Characters:: Making new characters by overstriking other ones.
-* ISO 2022:: An international standard for charsets and encodings.
-* Coding Systems:: Ways of representing a string of chars using integers.
-* CCL:: A special language for writing fast converters.
-* Category Tables:: Subdividing charsets into groups.
+ Other libraries conforming to RFC 1823 will probably work also but
+may require some minor tweaking at C level.
-\1f
-File: lispref.info, Node: Internationalization Terminology, Next: Charsets, Up: MULE
-
-Internationalization Terminology
-================================
-
- In internationalization terminology, a string of text is divided up
-into "characters", which are the printable units that make up the text.
-A single character is (for example) a capital `A', the number `2', a
-Katakana character, a Kanji ideograph (an "ideograph" is a "picture"
-character, such as is used in Japanese Kanji, Chinese Hanzi, and Korean
-Hangul; typically there are thousands of such ideographs in each
-language), etc. The basic property of a character is its shape. Note
-that the same character may be drawn by two different people (or in two
-different fonts) in slightly different ways, although the basic shape
-will be the same.
-
- In some cases, the differences will be significant enough that it is
-actually possible to identify two or more distinct shapes that both
-represent the same character. For example, the lowercase letters `a'
-and `g' each have two distinct possible shapes--the `a' can optionally
-have a curved tail projecting off the top, and the `g' can be formed
-either of two loops, or of one loop and a tail hanging off the bottom.
-Such distinct possible shapes of a character are called "glyphs". The
-important characteristic of two glyphs making up the same character is
-that the choice between one or the other is purely stylistic and has no
-linguistic effect on a word (this is the reason why a capital `A' and
-lowercase `a' are different characters rather than different
-glyphs--e.g. `Aspen' is a city while `aspen' is a kind of tree).
-
- Note that "character" and "glyph" are used differently here than
-elsewhere in XEmacs.
-
- A "character set" is simply a set of related characters. ASCII, for
-example, is a set of 94 characters (or 128, if you count non-printing
-characters). Other character sets are ISO8859-1 (ASCII plus various
-accented characters and other international symbols), JISX0201 (ASCII,
-more or less, plus half-width Katakana), JISX0208 (Japanese Kanji),
-JISX0212 (a second set of less-used Japanese Kanji), GB2312 (Mainland
-Chinese Hanzi), etc.
-
- Every character set has one or more "orderings", which can be viewed
-as a way of assigning a number (or set of numbers) to each character in
-the set. For most character sets, there is a standard ordering, and in
-fact all of the character sets mentioned above define a particular
-ordering. ASCII, for example, places letters in their "natural" order,
-puts uppercase letters before lowercase letters, numbers before
-letters, etc. Note that for many of the Asian character sets, there is
-no natural ordering of the characters. The actual orderings are based
-on one or more salient characteristic, of which there are many to
-choose from--e.g. number of strokes, common radicals, phonetic
-ordering, etc.
-
- The set of numbers assigned to any particular character are called
-the character's "position codes". The number of position codes
-required to index a particular character in a character set is called
-the "dimension" of the character set. ASCII, being a relatively small
-character set, is of dimension one, and each character in the set is
-indexed using a single position code, in the range 0 through 127 (if
-non-printing characters are included) or 33 through 126 (if only the
-printing characters are considered). JISX0208, i.e. Japanese Kanji,
-has thousands of characters, and is of dimension two - every character
-is indexed by two position codes, each in the range 33 through 126.
-(Note that the choice of the range here is somewhat arbitrary.
-Although a character set such as JISX0208 defines an _ordering_ of all
-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
-through 95, etc. The reason for the actual range chosen is so that the
-position codes match up with the actual values used in the common
-encodings.)
-
- An "encoding" is a way of numerically representing characters from
-one or more character sets into a stream of like-sized numerical values
-called "words"; typically these are 8-bit, 16-bit, or 32-bit
-quantities. If an encoding encompasses only one character set, then the
-position codes for the characters in that character set could be used
-directly. (This is the case with ASCII, and as a result, most people do
-not understand the difference between a character set and an encoding.)
-This is not possible, however, if more than one character set is to be
-used in the encoding. For example, printed Japanese text typically
-requires characters from multiple character sets--ASCII, JISX0208, and
-JISX0212, to be specific. Each of these is indexed using one or more
-position codes in the range 33 through 126, so the position codes could
-not be used directly or there would be no way to tell which character
-was meant. Different Japanese encodings handle this differently--JIS
-uses special escape characters to denote different character sets; EUC
-sets the high bit of the position codes for JISX0208 and JISX0212, and
-puts a special extra byte before each JISX0212 character; etc. (JIS,
-EUC, and most of the other encodings you will encounter are 7-bit or
-8-bit encodings. There is one common 16-bit encoding, which is Unicode;
-this strives to represent all the world's characters in a single large
-character set. 32-bit encodings are generally used internally in
-programs to simplify the code that manipulates them; however, they are
-not much used externally because they are not very space-efficient.)
-
- Encodings are classified as either "modal" or "non-modal". In a
-"modal encoding", there are multiple states that the encoding can be in,
-and the interpretation of the values in the stream depends on the
-current global state of the encoding. Special values in the encoding,
-called "escape sequences", are used to change the global state. JIS,
-for example, is a modal encoding. The bytes `ESC $ B' indicate that,
-from then on, bytes are to be interpreted as position codes for
-JISX0208, rather than as ASCII. This effect is cancelled using the
-bytes `ESC ( B', which mean "switch from whatever the current state is
-to ASCII". To switch to JISX0212, the escape sequence `ESC $ ( D'.
-(Note that here, as is common, the escape sequences do in fact begin
-with `ESC'. This is not necessarily the case, however.)
-
- A "non-modal encoding" has no global state that extends past the
-character currently being interpreted. EUC, for example, is a
-non-modal encoding. Characters in JISX0208 are encoded by setting the
-high bit of the position codes, and characters in JISX0212 are encoded
-by doing the same but also prefixing the character with the byte 0x8F.
-
- The advantage of a modal encoding is that it is generally more
-space-efficient, and is easily extendable because there are essentially
-an arbitrary number of escape sequences that can be created. The
-disadvantage, however, is that it is much more difficult to work with
-if it is not being processed in a sequential manner. In the non-modal
-EUC encoding, for example, the byte 0x41 always refers to the letter
-`A'; whereas in JIS, it could either be the letter `A', or one of the
-two position codes in a JISX0208 character, or one of the two position
-codes in a JISX0212 character. Determining exactly which one is meant
-could be difficult and time-consuming if the previous bytes in the
-string have not already been processed.
-
- Non-modal encodings are further divided into "fixed-width" and
-"variable-width" formats. A fixed-width encoding always uses the same
-number of words per character, whereas a variable-width encoding does
-not. EUC is a good example of a variable-width encoding: one to three
-bytes are used per character, depending on the character set. 16-bit
-and 32-bit encodings are nearly always fixed-width, and this is in fact
-one of the main reasons for using an encoding with a larger word size.
-The advantages of fixed-width encodings should be obvious. The
-advantages of variable-width encodings are that they are generally more
-space-efficient and allow for compatibility with existing 8-bit
-encodings such as ASCII.
-
- Note that the bytes in an 8-bit encoding are often referred to as
-"octets" rather than simply as bytes. This terminology dates back to
-the days before 8-bit bytes were universal, when some computers had
-9-bit bytes, others had 10-bit bytes, etc.
+ The standard XEmacs configure script auto-detects an installed LDAP
+library provided the library itself and the corresponding header files
+can be found in the library and include paths. A successful detection
+will be signalled in the final output of the configure script.
\1f
-File: lispref.info, Node: Charsets, Next: MULE Characters, Prev: Internationalization Terminology, Up: MULE
+File: lispref.info, Node: XEmacs LDAP API, Next: Syntax of Search Filters, Prev: Building XEmacs with LDAP support, Up: LDAP Support
-Charsets
-========
+XEmacs LDAP API
+===============
- A "charset" in MULE is an object that encapsulates a particular
-character set as well as an ordering of those characters. Charsets are
-permanent objects and are named using symbols, like faces.
+ XEmacs LDAP API consists of two layers: a low-level layer which
+tries to stay as close as possible to the C API (where practical) and a
+higher-level layer which provides more convenient primitives to
+effectively use LDAP.
- - Function: charsetp object
- This function returns non-`nil' if OBJECT is a charset.
+ The low-level API should be used directly for very specific purposes
+(such as multiple operations on a connection) only. The higher-level
+functions provide a more convenient way to access LDAP directories
+hiding the subtleties of handling the connection, translating arguments
+and ensuring compliance with LDAP internationalization rules and formats
+(currently partly implemented only).
* Menu:
-* Charset Properties:: Properties of a charset.
-* Basic Charset Functions:: Functions for working with charsets.
-* Charset Property Functions:: Functions for accessing charset properties.
-* Predefined Charsets:: Predefined charset objects.
-
-\1f
-File: lispref.info, Node: Charset Properties, Next: Basic Charset Functions, Up: Charsets
-
-Charset Properties
-------------------
-
- Charsets have the following properties:
-
-`name'
- A symbol naming the charset. Every charset must have a different
- name; this allows a charset to be referred to using its name
- rather than the actual charset object.
-
-`doc-string'
- A documentation string describing the charset.
-
-`registry'
- A regular expression matching the font registry field for this
- character set. For example, both the `ascii' and `latin-iso8859-1'
- charsets use the registry `"ISO8859-1"'. This field is used to
- choose an appropriate font when the user gives a general font
- specification such as `-*-courier-medium-r-*-140-*', i.e. a
- 14-point upright medium-weight Courier font.
-
-`dimension'
- Number of position codes used to index a character in the
- character set. XEmacs/MULE can only handle character sets of
- dimension 1 or 2. This property defaults to 1.
-
-`chars'
- Number of characters in each dimension. In XEmacs/MULE, the only
- allowed values are 94 or 96. (There are a couple of pre-defined
- character sets, such as ASCII, that do not follow this, but you
- cannot define new ones like this.) Defaults to 94. Note that if
- the dimension is 2, the character set thus described is 94x94 or
- 96x96.
-
-`columns'
- Number of columns used to display a character in this charset.
- Only used in TTY mode. (Under X, the actual width of a character
- can be derived from the font used to display the characters.) If
- unspecified, defaults to the dimension. (This is almost always the
- correct value, because character sets with dimension 2 are usually
- ideograph character sets, which need two columns to display the
- intricate ideographs.)
-
-`direction'
- A symbol, either `l2r' (left-to-right) or `r2l' (right-to-left).
- Defaults to `l2r'. This specifies the direction that the text
- should be displayed in, and will be left-to-right for most
- charsets but right-to-left for Hebrew and Arabic. (Right-to-left
- display is not currently implemented.)
-
-`final'
- Final byte of the standard ISO 2022 escape sequence designating
- this charset. Must be supplied. Each combination of (DIMENSION,
- CHARS) defines a separate namespace for final bytes, and each
- charset within a particular namespace must have a different final
- byte. Note that ISO 2022 restricts the final byte to the range
- 0x30 - 0x7E if dimension == 1, and 0x30 - 0x5F if dimension == 2.
- Note also that final bytes in the range 0x30 - 0x3F are reserved
- for user-defined (not official) character sets. For more
- information on ISO 2022, see *Note Coding Systems::.
-
-`graphic'
- 0 (use left half of font on output) or 1 (use right half of font on
- output). Defaults to 0. This specifies how to convert the
- position codes that index a character in a character set into an
- index into the font used to display the character set. With
- `graphic' set to 0, position codes 33 through 126 map to font
- indices 33 through 126; with it set to 1, position codes 33
- through 126 map to font indices 161 through 254 (i.e. the same
- number but with the high bit set). For example, for a font whose
- registry is ISO8859-1, the left half of the font (octets 0x20 -
- 0x7F) is the `ascii' charset, while the right half (octets 0xA0 -
- 0xFF) is the `latin-iso8859-1' charset.
-
-`ccl-program'
- A compiled CCL program used to convert a character in this charset
- into an index into the font. This is in addition to the `graphic'
- property. If a CCL program is defined, the position codes of a
- character will first be processed according to `graphic' and then
- passed through the CCL program, with the resulting values used to
- index the font.
-
- This is used, for example, in the Big5 character set (used in
- Taiwan). This character set is not ISO-2022-compliant, and its
- size (94x157) does not fit within the maximum 96x96 size of
- ISO-2022-compliant character sets. As a result, XEmacs/MULE
- splits it (in a rather complex fashion, so as to group the most
- commonly used characters together) into two charset objects
- (`big5-1' and `big5-2'), each of size 94x94, and each charset
- object uses a CCL program to convert the modified position codes
- back into standard Big5 indices to retrieve a character from a
- Big5 font.
-
- Most of the above properties can only be changed when the charset is
-created. *Note Charset Property Functions::.
+* LDAP Variables:: Lisp variables related to LDAP
+* The High-Level LDAP API:: High-level LDAP lisp functions
+* The Low-Level LDAP API:: Low-level LDAP lisp primitives
+* LDAP Internationalization:: I18n variables and functions
\1f
-File: lispref.info, Node: Basic Charset Functions, Next: Charset Property Functions, Prev: Charset Properties, Up: Charsets
+File: lispref.info, Node: LDAP Variables, Next: The High-Level LDAP API, Prev: XEmacs LDAP API, Up: XEmacs LDAP API
-Basic Charset Functions
------------------------
+LDAP Variables
+--------------
- - 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
- 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
- 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
- describing the character set. PROPS is a property list,
- describing the specific nature of the character set. The
- recognized properties are `registry', `dimension', `columns',
- `chars', `final', `graphic', `direction', and `ccl-program', as
- previously described.
-
- - 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
- 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
- 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.
+ - Variable: ldap-default-host
+ The default LDAP server hostname. A TCP port number can be
+ appended to that name using a colon as a separator.
+
+ - Variable: ldap-default-port
+ Default TCP port for LDAP connections. Initialized from the LDAP
+ library. Default value is 389.
+
+ - Variable: ldap-default-base
+ Default base for LDAP searches. This is a string using the syntax
+ of RFC 1779. For instance, "o=ACME, c=US" limits the search to the
+ Acme organization in the United States.
+
+ - 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
+ 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
+ properties:
+ `binddn'
+ The distinguished name of the user to bind as. This may look
+ like `cn=Babs Jensen,o=ACME,c=US', see RFC 1779 for details.
+
+ `passwd'
+ The password to use for authentication.
+
+ `auth'
+ The authentication method to use, possible values depend on
+ the LDAP library XEmacs was compiled with, they may include
+ `simple', `krbv41' and `krbv42'.
+
+ `base'
+ The base for the search. This may look like `cÿ, o¬me', see
+ RFC 1779 for syntax details.
+
+ `scope'
+ 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.
+
+ `deref'
+ The dereference policy is one of the symbols `never',
+ `always', `search' or `find' and defines how aliases are
+ dereferenced.
+ `never'
+ Aliases are never dereferenced
+
+ `always'
+ Aliases are always dereferenced
+
+ `search'
+ Aliases are dereferenced when searching
+
+ `find'
+ Aliases are dereferenced when locating the base object
+ for the search
+
+ `timelimit'
+ The timeout limit for the connection in seconds.
+
+ `sizelimit'
+ The maximum number of matches to return for searches
+ performed on this connection.
+
+ - Variable: ldap-verbose
+ If non-`nil', LDAP operations will echo progress messages.
+ Defaults to `nil'.
\1f
-File: lispref.info, Node: Charset Property Functions, Next: Predefined Charsets, Prev: Basic Charset Functions, Up: Charsets
-
-Charset Property Functions
---------------------------
-
- All of these functions accept either a charset name or charset
-object.
-
- - 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
- This function returns the name of CHARSET. This will be a symbol.
+File: lispref.info, Node: The High-Level LDAP API, Next: The Low-Level LDAP API, Prev: LDAP Variables, Up: XEmacs LDAP API
- - Function: charset-doc-string charset
- This function returns the doc string of CHARSET.
-
- - Function: charset-registry charset
- This function returns the registry of CHARSET.
-
- - Function: charset-dimension charset
- This function returns the dimension of CHARSET.
-
- - Function: charset-chars charset
- This function returns the number of characters per dimension of
- CHARSET.
-
- - Function: charset-columns charset
- This function returns the number of display columns per character
- (in TTY mode) of CHARSET.
-
- - Function: charset-direction charset
- This function returns the display direction of CHARSET--either
- `l2r' or `r2l'.
-
- - Function: charset-final charset
- This function returns the final byte of the ISO 2022 escape
- sequence designating 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
- 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
- This function sets the `ccl-program' property of CHARSET to
- CCL-PROGRAM.
+The High-Level LDAP API
+-----------------------
-\1f
-File: lispref.info, Node: Predefined Charsets, Prev: Charset Property Functions, Up: Charsets
-
-Predefined Charsets
--------------------
-
- The following charsets are predefined in the C code.
-
- Name Type Fi Gr Dir Registry
- --------------------------------------------------------------
- ascii 94 B 0 l2r ISO8859-1
- control-1 94 0 l2r ---
- latin-iso8859-1 94 A 1 l2r ISO8859-1
- latin-iso8859-2 96 B 1 l2r ISO8859-2
- latin-iso8859-3 96 C 1 l2r ISO8859-3
- latin-iso8859-4 96 D 1 l2r ISO8859-4
- cyrillic-iso8859-5 96 L 1 l2r ISO8859-5
- arabic-iso8859-6 96 G 1 r2l ISO8859-6
- greek-iso8859-7 96 F 1 l2r ISO8859-7
- hebrew-iso8859-8 96 H 1 r2l ISO8859-8
- latin-iso8859-9 96 M 1 l2r ISO8859-9
- thai-tis620 96 T 1 l2r TIS620
- katakana-jisx0201 94 I 1 l2r JISX0201.1976
- latin-jisx0201 94 J 0 l2r JISX0201.1976
- japanese-jisx0208-1978 94x94 @ 0 l2r JISX0208.1978
- japanese-jisx0208 94x94 B 0 l2r JISX0208.19(83|90)
- japanese-jisx0212 94x94 D 0 l2r JISX0212
- chinese-gb2312 94x94 A 0 l2r GB2312
- chinese-cns11643-1 94x94 G 0 l2r CNS11643.1
- chinese-cns11643-2 94x94 H 0 l2r CNS11643.2
- chinese-big5-1 94x94 0 0 l2r Big5
- chinese-big5-2 94x94 1 0 l2r Big5
- korean-ksc5601 94x94 C 0 l2r KSC5601
- composite 96x96 0 l2r ---
-
- The following charsets are predefined in the Lisp code.
-
- Name Type Fi Gr Dir Registry
- --------------------------------------------------------------
- arabic-digit 94 2 0 l2r MuleArabic-0
- arabic-1-column 94 3 0 r2l MuleArabic-1
- arabic-2-column 94 4 0 r2l MuleArabic-2
- sisheng 94 0 0 l2r sisheng_cwnn\|OMRON_UDC_ZH
- chinese-cns11643-3 94x94 I 0 l2r CNS11643.1
- chinese-cns11643-4 94x94 J 0 l2r CNS11643.1
- chinese-cns11643-5 94x94 K 0 l2r CNS11643.1
- chinese-cns11643-6 94x94 L 0 l2r CNS11643.1
- chinese-cns11643-7 94x94 M 0 l2r CNS11643.1
- ethiopic 94x94 2 0 l2r Ethio
- ascii-r2l 94 B 0 r2l ISO8859-1
- ipa 96 0 1 l2r MuleIPA
- vietnamese-lower 96 1 1 l2r VISCII1.1
- vietnamese-upper 96 2 1 l2r VISCII1.1
-
- For all of the above charsets, the dimension and number of columns
-are the same.
-
- Note that ASCII, Control-1, and Composite are handled specially.
-This is why some of the fields are blank; and some of the filled-in
-fields (e.g. the type) are not really accurate.
+ The following functions provide the most convenient interface to
+perform LDAP operations. All of them open a connection to a host,
+perform an operation (add/search/modify/delete) on one or several
+entries and cleanly close 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 that `ldap-search' which used to be the name of the high-level
+search function in XEmacs 21.1 is now obsolete. For consistency in the
+naming as well as backward compatibility, that function now acts as a
+wrapper that calls either `ldap-search-basic' (low-level search
+function) or `ldap-search-entries' (high-level search function)
+according to the actual parameters. A direct call to one of these two
+functions is preferred since it is faster and unambiguous.
+
+ - Function: ldap-search-entries filter &optional host attributes
+ attrsonly withdn
+ 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. If WITHDN is
+ non-`nil' each entry in the result will be prepended with its
+ distinguished name DN. Additional search parameters can be
+ specified through `ldap-host-parameters-alist'. The function
+ returns a list of matching entries. Each entry is itself an alist
+ of attribute/value pairs optionally preceded by the DN of the
+ entry according to the value of WITHDN.
+
+ - Function: ldap-add-entries entries &optional host binddn passwd
+ Add entries to an LDAP directory. ENTRIES is a list of entry
+ specifications of the form `(DN (ATTR . VALUE) (ATTR . VALUE) ...)'
+ where DN the distinguished name of an entry to add, the following
+ are cons cells containing attribute/value string pairs. HOST is
+ the LDAP host, defaulting to `ldap-default-host' BINDDN is the DN
+ to bind as to the server PASSWD is the corresponding password.
+
+ - Function: ldap-modify-entries entry-mods &optional host binddn passwd
+ Modify entries of an LDAP directory. ENTRY_MODS is a list of
+ entry modifications of the form `(DN MOD-SPEC1 MOD-SPEC2 ...)'
+ where DN is the distinguished name of the entry to modify, the
+ following are modification specifications. A modification
+ specification is itself a list of the form `(MOD-OP ATTR VALUE1
+ VALUE2 ...)' MOD-OP and ATTR are mandatory, VALUES are optional
+ depending on MOD-OP. MOD-OP is the type of modification, one of
+ the symbols `add', `delete' or `replace'. ATTR is the LDAP
+ attribute type to modify. HOST is the LDAP host, defaulting to
+ `ldap-default-host' BINDDN is the DN to bind as to the server
+ PASSWD is the corresponding password"
+
+ - Function: ldap-delete-entries dn &optional host binddn passwd
+ Delete an entry from an LDAP directory. DN is the distinguished
+ name of an entry to delete or a list of those. HOST is the LDAP
+ host, defaulting to `ldap-default-host' BINDDN is the DN to bind
+ as to the server PASSWD is the corresponding password.
\1f
-File: lispref.info, Node: MULE Characters, Next: Composite Characters, Prev: Charsets, Up: MULE
-
-MULE Characters
-===============
+File: lispref.info, Node: The Low-Level LDAP API, Next: LDAP Internationalization, Prev: The High-Level LDAP API, Up: XEmacs LDAP API
- - Function: make-char charset arg1 &optional arg2
- This function makes a multi-byte character from CHARSET and octets
- ARG1 and ARG2.
+The Low-Level LDAP API
+----------------------
- - Function: char-charset ch
- This function returns the character set of char CH.
+ The low-level API should be used directly for very specific purposes
+(such as multiple operations on a connection) only. The higher-level
+functions provide a more convenient way to access LDAP directories
+hiding the subtleties of handling the connection, translating arguments
+and ensuring compliance with LDAP internationalization rules and formats
+(currently partly implemented only). See *note The High-Level LDAP API::
- - 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.
+ Note that the former functions `ldap-*-internal' functions have been
+renamed in XEmacs 21.2
- - 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.
+* Menu:
- - Function: find-charset-string string
- This function returns a list of the charsets in STRING.
+* The LDAP Lisp Object::
+* Opening and Closing a LDAP Connection::
+* Low-level Operations on a LDAP Server::
\1f
-File: lispref.info, Node: Composite Characters, Next: ISO 2022, Prev: MULE Characters, Up: MULE
-
-Composite Characters
-====================
+File: lispref.info, Node: The LDAP Lisp Object, Next: Opening and Closing a LDAP Connection, Prev: The Low-Level LDAP API, Up: The Low-Level LDAP API
- Composite characters are not yet completely implemented.
+The LDAP Lisp Object
+....................
- - 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.
+ An internal built-in `ldap' lisp object represents a LDAP connection.
- - Function: composite-char-string ch
- This function returns a string of the characters comprising a
- composite character.
+ - Function: ldapp object
+ This function returns non-`nil' if OBJECT is a `ldap' object.
- - 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: ldap-host ldap
+ Return the server host of the connection represented by LDAP
- - 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
- out of which the composite character was formed. Non-composite
- characters are left as-is. BUFFER defaults to the current buffer
- if omitted.
+ - Function: ldap-live-p ldap
+ Return non-`nil' if LDAP is an active LDAP connection
\1f
-File: lispref.info, Node: ISO 2022, Next: Coding Systems, Prev: Composite Characters, Up: MULE
-
-ISO 2022
-========
+File: lispref.info, Node: Opening and Closing a LDAP Connection, Next: Low-level Operations on a LDAP Server, Prev: The LDAP Lisp Object, Up: The Low-Level LDAP API
- This section briefly describes the ISO 2022 encoding standard. For
-more thorough understanding, please refer to the original document of
-ISO 2022.
+Opening and Closing a LDAP Connection
+.....................................
- Character sets ("charsets") are classified into the following four
-categories, according to the number of characters of charset:
-94-charset, 96-charset, 94x94-charset, and 96x96-charset.
+ - 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:
+ `port'
+ The TCP port to use for the connection if different from
+ `ldap-default-port' or the library builtin value
-94-charset
- ASCII(B), left(J) and right(I) half of JISX0201, ...
+ `auth'
+ The authentication method to use, possible values depend on
+ the LDAP library XEmacs was compiled with, they may include
+ `simple', `krbv41' and `krbv42'.
-96-charset
- Latin-1(A), Latin-2(B), Latin-3(C), ...
+ `binddn'
+ The distinguished name of the user to bind as. This may look
+ like `c=com, o=Acme, cn=Babs Jensen', see RFC 1779 for
+ details.
-94x94-charset
- GB2312(A), JISX0208(B), KSC5601(C), ...
+ `passwd'
+ The password to use for authentication.
-96x96-charset
- none for the moment
+ `deref'
+ The dereference policy is one of the symbols `never',
+ `always', `search' or `find' and defines how aliases are
+ dereferenced.
+ `never'
+ Aliases are never dereferenced
- The character in parentheses after the name of each charset is the
-"final character" F, which can be regarded as the identifier of the
-charset. ECMA allocates F to each charset. F is in the range of
-0x30..0x7F, but 0x30..0x3F are only for private use.
+ `always'
+ Aliases are always dereferenced
- Note: "ECMA" = European Computer Manufacturers Association
+ `search'
+ Aliases are dereferenced when searching
- There are four "registers of charsets", called G0 thru G3. You can
-designate (or assign) any charset to one of these registers.
+ `find'
+ Aliases are dereferenced when locating the base object
+ for the search The default is `never'.
- The code space contained within one octet (of size 256) is divided
-into 4 areas: C0, GL, C1, and GR. GL and GR are the areas into which a
-register of charset can be invoked into.
+ `timelimit'
+ The timeout limit for the connection in seconds.
- C0: 0x00 - 0x1F
- GL: 0x20 - 0x7F
- C1: 0x80 - 0x9F
- GR: 0xA0 - 0xFF
+ `sizelimit'
+ The maximum number of matches to return for searches
+ performed on this connection.
- Usually, in the initial state, G0 is invoked into GL, and G1 is
-invoked into GR.
+ - Function: ldap-close ldap
+ Close the connection represented by LDAP
- ISO 2022 distinguishes 7-bit environments and 8-bit environments. In
-7-bit environments, only C0 and GL are used.
-
- Charset designation is done by escape sequences of the form:
-
- ESC [I] I F
-
- where I is an intermediate character in the range 0x20 - 0x2F, and F
-is the final character identifying this charset.
+\1f
+File: lispref.info, Node: Low-level Operations on a LDAP Server, Prev: Opening and Closing a LDAP Connection, Up: The Low-Level LDAP API
+
+Low-level Operations on a LDAP Server
+.....................................
+
+ `ldap-search-basic' is the low-level primitive to perform a search
+on a LDAP server. It works directly on an open LDAP connection thus
+requiring a preliminary call to `ldap-open'. Multiple searches can be
+made on the same connection, then the session must be closed with
+`ldap-close'.
+
+ - Function: ldap-search-basic 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',
+ `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
+ which attributes to retrieve for each matching entry. If `nil' all
+ available attributes are returned. If `attrsonly' is non-`nil'
+ then only the attributes are retrieved, not their associated values
+ If `withdn' is non-`nil' then each entry in the result is
+ prepended with its distinguished name DN If `verbose' is non-`nil'
+ then progress messages are echoed The function returns a list of
+ matching entries. Each entry is itself an alist of
+ attribute/value pairs optionally preceded by the DN of the entry
+ according to the value of `withdn'.
+
+ - Function: ldap-add ldap dn entry
+ Add ENTRY to a LDAP directory which a connection LDAP has been
+ opened to with `ldap-open'. DN is the distinguished name of the
+ entry to add. ENTRY is an entry specification, i.e., a list of
+ cons cells containing attribute/value string pairs.
+
+ - Function: ldap-modify ldap dn mods
+ Modify an entry in an LDAP directory. LDAP is an LDAP connection
+ object created with `ldap-open'. DN is the distinguished name of
+ the entry to modify. MODS is a list of modifications to apply. A
+ modification is a list of the form `(MOD-OP ATTR VALUE1 VALUE2
+ ...)' MOD-OP and ATTR are mandatory, VALUES are optional
+ depending on MOD-OP. MOD-OP is the type of modification, one of
+ the symbols `add', `delete' or `replace'. ATTR is the LDAP
+ attribute type to modify
+
+ - Function: ldap-delete ldap dn
+ Delete an entry to an LDAP directory. LDAP is an LDAP connection
+ object created with `ldap-open'. DN is the distinguished name of
+ the entry to delete
- The meaning of intermediate characters are:
+\1f
+File: lispref.info, Node: LDAP Internationalization, Prev: The Low-Level LDAP API, Up: XEmacs LDAP API
- $ [0x24]: indicate charset of dimension 2 (94x94 or 96x96).
- ( [0x28]: designate to G0 a 94-charset whose final byte is F.
- ) [0x29]: designate to G1 a 94-charset whose final byte is F.
- * [0x2A]: designate to G2 a 94-charset whose final byte is F.
- + [0x2B]: designate to G3 a 94-charset whose final byte is F.
- - [0x2D]: designate to G1 a 96-charset whose final byte is F.
- . [0x2E]: designate to G2 a 96-charset whose final byte is F.
- / [0x2F]: designate to G3 a 96-charset whose final byte is F.
+LDAP Internationalization
+-------------------------
- The following rule is not allowed in ISO 2022 but can be used in
-Mule.
+ The XEmacs LDAP API provides basic internationalization features
+based on the LDAP v3 specification (essentially RFC2252 on "LDAP v3
+Attribute Syntax Definitions"). Unfortunately since there is currently
+no free LDAP v3 server software, this part has not received much
+testing and should be considered experimental. The framework is in
+place though.
- , [0x2C]: designate to G0 a 96-charset whose final byte is F.
+ - Function: ldap-decode-attribute attr
+ Decode the attribute/value pair ATTR according to LDAP rules. The
+ attribute name is looked up in `ldap-attribute-syntaxes-alist' and
+ the corresponding decoder is then retrieved from
+ `ldap-attribute-syntax-decoders'' and applied on the value(s).
- Here are examples of designations:
+* Menu:
- ESC ( B : designate to G0 ASCII
- ESC - A : designate to G1 Latin-1
- ESC $ ( A or ESC $ A : designate to G0 GB2312
- ESC $ ( B or ESC $ B : designate to G0 JISX0208
- ESC $ ) C : designate to G1 KSC5601
+* LDAP Internationalization Variables::
+* Encoder/Decoder Functions::
- To use a charset designated to G2 or G3, and to use a charset
-designated to G1 in a 7-bit environment, you must explicitly invoke G1,
-G2, or G3 into GL. There are two types of invocation, Locking Shift
-(forever) and Single Shift (one character only).
+\1f
+File: lispref.info, Node: LDAP Internationalization Variables, Next: Encoder/Decoder Functions, Prev: LDAP Internationalization, Up: LDAP Internationalization
+
+LDAP Internationalization Variables
+...................................
+
+ - Variable: ldap-ignore-attribute-codings
+ If non-`nil', no encoding/decoding will be performed LDAP
+ attribute values
+
+ - Variable: ldap-coding-system
+ Coding system of LDAP string values. LDAP v3 specifies the coding
+ system of strings to be UTF-8. You need an XEmacs with Mule
+ support for this.
+
+ - Variable: ldap-default-attribute-decoder
+ Decoder function to use for attributes whose syntax is unknown.
+ Such a function receives an encoded attribute value as a string
+ and should return the decoded value as a string
+
+ - Variable: ldap-attribute-syntax-encoders
+ A vector of functions used to encode LDAP attribute values. The
+ sequence of functions corresponds to the sequence of LDAP
+ attribute syntax object identifiers of the form
+ 1.3.6.1.4.1.1466.1115.121.1.* as defined in RFC2252 section 4.3.2.
+ As of this writing, only a few encoder functions are available.
+
+ - Variable: ldap-attribute-syntax-decoders
+ A vector of functions used to decode LDAP attribute values. The
+ sequence of functions corresponds to the sequence of LDAP
+ attribute syntax object identifiers of the form
+ 1.3.6.1.4.1.1466.1115.121.1.* as defined in RFC2252 section 4.3.2.
+ As of this writing, only a few decoder functions are available.
+
+ - Variable: ldap-attribute-syntaxes-alist
+ A map of LDAP attribute names to their type object id minor number.
+ This table is built from RFC2252 Section 5 and RFC2256 Section 5
- Locking Shift is done as follows:
+\1f
+File: lispref.info, Node: Encoder/Decoder Functions, Prev: LDAP Internationalization Variables, Up: LDAP Internationalization
- LS0 or SI (0x0F): invoke G0 into GL
- LS1 or SO (0x0E): invoke G1 into GL
- LS2: invoke G2 into GL
- LS3: invoke G3 into GL
- LS1R: invoke G1 into GR
- LS2R: invoke G2 into GR
- LS3R: invoke G3 into GR
+Encoder/Decoder Functions
+.........................
- Single Shift is done as follows:
+ - Function: ldap-encode-boolean bool
+ A function that encodes an elisp boolean BOOL into a LDAP boolean
+ string representation
- SS2 or ESC N: invoke G2 into GL
- SS3 or ESC O: invoke G3 into GL
+ - Function: ldap-decode-boolean str
+ A function that decodes a LDAP boolean string representation STR
+ into an elisp boolean
- (#### Ben says: I think the above is slightly incorrect. It appears
-that SS2 invokes G2 into GR and SS3 invokes G3 into GR, whereas ESC N
-and ESC O behave as indicated. The above definitions will not parse
-EUC-encoded text correctly, and it looks like the code in mule-coding.c
-has similar problems.)
+ - Function: ldap-decode-string str
+ Decode a string STR according to `ldap-coding-system'
- You may realize that there are a lot of ISO-2022-compliant ways of
-encoding multilingual text. Now, in the world, there exist many coding
-systems such as X11's Compound Text, Japanese JUNET code, and so-called
-EUC (Extended UNIX Code); all of these are variants of ISO 2022.
+ - Function: ldap-encode-string str
+ Encode a string STR according to `ldap-coding-system'
- In Mule, we characterize ISO 2022 by the following attributes:
+ - Function: ldap-decode-address str
+ Decode an address STR according to `ldap-coding-system' and
+ replacing $ signs with newlines as specified by LDAP encoding
+ rules for addresses
- 1. Initial designation to G0 thru G3.
+ - Function: ldap-encode-address str
+ Encode an address STR according to `ldap-coding-system' and
+ replacing newlines with $ signs as specified by LDAP encoding
+ rules for addresses
- 2. Allow designation of short form for Japanese and Chinese.
+\1f
+File: lispref.info, Node: Syntax of Search Filters, Prev: XEmacs LDAP API, Up: LDAP Support
- 3. Should we designate ASCII to G0 before control characters?
+Syntax of Search Filters
+========================
- 4. Should we designate ASCII to G0 at the end of line?
+ LDAP search functions use RFC1558 syntax to describe the search
+filter. In that syntax simple filters have the form:
- 5. 7-bit environment or 8-bit environment.
+ (<attr> <filtertype> <value>)
- 6. Use Locking Shift or not.
+ `<attr>' is an attribute name such as `cn' for Common Name, `o' for
+Organization, etc...
- 7. Use ASCII or JIS0201-1976-Roman.
+ `<value>' is the corresponding value. This is generally an exact
+string but may also contain `*' characters as wildcards
- 8. Use JISX0208-1983 or JISX0208-1976.
+ `filtertype' is one `=' `~=', `<=', `>=' which respectively describe
+equality, approximate equality, inferiority and superiority.
- (The last two are only for Japanese.)
+ Thus `(cn=John Smith)' matches all records having a canonical name
+equal to John Smith.
- By specifying these attributes, you can create any variant of ISO
-2022.
+ A special case is the presence filter `(<attr>=*' which matches
+records containing a particular attribute. For instance `(mail=*)'
+matches all records containing a `mail' attribute.
- Here are several examples:
+ Simple filters can be connected together with the logical operators
+`&', `|' and `!' which stand for the usual and, or and not operators.
- junet -- Coding system used in JUNET.
- 1. G0 <- ASCII, G1..3 <- never used
- 2. Yes.
- 3. Yes.
- 4. Yes.
- 5. 7-bit environment
- 6. No.
- 7. Use ASCII
- 8. Use JISX0208-1983
-
- ctext -- Compound Text
- 1. G0 <- ASCII, G1 <- Latin-1, G2,3 <- never used
- 2. No.
- 3. No.
- 4. Yes.
- 5. 8-bit environment
- 6. No.
- 7. Use ASCII
- 8. Use JISX0208-1983
-
- euc-china -- Chinese EUC. Although many people call this
- as "GB encoding", the name may cause misunderstanding.
- 1. G0 <- ASCII, G1 <- GB2312, G2,3 <- never used
- 2. No.
- 3. Yes.
- 4. Yes.
- 5. 8-bit environment
- 6. No.
- 7. Use ASCII
- 8. Use JISX0208-1983
-
- korean-mail -- Coding system used in Korean network.
- 1. G0 <- ASCII, G1 <- KSC5601, G2,3 <- never used
- 2. No.
- 3. Yes.
- 4. Yes.
- 5. 7-bit environment
- 6. Yes.
- 7. No.
- 8. No.
-
- Mule creates all these coding systems by default.
+ `(&(objectClass=Person)(mail=*)(|(sn=Smith)(givenname=John)))'
+matches records of class `Person' containing a `mail' attribute and
+corresponding to people whose last name is `Smith' or whose first name
+is `John'.
\1f
-File: lispref.info, Node: Coding Systems, Next: CCL, Prev: ISO 2022, Up: MULE
-
-Coding Systems
-==============
-
- A coding system is an object that defines how text containing
-multiple character sets is encoded into a stream of (typically 8-bit)
-bytes. The coding system is used to decode the stream into a series of
-characters (which may be from multiple charsets) when the text is read
-from a file or process, and is used to encode the text back into the
-same format when it is written out to a file or process.
+File: lispref.info, Node: PostgreSQL Support, Next: Internationalization, Prev: LDAP Support, Up: Top
- For example, many ISO-2022-compliant coding systems (such as Compound
-Text, which is used for inter-client data under the X Window System) use
-escape sequences to switch between different charsets--Japanese Kanji,
-for example, is invoked with `ESC $ ( B'; ASCII is invoked with `ESC (
-B'; and Cyrillic is invoked with `ESC - L'. See `make-coding-system'
-for more information.
+PostgreSQL Support
+******************
- Coding systems are normally identified using a symbol, and the
-symbol is accepted in place of the actual coding system object whenever
-a coding system is called for. (This is similar to how faces and
-charsets work.)
-
- - Function: coding-system-p object
- This function returns non-`nil' if OBJECT is a coding system.
+ XEmacs can be linked with PostgreSQL libpq run-time support to
+provide relational database access from Emacs Lisp code.
* Menu:
-* Coding System Types:: Classifying coding systems.
-* EOL Conversion:: Dealing with different ways of denoting
- the end of a line.
-* Coding System Properties:: Properties of a coding system.
-* Basic Coding System Functions:: Working with coding systems.
-* Coding System Property Functions:: Retrieving a coding system's properties.
-* Encoding and Decoding Text:: Encoding and decoding text.
-* Detection of Textual Encoding:: Determining how text is encoded.
-* Big5 and Shift-JIS Functions:: Special functions for these non-standard
- encodings.
+* Building XEmacs with PostgreSQL support::
+* XEmacs PostgreSQL libpq API::
+* XEmacs PostgreSQL libpq Examples::
\1f
-File: lispref.info, Node: Coding System Types, Next: EOL Conversion, Up: Coding Systems
-
-Coding System Types
--------------------
-
-`nil'
-`autodetect'
- Automatic conversion. XEmacs attempts to detect the coding system
- used in the file.
-
-`no-conversion'
- No conversion. Use this for binary files and such. On output,
- graphic characters that are not in ASCII or Latin-1 will be
- replaced by a `?'. (For a no-conversion-encoded buffer, these
- characters will only be present if you explicitly insert them.)
-
-`shift-jis'
- Shift-JIS (a Japanese encoding commonly used in PC operating
- systems).
-
-`iso2022'
- Any ISO-2022-compliant encoding. Among other things, this
- includes JIS (the Japanese encoding commonly used for e-mail),
- national variants of EUC (the standard Unix encoding for Japanese
- and other languages), and Compound Text (an encoding used in X11).
- You can specify more specific information about the conversion
- with the FLAGS argument.
-
-`big5'
- Big5 (the encoding commonly used for Taiwanese).
-
-`ccl'
- The conversion is performed using a user-written pseudo-code
- program. CCL (Code Conversion Language) is the name of this
- pseudo-code.
-
-`internal'
- Write out or read in the raw contents of the memory representing
- the buffer's text. This is primarily useful for debugging
- purposes, and is only enabled when XEmacs has been compiled with
- `DEBUG_XEMACS' set (the `--debug' configure option). *Warning*:
- Reading in a file using `internal' conversion can result in an
- internal inconsistency in the memory representing a buffer's text,
- which will produce unpredictable results and may cause XEmacs to
- crash. Under normal circumstances you should never use `internal'
- conversion.
+File: lispref.info, Node: Building XEmacs with PostgreSQL support, Next: XEmacs PostgreSQL libpq API, Up: PostgreSQL Support
+
+Building XEmacs with PostgreSQL support
+=======================================
+
+ XEmacs PostgreSQL support requires linking to the PostgreSQL libpq.so
+library. Describing how to build and install PostgreSQL is beyond the
+scope of this document, see the PostgreSQL manual for details.
+
+ If you have installed XEmacs from one of the binary kits on
+(<ftp://ftp.xemacs.org/>), or are using an XEmacs binary from a CD ROM,
+you should have XEmacs PostgreSQL support by default. If you are
+building XEmacs from source on a Linux system with PostgreSQL installed
+into the default location, it should be autodetected when you run
+configure. If you have installed PostgreSQL into its non-Linux default
+location, `/usr/local/pgsql', you must specify
+`--site-prefixes=/usr/local/pgsql' when you run configure. If you
+installed PostgreSQL into another location, use that instead of
+`/usr/local/pgsql' when specifying `--site-prefixes'.
+
+ As of XEmacs 21.2, PostgreSQL versions 6.5.3 and 7.0 are supported.
+XEmacs Lisp support for V7.0 is somewhat more extensive than support for
+V6.5. In particular, asynchronous queries are supported.
\1f
-File: lispref.info, Node: EOL Conversion, Next: Coding System Properties, Prev: Coding System Types, Up: Coding Systems
+File: lispref.info, Node: XEmacs PostgreSQL libpq API, Next: XEmacs PostgreSQL libpq Examples, Prev: Building XEmacs with PostgreSQL support, Up: PostgreSQL Support
+
+XEmacs PostgreSQL libpq API
+===========================
+
+ XEmacs PostgreSQL API is intended to be a policy-free, low-level
+binding to libpq. The intent is to provide all the basic functionality
+and then let high level Lisp code decide its own policies.
+
+ This documentation assumes that the reader has knowledge of SQL, but
+requires no prior knowledge of libpq.
+
+ There are many examples in this manual and some setup will be
+required. In order to run most of the following examples, the
+following code needs to be executed. In addition to the data is in
+this table, nearly all of the examples will assume that the free
+variable `P' refers to this database connection. The examples in the
+original edition of this manual were run against Postgres 7.0beta1.
+
+ (progn
+ (setq P (pq-connectdb ""))
+ ;; id is the primary key, shikona is a Japanese word that
+ ;; means `the professional name of a Sumo wrestler', and
+ ;; rank is the Sumo rank name.
+ (pq-exec P (concat "CREATE TABLE xemacs_test"
+ " (id int, shikona text, rank text);"))
+ (pq-exec P "COPY xemacs_test FROM stdin;")
+ (pq-put-line P "1\tMusashimaru\tYokuzuna\n")
+ (pq-put-line P "2\tDejima\tOozeki\n")
+ (pq-put-line P "3\tMusoyama\tSekiwake\n")
+ (pq-put-line P "4\tMiyabiyama\tSekiwake\n")
+ (pq-put-line P "5\tWakanoyama\tMaegashira\n")
+ (pq-put-line P "\\.\n")
+ (pq-end-copy P))
+ => nil
-EOL Conversion
---------------
-
-`nil'
- Automatically detect the end-of-line type (LF, CRLF, or CR). Also
- generate subsidiary coding systems named `NAME-unix', `NAME-dos',
- and `NAME-mac', that are identical to this coding system but have
- an EOL-TYPE value of `lf', `crlf', and `cr', respectively.
-
-`lf'
- The end of a line is marked externally using ASCII LF. Since this
- is also the way that XEmacs represents an end-of-line internally,
- specifying this option results in no end-of-line conversion. This
- is the standard format for Unix text files.
+* Menu:
-`crlf'
- The end of a line is marked externally using ASCII CRLF. This is
- the standard format for MS-DOS text files.
+* libpq Lisp Variables::
+* libpq Lisp Symbols and DataTypes::
+* Synchronous Interface Functions::
+* Asynchronous Interface Functions::
+* Large Object Support::
+* Other libpq Functions::
+* Unimplemented libpq Functions::
-`cr'
- The end of a line is marked externally using ASCII CR. This is the
- standard format for Macintosh text files.
+\1f
+File: lispref.info, Node: libpq Lisp Variables, Next: libpq Lisp Symbols and DataTypes, Prev: XEmacs PostgreSQL libpq API, Up: XEmacs PostgreSQL libpq API
-`t'
- Automatically detect the end-of-line type but do not generate
- subsidiary coding systems. (This value is converted to `nil' when
- stored internally, and `coding-system-property' will return `nil'.)
+libpq Lisp Variables
+--------------------
-\1f
-File: lispref.info, Node: Coding System Properties, Next: Basic Coding System Functions, Prev: EOL Conversion, Up: Coding Systems
-
-Coding System Properties
-------------------------
-
-`mnemonic'
- String to be displayed in the modeline when this coding system is
- active.
-
-`eol-type'
- End-of-line conversion to be used. It should be one of the types
- listed in *Note EOL Conversion::.
-
-`post-read-conversion'
- Function called after a file has been read in, to perform the
- decoding. Called with two arguments, BEG and END, denoting a
- region of the current buffer to be decoded.
-
-`pre-write-conversion'
- Function called before a file is written out, to perform the
- encoding. Called with two arguments, BEG and END, denoting a
- region of the current buffer to be encoded.
-
- The following additional properties are recognized if TYPE is
-`iso2022':
-
-`charset-g0'
-`charset-g1'
-`charset-g2'
-`charset-g3'
- The character set initially designated to the G0 - G3 registers.
- The value should be one of
-
- * A charset object (designate that character set)
-
- * `nil' (do not ever use this register)
-
- * `t' (no character set is initially designated to the
- register, but may be later on; this automatically sets the
- corresponding `force-g*-on-output' property)
-
-`force-g0-on-output'
-`force-g1-on-output'
-`force-g2-on-output'
-`force-g3-on-output'
- If non-`nil', send an explicit designation sequence on output
- before using the specified register.
-
-`short'
- If non-`nil', use the short forms `ESC $ @', `ESC $ A', and `ESC $
- B' on output in place of the full designation sequences `ESC $ (
- @', `ESC $ ( A', and `ESC $ ( B'.
-
-`no-ascii-eol'
- If non-`nil', don't designate ASCII to G0 at each end of line on
- output. Setting this to non-`nil' also suppresses other
- state-resetting that normally happens at the end of a line.
-
-`no-ascii-cntl'
- If non-`nil', don't designate ASCII to G0 before control chars on
- output.
-
-`seven'
- If non-`nil', use 7-bit environment on output. Otherwise, use
- 8-bit environment.
-
-`lock-shift'
- If non-`nil', use locking-shift (SO/SI) instead of single-shift or
- designation by escape sequence.
-
-`no-iso6429'
- If non-`nil', don't use ISO6429's direction specification.
-
-`escape-quoted'
- If non-nil, literal control characters that are the same as the
- beginning of a recognized ISO 2022 or ISO 6429 escape sequence (in
- particular, ESC (0x1B), SO (0x0E), SI (0x0F), SS2 (0x8E), SS3
- (0x8F), and CSI (0x9B)) are "quoted" with an escape character so
- that they can be properly distinguished from an escape sequence.
- (Note that doing this results in a non-portable encoding.) This
- encoding flag is used for byte-compiled files. Note that ESC is a
- good choice for a quoting character because there are no escape
- sequences whose second byte is a character from the Control-0 or
- Control-1 character sets; this is explicitly disallowed by the ISO
- 2022 standard.
-
-`input-charset-conversion'
- A list of conversion specifications, specifying conversion of
- characters in one charset to another when decoding is performed.
- Each specification is a list of two elements: the source charset,
- and the destination charset.
-
-`output-charset-conversion'
- A list of conversion specifications, specifying conversion of
- characters in one charset to another when encoding is performed.
- The form of each specification is the same as for
- `input-charset-conversion'.
-
- The following additional properties are recognized (and required) if
-TYPE is `ccl':
-
-`decode'
- CCL program used for decoding (converting to internal format).
-
-`encode'
- CCL program used for encoding (converting to external format).
+ Various Unix environment variables are used by libpq to provide
+defaults to the many different parameters. In the XEmacs Lisp API,
+these environment variables are bound to Lisp variables to provide more
+convenient access to Lisp Code. These variables are passed to the
+backend database server during the establishment of a database
+connection and when the `pq-setenv' call is made.
-\1f
-File: lispref.info, Node: Basic Coding System Functions, Next: Coding System Property Functions, Prev: Coding System Properties, Up: Coding Systems
+ - Variable: pg:host
+ Initialized from the PGHOST environment variable. The default
+ host to connect to.
-Basic Coding System Functions
------------------------------
+ - Variable: pg:user
+ Initialized from the PGUSER environment variable. The default
+ database user name.
- - Function: find-coding-system coding-system-or-name
- This function retrieves the coding system of the given name.
+ - Variable: pg:options
+ Initialized from the PGOPTIONS environment variable. Default
+ additional server options.
- If CODING-SYSTEM-OR-NAME is a coding-system object, it is simply
- returned. Otherwise, CODING-SYSTEM-OR-NAME should be a symbol.
- If there is no such coding system, `nil' is returned. Otherwise
- the associated coding system object is returned.
+ - Variable: pg:port
+ Initialized from the PGPORT environment variable. The default TCP
+ port to connect to.
- - 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'.
+ - Variable: pg:tty
+ Initialized from the PGTTY environment variable. The default
+ debugging TTY.
- - Function: coding-system-list
- This function returns a list of the names of all defined coding
- systems.
+ Compatibility note: Debugging TTYs are turned off in the XEmacs
+ Lisp binding.
- - Function: coding-system-name coding-system
- This function returns the name of the given coding system.
+ - Variable: pg:database
+ Initialized from the PGDATABASE environment variable. The default
+ database to connect to.
- - Function: make-coding-system name type &optional doc-string props
- This function registers symbol NAME as a coding system.
+ - Variable: pg:realm
+ Initialized from the PGREALM environment variable. The default
+ Kerberos realm.
- TYPE describes the conversion method used and should be one of the
- types listed in *Note Coding System Types::.
+ - Variable: pg:client-encoding
+ Initialized from the PGCLIENTENCODING environment variable. The
+ default client encoding.
- DOC-STRING is a string describing the coding system.
+ Compatibility note: This variable is not present in non-Mule
+ XEmacsen. This variable is not present in versions of libpq prior
+ to 7.0. In the current implementation, client encoding is
+ equivalent to the `file-name-coding-system' format.
- PROPS is a property list, describing the specific nature of the
- character set. Recognized properties are as in *Note Coding
- System Properties::.
+ - Variable: pg:authtype
+ Initialized from the PGAUTHTYPE environment variable. The default
+ authentication scheme used.
- - 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.
+ Compatibility note: This variable is unused in versions of libpq
+ after 6.5. It is not implemented at all in the XEmacs Lisp
+ binding.
- - Function: subsidiary-coding-system coding-system eol-type
- This function returns the subsidiary coding system of
- CODING-SYSTEM with eol type EOL-TYPE.
+ - Variable: pg:geqo
+ Initialized from the PGGEQO environment variable. Genetic
+ optimizer options.
-\1f
-File: lispref.info, Node: Coding System Property Functions, Next: Encoding and Decoding Text, Prev: Basic Coding System Functions, Up: Coding Systems
+ - Variable: pg:cost-index
+ Initialized from the PGCOSTINDEX environment variable. Cost index
+ options.
-Coding System Property Functions
---------------------------------
+ - Variable: pg:cost-heap
+ Initialized from the PGCOSTHEAP environment variable. Cost heap
+ options.
- - Function: coding-system-doc-string coding-system
- This function returns the doc string for CODING-SYSTEM.
+ - Variable: pg:tz
+ Initialized from the PGTZ environment variable. Default timezone.
- - Function: coding-system-type coding-system
- This function returns the type of CODING-SYSTEM.
+ - Variable: pg:date-style
+ Initialized from the PGDATESTYLE environment variable. Default
+ date style in returned date objects.
- - Function: coding-system-property coding-system prop
- This function returns the PROP property of CODING-SYSTEM.
+ - Variable: pg-coding-system
+ This is a variable controlling which coding system is used to
+ encode non-ASCII strings sent to the database.
-\1f
-File: lispref.info, Node: Encoding and Decoding Text, Next: Detection of Textual Encoding, Prev: Coding System Property Functions, Up: Coding Systems
-
-Encoding and Decoding Text
---------------------------
-
- - 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
- JIS-formatted file but used the `binary' or `no-conversion' coding
- system, so that it shows up as `^[$B!<!+^[(B'). The length of the
- encoded text is returned. BUFFER defaults to the current buffer
- if unspecified.
-
- - 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
- encoding. The length of the encoded text is returned. BUFFER
- defaults to the current buffer if unspecified.
+ Compatibility Note: This variable is not present in InfoDock.
Foundation instead of in the original English.
\1f
-File: lispref.info, Node: Detection of Textual Encoding, Next: Big5 and Shift-JIS Functions, Prev: Encoding and Decoding Text, Up: Coding Systems
+File: lispref.info, Node: libpq Lisp Symbols and DataTypes, Next: Synchronous Interface Functions, Prev: libpq Lisp Variables, Up: XEmacs PostgreSQL libpq API
-Detection of Textual Encoding
------------------------------
+libpq Lisp Symbols and Datatypes
+--------------------------------
- - Function: coding-category-list
- This function returns a list of all recognized coding categories.
+ The following set of symbols are used to represent the intermediate
+states involved in the asynchronous interface.
- - 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
- than all specified ones, in the same relative order they were in
- previously.
+ - Symbol: pgres::polling-failed
+ Undocumented. A fatal error has occurred during processing of an
+ asynchronous operation.
- - Function: coding-priority-list
- This function returns a list of coding categories in descending
- order of priority.
+ - Symbol: pgres::polling-reading
+ An intermediate status return during an asynchronous operation. It
+ indicates that one may use `select' before polling again.
- - Function: set-coding-category-system coding-category coding-system
- This function changes the coding system associated with a coding
- category.
+ - Symbol: pgres::polling-writing
+ An intermediate status return during an asynchronous operation. It
+ indicates that one may use `select' before polling again.
- - Function: coding-category-system coding-category
- This function returns the coding system associated with a coding
- category.
+ - Symbol: pgres::polling-ok
+ An asynchronous operation has successfully completed.
- - 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,
- it returns `autodetect' or one of its subsidiary coding systems
- according to a detected end-of-line type. Optional arg BUFFER
- defaults to the current buffer.
+ - Symbol: pgres::polling-active
+ An intermediate status return during an asynchronous operation.
+ One can call the poll function again immediately.
-\1f
-File: lispref.info, Node: Big5 and Shift-JIS Functions, Prev: Detection of Textual Encoding, Up: Coding Systems
+ - Function: pq-pgconn conn field
+ CONN A database connection object. FIELD A symbol indicating
+ which field of PGconn to fetch. Possible values are shown in the
+ following table.
+ `pq::db'
+ Database name
-Big5 and Shift-JIS Functions
-----------------------------
+ `pq::user'
+ Database user name
- These are special functions for working with the non-standard
-Shift-JIS and Big5 encodings.
+ `pq::pass'
+ Database user's password
- - 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.
+ `pq::host'
+ Hostname database server is running on
- - 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.
+ `pq::port'
+ TCP port number used in the connection
- - 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.
+ `pq::tty'
+ Debugging TTY
- - Function: encode-big5-char ch
- This function encodes the Big5 character CHAR to BIG5
- coding-system. The corresponding character code in Big5 is
- returned.
+ Compatibility note: Debugging TTYs are not used in the
+ XEmacs Lisp API.
-\1f
-File: lispref.info, Node: CCL, Next: Category Tables, Prev: Coding Systems, Up: MULE
-
-CCL
-===
-
- CCL (Code Conversion Language) is a simple structured programming
-language designed for character coding conversions. A CCL program is
-compiled to CCL code (represented by a vector of integers) and executed
-by the CCL interpreter embedded in Emacs. The CCL interpreter
-implements a virtual machine with 8 registers called `r0', ..., `r7', a
-number of control structures, and some I/O operators. Take care when
-using registers `r0' (used in implicit "set" statements) and especially
-`r7' (used internally by several statements and operations, especially
-for multiple return values and I/O operations).
-
- CCL is used for code conversion during process I/O and file I/O for
-non-ISO2022 coding systems. (It is the only way for a user to specify a
-code conversion function.) It is also used for calculating the code
-point of an X11 font from a character code. However, since CCL is
-designed as a powerful programming language, it can be used for more
-generic calculation where efficiency is demanded. A combination of
-three or more arithmetic operations can be calculated faster by CCL than
-by Emacs Lisp.
-
- *Warning:* The code in `src/mule-ccl.c' and
-`$packages/lisp/mule-base/mule-ccl.el' is the definitive description of
-CCL's semantics. The previous version of this section contained
-several typos and obsolete names left from earlier versions of MULE,
-and many may remain. (I am not an experienced CCL programmer; the few
-who know CCL well find writing English painful.)
-
- A CCL program transforms an input data stream into an output data
-stream. The input stream, held in a buffer of constant bytes, is left
-unchanged. The buffer may be filled by an external input operation,
-taken from an Emacs buffer, or taken from a Lisp string. The output
-buffer is a dynamic array of bytes, which can be written by an external
-output operation, inserted into an Emacs buffer, or returned as a Lisp
-string.
-
- A CCL program is a (Lisp) list containing two or three members. The
-first member is the "buffer magnification", which indicates the
-required minimum size of the output buffer as a multiple of the input
-buffer. It is followed by the "main block" which executes while there
-is input remaining, and an optional "EOF block" which is executed when
-the input is exhausted. Both the main block and the EOF block are CCL
-blocks.
-
- A "CCL block" is either a CCL statement or list of CCL statements.
-A "CCL statement" is either a "set statement" (either an integer or an
-"assignment", which is a list of a register to receive the assignment,
-an assignment operator, and an expression) or a "control statement" (a
-list starting with a keyword, whose allowable syntax depends on the
-keyword).
+ `pq::options'
+ Additional server options
-* Menu:
+ `pq::status'
+ Connection status. Possible return values are shown in the
+ following table.
+ `pg::connection-ok'
+ The normal, connected status.
+
+ `pg::connection-bad'
+ The connection is not open and the PGconn object needs
+ to be deleted by `pq-finish'.
+
+ `pg::connection-started'
+ An asynchronous connection has been started, but is not
+ yet complete.
+
+ `pg::connection-made'
+ An asynchronous connect has been made, and there is data
+ waiting to be sent.
+
+ `pg::connection-awaiting-response'
+ Awaiting data from the backend during an asynchronous
+ connection.
+
+ `pg::connection-auth-ok'
+ Received authentication, waiting for the backend to
+ start up.
+
+ `pg::connection-setenv'
+ Negotiating environment during an asynchronous
+ connection.
+
+ `pq::error-message'
+ The last error message that was delivered to this connection.
+
+ `pq::backend-pid'
+ The process ID of the backend database server.
+
+ The `PGresult' object is used by libpq to encapsulate the results of
+queries. The printed representation takes on four forms. When the
+PGresult object contains tuples from an SQL `SELECT' it will look like:
+
+ (setq R (pq-exec P "SELECT * FROM xemacs_test;"))
+ => #<PGresult PGRES_TUPLES_OK[5] - SELECT>
+
+ The number in brackets indicates how many rows of data are available.
+When the PGresult object is the result of a command query that doesn't
+return anything, it will look like:
+
+ (pq-exec P "CREATE TABLE a_new_table (i int);")
+ => #<PGresult PGRES_COMMAND_OK - CREATE>
+
+ When either the query is a command-type query that can affect a
+number of different rows, but doesn't return any of them it will look
+like:
+
+ (progn
+ (pq-exec P "INSERT INTO a_new_table VALUES (1);")
+ (pq-exec P "INSERT INTO a_new_table VALUES (2);")
+ (pq-exec P "INSERT INTO a_new_table VALUES (3);")
+ (setq R (pq-exec P "DELETE FROM a_new_table;")))
+ => #<PGresult PGRES_COMMAND_OK[3] - DELETE 3>
+
+ Lastly, when the underlying PGresult object has been deallocated
+directly by `pq-clear' the printed representation will look like:
+
+ (progn
+ (setq R (pq-exec P "SELECT * FROM xemacs_test;"))
+ (pq-clear R)
+ R)
+ => #<PGresult DEAD>
+
+ The following set of functions are accessors to various data in the
+PGresult object.
+
+ - Function: pq-result-status result
+ Return status of a query result. RESULT is a PGresult object.
+ The return value is one of the symbols in the following table.
+ `pgres::empty-query'
+ A query contained no text. This is usually the result of a
+ recoverable error, or a minor programming error.
-* CCL Syntax:: CCL program syntax in BNF notation.
-* CCL Statements:: Semantics of CCL statements.
-* CCL Expressions:: Operators and expressions in CCL.
-* Calling CCL:: Running CCL programs.
-* CCL Examples:: The encoding functions for Big5 and KOI-8.
+ `pgres::command-ok'
+ A query command that doesn't return anything was executed
+ properly by the backend.
+
+ `pgres::tuples-ok'
+ A query command that returns tuples was executed properly by
+ the backend.
+
+ `pgres::copy-out'
+ Copy Out data transfer is in progress.
+
+ `pgres::copy-in'
+ Copy In data transfer is in progress.
+
+ `pgres::bad-response'
+ An unexpected response was received from the backend.
+
+ `pgres::nonfatal-error'
+ Undocumented. This value is returned when the libpq function
+ `PQresultStatus' is called with a NULL pointer.
+
+ `pgres::fatal-error'
+ Undocumented. An error has occurred in processing the query
+ and the operation was not completed.
+
+ - Function: pq-res-status result
+ Return the query result status as a string, not a symbol. RESULT
+ is a PGresult object.
+
+ (setq R (pq-exec P "SELECT * FROM xemacs_test;"))
+ => #<PGresult PGRES_TUPLES_OK[5] - SELECT>
+ (pq-res-status R)
+ => "PGRES_TUPLES_OK"
+
+ - Function: pq-result-error-message result
+ Return an error message generated by the query, if any. RESULT is
+ a PGresult object.
+
+ (setq R (pq-exec P "SELECT * FROM xemacs-test;"))
+ => <A fatal error is signaled in the echo area>
+ (pq-result-error-message R)
+ => "ERROR: parser: parse error at or near \"-\"
+ "
+
+ - Function: pq-ntuples result
+ Return the number of tuples in the query result. RESULT is a
+ PGresult object.
+
+ (setq R (pq-exec P "SELECT * FROM xemacs_test;"))
+ => #<PGresult PGRES_TUPLES_OK[5] - SELECT>
+ (pq-ntuples R)
+ => 5
+
+ - Function: pq-nfields result
+ Return the number of fields in each tuple of the query result.
+ RESULT is a PGresult object.
+
+ (setq R (pq-exec P "SELECT * FROM xemacs_test;"))
+ => #<PGresult PGRES_TUPLES_OK[5] - SELECT>
+ (pq-nfields R)
+ => 3
+
+ - Function: pq-binary-tuples result
+ Returns t if binary tuples are present in the results, nil
+ otherwise. RESULT is a PGresult object.
+
+ (setq R (pq-exec P "SELECT * FROM xemacs_test;"))
+ => #<PGresult PGRES_TUPLES_OK[5] - SELECT>
+ (pq-binary-tuples R)
+ => nil
+
+ - Function: pq-fname result field-index
+ Returns the name of a specific field. RESULT is a PGresult object.
+ FIELD-INDEX is the number of the column to select from. The first
+ column is number zero.
+
+ (let (i l)
+ (setq R (pq-exec P "SELECT * FROM xemacs_test;"))
+ (setq i (pq-nfields R))
+ (while (>= (decf i) 0)
+ (push (pq-fname R i) l))
+ l)
+ => ("id" "shikona" "rank")
+
+ - Function: pq-fnumber result field-name
+ Return the field number corresponding to the given field name. -1
+ is returned on a bad field name. RESULT is a PGresult object.
+ FIELD-NAME is a string representing the field name to find.
+ (setq R (pq-exec P "SELECT * FROM xemacs_test;"))
+ => #<PGresult PGRES_TUPLES_OK[5] - SELECT>
+ (pq-fnumber R "id")
+ => 0
+ (pq-fnumber R "Not a field")
+ => -1
+
+ - Function: pq-ftype result field-num
+ Return an integer code representing the data type of the specified
+ column. RESULT is a PGresult object. FIELD-NUM is the field
+ number.
+
+ The return value of this function is the Object ID (Oid) in the
+ database of the type. Further queries need to be made to various
+ system tables in order to convert this value into something useful.
+
+ - Function: pq-fmod result field-num
+ Return the type modifier code associated with a field. Field
+ numbers start at zero. RESULT is a PGresult object. FIELD-INDEX
+ selects which field to use.
+
+ - Function: pq-fsize result field-index
+ Return size of the given field. RESULT is a PGresult object.
+ FIELD-INDEX selects which field to use.
+
+ (let (i l)
+ (setq R (pq-exec P "SELECT * FROM xemacs_test;"))
+ (setq i (pq-nfields R))
+ (while (>= (decf i) 0)
+ (push (list (pq-ftype R i) (pq-fsize R i)) l))
+ l)
+ => ((23 23) (25 25) (25 25))
+
+ - Function: pq-get-value result tup-num field-num
+ Retrieve a return value. RESULT is a PGresult object. TUP-NUM
+ selects which tuple to fetch from. FIELD-NUM selects which field
+ to fetch from.
+
+ Both tuples and fields are numbered from zero.
+
+ (setq R (pq-exec P "SELECT * FROM xemacs_test;"))
+ => #<PGresult PGRES_TUPLES_OK[5] - SELECT>
+ (pq-get-value R 0 1)
+ => "Musashimaru"
+ (pq-get-value R 1 1)
+ => "Dejima"
+ (pq-get-value R 2 1)
+ => "Musoyama"
+
+ - Function: pq-get-length result tup-num field-num
+ Return the length of a specific value. RESULT is a PGresult
+ object. TUP-NUM selects which tuple to fetch from. FIELD-NUM
+ selects which field to fetch from.
+
+ (setq R (pq-exec P "SELECT * FROM xemacs_test;"))
+ => #<PGresult PGRES_TUPLES_OK[5] - SELECT>
+ (pq-get-length R 0 1)
+ => 11
+ (pq-get-length R 1 1)
+ => 6
+ (pq-get-length R 2 1)
+ => 8
+
+ - Function: pq-get-is-null result tup-num field-num
+ Return t if the specific value is the SQL NULL. RESULT is a
+ PGresult object. TUP-NUM selects which tuple to fetch from.
+ FIELD-NUM selects which field to fetch from.
+
+ - Function: pq-cmd-status result
+ Return a summary string from the query. RESULT is a PGresult
+ object.
+ (pq-exec P "INSERT INTO xemacs_test
+ VALUES (6, 'Wakanohana', 'Yokozuna');")
+ => #<PGresult PGRES_COMMAND_OK[1] - INSERT 542086 1>
+ (pq-cmd-status R)
+ => "INSERT 542086 1"
+ (setq R (pq-exec P "UPDATE xemacs_test SET rank='retired'
+ WHERE shikona='Wakanohana';"))
+ => #<PGresult PGRES_COMMAND_OK[1] - UPDATE 1>
+ (pq-cmd-status R)
+ => "UPDATE 1"
+
+ Note that the first number returned from an insertion, like in the
+ example, is an object ID number and will almost certainly vary from
+ system to system since object ID numbers in Postgres must be unique
+ across all databases.
+
+ - Function: pq-cmd-tuples result
+ Return the number of tuples if the last command was an
+ INSERT/UPDATE/DELETE. If the last command was something else, the
+ empty string is returned. RESULT is a PGresult object.
+
+ (setq R (pq-exec P "INSERT INTO xemacs_test VALUES
+ (7, 'Takanohana', 'Yokuzuna');"))
+ => #<PGresult PGRES_COMMAND_OK[1] - INSERT 38688 1>
+ (pq-cmd-tuples R)
+ => "1"
+ (setq R (pq-exec P "SELECT * from xemacs_test;"))
+ => #<PGresult PGRES_TUPLES_OK[7] - SELECT>
+ (pq-cmd-tuples R)
+ => ""
+ (setq R (pq-exec P "DELETE FROM xemacs_test
+ WHERE shikona LIKE '%hana';"))
+ => #<PGresult PGRES_COMMAND_OK[2] - DELETE 2>
+ (pq-cmd-tuples R)
+ => "2"
+
+ - Function: pq-oid-value result
+ Return the object id of the insertion if the last command was an
+ INSERT. 0 is returned if the last command was not an insertion.
+ RESULT is a PGresult object.
+
+ In the first example, the numbers you will see on your local
+ system will almost certainly be different, however the second
+ number from the right in the unprintable PGresult object and the
+ number returned by `pq-oid-value' should match.
+ (setq R (pq-exec P "INSERT INTO xemacs_test VALUES
+ (8, 'Terao', 'Maegashira');"))
+ => #<PGresult PGRES_COMMAND_OK[1] - INSERT 542089 1>
+ (pq-oid-value R)
+ => 542089
+ (setq R (pq-exec P "SELECT shikona FROM xemacs_test
+ WHERE rank='Maegashira';"))
+ => #<PGresult PGRES_TUPLES_OK[2] - SELECT>
+ (pq-oid-value R)
+ => 0
+
+ - Function: pq-make-empty-pgresult conn status
+ Create an empty pgresult with the given status. CONN a database
+ connection object STATUS a value that can be returned by
+ `pq-result-status'.
+
+ The caller is responsible for making sure the return value gets
+ properly freed.
\1f
-File: lispref.info, Node: CCL Syntax, Next: CCL Statements, Prev: CCL, Up: CCL
-
-CCL Syntax
-----------
-
- The full syntax of a CCL program in BNF notation:
-
-CCL_PROGRAM :=
- (BUFFER_MAGNIFICATION
- CCL_MAIN_BLOCK
- [ CCL_EOF_BLOCK ])
-
-BUFFER_MAGNIFICATION := integer
-CCL_MAIN_BLOCK := CCL_BLOCK
-CCL_EOF_BLOCK := CCL_BLOCK
-
-CCL_BLOCK :=
- STATEMENT | (STATEMENT [STATEMENT ...])
-STATEMENT :=
- SET | IF | BRANCH | LOOP | REPEAT | BREAK | READ | WRITE
- | CALL | END
-
-SET :=
- (REG = EXPRESSION)
- | (REG ASSIGNMENT_OPERATOR EXPRESSION)
- | integer
-
-EXPRESSION := ARG | (EXPRESSION OPERATOR ARG)
-
-IF := (if EXPRESSION CCL_BLOCK [CCL_BLOCK])
-BRANCH := (branch EXPRESSION CCL_BLOCK [CCL_BLOCK ...])
-LOOP := (loop STATEMENT [STATEMENT ...])
-BREAK := (break)
-REPEAT :=
- (repeat)
- | (write-repeat [REG | integer | string])
- | (write-read-repeat REG [integer | ARRAY])
-READ :=
- (read REG ...)
- | (read-if (REG OPERATOR ARG) CCL_BLOCK CCL_BLOCK)
- | (read-branch REG CCL_BLOCK [CCL_BLOCK ...])
-WRITE :=
- (write REG ...)
- | (write EXPRESSION)
- | (write integer) | (write string) | (write REG ARRAY)
- | string
-CALL := (call ccl-program-name)
-END := (end)
-
-REG := r0 | r1 | r2 | r3 | r4 | r5 | r6 | r7
-ARG := REG | integer
-OPERATOR :=
- + | - | * | / | % | & | '|' | ^ | << | >> | <8 | >8 | //
- | < | > | == | <= | >= | != | de-sjis | en-sjis
-ASSIGNMENT_OPERATOR :=
- += | -= | *= | /= | %= | &= | '|=' | ^= | <<= | >>=
-ARRAY := '[' integer ... ']'
+File: lispref.info, Node: Synchronous Interface Functions, Next: Asynchronous Interface Functions, Prev: libpq Lisp Symbols and DataTypes, Up: XEmacs PostgreSQL libpq API
+
+Synchronous Interface Functions
+-------------------------------
+
+ - Function: pq-connectdb conninfo
+ Establish a (synchronous) database connection. CONNINFO A string
+ of blank separated options. Options are of the form "OPTION =
+ VALUE". If VALUE contains blanks, it must be single quoted.
+ Blanks around the equal sign are optional. Multiple option
+ assignments are blank separated.
+ (pq-connectdb "dbname=japanese port = 25432")
+ => #<PGconn localhost:25432 steve/japanese>
+ The printed representation of a database connection object has four
+ fields. The first field is the hostname where the database server
+ is running (in this case localhost), the second field is the port
+ number, the third field is the database user name, and the fourth
+ field is the name of the database.
+
+ Database connection objects which have been disconnected and will
+ generate an immediate error if they are used look like:
+ #<PGconn BAD>
+ Bad connections can be reestablished with `pq-reset', or deleted
+ entirely with `pq-finish'.
+
+ A database connection object that has been deleted looks like:
+ (let ((P1 (pq-connectdb "")))
+ (pq-finish P1)
+ P1)
+ => #<PGconn DEAD>
+
+ Note that database connection objects are the most heavy weight
+ objects in XEmacs Lisp at this writing, usually representing as
+ much as several megabytes of virtual memory on the machine the
+ database server is running on. It is wisest to explicitly delete
+ them when you are finished with them, rather than letting garbage
+ collection do it. An example idiom is:
+
+ (let ((P (pq-connectiondb "")))
+ (unwind-protect
+ (progn
+ (...)) ; access database here
+ (pq-finish P)))
+
+ The following options are available in the options string:
+ `authtype'
+ Authentication type. Same as PGAUTHTYPE. This is no longer
+ used.
+
+ `user'
+ Database user name. Same as PGUSER.
+
+ `password'
+ Database password.
+
+ `dbname'
+ Database name. Same as PGDATABASE
+
+ `host'
+ Symbolic hostname. Same as PGHOST.
+
+ `hostaddr'
+ Host address as four octets (eg. like 192.168.1.1).
+
+ `port'
+ TCP port to connect to. Same as PGPORT.
+
+ `tty'
+ Debugging TTY. Same as PGTTY. This value is suppressed in
+ the XEmacs Lisp API.
+
+ `options'
+ Extra backend database options. Same as PGOPTIONS. A
+ database connection object is returned regardless of whether a
+ connection was established or not.
+
+ - Function: pq-reset conn
+ Reestablish database connection. CONN A database connection
+ object.
+
+ This function reestablishes a database connection using the
+ original connection parameters. This is useful if something has
+ happened to the TCP link and it has become broken.
+
+ - Function: pq-exec conn query
+ Make a synchronous database query. CONN A database connection
+ object. QUERY A string containing an SQL query. A PGresult
+ object is returned, which in turn may be queried by its many
+ accessor functions to retrieve state out of it. If the query
+ string contains multiple SQL commands, only results from the final
+ command are returned.
+
+ (setq R (pq-exec P "SELECT * FROM xemacs_test;
+ DELETE FROM xemacs_test WHERE id=8;"))
+ => #<PGresult PGRES_COMMAND_OK[1] - DELETE 1>
+
+ - Function: pq-notifies conn
+ Return the latest async notification that has not yet been handled.
+ CONN A database connection object. If there has been a
+ notification, then a list of two elements will be returned. The
+ first element contains the relation name being notified, the second
+ element contains the backend process ID number. nil is returned
+ if there aren't any notifications to process.
+
+ - Function: PQsetenv conn
+ Synchronous transfer of environment variables to a backend CONN A
+ database connection object.
+
+ Environment variable transfer is done as a normal part of database
+ connection.
+
+ Compatibility note: This function was present but not documented
+ in versions of libpq prior to 7.0.
\1f
-File: lispref.info, Node: CCL Statements, Next: CCL Expressions, Prev: CCL Syntax, Up: CCL
+File: lispref.info, Node: Asynchronous Interface Functions, Next: Large Object Support, Prev: Synchronous Interface Functions, Up: XEmacs PostgreSQL libpq API
-CCL Statements
---------------
+Asynchronous Interface Functions
+--------------------------------
+
+ Making command by command examples is too complex with the
+asynchronous interface functions. See the examples section for
+complete calling sequences.
+
+ - Function: pq-connect-start conninfo
+ Begin establishing an asynchronous database connection. CONNINFO
+ A string containing the connection options. See the documentation
+ of `pq-connectdb' for a listing of all the available flags.
+
+ - Function: pq-connect-poll conn
+ An intermediate function to be called during an asynchronous
+ database connection. CONN A database connection object. The
+ result codes are documented in a previous section.
+
+ - Function: pq-is-busy conn
+ Returns t if `pq-get-result' would block waiting for input. CONN
+ A database connection object.
+
+ - Function: pq-consume-input conn
+ Consume any available input from the backend. CONN A database
+ connection object.
+
+ Nil is returned if anything bad happens.
+
+ - Function: pq-reset-start conn
+ Reset connection to the backend asynchronously. CONN A database
+ connection object.
+
+ - Function: pq-reset-poll conn
+ Poll an asynchronous reset for completion CONN A database
+ connection object.
+
+ - Function: pq-reset-cancel conn
+ Attempt to request cancellation of the current operation. CONN A
+ database connection object.
+
+ The return value is t if the cancel request was successfully
+ dispatched, nil if not (in which case conn->errorMessage is set).
+ Note: successful dispatch is no guarantee that there will be any
+ effect at the backend. The application must read the operation
+ result as usual.
+
+ - Function: pq-send-query conn query
+ Submit a query to Postgres and don't wait for the result. CONN A
+ database connection object. Returns: t if successfully submitted
+ nil if error (conn->errorMessage is set)
+
+ - Function: pq-get-result conn
+ Retrieve an asynchronous result from a query. CONN A database
+ connection object.
- The Emacs Code Conversion Language provides the following statement
-types: "set", "if", "branch", "loop", "repeat", "break", "read",
-"write", "call", and "end".
-
-Set statement:
-==============
-
- The "set" statement has three variants with the syntaxes `(REG =
-EXPRESSION)', `(REG ASSIGNMENT_OPERATOR EXPRESSION)', and `INTEGER'.
-The assignment operator variation of the "set" statement works the same
-way as the corresponding C expression statement does. The assignment
-operators are `+=', `-=', `*=', `/=', `%=', `&=', `|=', `^=', `<<=',
-and `>>=', and they have the same meanings as in C. A "naked integer"
-INTEGER is equivalent to a SET statement of the form `(r0 = INTEGER)'.
-
-I/O statements:
-===============
-
- The "read" statement takes one or more registers as arguments. It
-reads one byte (a C char) from the input into each register in turn.
-
- The "write" takes several forms. In the form `(write REG ...)' it
-takes one or more registers as arguments and writes each in turn to the
-output. The integer in a register (interpreted as an Emchar) is
-encoded to multibyte form (ie, Bufbytes) and written to the current
-output buffer. If it is less than 256, it is written as is. The forms
-`(write EXPRESSION)' and `(write INTEGER)' are treated analogously.
-The form `(write STRING)' writes the constant string to the output. A
-"naked string" `STRING' is equivalent to the statement `(write
-STRING)'. The form `(write REG ARRAY)' writes the REGth element of the
-ARRAY to the output.
-
-Conditional statements:
-=======================
-
- The "if" statement takes an EXPRESSION, a CCL BLOCK, and an optional
-SECOND CCL BLOCK as arguments. If the EXPRESSION evaluates to
-non-zero, the first CCL BLOCK is executed. Otherwise, if there is a
-SECOND CCL BLOCK, it is executed.
-
- The "read-if" variant of the "if" statement takes an EXPRESSION, a
-CCL BLOCK, and an optional SECOND CCL BLOCK as arguments. The
-EXPRESSION must have the form `(REG OPERATOR OPERAND)' (where OPERAND is
-a register or an integer). The `read-if' statement first reads from
-the input into the first register operand in the EXPRESSION, then
-conditionally executes a CCL block just as the `if' statement does.
-
- The "branch" statement takes an EXPRESSION and one or more CCL
-blocks as arguments. The CCL blocks are treated as a zero-indexed
-array, and the `branch' statement uses the EXPRESSION as the index of
-the CCL block to execute. Null CCL blocks may be used as no-ops,
-continuing execution with the statement following the `branch'
-statement in the containing CCL block. Out-of-range values for the
-EXPRESSION are also treated as no-ops.
-
- The "read-branch" variant of the "branch" statement takes an
-REGISTER, a CCL BLOCK, and an optional SECOND CCL BLOCK as arguments.
-The `read-branch' statement first reads from the input into the
-REGISTER, then conditionally executes a CCL block just as the `branch'
-statement does.
-
-Loop control statements:
-========================
-
- The "loop" statement creates a block with an implied jump from the
-end of the block back to its head. The loop is exited on a `break'
-statement, and continued without executing the tail by a `repeat'
-statement.
-
- The "break" statement, written `(break)', terminates the current
-loop and continues with the next statement in the current block.
-
- The "repeat" statement has three variants, `repeat', `write-repeat',
-and `write-read-repeat'. Each continues the current loop from its
-head, possibly after performing I/O. `repeat' takes no arguments and
-does no I/O before jumping. `write-repeat' takes a single argument (a
-register, an integer, or a string), writes it to the output, then jumps.
-`write-read-repeat' takes one or two arguments. The first must be a
-register. The second may be an integer or an array; if absent, it is
-implicitly set to the first (register) argument. `write-read-repeat'
-writes its second argument to the output, then reads from the input
-into the register, and finally jumps. See the `write' and `read'
-statements for the semantics of the I/O operations for each type of
-argument.
-
-Other control statements:
-=========================
-
- The "call" statement, written `(call CCL-PROGRAM-NAME)', executes a
-CCL program as a subroutine. It does not return a value to the caller,
-but can modify the register status.
-
- The "end" statement, written `(end)', terminates the CCL program
-successfully, and returns to caller (which may be a CCL program). It
-does not alter the status of the registers.
+ NIL is returned when no more query work remains.
+
+ - Function: pq-set-nonblocking conn arg
+ Sets the PGconn's database connection non-blocking if the arg is
+ TRUE or makes it non-blocking if the arg is FALSE, this will not
+ protect you from PQexec(), you'll only be safe when using the
+ non-blocking API. CONN A database connection object.
+
+ - Function: pq-is-nonblocking conn
+ Return the blocking status of the database connection CONN A
+ database connection object.
+
+ - Function: pq-flush conn
+ Force the write buffer to be written (or at least try) CONN A
+ database connection object.
+
+ - Function: PQsetenvStart conn
+ Start asynchronously passing environment variables to a backend.
+ CONN A database connection object.
+
+ Compatibility note: this function is only available with libpq-7.0.
+
+ - Function: PQsetenvPoll conn
+ Check an asynchronous enviroment variables transfer for completion.
+ CONN A database connection object.
+
+ Compatibility note: this function is only available with libpq-7.0.
+
+ - Function: PQsetenvAbort conn
+ Attempt to terminate an asynchronous environment variables
+ transfer. CONN A database connection object.
+
+ Compatibility note: this function is only available with libpq-7.0.
\1f
-File: lispref.info, Node: CCL Expressions, Next: Calling CCL, Prev: CCL Statements, Up: CCL
-
-CCL Expressions
----------------
-
- CCL, unlike Lisp, uses infix expressions. The simplest CCL
-expressions consist of a single OPERAND, either a register (one of `r0',
-..., `r0') or an integer. Complex expressions are lists of the form `(
-EXPRESSION OPERATOR OPERAND )'. Unlike C, assignments are not
-expressions.
-
- In the following table, X is the target resister for a "set". In
-subexpressions, this is implicitly `r7'. This means that `>8', `//',
-`de-sjis', and `en-sjis' cannot be used freely in subexpressions, since
-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))
-
- 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_ENCODE_SJIS and CCL_DECODE_SJIS treat their first and second bytes
-as the high and low bytes of a two-byte character code. (SJIS stands
-for Shift JIS, an encoding of Japanese characters used by Microsoft.
-CCL_ENCODE_SJIS is a complicated transformation of the Japanese
-standard JIS encoding to Shift JIS. CCL_DECODE_SJIS is its inverse.)
-It is somewhat odd to represent the SJIS operations in infix form.
+File: lispref.info, Node: Large Object Support, Next: Other libpq Functions, Prev: Asynchronous Interface Functions, Up: XEmacs PostgreSQL libpq API
+
+Large Object Support
+--------------------
+
+ - Function: pq-lo-import conn filename
+ Import a file as a large object into the database. CONN a
+ database connection object FILENAME filename to import
+
+ On success, the object id is returned.
+
+ - Function: pq-lo-export conn oid filename
+ Copy a large object in the database into a file. CONN a database
+ connection object. OID object id number of a large object.
+ FILENAME filename to export to.
\1f
-File: lispref.info, Node: Calling CCL, Next: CCL Examples, Prev: CCL Expressions, Up: CCL
-
-Calling CCL
------------
-
- CCL programs are called automatically during Emacs buffer I/O when
-the external representation has a coding system type of `shift-jis',
-`big5', or `ccl'. The program is specified by the coding system (*note
-Coding Systems::). You can also call CCL programs from other CCL
-programs, and from Lisp using these functions:
-
- - 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
- CCL I/O command. STATUS must be a vector of nine values,
- specifying the initial value for the R0, R1 .. R7 registers and
- for the instruction counter IC. A `nil' value for a register
- initializer causes the register to be set to 0. A `nil' value for
- the IC initializer causes execution to start at the beginning of
- the program. When the program is done, STATUS is modified (by
- side-effect) to contain the ending values for the corresponding
- registers and IC.
-
- - 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
- the R0, R1 .. R7 registers and for the instruction counter IC. A
- `nil' value for a register initializer causes the register to be
- set to 0. A `nil' value for the IC initializer causes execution
- to start at the beginning of the program. An optional fourth
- argument CONTINUE, if non-nil, causes the IC to remain on the
- unsatisfied read operation if the program terminates due to
- exhaustion of the input buffer. Otherwise the IC is set to the end
- of the program. When the program is done, STATUS is modified (by
- side-effect) to contain the ending values for the corresponding
- registers and IC. Returns the resulting string.
-
- To call a CCL program from another CCL program, it must first be
-registered:
-
- - 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.
-
- Information about the processor time used by the CCL interpreter can
-be obtained using these functions:
-
- - Function: ccl-elapsed-time
- Returns the elapsed processor time of the CCL interpreter as cons
- of user and system time, as floating point numbers measured in
- seconds. If only one overall value can be determined, the return
- value will be a cons of that value and 0.
-
- - Function: ccl-reset-elapsed-time
- Resets the CCL interpreter's internal elapsed time registers.
+File: lispref.info, Node: Other libpq Functions, Next: Unimplemented libpq Functions, Prev: Large Object Support, Up: XEmacs PostgreSQL libpq API
+
+Other libpq Functions
+---------------------
+
+ - Function: pq-finish conn
+ Destroy a database connection object by calling free on it. CONN
+ a database connection object
+
+ It is possible to not call this routine because the usual XEmacs
+ garbage collection mechanism will call the underlying libpq
+ routine whenever it is releasing stale `PGconn' objects. However,
+ this routine is useful in `unwind-protect' clauses to make
+ connections go away quickly when unrecoverable errors have
+ occurred.
+
+ After calling this routine, the printed representation of the
+ XEmacs wrapper object will contain the string "DEAD".
+
+ - Function: pq-client-encoding conn
+ Return the client encoding as an integer code. CONN a database
+ connection object
+
+ (pq-client-encoding P)
+ => 1
+
+ Compatibility note: This function did not exist prior to libpq-7.0
+ and does not exist in a non-Mule XEmacs.
+
+ - Function: pq-set-client-encoding conn encoding
+ Set client coding system. CONN a database connection object
+ ENCODING a string representing the desired coding system
+
+ (pq-set-client-encoding P "EUC_JP")
+ => 0
+
+ The current idiom for ensuring proper coding system conversion is
+ the following (illustrated for EUC Japanese encoding):
+ (setq P (pq-connectdb "..."))
+ (let ((file-name-coding-system 'euc-jp)
+ (pg-coding-system 'euc-jp))
+ (pq-set-client-encoding "EUC_JP")
+ ...)
+ (pq-finish P)
+ Compatibility note: This function did not exist prior to libpq-7.0
+ and does not exist in a non-Mule XEmacs.
+
+ - Function: pq-env-2-encoding
+ Return the integer code representing the coding system in
+ PGCLIENTENCODING.
+
+ (pq-env-2-encoding)
+ => 0
+ Compatibility note: This function did not exist prior to libpq-7.0
+ and does not exist in a non-Mule XEmacs.
+
+ - Function: pq-clear res
+ Destroy a query result object by calling free() on it. RES a
+ query result object
+
+ Note: The memory allocation systems of libpq and XEmacs are
+ different. The XEmacs representation of a query result object
+ will have both the XEmacs version and the libpq version freed at
+ the next garbage collection when the object is no longer being
+ referenced. Calling this function does not release the XEmacs
+ object, it is still subject to the usual rules for Lisp objects.
+ The printed representation of the XEmacs object will contain the
+ string "DEAD" after this routine is called indicating that it is no
+ longer useful for anything.
+
+ - Function: pq-conn-defaults
+ Return a data structure that represents the connection defaults.
+ The data is returned as a list of lists, where each sublist
+ contains info regarding a single option.
\1f
-File: lispref.info, Node: CCL Examples, Prev: Calling CCL, Up: CCL
+File: lispref.info, Node: Unimplemented libpq Functions, Prev: Other libpq Functions, Up: XEmacs PostgreSQL libpq API
-CCL Examples
-------------
+Unimplemented libpq Functions
+-----------------------------
- This section is not yet written.
+ - Unimplemented Function: PGconn *PQsetdbLogin (char *pghost, char
+ *pgport, char *pgoptions, char *pgtty, char *dbName, char
+ *login, char *pwd)
+ Synchronous database connection. PGHOST is the hostname of the
+ PostgreSQL backend to connect to. PGPORT is the TCP port number
+ to use. PGOPTIONS specifies other backend options. PGTTY
+ specifies the debugging tty to use. DBNAME specifies the database
+ name to use. LOGIN specifies the database user name. PWD
+ specifies the database user's password.
+
+ This routine is deprecated as of libpq-7.0, and its functionality
+ can be replaced by external Lisp code if needed.
+
+ - Unimplemented Function: PGconn *PQsetdb (char *pghost, char *pgport,
+ char *pgoptions, char *pgtty, char *dbName)
+ Synchronous database connection. PGHOST is the hostname of the
+ PostgreSQL backend to connect to. PGPORT is the TCP port number
+ to use. PGOPTIONS specifies other backend options. PGTTY
+ specifies the debugging tty to use. DBNAME specifies the database
+ name to use.
+
+ This routine was deprecated in libpq-6.5.
+
+ - Unimplemented Function: int PQsocket (PGconn *conn)
+ Return socket file descriptor to a backend database process. CONN
+ database connection object.
+
+ - Unimplemented Function: void PQprint (FILE *fout, PGresult *res,
+ PGprintOpt *ps)
+ Print out the results of a query to a designated C stream. FOUT C
+ stream to print to RES the query result object to print PS the
+ print options structure.
+
+ This routine is deprecated as of libpq-7.0 and cannot be sensibly
+ exported to XEmacs Lisp.
+
+ - Unimplemented Function: void PQdisplayTuples (PGresult *res, FILE
+ *fp, int fillAlign, char *fieldSep, int printHeader, int
+ quiet)
+ RES query result object to print FP C stream to print to FILLALIGN
+ pad the fields with spaces FIELDSEP field separator PRINTHEADER
+ display headers? QUIET
+
+ This routine was deprecated in libpq-6.5.
+
+ - Unimplemented Function: void PQprintTuples (PGresult *res, FILE
+ *fout, int printAttName, int terseOutput, int width)
+ RES query result object to print FOUT C stream to print to
+ PRINTATTNAME print attribute names TERSEOUTPUT delimiter bars
+ WIDTH width of column, if 0, use variable width
+
+ This routine was deprecated in libpq-6.5.
+
+ - Unimplemented Function: int PQmblen (char *s, int encoding)
+ Determine length of a multibyte encoded char at `*s'. S encoded
+ string ENCODING type of encoding
+
+ Compatibility note: This function was introduced in libpq-7.0.
+
+ - Unimplemented Function: void PQtrace (PGconn *conn, FILE *debug_port)
+ Enable tracing on `debug_port'. CONN database connection object.
+ DEBUG_PORT C output stream to use.
+
+ - Unimplemented Function: void PQuntrace (PGconn *conn)
+ Disable tracing. CONN database connection object.
+
+ - Unimplemented Function: char *PQoidStatus (PGconn *conn)
+ Return the object id as a string of the last tuple inserted. CONN
+ database connection object.
+
+ Compatibility note: This function is deprecated in libpq-7.0,
+ however it is used internally by the XEmacs binding code when
+ linked against versions prior to 7.0.
+
+ - Unimplemented Function: PGresult *PQfn (PGconn *conn, int fnid, int
+ *result_buf, int *result_len, int result_is_int, PQArgBlock
+ *args, int nargs)
+ "Fast path" interface -- not really recommended for application use
+ CONN A database connection object. FNID RESULT_BUF RESULT_LEN
+ RESULT_IS_INT ARGS NARGS
+
+ The following set of very low level large object functions aren't
+appropriate to be exported to Lisp.
+
+ - Unimplemented Function: int pq-lo-open (PGconn *conn, int lobjid,
+ int mode)
+ CONN a database connection object. LOBJID a large object ID.
+ MODE opening modes.
+
+ - Unimplemented Function: int pq-lo-close (PGconn *conn, int fd)
+ CONN a database connection object. FD a large object file
+ descriptor
+
+ - Unimplemented Function: int pq-lo-read (PGconn *conn, int fd, char
+ *buf, int len)
+ CONN a database connection object. FD a large object file
+ descriptor. BUF buffer to read into. LEN size of buffer.
+
+ - Unimplemented Function: int pq-lo-write (PGconn *conn, int fd, char
+ *buf, size_t len)
+ CONN a database connection object. FD a large object file
+ descriptor. BUF buffer to write from. LEN size of buffer.
+
+ - Unimplemented Function: int pq-lo-lseek (PGconn *conn, int fd, int
+ offset, int whence)
+ CONN a database connection object. FD a large object file
+ descriptor. OFFSET WHENCE
-\1f
-File: lispref.info, Node: Category Tables, Prev: CCL, Up: MULE
-
-Category Tables
-===============
-
- A category table is a type of char table used for keeping track of
-categories. Categories are used for classifying characters for use in
-regexps--you can refer to a category rather than having to use a
-complicated [] expression (and category lookups are significantly
-faster).
-
- There are 95 different categories available, one for each printable
-character (including space) in the ASCII charset. Each category is
-designated by one such character, called a "category designator". They
-are specified in a regexp using the syntax `\cX', where X is a category
-designator. (This is not yet implemented.)
-
- A category table specifies, for each character, the categories that
-the character is in. Note that a character can be in more than one
-category. More specifically, a category table maps from a character to
-either the value `nil' (meaning the character is in no categories) or a
-95-element bit vector, specifying for each of the 95 categories whether
-the character is in that category.
-
- Special Lisp functions are provided that abstract this, so you do not
-have to directly manipulate bit vectors.
-
- - Function: category-table-p obj
- This function returns `t' if ARG is a category table.
-
- - 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'.
-
- - Function: standard-category-table
- This function returns the standard category table. This is the
- one used for new buffers.
-
- - 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
- 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
- This function returns `t' if ARG is a category designator (a char
- in the range `' '' to `'~'').
-
- - 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.
+ - Unimplemented Function: int pq-lo-creat (PGconn *conn, int mode)
+ CONN a database connection object. MODE opening modes.
+
+ - Unimplemented Function: int pq-lo-tell (PGconn *conn, int fd)
+ CONN a database connection object. FD a large object file
+ descriptor.
+
+ - Unimplemented Function: int pq-lo-unlink (PGconn *conn, int lobjid)
+ CONN a database connection object. LBOJID a large object ID.
\1f
-File: lispref.info, Node: Tips, Next: Building XEmacs and Object Allocation, Prev: MULE, Up: Top
+File: lispref.info, Node: XEmacs PostgreSQL libpq Examples, Prev: XEmacs PostgreSQL libpq API, Up: PostgreSQL Support
+
+XEmacs PostgreSQL libpq Examples
+================================
+
+ This is an example of one method of establishing an asynchronous
+connection.
+
+ (defun database-poller (P)
+ (message "%S before poll" (pq-pgconn P 'pq::status))
+ (pq-connect-poll P)
+ (message "%S after poll" (pq-pgconn P 'pq::status))
+ (if (eq (pq-pgconn P 'pq::status) 'pg::connection-ok)
+ (message "Done!")
+ (add-timeout .1 'database-poller P)))
+ => database-poller
+ (progn
+ (setq P (pq-connect-start ""))
+ (add-timeout .1 'database-poller P))
+ => pg::connection-started before poll
+ => pg::connection-made after poll
+ => pg::connection-made before poll
+ => pg::connection-awaiting-response after poll
+ => pg::connection-awaiting-response before poll
+ => pg::connection-auth-ok after poll
+ => pg::connection-auth-ok before poll
+ => pg::connection-setenv after poll
+ => pg::connection-setenv before poll
+ => pg::connection-ok after poll
+ => Done!
+ P
+ => #<PGconn localhost:25432 steve/steve>
+
+ Here is an example of one method of doing an asynchronous reset.
+
+ (defun database-poller (P)
+ (let (PS)
+ (message "%S before poll" (pq-pgconn P 'pq::status))
+ (setq PS (pq-reset-poll P))
+ (message "%S after poll [%S]" (pq-pgconn P 'pq::status) PS)
+ (if (eq (pq-pgconn P 'pq::status) 'pg::connection-ok)
+ (message "Done!")
+ (add-timeout .1 'database-poller P))))
+ => database-poller
+ (progn
+ (pq-reset-start P)
+ (add-timeout .1 'database-poller P))
+ => pg::connection-started before poll
+ => pg::connection-made after poll [pgres::polling-writing]
+ => pg::connection-made before poll
+ => pg::connection-awaiting-response after poll [pgres::polling-reading]
+ => pg::connection-awaiting-response before poll
+ => pg::connection-setenv after poll [pgres::polling-reading]
+ => pg::connection-setenv before poll
+ => pg::connection-ok after poll [pgres::polling-ok]
+ => Done!
+ P
+ => #<PGconn localhost:25432 steve/steve>
+
+ And finally, an asynchronous query.
+
+ (defun database-poller (P)
+ (let (R)
+ (pq-consume-input P)
+ (if (pq-is-busy P)
+ (add-timeout .1 'database-poller P)
+ (setq R (pq-get-result P))
+ (if R
+ (progn
+ (push R result-list)
+ (add-timeout .1 'database-poller P))))))
+ => database-poller
+ (when (pq-send-query P "SELECT * FROM xemacs_test;")
+ (setq result-list nil)
+ (add-timeout .1 'database-poller P))
+ => 885
+ ;; wait a moment
+ result-list
+ => (#<PGresult PGRES_TUPLES_OK - SELECT>)
+
+ Here is an example showing how multiple SQL statements in a single
+query can have all their results collected.
+ ;; Using the same `database-poller' function from the previous example
+ (when (pq-send-query P "SELECT * FROM xemacs_test;
+ SELECT * FROM pg_database;
+ SELECT * FROM pg_user;")
+ (setq result-list nil)
+ (add-timeout .1 'database-poller P))
+ => 1782
+ ;; wait a moment
+ result-list
+ => (#<PGresult PGRES_TUPLES_OK - SELECT> #<PGresult PGRES_TUPLES_OK - SELECT> #<PGresult PGRES_TUPLES_OK - SELECT>)
+
+ Here is an example which illustrates collecting all data from a
+query, including the field names.
+
+ (defun pg-util-query-results (results)
+ "Retrieve results of last SQL query into a list structure."
+ (let ((i (1- (pq-ntuples R)))
+ j l1 l2)
+ (while (>= i 0)
+ (setq j (1- (pq-nfields R)))
+ (setq l2 nil)
+ (while (>= j 0)
+ (push (pq-get-value R i j) l2)
+ (decf j))
+ (push l2 l1)
+ (decf i))
+ (setq j (1- (pq-nfields R)))
+ (setq l2 nil)
+ (while (>= j 0)
+ (push (pq-fname R j) l2)
+ (decf j))
+ (push l2 l1)
+ l1))
+ => pg-util-query-results
+ (setq R (pq-exec P "SELECT * FROM xemacs_test ORDER BY field2 DESC;"))
+ => #<PGresult PGRES_TUPLES_OK - SELECT>
+ (pg-util-query-results R)
+ => (("f1" "field2") ("a" "97") ("b" "97") ("stuff" "42") ("a string" "12") ("foo" "10") ("string" "2") ("text" "1"))
+
+ Here is an example of a query that uses a database cursor.
+
+ (let (data R)
+ (setq R (pq-exec P "BEGIN;"))
+ (setq R (pq-exec P "DECLARE k_cursor CURSOR FOR SELECT * FROM xemacs_test ORDER BY f1 DESC;"))
+
+ (setq R (pq-exec P "FETCH k_cursor;"))
+ (while (eq (pq-ntuples R) 1)
+ (push (list (pq-get-value R 0 0) (pq-get-value R 0 1)) data)
+ (setq R (pq-exec P "FETCH k_cursor;")))
+ (setq R (pq-exec P "END;"))
+ data)
+ => (("a" "97") ("a string" "12") ("b" "97") ("foo" "10") ("string" "2") ("stuff" "42") ("text" "1"))
+
+ Here's another example of cursors, this time with a Lisp macro to
+implement a mapping function over a table.
+
+ (defmacro map-db (P table condition callout)
+ `(let (R)
+ (pq-exec ,P "BEGIN;")
+ (pq-exec ,P (concat "DECLARE k_cursor CURSOR FOR SELECT * FROM "
+ ,table
+ " "
+ ,condition
+ " ORDER BY f1 DESC;"))
+ (setq R (pq-exec P "FETCH k_cursor;"))
+ (while (eq (pq-ntuples R) 1)
+ (,callout (pq-get-value R 0 0) (pq-get-value R 0 1))
+ (setq R (pq-exec P "FETCH k_cursor;")))
+ (pq-exec P "END;")))
+ => map-db
+ (defun callback (arg1 arg2)
+ (message "arg1 = %s, arg2 = %s" arg1 arg2))
+ => callback
+ (map-db P "xemacs_test" "WHERE field2 > 10" callback)
+ => arg1 = stuff, arg2 = 42
+ => arg1 = b, arg2 = 97
+ => arg1 = a string, arg2 = 12
+ => arg1 = a, arg2 = 97
+ => #<PGresult PGRES_COMMAND_OK - COMMIT>
-Tips and Standards
-******************
+\1f
+File: lispref.info, Node: Internationalization, Next: MULE, Prev: PostgreSQL Support, Up: Top
- This chapter describes no additional features of XEmacs Lisp.
-Instead it gives advice on making effective use of the features
-described in the previous chapters.
+Internationalization
+********************
* Menu:
-* Style Tips:: Writing clean and robust programs.
-* Compilation Tips:: Making compiled code run fast.
-* Documentation Tips:: Writing readable documentation strings.
-* Comment Tips:: Conventions for writing comments.
-* Library Headers:: Standard headers for library packages.
+* I18N Levels 1 and 2:: Support for different time, date, and currency formats.
+* I18N Level 3:: Support for localized messages.
+* I18N Level 4:: Support for Asian languages.
\1f
-File: lispref.info, Node: Style Tips, Next: Compilation Tips, Up: Tips
+File: lispref.info, Node: I18N Levels 1 and 2, Next: I18N Level 3, Up: Internationalization
-Writing Clean Lisp Programs
-===========================
+I18N Levels 1 and 2
+===================
- Here are some tips for avoiding common errors in writing Lisp code
-intended for widespread use:
-
- * Since all global variables share the same name space, and all
- functions share another name space, you should choose a short word
- to distinguish your program from other Lisp programs. Then take
- care to begin the names of all global variables, constants, and
- functions with the chosen prefix. This helps avoid name conflicts.
-
- This recommendation applies even to names for traditional Lisp
- primitives that are not primitives in XEmacs Lisp--even to `cadr'.
- Believe it or not, there is more than one plausible way to define
- `cadr'. Play it safe; append your name prefix to produce a name
- like `foo-cadr' or `mylib-cadr' instead.
-
- If you write a function that you think ought to be added to Emacs
- under a certain name, such as `twiddle-files', don't call it by
- that name in your program. Call it `mylib-twiddle-files' in your
- program, and send mail to `bug-gnu-emacs@prep.ai.mit.edu'
- suggesting we add it to Emacs. If and when we do, we can change
- the name easily enough.
-
- If one prefix is insufficient, your package may use two or three
- alternative common prefixes, so long as they make sense.
-
- Separate the prefix from the rest of the symbol name with a hyphen,
- `-'. This will be consistent with XEmacs itself and with most
- Emacs Lisp programs.
-
- * It is often useful to put a call to `provide' in each separate
- library program, at least if there is more than one entry point to
- the program.
-
- * If a file requires certain other library programs to be loaded
- beforehand, then the comments at the beginning of the file should
- say so. Also, use `require' to make sure they are loaded.
-
- * If one file FOO uses a macro defined in another file BAR, FOO
- should contain this expression before the first use of the macro:
-
- (eval-when-compile (require 'BAR))
-
- (And BAR should contain `(provide 'BAR)', to make the `require'
- work.) This will cause BAR to be loaded when you byte-compile
- FOO. Otherwise, you risk compiling FOO without the necessary
- macro loaded, and that would produce compiled code that won't work
- right. *Note Compiling Macros::.
-
- Using `eval-when-compile' avoids loading BAR when the compiled
- 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::.
-
- * If the purpose of a function is to tell you whether a certain
- condition is true or false, give the function a name that ends in
- `p'. If the name is one word, add just `p'; if the name is
- multiple words, add `-p'. Examples are `framep' and
- `frame-live-p'.
-
- * If a user option variable records a true-or-false condition, give
- it a name that ends in `-flag'.
-
- * Please do not define `C-c LETTER' as a key in your major modes.
- These sequences are reserved for users; they are the *only*
- sequences reserved for users, so we cannot do without them.
-
- Instead, define sequences consisting of `C-c' followed by a
- non-letter. These sequences are reserved for major modes.
+ XEmacs is now compliant with I18N levels 1 and 2. Specifically,
+this means that it is 8-bit clean and correctly handles time and date
+functions. XEmacs will correctly display the entire ISO-Latin 1
+character set.
- Changing all the major modes in Emacs 18 so they would follow this
- convention was a lot of work. Abandoning this convention would
- make that work go to waste, and inconvenience users.
+ The compose key may now be used to create any character in the
+ISO-Latin 1 character set not directly available via the keyboard.. In
+order for the compose key to work it is necessary to load the file
+`x-compose.el'. At any time while composing a character, `C-h' will
+display all valid completions and the character which would be produced.
+
+\1f
+File: lispref.info, Node: I18N Level 3, Next: I18N Level 4, Prev: I18N Levels 1 and 2, Up: Internationalization
- * Sequences consisting of `C-c' followed by `{', `}', `<', `>', `:'
- or `;' are also reserved for major modes.
-
- * Sequences consisting of `C-c' followed by any other punctuation
- character are allocated for minor modes. Using them in a major
- mode is not absolutely prohibited, but if you do that, the major
- mode binding may be shadowed from time to time by minor modes.
-
- * You should not bind `C-h' following any prefix character (including
- `C-c'). If you don't bind `C-h', it is automatically available as
- a help character for listing the subcommands of the prefix
- character.
-
- * You should not bind a key sequence ending in <ESC> except following
- another <ESC>. (That is, it is ok to bind a sequence ending in
- `<ESC> <ESC>'.)
-
- The reason for this rule is that a non-prefix binding for <ESC> in
- any context prevents recognition of escape sequences as function
- keys in that context.
-
- * Applications should not bind mouse events based on button 1 with
- the shift key held down. These events include `S-mouse-1',
- `M-S-mouse-1', `C-S-mouse-1', and so on. They are reserved for
- users.
-
- * Modes should redefine `mouse-2' as a command to follow some sort of
- reference in the text of a buffer, if users usually would not want
- to alter the text in that buffer by hand. Modes such as Dired,
- Info, Compilation, and Occur redefine it in this way.
-
- * 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
- 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.
-
- * It is a bad idea to define aliases for the Emacs primitives. Use
- the standard names instead.
-
- * Redefining an Emacs primitive is an even worse idea. It may do
- the right thing for a particular program, but there is no telling
- what other programs might break as a result.
-
- * If a file does replace any of the functions or library programs of
- standard XEmacs, prominent comments at the beginning of the file
- should say which functions are replaced, and how the behavior of
- the replacements differs from that of the originals.
-
- * Please keep the names of your XEmacs Lisp source files to 13
- characters or less. This way, if the files are compiled, the
- compiled files' names will be 14 characters or less, which is
- short enough to fit on all kinds of Unix systems.
-
- * Don't use `next-line' or `previous-line' in programs; nearly
- always, `forward-line' is more convenient as well as more
- predictable and robust. *Note Text Lines::.
-
- * Don't call functions that set the mark, unless setting the mark is
- one of the intended features of your program. The mark is a
- user-level feature, so it is incorrect to change the mark except
- to supply a value for the user's benefit. *Note The Mark::.
-
- In particular, don't use these functions:
-
- * `beginning-of-buffer', `end-of-buffer'
-
- * `replace-string', `replace-regexp'
-
- If you just want to move point, or replace a certain string,
- without any of the other features intended for interactive users,
- you can replace these functions with one or two lines of simple
- Lisp code.
-
- * Use lists rather than vectors, except when there is a particular
- reason to use a vector. Lisp has more facilities for manipulating
- lists than for vectors, and working with lists is usually more
- convenient.
-
- Vectors are advantageous for tables that are substantial in size
- and are accessed in random order (not searched front to back),
- provided there is no need to insert or delete elements (only lists
- allow that).
-
- * The recommended way to print a message in the echo area is with
- the `message' function, not `princ'. *Note The Echo Area::.
-
- * When you encounter an error condition, call the function `error'
- (or `signal'). The function `error' does not return. *Note
- Signaling Errors::.
-
- Do not use `message', `throw', `sleep-for', or `beep' to report
- errors.
-
- * An error message should start with a capital letter but should not
- end with a period.
-
- * Try to avoid using recursive edits. Instead, do what the Rmail `e'
- command does: use a new local keymap that contains one command
- defined to switch back to the old local keymap. Or do what the
- `edit-options' command does: switch to another buffer and let the
- user switch back at will. *Note Recursive Editing::.
-
- * In some other systems there is a convention of choosing variable
- names that begin and end with `*'. We don't use that convention
- in Emacs Lisp, so please don't use it in your programs. (Emacs
- uses such names only for program-generated buffers.) The users
- will find Emacs more coherent if all libraries use the same
- conventions.
-
- * Indent each function with `C-M-q' (`indent-sexp') using the
- default indentation parameters.
-
- * Don't make a habit of putting close-parentheses on lines by
- themselves; Lisp programmers find this disconcerting. Once in a
- while, when there is a sequence of many consecutive
- close-parentheses, it may make sense to split them in one or two
- significant places.
-
- * Please put a copyright notice on the file if you give copies to
- anyone. Use the same lines that appear at the top of the Lisp
- files in XEmacs itself. If you have not signed papers to assign
- the copyright to the Foundation, then place your name in the
- copyright notice in place of the Foundation's name.
+I18N Level 3
+============
+
+* Menu:
+
+* Level 3 Basics::
+* Level 3 Primitives::
+* Dynamic Messaging::
+* Domain Specification::
+* Documentation String Extraction::
\1f
-File: lispref.info, Node: Compilation Tips, Next: Documentation Tips, Prev: Style Tips, Up: Tips
+File: lispref.info, Node: Level 3 Basics, Next: Level 3 Primitives, Up: I18N Level 3
-Tips for Making Compiled Code Fast
-==================================
+Level 3 Basics
+--------------
- Here are ways of improving the execution speed of byte-compiled Lisp
-programs.
+ XEmacs now provides alpha-level functionality for I18N Level 3.
+This means that everything necessary for full messaging is available,
+but not every file has been converted.
- * Use the `profile' library to profile your program. See the file
- `profile.el' for instructions.
+ The two message files which have been created are `src/emacs.po' and
+`lisp/packages/mh-e.po'. Both files need to be converted using
+`msgfmt', and the resulting `.mo' files placed in some locale's
+`LC_MESSAGES' directory. The test "translations" in these files are
+the original messages prefixed by `TRNSLT_'.
- * Use iteration rather than recursion whenever possible. Function
- calls are slow in XEmacs Lisp even when a compiled function is
- calling another compiled function.
+ The domain for a variable is stored on the variable's property list
+under the property name VARIABLE-DOMAIN. The function
+`documentation-property' uses this information when translating a
+variable's documentation.
- * Using the primitive list-searching functions `memq', `member',
- `assq', or `assoc' is even faster than explicit iteration. It may
- be worth rearranging a data structure so that one of these
- primitive search functions can be used.
+\1f
+File: lispref.info, Node: Level 3 Primitives, Next: Dynamic Messaging, Prev: Level 3 Basics, Up: I18N Level 3
- * Certain built-in functions are handled specially in byte-compiled
- code, avoiding the need for an ordinary function call. It is a
- good idea to use these functions rather than alternatives. To see
- whether a function is handled specially by the compiler, examine
- its `byte-compile' property. If the property is non-`nil', then
- the function is handled specially.
+Level 3 Primitives
+------------------
- For example, the following input will show you that `aref' is
- compiled specially (*note Array Functions::) while `elt' is not
- (*note Sequence Functions::):
+ - 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.
- (get 'aref 'byte-compile)
- => byte-compile-two-args
-
- (get 'elt 'byte-compile)
- => nil
+ - 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.
- * If calling a small function accounts for a substantial part of
- your program's running time, make the function inline. This
- eliminates the function call overhead. Since making a function
- inline reduces the flexibility of changing the program, don't do
- it unless it gives a noticeable speedup in something slow enough
- that users care about the speed. *Note Inline Functions::.
+ - 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:
-\1f
-File: lispref.info, Node: Documentation Tips, Next: Comment Tips, Prev: Compilation Tips, Up: Tips
-
-Tips for Documentation Strings
-==============================
-
- Here are some tips for the writing of documentation strings.
-
- * Every command, function, or variable intended for users to know
- about should have a documentation string.
-
- * An internal variable or subroutine of a Lisp program might as well
- have a documentation string. In earlier Emacs versions, you could
- save space by using a comment instead of a documentation string,
- but that is no longer the case.
-
- * The first line of the documentation string should consist of one
- or two complete sentences that stand on their own as a summary.
- `M-x apropos' displays just the first line, and if it doesn't
- stand on its own, the result looks bad. In particular, start the
- first line with a capital letter and end with a period.
-
- The documentation string can have additional lines that expand on
- the details of how to use the function or variable. The
- additional lines should be made up of complete sentences also, but
- they may be filled if that looks good.
-
- * For consistency, phrase the verb in the first sentence of a
- documentation string as an infinitive with "to" omitted. For
- instance, use "Return the cons of A and B." in preference to
- "Returns the cons of A and B." Usually it looks good to do
- likewise for the rest of the first paragraph. Subsequent
- paragraphs usually look better if they have proper subjects.
-
- * Write documentation strings in the active voice, not the passive,
- and in the present tense, not the future. For instance, use
- "Return a list containing A and B." instead of "A list containing
- A and B will be returned."
-
- * Avoid using the word "cause" (or its equivalents) unnecessarily.
- Instead of, "Cause Emacs to display text in boldface," write just
- "Display text in boldface."
-
- * Do not start or end a documentation string with whitespace.
-
- * Format the documentation string so that it fits in an Emacs window
- on an 80-column screen. It is a good idea for most lines to be no
- wider than 60 characters. The first line can be wider if
- necessary to fit the information that ought to be there.
-
- However, rather than simply filling the entire documentation
- string, you can make it much more readable by choosing line breaks
- with care. Use blank lines between topics if the documentation
- string is long.
-
- * *Do not* indent subsequent lines of a documentation string so that
- the text is lined up in the source code with the text of the first
- line. This looks nice in the source code, but looks bizarre when
- users view the documentation. Remember that the indentation
- before the starting double-quote is not part of the string!
-
- * A variable's documentation string should start with `*' if the
- variable is one that users would often want to set interactively.
- If the value is a long list, or a function, or if the variable
- would be set only in init files, then don't start the
- documentation string with `*'. *Note Defining Variables::.
-
- * The documentation string for a variable that is a yes-or-no flag
- should start with words such as "Non-nil means...", to make it
- clear that all non-`nil' values are equivalent and indicate
- explicitly what `nil' and non-`nil' mean.
-
- * When a function's documentation string mentions the value of an
- argument of the function, use the argument name in capital letters
- as if it were a name for that value. Thus, the documentation
- string of the function `/' refers to its second argument as
- `DIVISOR', because the actual argument name is `divisor'.
-
- Also use all caps for meta-syntactic variables, such as when you
- show the decomposition of a list or vector into subunits, some of
- which may vary.
-
- * When a documentation string refers to a Lisp symbol, write it as it
- would be printed (which usually means in lower case), with
- single-quotes around it. For example: `lambda'. There are two
- exceptions: write t and nil without single-quotes. (In this
- manual, we normally do use single-quotes for those symbols.)
-
- * Don't write key sequences directly in documentation strings.
- Instead, use the `\\[...]' construct to stand for them. For
- example, instead of writing `C-f', write `\\[forward-char]'. When
- Emacs displays the documentation string, it substitutes whatever
- key is currently bound to `forward-char'. (This is normally `C-f',
- but it may be some other character if the user has moved key
- bindings.) *Note Keys in Documentation::.
-
- * In documentation strings for a major mode, you will want to refer
- to the key bindings of that mode's local map, rather than global
- ones. Therefore, use the construct `\\<...>' once in the
- documentation string to specify which key map to use. Do this
- before the first use of `\\[...]'. The text inside the `\\<...>'
- should be the name of the variable containing the local keymap for
- the major mode.
-
- It is not practical to use `\\[...]' very many times, because
- display of the documentation string will become slow. So use this
- to describe the most important commands in your major mode, and
- then use `\\{...}' to display the rest of the mode's keymap.
+ `{pathname}/{LANG}/LC_MESSAGES/{domain}.mo'
-\1f
-File: lispref.info, Node: Comment Tips, Next: Library Headers, Prev: Documentation Tips, Up: Tips
-
-Tips on Writing Comments
-========================
-
- We recommend these conventions for where to put comments and how to
-indent them:
-
-`;'
- Comments that start with a single semicolon, `;', should all be
- aligned to the same column on the right of the source code. Such
- comments usually explain how the code on the same line does its
- job. In Lisp mode and related modes, the `M-;'
- (`indent-for-comment') command automatically inserts such a `;' in
- the right place, or aligns such a comment if it is already present.
-
- This and following examples are taken from the Emacs sources.
-
- (setq base-version-list ; there was a base
- (assoc (substring fn 0 start-vn) ; version to which
- file-version-assoc-list)) ; this looks like
- ; a subversion
-
-`;;'
- Comments that start with two semicolons, `;;', should be aligned to
- the same level of indentation as the code. Such comments usually
- describe the purpose of the following lines or the state of the
- program at that point. For example:
-
- (prog1 (setq auto-fill-function
- ...
- ...
- ;; update modeline
- (redraw-modeline)))
-
- Every function that has no documentation string (because it is use
- only internally within the package it belongs to), should have
- instead a two-semicolon comment right before the function,
- explaining what the function does and how to call it properly.
- Explain precisely what each argument means and how the function
- interprets its possible values.
-
-`;;;'
- Comments that start with three semicolons, `;;;', should start at
- the left margin. Such comments are used outside function
- definitions to make general statements explaining the design
- principles of the program. For example:
-
- ;;; This Lisp code is run in XEmacs
- ;;; when it is to operate as a server
- ;;; for other processes.
-
- Another use for triple-semicolon comments is for commenting out
- lines within a function. We use triple-semicolons for this
- precisely so that they remain at the left margin.
-
- (defun foo (a)
- ;;; This is no longer necessary.
- ;;; (force-mode-line-update)
- (message "Finished with %s" a))
-
-`;;;;'
- Comments that start with four semicolons, `;;;;', should be aligned
- to the left margin and are used for headings of major sections of a
- program. For example:
-
- ;;;; The kill ring
-
-The indentation commands of the Lisp modes in XEmacs, such as `M-;'
-(`indent-for-comment') and <TAB> (`lisp-indent-line') automatically
-indent comments according to these conventions, depending on the number
-of semicolons. *Note Manipulating Comments: (emacs)Comments.
+ If `I18N3' was not enabled when XEmacs was compiled, this function
+ does nothing.
-\1f
-File: lispref.info, Node: Library Headers, Prev: Comment Tips, Up: Tips
+ - Special Form: domain string
+ This function specifies the text domain used for translating
+ documentation strings and interactive prompts of a function. For
+ example, write:
-Conventional Headers for XEmacs Libraries
-=========================================
+ (defun foo (arg) "Doc string" (domain "emacs-foo") ...)
- XEmacs has conventions for using special comments in Lisp libraries
-to divide them into sections and give information such as who wrote
-them. This section explains these conventions. First, an example:
+ to specify `emacs-foo' as the text domain of the function `foo'.
+ The "call" to `domain' is actually a declaration rather than a
+ function; when actually called, `domain' just returns `nil'.
- ;;; lisp-mnt.el --- minor mode for Emacs Lisp maintainers
-
- ;; Copyright (C) 1992 Free Software Foundation, Inc.
-
- ;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
- ;; Maintainer: Eric S. Raymond <esr@snark.thyrsus.com>
- ;; Created: 14 Jul 1992
- ;; Version: 1.2
- ;; Keywords: docs
-
- ;; This file is part of XEmacs.
- COPYING PERMISSIONS...
+ - 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'.
- The very first line should have this format:
+\1f
+File: lispref.info, Node: Dynamic Messaging, Next: Domain Specification, Prev: Level 3 Primitives, Up: I18N Level 3
- ;;; FILENAME --- DESCRIPTION
+Dynamic Messaging
+-----------------
-The description should be complete in one line.
+ The `format' function has been extended to permit you to change the
+order of parameter insertion. For example, the conversion format
+`%1$s' inserts parameter one as a string, while `%2$s' inserts
+parameter two. This is useful when creating translations which require
+you to change the word order.
- After the copyright notice come several "header comment" lines, each
-beginning with `;; HEADER-NAME:'. Here is a table of the conventional
-possibilities for HEADER-NAME:
+\1f
+File: lispref.info, Node: Domain Specification, Next: Documentation String Extraction, Prev: Dynamic Messaging, Up: I18N Level 3
-`Author'
- This line states the name and net address of at least the principal
- author of the library.
+Domain Specification
+--------------------
- If there are multiple authors, you can list them on continuation
- lines led by `;;' and a tab character, like this:
+ The default message domain of XEmacs is `emacs'. For add-on
+packages, it is best to use a different domain. For example, let us
+say we want to convert the "gorilla" package to use the domain
+`emacs-gorilla'. To translate the message "What gorilla?", use
+`dgettext' as follows:
- ;; Author: Ashwin Ram <Ram-Ashwin@cs.yale.edu>
- ;; Dave Sill <de5@ornl.gov>
- ;; Dave Brennan <brennan@hal.com>
- ;; Eric Raymond <esr@snark.thyrsus.com>
+ (dgettext "emacs-gorilla" "What gorilla?")
-`Maintainer'
- This line should contain a single name/address as in the Author
- line, or an address only, or the string `FSF'. If there is no
- maintainer line, the person(s) in the Author field are presumed to
- be the maintainers. The example above is mildly bogus because the
- maintainer line is redundant.
+ A function (or macro) which has a documentation string or an
+interactive prompt needs to be associated with the domain in order for
+the documentation or prompt to be translated. This is done with the
+`domain' special form as follows:
- The idea behind the `Author' and `Maintainer' lines is to make
- possible a Lisp function to "send mail to the maintainer" without
- having to mine the name out by hand.
+ (defun scratch (location)
+ "Scratch the specified location."
+ (domain "emacs-gorilla")
+ (interactive "sScratch: ")
+ ... )
- Be sure to surround the network address with `<...>' if you
- include the person's full name as well as the network address.
+ It is most efficient to specify the domain in the first line of the
+function body, before the `interactive' form.
-`Created'
- This optional line gives the original creation date of the file.
- For historical interest only.
+ For variables and constants which have documentation strings,
+specify the domain after the documentation.
-`Version'
- If you wish to record version numbers for the individual Lisp
- program, put them in this line.
+ - Special Form: defvar symbol [value [doc-string [domain]]]
+ Example:
+ (defvar weight 250 "Weight of gorilla, in pounds." "emacs-gorilla")
-`Adapted-By'
- In this header line, place the name of the person who adapted the
- library for installation (to make it fit the style conventions, for
- example).
+ - Special Form: defconst symbol [value [doc-string [domain]]]
+ Example:
+ (defconst limbs 4 "Number of limbs" "emacs-gorilla")
-`Keywords'
- This line lists keywords for the `finder-by-keyword' help command.
- This field is important; it's how people will find your package
- when they're looking for things by topic area. To separate the
- keywords, you can use spaces, commas, or both.
+ Autoloaded functions which are specified in `loaddefs.el' do not need
+to have a domain specification, because their documentation strings are
+extracted into the main message base. However, for autoloaded functions
+which are specified in a separate package, use following syntax:
- Just about every Lisp library ought to have the `Author' and
-`Keywords' header comment lines. Use the others if they are
-appropriate. You can also put in header lines with other header
-names--they have no standard meanings, so they can't do any harm.
+ - Function: autoload symbol filename &optional docstring interactive
+ macro domain
+ Example:
+ (autoload 'explore "jungle" "Explore the jungle." nil nil "emacs-gorilla")
- We use additional stylized comments to subdivide the contents of the
-library file. Here is a table of them:
+\1f
+File: lispref.info, Node: Documentation String Extraction, Prev: Domain Specification, Up: I18N Level 3
-`;;; Commentary:'
- This begins introductory comments that explain how the library
- works. It should come right after the copying permissions.
+Documentation String Extraction
+-------------------------------
-`;;; Change log:'
- This begins change log information stored in the library file (if
- you store the change history there). For most of the Lisp files
- distributed with XEmacs, the change history is kept in the file
- `ChangeLog' and not in the source file at all; these files do not
- have a `;;; Change log:' line.
+ The utility `etc/make-po' scans the file `DOC' to extract
+documentation strings and creates a message file `doc.po'. This file
+may then be inserted within `emacs.po'.
-`;;; Code:'
- This begins the actual code of the program.
+ Currently, `make-po' is hard-coded to read from `DOC' and write to
+`doc.po'. In order to extract documentation strings from an add-on
+package, first run `make-docfile' on the package to produce the `DOC'
+file. Then run `make-po -p' with the `-p' argument to indicate that we
+are extracting documentation for an add-on package.
-`;;; FILENAME ends here'
- This is the "footer line"; it appears at the very end of the file.
- Its purpose is to enable people to detect truncated versions of
- the file from the lack of a footer line.
+ (The `-p' argument is a kludge to make up for a subtle difference
+between pre-loaded documentation and add-on documentation: For add-on
+packages, the final carriage returns in the strings produced by
+`make-docfile' must be ignored.)
\1f
-File: lispref.info, Node: Building XEmacs and Object Allocation, Next: Standard Errors, Prev: Tips, Up: Top
+File: lispref.info, Node: I18N Level 4, Prev: I18N Level 3, Up: Internationalization
+
+I18N Level 4
+============
-Building XEmacs; Allocation of Objects
-**************************************
+ The Asian-language support in XEmacs is called "MULE". *Note MULE::.
+
+\1f
+File: lispref.info, Node: MULE, Next: Tips, Prev: Internationalization, Up: Top
- This chapter describes how the runnable XEmacs executable is dumped
-with the preloaded Lisp libraries in it and how storage is allocated.
+MULE
+****
- There is an entire separate document, the `XEmacs Internals Manual',
-devoted to the internals of XEmacs from the perspective of the C
-programmer. It contains much more detailed information about the build
-process, the allocation and garbage-collection process, and other
-aspects related to the internals of XEmacs.
+ "MULE" is the name originally given to the version of GNU Emacs
+extended for multi-lingual (and in particular Asian-language) support.
+"MULE" is short for "MUlti-Lingual Emacs". It is an extension and
+complete rewrite of Nemacs ("Nihon Emacs" where "Nihon" is the Japanese
+word for "Japan"), which only provided support for Japanese. XEmacs
+refers to its multi-lingual support as "MULE support" since it is based
+on "MULE".
* Menu:
-* Building XEmacs:: How to preload Lisp libraries into XEmacs.
-* Pure Storage:: A kludge to make preloaded Lisp functions sharable.
-* Garbage Collection:: Reclaiming space for Lisp objects no longer used.
+* Internationalization Terminology::
+ Definition of various internationalization terms.
+* Charsets:: Sets of related characters.
+* MULE Characters:: Working with characters in XEmacs/MULE.
+* Composite Characters:: Making new characters by overstriking other ones.
+* Coding Systems:: Ways of representing a string of chars using integers.
+* CCL:: A special language for writing fast converters.
+* Category Tables:: Subdividing charsets into groups.
Foundation instead of in the original English.
\1f
-File: lispref.info, Node: Building XEmacs, Next: Pure Storage, Up: Building XEmacs and Object Allocation
-
-Building XEmacs
-===============
-
- This section explains the steps involved in building the XEmacs
-executable. You don't have to know this material to build and install
-XEmacs, since the makefiles do all these things automatically. This
-information is pertinent to XEmacs maintenance.
-
- The `XEmacs Internals Manual' contains more information about this.
-
- Compilation of the C source files in the `src' directory produces an
-executable file called `temacs', also called a "bare impure XEmacs".
-It contains the XEmacs Lisp interpreter and I/O routines, but not the
-editing commands.
-
- Before XEmacs is actually usable, a number of Lisp files need to be
-loaded. These define all the editing commands, plus most of the startup
-code and many very basic Lisp primitives. This is accomplished by
-loading the file `loadup.el', which in turn loads all of the other
-standardly-loaded Lisp files.
-
- It takes a substantial time to load the standard Lisp files.
-Luckily, you don't have to do this each time you run XEmacs; `temacs'
-can dump out an executable program called `xemacs' that has these files
-preloaded. `xemacs' starts more quickly because it does not need to
-load the files. This is the XEmacs executable that is normally
-installed.
-
- To create `xemacs', use the command `temacs -batch -l loadup dump'.
-The purpose of `-batch' here is to tell `temacs' to run in
-non-interactive, command-line mode. (`temacs' can _only_ run in this
-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
-`xemacs'.
-
- The dumping process is highly system-specific, and some operating
-systems don't support dumping. On those systems, you must start XEmacs
-with the `temacs -batch -l loadup run-temacs' command each time you use
-it. This takes a substantial time, but since you need to start Emacs
-once a day at most--or once a week if you never log out--the extra time
-is not too severe a problem. (In older versions of Emacs, you started
-Emacs from `temacs' using `temacs -l loadup'.)
-
- You are free to start XEmacs directly from `temacs' if you want,
-even if there is already a dumped `xemacs'. Normally you wouldn't want
-to do that; but the Makefiles do this when you rebuild XEmacs using
-`make all-elc', which builds XEmacs and simultaneously compiles any
-out-of-date Lisp files. (You need `xemacs' in order to compile Lisp
-files. However, you also need the compiled Lisp files in order to dump
-out `xemacs'. If both of these are missing or corrupted, you are out
-of luck unless you're able to bootstrap `xemacs' from `temacs'. Note
-that `make all-elc' actually loads the alternative loadup file
-`loadup-el.el', which works like `loadup.el' but disables the
-pure-copying process and forces XEmacs to ignore any compiled Lisp
-files even if they exist.)
-
- You can specify additional files to preload by writing a library
-named `site-load.el' that loads them. You may need to increase the
-value of `PURESIZE', in `src/puresize.h', to make room for the
-additional files. You should _not_ modify this file directly, however;
-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
-additional files decreases as machines get faster. On modern machines,
-it is often not advisable, especially if the Lisp code is on a file
-system local to the machine running XEmacs.
-
- You can specify other Lisp expressions to execute just before dumping
-by putting them in a library named `site-init.el'. However, if they
-might alter the behavior that users expect from an ordinary unmodified
-XEmacs, it is better to put them in `default.el', so that users can
-override them if they wish. *Note Start-up Summary::.
-
- Before `loadup.el' dumps the new executable, it finds the
-documentation strings for primitive and preloaded functions (and
-variables) in the file where they are stored, by calling
-`Snarf-documentation' (*note Accessing Documentation::). These strings
-were moved out of the `xemacs' executable to make it smaller. *Note
-Documentation Basics::.
-
- - 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').
-
- If you use this function in an XEmacs that was already dumped, you
- must set `command-line-processed' to `nil' first for good results.
- *Note Command Line Arguments::.
-
- - 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
- reinitialize your XEmacs process and you'll be sorry.
-
- - Command: emacs-version
- This function returns a string describing the version of XEmacs
- that is running. It is useful to include this string in bug
- reports.
-
- (emacs-version)
- => "XEmacs 20.1 [Lucid] (i586-unknown-linux2.0.29)
- of Mon Apr 7 1997 on altair.xemacs.org"
-
- Called interactively, the function prints the same information in
- the echo area.
-
- - Variable: emacs-build-time
- The value of this variable is the time at which XEmacs was built
- at the local site.
-
- emacs-build-time "Mon Apr 7 20:28:52 1997"
- =>
-
- - Variable: emacs-version
- The value of this variable is the version of Emacs being run. It
- is a string, e.g. `"20.1 XEmacs Lucid"'.
-
- The following two variables did not exist before FSF GNU Emacs
-version 19.23 and XEmacs version 19.10, which reduces their usefulness
-at present, but we hope they will be convenient in the future.
-
- - Variable: emacs-major-version
- The major version number of Emacs, as an integer. For XEmacs
- version 20.1, the value is 20.
-
- - Variable: emacs-minor-version
- The minor version number of Emacs, as an integer. For XEmacs
- version 20.1, the value is 1.
-
-\1f
-File: lispref.info, Node: Pure Storage, Next: Garbage Collection, Prev: Building XEmacs, Up: Building XEmacs and Object Allocation
-
-Pure Storage
-============
-
- XEmacs Lisp uses two kinds of storage for user-created Lisp objects:
-"normal storage" and "pure storage". Normal storage is where all the
-new data created during an XEmacs session is kept; see the following
-section for information on normal storage. Pure storage is used for
-certain data in the preloaded standard Lisp files--data that should
-never change during actual use of XEmacs.
-
- Pure storage is allocated only while `temacs' is loading the
-standard preloaded Lisp libraries. In the file `xemacs', it is marked
-as read-only (on operating systems that permit this), so that the
-memory space can be shared by all the XEmacs jobs running on the machine
-at once. Pure storage is not expandable; a fixed amount is allocated
-when XEmacs is compiled, and if that is not sufficient for the preloaded
-libraries, `temacs' aborts with an error message. If that happens, you
-must increase the compilation parameter `PURESIZE' using the
-`--puresize' option to `configure'. This normally won't happen unless
-you try to preload additional libraries or add features to the standard
-ones.
-
- - 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
- vectors and cons cells. It does not make copies of other objects
- such as symbols, but just returns them unchanged. It signals an
- error if asked to copy markers.
-
- This function is a no-op except while XEmacs is being built and
- dumped; it is usually called only in the file
- `xemacs/lisp/prim/loaddefs.el', but a few packages call it just in
- case you decide to preload them.
-
- - Variable: pure-bytes-used
- The value of this variable is the number of bytes of pure storage
- allocated so far. Typically, in a dumped XEmacs, this number is
- very close to the total amount of pure storage available--if it
- were not, we would preallocate less.
-
- - Variable: purify-flag
- This variable determines whether `defun' should make a copy of the
- function definition in pure storage. If it is non-`nil', then the
- function definition is copied into pure storage.
-
- This flag is `t' while loading all of the basic functions for
- building XEmacs initially (allowing those functions to be sharable
- and non-collectible). Dumping XEmacs as an executable always
- writes `nil' in this variable, regardless of the value it actually
- has before and after dumping.
-
- You should not change this flag in a running XEmacs.
+File: lispref.info, Node: Internationalization Terminology, Next: Charsets, Up: MULE
+
+Internationalization Terminology
+================================
+
+ In internationalization terminology, a string of text is divided up
+into "characters", which are the printable units that make up the text.
+A single character is (for example) a capital `A', the number `2', a
+Katakana character, a Hangul character, a Kanji ideograph (an
+"ideograph" is a "picture" character, such as is used in Japanese
+Kanji, Chinese Hanzi, and Korean Hanja; typically there are thousands
+of such ideographs in each language), etc. The basic property of a
+character is that it is the smallest unit of text with semantic
+significance in text processing.
+
+ Human beings normally process text visually, so to a first
+approximation a character may be identified with its shape. Note that
+the same character may be drawn by two different people (or in two
+different fonts) in slightly different ways, although the "basic shape"
+will be the same. But consider the works of Scott Kim; human beings
+can recognize hugely variant shapes as the "same" character.
+Sometimes, especially where characters are extremely complicated to
+write, completely different shapes may be defined as the "same"
+character in national standards. The Taiwanese variant of Hanzi is
+generally the most complicated; over the centuries, the Japanese,
+Koreans, and the People's Republic of China have adopted
+simplifications of the shape, but the line of descent from the original
+shape is recorded, and the meanings and pronunciation of different
+forms of the same character are considered to be identical within each
+language. (Of course, it may take a specialist to recognize the
+related form; the point is that the relations are standardized, despite
+the differing shapes.)
+
+ In some cases, the differences will be significant enough that it is
+actually possible to identify two or more distinct shapes that both
+represent the same character. For example, the lowercase letters `a'
+and `g' each have two distinct possible shapes--the `a' can optionally
+have a curved tail projecting off the top, and the `g' can be formed
+either of two loops, or of one loop and a tail hanging off the bottom.
+Such distinct possible shapes of a character are called "glyphs". The
+important characteristic of two glyphs making up the same character is
+that the choice between one or the other is purely stylistic and has no
+linguistic effect on a word (this is the reason why a capital `A' and
+lowercase `a' are different characters rather than different
+glyphs--e.g. `Aspen' is a city while `aspen' is a kind of tree).
+
+ Note that "character" and "glyph" are used differently here than
+elsewhere in XEmacs.
+
+ A "character set" is essentially a set of related characters. ASCII,
+for example, is a set of 94 characters (or 128, if you count
+non-printing characters). Other character sets are ISO8859-1 (ASCII
+plus various accented characters and other international symbols), JIS
+X 0201 (ASCII, more or less, plus half-width Katakana), JIS X 0208
+(Japanese Kanji), JIS X 0212 (a second set of less-used Japanese Kanji),
+GB2312 (Mainland Chinese Hanzi), etc.
+
+ The definition of a character set will implicitly or explicitly give
+it an "ordering", a way of assigning a number to each character in the
+set. For many character sets, there is a natural ordering, for example
+the "ABC" ordering of the Roman letters. But it is not clear whether
+digits should come before or after the letters, and in fact different
+European languages treat the ordering of accented characters
+differently. It is useful to use the natural order where available, of
+course. The number assigned to any particular character is called the
+character's "code point". (Within a given character set, each
+character has a unique code point. Thus the word "set" is ill-chosen;
+different orderings of the same characters are different character sets.
+Identifying characters is simple enough for alphabetic character sets,
+but the difference in ordering can cause great headaches when the same
+thousands of characters are used by different cultures as in the Hanzi.)
+
+ A code point may be broken into a number of "position codes". The
+number of position codes required to index a particular character in a
+character set is called the "dimension" of the character set. For
+practical purposes, a position code may be thought of as a byte-sized
+index. The printing characters of ASCII, being a relatively small
+character set, is of dimension one, and each character in the set is
+indexed using a single position code, in the range 1 through 94. Use of
+this unusual range, rather than the familiar 33 through 126, is an
+intentional abstraction; to understand the programming issues you must
+break the equation between character sets and encodings.
+
+ JIS X 0208, i.e. Japanese Kanji, has thousands of characters, and is
+of dimension two - every character is indexed by two position codes,
+each in the range 1 through 94. (This number "94" is not a
+coincidence; we shall see that the JIS position codes were chosen so
+that JIS kanji could be encoded without using codes that in ASCII are
+associated with device control functions.) Note that the choice of the
+range here is somewhat arbitrary. You could just as easily index the
+printing characters in ASCII using numbers in the range 0 through 93, 2
+through 95, 3 through 96, etc. In fact, the standardized _encoding_
+for the ASCII _character set_ uses the range 33 through 126.
+
+ An "encoding" is a way of numerically representing characters from
+one or more character sets into a stream of like-sized numerical values
+called "words"; typically these are 8-bit, 16-bit, or 32-bit
+quantities. If an encoding encompasses only one character set, then the
+position codes for the characters in that character set could be used
+directly. (This is the case with the trivial cipher used by children,
+assigning 1 to `A', 2 to `B', and so on.) However, even with ASCII,
+other considerations intrude. For example, why are the upper- and
+lowercase alphabets separated by 8 characters? Why do the digits start
+with `0' being assigned the code 48? In both cases because semantically
+interesting operations (case conversion and numerical value extraction)
+become convenient masking operations. Other artificial aspects (the
+control characters being assigned to codes 0-31 and 127) are historical
+accidents. (The use of 127 for `DEL' is an artifact of the "punch
+once" nature of paper tape, for example.)
+
+ Naive use of the position code is not possible, however, if more than
+one character set is to be used in the encoding. For example, printed
+Japanese text typically requires characters from multiple character sets
+- ASCII, JIS X 0208, and JIS X 0212, to be specific. Each of these is
+indexed using one or more position codes in the range 1 through 94, so
+the position codes could not be used directly or there would be no way
+to tell which character was meant. Different Japanese encodings handle
+this differently - JIS uses special escape characters to denote
+different character sets; EUC sets the high bit of the position codes
+for JIS X 0208 and JIS X 0212, and puts a special extra byte before each
+JIS X 0212 character; etc. (JIS, EUC, and most of the other encodings
+you will encounter in files are 7-bit or 8-bit encodings. There is one
+common 16-bit encoding, which is Unicode; this strives to represent all
+the world's characters in a single large character set. 32-bit
+encodings are often used internally in programs, such as XEmacs with
+MULE support, to simplify the code that manipulates them; however, they
+are not used externally because they are not very space-efficient.)
+
+ A general method of handling text using multiple character sets
+(whether for multilingual text, or simply text in an extremely
+complicated single language like Japanese) is defined in the
+international standard ISO 2022. ISO 2022 will be discussed in more
+detail later (*note ISO 2022::), but for now suffice it to say that text
+needs control functions (at least spacing), and if escape sequences are
+to be used, an escape sequence introducer. It was decided to make all
+text streams compatible with ASCII in the sense that the codes 0-31
+(and 128-159) would always be control codes, never graphic characters,
+and where defined by the character set the `SPC' character would be
+assigned code 32, and `DEL' would be assigned 127. Thus there are 94
+code points remaining if 7 bits are used. This is the reason that most
+character sets are defined using position codes in the range 1 through
+94. Then ISO 2022 compatible encodings are produced by shifting the
+position codes 1 to 94 into character codes 33 to 126, or (if 8 bit
+codes are available) into character codes 161 to 254.
+
+ Encodings are classified as either "modal" or "non-modal". In a
+"modal encoding", there are multiple states that the encoding can be
+in, and the interpretation of the values in the stream depends on the
+current global state of the encoding. Special values in the encoding,
+called "escape sequences", are used to change the global state. JIS,
+for example, is a modal encoding. The bytes `ESC $ B' indicate that,
+from then on, bytes are to be interpreted as position codes for JIS X
+0208, rather than as ASCII. This effect is cancelled using the bytes
+`ESC ( B', which mean "switch from whatever the current state is to
+ASCII". To switch to JIS X 0212, the escape sequence `ESC $ ( D'.
+(Note that here, as is common, the escape sequences do in fact begin
+with `ESC'. This is not necessarily the case, however. Some encodings
+use control characters called "locking shifts" (effect persists until
+cancelled) to switch character sets.)
+
+ A "non-modal encoding" has no global state that extends past the
+character currently being interpreted. EUC, for example, is a
+non-modal encoding. Characters in JIS X 0208 are encoded by setting
+the high bit of the position codes, and characters in JIS X 0212 are
+encoded by doing the same but also prefixing the character with the
+byte 0x8F.
+
+ The advantage of a modal encoding is that it is generally more
+space-efficient, and is easily extendable because there are essentially
+an arbitrary number of escape sequences that can be created. The
+disadvantage, however, is that it is much more difficult to work with
+if it is not being processed in a sequential manner. In the non-modal
+EUC encoding, for example, the byte 0x41 always refers to the letter
+`A'; whereas in JIS, it could either be the letter `A', or one of the
+two position codes in a JIS X 0208 character, or one of the two
+position codes in a JIS X 0212 character. Determining exactly which
+one is meant could be difficult and time-consuming if the previous
+bytes in the string have not already been processed, or impossible if
+they are drawn from an external stream that cannot be rewound.
+
+ Non-modal encodings are further divided into "fixed-width" and
+"variable-width" formats. A fixed-width encoding always uses the same
+number of words per character, whereas a variable-width encoding does
+not. EUC is a good example of a variable-width encoding: one to three
+bytes are used per character, depending on the character set. 16-bit
+and 32-bit encodings are nearly always fixed-width, and this is in fact
+one of the main reasons for using an encoding with a larger word size.
+The advantages of fixed-width encodings should be obvious. The
+advantages of variable-width encodings are that they are generally more
+space-efficient and allow for compatibility with existing 8-bit
+encodings such as ASCII. (For example, in Unicode ASCII characters are
+simply promoted to a 16-bit representation. That means that every
+ASCII character contains a `NUL' byte; evidently all of the standard
+string manipulation functions will lose badly in a fixed-width Unicode
+environment.)
+
+ The bytes in an 8-bit encoding are often referred to as "octets"
+rather than simply as bytes. This terminology dates back to the days
+before 8-bit bytes were universal, when some computers had 9-bit bytes,
+others had 10-bit bytes, etc.
\1f
-File: lispref.info, Node: Garbage Collection, Prev: Pure Storage, Up: Building XEmacs and Object Allocation
-
-Garbage Collection
-==================
-
- When a program creates a list or the user defines a new function
-(such as by loading a library), that data is placed in normal storage.
-If normal storage runs low, then XEmacs asks the operating system to
-allocate more memory in blocks of 2k bytes. Each block is used for one
-type of Lisp object, so symbols, cons cells, markers, etc., are
-segregated in distinct blocks in memory. (Vectors, long strings,
-buffers and certain other editing types, which are fairly large, are
-allocated in individual blocks, one per object, while small strings are
-packed into blocks of 8k bytes. [More correctly, a string is allocated
-in two sections: a fixed size chunk containing the length, list of
-extents, etc.; and a chunk containing the actual characters in the
-string. It is this latter chunk that is either allocated individually
-or packed into 8k blocks. The fixed size chunk is packed into 2k
-blocks, as for conses, markers, etc.])
-
- It is quite common to use some storage for a while, then release it
-by (for example) killing a buffer or deleting the last pointer to an
-object. XEmacs provides a "garbage collector" to reclaim this
-abandoned storage. (This name is traditional, but "garbage recycler"
-might be a more intuitive metaphor for this facility.)
-
- The garbage collector operates by finding and marking all Lisp
-objects that are still accessible to Lisp programs. To begin with, it
-assumes all the symbols, their values and associated function
-definitions, and any data presently on the stack, are accessible. Any
-objects that can be reached indirectly through other accessible objects
-are also accessible.
-
- When marking is finished, all objects still unmarked are garbage. No
-matter what the Lisp program or the user does, it is impossible to refer
-to them, since there is no longer a way to reach them. Their space
-might as well be reused, since no one will miss them. The second
-("sweep") phase of the garbage collector arranges to reuse them.
-
- The sweep phase puts unused cons cells onto a "free list" for future
-allocation; likewise for symbols, markers, extents, events, floats,
-compiled-function objects, and the fixed-size portion of strings. It
-compacts the accessible small string-chars chunks so they occupy fewer
-8k blocks; then it frees the other 8k blocks. Vectors, buffers,
-windows, and other large objects are individually allocated and freed
-using `malloc' and `free'.
-
- Common Lisp note: unlike other Lisps, XEmacs Lisp does not call
- the garbage collector when the free list is empty. Instead, it
- simply requests the operating system to allocate more storage, and
- processing continues until `gc-cons-threshold' bytes have been
- used.
-
- This means that you can make sure that the garbage collector will
- not run during a certain portion of a Lisp program by calling the
- garbage collector explicitly just before it (provided that portion
- of the program does not use so much space as to force a second
- garbage collection).
-
- - Command: garbage-collect
- This command runs a garbage collection, and returns information on
- the amount of space in use. (Garbage collection can also occur
- spontaneously if you use more than `gc-cons-threshold' bytes of
- Lisp data since the previous garbage collection.)
-
- `garbage-collect' returns a list containing the following
- information:
-
- ((USED-CONSES . FREE-CONSES)
- (USED-SYMS . FREE-SYMS)
- (USED-MARKERS . FREE-MARKERS)
- USED-STRING-CHARS
- USED-VECTOR-SLOTS
- (PLIST))
-
- => ((73362 . 8325) (13718 . 164)
- (5089 . 5098) 949121 118677
- (conses-used 73362 conses-free 8329 cons-storage 658168
- symbols-used 13718 symbols-free 164 symbol-storage 335216
- bit-vectors-used 0 bit-vectors-total-length 0
- bit-vector-storage 0 vectors-used 7882
- vectors-total-length 118677 vector-storage 537764
- compiled-functions-used 1336 compiled-functions-free 37
- compiled-function-storage 44440 short-strings-used 28829
- long-strings-used 2 strings-free 7722
- short-strings-total-length 916657 short-string-storage 1179648
- long-strings-total-length 32464 string-header-storage 441504
- floats-used 3 floats-free 43 float-storage 2044 markers-used 5089
- markers-free 5098 marker-storage 245280 events-used 103
- events-free 835 event-storage 110656 extents-used 10519
- extents-free 2718 extent-storage 372736
- extent-auxiliarys-used 111 extent-auxiliarys-freed 3
- extent-auxiliary-storage 4440 window-configurations-used 39
- window-configurations-on-free-list 5
- window-configurations-freed 10 window-configuration-storage 9492
- popup-datas-used 3 popup-data-storage 72 toolbar-buttons-used 62
- toolbar-button-storage 4960 toolbar-datas-used 12
- toolbar-data-storage 240 symbol-value-buffer-locals-used 182
- symbol-value-buffer-local-storage 5824
- symbol-value-lisp-magics-used 22
- symbol-value-lisp-magic-storage 1496
- symbol-value-varaliases-used 43
- symbol-value-varalias-storage 1032 opaque-lists-used 2
- opaque-list-storage 48 color-instances-used 12
- color-instance-storage 288 font-instances-used 5
- font-instance-storage 180 opaques-used 11 opaque-storage 312
- range-tables-used 1 range-table-storage 16 faces-used 34
- face-storage 2584 glyphs-used 124 glyph-storage 4464
- specifiers-used 775 specifier-storage 43869 weak-lists-used 786
- weak-list-storage 18864 char-tables-used 40
- char-table-storage 41920 buffers-used 25 buffer-storage 7000
- extent-infos-used 457 extent-infos-freed 73
- extent-info-storage 9140 keymaps-used 275 keymap-storage 12100
- consoles-used 4 console-storage 384 command-builders-used 2
- command-builder-storage 120 devices-used 2 device-storage 344
- frames-used 3 frame-storage 624 image-instances-used 47
- image-instance-storage 3008 windows-used 27 windows-freed 2
- window-storage 9180 lcrecord-lists-used 15
- lcrecord-list-storage 360 hash-tables-used 631
- hash-table-storage 25240 streams-used 1 streams-on-free-list 3
- streams-freed 12 stream-storage 91))
-
- Here is a table explaining each element:
-
- USED-CONSES
- The number of cons cells in use.
-
- FREE-CONSES
- The number of cons cells for which space has been obtained
- from the operating system, but that are not currently being
- used.
-
- USED-SYMS
- The number of symbols in use.
-
- FREE-SYMS
- The number of symbols for which space has been obtained from
- the operating system, but that are not currently being used.
-
- USED-MARKERS
- The number of markers in use.
-
- FREE-MARKERS
- The number of markers for which space has been obtained from
- the operating system, but that are not currently being used.
-
- USED-STRING-CHARS
- The total size of all strings, in characters.
-
- USED-VECTOR-SLOTS
- The total number of elements of existing vectors.
-
- PLIST
- A list of alternating keyword/value pairs providing more
- detailed information. (As you can see above, quite a lot of
- information is provided.)
-
- - User Option: gc-cons-threshold
- The value of this variable is the number of bytes of storage that
- must be allocated for Lisp objects after one garbage collection in
- order to trigger another garbage collection. A cons cell counts
- as eight bytes, a string as one byte per character plus a few
- bytes of overhead, and so on; space allocated to the contents of
- buffers does not count. Note that the subsequent garbage
- collection does not happen immediately when the threshold is
- exhausted, but only the next time the Lisp evaluator is called.
-
- The initial threshold value is 500,000. If you specify a larger
- value, garbage collection will happen less often. This reduces the
- amount of time spent garbage collecting, but increases total
- memory use. You may want to do this when running a program that
- creates lots of Lisp data.
-
- You can make collections more frequent by specifying a smaller
- value, down to 10,000. A value less than 10,000 will remain in
- effect only until the subsequent garbage collection, at which time
- `garbage-collect' will set the threshold back to 10,000. (This does
- not apply if XEmacs was configured with `--debug'. Therefore, be
- careful when setting `gc-cons-threshold' in that case!)
-
- - Function: memory-limit
- This function returns the address of the last byte XEmacs has
- allocated, divided by 1024. We divide the value by 1024 to make
- sure it fits in a Lisp integer.
-
- You can use this to get a general idea of how your actions affect
- the memory usage.
-
- - Variable: pre-gc-hook
- This is a normal hook to be run just before each garbage
- collection. Interrupts, garbage collection, and errors are
- inhibited while this hook runs, so be extremely careful in what
- you add here. In particular, avoid consing, and do not interact
- with the user.
-
- - Variable: post-gc-hook
- This is a normal hook to be run just after each garbage collection.
- Interrupts, garbage collection, and errors are inhibited while
- this hook runs, so be extremely careful in what you add here. In
- particular, avoid consing, and do not interact with the user.
-
- - Variable: gc-message
- This is a string to print to indicate that a garbage collection is
- in progress. This is printed in the echo area. If the selected
- frame is on a window system and `gc-pointer-glyph' specifies a
- value (i.e. a pointer image instance) in the domain of the
- selected frame, the mouse cursor will change instead of this
- message being printed.
-
- - Glyph: gc-pointer-glyph
- This holds the pointer glyph used to indicate that a garbage
- collection is in progress. If the selected window is on a window
- system and this glyph specifies a value (i.e. a pointer image
- instance) in the domain of the selected window, the cursor will be
- changed as specified during garbage collection. Otherwise, a
- message will be printed in the echo area, as controlled by
- `gc-message'. *Note Glyphs::.
-
- If XEmacs was configured with `--debug', you can set the following
-two variables to get direct information about all the allocation that
-is happening in a segment of Lisp code.
-
- - Variable: debug-allocation
- If non-zero, print out information to stderr about all objects
- allocated.
-
- - Variable: debug-allocation-backtrace
- Length (in stack frames) of short backtrace printed out by
- `debug-allocation'.
-
-\1f
-File: lispref.info, Node: Standard Errors, Next: Standard Buffer-Local Variables, Prev: Building XEmacs and Object Allocation, Up: Top
-
-Standard Errors
-***************
-
- Here is the complete list of the error symbols in standard Emacs,
-grouped by concept. The list includes each symbol's message (on the
-`error-message' property of the symbol) and a cross reference to a
-description of how the error can occur.
-
- Each error symbol has an `error-conditions' property that is a list
-of symbols. Normally this list includes the error symbol itself and
-the symbol `error'. Occasionally it includes additional symbols, which
-are intermediate classifications, narrower than `error' but broader
-than a single error symbol. For example, all the errors in accessing
-files have the condition `file-error'.
-
- As a special exception, the error symbol `quit' does not have the
-condition `error', because quitting is not considered an error.
-
- *Note Errors::, for an explanation of how errors are generated and
-handled.
-
-`SYMBOL'
- STRING; REFERENCE.
-
-`error'
- `"error"'
- *Note Errors::.
-
-`quit'
- `"Quit"'
- *Note Quitting::.
-
-`args-out-of-range'
- `"Args out of range"'
- *Note Sequences Arrays Vectors::.
-
-`arith-error'
- `"Arithmetic error"'
- See `/' and `%' in *Note Numbers::.
-
-`beginning-of-buffer'
- `"Beginning of buffer"'
- *Note Motion::.
-
-`buffer-read-only'
- `"Buffer is read-only"'
- *Note Read Only Buffers::.
-
-`cyclic-function-indirection'
- `"Symbol's chain of function indirections contains a loop"'
- *Note Function Indirection::.
-
-`domain-error'
- `"Arithmetic domain error"'
-`end-of-buffer'
- `"End of buffer"'
- *Note Motion::.
-
-`end-of-file'
- `"End of file during parsing"'
- This is not a `file-error'.
- *Note Input Functions::.
-
-`file-error'
- This error and its subcategories do not have error-strings,
- because the error message is constructed from the data items alone
- when the error condition `file-error' is present.
- *Note Files::.
-
-`file-locked'
- This is a `file-error'.
- *Note File Locks::.
-
-`file-already-exists'
- This is a `file-error'.
- *Note Writing to Files::.
-
-`file-supersession'
- This is a `file-error'.
- *Note Modification Time::.
-
-`invalid-byte-code'
- `"Invalid byte code"'
- *Note Byte Compilation::.
-
-`invalid-function'
- `"Invalid function"'
- *Note Classifying Lists::.
-
-`invalid-read-syntax'
- `"Invalid read syntax"'
- *Note Input Functions::.
-
-`invalid-regexp'
- `"Invalid regexp"'
- *Note Regular Expressions::.
-
-`mark-inactive'
- `"The mark is not active now"'
-`no-catch'
- `"No catch for tag"'
- *Note Catch and Throw::.
-
-`overflow-error'
- `"Arithmetic overflow error"'
-`protected-field'
- `"Attempt to modify a protected field"'
-`range-error'
- `"Arithmetic range error"'
-`search-failed'
- `"Search failed"'
- *Note Searching and Matching::.
-
-`setting-constant'
- `"Attempt to set a constant symbol"'
- *Note Variables that Never Change: Constant Variables.
-
-`singularity-error'
- `"Arithmetic singularity error"'
-`tooltalk-error'
- `"ToolTalk error"'
- *Note ToolTalk Support::.
-
-`undefined-keystroke-sequence'
- `"Undefined keystroke sequence"'
-`void-function'
- `"Symbol's function definition is void"'
- *Note Function Cells::.
-
-`void-variable'
- `"Symbol's value as variable is void"'
- *Note Accessing Variables::.
-
-`wrong-number-of-arguments'
- `"Wrong number of arguments"'
- *Note Classifying Lists::.
-
-`wrong-type-argument'
- `"Wrong type argument"'
- *Note Type Predicates::.
-
- These error types, which are all classified as special cases of
-`arith-error', can occur on certain systems for invalid use of
-mathematical functions.
-
-`domain-error'
- `"Arithmetic domain error"'
- *Note Math Functions::.
-
-`overflow-error'
- `"Arithmetic overflow error"'
- *Note Math Functions::.
-
-`range-error'
- `"Arithmetic range error"'
- *Note Math Functions::.
-
-`singularity-error'
- `"Arithmetic singularity error"'
- *Note Math Functions::.
-
-`underflow-error'
- `"Arithmetic underflow error"'
- *Note Math Functions::.
-
-\1f
-File: lispref.info, Node: Standard Buffer-Local Variables, Next: Standard Keymaps, Prev: Standard Errors, Up: Top
-
-Buffer-Local Variables
-**********************
-
- The table below lists the general-purpose Emacs variables that are
-automatically local (when set) in each buffer. Many Lisp packages
-define such variables for their internal use; we don't list them here.
-
-`abbrev-mode'
- *note Abbrevs::
-
-`auto-fill-function'
- *note Auto Filling::
-
-`buffer-auto-save-file-name'
- *note Auto-Saving::
-
-`buffer-backed-up'
- *note Backup Files::
-
-`buffer-display-table'
- *note Display Tables::
-
-`buffer-file-format'
- *note Format Conversion::
-
-`buffer-file-name'
- *note Buffer File Name::
-
-`buffer-file-number'
- *note Buffer File Name::
-
-`buffer-file-truename'
- *note Buffer File Name::
-
-`buffer-file-type'
- *note Files and MS-DOS::
-
-`buffer-invisibility-spec'
- *note Invisible Text::
-
-`buffer-offer-save'
- *note Saving Buffers::
-
-`buffer-read-only'
- *note Read Only Buffers::
-
-`buffer-saved-size'
- *note Point::
-
-`buffer-undo-list'
- *note Undo::
-
-`cache-long-line-scans'
- *note Text Lines::
-
-`case-fold-search'
- *note Searching and Case::
-
-`ctl-arrow'
- *note Usual Display::
-
-`comment-column'
- *note Comments: (emacs)Comments.
-
-`default-directory'
- *note System Environment::
-
-`defun-prompt-regexp'
- *note List Motion::
-
-`fill-column'
- *note Auto Filling::
-
-`goal-column'
- *note Moving Point: (emacs)Moving Point.
-
-`left-margin'
- *note Indentation::
-
-`local-abbrev-table'
- *note Abbrevs::
-
-`local-write-file-hooks'
- *note Saving Buffers::
-
-`major-mode'
- *note Mode Help::
-
-`mark-active'
- *note The Mark::
-
-`mark-ring'
- *note The Mark::
+File: lispref.info, Node: Charsets, Next: MULE Characters, Prev: Internationalization Terminology, Up: MULE
-`minor-modes'
- *note Minor Modes::
+Charsets
+========
-`modeline-format'
- *note Modeline Data::
+ A "charset" in MULE is an object that encapsulates a particular
+character set as well as an ordering of those characters. Charsets are
+permanent objects and are named using symbols, like faces.
-`modeline-buffer-identification'
- *note Modeline Variables::
+ - Function: charsetp object
+ This function returns non-`nil' if OBJECT is a charset.
-`modeline-format'
- *note Modeline Data::
+* Menu:
-`modeline-modified'
- *note Modeline Variables::
-
-`modeline-process'
- *note Modeline Variables::
-
-`mode-name'
- *note Modeline Variables::
-
-`overwrite-mode'
- *note Insertion::
-
-`paragraph-separate'
- *note Standard Regexps::
-
-`paragraph-start'
- *note Standard Regexps::
-
-`point-before-scroll'
- Used for communication between mouse commands and scroll-bar
- commands.
-
-`require-final-newline'
- *note Insertion::
-
-`selective-display'
- *note Selective Display::
-
-`selective-display-ellipses'
- *note Selective Display::
-
-`tab-width'
- *note Usual Display::
-
-`truncate-lines'
- *note Truncation::
-
-`vc-mode'
- *note Modeline Variables::
+* Charset Properties:: Properties of a charset.
+* Basic Charset Functions:: Functions for working with charsets.
+* Charset Property Functions:: Functions for accessing charset properties.
+* Predefined Charsets:: Predefined charset objects.
\1f
-File: lispref.info, Node: Standard Keymaps, Next: Standard Hooks, Prev: Standard Buffer-Local Variables, Up: Top
-
-Standard Keymaps
-****************
-
- The following symbols are used as the names for various keymaps.
-Some of these exist when XEmacs is first started, others are loaded
-only when their respective mode is used. This is not an exhaustive
-list.
-
- Almost all of these maps are used as local maps. Indeed, of the
-modes that presently exist, only Vip mode and Terminal mode ever change
-the global keymap.
-
-`bookmark-map'
- A keymap containing bindings to bookmark functions.
-
-`Buffer-menu-mode-map'
- A keymap used by Buffer Menu mode.
-
-`c++-mode-map'
- A keymap used by C++ mode.
-
-`c-mode-map'
- A keymap used by C mode. A sparse keymap used by C mode.
-
-`command-history-map'
- A keymap used by Command History mode.
-
-`ctl-x-4-map'
- A keymap for subcommands of the prefix `C-x 4'.
-
-`ctl-x-5-map'
- A keymap for subcommands of the prefix `C-x 5'.
-
-`ctl-x-map'
- A keymap for `C-x' commands.
-
-`debugger-mode-map'
- A keymap used by Debugger mode.
-
-`dired-mode-map'
- A keymap for `dired-mode' buffers.
-
-`edit-abbrevs-map'
- A keymap used in `edit-abbrevs'.
-
-`edit-tab-stops-map'
- A keymap used in `edit-tab-stops'.
-
-`electric-buffer-menu-mode-map'
- A keymap used by Electric Buffer Menu mode.
-
-`electric-history-map'
- A keymap used by Electric Command History mode.
-
-`emacs-lisp-mode-map'
- A keymap used by Emacs Lisp mode.
-
-`help-map'
- A keymap for characters following the Help key.
-
-`Helper-help-map'
- A keymap used by the help utility package.
- It has the same keymap in its value cell and in its function cell.
-
-`Info-edit-map'
- A keymap used by the `e' command of Info.
-
-`Info-mode-map'
- A keymap containing Info commands.
-
-`isearch-mode-map'
- A keymap that defines the characters you can type within
- incremental search.
-
-`itimer-edit-map'
- A keymap used when in Itimer Edit mode.
-
-`lisp-interaction-mode-map'
- A keymap used by Lisp mode.
-
-`lisp-mode-map'
- A keymap used by Lisp mode.
-
- A keymap for minibuffer input with completion.
-
-`minibuffer-local-isearch-map'
- A keymap for editing isearch strings in the minibuffer.
-
-`minibuffer-local-map'
- Default keymap to use when reading from the minibuffer.
-
-`minibuffer-local-must-match-map'
- A keymap for minibuffer input with completion, for exact match.
-
-`mode-specific-map'
- The keymap for characters following `C-c'. Note, this is in the
- global map. This map is not actually mode specific: its name was
- chosen to be informative for the user in `C-h b'
- (`display-bindings'), where it describes the main use of the `C-c'
- prefix key.
-
-`modeline-map'
- The keymap consulted for mouse-clicks on the modeline of a window.
-
-`objc-mode-map'
- A keymap used in Objective C mode as a local map.
-
-`occur-mode-map'
- A local keymap used by Occur mode.
-
-`overriding-local-map'
- A keymap that overrides all other local keymaps.
-
-`query-replace-map'
- A local keymap used for responses in `query-replace' and related
- commands; also for `y-or-n-p' and `map-y-or-n-p'. The functions
- that use this map do not support prefix keys; they look up one
- event at a time.
-
-`read-expression-map'
- The minibuffer keymap used for reading Lisp expressions.
-
-`read-shell-command-map'
- The minibuffer keymap used by shell-command and related commands.
-
-`shared-lisp-mode-map'
- A keymap for commands shared by all sorts of Lisp modes.
-
-`text-mode-map'
- A keymap used by Text mode.
-
-`toolbar-map'
- The keymap consulted for mouse-clicks over a toolbar.
-
-`view-mode-map'
- A keymap used by View mode.
+File: lispref.info, Node: Charset Properties, Next: Basic Charset Functions, Up: Charsets
+
+Charset Properties
+------------------
+
+ Charsets have the following properties:
+
+`name'
+ A symbol naming the charset. Every charset must have a different
+ name; this allows a charset to be referred to using its name
+ rather than the actual charset object.
+
+`doc-string'
+ A documentation string describing the charset.
+
+`registry'
+ A regular expression matching the font registry field for this
+ character set. For example, both the `ascii' and `latin-iso8859-1'
+ charsets use the registry `"ISO8859-1"'. This field is used to
+ choose an appropriate font when the user gives a general font
+ specification such as `-*-courier-medium-r-*-140-*', i.e. a
+ 14-point upright medium-weight Courier font.
+
+`dimension'
+ Number of position codes used to index a character in the
+ character set. XEmacs/MULE can only handle character sets of
+ dimension 1 or 2. This property defaults to 1.
+
+`chars'
+ Number of characters in each dimension. In XEmacs/MULE, the only
+ allowed values are 94 or 96. (There are a couple of pre-defined
+ character sets, such as ASCII, that do not follow this, but you
+ cannot define new ones like this.) Defaults to 94. Note that if
+ the dimension is 2, the character set thus described is 94x94 or
+ 96x96.
+
+`columns'
+ Number of columns used to display a character in this charset.
+ Only used in TTY mode. (Under X, the actual width of a character
+ can be derived from the font used to display the characters.) If
+ unspecified, defaults to the dimension. (This is almost always the
+ correct value, because character sets with dimension 2 are usually
+ ideograph character sets, which need two columns to display the
+ intricate ideographs.)
+
+`direction'
+ A symbol, either `l2r' (left-to-right) or `r2l' (right-to-left).
+ Defaults to `l2r'. This specifies the direction that the text
+ should be displayed in, and will be left-to-right for most
+ charsets but right-to-left for Hebrew and Arabic. (Right-to-left
+ display is not currently implemented.)
+
+`final'
+ Final byte of the standard ISO 2022 escape sequence designating
+ this charset. Must be supplied. Each combination of (DIMENSION,
+ CHARS) defines a separate namespace for final bytes, and each
+ charset within a particular namespace must have a different final
+ byte. Note that ISO 2022 restricts the final byte to the range
+ 0x30 - 0x7E if dimension == 1, and 0x30 - 0x5F if dimension == 2.
+ Note also that final bytes in the range 0x30 - 0x3F are reserved
+ for user-defined (not official) character sets. For more
+ information on ISO 2022, see *Note Coding Systems::.
+
+`graphic'
+ 0 (use left half of font on output) or 1 (use right half of font on
+ output). Defaults to 0. This specifies how to convert the
+ position codes that index a character in a character set into an
+ index into the font used to display the character set. With
+ `graphic' set to 0, position codes 33 through 126 map to font
+ indices 33 through 126; with it set to 1, position codes 33
+ through 126 map to font indices 161 through 254 (i.e. the same
+ number but with the high bit set). For example, for a font whose
+ registry is ISO8859-1, the left half of the font (octets 0x20 -
+ 0x7F) is the `ascii' charset, while the right half (octets 0xA0 -
+ 0xFF) is the `latin-iso8859-1' charset.
+
+`ccl-program'
+ A compiled CCL program used to convert a character in this charset
+ into an index into the font. This is in addition to the `graphic'
+ property. If a CCL program is defined, the position codes of a
+ character will first be processed according to `graphic' and then
+ passed through the CCL program, with the resulting values used to
+ index the font.
+
+ This is used, for example, in the Big5 character set (used in
+ Taiwan). This character set is not ISO-2022-compliant, and its
+ size (94x157) does not fit within the maximum 96x96 size of
+ ISO-2022-compliant character sets. As a result, XEmacs/MULE
+ splits it (in a rather complex fashion, so as to group the most
+ commonly used characters together) into two charset objects
+ (`big5-1' and `big5-2'), each of size 94x94, and each charset
+ object uses a CCL program to convert the modified position codes
+ back into standard Big5 indices to retrieve a character from a
+ Big5 font.
+
+ Most of the above properties can only be set when the charset is
+initialized, and cannot be changed later. *Note Charset Property
+Functions::.
\1f
-File: lispref.info, Node: Standard Hooks, Next: Index, Prev: Standard Keymaps, Up: Top
-
-Standard Hooks
-**************
-
- The following is a list of hook variables that let you provide
-functions to be called from within Emacs on suitable occasions.
-
- Most of these variables have names ending with `-hook'. They are
-"normal hooks", run by means of `run-hooks'. The value of such a hook
-is a list of functions. The recommended way to put a new function on
-such a hook is to call `add-hook'. *Note Hooks::, for more information
-about using hooks.
-
- The variables whose names end in `-function' have single functions
-as their values. Usually there is a specific reason why the variable is
-not a normal hook, such as the need to pass arguments to the function.
-(In older Emacs versions, some of these variables had names ending in
-`-hook' even though they were not normal hooks.)
-
- The variables whose names end in `-hooks' or `-functions' have lists
-of functions as their values, but these functions are called in a
-special way (they are passed arguments, or else their values are used).
-
-`activate-menubar-hook'
-
-`activate-popup-menu-hook'
-
-`ad-definition-hooks'
-
-`adaptive-fill-function'
-
-`add-log-current-defun-function'
-
-`after-change-functions'
-
-`after-delete-annotation-hook'
-
-`after-init-hook'
-
-`after-insert-file-functions'
-
-`after-revert-hook'
-
-`after-save-hook'
-
-`after-set-visited-file-name-hooks'
-
-`after-write-file-hooks'
-
-`auto-fill-function'
-
-`auto-save-hook'
-
-`before-change-functions'
-
-`before-delete-annotation-hook'
-
-`before-init-hook'
-
-`before-revert-hook'
-
-`blink-paren-function'
-
-`buffers-menu-switch-to-buffer-function'
-
-`c++-mode-hook'
-
-`c-delete-function'
-
-`c-mode-common-hook'
-
-`c-mode-hook'
-
-`c-special-indent-hook'
-
-`calendar-load-hook'
-
-`change-major-mode-hook'
-
-`command-history-hook'
-
-`comment-indent-function'
-
-`compilation-buffer-name-function'
-
-`compilation-exit-message-function'
-
-`compilation-finish-function'
-
-`compilation-parse-errors-function'
-
-`compilation-mode-hook'
-
-`create-console-hook'
-
-`create-device-hook'
-
-`create-frame-hook'
-
-`dabbrev-friend-buffer-function'
-
-`dabbrev-select-buffers-function'
-
-`delete-console-hook'
-
-`delete-device-hook'
-
-`delete-frame-hook'
-
-`deselect-frame-hook'
-
-`diary-display-hook'
-
-`diary-hook'
-
-`dired-after-readin-hook'
-
-`dired-before-readin-hook'
-
-`dired-load-hook'
-
-`dired-mode-hook'
-
-`disabled-command-hook'
-
-`display-buffer-function'
-
-`ediff-after-setup-control-frame-hook'
-
-`ediff-after-setup-windows-hook'
-
-`ediff-before-setup-control-frame-hook'
-
-`ediff-before-setup-windows-hook'
-
-`ediff-brief-help-message-function'
-
-`ediff-cleanup-hook'
+File: lispref.info, Node: Basic Charset Functions, Next: Charset Property Functions, Prev: Charset Properties, Up: Charsets
+
+Basic Charset Functions
+-----------------------
+
+ - 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
+ 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
+ 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
+ describing the character set. PROPS is a property list,
+ describing the specific nature of the character set. The
+ recognized properties are `registry', `dimension', `columns',
+ `chars', `final', `graphic', `direction', and `ccl-program', as
+ previously described.
+
+ - 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
+ 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
+ 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.
-`ediff-control-frame-position-function'
-
-`ediff-display-help-hook'
-
-`ediff-focus-on-regexp-matches-function'
-
-`ediff-forward-word-function'
-
-`ediff-hide-regexp-matches-function'
-
-`ediff-keymap-setup-hook'
-
-`ediff-load-hook'
-
-`ediff-long-help-message-function'
-
-`ediff-make-wide-display-function'
-
-`ediff-merge-split-window-function'
-
-`ediff-meta-action-function'
-
-`ediff-meta-redraw-function'
-
-`ediff-mode-hook'
-
-`ediff-prepare-buffer-hook'
-
-`ediff-quit-hook'
-
-`ediff-registry-setup-hook'
-
-`ediff-select-hook'
-
-`ediff-session-action-function'
-
-`ediff-session-group-setup-hook'
-
-`ediff-setup-diff-regions-function'
-
-`ediff-show-registry-hook'
-
-`ediff-show-session-group-hook'
-
-`ediff-skip-diff-region-function'
-
-`ediff-split-window-function'
-
-`ediff-startup-hook'
-
-`ediff-suspend-hook'
-
-`ediff-toggle-read-only-function'
-
-`ediff-unselect-hook'
-
-`ediff-window-setup-function'
-
-`edit-picture-hook'
-
-`electric-buffer-menu-mode-hook'
-
-`electric-command-history-hook'
-
-`electric-help-mode-hook'
-
-`emacs-lisp-mode-hook'
-
-`fill-paragraph-function'
-
-`find-file-hooks'
-
-`find-file-not-found-hooks'
-
-`first-change-hook'
-
-`font-lock-after-fontify-buffer-hook'
-
-`font-lock-beginning-of-syntax-function'
-
-`font-lock-mode-hook'
-
-`fume-found-function-hook'
-
-`fume-list-mode-hook'
-
-`fume-rescan-buffer-hook'
-
-`fume-sort-function'
-
-`gnus-startup-hook'
-
-`hack-local-variables-hook'
-
-`highlight-headers-follow-url-function'
-
-`hyper-apropos-mode-hook'
-
-`indent-line-function'
-
-`indent-mim-hook'
-
-`indent-region-function'
-
-`initial-calendar-window-hook'
-
-`isearch-mode-end-hook'
-
-`isearch-mode-hook'
-
-`java-mode-hook'
-
-`kill-buffer-hook'
-
-`kill-buffer-query-functions'
-
-`kill-emacs-hook'
-
-`kill-emacs-query-functions'
-
-`kill-hooks'
-
-`LaTeX-mode-hook'
-
-`latex-mode-hook'
-
-`ledit-mode-hook'
-
-`lisp-indent-function'
-
-`lisp-interaction-mode-hook'
-
-`lisp-mode-hook'
-
-`list-diary-entries-hook'
-
-`load-read-function'
-
-`log-message-filter-function'
-
-`m2-mode-hook'
-
-`mail-citation-hook'
-
-`mail-mode-hook'
-
-`mail-setup-hook'
-
-`make-annotation-hook'
-
-`makefile-mode-hook'
-
-`map-frame-hook'
-
-`mark-diary-entries-hook'
-
-`medit-mode-hook'
-
-`menu-no-selection-hook'
-
-`mh-compose-letter-hook'
-
-`mh-folder-mode-hook'
-
-`mh-letter-mode-hook'
-
-`mim-mode-hook'
-
-`minibuffer-exit-hook'
-
-`minibuffer-setup-hook'
-
-`mode-motion-hook'
-
-`mouse-enter-frame-hook'
-
-`mouse-leave-frame-hook'
-
-`mouse-track-cleanup-hook'
-
-`mouse-track-click-hook'
-
-`mouse-track-down-hook'
-
-`mouse-track-drag-hook'
-
-`mouse-track-drag-up-hook'
-
-`mouse-track-up-hook'
-
-`mouse-yank-function'
-
-`news-mode-hook'
-
-`news-reply-mode-hook'
-
-`news-setup-hook'
-
-`nongregorian-diary-listing-hook'
-
-`nongregorian-diary-marking-hook'
-
-`nroff-mode-hook'
-
-`objc-mode-hook'
-
-`outline-mode-hook'
-
-`perl-mode-hook'
-
-`plain-TeX-mode-hook'
-
-`post-command-hook'
-
-`post-gc-hook'
-
-`pre-abbrev-expand-hook'
-
-`pre-command-hook'
-
-`pre-display-buffer-function'
-
-`pre-gc-hook'
-
-`pre-idle-hook'
-
-`print-diary-entries-hook'
-
-`prolog-mode-hook'
-
-`protect-innocence-hook'
-
-`remove-message-hook'
-
-`revert-buffer-function'
-
-`revert-buffer-insert-contents-function'
-
-`rmail-edit-mode-hook'
-
-`rmail-mode-hook'
-
-`rmail-retry-setup-hook'
-
-`rmail-summary-mode-hook'
-
-`scheme-indent-hook'
-
-`scheme-mode-hook'
-
-`scribe-mode-hook'
-
-`select-frame-hook'
-
-`send-mail-function'
-
-`shell-mode-hook'
-
-`shell-set-directory-error-hook'
-
-`special-display-function'
-
-`suspend-hook'
-
-`suspend-resume-hook'
-
-`temp-buffer-show-function'
-
-`term-setup-hook'
-
-`terminal-mode-hook'
-
-`terminal-mode-break-hook'
-
-`TeX-mode-hook'
-
-`tex-mode-hook'
-
-`text-mode-hook'
-
-`today-visible-calendar-hook'
-
-`today-invisible-calendar-hook'
-
-`tooltalk-message-handler-hook'
-
-`tooltalk-pattern-handler-hook'
-
-`tooltalk-unprocessed-message-hook'
-
-`unmap-frame-hook'
-
-`vc-checkin-hook'
-
-`vc-checkout-writable-buffer-hook'
+\1f
+File: lispref.info, Node: Charset Property Functions, Next: Predefined Charsets, Prev: Basic Charset Functions, Up: Charsets
-`vc-log-after-operation-hook'
+Charset Property Functions
+--------------------------
-`vc-make-buffer-writable-hook'
+ All of these functions accept either a charset name or charset
+object.
-`view-hook'
+ - Function: charset-property charset prop
+ This function returns property PROP of CHARSET. *Note Charset
+ Properties::.
-`vm-arrived-message-hook'
+ Convenience functions are also provided for retrieving individual
+properties of a charset.
-`vm-arrived-messages-hook'
+ - Function: charset-name charset
+ This function returns the name of CHARSET. This will be a symbol.
-`vm-chop-full-name-function'
+ - Function: charset-doc-string charset
+ This function returns the doc string of CHARSET.
-`vm-display-buffer-hook'
+ - Function: charset-registry charset
+ This function returns the registry of CHARSET.
-`vm-edit-message-hook'
+ - Function: charset-dimension charset
+ This function returns the dimension of CHARSET.
-`vm-forward-message-hook'
+ - Function: charset-chars charset
+ This function returns the number of characters per dimension of
+ CHARSET.
-`vm-iconify-frame-hook'
+ - Function: charset-columns charset
+ This function returns the number of display columns per character
+ (in TTY mode) of CHARSET.
-`vm-inhibit-write-file-hook'
+ - Function: charset-direction charset
+ This function returns the display direction of CHARSET--either
+ `l2r' or `r2l'.
-`vm-key-functions'
+ - Function: charset-final charset
+ This function returns the final byte of the ISO 2022 escape
+ sequence designating CHARSET.
-`vm-mail-hook'
+ - 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.
-`vm-mail-mode-hook'
+ - Function: charset-ccl-program charset
+ This function returns the CCL program, if any, for converting
+ position codes of characters in CHARSET into font indices.
-`vm-menu-setup-hook'
+ The only property of a charset that can currently be set after the
+charset has been created is the CCL program.
-`vm-mode-hook'
+ - Function: set-charset-ccl-program charset ccl-program
+ This function sets the `ccl-program' property of CHARSET to
+ CCL-PROGRAM.
-`vm-quit-hook'
+\1f
+File: lispref.info, Node: Predefined Charsets, Prev: Charset Property Functions, Up: Charsets
+
+Predefined Charsets
+-------------------
+
+ The following charsets are predefined in the C code.
+
+ Name Type Fi Gr Dir Registry
+ --------------------------------------------------------------
+ ascii 94 B 0 l2r ISO8859-1
+ control-1 94 0 l2r ---
+ latin-iso8859-1 94 A 1 l2r ISO8859-1
+ latin-iso8859-2 96 B 1 l2r ISO8859-2
+ latin-iso8859-3 96 C 1 l2r ISO8859-3
+ latin-iso8859-4 96 D 1 l2r ISO8859-4
+ cyrillic-iso8859-5 96 L 1 l2r ISO8859-5
+ arabic-iso8859-6 96 G 1 r2l ISO8859-6
+ greek-iso8859-7 96 F 1 l2r ISO8859-7
+ hebrew-iso8859-8 96 H 1 r2l ISO8859-8
+ latin-iso8859-9 96 M 1 l2r ISO8859-9
+ thai-tis620 96 T 1 l2r TIS620
+ katakana-jisx0201 94 I 1 l2r JISX0201.1976
+ latin-jisx0201 94 J 0 l2r JISX0201.1976
+ japanese-jisx0208-1978 94x94 @ 0 l2r JISX0208.1978
+ japanese-jisx0208 94x94 B 0 l2r JISX0208.19(83|90)
+ japanese-jisx0212 94x94 D 0 l2r JISX0212
+ chinese-gb2312 94x94 A 0 l2r GB2312
+ chinese-cns11643-1 94x94 G 0 l2r CNS11643.1
+ chinese-cns11643-2 94x94 H 0 l2r CNS11643.2
+ chinese-big5-1 94x94 0 0 l2r Big5
+ chinese-big5-2 94x94 1 0 l2r Big5
+ korean-ksc5601 94x94 C 0 l2r KSC5601
+ composite 96x96 0 l2r ---
+
+ The following charsets are predefined in the Lisp code.
+
+ Name Type Fi Gr Dir Registry
+ --------------------------------------------------------------
+ arabic-digit 94 2 0 l2r MuleArabic-0
+ arabic-1-column 94 3 0 r2l MuleArabic-1
+ arabic-2-column 94 4 0 r2l MuleArabic-2
+ sisheng 94 0 0 l2r sisheng_cwnn\|OMRON_UDC_ZH
+ chinese-cns11643-3 94x94 I 0 l2r CNS11643.1
+ chinese-cns11643-4 94x94 J 0 l2r CNS11643.1
+ chinese-cns11643-5 94x94 K 0 l2r CNS11643.1
+ chinese-cns11643-6 94x94 L 0 l2r CNS11643.1
+ chinese-cns11643-7 94x94 M 0 l2r CNS11643.1
+ ethiopic 94x94 2 0 l2r Ethio
+ ascii-r2l 94 B 0 r2l ISO8859-1
+ ipa 96 0 1 l2r MuleIPA
+ vietnamese-lower 96 1 1 l2r VISCII1.1
+ vietnamese-upper 96 2 1 l2r VISCII1.1
+
+ For all of the above charsets, the dimension and number of columns
+are the same.
+
+ Note that ASCII, Control-1, and Composite are handled specially.
+This is why some of the fields are blank; and some of the filled-in
+fields (e.g. the type) are not really accurate.
-`vm-rename-current-buffer-function'
+\1f
+File: lispref.info, Node: MULE Characters, Next: Composite Characters, Prev: Charsets, Up: MULE
-`vm-reply-hook'
+MULE Characters
+===============
-`vm-resend-bounced-message-hook'
+ - Function: make-char charset arg1 &optional arg2
+ This function makes a multi-byte character from CHARSET and octets
+ ARG1 and ARG2.
-`vm-resend-message-hook'
+ - Function: char-charset ch
+ This function returns the character set of char CH.
-`vm-retrieved-spooled-mail-hook'
+ - 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.
-`vm-select-message-hook'
+ - 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.
-`vm-select-new-message-hook'
+ - Function: find-charset-string string
+ This function returns a list of the charsets in STRING.
-`vm-select-unread-message-hook'
+\1f
+File: lispref.info, Node: Composite Characters, Next: Coding Systems, Prev: MULE Characters, Up: MULE
-`vm-send-digest-hook'
+Composite Characters
+====================
-`vm-summary-mode-hook'
+ Composite characters are not yet completely implemented.
-`vm-summary-pointer-update-hook'
+ - 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.
-`vm-summary-redo-hook'
+ - Function: composite-char-string ch
+ This function returns a string of the characters comprising a
+ composite character.
-`vm-summary-update-hook'
+ - 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.
-`vm-undisplay-buffer-hook'
+ - 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
+ out of which the composite character was formed. Non-composite
+ characters are left as-is. BUFFER defaults to the current buffer
+ if omitted.
-`vm-visit-folder-hook'
+\1f
+File: lispref.info, Node: Coding Systems, Next: CCL, Prev: Composite Characters, Up: MULE
+
+Coding Systems
+==============
+
+ A coding system is an object that defines how text containing
+multiple character sets is encoded into a stream of (typically 8-bit)
+bytes. The coding system is used to decode the stream into a series of
+characters (which may be from multiple charsets) when the text is read
+from a file or process, and is used to encode the text back into the
+same format when it is written out to a file or process.
+
+ For example, many ISO-2022-compliant coding systems (such as Compound
+Text, which is used for inter-client data under the X Window System) use
+escape sequences to switch between different charsets - Japanese Kanji,
+for example, is invoked with `ESC $ ( B'; ASCII is invoked with `ESC (
+B'; and Cyrillic is invoked with `ESC - L'. See `make-coding-system'
+for more information.
+
+ Coding systems are normally identified using a symbol, and the
+symbol is accepted in place of the actual coding system object whenever
+a coding system is called for. (This is similar to how faces and
+charsets work.)
+
+ - Function: coding-system-p object
+ This function returns non-`nil' if OBJECT is a coding system.
+
+* Menu:
+
+* Coding System Types:: Classifying coding systems.
+* ISO 2022:: An international standard for
+ charsets and encodings.
+* EOL Conversion:: Dealing with different ways of denoting
+ the end of a line.
+* Coding System Properties:: Properties of a coding system.
+* Basic Coding System Functions:: Working with coding systems.
+* Coding System Property Functions:: Retrieving a coding system's properties.
+* Encoding and Decoding Text:: Encoding and decoding text.
+* Detection of Textual Encoding:: Determining how text is encoded.
+* Big5 and Shift-JIS Functions:: Special functions for these non-standard
+ encodings.
+* Predefined Coding Systems:: Coding systems implemented by MULE.
-`window-setup-hook'
+\1f
+File: lispref.info, Node: Coding System Types, Next: ISO 2022, Up: Coding Systems
+
+Coding System Types
+-------------------
+
+ The coding system type determines the basic algorithm XEmacs will
+use to decode or encode a data stream. Character encodings will be
+converted to the MULE encoding, escape sequences processed, and newline
+sequences converted to XEmacs's internal representation. There are
+three basic classes of coding system type: no-conversion, ISO-2022, and
+special.
+
+ No conversion allows you to look at the file's internal
+representation. Since XEmacs is basically a text editor, "no
+conversion" does convert newline conventions by default. (Use the
+'binary coding-system if this is not desired.)
+
+ ISO 2022 (*note ISO 2022::) is the basic international standard
+regulating use of "coded character sets for the exchange of data", ie,
+text streams. ISO 2022 contains functions that make it possible to
+encode text streams to comply with restrictions of the Internet mail
+system and de facto restrictions of most file systems (eg, use of the
+separator character in file names). Coding systems which are not ISO
+2022 conformant can be difficult to handle. Perhaps more important,
+they are not adaptable to multilingual information interchange, with
+the obvious exception of ISO 10646 (Unicode). (Unicode is partially
+supported by XEmacs with the addition of the Lisp package ucs-conv.)
+
+ The special class of coding systems includes automatic detection,
+CCL (a "little language" embedded as an interpreter, useful for
+translating between variants of a single character set),
+non-ISO-2022-conformant encodings like Unicode, Shift JIS, and Big5,
+and MULE internal coding. (NB: this list is based on XEmacs 21.2.
+Terminology may vary slightly for other versions of XEmacs and for GNU
+Emacs 20.)
+
+`no-conversion'
+ No conversion, for binary files, and a few special cases of
+ non-ISO-2022 coding systems where conversion is done by hook
+ functions (usually implemented in CCL). On output, graphic
+ characters that are not in ASCII or Latin-1 will be replaced by a
+ `?'. (For a no-conversion-encoded buffer, these characters will
+ only be present if you explicitly insert them.)
+
+`iso2022'
+ Any ISO-2022-compliant encoding. Among others, this includes JIS
+ (the Japanese encoding commonly used for e-mail), national
+ variants of EUC (the standard Unix encoding for Japanese and other
+ languages), and Compound Text (an encoding used in X11). You can
+ specify more specific information about the conversion with the
+ FLAGS argument.
+
+`ucs-4'
+ ISO 10646 UCS-4 encoding. A 31-bit fixed-width superset of
+ Unicode.
+
+`utf-8'
+ ISO 10646 UTF-8 encoding. A "file system safe" transformation
+ format that can be used with both UCS-4 and Unicode.
+
+`undecided'
+ Automatic conversion. XEmacs attempts to detect the coding system
+ used in the file.
+
+`shift-jis'
+ Shift-JIS (a Japanese encoding commonly used in PC operating
+ systems).
+
+`big5'
+ Big5 (the encoding commonly used for Taiwanese).
+
+`ccl'
+ The conversion is performed using a user-written pseudo-code
+ program. CCL (Code Conversion Language) is the name of this
+ pseudo-code. For example, CCL is used to map KOI8-R characters
+ (an encoding for Russian Cyrillic) to ISO8859-5 (the form used
+ internally by MULE).
+
+`internal'
+ Write out or read in the raw contents of the memory representing
+ the buffer's text. This is primarily useful for debugging
+ purposes, and is only enabled when XEmacs has been compiled with
+ `DEBUG_XEMACS' set (the `--debug' configure option). *Warning*:
+ Reading in a file using `internal' conversion can result in an
+ internal inconsistency in the memory representing a buffer's text,
+ which will produce unpredictable results and may cause XEmacs to
+ crash. Under normal circumstances you should never use `internal'
+ conversion.
-`write-contents-hooks'
+\1f
+File: lispref.info, Node: ISO 2022, Next: EOL Conversion, Prev: Coding System Types, Up: Coding Systems
+
+ISO 2022
+========
+
+ This section briefly describes the ISO 2022 encoding standard. A
+more thorough treatment is available in the original document of ISO
+2022 as well as various national standards (such as JIS X 0202).
+
+ Character sets ("charsets") are classified into the following four
+categories, according to the number of characters in the charset:
+94-charset, 96-charset, 94x94-charset, and 96x96-charset. This means
+that although an ISO 2022 coding system may have variable width
+characters, each charset used is fixed-width (in contrast to the MULE
+character set and UTF-8, for example).
+
+ ISO 2022 provides for switching between character sets via escape
+sequences. This switching is somewhat complicated, because ISO 2022
+provides for both legacy applications like Internet mail that accept
+only 7 significant bits in some contexts (RFC 822 headers, for example),
+and more modern "8-bit clean" applications. It also provides for
+compact and transparent representation of languages like Japanese which
+mix ASCII and a national script (even outside of computer programs).
+
+ First, ISO 2022 codified prevailing practice by dividing the code
+space into "control" and "graphic" regions. The code points 0x00-0x1F
+and 0x80-0x9F are reserved for "control characters", while "graphic
+characters" must be assigned to code points in the regions 0x20-0x7F and
+0xA0-0xFF. The positions 0x20 and 0x7F are special, and under some
+circumstances must be assigned the graphic character "ASCII SPACE" and
+the control character "ASCII DEL" respectively.
+
+ The various regions are given the name C0 (0x00-0x1F), GL
+(0x20-0x7F), C1 (0x80-0x9F), and GR (0xA0-0xFF). GL and GR stand for
+"graphic left" and "graphic right", respectively, because of the
+standard method of displaying graphic character sets in tables with the
+high byte indexing columns and the low byte indexing rows. I don't
+find it very intuitive, but these are called "registers".
+
+ An ISO 2022-conformant encoding for a graphic character set must use
+a fixed number of bytes per character, and the values must fit into a
+single register; that is, each byte must range over either 0x20-0x7F, or
+0xA0-0xFF. It is not allowed to extend the range of the repertoire of a
+character set by using both ranges at the same. This is why a standard
+character set such as ISO 8859-1 is actually considered by ISO 2022 to
+be an aggregation of two character sets, ASCII and LATIN-1, and why it
+is technically incorrect to refer to ISO 8859-1 as "Latin 1". Also, a
+single character's bytes must all be drawn from the same register; this
+is why Shift JIS (for Japanese) and Big 5 (for Chinese) are not ISO
+2022-compatible encodings.
+
+ The reason for this restriction becomes clear when you attempt to
+define an efficient, robust encoding for a language like Japanese.
+Like ISO 8859, Japanese encodings are aggregations of several character
+sets. In practice, the vast majority of characters are drawn from the
+"JIS Roman" character set (a derivative of ASCII; it won't hurt to
+think of it as ASCII) and the JIS X 0208 standard "basic Japanese"
+character set including not only ideographic characters ("kanji") but
+syllabic Japanese characters ("kana"), a wide variety of symbols, and
+many alphabetic characters (Roman, Greek, and Cyrillic) as well.
+Although JIS X 0208 includes the whole Roman alphabet, as a 2-byte code
+it is not suited to programming; thus the inclusion of ASCII in the
+standard Japanese encodings.
+
+ For normal Japanese text such as in newspapers, a broad repertoire of
+approximately 3000 characters is used. Evidently this won't fit into
+one byte; two must be used. But much of the text processed by Japanese
+computers is computer source code, nearly all of which is ASCII. A not
+insignificant portion of ordinary text is English (as such or as
+borrowed Japanese vocabulary) or other languages which can represented
+at least approximately in ASCII, as well. It seems reasonable then to
+represent ASCII in one byte, and JIS X 0208 in two. And this is exactly
+what the Extended Unix Code for Japanese (EUC-JP) does. ASCII is
+invoked to the GL register, and JIS X 0208 is invoked to the GR
+register. Thus, each byte can be tested for its character set by
+looking at the high bit; if set, it is Japanese, if clear, it is ASCII.
+Furthermore, since control characters like newline can never be part of
+a graphic character, even in the case of corruption in transmission the
+stream will be resynchronized at every line break, on the order of 60-80
+bytes. This coding system requires no escape sequences or special
+control codes to represent 99.9% of all Japanese text.
+
+ Note carefully the distinction between the character sets (ASCII and
+JIS X 0208), the encoding (EUC-JP), and the coding system (ISO 2022).
+The JIS X 0208 character set is used in three different encodings for
+Japanese, but in ISO-2022-JP it is invoked into GL (so the high bit is
+always clear), in EUC-JP it is invoked into GR (setting the high bit in
+the process), and in Shift JIS the high bit may be set or reset, and the
+significant bits are shifted within the 16-bit character so that the two
+main character sets can coexist with a third (the "halfwidth katakana"
+of JIS X 0201). As the name implies, the ISO-2022-JP encoding is also a
+version of the ISO-2022 coding system.
+
+ In order to systematically treat subsidiary character sets (like the
+"halfwidth katakana" already mentioned, and the "supplementary kanji" of
+JIS X 0212), four further registers are defined: G0, G1, G2, and G3.
+Unlike GL and GR, they are not logically distinguished by internal
+format. Instead, the process of "invocation" mentioned earlier is
+broken into two steps: first, a character set is "designated" to one of
+the registers G0-G3 by use of an "escape sequence" of the form:
+
+ ESC [I] I F
+
+ where I is an intermediate character or characters in the range 0x20
+- 0x3F, and F, from the range 0x30-0x7Fm is the final character
+identifying this charset. (Final characters in the range 0x30-0x3F are
+reserved for private use and will never have a publically registered
+meaning.)
+
+ Then that register is "invoked" to either GL or GR, either
+automatically (designations to G0 normally involve invocation to GL as
+well), or by use of shifting (affecting only the following character in
+the data stream) or locking (effective until the next designation or
+locking) control sequences. An encoding conformant to ISO 2022 is
+typically defined by designating the initial contents of the G0-G3
+registers, specifying an 7 or 8 bit environment, and specifying whether
+further designations will be recognized.
+
+ Some examples of character sets and the registered final characters
+F used to designate them:
+
+94-charset
+ ASCII (B), left (J) and right (I) half of JIS X 0201, ...
+
+96-charset
+ Latin-1 (A), Latin-2 (B), Latin-3 (C), ...
+
+94x94-charset
+ GB2312 (A), JIS X 0208 (B), KSC5601 (C), ...
+
+96x96-charset
+ none for the moment
+
+ The meanings of the various characters in these sequences, where not
+specified by the ISO 2022 standard (such as the ESC character), are
+assigned by "ECMA", the European Computer Manufacturers Association.
+
+ The meaning of intermediate characters are:
+
+ $ [0x24]: indicate charset of dimension 2 (94x94 or 96x96).
+ ( [0x28]: designate to G0 a 94-charset whose final byte is F.
+ ) [0x29]: designate to G1 a 94-charset whose final byte is F.
+ * [0x2A]: designate to G2 a 94-charset whose final byte is F.
+ + [0x2B]: designate to G3 a 94-charset whose final byte is F.
+ , [0x2C]: designate to G0 a 96-charset whose final byte is F.
+ - [0x2D]: designate to G1 a 96-charset whose final byte is F.
+ . [0x2E]: designate to G2 a 96-charset whose final byte is F.
+ / [0x2F]: designate to G3 a 96-charset whose final byte is F.
+
+ The comma may be used in files read and written only by MULE, as a
+MULE extension, but this is illegal in ISO 2022. (The reason is that
+in ISO 2022 G0 must be a 94-member character set, with 0x20 assigned
+the value SPACE, and 0x7F assigned the value DEL.)
+
+ Here are examples of designations:
+
+ ESC ( B : designate to G0 ASCII
+ ESC - A : designate to G1 Latin-1
+ ESC $ ( A or ESC $ A : designate to G0 GB2312
+ ESC $ ( B or ESC $ B : designate to G0 JISX0208
+ ESC $ ) C : designate to G1 KSC5601
+
+ (The short forms used to designate GB2312 and JIS X 0208 are for
+backwards compatibility; the long forms are preferred.)
+
+ To use a charset designated to G2 or G3, and to use a charset
+designated to G1 in a 7-bit environment, you must explicitly invoke G1,
+G2, or G3 into GL. There are two types of invocation, Locking Shift
+(forever) and Single Shift (one character only).
+
+ Locking Shift is done as follows:
+
+ LS0 or SI (0x0F): invoke G0 into GL
+ LS1 or SO (0x0E): invoke G1 into GL
+ LS2: invoke G2 into GL
+ LS3: invoke G3 into GL
+ LS1R: invoke G1 into GR
+ LS2R: invoke G2 into GR
+ LS3R: invoke G3 into GR
+
+ Single Shift is done as follows:
+
+ SS2 or ESC N: invoke G2 into GL
+ SS3 or ESC O: invoke G3 into GL
+
+ The shift functions (such as LS1R and SS3) are represented by control
+characters (from C1) in 8 bit environments and by escape sequences in 7
+bit environments.
+
+ (#### Ben says: I think the above is slightly incorrect. It appears
+that SS2 invokes G2 into GR and SS3 invokes G3 into GR, whereas ESC N
+and ESC O behave as indicated. The above definitions will not parse
+EUC-encoded text correctly, and it looks like the code in mule-coding.c
+has similar problems.)
+
+ Evidently there are a lot of ISO-2022-compliant ways of encoding
+multilingual text. Now, in the world, there exist many coding systems
+such as X11's Compound Text, Japanese JUNET code, and so-called EUC
+(Extended UNIX Code); all of these are variants of ISO 2022.
+
+ In MULE, we characterize a version of ISO 2022 by the following
+attributes:
+
+ 1. The character sets initially designated to G0 thru G3.
+
+ 2. Whether short form designations are allowed for Japanese and
+ Chinese.
+
+ 3. Whether ASCII should be designated to G0 before control characters.
+
+ 4. Whether ASCII should be designated to G0 at the end of line.
+
+ 5. 7-bit environment or 8-bit environment.
+
+ 6. Whether Locking Shifts are used or not.
+
+ 7. Whether to use ASCII or the variant JIS X 0201-1976-Roman.
+
+ 8. Whether to use JIS X 0208-1983 or the older version JIS X
+ 0208-1976.
+
+ (The last two are only for Japanese.)
+
+ By specifying these attributes, you can create any variant of ISO
+2022.
+
+ Here are several examples:
+
+ ISO-2022-JP -- Coding system used in Japanese email (RFC 1463 #### check).
+ 1. G0 <- ASCII, G1..3 <- never used
+ 2. Yes.
+ 3. Yes.
+ 4. Yes.
+ 5. 7-bit environment
+ 6. No.
+ 7. Use ASCII
+ 8. Use JIS X 0208-1983
+
+ ctext -- X11 Compound Text
+ 1. G0 <- ASCII, G1 <- Latin-1, G2,3 <- never used.
+ 2. No.
+ 3. No.
+ 4. Yes.
+ 5. 8-bit environment.
+ 6. No.
+ 7. Use ASCII.
+ 8. Use JIS X 0208-1983.
+
+ euc-china -- Chinese EUC. Often called the "GB encoding", but that is
+ technically incorrect.
+ 1. G0 <- ASCII, G1 <- GB 2312, G2,3 <- never used.
+ 2. No.
+ 3. Yes.
+ 4. Yes.
+ 5. 8-bit environment.
+ 6. No.
+ 7. Use ASCII.
+ 8. Use JIS X 0208-1983.
+
+ ISO-2022-KR -- Coding system used in Korean email.
+ 1. G0 <- ASCII, G1 <- KSC 5601, G2,3 <- never used.
+ 2. No.
+ 3. Yes.
+ 4. Yes.
+ 5. 7-bit environment.
+ 6. Yes.
+ 7. Use ASCII.
+ 8. Use JIS X 0208-1983.
+
+ MULE creates all of these coding systems by default.
-`write-file-data-hooks'
+\1f
+File: lispref.info, Node: EOL Conversion, Next: Coding System Properties, Prev: ISO 2022, Up: Coding Systems
-`write-file-hooks'
+EOL Conversion
+--------------
-`write-region-annotate-functions'
+`nil'
+ Automatically detect the end-of-line type (LF, CRLF, or CR). Also
+ generate subsidiary coding systems named `NAME-unix', `NAME-dos',
+ and `NAME-mac', that are identical to this coding system but have
+ an EOL-TYPE value of `lf', `crlf', and `cr', respectively.
-`x-lost-selection-hooks'
+`lf'
+ The end of a line is marked externally using ASCII LF. Since this
+ is also the way that XEmacs represents an end-of-line internally,
+ specifying this option results in no end-of-line conversion. This
+ is the standard format for Unix text files.
-`x-sent-selection-hooks'
+`crlf'
+ The end of a line is marked externally using ASCII CRLF. This is
+ the standard format for MS-DOS text files.
-`zmacs-activate-region-hook'
+`cr'
+ The end of a line is marked externally using ASCII CR. This is the
+ standard format for Macintosh text files.
-`zmacs-deactivate-region-hook'
+`t'
+ Automatically detect the end-of-line type but do not generate
+ subsidiary coding systems. (This value is converted to `nil' when
+ stored internally, and `coding-system-property' will return `nil'.)
-`zmacs-update-region-hook'
Foundation instead of in the original English.
\1f
-File: lispref.info, Node: Index, Prev: Standard Hooks, Up: Top
+File: lispref.info, Node: Coding System Properties, Next: Basic Coding System Functions, Prev: EOL Conversion, Up: Coding Systems
-Index
-*****
+Coding System Properties
+------------------------
+
+`mnemonic'
+ String to be displayed in the modeline when this coding system is
+ active.
+
+`eol-type'
+ End-of-line conversion to be used. It should be one of the types
+ listed in *Note EOL Conversion::.
+
+`eol-lf'
+ The coding system which is the same as this one, except that it
+ uses the Unix line-breaking convention.
+
+`eol-crlf'
+ The coding system which is the same as this one, except that it
+ uses the DOS line-breaking convention.
+
+`eol-cr'
+ The coding system which is the same as this one, except that it
+ uses the Macintosh line-breaking convention.
+
+`post-read-conversion'
+ Function called after a file has been read in, to perform the
+ decoding. Called with two arguments, BEG and END, denoting a
+ region of the current buffer to be decoded.
+
+`pre-write-conversion'
+ Function called before a file is written out, to perform the
+ encoding. Called with two arguments, BEG and END, denoting a
+ region of the current buffer to be encoded.
+
+ The following additional properties are recognized if TYPE is
+`iso2022':
+
+`charset-g0'
+`charset-g1'
+`charset-g2'
+`charset-g3'
+ The character set initially designated to the G0 - G3 registers.
+ The value should be one of
+
+ * A charset object (designate that character set)
+
+ * `nil' (do not ever use this register)
+
+ * `t' (no character set is initially designated to the
+ register, but may be later on; this automatically sets the
+ corresponding `force-g*-on-output' property)
+
+`force-g0-on-output'
+`force-g1-on-output'
+`force-g2-on-output'
+`force-g3-on-output'
+ If non-`nil', send an explicit designation sequence on output
+ before using the specified register.
+
+`short'
+ If non-`nil', use the short forms `ESC $ @', `ESC $ A', and `ESC $
+ B' on output in place of the full designation sequences `ESC $ (
+ @', `ESC $ ( A', and `ESC $ ( B'.
+
+`no-ascii-eol'
+ If non-`nil', don't designate ASCII to G0 at each end of line on
+ output. Setting this to non-`nil' also suppresses other
+ state-resetting that normally happens at the end of a line.
+
+`no-ascii-cntl'
+ If non-`nil', don't designate ASCII to G0 before control chars on
+ output.
+
+`seven'
+ If non-`nil', use 7-bit environment on output. Otherwise, use
+ 8-bit environment.
+
+`lock-shift'
+ If non-`nil', use locking-shift (SO/SI) instead of single-shift or
+ designation by escape sequence.
+
+`no-iso6429'
+ If non-`nil', don't use ISO6429's direction specification.
+
+`escape-quoted'
+ If non-nil, literal control characters that are the same as the
+ beginning of a recognized ISO 2022 or ISO 6429 escape sequence (in
+ particular, ESC (0x1B), SO (0x0E), SI (0x0F), SS2 (0x8E), SS3
+ (0x8F), and CSI (0x9B)) are "quoted" with an escape character so
+ that they can be properly distinguished from an escape sequence.
+ (Note that doing this results in a non-portable encoding.) This
+ encoding flag is used for byte-compiled files. Note that ESC is a
+ good choice for a quoting character because there are no escape
+ sequences whose second byte is a character from the Control-0 or
+ Control-1 character sets; this is explicitly disallowed by the ISO
+ 2022 standard.
+
+`input-charset-conversion'
+ A list of conversion specifications, specifying conversion of
+ characters in one charset to another when decoding is performed.
+ Each specification is a list of two elements: the source charset,
+ and the destination charset.
+
+`output-charset-conversion'
+ A list of conversion specifications, specifying conversion of
+ characters in one charset to another when encoding is performed.
+ The form of each specification is the same as for
+ `input-charset-conversion'.
+
+ The following additional properties are recognized (and required) if
+TYPE is `ccl':
+
+`decode'
+ CCL program used for decoding (converting to internal format).
+
+`encode'
+ CCL program used for encoding (converting to external format).
+
+ The following properties are used internally: EOL-CR, EOL-CRLF,
+EOL-LF, and BASE.
+
+\1f
+File: lispref.info, Node: Basic Coding System Functions, Next: Coding System Property Functions, Prev: Coding System Properties, Up: Coding Systems
+
+Basic Coding System Functions
+-----------------------------
+
+ - 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
+ returned. Otherwise, CODING-SYSTEM-OR-NAME should be a symbol.
+ If there is no such coding system, `nil' is returned. Otherwise
+ the associated coding system object is returned.
+
+ - 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'.
+
+ - Function: coding-system-list
+ This function returns a list of the names of all defined coding
+ systems.
+
+ - Function: coding-system-name coding-system
+ This function returns the name of the given coding system.
+
+ - Function: coding-system-base coding-system
+ Returns the base coding system (undecided EOL convention) coding
+ system.
+
+ - 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
+ types listed in *Note Coding System Types::.
+
+ DOC-STRING is a string describing the coding system.
+
+ PROPS is a property list, describing the specific nature of the
+ character set. Recognized properties are as in *Note Coding
+ System Properties::.
+
+ - 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
+ This function returns the subsidiary coding system of
+ CODING-SYSTEM with eol type EOL-TYPE.
+
+\1f
+File: lispref.info, Node: Coding System Property Functions, Next: Encoding and Decoding Text, Prev: Basic Coding System Functions, Up: Coding Systems
+
+Coding System Property Functions
+--------------------------------
+
+ - Function: coding-system-doc-string coding-system
+ This function returns the doc string for CODING-SYSTEM.
+
+ - Function: coding-system-type coding-system
+ This function returns the type of CODING-SYSTEM.
+
+ - Function: coding-system-property coding-system prop
+ This function returns the PROP property of CODING-SYSTEM.
+
+\1f
+File: lispref.info, Node: Encoding and Decoding Text, Next: Detection of Textual Encoding, Prev: Coding System Property Functions, Up: Coding Systems
+
+Encoding and Decoding Text
+--------------------------
+
+ - 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
+ JIS-formatted file but used the `binary' or `no-conversion' coding
+ system, so that it shows up as `^[$B!<!+^[(B'). The length of the
+ encoded text is returned. BUFFER defaults to the current buffer
+ if unspecified.
+
+ - 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
+ encoding. The length of the encoded text is returned. BUFFER
+ defaults to the current buffer if unspecified.
+
+\1f
+File: lispref.info, Node: Detection of Textual Encoding, Next: Big5 and Shift-JIS Functions, Prev: Encoding and Decoding Text, Up: Coding Systems
+
+Detection of Textual Encoding
+-----------------------------
+
+ - Function: coding-category-list
+ This function returns a list of all recognized coding categories.
+
+ - 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
+ than all specified ones, in the same relative order they were in
+ previously.
+
+ - Function: coding-priority-list
+ This function returns a list of coding categories in descending
+ order of priority.
+
+ - 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
+ This function returns the coding system associated with a coding
+ category.
+
+ - 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,
+ it returns `autodetect' or one of its subsidiary coding systems
+ according to a detected end-of-line type. Optional arg BUFFER
+ defaults to the current buffer.
+
+\1f
+File: lispref.info, Node: Big5 and Shift-JIS Functions, Next: Predefined Coding Systems, Prev: Detection of Textual Encoding, Up: Coding Systems
+
+Big5 and Shift-JIS Functions
+----------------------------
+
+ These are special functions for working with the non-standard
+Shift-JIS and Big5 encodings.
+
+ - Function: decode-shift-jis-char code
+ This function decodes a JIS X 0208 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
+ This function encodes a JIS X 0208 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
+ 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
+ This function encodes the Big5 character CHAR to BIG5
+ coding-system. The corresponding character code in Big5 is
+ returned.
+
+\1f
+File: lispref.info, Node: Predefined Coding Systems, Prev: Big5 and Shift-JIS Functions, Up: Coding Systems
+
+Coding Systems Implemented
+--------------------------
+
+ MULE initializes most of the commonly used coding systems at XEmacs's
+startup. A few others are initialized only when the relevant language
+environment is selected and support libraries are loaded. (NB: The
+following list is based on XEmacs 21.2.19, the development branch at the
+time of writing. The list may be somewhat different for other
+versions. Recent versions of GNU Emacs 20 implement a few more rare
+coding systems; work is being done to port these to XEmacs.)
+
+ Unfortunately, there is not a consistent naming convention for
+character sets, and for practical purposes coding systems often take
+their name from their principal character sets (ASCII, KOI8-R, Shift
+JIS). Others take their names from the coding system (ISO-2022-JP,
+EUC-KR), and a few from their non-text usages (internal, binary). To
+provide for this, and for the fact that many coding systems have
+several common names, an aliasing system is provided. Finally, some
+effort has been made to use names that are registered as MIME charsets
+(this is why the name 'shift_jis contains that un-Lisp-y underscore).
+
+ There is a systematic naming convention regarding end-of-line (EOL)
+conventions for different systems. A coding system whose name ends in
+"-unix" forces the assumptions that lines are broken by newlines (0x0A).
+A coding system whose name ends in "-mac" forces the assumptions that
+lines are broken by ASCII CRs (0x0D). A coding system whose name ends
+in "-dos" forces the assumptions that lines are broken by CRLF sequences
+(0x0D 0x0A). These subsidiary coding systems are automatically derived
+from a base coding system. Use of the base coding system implies
+autodetection of the text file convention. (The fact that the -unix,
+-mac, and -dos are derived from a base system results in them showing up
+as "aliases" in `list-coding-systems'.) These subsidiaries have a
+consistent modeline indicator as well. "-dos" coding systems have ":T"
+appended to their modeline indicator, while "-mac" coding systems have
+":t" appended (eg, "ISO8:t" for iso-2022-8-mac).
+
+ In the following table, each coding system is given with its mode
+line indicator in parentheses. Non-textual coding systems are listed
+first, followed by textual coding systems and their aliases. (The
+coding system subsidiary modeline indicators ":T" and ":t" will be
+omitted from the table of coding systems.)
+
+ ### SJT 1999-08-23 Maybe should order these by language? Definitely
+need language usage for the ISO-8859 family.
+
+ Note that although true coding system aliases have been implemented
+for XEmacs 21.2, the coding system initialization has not yet been
+converted as of 21.2.19. So coding systems described as aliases have
+the same properties as the aliased coding system, but will not be equal
+as Lisp objects.
+
+`automatic-conversion'
+`undecided'
+`undecided-dos'
+`undecided-mac'
+`undecided-unix'
+ Modeline indicator: `Auto'. A type `undecided' coding system.
+ Attempts to determine an appropriate coding system from file
+ contents or the environment.
+
+`raw-text'
+`no-conversion'
+`raw-text-dos'
+`raw-text-mac'
+`raw-text-unix'
+`no-conversion-dos'
+`no-conversion-mac'
+`no-conversion-unix'
+ Modeline indicator: `Raw'. A type `no-conversion' coding system,
+ which converts only line-break-codes. An implementation quirk
+ means that this coding system is also used for ISO8859-1.
+
+`binary'
+ Modeline indicator: `Binary'. A type `no-conversion' coding
+ system which does no character coding or EOL conversions. An
+ alias for `raw-text-unix'.
+
+`alternativnyj'
+`alternativnyj-dos'
+`alternativnyj-mac'
+`alternativnyj-unix'
+ Modeline indicator: `Cy.Alt'. A type `ccl' coding system used for
+ Alternativnyj, an encoding of the Cyrillic alphabet.
+
+`big5'
+`big5-dos'
+`big5-mac'
+`big5-unix'
+ Modeline indicator: `Zh/Big5'. A type `big5' coding system used
+ for BIG5, the most common encoding of traditional Chinese as used
+ in Taiwan.
+
+`cn-gb-2312'
+`cn-gb-2312-dos'
+`cn-gb-2312-mac'
+`cn-gb-2312-unix'
+ Modeline indicator: `Zh-GB/EUC'. A type `iso2022' coding system
+ used for simplified Chinese (as used in the People's Republic of
+ China), with the `ascii' (G0), `chinese-gb2312' (G1), and `sisheng'
+ (G2) character sets initially designated. Chinese EUC (Extended
+ Unix Code).
+
+`ctext-hebrew'
+`ctext-hebrew-dos'
+`ctext-hebrew-mac'
+`ctext-hebrew-unix'
+ Modeline indicator: `CText/Hbrw'. A type `iso2022' coding system
+ with the `ascii' (G0) and `hebrew-iso8859-8' (G1) character sets
+ initially designated for Hebrew.
+
+`ctext'
+`ctext-dos'
+`ctext-mac'
+`ctext-unix'
+ Modeline indicator: `CText'. A type `iso2022' 8-bit coding system
+ with the `ascii' (G0) and `latin-iso8859-1' (G1) character sets
+ initially designated. X11 Compound Text Encoding. Often
+ mistakenly recognized instead of EUC encodings; usual cause is
+ inappropriate setting of `coding-priority-list'.
+
+`escape-quoted'
+ Modeline indicator: `ESC/Quot'. A type `iso2022' 8-bit coding
+ system with the `ascii' (G0) and `latin-iso8859-1' (G1) character
+ sets initially designated and escape quoting. Unix EOL conversion
+ (ie, no conversion). It is used for .ELC files.
+
+`euc-jp'
+`euc-jp-dos'
+`euc-jp-mac'
+`euc-jp-unix'
+ Modeline indicator: `Ja/EUC'. A type `iso2022' 8-bit coding system
+ with `ascii' (G0), `japanese-jisx0208' (G1), `katakana-jisx0201'
+ (G2), and `japanese-jisx0212' (G3) initially designated. Japanese
+ EUC (Extended Unix Code).
+
+`euc-kr'
+`euc-kr-dos'
+`euc-kr-mac'
+`euc-kr-unix'
+ Modeline indicator: `ko/EUC'. A type `iso2022' 8-bit coding system
+ with `ascii' (G0) and `korean-ksc5601' (G1) initially designated.
+ Korean EUC (Extended Unix Code).
+
+`hz-gb-2312'
+ Modeline indicator: `Zh-GB/Hz'. A type `no-conversion' coding
+ system with Unix EOL convention (ie, no conversion) using
+ post-read-decode and pre-write-encode functions to translate the
+ Hz/ZW coding system used for Chinese.
+
+`iso-2022-7bit'
+`iso-2022-7bit-unix'
+`iso-2022-7bit-dos'
+`iso-2022-7bit-mac'
+`iso-2022-7'
+ Modeline indicator: `ISO7'. A type `iso2022' 7-bit coding system
+ with `ascii' (G0) initially designated. Other character sets must
+ be explicitly designated to be used.
+
+`iso-2022-7bit-ss2'
+`iso-2022-7bit-ss2-dos'
+`iso-2022-7bit-ss2-mac'
+`iso-2022-7bit-ss2-unix'
+ Modeline indicator: `ISO7/SS'. A type `iso2022' 7-bit coding
+ system with `ascii' (G0) initially designated. Other character
+ sets must be explicitly designated to be used. SS2 is used to
+ invoke a 96-charset, one character at a time.
+
+`iso-2022-8'
+`iso-2022-8-dos'
+`iso-2022-8-mac'
+`iso-2022-8-unix'
+ Modeline indicator: `ISO8'. A type `iso2022' 8-bit coding system
+ with `ascii' (G0) and `latin-iso8859-1' (G1) initially designated.
+ Other character sets must be explicitly designated to be used.
+ No single-shift or locking-shift.
+
+`iso-2022-8bit-ss2'
+`iso-2022-8bit-ss2-dos'
+`iso-2022-8bit-ss2-mac'
+`iso-2022-8bit-ss2-unix'
+ Modeline indicator: `ISO8/SS'. A type `iso2022' 8-bit coding
+ system with `ascii' (G0) and `latin-iso8859-1' (G1) initially
+ designated. Other character sets must be explicitly designated to
+ be used. SS2 is used to invoke a 96-charset, one character at a
+ time.
+
+`iso-2022-int-1'
+`iso-2022-int-1-dos'
+`iso-2022-int-1-mac'
+`iso-2022-int-1-unix'
+ Modeline indicator: `INT-1'. A type `iso2022' 7-bit coding system
+ with `ascii' (G0) and `korean-ksc5601' (G1) initially designated.
+ ISO-2022-INT-1.
+
+`iso-2022-jp-1978-irv'
+`iso-2022-jp-1978-irv-dos'
+`iso-2022-jp-1978-irv-mac'
+`iso-2022-jp-1978-irv-unix'
+ Modeline indicator: `Ja-78/7bit'. A type `iso2022' 7-bit coding
+ system. For compatibility with old Japanese terminals; if you
+ need to know, look at the source.
+
+`iso-2022-jp'
+`iso-2022-jp-2 (ISO7/SS)'
+`iso-2022-jp-dos'
+`iso-2022-jp-mac'
+`iso-2022-jp-unix'
+`iso-2022-jp-2-dos'
+`iso-2022-jp-2-mac'
+`iso-2022-jp-2-unix'
+ Modeline indicator: `MULE/7bit'. A type `iso2022' 7-bit coding
+ system with `ascii' (G0) initially designated, and complex
+ specifications to insure backward compatibility with old Japanese
+ systems. Used for communication with mail and news in Japan. The
+ "-2" versions also use SS2 to invoke a 96-charset one character at
+ a time.
+
+`iso-2022-kr'
+ Modeline indicator: `Ko/7bit' A type `iso2022' 7-bit coding
+ system with `ascii' (G0) and `korean-ksc5601' (G1) initially
+ designated. Used for e-mail in Korea.
+
+`iso-2022-lock'
+`iso-2022-lock-dos'
+`iso-2022-lock-mac'
+`iso-2022-lock-unix'
+ Modeline indicator: `ISO7/Lock'. A type `iso2022' 7-bit coding
+ system with `ascii' (G0) initially designated, using Locking-Shift
+ to invoke a 96-charset.
+
+`iso-8859-1'
+`iso-8859-1-dos'
+`iso-8859-1-mac'
+`iso-8859-1-unix'
+ Due to implementation, this is not a type `iso2022' coding system,
+ but rather an alias for the `raw-text' coding system.
+
+`iso-8859-2'
+`iso-8859-2-dos'
+`iso-8859-2-mac'
+`iso-8859-2-unix'
+ Modeline indicator: `MIME/Ltn-2'. A type `iso2022' coding system
+ with `ascii' (G0) and `latin-iso8859-2' (G1) initially invoked.
+
+`iso-8859-3'
+`iso-8859-3-dos'
+`iso-8859-3-mac'
+`iso-8859-3-unix'
+ Modeline indicator: `MIME/Ltn-3'. A type `iso2022' coding system
+ with `ascii' (G0) and `latin-iso8859-3' (G1) initially invoked.
+
+`iso-8859-4'
+`iso-8859-4-dos'
+`iso-8859-4-mac'
+`iso-8859-4-unix'
+ Modeline indicator: `MIME/Ltn-4'. A type `iso2022' coding system
+ with `ascii' (G0) and `latin-iso8859-4' (G1) initially invoked.
+
+`iso-8859-5'
+`iso-8859-5-dos'
+`iso-8859-5-mac'
+`iso-8859-5-unix'
+ Modeline indicator: `ISO8/Cyr'. A type `iso2022' coding system
+ with `ascii' (G0) and `cyrillic-iso8859-5' (G1) initially invoked.
+
+`iso-8859-7'
+`iso-8859-7-dos'
+`iso-8859-7-mac'
+`iso-8859-7-unix'
+ Modeline indicator: `Grk'. A type `iso2022' coding system with
+ `ascii' (G0) and `greek-iso8859-7' (G1) initially invoked.
+
+`iso-8859-8'
+`iso-8859-8-dos'
+`iso-8859-8-mac'
+`iso-8859-8-unix'
+ Modeline indicator: `MIME/Hbrw'. A type `iso2022' coding system
+ with `ascii' (G0) and `hebrew-iso8859-8' (G1) initially invoked.
+
+`iso-8859-9'
+`iso-8859-9-dos'
+`iso-8859-9-mac'
+`iso-8859-9-unix'
+ Modeline indicator: `MIME/Ltn-5'. A type `iso2022' coding system
+ with `ascii' (G0) and `latin-iso8859-9' (G1) initially invoked.
+
+`koi8-r'
+`koi8-r-dos'
+`koi8-r-mac'
+`koi8-r-unix'
+ Modeline indicator: `KOI8'. A type `ccl' coding-system used for
+ KOI8-R, an encoding of the Cyrillic alphabet.
+
+`shift_jis'
+`shift_jis-dos'
+`shift_jis-mac'
+`shift_jis-unix'
+ Modeline indicator: `Ja/SJIS'. A type `shift-jis' coding-system
+ implementing the Shift-JIS encoding for Japanese. The underscore
+ is to conform to the MIME charset implementing this encoding.
+
+`tis-620'
+`tis-620-dos'
+`tis-620-mac'
+`tis-620-unix'
+ Modeline indicator: `TIS620'. A type `ccl' encoding for Thai. The
+ external encoding is defined by TIS620, the internal encoding is
+ peculiar to MULE, and called `thai-xtis'.
+
+`viqr'
+ Modeline indicator: `VIQR'. A type `no-conversion' coding system
+ with Unix EOL convention (ie, no conversion) using
+ post-read-decode and pre-write-encode functions to translate the
+ VIQR coding system for Vietnamese.
+
+`viscii'
+`viscii-dos'
+`viscii-mac'
+`viscii-unix'
+ Modeline indicator: `VISCII'. A type `ccl' coding-system used for
+ VISCII 1.1 for Vietnamese. Differs slightly from VSCII; VISCII is
+ given priority by XEmacs.
+
+`vscii'
+`vscii-dos'
+`vscii-mac'
+`vscii-unix'
+ Modeline indicator: `VSCII'. A type `ccl' coding-system used for
+ VSCII 1.1 for Vietnamese. Differs slightly from VISCII, which is
+ given priority by XEmacs. Use `(prefer-coding-system
+ 'vietnamese-vscii)' to give priority to VSCII.
+
+\1f
+File: lispref.info, Node: CCL, Next: Category Tables, Prev: Coding Systems, Up: MULE
+
+CCL
+===
+
+ CCL (Code Conversion Language) is a simple structured programming
+language designed for character coding conversions. A CCL program is
+compiled to CCL code (represented by a vector of integers) and executed
+by the CCL interpreter embedded in Emacs. The CCL interpreter
+implements a virtual machine with 8 registers called `r0', ..., `r7', a
+number of control structures, and some I/O operators. Take care when
+using registers `r0' (used in implicit "set" statements) and especially
+`r7' (used internally by several statements and operations, especially
+for multiple return values and I/O operations).
+
+ CCL is used for code conversion during process I/O and file I/O for
+non-ISO2022 coding systems. (It is the only way for a user to specify a
+code conversion function.) It is also used for calculating the code
+point of an X11 font from a character code. However, since CCL is
+designed as a powerful programming language, it can be used for more
+generic calculation where efficiency is demanded. A combination of
+three or more arithmetic operations can be calculated faster by CCL than
+by Emacs Lisp.
+
+ *Warning:* The code in `src/mule-ccl.c' and
+`$packages/lisp/mule-base/mule-ccl.el' is the definitive description of
+CCL's semantics. The previous version of this section contained
+several typos and obsolete names left from earlier versions of MULE,
+and many may remain. (I am not an experienced CCL programmer; the few
+who know CCL well find writing English painful.)
+
+ A CCL program transforms an input data stream into an output data
+stream. The input stream, held in a buffer of constant bytes, is left
+unchanged. The buffer may be filled by an external input operation,
+taken from an Emacs buffer, or taken from a Lisp string. The output
+buffer is a dynamic array of bytes, which can be written by an external
+output operation, inserted into an Emacs buffer, or returned as a Lisp
+string.
+
+ A CCL program is a (Lisp) list containing two or three members. The
+first member is the "buffer magnification", which indicates the
+required minimum size of the output buffer as a multiple of the input
+buffer. It is followed by the "main block" which executes while there
+is input remaining, and an optional "EOF block" which is executed when
+the input is exhausted. Both the main block and the EOF block are CCL
+blocks.
+
+ A "CCL block" is either a CCL statement or list of CCL statements.
+A "CCL statement" is either a "set statement" (either an integer or an
+"assignment", which is a list of a register to receive the assignment,
+an assignment operator, and an expression) or a "control statement" (a
+list starting with a keyword, whose allowable syntax depends on the
+keyword).
* Menu:
-* " in printing: Output Functions.
-* " in strings: String Type.
-* #$: Docs and Compilation.
-* #@COUNT: Docs and Compilation.
-* $ in display: Truncation.
-* $ in regexp: Syntax of Regexps.
-* %: Arithmetic Operations.
-* % in format: Formatting Strings.
-* & in replacement: Replacing Match.
-* &define (Edebug): Specification List.
-* ¬ (Edebug): Specification List.
-* &optional: Argument List.
-* &optional (Edebug): Specification List.
-* &or (Edebug): Specification List.
-* &rest: Argument List.
-* &rest (Edebug): Specification List.
-* ' for quoting: Quoting.
-* ( in regexp: Syntax of Regexps.
-* (...) in lists: Cons Cell Type.
-* ) in regexp: Syntax of Regexps.
-* *: Arithmetic Operations.
-* * in interactive: Using Interactive.
-* * in regexp: Syntax of Regexps.
-* *? in regexp: Syntax of Regexps.
-* *scratch*: Auto Major Mode.
-* +: Arithmetic Operations.
-* + in regexp: Syntax of Regexps.
-* +? in regexp: Syntax of Regexps.
-* , (with Backquote): Backquote.
-* ,@ (with Backquote): Backquote.
-* -: Arithmetic Operations.
-* . in lists: Dotted Pair Notation.
-* . in regexp: Syntax of Regexps.
-* .emacs: Init File.
-* .emacs customization: Major Mode Conventions.
-* /: Arithmetic Operations.
-* /=: Comparison of Numbers.
-* 1+: Arithmetic Operations.
-* 1-: Arithmetic Operations.
-* ; in comment: Comments.
-* <: Comparison of Numbers.
-* <=: Comparison of Numbers.
-* <ESC>: Functions for Key Lookup.
-* =: Comparison of Numbers.
-* >: Comparison of Numbers.
-* >=: Comparison of Numbers.
-* ? in character constant: Character Type.
-* ? in regexp: Syntax of Regexps.
-* @ in interactive: Using Interactive.
-* [ in regexp: Syntax of Regexps.
-* [...] (Edebug): Specification List.
-* \ in character constant: Character Type.
-* \ in display: Truncation.
-* \ in printing: Output Functions.
-* \ in regexp: Syntax of Regexps.
-* \ in replacement: Replacing Match.
-* \ in strings: String Type.
-* \ in symbols: Symbol Type.
-* \' in regexp: Syntax of Regexps.
-* \(?: in regexp: Syntax of Regexps.
-* \< in regexp: Syntax of Regexps.
-* \= in regexp: Syntax of Regexps.
-* \> in regexp: Syntax of Regexps.
-* \` in regexp: Syntax of Regexps.
-* \a: Character Type.
-* \b: Character Type.
-* \B in regexp: Syntax of Regexps.
-* \b in regexp: Syntax of Regexps.
-* \e: Character Type.
-* \f: Character Type.
-* \n: Character Type.
-* \n in print: Output Variables.
-* \N in replacement: Replacing Match.
-* \r: Character Type.
-* \S in regexp: Syntax of Regexps.
-* \s in regexp: Syntax of Regexps.
-* \t: Character Type.
-* \v: Character Type.
-* \W in regexp: Syntax of Regexps.
-* \w in regexp: Syntax of Regexps.
-* \{n,m\} in regexp: Syntax of Regexps.
-* ] in regexp: Syntax of Regexps.
-* ^ in regexp: Syntax of Regexps.
-* _ in interactive: Using Interactive.
-* `: Backquote.
-* ` (Edebug): Debugging Backquote.
-* ` (list substitution): Backquote.
-* abbrev: Abbrevs.
-* abbrev table: Abbrevs.
-* abbrev tables in modes: Major Mode Conventions.
-* abbrev-all-caps: Abbrev Expansion.
-* abbrev-expansion: Abbrev Expansion.
-* abbrev-file-name: Abbrev Files.
-* abbrev-mode: Abbrev Mode.
-* abbrev-prefix-mark: Abbrev Expansion.
-* abbrev-start-location: Abbrev Expansion.
-* abbrev-start-location-buffer: Abbrev Expansion.
-* abbrev-symbol: Abbrev Expansion.
-* abbrev-table-name-list: Abbrev Tables.
-* abbreviate-file-name: Directory Names.
-* abbrevs-changed: Abbrev Files.
-* abort-recursive-edit: Recursive Editing.
-* aborting: Recursive Editing.
-* abs: Arithmetic Operations.
-* absolute file name: Relative File Names.
-* accelerate-menu: Menu Accelerator Functions.
-* accept-process-output: Accepting Output.
-* accessibility of a file: Testing Accessibility.
-* accessible portion (of a buffer): Narrowing.
-* accessible-keymaps: Scanning Keymaps.
-* acos: Math Functions.
-* acosh: Math Functions.
-* activate-menubar-hook: Menubar.
-* activate-popup-menu-hook: Pop-Up Menus.
-* active display table: Active Display Table.
-* active keymap: Active Keymaps.
-* active-minibuffer-window: Minibuffer Misc.
-* add-abbrev: Defining Abbrevs.
-* add-hook: Hooks.
-* add-menu: Modifying Menus.
-* add-menu-button: Modifying Menus.
-* add-menu-item: Modifying Menus.
-* add-name-to-file: Changing File Attributes.
-* add-spec-list-to-specifier: Adding Specifications.
-* add-spec-to-specifier: Adding Specifications.
-* add-submenu: Modifying Menus.
-* add-text-properties: Changing Properties.
-* add-timeout: Timers.
-* add-to-list: Setting Variables.
-* add-tooltalk-message-arg: Elisp Interface for Sending Messages.
-* add-tooltalk-pattern-arg: Elisp Interface for Receiving Messages.
-* add-tooltalk-pattern-attribute: Elisp Interface for Receiving Messages.
-* address field of register: Cons Cell Type.
-* after-change-function: Change Hooks.
-* after-change-functions: Change Hooks.
-* after-find-file: Subroutines of Visiting.
-* after-init-hook: Init File.
-* after-insert-file-functions: Saving Properties.
-* after-load-alist: Hooks for Loading.
-* after-revert-hook: Reverting.
-* after-save-hook: Saving Buffers.
-* aliases, for variables: Variable Aliases.
-* alist: Association Lists.
-* alist-to-plist: Converting Plists To/From Alists.
-* all-annotations: Locating Annotations.
-* all-completions: Basic Completion.
-* and: Combining Conditions.
-* annotation: Annotations.
-* annotation hooks: Annotation Hooks.
-* annotation-action: Annotation Properties.
-* annotation-data: Annotation Properties.
-* annotation-down-glyph: Annotation Properties.
-* annotation-face: Annotation Properties.
-* annotation-glyph: Annotation Properties.
-* annotation-layout: Annotation Properties.
-* annotation-list: Locating Annotations.
-* annotation-menu: Annotation Properties.
-* annotation-side: Annotation Properties.
-* annotation-visible: Annotation Properties.
-* annotation-width: Annotation Properties.
-* annotationp: Annotation Primitives.
-* annotations-at: Locating Annotations.
-* annotations-in-region: Locating Annotations.
-* anonymous function: Anonymous Functions.
-* anonymous lambda expressions (Edebug): Instrumenting.
-* apostrophe for quoting: Quoting.
-* append: Building Lists.
-* append-to-file: Writing to Files.
-* apply: Calling Functions.
-* apply, and debugging: Internals of Debugger.
-* apropos: Help Functions.
-* aref: Array Functions.
-* argument binding: Argument List.
-* argument descriptors: Using Interactive.
-* argument evaluation form: Using Interactive.
-* argument prompt: Using Interactive.
-* arguments, reading: Minibuffers.
-* arith-error example: Handling Errors.
-* arith-error in division: Arithmetic Operations.
-* arithmetic shift: Bitwise Operations.
-* array: Arrays.
-* array elements: Array Functions.
-* arrayp: Array Functions.
-* ASCII character codes: Character Type.
-* aset: Array Functions.
-* ash: Bitwise Operations.
-* asin: Math Functions.
-* asinh: Math Functions.
-* ask-user-about-lock: File Locks.
-* ask-user-about-supersession-threat: Modification Time.
-* asking the user questions: Yes-or-No Queries.
-* assoc: Association Lists.
-* association list: Association Lists.
-* assq: Association Lists.
-* asynchronous subprocess: Asynchronous Processes.
-* atan: Math Functions.
-* atanh: Math Functions.
-* atom <1>: List-related Predicates.
-* atom: Cons Cell Type.
-* atomic extent: Atomic Extents.
-* atoms: List-related Predicates.
-* attributes of text: Text Properties.
-* Auto Fill mode: Auto Filling.
-* auto-fill-function: Auto Filling.
-* auto-lower-frame: Raising and Lowering.
-* auto-mode-alist: Auto Major Mode.
-* auto-raise-frame: Raising and Lowering.
-* auto-save-default: Auto-Saving.
-* auto-save-file-format: Format Conversion.
-* auto-save-file-name-p: Auto-Saving.
-* auto-save-hook: Auto-Saving.
-* auto-save-interval: Auto-Saving.
-* auto-save-list-file-name: Auto-Saving.
-* auto-save-mode: Auto-Saving.
-* auto-save-timeout: Auto-Saving.
-* auto-save-visited-file-name: Auto-Saving.
-* auto-saving: Auto-Saving.
-* autoload <1>: Domain Specification.
-* autoload: Autoload.
-* autoload errors: Autoload.
-* automatically buffer-local: Intro to Buffer-Local.
-* available fonts: Font Instance Names.
-* back-to-indentation: Motion by Indent.
-* background pixmap: Merging Faces.
-* backquote (Edebug): Debugging Backquote.
-* backquote (list substitution): Backquote.
-* backslash in character constant: Character Type.
-* backslash in strings: String Type.
-* backslash in symbols: Symbol Type.
-* backspace: Character Type.
-* backtrace: Internals of Debugger.
-* backtrace-debug: Internals of Debugger.
-* backtrace-frame: Internals of Debugger.
-* backtracking: Backtracking.
-* backup file: Backup Files.
-* backup files, how to make them: Rename or Copy.
-* backup-buffer: Making Backups.
-* backup-by-copying: Rename or Copy.
-* backup-by-copying-when-linked: Rename or Copy.
-* backup-by-copying-when-mismatch: Rename or Copy.
-* backup-enable-predicate: Making Backups.
-* backup-file-name-p: Backup Names.
-* backup-inhibited: Making Backups.
-* backward-char: Character Motion.
-* backward-delete-char-untabify: Deletion.
-* backward-list: List Motion.
-* backward-prefix-chars: Motion and Syntax.
-* backward-sexp: List Motion.
-* backward-to-indentation: Motion by Indent.
-* backward-word: Word Motion.
-* balancing parentheses: Blinking.
-* barf-if-buffer-read-only: Read Only Buffers.
-* base buffer: Indirect Buffers.
-* base64: Transformations.
-* base64-decode-region: Transformations.
-* base64-decode-string: Transformations.
-* base64-encode-region: Transformations.
-* base64-encode-string: Transformations.
-* batch mode: Batch Mode.
-* batch-byte-compile: Compilation Functions.
-* batch-byte-recompile-directory: Compilation Functions.
-* beep: Beeping.
-* beeping: Beeping.
-* before point, insertion: Insertion.
-* before-change-function: Change Hooks.
-* before-change-functions: Change Hooks.
-* before-init-hook: Init File.
-* before-revert-hook: Reverting.
-* beginning of line: Text Lines.
-* beginning of line in regexp: Syntax of Regexps.
-* beginning-of-buffer: Buffer End Motion.
-* beginning-of-defun: List Motion.
-* beginning-of-line: Text Lines.
-* bell: Beeping.
-* bell character: Character Type.
-* bell-volume: Beeping.
-* binary files and text files: Files and MS-DOS.
-* binary-process-input: MS-DOS Subprocesses.
-* binary-process-output: MS-DOS Subprocesses.
-* bind-text-domain: Level 3 Primitives.
-* binding arguments: Argument List.
-* binding local variables: Local Variables.
-* binding of a key: Keymap Terminology.
-* bit vector: Bit Vectors.
-* bit vector length: Sequence Functions.
-* bit-vector: Bit Vector Functions.
-* bit-vector-p: Bit Vector Functions.
-* bitp: Bit Vector Functions.
-* bitwise and: Bitwise Operations.
-* bitwise exclusive or: Bitwise Operations.
-* bitwise not: Bitwise Operations.
-* bitwise or: Bitwise Operations.
-* blink-matching-open: Blinking.
-* blink-matching-paren: Blinking.
-* blink-matching-paren-delay: Blinking.
-* blink-matching-paren-distance: Blinking.
-* blink-paren-function: Blinking.
-* blink-paren-hook: Blinking.
-* blinking: Blinking.
-* bobp: Near Point.
-* body of function: Lambda Components.
-* bold: Font Instance Characteristics.
-* bolp: Near Point.
-* bookmark-map: Standard Keymaps.
-* boolean: nil and t.
-* boolean-specifier-p: Specifier Types.
-* bootstrapping XEmacs from temacs: Building XEmacs.
-* bottom-toolbar: Specifying the Toolbar.
-* bottom-toolbar-height: Other Toolbar Variables.
-* bottom-toolbar-visible-p: Other Toolbar Variables.
-* boundp: Void Variables.
-* box diagrams, for lists: Cons Cell Type.
-* box representation for lists: Lists as Boxes.
-* break: Debugger.
-* breakpoints: Breakpoints.
-* bucket (in obarray): Creating Symbols.
-* buffer: Buffers.
-* buffer contents: Text.
-* buffer file name: Buffer File Name.
-* buffer input stream: Input Streams.
-* buffer list: The Buffer List.
-* buffer modification: Buffer Modification.
-* buffer names: Buffer Names.
-* buffer output stream: Output Streams.
-* buffer text notation: Buffer Text Notation.
-* buffer, read-only: Read Only Buffers.
-* buffer-auto-save-file-name: Auto-Saving.
-* buffer-backed-up: Making Backups.
-* buffer-base-buffer: Indirect Buffers.
-* buffer-disable-undo: Maintaining Undo.
-* buffer-enable-undo: Maintaining Undo.
-* buffer-end: Point.
-* buffer-file-format: Format Conversion.
-* buffer-file-name: Buffer File Name.
-* buffer-file-number: Buffer File Name.
-* buffer-file-truename: Buffer File Name.
-* buffer-file-type: Files and MS-DOS.
-* buffer-flush-undo: Maintaining Undo.
-* buffer-glyph-p: Glyph Types.
-* buffer-indirect-children: Indirect Buffers.
-* buffer-invisibility-spec: Invisible Text.
-* buffer-list: The Buffer List.
-* buffer-live-p: Killing Buffers.
-* buffer-local variables: Buffer-Local Variables.
-* buffer-local variables in modes: Major Mode Conventions.
-* buffer-local-variables: Creating Buffer-Local.
-* Buffer-menu-mode-map: Standard Keymaps.
-* buffer-modified-p: Buffer Modification.
-* buffer-modified-tick: Buffer Modification.
-* buffer-name: Buffer Names.
-* buffer-offer-save <1>: Killing Buffers.
-* buffer-offer-save: Saving Buffers.
-* buffer-read-only: Read Only Buffers.
-* buffer-saved-size <1>: Point.
-* buffer-saved-size: Auto-Saving.
-* buffer-size: Point.
-* buffer-string: Buffer Contents.
-* buffer-substring: Buffer Contents.
-* buffer-undo-list: Undo.
-* bufferp: Buffer Basics.
-* buffers menu: Buffers Menu.
-* buffers, controlled in windows: Buffers and Windows.
-* buffers, creating: Creating Buffers.
-* buffers, killing: Killing Buffers.
-* buffers-menu-filter: Menu Filters.
-* buffers-menu-max-size: Buffers Menu.
-* buffers-menu-switch-to-buffer-function: Buffers Menu.
-* building lists: Building Lists.
-* building XEmacs: Building XEmacs.
-* built-in function: What Is a Function.
-* bury-buffer: The Buffer List.
-* busy-pointer-glyph: Mouse Pointer.
-* button-event-p: Event Predicates.
-* button-press-event-p: Event Predicates.
-* button-release-event-p: Event Predicates.
-* bvconcat: Bit Vector Functions.
-* byte-code <1>: Compilation Functions.
-* byte-code: Byte Compilation.
-* byte-code function: Compiled-Function Objects.
-* byte-code interpreter: Compilation Functions.
-* byte-compile: Compilation Functions.
-* byte-compile-dynamic: Dynamic Loading.
-* byte-compile-dynamic-docstrings: Docs and Compilation.
-* byte-compile-file: Compilation Functions.
-* byte-compiling macros: Compiling Macros.
-* byte-compiling require: Named Features.
-* byte-recompile-directory: Compilation Functions.
-* byte-recompile-directory-ignore-errors-p: Compilation Functions.
-* bytes: Strings and Characters.
-* c++-mode-map: Standard Keymaps.
-* C-c: Prefix Keys.
-* C-g: Quitting.
-* C-h: Prefix Keys.
-* C-M-x: Instrumenting.
-* c-mode-abbrev-table: Standard Abbrev Tables.
-* c-mode-map: Standard Keymaps.
-* c-mode-syntax-table: Standard Syntax Tables.
-* C-q: Flow Control.
-* C-s: Flow Control.
-* C-x: Prefix Keys.
-* C-x 4: Prefix Keys.
-* C-x 5: Prefix Keys.
-* C-x a: Prefix Keys.
-* C-x n: Prefix Keys.
-* C-x r: Prefix Keys.
-* caaaar: List Elements.
-* caaadr: List Elements.
-* caaar: List Elements.
-* caadar: List Elements.
-* caaddr: List Elements.
-* caadr: List Elements.
-* caar: List Elements.
-* cadaar: List Elements.
-* cadadr: List Elements.
-* cadar: List Elements.
-* caddar: List Elements.
-* cadddr: List Elements.
-* caddr: List Elements.
-* cadr: List Elements.
-* call stack: Internals of Debugger.
-* call-interactively: Interactive Call.
-* call-process: Synchronous Processes.
-* call-process-region: Synchronous Processes.
-* calling a function: Calling Functions.
-* cancel-debug-on-entry: Function Debugging.
-* canonicalize-inst-list: Adding Specifications.
-* canonicalize-inst-pair: Adding Specifications.
-* canonicalize-lax-plist: Working With Lax Plists.
-* canonicalize-plist: Working With Normal Plists.
-* canonicalize-spec: Adding Specifications.
-* canonicalize-spec-list: Adding Specifications.
-* canonicalize-tag-set: Specifier Tag Functions.
-* capitalization: Character Case.
-* capitalize: Character Case.
-* capitalize-region: Case Changes.
-* capitalize-word: Case Changes.
-* car: List Elements.
-* car-safe: List Elements.
-* case changes: Case Changes.
-* case in replacements: Replacing Match.
-* case-fold-search: Searching and Case.
-* case-replace: Searching and Case.
-* case-table-p: Case Tables.
-* catch: Catch and Throw.
-* category-designator-p: Category Tables.
-* category-table: Category Tables.
-* category-table-p: Category Tables.
-* category-table-value-p: Category Tables.
-* CBREAK: Flow Control.
-* ccl-elapsed-time: Calling CCL.
-* ccl-execute: Calling CCL.
-* ccl-execute-on-string: Calling CCL.
-* ccl-reset-elapsed-time: Calling CCL.
-* cdaaar: List Elements.
-* cdaadr: List Elements.
-* cdaar: List Elements.
-* cdadar: List Elements.
-* cdaddr: List Elements.
-* cdadr: List Elements.
-* cdar: List Elements.
-* cddaar: List Elements.
-* cddadr: List Elements.
-* cddar: List Elements.
-* cdddar: List Elements.
-* cddddr: List Elements.
-* cdddr: List Elements.
-* cddr: List Elements.
-* CDE dt: CDE dt.
-* cdr: List Elements.
-* cdr-safe: List Elements.
-* ceiling: Numeric Conversions.
-* centering point: Vertical Scrolling.
-* cerror: Signaling Errors.
-* change hooks: Change Hooks.
-* change-major-mode-hook: Major Mode Conventions.
-* changing key bindings: Changing Key Bindings.
-* changing to another buffer: Current Buffer.
-* changing window size: Resizing Windows.
-* char table type: Char Table Type.
-* char-after: Near Point.
-* char-before: Near Point.
-* char-charset: MULE Characters.
-* char-equal: Text Comparison.
-* char-int: Character Codes.
-* char-int confoundance disease: Character Type.
-* char-int-p: Character Codes.
-* char-octet: MULE Characters.
-* char-or-char-int-p: Character Codes.
-* char-or-string-p: Predicates for Strings.
-* char-syntax: Syntax Table Functions.
-* char-table-p: Char Tables.
-* char-table-type: Char Table Types.
-* char-table-type-list: Char Table Types.
-* char-to-string: String Conversion.
-* char=: Text Comparison.
-* character arrays: Strings and Characters.
-* character case: Character Case.
-* character descriptor: Character Descriptors.
-* character insertion: Commands for Insertion.
-* character printing: Describing Characters.
-* character set (in regexp): Syntax of Regexps.
-* character to string: String Conversion.
-* character-to-event: Converting Events.
-* characteristics of font instances: Font Instance Characteristics.
-* 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.
-* charset-columns: Charset Property Functions.
-* charset-dimension: Charset Property Functions.
-* charset-direction: Charset Property Functions.
-* charset-doc-string: Charset Property Functions.
-* charset-final: Charset Property Functions.
-* charset-from-attributes: Basic Charset Functions.
-* charset-graphic: Charset Property Functions.
-* charset-list: Basic Charset Functions.
-* charset-name: Charset Property Functions.
-* charset-property: Charset Property Functions.
-* charset-registry: Charset Property Functions.
-* charset-reverse-direction-charset: Basic Charset Functions.
-* charsetp: Charsets.
-* check-argument-type: Signaling Errors.
-* check-toolbar-button-syntax: Toolbar Descriptor Format.
-* check-valid-char-table-value: Working With Char Tables.
-* check-valid-inst-list: Specifier Validation Functions.
-* check-valid-instantiator: Specifier Validation Functions.
-* check-valid-plist: Property Lists.
-* 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--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.
-* cleanup forms: Cleanups.
-* clear-abbrev-table: Abbrev Tables.
-* clear-message: The Echo Area.
-* clear-range-table: Working With Range Tables.
-* clear-visited-file-modtime: Modification Time.
-* close parenthesis: Blinking.
-* 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.
-* coding standards: Tips.
-* coding system type: Coding System Type.
-* coding-category-list: Detection of Textual Encoding.
-* coding-category-system: Detection of Textual Encoding.
-* coding-priority-list: Detection of Textual Encoding.
-* coding-system-doc-string: Coding System Property Functions.
-* coding-system-list: Basic Coding System Functions.
-* coding-system-name: Basic Coding System Functions.
-* coding-system-p: Coding Systems.
-* coding-system-property: Coding System Property Functions.
-* coding-system-type: Coding System Property Functions.
-* color instance type: Color Instance Type.
-* color instances: Color Instances.
-* color-instance-name: Color Instance Properties.
-* color-instance-p: Color Instances.
-* color-instance-rgb-components: Color Instance Properties.
-* color-name: Color Convenience Functions.
-* color-pixmap-image-instance-p: Image Instance Types.
-* color-rgb-components: Color Convenience Functions.
-* color-specifier-p <1>: Color Specifiers.
-* color-specifier-p: Specifier Types.
-* colorize-image-instance: Image Instance Functions.
-* colors: Colors.
-* columns: Columns.
-* command: What Is a Function.
-* command descriptions: A Sample Function Description.
-* command history: Command History.
-* command in keymap: Key Lookup.
-* command line arguments: Command Line Arguments.
-* command line options: Command Line Arguments.
-* command loop: Command Loop.
-* command loop, recursive: Recursive Editing.
-* command-debug-status: Internals of Debugger.
-* command-execute: Interactive Call.
-* command-history: Command History.
-* command-history-map: Standard Keymaps.
-* command-line: Command Line Arguments.
-* command-line-args: Command Line Arguments.
-* command-line-functions: Command Line Arguments.
-* command-line-processed: Command Line Arguments.
-* command-switch-alist: Command Line Arguments.
-* commandp: Interactive Call.
-* commandp example: High-Level Completion.
-* commands, defining: Defining Commands.
-* 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.
-* comparing buffer text: Comparing Text.
-* comparison of modification time: Modification Time.
-* compilation: Byte Compilation.
-* compilation functions: Compilation Functions.
-* compile-defun: Compilation Functions.
-* compiled function: Compiled-Function Objects.
-* compiled-function-arglist: Compiled-Function Objects.
-* compiled-function-constants: Compiled-Function Objects.
-* compiled-function-doc-string: Compiled-Function Objects.
-* compiled-function-domain: Compiled-Function Objects.
-* compiled-function-instructions: Compiled-Function Objects.
-* compiled-function-interactive: Compiled-Function Objects.
-* compiled-function-p: What Is a Function.
-* compiled-function-stack-size: Compiled-Function Objects.
-* complete key: Keymap Terminology.
-* completing-read: Minibuffer Completion.
-* completion: Completion.
-* completion, file name: File Name Completion.
-* completion, user name: User Name Completion.
-* completion-auto-help: Completion Commands.
-* completion-ignore-case: Basic Completion.
-* completion-ignored-extensions: File Name Completion.
-* complex arguments: Minibuffers.
-* complex command: Command History.
-* complex-buffers-menu-p: Buffers Menu.
-* compose-region: Composite Characters.
-* composite-char-string: Composite Characters.
-* concat: Creating Strings.
-* concatenating lists: Rearrangement.
-* concatenating strings: Creating Strings.
-* cond: Conditionals.
-* condition name: Error Symbols.
-* condition-case: Handling Errors.
-* conditional evaluation: Conditionals.
-* cons: Building Lists.
-* cons cell as box: Lists as Boxes.
-* cons cells: Building Lists.
-* consing: Building Lists.
-* console-device-list: Basic Console Functions.
-* console-disable-input: Console and Device I/O.
-* console-enable-input: Console and Device I/O.
-* console-list: Basic Console Functions.
-* console-live-p: Connecting to a Console or Device.
-* console-type-image-conversion-list: Image Instantiator Conversion.
-* consolep: Consoles and Devices.
-* consoles: Consoles and Devices.
-* consp: List-related Predicates.
-* continuation lines: Truncation.
-* continuation-glyph: Redisplay Glyphs.
-* continue-process: Signals to Processes.
-* control character printing: Describing Characters.
-* control characters: Character Type.
-* control characters in display: Usual Display.
-* control characters, reading: Quoted Character Input.
-* control structures: Control Structures.
-* control-arrow-glyph: Redisplay Glyphs.
-* Control-X-prefix: Prefix Keys.
-* conventions for writing minor modes: Minor Mode Conventions.
-* conversion of image instantiators: Image Instantiator Conversion.
-* conversion of strings: String Conversion.
-* copy-alist: Association Lists.
-* copy-category-table: Category Tables.
-* copy-coding-system: Basic Coding System Functions.
-* copy-event: Working With Events.
-* copy-extent: Detached Extents.
-* copy-face: Basic Face Functions.
-* copy-file: Changing File Attributes.
-* copy-hash-table: Introduction to Hash Tables.
-* copy-keymap: Creating Keymaps.
-* copy-marker: Creating Markers.
-* copy-range-table: Introduction to Range Tables.
-* copy-region-as-kill: Kill Functions.
-* copy-sequence: Sequence Functions.
-* copy-specifier: Other Specification Functions.
-* copy-syntax-table: Syntax Table Functions.
-* copying alists: Association Lists.
-* copying bit vectors: Bit Vector Functions.
-* copying files: Changing File Attributes.
-* copying lists: Building Lists.
-* copying sequences: Sequence Functions.
-* copying strings: Creating Strings.
-* copying vectors: Vector Functions.
-* cos: Math Functions.
-* cosh: Math Functions.
-* count-lines: Text Lines.
-* count-loop: A Sample Function Description.
-* counting columns: Columns.
-* coverage testing: Coverage Testing.
-* create-device-hook: Connecting to a Console or Device.
-* create-file-buffer: Subroutines of Visiting.
-* create-frame-hook: Frame Hooks.
-* create-tooltalk-message: Elisp Interface for Sending Messages.
-* create-tooltalk-pattern: Elisp Interface for Receiving Messages.
-* creating buffers: Creating Buffers.
-* creating keymaps: Creating Keymaps.
-* ctl-arrow: Usual Display.
-* 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.
-* current binding: Local Variables.
-* current buffer: Current Buffer.
-* current buffer excursion: Excursions.
-* current buffer mark: The Mark.
-* current buffer point and mark (Edebug): Edebug Display Update.
-* current buffer position: Point.
-* current command: Command Loop Info.
-* current stack frame: Using Debugger.
-* current-buffer: Current Buffer.
-* current-case-table: Case Tables.
-* current-column: Columns.
-* current-fill-column: Margins.
-* current-frame-configuration: Frame Configurations.
-* current-global-map: Active Keymaps.
-* current-indentation: Primitive Indent.
-* current-input-mode: Input Modes.
-* current-justification: Filling.
-* current-keymaps: Active Keymaps.
-* current-kill: Low-Level Kill Ring.
-* current-left-margin: Margins.
-* current-local-map: Active Keymaps.
-* current-menubar: Menubar.
-* current-message: The Echo Area.
-* current-minor-mode-maps: Active Keymaps.
-* current-mouse-event: Command Loop Info.
-* current-prefix-arg: Prefix Command Arguments.
-* current-time: Time of Day.
-* current-time-string: Time of Day.
-* current-time-zone: Time of Day.
-* current-window-configuration: Window Configurations.
-* cursor (mouse): Mouse Pointer.
-* cursor-in-echo-area: The Echo Area.
-* cust-print: Printing in Edebug.
-* cut buffer: X Selections.
-* cyclic ordering of windows: Cyclic Window Ordering.
-* data type: Lisp Data Types.
-* data-directory: Accessing Documentation.
-* database: Databases.
-* database type: Database Type.
-* database-file-name: Other Database Functions.
-* database-last-error: Other Database Functions.
-* database-live-p: Connecting to a Database.
-* database-subtype: Other Database Functions.
-* database-type: Other Database Functions.
-* databasep: Databases.
-* deallocate-event: Working With Events.
-* debug: Invoking the Debugger.
-* debug-allocation: Garbage Collection.
-* debug-allocation-backtrace: Garbage Collection.
-* debug-ignored-errors: Error Debugging.
-* debug-on-entry: Function Debugging.
-* debug-on-error: Error Debugging.
-* debug-on-error use: Processing of Errors.
-* debug-on-next-call: Internals of Debugger.
-* debug-on-quit: Infinite Loops.
-* debug-on-signal: Error Debugging.
-* debug-on-signal use: Handling Errors.
-* debugger <1>: Internals of Debugger.
-* debugger: Debugger.
-* debugger command list: Debugger Commands.
-* debugger-mode-map: Standard Keymaps.
-* debugging errors: Error Debugging.
-* debugging specific functions: Function Debugging.
-* decode-big5-char: Big5 and Shift-JIS Functions.
-* decode-coding-region: Encoding and Decoding Text.
-* decode-shift-jis-char: Big5 and Shift-JIS Functions.
-* decode-time: Time Conversion.
-* decoding file formats: Format Conversion.
-* decompose-region: Composite Characters.
-* decrement field of register: Cons Cell Type.
-* dedicated window: Choosing Window.
-* deep binding: Impl of Scope.
-* def-edebug-spec: Instrumenting Macro Calls.
-* defalias: Defining Functions.
-* default argument string: Interactive Codes.
-* default init file: Init File.
-* default value: Default Value.
-* default-abbrev-mode: Abbrev Mode.
-* default-boundp: Default Value.
-* default-buffer-file-type: Files and MS-DOS.
-* default-case-fold-search: Searching and Case.
-* default-ctl-arrow: Usual Display.
-* default-deselect-frame-hook: Raising and Lowering.
-* default-directory: File Name Expansion.
-* default-file-modes: Changing File Attributes.
-* default-fill-column: Margins.
-* default-frame-name: Frame Name.
-* default-frame-plist: Initial Properties.
-* default-justification: Filling.
-* default-major-mode: Auto Major Mode.
-* default-menubar: Menubar.
-* default-minibuffer-frame: Minibuffers and Frames.
-* default-modeline-format: Modeline Variables.
-* default-popup-menu: Pop-Up Menus.
-* default-select-frame-hook: Raising and Lowering.
-* default-text-properties: Examining Properties.
-* default-toolbar: Specifying the Toolbar.
-* default-toolbar-height: Other Toolbar Variables.
-* default-toolbar-position: Specifying the Toolbar.
-* default-toolbar-visible-p: Other Toolbar Variables.
-* default-toolbar-width: Other Toolbar Variables.
-* default-truncate-lines: Truncation.
-* default-value: Default Value.
-* default-x-device: Resources.
-* default.el: Start-up Summary.
-* defconst <1>: Domain Specification.
-* defconst: Defining Variables.
-* defcustom: Variable Definitions.
-* defgroup: Group Definitions.
-* define-abbrev: Defining Abbrevs.
-* define-abbrev-table: Abbrev Tables.
-* define-derived-mode: Derived Modes.
-* define-error: Error Symbols.
-* define-function: Defining Functions.
-* define-key: Changing Key Bindings.
-* define-logical-name: Changing File Attributes.
-* define-obsolete-function-alias: Obsoleteness.
-* define-obsolete-variable-alias: Obsoleteness.
-* define-prefix-command: Prefix Keys.
-* define-specifier-tag: Specifier Tag Functions.
-* defining a function: Defining Functions.
-* defining commands: Defining Commands.
-* defining-kbd-macro: Keyboard Macros.
-* definition of a symbol: Definitions.
-* defmacro: Defining Macros.
-* defsubst: Inline Functions.
-* defun: Defining Functions.
-* defun-prompt-regexp: List Motion.
-* defvar <1>: Domain Specification.
-* defvar: Defining Variables.
-* defvaralias: Variable Aliases.
-* deiconify-frame: Visibility of Frames.
-* delete: Sets And Lists.
-* delete previous char: Deletion.
-* delete-annotation: Annotation Primitives.
-* delete-auto-save-file-if-necessary: Auto-Saving.
-* delete-auto-save-files: Auto-Saving.
-* delete-backward-char: Deletion.
-* delete-blank-lines: User-Level Deletion.
-* delete-char: Deletion.
-* delete-device: Connecting to a Console or Device.
-* delete-device-hook: Connecting to a Console or Device.
-* delete-directory: Create/Delete Dirs.
-* delete-exited-processes: Deleting Processes.
-* delete-extent: Creating and Modifying Extents.
-* delete-file: Changing File Attributes.
-* delete-frame: Deleting Frames.
-* delete-frame-hook: Frame Hooks.
-* delete-horizontal-space: User-Level Deletion.
-* delete-indentation: User-Level Deletion.
-* delete-menu-item: Modifying Menus.
-* delete-other-windows: Deleting Windows.
-* delete-process: Deleting Processes.
-* delete-region: Deletion.
-* delete-to-left-margin: Margins.
-* delete-window: Deleting Windows.
-* delete-windows-on: Deleting Windows.
-* deleting files: Changing File Attributes.
-* deleting processes: Deleting Processes.
-* deleting whitespace: User-Level Deletion.
-* deleting windows: Deleting Windows.
-* deletion of elements: Sets And Lists.
-* deletion of frames: Deleting Frames.
-* deletion vs killing: Deletion.
-* delq: Sets And Lists.
-* demibold: Font Instance Characteristics.
-* describe-bindings: Scanning Keymaps.
-* describe-bindings-internal: Scanning Keymaps.
-* describe-buffer-case-table: Case Tables.
-* describe-mode: Mode Help.
-* describe-prefix-bindings: Help Functions.
-* describe-tooltalk-message: Elisp Interface for Receiving Messages.
-* description for interactive codes: Interactive Codes.
-* description format: Format of Descriptions.
-* deselect-frame-hook: Frame Hooks.
-* destroy-tooltalk-message: Elisp Interface for Sending Messages.
-* destroy-tooltalk-pattern: Elisp Interface for Receiving Messages.
-* destructive-alist-to-plist: Converting Plists To/From Alists.
-* destructive-plist-to-alist: Converting Plists To/From Alists.
-* detach-extent: Detached Extents.
-* detached extent: Detached Extents.
-* detect-coding-region: Detection of Textual Encoding.
-* 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>: 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.
-* device-matching-specifier-tag-list: Specifier Tag Functions.
-* device-or-frame-p: Basic Device Functions.
-* device-or-frame-type: Console Types and Device Classes.
-* device-type: Console Types and Device Classes.
-* device-x-display: Connecting to a Console or Device.
-* devicep: Consoles and Devices.
-* devices: Consoles and Devices.
-* dgettext: Level 3 Primitives.
-* diagrams, boxed, for lists: Cons Cell Type.
-* dialog box: Dialog Boxes.
-* digit-argument: Prefix Command Arguments.
-* ding: Beeping.
-* directory name: Directory Names.
-* directory name abbreviation: Directory Names.
-* directory part (of file name): File Name Components.
-* directory-abbrev-alist: Directory Names.
-* directory-file-name: Directory Names.
-* directory-files: Contents of Directories.
-* directory-oriented functions: Contents of Directories.
-* dired-kept-versions: Numbered Backups.
-* dired-mode-map: Standard Keymaps.
-* disable undo: Maintaining Undo.
-* disable-command: Disabling Commands.
-* disable-menu-item: Modifying Menus.
-* disable-timeout: Timers.
-* disabled: Disabling Commands.
-* disabled command: Disabling Commands.
-* disabled-command-hook: Disabling Commands.
-* disassemble: Disassembly.
-* disassembled byte-code: Disassembly.
-* discard input: Peeking and Discarding.
-* discard-input: Peeking and Discarding.
-* dispatch-event: Dispatching an Event.
-* dispatching an event: Dispatching an Event.
-* display columns: Size and Position.
-* display lines: Size and Position.
-* display order: Extent Endpoints.
-* display table: Display Tables.
-* display update: Refresh Screen.
-* display-buffer: Choosing Window.
-* display-buffer-function: Choosing Window.
-* display-completion-list: Completion Commands.
-* display-error: Processing of Errors.
-* display-message: The Echo Area.
-* display-warning: Warnings.
-* display-warning-minimum-level: Warnings.
-* display-warning-suppressed-classes: Warnings.
-* displaying a buffer: Displaying Buffers.
-* do-auto-save: Auto-Saving.
-* DOC (documentation) file: Documentation Basics.
-* doc-directory: Accessing Documentation.
-* documentation: Accessing Documentation.
-* documentation conventions: Documentation Basics.
-* documentation for major mode: Mode Help.
-* documentation notation: Evaluation Notation.
-* documentation of function: Function Documentation.
-* documentation strings: Documentation.
-* documentation, keys in: Keys in Documentation.
-* documentation-property: Accessing Documentation.
-* domain: Level 3 Primitives.
-* domain (in a specifier): Specifiers In-Depth.
-* domain-of: Level 3 Primitives.
-* dotted lists (Edebug): Specification List.
-* dotted pair notation: Dotted Pair Notation.
-* double-quote in strings: String Type.
-* down-list: List Motion.
-* downcase: Character Case.
-* downcase-region: Case Changes.
-* downcase-word: Case Changes.
-* downcasing in lookup-key: Key Sequence Input.
-* drag: Drag Interface.
-* drag and drop: Drag and Drop.
-* Drag API: Drag Interface.
-* dribble file: Recording Input.
-* drop: Drop Interface.
-* Drop API: Drop Interface.
-* dump-emacs: Building XEmacs.
-* duplicable extent: Duplicable Extents.
-* dynamic loading of documentation: Docs and Compilation.
-* dynamic loading of functions: Dynamic Loading.
-* dynamic scoping: Variable Scoping.
-* echo area: The Echo Area.
-* echo-keystrokes <1>: The Echo Area.
-* echo-keystrokes: Command Loop Info.
-* 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>: 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>: 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>: 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-save-windows: Edebug Display Update.
-* edebug-set-global-break-condition: Global Break Condition.
-* edebug-setup-hook: Edebug Options.
-* edebug-test-coverage: Edebug Options.
-* edebug-trace <1>: Edebug Options.
-* edebug-trace: Tracing.
-* edebug-tracing: Tracing.
-* edebug-unwrap: Specification List.
-* 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.
-* edit-tab-stops-map: Standard Keymaps.
-* editing types: Editing Types.
-* editor command loop: Command Loop.
-* eighth: List Elements.
-* electric-buffer-menu-mode-map: Standard Keymaps.
-* electric-future-map: A Sample Variable Description.
-* electric-history-map: Standard Keymaps.
-* element (of list): Lists.
-* elements of sequences: Sequence Functions.
-* elt: Sequence Functions.
-* emacs-build-time: Building XEmacs.
-* emacs-lisp-mode-map: Standard Keymaps.
-* emacs-lisp-mode-syntax-table: Standard Syntax Tables.
-* emacs-major-version: Building XEmacs.
-* emacs-minor-version: Building XEmacs.
-* emacs-pid: System Environment.
-* emacs-version: Building XEmacs.
-* EMACSLOADPATH environment variable: How Programs Do Loading.
-* embedded breakpoints: Embedded Breakpoints.
-* empty list: Cons Cell Type.
-* enable-command: Disabling Commands.
-* enable-flow-control: Flow Control.
-* enable-flow-control-on: Flow Control.
-* enable-local-eval: Auto Major Mode.
-* enable-local-variables: Auto Major Mode.
-* enable-menu-item: Modifying Menus.
-* enable-recursive-minibuffers: Minibuffer Misc.
-* encode-big5-char: Big5 and Shift-JIS Functions.
-* encode-coding-region: Encoding and Decoding Text.
-* encode-shift-jis-char: Big5 and Shift-JIS Functions.
-* encode-time: Time Conversion.
-* encoding file formats: Format Conversion.
-* end of buffer marker: Creating Markers.
-* end-of-buffer: Buffer End Motion.
-* end-of-defun: List Motion.
-* end-of-file: Input Functions.
-* end-of-line: Text Lines.
-* enlarge-window: Resizing Windows.
-* enlarge-window-horizontally: Resizing Windows.
-* enlarge-window-pixels: Resizing Windows.
-* enqueue-eval-event: Reading One Event.
-* environment: Intro Eval.
-* environment variable access: System Environment.
-* environment variables, subprocesses: Subprocess Creation.
-* eobp: Near Point.
-* eolp: Near Point.
-* eq: Equality Predicates.
-* equal: Equality Predicates.
-* equality: Equality Predicates.
-* erase-buffer: Deletion.
-* error: Signaling Errors.
-* error cleanup: Cleanups.
-* error debugging: Error Debugging.
-* error display: The Echo Area.
-* error handler: Handling Errors.
-* error in debug: Invoking the Debugger.
-* error message notation: Error Messages.
-* error name: Error Symbols.
-* error symbol: Error Symbols.
-* error-conditions: Error Symbols.
-* error-message-string: Processing of Errors.
-* errors: Errors.
-* esc-map: Prefix Keys.
-* ESC-prefix: Prefix Keys.
-* escape <1>: Syntax Class Table.
-* escape: Character Type.
-* escape characters: Output Variables.
-* escape characters in printing: Output Functions.
-* escape sequence: Character Type.
-* eval: Eval.
-* eval, and debugging: Internals of Debugger.
-* eval-and-compile: Eval During Compile.
-* eval-buffer: Eval.
-* eval-current-buffer (Edebug): Instrumenting.
-* eval-defun (Edebug): Instrumenting.
-* eval-event-p: Event Predicates.
-* eval-expression (Edebug): Instrumenting.
-* eval-minibuffer: Object from Minibuffer.
-* eval-region: Eval.
-* eval-region (Edebug): Instrumenting.
-* eval-when-compile: Eval During Compile.
-* evaluated expression argument: Interactive Codes.
-* evaluation: Evaluation.
-* evaluation error: Local Variables.
-* evaluation list (Edebug): Eval List.
-* evaluation notation: Evaluation Notation.
-* evaluation of buffer contents: Eval.
-* event printing: Describing Characters.
-* event-buffer: Window-Level Event Position Info.
-* event-button: Accessing Other Event Info.
-* event-closest-point: Event Text Position Info.
-* event-device: Accessing Other Event Info.
-* event-frame: Frame-Level Event Position Info.
-* event-function: Accessing Other Event Info.
-* event-glyph-extent: Event Glyph Position Info.
-* event-glyph-x-pixel: Event Glyph Position Info.
-* event-glyph-y-pixel: Event Glyph Position Info.
-* event-key: Accessing Other Event Info.
-* event-live-p: Event Predicates.
-* event-matches-key-specifier-p: Key Sequences.
-* event-modifier-bits: Accessing Other Event Info.
-* event-modifiers: Accessing Other Event Info.
-* event-object: Accessing Other Event Info.
-* event-over-border-p: Other Event Position Info.
-* event-over-glyph-p: Event Glyph Position Info.
-* event-over-modeline-p: Event Text Position Info.
-* event-over-text-area-p: Event Text Position Info.
-* event-over-toolbar-p: Event Toolbar Position Info.
-* event-point: Event Text Position Info.
-* event-process: Accessing Other Event Info.
-* event-timestamp: Accessing Other Event Info.
-* event-to-character: Converting Events.
-* event-toolbar-button: Event Toolbar Position Info.
-* event-type: Event Contents.
-* event-window: Window-Level Event Position Info.
-* event-window-x-pixel: Window-Level Event Position Info.
-* event-window-y-pixel: Window-Level Event Position Info.
-* event-x: Event Text Position Info.
-* event-x-pixel: Frame-Level Event Position Info.
-* event-y: Event Text Position Info.
-* event-y-pixel: Frame-Level Event Position Info.
-* eventp: Events.
-* events: Events.
-* events-to-keys: Converting Events.
-* examining windows: Buffers and Windows.
-* examples of using interactive: Interactive Examples.
-* exchange-point-and-mark: The Mark.
-* excursion: Excursions.
-* exec-directory: Subprocess Creation.
-* exec-path: Subprocess Creation.
-* execute program: Subprocess Creation.
-* execute with prefix argument: Interactive Call.
-* execute-extended-command: Interactive Call.
-* execute-kbd-macro: Keyboard Macros.
-* executing-macro: Keyboard Macros.
-* execution speed: Compilation Tips.
-* exit: Recursive Editing.
-* exit recursive editing: Recursive Editing.
-* exit-minibuffer: Minibuffer Misc.
-* exit-recursive-edit: Recursive Editing.
-* exiting XEmacs: Getting Out.
-* exp: Math Functions.
-* expand-abbrev: Abbrev Expansion.
-* expand-file-name: File Name Expansion.
-* expansion of file names: File Name Expansion.
-* expansion of macros: Expansion.
-* expression: Intro Eval.
-* expression prefix: Syntax Class Table.
-* expt: Math Functions.
-* extended-command-history: Minibuffer History.
-* extent <1>: Extents.
-* extent: Variable Scoping.
-* extent children: Extent Parents.
-* extent end position: Extent Endpoints.
-* extent endpoint: Extent Endpoints.
-* extent order: Extent Endpoints.
-* extent parent: Extent Parents.
-* extent priority: Intro to Extents.
-* extent property: Extent Properties.
-* extent replica: Duplicable Extents.
-* extent start position: Extent Endpoints.
-* extent, duplicable: Duplicable Extents.
-* extent, unique: Duplicable Extents.
-* extent-at: Finding Extents.
-* extent-begin-glyph: Extent Properties.
-* extent-begin-glyph-layout: Extent Properties.
-* extent-children: Extent Parents.
-* extent-descendants: Extent Parents.
-* extent-detached-p: Detached Extents.
-* extent-end-glyph: Extent Properties.
-* extent-end-glyph-layout: Extent Properties.
-* extent-end-position: Extent Endpoints.
-* extent-face: Extent Properties.
-* extent-in-region-p: Mapping Over Extents.
-* extent-keymap: Extent Properties.
-* extent-length: Extent Endpoints.
-* extent-list: Finding Extents.
-* extent-live-p: Creating and Modifying Extents.
-* extent-mouse-face: Extent Properties.
-* extent-object: Creating and Modifying Extents.
-* extent-parent: Extent Parents.
-* extent-priority: Extent Properties.
-* extent-properties: Extent Properties.
-* extent-property: Extent Properties.
-* extent-start-position: Extent Endpoints.
-* extentp: Extents.
-* extents, locating: Finding Extents.
-* extents, mapping: Mapping Over Extents.
-* face type: Face Type.
-* face-background: Face Convenience Functions.
-* face-background-instance: Face Convenience Functions.
-* face-background-pixmap: Face Convenience Functions.
-* face-background-pixmap-instance: Face Convenience Functions.
-* face-boolean-specifier-p: Specifier Types.
-* face-differs-from-default-p: Other Face Display Functions.
-* face-equal: Other Face Display Functions.
-* face-font: Face Convenience Functions.
-* face-font-instance: Face Convenience Functions.
-* face-font-name: Face Convenience Functions.
-* face-foreground: Face Convenience Functions.
-* face-foreground-instance: Face Convenience Functions.
-* face-list: Basic Face Functions.
-* face-property: Face Properties.
-* face-property-instance: Face Properties.
-* face-underline-p: Face Convenience Functions.
-* facep: Basic Face Functions.
-* faces: Faces and Window-System Objects.
-* fallback (in a specifier): Specifier Instancing.
-* false: nil and t.
-* fboundp: Function Cells.
-* fceiling: Rounding Operations.
-* featurep: Named Features.
-* features: Named Features.
-* fetch-bytecode: Dynamic Loading.
-* ffloor: Rounding Operations.
-* field width: Formatting Strings.
-* fifth: List Elements.
-* file accessibility: Testing Accessibility.
-* file age: Testing Accessibility.
-* file attributes: File Attributes.
-* file format conversion: Format Conversion.
-* file hard link: Changing File Attributes.
-* file locks: File Locks.
-* file mode specification error: Auto Major Mode.
-* file modes and MS-DOS: Changing File Attributes.
-* file modification time: Testing Accessibility.
-* file name completion subroutines: File Name Completion.
-* file name of buffer: Buffer File Name.
-* file name of directory: Directory Names.
-* file names: File Names.
-* file names in directory: Contents of Directories.
-* file open error: Subroutines of Visiting.
-* file symbolic links: Kinds of Files.
-* file types on MS-DOS: Files and MS-DOS.
-* file with multiple names: Changing File Attributes.
-* file-accessible-directory-p: Testing Accessibility.
-* file-already-exists: Changing File Attributes.
-* file-attributes: File Attributes.
-* file-directory-p: Kinds of Files.
-* file-error: How Programs Do Loading.
-* file-executable-p: Testing Accessibility.
-* file-exists-p: Testing Accessibility.
-* file-local-copy: Magic File Names.
-* file-locked: File Locks.
-* file-locked-p: File Locks.
-* file-menu-filter: Menu Filters.
-* file-modes: File Attributes.
-* file-name-absolute-p: Relative File Names.
-* file-name-all-completions: File Name Completion.
-* file-name-as-directory: Directory Names.
-* file-name-buffer-file-type-alist: Files and MS-DOS.
-* file-name-completion: File Name Completion.
-* file-name-directory: File Name Components.
-* file-name-history: Minibuffer History.
-* file-name-nondirectory: File Name Components.
-* file-name-sans-extension: File Name Components.
-* file-name-sans-versions: File Name Components.
-* file-newer-than-file-p: Testing Accessibility.
-* file-newest-backup: Backup Names.
-* file-nlinks: File Attributes.
-* file-ownership-preserved-p: Testing Accessibility.
-* file-precious-flag: Saving Buffers.
-* file-readable-p: Testing Accessibility.
-* file-regular-p: Kinds of Files.
-* file-relative-name: File Name Expansion.
-* file-supersession: Modification Time.
-* file-symlink-p: Kinds of Files.
-* file-truename: Truenames.
-* file-writable-p: Testing Accessibility.
-* fill-column: Margins.
-* fill-individual-paragraphs: Filling.
-* fill-individual-varying-indent: Filling.
-* fill-paragraph: Filling.
-* fill-paragraph-function: Filling.
-* fill-prefix: Margins.
-* fill-region: Filling.
-* fill-region-as-paragraph: Filling.
-* fillarray: Array Functions.
-* filling a paragraph: Filling.
-* filling, automatic: Auto Filling.
-* filling, explicit: Filling.
-* filter function: Filter Functions.
-* find-backup-file-name: Backup Names.
-* find-buffer-file-type: Files and MS-DOS.
-* find-charset: Basic Charset Functions.
-* find-charset-region: MULE Characters.
-* find-charset-string: MULE Characters.
-* find-coding-system: Basic Coding System Functions.
-* find-file: Visiting Functions.
-* find-file-binary: Files and MS-DOS.
-* find-file-hooks: Visiting Functions.
-* find-file-name-handler: Magic File Names.
-* find-file-noselect: Visiting Functions.
-* find-file-not-found-hooks: Visiting Functions.
-* find-file-other-window: Visiting Functions.
-* find-file-read-only: Visiting Functions.
-* find-file-text: Files and MS-DOS.
-* find-menu-item: Modifying Menus.
-* finding files: Visiting Files.
-* finding windows: Selecting Windows.
-* first: List Elements.
-* first-change-hook: Change Hooks.
-* fixup-whitespace: User-Level Deletion.
-* float: Numeric Conversions.
-* float-output-format: Output Variables.
-* floating-point numbers, printing: Output Variables.
-* floatp: Predicates on Numbers.
-* floor: Numeric Conversions.
-* flow control characters: Flow Control.
-* flush input: Peeking and Discarding.
-* fmakunbound: Function Cells.
-* focus-frame: Input Focus.
-* following-char: Near Point.
-* font instance characteristics: Font Instance Characteristics.
-* font instance name: Font Instance Names.
-* font instance size: Font Instance Size.
-* font instance type: Font Instance Type.
-* font-instance-name: Font Instance Names.
-* font-instance-p: Font Instances.
-* font-instance-properties: Font Instance Characteristics.
-* font-instance-truename: Font Instance Names.
-* font-name: Font Convenience Functions.
-* font-properties: Font Convenience Functions.
-* font-specifier-p <1>: Font Specifiers.
-* font-specifier-p: Specifier Types.
-* font-truename: Font Convenience Functions.
-* fonts <1>: Fonts.
-* fonts: Some Terms.
-* fonts available: Font Instance Names.
-* foo: A Sample Function Description.
-* for: Argument Evaluation.
-* force-cursor-redisplay: Refresh Screen.
-* force-highlight-extent: Extents and Events.
-* forcing redisplay: Waiting.
-* format: Formatting Strings.
-* format definition: Format Conversion.
-* format of keymaps: Format of Keymaps.
-* format of menus: Menu Format.
-* format of the menubar: Menubar Format.
-* format precision: Formatting Strings.
-* format specification: Formatting Strings.
-* format-alist: Format Conversion.
-* format-buffers-menu-line: Buffers Menu.
-* format-find-file: Format Conversion.
-* format-insert-file: Format Conversion.
-* format-time-string: Time Conversion.
-* format-write-file: Format Conversion.
-* formatting strings: Formatting Strings.
-* formfeed: Character Type.
-* forms: Intro Eval.
-* forward-char: Character Motion.
-* forward-comment: Parsing Expressions.
-* forward-line: Text Lines.
-* forward-list: List Motion.
-* forward-sexp: List Motion.
-* forward-to-indentation: Motion by Indent.
-* forward-word: Word Motion.
-* fourth: List Elements.
-* frame: Frames.
-* frame configuration: Frame Configurations.
-* frame hooks: Frame Hooks.
-* frame name: Frame Name.
-* frame of terminal: Basic Windows.
-* frame position: Size and Position.
-* frame size: Size and Position.
-* frame visibility: Visibility of Frames.
-* frame-device: Basic Device Functions.
-* frame-height: Size and Position.
-* frame-icon-title-format: Frame Titles.
-* frame-iconified-p: Visibility of Frames.
-* frame-list: Finding All Frames.
-* frame-live-p: Deleting Frames.
-* frame-name: Frame Name.
-* frame-pixel-height: Size and Position.
-* frame-pixel-width: Size and Position.
-* frame-properties: Property Access.
-* frame-property: Property Access.
-* frame-root-window: Frames and Windows.
-* frame-selected-window: Frames and Windows.
-* frame-title-format: Frame Titles.
-* frame-top-window: Frames and Windows.
-* frame-totally-visible-p: Visibility of Frames.
-* frame-visible-p: Visibility of Frames.
-* frame-width: Size and Position.
-* framep: Frames.
-* free list: Garbage Collection.
-* frequency counts: Coverage Testing.
-* fround: Rounding Operations.
-* fset: Function Cells.
-* ftp-login: Cleanups.
-* ftruncate: Rounding Operations.
-* funcall: Calling Functions.
-* funcall, and debugging: Internals of Debugger.
-* function <1>: Anonymous Functions.
-* function: What Is a Function.
-* function call: Function Forms.
-* function call debugging: Function Debugging.
-* function cell: Symbol Components.
-* function cell in autoload: Autoload.
-* function definition: Function Names.
-* function descriptions: A Sample Function Description.
-* function form evaluation: Function Forms.
-* function input stream: Input Streams.
-* function invocation: Calling Functions.
-* function name: Function Names.
-* function output stream: Output Streams.
-* function quoting: Anonymous Functions.
-* function-interactive: Using Interactive.
-* function-key-map: Translating Input.
-* function-obsoleteness-doc: Obsoleteness.
-* functionals: Calling Functions.
-* functions in modes: Major Mode Conventions.
-* functions, making them interactive: Defining Commands.
-* Fundamental mode: Major Modes.
-* fundamental-mode: Auto Major Mode.
-* fundamental-mode-abbrev-table: Standard Abbrev Tables.
-* garbage collector: Garbage Collection.
-* garbage-collect: Garbage Collection.
-* gc-cons-threshold: Garbage Collection.
-* gc-message: 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.
-* get: Symbol Plists.
-* get-buffer: Buffer Names.
-* get-buffer-create: Creating Buffers.
-* get-buffer-process: Process Buffers.
-* get-buffer-window: Buffers and Windows.
-* get-char-property: Examining Properties.
-* get-char-table: Working With Char Tables.
-* get-charset: Basic Charset Functions.
-* get-coding-system: Basic Coding System Functions.
-* get-database: Working With a Database.
-* get-file-buffer: Buffer File Name.
-* get-largest-window: Selecting Windows.
-* get-lru-window: Selecting Windows.
-* get-process: Process Information.
-* get-range-char-table: Working With Char Tables.
-* get-range-table: Working With Range Tables.
-* get-register: Registers.
-* get-text-property: Examining Properties.
-* get-tooltalk-message-attribute: Elisp Interface for Sending Messages.
-* getenv: System Environment.
-* getf: Other Plists.
-* gethash: Working With Hash Tables.
-* gettext: Level 3 Primitives.
-* global binding: Local Variables.
-* global break condition: Global Break Condition.
-* global keymap: Active Keymaps.
-* global mark ring: The Mark.
-* global variable: Global Variables.
-* global-abbrev-table: Standard Abbrev Tables.
-* global-key-binding: Functions for Key Lookup.
-* global-map: Active Keymaps.
-* global-mark-ring: The Mark.
-* global-mode-string: Modeline Variables.
-* global-popup-menu: Pop-Up Menus.
-* global-set-key: Key Binding Commands.
-* global-unset-key: Key Binding Commands.
-* glyph type: Glyph Type.
-* glyph-ascent: Glyph Dimensions.
-* glyph-baseline: Glyph Convenience Functions.
-* glyph-baseline-instance: Glyph Convenience Functions.
-* glyph-contrib-p: Glyph Convenience Functions.
-* glyph-contrib-p-instance: Glyph Convenience Functions.
-* glyph-descent: Glyph Dimensions.
-* glyph-face: Glyph Convenience Functions.
-* glyph-height: Glyph Dimensions.
-* glyph-image: Glyph Convenience Functions.
-* glyph-image-instance: Glyph Convenience Functions.
-* glyph-property: Glyph Properties.
-* glyph-property-instance: Glyph Properties.
-* glyph-type: Glyph Types.
-* glyph-type-list: Glyph Types.
-* glyph-width: Glyph Dimensions.
-* glyphp: Glyphs.
-* glyphs: Glyphs.
-* goto-char: Character Motion.
-* goto-line: Text Lines.
-* hack-local-variables: Auto Major Mode.
-* handling errors: Handling Errors.
-* hash notation: Printed Representation.
-* hash table: Hash Tables.
-* hash table type: Hash Table Type.
-* hash table, weak: Weak Hash Tables.
-* hash-table-count: Introduction to Hash Tables.
-* hash-table-p: Hash Tables.
-* hash-table-rehash-size: Introduction to Hash Tables.
-* hash-table-rehash-threshold: Introduction to Hash Tables.
-* hash-table-size: Introduction to Hash Tables.
-* hash-table-test: Introduction to Hash Tables.
-* hash-table-weakness: Introduction to Hash Tables.
-* hashing: Creating Symbols.
-* header comments: Library Headers.
-* help for major mode: Mode Help.
-* help-char: Help Functions.
-* help-command: Help Functions.
-* help-form: Help Functions.
-* help-map <1>: Standard Keymaps.
-* help-map: Help Functions.
-* Helper-describe-bindings: Help Functions.
-* Helper-help: Help Functions.
-* Helper-help-map: Standard Keymaps.
-* hide-annotation: Annotation Properties.
-* highlight-extent: Extents and Events.
-* history list: Minibuffer History.
-* history of commands: Command History.
-* HOME environment variable: Subprocess Creation.
-* hooks: Hooks.
-* hooks for loading: Hooks for Loading.
-* hooks for text changes: Change Hooks.
-* horizontal position: Columns.
-* horizontal scrolling: Horizontal Scrolling.
-* hscroll-glyph: Redisplay Glyphs.
-* icon-glyph-p: Glyph Types.
-* iconified frame: Visibility of Frames.
-* iconify-frame: Visibility of Frames.
-* identity: Calling Functions.
-* IEEE floating point: Float Basics.
-* if: Conditionals.
-* ignore: Calling Functions.
-* ignored-local-variables: Auto Major Mode.
-* image instance type: Image Instance Type.
-* image instance types: Image Instance Types.
-* image instances: Image Instances.
-* image instantiator conversion: Image Instantiator Conversion.
-* image specifiers: Image Specifiers.
-* image-instance-background: Image Instance Functions.
-* image-instance-depth: Image Instance Functions.
-* image-instance-file-name: Image Instance Functions.
-* image-instance-foreground: Image Instance Functions.
-* image-instance-height: Image Instance Functions.
-* image-instance-hotspot-x: Image Instance Functions.
-* image-instance-hotspot-y: Image Instance Functions.
-* image-instance-mask-file-name: Image Instance Functions.
-* image-instance-name: Image Instance Functions.
-* image-instance-p: Image Instances.
-* image-instance-string: Image Instance Functions.
-* image-instance-type: Image Instance Types.
-* image-instance-type-list: Image Instance Types.
-* image-instance-width: Image Instance Functions.
-* image-instantiator-format-list: 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.
-* indent-code-rigidly: Region Indent.
-* indent-for-tab-command: Mode-Specific Indent.
-* indent-line-function: Mode-Specific Indent.
-* indent-region: Region Indent.
-* indent-region-function: Region Indent.
-* indent-relative: Relative Indent.
-* indent-relative-maybe: Relative Indent.
-* indent-rigidly: Region Indent.
-* indent-tabs-mode: Primitive Indent.
-* indent-to: Primitive Indent.
-* indent-to-left-margin: Margins.
-* indentation: Indentation.
-* indenting with parentheses: Parsing Expressions.
-* indirect buffers: Indirect Buffers.
-* indirect specifications: Specification List.
-* indirect variables: Variable Aliases.
-* indirect-function: Function Indirection.
-* indirect-variable: Variable Aliases.
-* indirection: Function Indirection.
-* infinite loops: Infinite Loops.
-* infinite recursion: Local Variables.
-* infinity: Float Basics.
-* Info-edit-map: Standard Keymaps.
-* Info-minibuffer-history: Minibuffer History.
-* Info-mode-map: Standard Keymaps.
-* inherit: Syntax Class Table.
-* inheriting a keymap's bindings: Inheritance and Keymaps.
-* inhibit-default-init: Init File.
-* inhibit-file-name-handlers: Magic File Names.
-* inhibit-file-name-operation: Magic File Names.
-* inhibit-quit: Quitting.
-* inhibit-read-only: Read Only Buffers.
-* inhibit-startup-echo-area-message: Start-up Summary.
-* inhibit-startup-message: Start-up Summary.
-* init file: Init File.
-* initial-frame-plist: Initial Properties.
-* initial-major-mode: Auto Major Mode.
-* initial-toolbar-spec: Other Toolbar Variables.
-* initialization: Start-up Summary.
-* inline functions: Inline Functions.
-* innermost containing parentheses: Parsing Expressions.
-* input events: Events.
-* input focus: Input Focus.
-* input modes: Input Modes.
-* input stream: Input Streams.
-* input-pending-p: Peeking and Discarding.
-* insert: Insertion.
-* insert-abbrev-table-description: Abbrev Tables.
-* insert-before-markers: Insertion.
-* insert-buffer: Commands for Insertion.
-* insert-buffer-substring: Insertion.
-* insert-char: Insertion.
-* insert-default-directory: Reading File Names.
-* insert-directory: Contents of Directories.
-* insert-directory-program: Contents of Directories.
-* insert-extent: Detached Extents.
-* insert-file-contents: Reading from Files.
-* insert-register: Registers.
-* insert-string: Insertion.
-* inserting killed text: Yank Commands.
-* insertion before point: Insertion.
-* insertion of text: Insertion.
-* inside comment: Parsing Expressions.
-* inside margin: Annotation Basics.
-* inside string: Parsing Expressions.
-* inst-list (in a specifier): Specifiers In-Depth.
-* inst-pair (in a specifier): Specifiers In-Depth.
-* installation-directory: System Environment.
-* instance (in a specifier): Specifiers In-Depth.
-* instancing (in a specifier): Specifiers In-Depth.
-* instantiator (in a specifier): Specifiers In-Depth.
-* int-char: Character Codes.
-* int-to-string: String Conversion.
-* integer to decimal: String Conversion.
-* integer to hexadecimal: Formatting Strings.
-* integer to octal: Formatting Strings.
-* integer to string: String Conversion.
-* integer-char-or-marker-p: Predicates on Markers.
-* integer-or-char-p: Predicates for Characters.
-* integer-or-marker-p: Predicates on Markers.
-* integer-specifier-p: Specifier Types.
-* integerp: Predicates on Numbers.
-* integers: Numbers.
-* interactive: Using Interactive.
-* interactive call: Interactive Call.
-* interactive code description: Interactive Codes.
-* interactive commands (Edebug): Instrumenting.
-* interactive completion: Interactive Codes.
-* interactive function: Defining Commands.
-* interactive, examples of using: Interactive Examples.
-* interactive-p: Interactive Call.
-* intern: Creating Symbols.
-* intern-soft: Creating Symbols.
-* internal-doc-file-name: Accessing Documentation.
-* interning: Creating Symbols.
-* interpreter: Evaluation.
-* interpreter-mode-alist: Auto Major Mode.
-* interprogram-cut-function: Low-Level Kill Ring.
-* interprogram-paste-function: Low-Level Kill Ring.
-* interrupt-process: Signals to Processes.
-* invalid function: Function Indirection.
-* invalid prefix key error: Changing Key Bindings.
-* invalid-function: Function Indirection.
-* invalid-read-syntax: Printed Representation.
-* invalid-regexp: Syntax of Regexps.
-* invert-face: Other Face Display Functions.
-* invisible frame: Visibility of Frames.
-* invisible text: Invisible Text.
-* invisible-text-glyph: Redisplay Glyphs.
-* invocation-directory: System Environment.
-* invocation-name: System Environment.
-* isearch-mode-map: Standard Keymaps.
-* ISO Latin 1: Case Tables.
-* ISO Latin-1 characters (input): Translating Input.
-* iso-syntax: Case Tables.
-* iso-transl: Translating Input.
-* italic: Font Instance Characteristics.
-* iteration: Iteration.
-* itimer-edit-map: Standard Keymaps.
-* joining lists: Rearrangement.
-* just-one-space: User-Level Deletion.
-* justify-current-line: Filling.
-* kept-new-versions: Numbered Backups.
-* kept-old-versions: Numbered Backups.
-* key: Keymap Terminology.
-* key binding: Keymap Terminology.
-* key lookup: Key Lookup.
-* key sequence: Key Sequence Input.
-* key sequence error: Changing Key Bindings.
-* key sequence input: Key Sequence Input.
-* key sequences: Key Sequences.
-* key translation function: Translating Input.
-* key-binding: Functions for Key Lookup.
-* key-description: Describing Characters.
-* key-press-event-p: Event Predicates.
-* key-translation-map: Translating Input.
-* keyboard macro execution: Interactive Call.
-* keyboard macro termination: Beeping.
-* keyboard macros: Keyboard Macros.
-* keyboard macros (Edebug): Edebug Execution Modes.
-* keyboard menu accelerators: Menu Accelerators.
-* keyboard-quit: Quitting.
-* keymap: Keymaps.
-* keymap entry: Key Lookup.
-* keymap format: Format of Keymaps.
-* keymap in keymap: Key Lookup.
-* keymap inheritance: Inheritance and Keymaps.
-* keymap parent: Inheritance and Keymaps.
-* keymap-default-binding: Inheritance and Keymaps.
-* keymap-fullness: Scanning Keymaps.
-* keymap-name: Creating Keymaps.
-* keymap-parents: Inheritance and Keymaps.
-* keymap-prompt: Other Keymap Functions.
-* keymapp: Format of Keymaps.
-* keymaps in modes: Major Mode Conventions.
-* keys in documentation strings: Keys in Documentation.
-* keystroke: Keymap Terminology.
-* keystroke command: What Is a Function.
-* keywordp: Specification List.
-* kill command repetition: Command Loop Info.
-* kill ring: The Kill Ring.
-* kill-all-local-variables: Creating Buffer-Local.
-* kill-append: Low-Level Kill Ring.
-* kill-buffer: Killing Buffers.
-* kill-buffer-hook: Killing Buffers.
-* kill-buffer-query-functions: Killing Buffers.
-* kill-emacs: Killing XEmacs.
-* kill-emacs-hook: Killing XEmacs.
-* kill-emacs-query-functions: Killing XEmacs.
-* kill-local-variable: Creating Buffer-Local.
-* kill-new: Low-Level Kill Ring.
-* kill-process: Signals to Processes.
-* kill-region: Kill Functions.
-* kill-ring: Internals of Kill Ring.
-* kill-ring-max: Internals of Kill Ring.
-* kill-ring-yank-pointer: Internals of Kill Ring.
-* killing buffers: Killing Buffers.
-* killing XEmacs: Killing XEmacs.
-* lambda expression: Lambda Expressions.
-* lambda expression in hook: Hooks.
-* lambda in debug: Invoking the Debugger.
-* lambda in keymap: Key Lookup.
-* lambda list: Lambda Components.
-* lambda-list (Edebug): Specification List.
-* lambda-list-keywordp: Specification List.
-* last-abbrev: Abbrev Expansion.
-* last-abbrev-location: Abbrev Expansion.
-* last-abbrev-text: Abbrev Expansion.
-* last-command: Command Loop Info.
-* last-command-char: Command Loop Info.
-* last-command-event: Command Loop Info.
-* last-input-char: Peeking and Discarding.
-* last-input-event: Peeking and Discarding.
-* last-kbd-macro: Keyboard Macros.
-* Latin-1 character set (input): Translating Input.
-* lax-plist-get: Working With Lax Plists.
-* lax-plist-member: Working With Lax Plists.
-* lax-plist-put: Working With Lax Plists.
-* lax-plist-remprop: Working With Lax Plists.
-* lax-plists-eq: Working With Lax Plists.
-* lax-plists-equal: Working With Lax Plists.
-* layout policy: Annotation Basics.
-* layout types: Annotation Basics.
-* lazy loading: Dynamic Loading.
-* LDAP: LDAP Support.
-* ldap-close: Opening and Closing a LDAP Connection.
-* ldap-default-base: LDAP Variables.
-* ldap-default-host: LDAP Variables.
-* ldap-default-port: LDAP Variables.
-* ldap-host: The LDAP Lisp Object.
-* ldap-host-parameters-alist: LDAP Variables.
-* ldap-live-p: The LDAP Lisp Object.
-* ldap-open: Opening and Closing a LDAP Connection.
-* ldap-search: The High-Level LDAP API.
-* ldap-search-internal: Searching on a LDAP Server (Low-level).
-* ldapp: The LDAP Lisp Object.
-* left-margin: Margins.
-* left-margin-width: Margin Primitives.
-* left-toolbar: Specifying the Toolbar.
-* left-toolbar-visible-p: Other Toolbar Variables.
-* left-toolbar-width: Other Toolbar Variables.
-* length: Sequence Functions.
-* let: Local Variables.
-* let*: Local Variables.
-* let-specifier: Adding Specifications.
-* lexical binding (Edebug): Edebug Eval.
-* lexical comparison: Text Comparison.
-* library: Loading.
-* library compilation: Compilation Functions.
-* library header comments: Library Headers.
-* line wrapping: Truncation.
-* lines: Text Lines.
-* lines in region: Text Lines.
-* linking files: Changing File Attributes.
-* Lisp debugger: Debugger.
-* Lisp expression motion: List Motion.
-* Lisp history: Lisp History.
-* Lisp library: Loading.
-* Lisp nesting error: Eval.
-* Lisp object: Lisp Data Types.
-* Lisp printer: Output Functions.
-* Lisp reader: Streams Intro.
-* lisp-interaction-mode-map: Standard Keymaps.
-* lisp-mode-abbrev-table: Standard Abbrev Tables.
-* lisp-mode-map: Standard Keymaps.
-* lisp-mode.el: Example Major Modes.
-* list <1>: Building Lists.
-* list: Lists.
-* list elements: List Elements.
-* list form evaluation: Classifying Lists.
-* list in keymap: Key Lookup.
-* list length: Sequence Functions.
-* list motion: List Motion.
-* list structure: Cons Cells.
-* list-buffers: The Buffer List.
-* list-buffers-directory: Buffer File Name.
-* list-fonts: Font Instance Names.
-* list-processes: Process Information.
-* listp: List-related Predicates.
-* lists and cons cells: Cons Cells.
-* lists as sets: Sets And Lists.
-* lists represented as boxes: Lists as Boxes.
-* literal evaluation: Self-Evaluating Forms.
-* lmessage: The Echo Area.
-* ln: Changing File Attributes.
-* load: How Programs Do Loading.
-* load error with require: Named Features.
-* load errors: How Programs Do Loading.
-* load-average: System Environment.
-* load-default-sounds: Beeping.
-* load-history: Unloading.
-* load-ignore-elc-files: How Programs Do Loading.
-* load-in-progress: How Programs Do Loading.
-* load-path: How Programs Do Loading.
-* load-read-function: How Programs Do Loading.
-* load-sound-file: Beeping.
-* load-warn-when-source-newer: How Programs Do Loading.
-* load-warn-when-source-only: How Programs Do Loading.
-* loading: Loading.
-* loading hooks: Hooks for Loading.
-* loadup.el: Building XEmacs.
-* local binding: Local Variables.
-* local keymap: Active Keymaps.
-* local variables: Local Variables.
-* local-abbrev-table: Standard Abbrev Tables.
-* local-key-binding: Functions for Key Lookup.
-* local-set-key: Key Binding Commands.
-* local-unset-key: Key Binding Commands.
-* local-variable-p: Creating Buffer-Local.
-* local-write-file-hooks: Saving Buffers.
-* locale (in a specifier): Specifiers In-Depth.
-* locate-file: How Programs Do Loading.
-* locate-file-clear-hashing: How Programs Do Loading.
-* lock-buffer: File Locks.
-* log: Math Functions.
-* log-message-ignore-labels: The Echo Area.
-* log-message-ignore-regexps: The Echo Area.
-* log-message-max-size: The Echo Area.
-* log-warning-minimum-level: Warnings.
-* log-warning-suppressed-classes: Warnings.
-* log10: Math Functions.
-* logand: Bitwise Operations.
-* logb: Float Basics.
-* logical and: Bitwise Operations.
-* logical exclusive or: Bitwise Operations.
-* logical inclusive or: Bitwise Operations.
-* logical not: Bitwise Operations.
-* logical shift: Bitwise Operations.
-* logior: Bitwise Operations.
-* lognot: Bitwise Operations.
-* logxor: Bitwise Operations.
-* looking-at: Regexp Search.
-* lookup-key: Functions for Key Lookup.
-* loops, infinite: Infinite Loops.
-* lower case: Character Case.
-* lower-frame: Raising and Lowering.
-* lowering a frame: Raising and Lowering.
-* lsh: Bitwise Operations.
-* lwarn: Warnings.
-* M-x: Interactive Call.
-* Maclisp: Lisp History.
-* macro: What Is a Function.
-* macro argument evaluation: Argument Evaluation.
-* macro call: Expansion.
-* macro call evaluation: Macro Forms.
-* macro compilation: Compilation Functions.
-* macro descriptions: A Sample Function Description.
-* macro expansion: Expansion.
-* macroexpand: Expansion.
-* macros: Macros.
-* magic file names: Magic File Names.
-* mail-host-address: System Environment.
-* major mode: Major Modes.
-* major mode hook: Major Mode Conventions.
-* major mode keymap: Active Keymaps.
-* major-mode: Mode Help.
-* make-abbrev-table: Abbrev Tables.
-* make-annotation: Annotation Primitives.
-* make-auto-save-file-name: Auto-Saving.
-* make-backup-file-name: Backup Names.
-* make-backup-files: Making Backups.
-* make-bit-vector: Bit Vector Functions.
-* make-byte-code: Compiled-Function Objects.
-* make-char: MULE Characters.
-* make-char-table: Working With Char Tables.
-* make-charset: Basic Charset Functions.
-* make-coding-system: Basic Coding System Functions.
-* make-composite-char: Composite Characters.
-* make-device: Connecting to a Console or Device.
-* make-directory: Create/Delete Dirs.
-* make-display-table: Display Table Format.
-* make-event: Working With Events.
-* make-extent: Creating and Modifying Extents.
-* make-face: Basic Face Functions.
-* make-file-part: Creating a Partial File.
-* make-font-instance: Font Instances.
-* make-frame: Creating Frames.
-* make-frame-invisible: Visibility of Frames.
-* make-frame-visible: Visibility of Frames.
-* make-glyph: Creating Glyphs.
-* make-glyph-internal: Creating Glyphs.
-* make-hash-table: Introduction to Hash Tables.
-* make-icon-glyph: Creating Glyphs.
-* make-image-instance: Image Instance Functions.
-* make-image-specifier: Image Specifiers.
-* make-indirect-buffer: Indirect Buffers.
-* make-keymap: Creating Keymaps.
-* make-list: Building Lists.
-* make-local-hook: Hooks.
-* make-local-variable: Creating Buffer-Local.
-* make-marker: Creating Markers.
-* make-obsolete: Obsoleteness.
-* make-obsolete-variable: Obsoleteness.
-* make-pointer-glyph: Creating Glyphs.
-* make-range-table: Introduction to Range Tables.
-* make-reverse-direction-charset: Basic Charset Functions.
-* make-sparse-keymap: Creating Keymaps.
-* make-specifier: Creating Specifiers.
-* make-specifier-and-init: Creating Specifiers.
-* make-string: Creating Strings.
-* make-symbol: Creating Symbols.
-* make-symbolic-link: Changing File Attributes.
-* make-syntax-table: Syntax Table Functions.
-* make-temp-name: Unique File Names.
-* make-tooltalk-message: Elisp Interface for Sending Messages.
-* make-tooltalk-pattern: Elisp Interface for Receiving Messages.
-* make-tty-device: Connecting to a Console or Device.
-* make-variable-buffer-local: Creating Buffer-Local.
-* make-vector: Vector Functions.
-* make-weak-list: Weak Lists.
-* make-x-device: Connecting to a Console or Device.
-* makunbound: Void Variables.
-* Manual-page-minibuffer-history: Minibuffer History.
-* map-char-table: Working With Char Tables.
-* map-database: Working With a Database.
-* map-extent-children: Mapping Over Extents.
-* map-extents: Mapping Over Extents.
-* map-frame-hook: Frame Hooks.
-* map-keymap: Scanning Keymaps.
-* map-range-table: Working With Range Tables.
-* map-specifier: Other Specification Functions.
-* map-y-or-n-p: Multiple Queries.
-* mapatoms: Creating Symbols.
-* mapcar: Mapping Functions.
-* mapcar-extents: Mapping Over Extents.
-* mapconcat: Mapping Functions.
-* maphash: Working With Hash Tables.
-* mapping functions: Mapping Functions.
-* margin: Annotation Basics.
-* margin width: Margin Primitives.
-* mark: The Mark.
-* mark excursion: Excursions.
-* mark ring: The Mark.
-* mark, the: The Mark.
-* mark-marker: The Mark.
-* mark-ring: The Mark.
-* mark-ring-max: The Mark.
-* marker argument: Interactive Codes.
-* marker garbage collection: Overview of Markers.
-* marker input stream: Input Streams.
-* marker output stream: Output Streams.
-* marker relocation: Overview of Markers.
-* marker-buffer: Information from Markers.
-* marker-position: Information from Markers.
-* markerp: Predicates on Markers.
-* markers: Markers.
-* markers as numbers: Overview of Markers.
-* markers vs. extents: Overview of Markers.
-* match data: Match Data.
-* match-beginning: Simple Match Data.
-* match-data: Entire Match Data.
-* match-end: Simple Match Data.
-* match-string: Simple Match Data.
-* mathematical functions: Math Functions.
-* max: Comparison of Numbers.
-* max-lisp-eval-depth: Eval.
-* max-specpdl-size: Local Variables.
-* md5: Transformations.
-* MD5 digests: Transformations.
-* member: Sets And Lists.
-* membership in a list: Sets And Lists.
-* memory allocation: Garbage Collection.
-* memory-limit: Garbage Collection.
-* memq: Sets And Lists.
-* menu: Menus.
-* menu accelerators: Menu Accelerators.
-* menu filters: Menu Filters.
-* menu format: Menu Format.
-* menu-accelerator-enabled: Menu Accelerator Functions.
-* menu-accelerator-map: Menu Accelerator Functions.
-* menu-accelerator-modifiers: Menu Accelerator Functions.
-* menu-accelerator-prefix: Menu Accelerator Functions.
-* menu-no-selection-hook: Menubar.
-* menubar: Menubar.
-* menubar format: Menubar Format.
-* menubar-configuration: Menu Format.
-* menubar-pointer-glyph: Mouse Pointer.
-* menubar-show-keybindings: Menubar.
-* message: The Echo Area.
-* meta character printing: Describing Characters.
-* meta-prefix-char: Functions for Key Lookup.
-* min: Comparison of Numbers.
-* minibuffer: Minibuffers.
-* minibuffer history: Minibuffer History.
-* minibuffer input: Recursive Editing.
-* minibuffer window: Cyclic Window Ordering.
-* minibuffer-complete: Completion Commands.
-* minibuffer-complete-and-exit: Completion Commands.
-* minibuffer-complete-word: Completion Commands.
-* minibuffer-completion-confirm: Completion Commands.
-* minibuffer-completion-help: Completion Commands.
-* minibuffer-completion-predicate: Completion Commands.
-* minibuffer-completion-table: Completion Commands.
-* minibuffer-depth: Minibuffer Misc.
-* minibuffer-exit-hook: Minibuffer Misc.
-* minibuffer-frame-plist: Initial Properties.
-* minibuffer-help-form: Minibuffer Misc.
-* minibuffer-history: Minibuffer History.
-* 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>: Standard Keymaps.
-* minibuffer-local-must-match-map: Completion Commands.
-* minibuffer-prompt: Minibuffer Misc.
-* minibuffer-prompt-width: Minibuffer Misc.
-* minibuffer-scroll-window: Minibuffer Misc.
-* minibuffer-setup-hook: Minibuffer Misc.
-* minibuffer-window: Minibuffer Misc.
-* minibuffer-window-active-p: Minibuffer Misc.
-* minimum window size: Resizing Windows.
-* minor mode: Minor Modes.
-* minor mode conventions: Minor Mode Conventions.
-* minor-mode-alist: Modeline Variables.
-* minor-mode-key-binding: Functions for Key Lookup.
-* minor-mode-map-alist: Active Keymaps.
-* misc-user-event-p: Event Predicates.
-* mod: Arithmetic Operations.
-* mode: Modes.
-* mode help: Mode Help.
-* mode hook: Major Mode Conventions.
-* mode loading: Major Mode Conventions.
-* mode variable: Minor Mode Conventions.
-* mode-class property: Major Mode Conventions.
-* mode-name: Modeline Variables.
-* mode-popup-menu: Pop-Up Menus.
-* mode-specific-map <1>: Standard Keymaps.
-* mode-specific-map: Prefix Keys.
-* modeline: Modeline Format.
-* modeline construct: Modeline Data.
-* modeline-buffer-identification: Modeline Variables.
-* modeline-format: Modeline Data.
-* modeline-map <1>: Standard Keymaps.
-* modeline-map: Active Keymaps.
-* modeline-modified: Modeline Variables.
-* modeline-pointer-glyph: Mouse Pointer.
-* modeline-process: Modeline Variables.
-* modification flag (of buffer): Buffer Modification.
-* modification of lists: Rearrangement.
-* modification time, comparison of: Modification Time.
-* modify-syntax-entry: Syntax Table Functions.
-* modulus: Arithmetic Operations.
-* momentary-string-display: Temporary Displays.
-* mono-pixmap-image-instance-p: Image Instance Types.
-* motion-event-p: Event Predicates.
-* mouse cursor: Mouse Pointer.
-* mouse pointer: Mouse Pointer.
-* mouse-event-p: Event Predicates.
-* mouse-grabbed-buffer: Active Keymaps.
-* mouse-highlight-priority: Extents and Events.
-* move-marker: Changing Markers.
-* move-to-column: Columns.
-* move-to-left-margin: Margins.
-* move-to-window-line: Screen Lines.
-* MS-DOS and file modes: Changing File Attributes.
-* MS-DOS file types: Files and MS-DOS.
-* MSWindows OLE: MSWindows OLE.
-* multilingual string formatting: Formatting Strings.
-* multiple windows: Basic Windows.
-* named function: Function Names.
-* NaN: Float Basics.
-* narrow-to-page: Narrowing.
-* narrow-to-region: Narrowing.
-* narrowing: Narrowing.
-* natnum-specifier-p: Specifier Types.
-* natnump: Predicates on Numbers.
-* natural numbers: Predicates on Numbers.
-* nconc: Rearrangement.
-* negative infinity: Float Basics.
-* negative-argument: Prefix Command Arguments.
-* network connection: Network.
-* new file message: Subroutines of Visiting.
-* 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.
-* newline-and-indent: Mode-Specific Indent.
-* next input: Peeking and Discarding.
-* next-command-event: Reading One Event.
-* next-event: Reading One Event.
-* next-extent: Finding Extents.
-* next-frame: Finding All Frames.
-* next-history-element: Minibuffer Misc.
-* next-matching-history-element: Minibuffer Misc.
-* next-property-change: Property Search.
-* next-screen-context-lines: Vertical Scrolling.
-* next-single-property-change: Property Search.
-* next-window: Cyclic Window Ordering.
-* nil: Constant Variables.
-* nil and lists: Cons Cells.
-* nil in keymap: Key Lookup.
-* nil in lists: Cons Cell Type.
-* nil input stream: Input Streams.
-* nil output stream: Output Streams.
-* nil, uses of: nil and t.
-* ninth: List Elements.
-* nlistp: List-related Predicates.
-* no-catch: Catch and Throw.
-* no-redraw-on-reenter: Refresh Screen.
-* nondirectory part (of file name): File Name Components.
-* noninteractive: Batch Mode.
-* noninteractive use: Batch Mode.
-* nonlocal exits: Nonlocal Exits.
-* nonprinting characters, reading: Quoted Character Input.
-* nontext-pointer-glyph: Mouse Pointer.
-* normal-mode: Auto Major Mode.
-* not: Combining Conditions.
-* not-modified: Buffer Modification.
-* nothing-image-instance-p: Image Instance Types.
-* nreverse: Rearrangement.
-* nth: List Elements.
-* nthcdr: List Elements.
-* null: List-related Predicates.
-* number equality: Comparison of Numbers.
-* number-char-or-marker-p: Predicates on Markers.
-* number-or-marker-p: Predicates on Markers.
-* number-to-string: String Conversion.
-* numberp: Predicates on Numbers.
-* numbers: Numbers.
-* numeric prefix: Formatting Strings.
-* numeric prefix argument: Prefix Command Arguments.
-* numeric prefix argument usage: Interactive Codes.
-* obarray: Creating Symbols.
-* obarray in completion: Basic Completion.
-* objc-mode-map: Standard Keymaps.
-* object: Lisp Data Types.
-* object to string: Output Functions.
-* oblique: Font Instance Characteristics.
-* obsolete buffer: Modification Time.
-* occur-mode-map: Standard Keymaps.
-* octal character code: Character Type.
-* octal character input: Quoted Character Input.
-* octal-escape-glyph: Redisplay Glyphs.
-* OffiX DND: OffiX DND.
-* old-eq: Equality Predicates.
-* one-window-p: Splitting Windows.
-* only-global-abbrevs: Defining Abbrevs.
-* 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.
-* options on command line: Command Line Arguments.
-* or: Combining Conditions.
-* order of extents: Extent Endpoints.
-* ordering of windows, cyclic: Cyclic Window Ordering.
-* other-buffer: The Buffer List.
-* other-window: Cyclic Window Ordering.
-* other-window-scroll-buffer: Vertical Scrolling.
-* Outline mode: Substitution.
-* output from processes: Output from Processes.
-* output stream: Output Streams.
-* outside margin: Annotation Basics.
-* overflow: Integer Basics.
-* overlay arrow: Overlay Arrow.
-* overlay-arrow-position: Overlay Arrow.
-* overlay-arrow-string: Overlay Arrow.
-* overriding-local-map <1>: Standard Keymaps.
-* overriding-local-map: Active Keymaps.
-* overriding-terminal-local-map: Active Keymaps.
-* overwrite-mode: Commands for Insertion.
-* padding: Formatting Strings.
-* page-delimiter: Standard Regexps.
-* paired delimiter: Syntax Class Table.
-* paragraph-separate: Standard Regexps.
-* paragraph-start: Standard Regexps.
-* parent of a keymap: Inheritance and Keymaps.
-* parent process: Processes.
-* parent, of extent: Extent Parents.
-* parenthesis: Cons Cell Type.
-* parenthesis depth: Parsing Expressions.
-* parenthesis matching: Blinking.
-* parenthesis syntax: Syntax Class Table.
-* parse state: Parsing Expressions.
-* parse-partial-sexp: Parsing Expressions.
-* parse-sexp-ignore-comments: Parsing Expressions.
-* parsing: Syntax Tables.
-* partial files: Partial Files.
-* passwd-echo: Reading a Password.
-* passwd-invert-frame-when-keyboard-grabbed: Reading a Password.
-* passwords, reading: Reading a Password.
-* PATH environment variable: Subprocess Creation.
-* path-separator: System Environment.
-* pausing: Waiting.
-* peeking at input: Peeking and Discarding.
-* percent symbol in modeline: Modeline Data.
-* perform-replace: Search and Replace.
-* performance analysis: Coverage Testing.
-* permanent local variable: Creating Buffer-Local.
-* permission: File Attributes.
-* pipes: Asynchronous Processes.
-* play-sound: Beeping.
-* play-sound-file: Beeping.
-* plist: Property Lists.
-* plist, symbol: Symbol Properties.
-* plist-get: Working With Normal Plists.
-* plist-member: Working With Normal Plists.
-* plist-put: Working With Normal Plists.
-* plist-remprop: Working With Normal Plists.
-* plist-to-alist: Converting Plists To/From Alists.
-* 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.
-* point with narrowing: Point.
-* point-marker: Creating Markers.
-* point-max: Point.
-* point-max-marker: Creating Markers.
-* point-min: Point.
-* point-min-marker: Creating Markers.
-* pointer (mouse): Mouse Pointer.
-* pointer-glyph-p: Glyph Types.
-* pointer-image-instance-p: Image Instance Types.
-* pop-global-mark: The Mark.
-* pop-mark: The Mark.
-* pop-to-buffer: Displaying Buffers.
-* pop-up menu: Pop-Up Menus.
-* pop-up-frame-function: Choosing Window.
-* pop-up-frame-plist: Choosing Window.
-* pop-up-frames: Choosing Window.
-* pop-up-windows: Choosing Window.
-* popup-buffer-menu: Pop-Up Menus.
-* popup-dialog-box: Dialog Box Functions.
-* popup-menu: Pop-Up Menus.
-* popup-menu-titles: Pop-Up Menus.
-* popup-menu-up-p: Pop-Up Menus.
-* popup-menubar-menu: Pop-Up Menus.
-* popup-mode-menu: Pop-Up Menus.
-* pos-visible-in-window-p: Window Start.
-* position (in buffer): Positions.
-* position argument: Interactive Codes.
-* position in window: Window Point.
-* position of frame: Size and Position.
-* position of window: Position of Window.
-* positive infinity: Float Basics.
-* posix-looking-at: POSIX Regexps.
-* posix-search-backward: POSIX Regexps.
-* posix-search-forward: POSIX Regexps.
-* posix-string-match: POSIX Regexps.
-* post-command-hook: Command Overview.
-* post-gc-hook: Garbage Collection.
-* pre-abbrev-expand-hook: Abbrev Expansion.
-* pre-command-hook: Command Overview.
-* pre-gc-hook: Garbage Collection.
-* preceding-char: Near Point.
-* precision of formatted numbers: Formatting Strings.
-* predicates: Type Predicates.
-* prefix argument: Prefix Command Arguments.
-* prefix argument unreading: Peeking and Discarding.
-* prefix command: Prefix Keys.
-* prefix key: Prefix Keys.
-* prefix-arg: Prefix Command Arguments.
-* prefix-help-command: Help Functions.
-* prefix-numeric-value: Prefix Command Arguments.
-* preventing backtracking: Specification List.
-* preventing prefix key: Key Lookup.
-* previous complete subexpression: Parsing Expressions.
-* previous-extent: Finding Extents.
-* previous-frame: Finding All Frames.
-* previous-history-element: Minibuffer Misc.
-* previous-matching-history-element: Minibuffer Misc.
-* previous-property-change: Property Search.
-* previous-single-property-change: Property Search.
-* previous-window: Cyclic Window Ordering.
-* primitive: What Is a Function.
-* primitive type: Lisp Data Types.
-* primitive types: Primitive Types.
-* primitive-undo: Undo.
-* prin1: Output Functions.
-* prin1-to-string: Output Functions.
-* princ: Output Functions.
-* print: Output Functions.
-* print example: Output Streams.
-* print name cell: Symbol Components.
-* print-escape-newlines: Output Variables.
-* print-gensym: Output Variables.
-* print-help-return-message: Help Functions.
-* print-length: Output Variables.
-* print-level: Output Variables.
-* print-readably <1>: Output Variables.
-* print-readably: Printing in Edebug.
-* print-string-length: Output Variables.
-* printed representation: Printed Representation.
-* printed representation for characters: Character Type.
-* printing: Streams Intro.
-* printing (Edebug): Printing in Edebug.
-* printing circular structures: Printing in Edebug.
-* printing floating-point numbers: Output Variables.
-* printing limits: Output Variables.
-* printing notation: Printing Notation.
-* printing readably: Output Variables.
-* printing uninterned symbols: Output Variables.
-* priority of an extent: Intro to Extents.
-* process: Processes.
-* process filter: Filter Functions.
-* process input: Input to Processes.
-* process output: Output from Processes.
-* process sentinel: Sentinels.
-* process signals: Signals to Processes.
-* process window size: Process Window Size.
-* process-buffer: Process Buffers.
-* process-command: Process Information.
-* process-connection-type: Asynchronous Processes.
-* process-environment: System Environment.
-* process-event-p: Event Predicates.
-* process-exit-status: Process Information.
-* process-filter: Filter Functions.
-* process-id: Process Information.
-* process-kill-without-query: Deleting Processes.
-* process-kill-without-query-p: Process Information.
-* process-list: Process Information.
-* process-mark: Process Buffers.
-* process-name: Process Information.
-* process-send-eof: Input to Processes.
-* process-send-region: Input to Processes.
-* process-send-string: Input to Processes.
-* process-sentinel: Sentinels.
-* process-status: Process Information.
-* process-tty-name: Process Information.
-* processp: Processes.
-* profile.el: Compilation Tips.
-* profiling: Compilation Tips.
-* prog1: Sequencing.
-* prog2: Sequencing.
-* progn: Sequencing.
-* program arguments: Subprocess Creation.
-* program directories: Subprocess Creation.
-* programmed completion: Programmed Completion.
-* programming types: Programming Types.
-* properties of strings: String Properties.
-* properties of text: Text Properties.
-* property list: Property Lists.
-* property list cell (symbol): Symbol Components.
-* property list, symbol: Symbol Properties.
-* property lists vs association lists: Plists and Alists.
-* property of an extent: Extent Properties.
-* protected forms: Cleanups.
-* provide: Named Features.
-* providing features: Named Features.
-* PTYs: Asynchronous Processes.
-* punctuation character: Syntax Class Table.
-* pure storage: Pure Storage.
-* pure-bytes-used: Pure Storage.
-* purecopy: Pure Storage.
-* purify-flag: Pure Storage.
-* push-mark: The Mark.
-* put: Symbol Plists.
-* put-char-table: Working With Char Tables.
-* put-database: Working With a Database.
-* put-range-table: Working With Range Tables.
-* put-text-property: Changing Properties.
-* putf: Other Plists.
-* puthash: Working With Hash Tables.
-* query-replace-history: Minibuffer History.
-* 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.
-* quit-flag: Quitting.
-* quit-process: Signals to Processes.
-* quitting: Quitting.
-* quitting from infinite loop: Infinite Loops.
-* quote: Quoting.
-* quote character: Parsing Expressions.
-* quoted character input: Quoted Character Input.
-* quoted-insert suppression: Changing Key Bindings.
-* quoting: Quoting.
-* quoting characters in printing: Output Functions.
-* quoting using apostrophe: Quoting.
-* raise-frame: Raising and Lowering.
-* raising a frame: Raising and Lowering.
-* random: Random Numbers.
-* random numbers: Random Numbers.
-* range table type: Range Table Type.
-* Range Tables: Range Tables.
-* range-table-p: Range Tables.
-* rassoc: Association Lists.
-* rassq: Association Lists.
-* raw prefix argument: Prefix Command Arguments.
-* raw prefix argument usage: Interactive Codes.
-* re-search-backward: Regexp Search.
-* re-search-forward: Regexp Search.
-* read: Input Functions.
-* read command name: Interactive Call.
-* read syntax: Printed Representation.
-* read syntax for characters: Character Type.
-* read-buffer: High-Level Completion.
-* read-char: Reading One Event.
-* read-command: High-Level Completion.
-* read-expression-history: Minibuffer History.
-* read-expression-map: Standard Keymaps.
-* read-file-name: Reading File Names.
-* read-from-minibuffer: Text from Minibuffer.
-* read-from-string: Input Functions.
-* read-key-sequence: Key Sequence Input.
-* read-minibuffer: Object from Minibuffer.
-* read-only buffer: Read Only Buffers.
-* read-only buffers in interactive: Using Interactive.
-* read-passwd: Reading a Password.
-* read-quoted-char: Quoted Character Input.
-* read-quoted-char quitting: Quitting.
-* read-shell-command-map: Standard Keymaps.
-* read-string: Text from Minibuffer.
-* read-variable: High-Level Completion.
-* reading: Streams Intro.
-* reading (Edebug): Reading in Edebug.
-* reading interactive arguments: Interactive Codes.
-* reading symbols: Creating Symbols.
-* rearrangement of lists: Rearrangement.
-* rebinding: Changing Key Bindings.
-* receiving ToolTalk messages: Receiving Messages.
-* recent-auto-save-p: Auto-Saving.
-* recent-keys: Recording Input.
-* recent-keys-ring-size: Recording Input.
-* recenter: Vertical Scrolling.
-* record command history: Interactive Call.
-* recursion: Iteration.
-* recursion-depth: Recursive Editing.
-* recursive command loop: Recursive Editing.
-* recursive editing level: Recursive Editing.
-* recursive evaluation: Intro Eval.
-* recursive-edit: Recursive Editing.
-* redo: Undo.
-* redraw-display: Refresh Screen.
-* redraw-frame: Refresh Screen.
-* redraw-modeline: Modeline Format.
-* refresh display: Refresh Screen.
-* regexp: Regular Expressions.
-* regexp alternative: Syntax of Regexps.
-* regexp grouping: Syntax of Regexps.
-* regexp searching: Regexp Search.
-* regexp-history: Minibuffer History.
-* regexp-quote: Syntax of Regexps.
-* regexps used standardly in editing: Standard Regexps.
-* region argument: Interactive Codes.
-* region, the: The Region.
-* region-active-p: The Region.
-* region-beginning: The Region.
-* region-end: The Region.
-* region-exists-p: The Region.
-* register-alist: Registers.
-* register-ccl-program: Calling CCL.
-* register-tooltalk-pattern: Elisp Interface for Receiving Messages.
-* registers: Registers.
-* regular expression: Regular Expressions.
-* regular expression searching: Regexp Search.
-* reindent-then-newline-and-indent: Mode-Specific Indent.
-* relabel-menu-item: Modifying Menus.
-* relative file name: Relative File Names.
-* remainder: Arithmetic Operations.
-* remassoc: Association Lists.
-* remassq: Association Lists.
-* remhash: Working With Hash Tables.
-* remove-database: Working With a Database.
-* remove-face-property: Face Properties.
-* remove-glyph-property: Glyph Properties.
-* remove-hook: Hooks.
-* remove-range-table: Working With Range Tables.
-* remove-specifier: Other Specification Functions.
-* remove-text-properties: Changing Properties.
-* remrassoc: Association Lists.
-* remrassq: Association Lists.
-* rename-auto-save-file: Auto-Saving.
-* rename-buffer: Buffer Names.
-* rename-file: Changing File Attributes.
-* renaming files: Changing File Attributes.
-* repeated loading: Repeated Loading.
-* replace bindings: Changing Key Bindings.
-* replace characters: Substitution.
-* replace-buffer-in-windows: Displaying Buffers.
-* replace-match: Replacing Match.
-* replacement: Search and Replace.
-* repositioning format arguments: Formatting Strings.
-* require: Named Features.
-* require-final-newline: Saving Buffers.
-* requiring features: Named Features.
-* reset-char-table: Working With Char Tables.
-* resize redisplay: Size and Position.
-* rest arguments: Argument List.
-* restriction (in a buffer): Narrowing.
-* resume (cf. no-redraw-on-reenter): Refresh Screen.
-* return: Character Type.
-* return-tooltalk-message: Elisp Interface for Sending Messages.
-* reveal-annotation: Annotation Properties.
-* reverse: Building Lists.
-* reversing a list: Rearrangement.
-* revert-buffer: Reverting.
-* revert-buffer-function: Reverting.
-* revert-buffer-insert-file-contents-function: Reverting.
-* right-margin-width: Margin Primitives.
-* right-toolbar: Specifying the Toolbar.
-* right-toolbar-visible-p: Other Toolbar Variables.
-* right-toolbar-width: Other Toolbar Variables.
-* rm: Changing File Attributes.
-* round: Numeric Conversions.
-* rounding in conversions: Numeric Conversions.
-* rounding without conversion: Rounding Operations.
-* rplaca: Modifying Lists.
-* rplacd: Modifying Lists.
-* run time stack: Internals of Debugger.
-* run-emacs-from-temacs: Building XEmacs.
-* run-hooks: Hooks.
-* runnable temacs: Building XEmacs.
-* same-window-buffer-names: Choosing Window.
-* same-window-regexps: Choosing Window.
-* save-abbrevs: Abbrev Files.
-* save-buffer: Saving Buffers.
-* save-current-buffer: Excursions.
-* save-excursion: Excursions.
-* save-excursion (Edebug): Edebug Display Update.
-* save-match-data: Saving Match Data.
-* save-restriction: Narrowing.
-* save-selected-frame: Input Focus.
-* save-selected-window <1>: Excursions.
-* save-selected-window: Selecting Windows.
-* save-some-buffers: Saving Buffers.
-* save-window-excursion: Window Configurations.
-* saving text properties: Saving Properties.
-* saving window information: Window Configurations.
-* scan-lists: Parsing Expressions.
-* scan-sexps: Parsing Expressions.
-* scope: Variable Scoping.
-* screen layout: Window Configuration Type.
-* scroll-conservatively: Vertical Scrolling.
-* scroll-down: Vertical Scrolling.
-* scroll-left: Horizontal Scrolling.
-* scroll-other-window: Vertical Scrolling.
-* scroll-right: Horizontal Scrolling.
-* scroll-step: Vertical Scrolling.
-* scroll-up: Vertical Scrolling.
-* scrollbar-pointer-glyph: Mouse Pointer.
-* scrollbars: Scrollbars.
-* scrolling vertically: Vertical Scrolling.
-* search-backward: String Search.
-* search-failed: String Search.
-* search-forward: String Search.
-* searching: Searching and Matching.
-* searching and case: Searching and Case.
-* searching for regexp: Regexp Search.
-* second: List Elements.
-* select-console: The Selected Console and Device.
-* select-device: The Selected Console and Device.
-* select-frame: Input Focus.
-* select-frame-hook: Frame Hooks.
-* select-window: Selecting Windows.
-* selected frame: Input Focus.
-* selected window: Basic Windows.
-* selected-console: The Selected Console and Device.
-* selected-device: The Selected Console and Device.
-* selected-frame: Input Focus.
-* selected-window: Selecting Windows.
-* selecting a buffer: Current Buffer.
-* selecting windows: Selecting Windows.
-* selection (for X windows): X Selections.
-* selection-pointer-glyph: Mouse Pointer.
-* selective display: Selective Display.
-* selective-display: Selective Display.
-* selective-display-ellipses: Selective Display.
-* self-evaluating form: Self-Evaluating Forms.
-* self-insert-and-exit: Minibuffer Misc.
-* self-insert-command: Commands for Insertion.
-* self-insert-command override: Changing Key Bindings.
-* self-insert-command, minor modes: Keymaps and Minor Modes.
-* self-insertion: Commands for Insertion.
-* send-string-to-terminal: Terminal Output.
-* send-tooltalk-message: Elisp Interface for Sending Messages.
-* sending signals: Signals to Processes.
-* sending ToolTalk messages: Sending Messages.
-* sentence-end: Standard Regexps.
-* sentinel: Sentinels.
-* sequence: Sequences Arrays Vectors.
-* sequence length: Sequence Functions.
-* sequencep: Sequence Functions.
-* set: Setting Variables.
-* set-annotation-action: Annotation Properties.
-* set-annotation-data: Annotation Properties.
-* set-annotation-down-glyph: Annotation Properties.
-* set-annotation-face: Annotation Properties.
-* set-annotation-glyph: Annotation Properties.
-* set-annotation-layout: Annotation Properties.
-* set-annotation-menu: Annotation Properties.
-* set-auto-mode: Auto Major Mode.
-* set-buffer: Current Buffer.
-* set-buffer-auto-saved: Auto-Saving.
-* set-buffer-major-mode: Auto Major Mode.
-* set-buffer-menubar: Menubar.
-* set-buffer-modified-p: Buffer Modification.
-* set-case-syntax: Case Tables.
-* set-case-syntax-delims: Case Tables.
-* set-case-syntax-pair: Case Tables.
-* set-case-table: Case Tables.
-* set-category-table: Category Tables.
-* set-charset-ccl-program: Charset Property Functions.
-* set-coding-category-system: Detection of Textual Encoding.
-* set-coding-priority-list: Detection of Textual Encoding.
-* set-console-type-image-conversion-list: Image Instantiator Conversion.
-* set-default: Default Value.
-* set-default-file-modes: Changing File Attributes.
-* set-default-toolbar-position: Specifying the Toolbar.
-* set-device-baud-rate <1>: Terminal Output.
-* set-device-baud-rate: Console and Device I/O.
-* set-extent-begin-glyph: Extent Properties.
-* set-extent-begin-glyph-layout: Extent Properties.
-* set-extent-end-glyph: Extent Properties.
-* set-extent-end-glyph-layout: Extent Properties.
-* set-extent-endpoints: Extent Endpoints.
-* set-extent-face: Extent Properties.
-* set-extent-initial-redisplay-function: Extent Properties.
-* set-extent-keymap: Extent Properties.
-* set-extent-mouse-face: Extent Properties.
-* set-extent-parent: Extent Parents.
-* set-extent-priority: Extent Properties.
-* set-extent-properties: Extent Properties.
-* set-extent-property: Extent Properties.
-* set-face-background: Face Convenience Functions.
-* set-face-background-pixmap: Face Convenience Functions.
-* set-face-font: Face Convenience Functions.
-* set-face-foreground: Face Convenience Functions.
-* set-face-property: Face Properties.
-* set-face-underline-p: Face Convenience Functions.
-* set-file-modes: Changing File Attributes.
-* set-frame-configuration: Frame Configurations.
-* set-frame-pointer: Mouse Pointer.
-* set-frame-position: Size and Position.
-* set-frame-properties: Property Access.
-* set-frame-property: Property Access.
-* set-frame-size: Size and Position.
-* set-glyph-baseline: Glyph Convenience Functions.
-* set-glyph-contrib-p: Glyph Convenience Functions.
-* set-glyph-face: Glyph Convenience Functions.
-* set-glyph-image: Glyph Convenience Functions.
-* set-glyph-property: Glyph Properties.
-* set-input-mode: Input Modes.
-* set-keymap-default-binding: Inheritance and Keymaps.
-* set-keymap-name: Creating Keymaps.
-* set-keymap-parents: Inheritance and Keymaps.
-* set-keymap-prompt: Other Keymap Functions.
-* set-left-margin: Margins.
-* set-mark: The Mark.
-* set-marker: Changing Markers.
-* set-match-data: Entire Match Data.
-* set-menubar: Menubar.
-* set-menubar-dirty-flag: Menubar.
-* set-process-buffer: Process Buffers.
-* set-process-filter: Filter Functions.
-* set-process-sentinel: Sentinels.
-* set-process-window-size: Process Window Size.
-* set-recent-keys-ring-size: Recording Input.
-* set-register: Registers.
-* set-right-margin: Margins.
-* set-specifier: Adding Specifications.
-* set-standard-case-table: Case Tables.
-* set-syntax-table: Syntax Table Functions.
-* set-text-properties: Changing Properties.
-* set-tooltalk-message-attribute: Elisp Interface for Sending Messages.
-* set-visited-file-modtime: Modification Time.
-* set-visited-file-name: Buffer File Name.
-* set-weak-list-list: Weak Lists.
-* set-window-buffer: Buffers and Windows.
-* set-window-buffer-dedicated: Choosing Window.
-* set-window-configuration: Window Configurations.
-* set-window-dedicated-p: Choosing Window.
-* set-window-hscroll: Horizontal Scrolling.
-* set-window-point: Window Point.
-* set-window-start: Window Start.
-* setcar: Setcar.
-* setcdr: Setcdr.
-* setenv: System Environment.
-* setplist: Symbol Plists.
-* setprv: System Environment.
-* setq: Setting Variables.
-* setq-default: Default Value.
-* sets: Sets And Lists.
-* setting modes of files: Changing File Attributes.
-* setting-constant: Constant Variables.
-* seventh: List Elements.
-* sexp motion: List Motion.
-* shadowing of variables: Local Variables.
-* shallow binding: Impl of Scope.
-* shared-lisp-mode-map: Standard Keymaps.
-* Shell mode modeline-format: Modeline Data.
-* shell-command-history: Minibuffer History.
-* shrink-window: Resizing Windows.
-* shrink-window-horizontally: Resizing Windows.
-* shrink-window-pixels: Resizing Windows.
-* side effect: Intro Eval.
-* signal: Signaling Errors.
-* signal-error: Signaling Errors.
-* signal-process: Signals to Processes.
-* signaling errors: Signaling Errors.
-* signals: Signals to Processes.
-* sin: Math Functions.
-* single-key-description: Describing Characters.
-* sinh: Math Functions.
-* sit-for: Waiting.
-* site-init.el: Building XEmacs.
-* site-load.el: Building XEmacs.
-* site-run-file: Init File.
-* site-start.el: Start-up Summary.
-* sixth: List Elements.
-* size of frame: Size and Position.
-* size of window: Size of Window.
-* skip-chars-backward: Skipping Characters.
-* skip-chars-forward: Skipping Characters.
-* skip-syntax-backward: Motion and Syntax.
-* skip-syntax-forward: Motion and Syntax.
-* skipping characters: Skipping Characters.
-* skipping comments: Parsing Expressions.
-* sleep-for: Waiting.
-* Snarf-documentation: Accessing Documentation.
-* sort: Rearrangement.
-* sort-columns: Sorting.
-* sort-fields: Sorting.
-* sort-lines: Sorting.
-* sort-numeric-fields: Sorting.
-* sort-pages: Sorting.
-* sort-paragraphs: Sorting.
-* sort-regexp-fields: Sorting.
-* sort-subr: Sorting.
-* sorting lists: Rearrangement.
-* sorting text: Sorting.
-* sound: Beeping.
-* sound-alist: Beeping.
-* special: Major Mode Conventions.
-* special form descriptions: A Sample Function Description.
-* special form evaluation: Special Forms.
-* special forms: Primitive Function Type.
-* special forms (Edebug): Instrumenting.
-* special forms for control structures: Control Structures.
-* special-display-buffer-names: Choosing Window.
-* special-display-frame-plist: Choosing Window.
-* special-display-function: Choosing Window.
-* special-display-popup-frame: Choosing Window.
-* special-display-regexps: Choosing Window.
-* specification (in a specifier): Specifiers In-Depth.
-* specifier: Specifiers.
-* specifier type: Specifier Type.
-* specifier, domain: Specifiers In-Depth.
-* specifier, fallback: Specifier Instancing.
-* specifier, inst-list: Specifiers In-Depth.
-* specifier, inst-pair: Specifiers In-Depth.
-* specifier, instance: Specifiers In-Depth.
-* specifier, instancing: Specifiers In-Depth.
-* specifier, instantiator: Specifiers In-Depth.
-* specifier, locale: Specifiers In-Depth.
-* specifier, specification: Specifiers In-Depth.
-* specifier, tag: Specifiers In-Depth.
-* specifier, tag set: Specifiers In-Depth.
-* specifier-fallback: Retrieving Specifications.
-* specifier-instance: Specifier Instancing Functions.
-* specifier-instance-from-inst-list: Specifier Instancing Functions.
-* specifier-locale-type-from-locale: Other Specification Functions.
-* specifier-spec-list: Retrieving Specifications.
-* specifier-specs: Retrieving Specifications.
-* specifier-tag-list: Specifier Tag Functions.
-* specifier-tag-predicate: Specifier Tag Functions.
-* specifier-type: Specifier Types.
-* specifierp: Specifiers.
-* speedups: Compilation Tips.
-* splicing (with backquote): Backquote.
-* split-height-threshold: Choosing Window.
-* split-line: Commands for Insertion.
-* split-path: Regexp Search.
-* split-string: Regexp Search.
-* split-window: Splitting Windows.
-* split-window-horizontally: Splitting Windows.
-* split-window-vertically: Splitting Windows.
-* splitting windows: Splitting Windows.
-* sqrt: Math Functions.
-* stable sort: Rearrangement.
-* standard regexps used in editing: Standard Regexps.
-* standard-case-table: Case Tables.
-* standard-category-table: Category Tables.
-* standard-input: Input Functions.
-* standard-output: Output Variables.
-* standard-syntax-table: Standard Syntax Tables.
-* standards of coding style: Tips.
-* start up of XEmacs: Start-up Summary.
-* start-process: Asynchronous Processes.
-* start-process-shell-command: Asynchronous Processes.
-* startup.el: Start-up Summary.
-* stop points: Using Edebug.
-* stop-process: Signals to Processes.
-* stopping an infinite loop: Infinite Loops.
-* stopping on events: Global Break Condition.
-* store-match-data: Entire Match Data.
-* stream (for printing): Output Streams.
-* stream (for reading): Input Streams.
-* string: Creating Strings.
-* string equality: Text Comparison.
-* string in keymap: Key Lookup.
-* string input stream: Input Streams.
-* string length: Sequence Functions.
-* string length, maximum when printing: Output Variables.
-* string properties: String Properties.
-* string search: String Search.
-* string to character: String Conversion.
-* string to number: String Conversion.
-* string to object: Input Functions.
-* string, writing a doc string: Documentation Basics.
-* string-equal: Text Comparison.
-* string-lessp: Text Comparison.
-* string-match: Regexp Search.
-* string-modified-tick: Modifying Strings.
-* string-to-char: String Conversion.
-* string-to-int: String Conversion.
-* string-to-number: String Conversion.
-* string<: Text Comparison.
-* string=: Text Comparison.
-* stringp: Predicates for Strings.
-* 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.
-* subsidiary-coding-system: Basic Coding System Functions.
-* subst-char-in-region: Substitution.
-* substitute-command-keys: Keys in Documentation.
-* substitute-in-file-name: File Name Expansion.
-* substitute-key-definition: Changing Key Bindings.
-* substituting keys in documentation: Keys in Documentation.
-* substring: Creating Strings.
-* subwindow type: Subwindow Type.
-* subwindow-image-instance-p: Image Instance Types.
-* subwindowp: Subwindows.
-* suppress-keymap: Changing Key Bindings.
-* suspend (cf. no-redraw-on-reenter): Refresh Screen.
-* suspend evaluation: Recursive Editing.
-* suspend-emacs: Suspending XEmacs.
-* suspend-hook: Suspending XEmacs.
-* suspend-resume-hook: Suspending XEmacs.
-* suspending XEmacs: Suspending XEmacs.
-* switch-to-buffer: Displaying Buffers.
-* switch-to-buffer-other-window: Displaying Buffers.
-* switches on command line: Command Line Arguments.
-* switching to a buffer: Displaying Buffers.
-* symbol: Symbols.
-* symbol components: Symbol Components.
-* symbol equality: Creating Symbols.
-* symbol evaluation: Symbol Forms.
-* symbol function indirection: Function Indirection.
-* symbol in keymap: Key Lookup.
-* symbol name hashing: Creating Symbols.
-* symbol-function: Function Cells.
-* symbol-name: Creating Symbols.
-* 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.
-* syntax error (Edebug): Backtracking.
-* syntax flags: Syntax Flags.
-* syntax for characters: Character Type.
-* syntax table: Syntax Tables.
-* syntax table example: Example Major Modes.
-* syntax table internals: Syntax Table Internals.
-* syntax tables in modes: Major Mode Conventions.
-* syntax-table: Syntax Table Functions.
-* syntax-table-p: Syntax Basics.
-* system-configuration: System Environment.
-* system-name: System Environment.
-* system-type: System Environment.
-* t: Constant Variables.
-* t and truth: nil and t.
-* t input stream: Input Streams.
-* t output stream: Output Streams.
-* tab: Character Type.
-* tab deletion: Deletion.
-* tab-stop-list: Indent Tabs.
-* tab-to-tab-stop: Indent Tabs.
-* tab-width: Usual Display.
-* tabs stops for indentation: Indent Tabs.
-* tag (in a specifier): Specifiers In-Depth.
-* tag on run time stack: Catch and Throw.
-* tag set (in a specifier): Specifiers In-Depth.
-* tan: Math Functions.
-* tanh: Math Functions.
-* TCP: Network.
-* temacs: Building XEmacs.
-* temp-buffer-show-function: Temporary Displays.
-* temp-directory: Unique File Names.
-* tenth: List Elements.
-* TERM environment variable: Terminal-Specific.
-* term-file-prefix: Terminal-Specific.
-* term-setup-hook: Terminal-Specific.
-* Termcap: Terminal-Specific.
-* terminal frame <1>: Frames.
-* terminal frame: Basic Windows.
-* terminal input: Terminal Input.
-* terminal input modes: Input Modes.
-* terminal output: Terminal Output.
-* terminal-device: Console Types and Device Classes.
-* terminal-specific initialization: Terminal-Specific.
-* terminate keyboard macro: Peeking and Discarding.
-* termscript file: Terminal Output.
-* terpri: Output Functions.
-* testing types: Type Predicates.
-* text: Text.
-* text files and binary files: Files and MS-DOS.
-* text insertion: Insertion.
-* text parsing: Syntax Tables.
-* text properties: Text Properties.
-* text properties in files: Saving Properties.
-* text-char-description: Describing Characters.
-* text-image-instance-p: Image Instance Types.
-* text-mode-abbrev-table: Standard Abbrev Tables.
-* text-mode-map: Standard Keymaps.
-* text-mode-syntax-table: Standard Syntax Tables.
-* text-pointer-glyph: Mouse Pointer.
-* text-properties-at: Examining Properties.
-* text-property-any: Property Search.
-* text-property-not-all: Property Search.
-* third: List Elements.
-* this-command: Command Loop Info.
-* this-command-keys: Command Loop Info.
-* throw: Catch and Throw.
-* throw example: Recursive Editing.
-* tiled windows: Basic Windows.
-* timeout-event-p: Event Predicates.
-* timing programs: Compilation Tips.
-* tips: Tips.
-* toggle-read-only: Read Only Buffers.
-* toolbar: Toolbar.
-* toolbar button type: Toolbar Button Type.
-* toolbar-buttons-captioned-p: Other Toolbar Variables.
-* toolbar-make-button-list: Toolbar Descriptor Format.
-* 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.
-* ToolTalk: ToolTalk Support.
-* ToolTalk message: Sending Messages.
-* ToolTalk pattern: Receiving Messages.
-* top-level: Recursive Editing.
-* top-level form: Loading.
-* top-toolbar: Specifying the Toolbar.
-* top-toolbar-height: Other Toolbar Variables.
-* top-toolbar-visible-p: Other Toolbar Variables.
-* tq-close: Transaction Queues.
-* tq-create: Transaction Queues.
-* tq-enqueue: Transaction Queues.
-* tracing: Tracing.
-* transaction queue: Transaction Queues.
-* transcendental functions: Math Functions.
-* translate-region: Substitution.
-* translating input events: Translating Input.
-* transpose-regions: Transposition.
-* trim-versions-without-asking: Numbered Backups.
-* true: nil and t.
-* truename (of file): Truenames.
-* truncate: Numeric Conversions.
-* truncate-lines: Truncation.
-* truncate-partial-width-windows: Truncation.
-* truncation-glyph: Redisplay Glyphs.
-* truth value: nil and t.
-* try-completion: Basic Completion.
-* two's complement: Integer Basics.
-* type: Lisp Data Types.
-* type checking: Type Predicates.
-* type predicates: Type Predicates.
-* type-of: Type Predicates.
-* unbinding keys: Key Binding Commands.
-* undefined: Functions for Key Lookup.
-* undefined in keymap: Key Lookup.
-* undefined key: Keymap Terminology.
-* undo avoidance: Substitution.
-* undo-boundary: Undo.
-* undo-limit: Maintaining Undo.
-* undo-strong-limit: Maintaining Undo.
-* unexec: Building XEmacs.
-* unhandled-file-name-directory: Magic File Names.
-* unintern: Creating Symbols.
-* uninterned symbol: Creating Symbols.
-* uninterned symbols, printing: Output Variables.
-* unique extents: Duplicable Extents.
-* universal-argument: Prefix Command Arguments.
-* unload-feature: Unloading.
-* unloading: Unloading.
-* unlock-buffer: File Locks.
-* unmap-frame-hook: Frame Hooks.
-* unread-command-event: Peeking and Discarding.
-* unread-command-events: Peeking and Discarding.
-* unreading: Input Streams.
-* unregister-tooltalk-pattern: Elisp Interface for Receiving Messages.
-* unwind-protect: Cleanups.
-* unwinding: Cleanups.
-* up-list: List Motion.
-* upcase: Character Case.
-* upcase-region: Case Changes.
-* upcase-word: Case Changes.
-* update display: Refresh Screen.
-* update-directory-autoloads: Autoload.
-* update-file-autoloads: Autoload.
-* upper case: Character Case.
-* upper case key sequence: Key Sequence Input.
-* use-global-map: Active Keymaps.
-* use-hard-newlines: Filling.
-* use-left-overflow: Margin Primitives.
-* use-local-map: Active Keymaps.
-* use-right-overflow: Margin Primitives.
-* user name completion subroutines: User Name Completion.
-* user option: Defining Variables.
-* user-defined error: Error Symbols.
-* user-full-name: User Identification.
-* user-home-directory: User Identification.
-* user-login-name: User Identification.
-* user-mail-address: User Identification.
-* user-name-all-completions: User Name Completion.
-* user-name-completion: User Name Completion.
-* user-name-completion-1: User Name Completion.
-* user-real-login-name: User Identification.
-* user-real-uid: User Identification.
-* user-uid: User Identification.
-* user-variable-p: Defining Variables.
-* user-variable-p example: High-Level Completion.
-* valid-char-table-type-p: Char Table Types.
-* valid-char-table-value-p: Working With Char Tables.
-* valid-device-class-p: Console Types and Device Classes.
-* valid-device-type-p: Console Types and Device Classes.
-* valid-glyph-type-p: Glyph Types.
-* valid-image-instance-type-p: Image Instance Types.
-* valid-image-instantiator-format-p: Image Specifiers.
-* valid-inst-list-p: Specifier Validation Functions.
-* valid-instantiator-p: Specifier Validation Functions.
-* valid-plist-p: Property Lists.
-* valid-spec-list-p: Specifier Validation Functions.
-* 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 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.
-* value of expression: Evaluation.
-* values: Eval.
-* variable: Variables.
-* variable aliases: Variable Aliases.
-* variable definition: Defining Variables.
-* variable descriptions: A Sample Variable Description.
-* variable limit error: Local Variables.
-* variable-alias: Variable Aliases.
-* variable-documentation: Documentation Basics.
-* variable-obsoleteness-doc: Obsoleteness.
-* variables, buffer-local: Buffer-Local Variables.
-* variables, indirect: Variable Aliases.
-* vc-mode: Modeline Variables.
-* vconcat: Vector Functions.
-* vector <1>: Vector Functions.
-* vector: Vectors.
-* vector evaluation: Self-Evaluating Forms.
-* vector length: Sequence Functions.
-* vectorp: Vector Functions.
-* verify-visited-file-modtime: Modification Time.
-* version number (in file name): File Name Components.
-* version-control: Numbered Backups.
-* vertical scrolling: Vertical Scrolling.
-* vertical tab: Character Type.
-* vertical-motion: Screen Lines.
-* vertical-motion-pixels: Screen Lines.
-* view-file: Visiting Functions.
-* view-mode-map: Standard Keymaps.
-* view-register: Registers.
-* visible frame: Visibility of Frames.
-* visible-bell: Beeping.
-* visible-frame-list: Finding All Frames.
-* visited file: Buffer File Name.
-* visited file mode: Auto Major Mode.
-* visited-file-modtime: Modification Time.
-* visiting files: Visiting Files.
-* void function: Function Indirection.
-* void function cell: Function Cells.
-* void variable: Void Variables.
-* void-function: Function Cells.
-* void-variable: Void Variables.
-* waiting: Waiting.
-* waiting for command key input: Peeking and Discarding.
-* waiting-for-user-input-p: Sentinels.
-* wakeup: Subprocess Creation.
-* walk-windows: Cyclic Window Ordering.
-* weak hash table: Weak Hash Tables.
-* weak list: Weak Lists.
-* weak list type: Weak List Type.
-* weak-list-list: Weak Lists.
-* weak-list-p: Weak Lists.
-* weak-list-type: Weak Lists.
-* where-is-internal: Scanning Keymaps.
-* while: Iteration.
-* whitespace: Character Type.
-* whitespace character: Syntax Class Table.
-* widen: Narrowing.
-* widening: Narrowing.
-* window: Basic Windows.
-* window configuration (Edebug): Edebug Display Update.
-* window configurations: Window Configurations.
-* window excursions: Excursions.
-* window ordering, cyclic: Cyclic Window Ordering.
-* window point: Window Point.
-* window position <1>: Position of Window.
-* window position: Window Point.
-* window resizing: Resizing Windows.
-* window size: Size of Window.
-* window size, changing: Resizing Windows.
-* window splitting: Splitting Windows.
-* window system types: Window-System Types.
-* window top line: Window Start.
-* window-buffer: Buffers and Windows.
-* window-configuration-p: Window Configurations.
-* window-dedicated-p: Choosing Window.
-* window-displayed-text-pixel-height: Size of Window.
-* window-end: Window Start.
-* window-frame: Frames and Windows.
-* window-height: Size of Window.
-* window-highest-p: Position of Window.
-* window-hscroll: Horizontal Scrolling.
-* window-left-margin-pixel-width: Margin Primitives.
-* window-live-p: Deleting Windows.
-* window-lowest-p: Position of Window.
-* window-min-height: Resizing Windows.
-* window-min-width: Resizing Windows.
-* window-minibuffer-p: Minibuffer Misc.
-* window-pixel-edges: Position of Window.
-* window-pixel-height: Size of Window.
-* window-pixel-width: Size of Window.
-* window-point: Window Point.
-* window-right-margin-pixel-width: Margin Primitives.
-* window-setup-hook: Terminal-Specific.
-* window-size-change-functions: Resizing Windows.
-* window-start: Window Start.
-* window-system objects: Faces and Window-System Objects.
-* window-text-area-pixel-edges: Position of Window.
-* window-text-area-pixel-height: Size of Window.
-* window-text-area-pixel-width: Size of Window.
-* window-width: Size of Window.
-* windowp: Basic Windows.
-* windows, controlling precisely: Buffers and Windows.
-* with-current-buffer: Excursions.
-* with-output-to-temp-buffer: Temporary Displays.
-* with-selected-frame: Input Focus.
-* with-temp-file: Excursions.
-* 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.
-* write-file: Saving Buffers.
-* write-file-hooks: Saving Buffers.
-* write-region: Writing to Files.
-* write-region-annotate-functions: Saving Properties.
-* writing a documentation string: Documentation Basics.
-* wrong-number-of-arguments: Argument List.
-* wrong-type-argument: Type Predicates.
-* X: X-Windows.
-* X resource type: X Resource Type.
-* X window frame: Frames.
-* x-allow-sendevents: X Miscellaneous.
-* x-bitmap-file-path <1>: X Miscellaneous.
-* x-bitmap-file-path: Image Specifiers.
-* x-debug-events: X Miscellaneous.
-* x-debug-mode: X Miscellaneous.
-* x-disown-selection: X Selections.
-* x-display-visual-class: Server Data.
-* x-emacs-application-class: Resources.
-* x-find-larger-font: Font Instance Size.
-* x-find-smaller-font: Font Instance Size.
-* x-font-size: Font Instance Size.
-* x-get-cutbuffer: X Selections.
-* x-get-resource: Resources.
-* x-get-selection: X Selections.
-* x-grab-keyboard: Grabs.
-* x-grab-pointer: Grabs.
-* x-library-search-path: X Miscellaneous.
-* x-make-font-bold: Font Instance Characteristics.
-* x-make-font-bold-italic: Font Instance Characteristics.
-* x-make-font-italic: Font Instance Characteristics.
-* x-make-font-unbold: Font Instance Characteristics.
-* x-make-font-unitalic: Font Instance Characteristics.
-* x-own-selection: X Selections.
-* x-put-resource: Resources.
-* x-server-vendor: Server Data.
-* x-server-version: Server Data.
-* x-set-frame-icon-pixmap: Frame Titles.
-* x-store-cutbuffer: X Selections.
-* x-ungrab-keyboard: Grabs.
-* x-ungrab-pointer: Grabs.
-* x-valid-keysym-name-p: X Miscellaneous.
-* x-window-id: X Miscellaneous.
-* X-Windows: X-Windows.
-* XEmacs event standard notation: Describing Characters.
-* xpm-color-symbols: Image Specifiers.
-* y-or-n-p: Yes-or-No Queries.
-* y-or-n-p-maybe-dialog-box: Yes-or-No Queries.
-* yank: Yank Commands.
-* yank suppression: Changing Key Bindings.
-* yank-pop: Yank Commands.
-* yes-or-no questions: Yes-or-No Queries.
-* yes-or-no-p: Yes-or-No Queries.
-* yes-or-no-p-dialog-box: Yes-or-No Queries.
-* yes-or-no-p-maybe-dialog-box: Yes-or-No Queries.
-* zero-length extent: Extent Endpoints.
-* zerop: Predicates on Numbers.
-* zmacs-activate-region: The Region.
-* zmacs-activate-region-hook: The Region.
-* zmacs-deactivate-region: The Region.
-* zmacs-deactivate-region-hook: The Region.
-* zmacs-region-stays: The Region.
-* zmacs-regions: The Region.
-* zmacs-update-region: The Region.
-* zmacs-update-region-hook: The Region.
-* | in regexp: Syntax of Regexps.
+* CCL Syntax:: CCL program syntax in BNF notation.
+* CCL Statements:: Semantics of CCL statements.
+* CCL Expressions:: Operators and expressions in CCL.
+* Calling CCL:: Running CCL programs.
+* CCL Examples:: The encoding functions for Big5 and KOI-8.
+
+\1f
+File: lispref.info, Node: CCL Syntax, Next: CCL Statements, Up: CCL
+
+CCL Syntax
+----------
+
+ The full syntax of a CCL program in BNF notation:
+
+CCL_PROGRAM :=
+ (BUFFER_MAGNIFICATION
+ CCL_MAIN_BLOCK
+ [ CCL_EOF_BLOCK ])
+
+BUFFER_MAGNIFICATION := integer
+CCL_MAIN_BLOCK := CCL_BLOCK
+CCL_EOF_BLOCK := CCL_BLOCK
+
+CCL_BLOCK :=
+ STATEMENT | (STATEMENT [STATEMENT ...])
+STATEMENT :=
+ SET | IF | BRANCH | LOOP | REPEAT | BREAK | READ | WRITE
+ | CALL | END
+
+SET :=
+ (REG = EXPRESSION)
+ | (REG ASSIGNMENT_OPERATOR EXPRESSION)
+ | integer
+
+EXPRESSION := ARG | (EXPRESSION OPERATOR ARG)
+
+IF := (if EXPRESSION CCL_BLOCK [CCL_BLOCK])
+BRANCH := (branch EXPRESSION CCL_BLOCK [CCL_BLOCK ...])
+LOOP := (loop STATEMENT [STATEMENT ...])
+BREAK := (break)
+REPEAT :=
+ (repeat)
+ | (write-repeat [REG | integer | string])
+ | (write-read-repeat REG [integer | ARRAY])
+READ :=
+ (read REG ...)
+ | (read-if (REG OPERATOR ARG) CCL_BLOCK CCL_BLOCK)
+ | (read-branch REG CCL_BLOCK [CCL_BLOCK ...])
+WRITE :=
+ (write REG ...)
+ | (write EXPRESSION)
+ | (write integer) | (write string) | (write REG ARRAY)
+ | string
+CALL := (call ccl-program-name)
+END := (end)
+
+REG := r0 | r1 | r2 | r3 | r4 | r5 | r6 | r7
+ARG := REG | integer
+OPERATOR :=
+ + | - | * | / | % | & | '|' | ^ | << | >> | <8 | >8 | //
+ | < | > | == | <= | >= | != | de-sjis | en-sjis
+ASSIGNMENT_OPERATOR :=
+ += | -= | *= | /= | %= | &= | '|=' | ^= | <<= | >>=
+ARRAY := '[' integer ... ']'
+
+\1f
+File: lispref.info, Node: CCL Statements, Next: CCL Expressions, Prev: CCL Syntax, Up: CCL
+
+CCL Statements
+--------------
+
+ The Emacs Code Conversion Language provides the following statement
+types: "set", "if", "branch", "loop", "repeat", "break", "read",
+"write", "call", and "end".
+
+Set statement:
+==============
+
+ The "set" statement has three variants with the syntaxes `(REG =
+EXPRESSION)', `(REG ASSIGNMENT_OPERATOR EXPRESSION)', and `INTEGER'.
+The assignment operator variation of the "set" statement works the same
+way as the corresponding C expression statement does. The assignment
+operators are `+=', `-=', `*=', `/=', `%=', `&=', `|=', `^=', `<<=',
+and `>>=', and they have the same meanings as in C. A "naked integer"
+INTEGER is equivalent to a SET statement of the form `(r0 = INTEGER)'.
+
+I/O statements:
+===============
+
+ The "read" statement takes one or more registers as arguments. It
+reads one byte (a C char) from the input into each register in turn.
+
+ The "write" takes several forms. In the form `(write REG ...)' it
+takes one or more registers as arguments and writes each in turn to the
+output. The integer in a register (interpreted as an Emchar) is
+encoded to multibyte form (ie, Bufbytes) and written to the current
+output buffer. If it is less than 256, it is written as is. The forms
+`(write EXPRESSION)' and `(write INTEGER)' are treated analogously.
+The form `(write STRING)' writes the constant string to the output. A
+"naked string" `STRING' is equivalent to the statement `(write
+STRING)'. The form `(write REG ARRAY)' writes the REGth element of the
+ARRAY to the output.
+
+Conditional statements:
+=======================
+
+ The "if" statement takes an EXPRESSION, a CCL BLOCK, and an optional
+SECOND CCL BLOCK as arguments. If the EXPRESSION evaluates to
+non-zero, the first CCL BLOCK is executed. Otherwise, if there is a
+SECOND CCL BLOCK, it is executed.
+
+ The "read-if" variant of the "if" statement takes an EXPRESSION, a
+CCL BLOCK, and an optional SECOND CCL BLOCK as arguments. The
+EXPRESSION must have the form `(REG OPERATOR OPERAND)' (where OPERAND is
+a register or an integer). The `read-if' statement first reads from
+the input into the first register operand in the EXPRESSION, then
+conditionally executes a CCL block just as the `if' statement does.
+
+ The "branch" statement takes an EXPRESSION and one or more CCL
+blocks as arguments. The CCL blocks are treated as a zero-indexed
+array, and the `branch' statement uses the EXPRESSION as the index of
+the CCL block to execute. Null CCL blocks may be used as no-ops,
+continuing execution with the statement following the `branch'
+statement in the containing CCL block. Out-of-range values for the
+EXPRESSION are also treated as no-ops.
+
+ The "read-branch" variant of the "branch" statement takes an
+REGISTER, a CCL BLOCK, and an optional SECOND CCL BLOCK as arguments.
+The `read-branch' statement first reads from the input into the
+REGISTER, then conditionally executes a CCL block just as the `branch'
+statement does.
+
+Loop control statements:
+========================
+
+ The "loop" statement creates a block with an implied jump from the
+end of the block back to its head. The loop is exited on a `break'
+statement, and continued without executing the tail by a `repeat'
+statement.
+
+ The "break" statement, written `(break)', terminates the current
+loop and continues with the next statement in the current block.
+
+ The "repeat" statement has three variants, `repeat', `write-repeat',
+and `write-read-repeat'. Each continues the current loop from its
+head, possibly after performing I/O. `repeat' takes no arguments and
+does no I/O before jumping. `write-repeat' takes a single argument (a
+register, an integer, or a string), writes it to the output, then jumps.
+`write-read-repeat' takes one or two arguments. The first must be a
+register. The second may be an integer or an array; if absent, it is
+implicitly set to the first (register) argument. `write-read-repeat'
+writes its second argument to the output, then reads from the input
+into the register, and finally jumps. See the `write' and `read'
+statements for the semantics of the I/O operations for each type of
+argument.
+
+Other control statements:
+=========================
+
+ The "call" statement, written `(call CCL-PROGRAM-NAME)', executes a
+CCL program as a subroutine. It does not return a value to the caller,
+but can modify the register status.
+
+ The "end" statement, written `(end)', terminates the CCL program
+successfully, and returns to caller (which may be a CCL program). It
+does not alter the status of the registers.
+
+\1f
+File: lispref.info, Node: CCL Expressions, Next: Calling CCL, Prev: CCL Statements, Up: CCL
+
+CCL Expressions
+---------------
+
+ CCL, unlike Lisp, uses infix expressions. The simplest CCL
+expressions consist of a single OPERAND, either a register (one of `r0',
+..., `r0') or an integer. Complex expressions are lists of the form `(
+EXPRESSION OPERATOR OPERAND )'. Unlike C, assignments are not
+expressions.
+
+ In the following table, X is the target resister for a "set". In
+subexpressions, this is implicitly `r7'. This means that `>8', `//',
+`de-sjis', and `en-sjis' cannot be used freely in subexpressions, since
+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))
+
+ 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_ENCODE_SJIS and CCL_DECODE_SJIS treat their first and second bytes
+as the high and low bytes of a two-byte character code. (SJIS stands
+for Shift JIS, an encoding of Japanese characters used by Microsoft.
+CCL_ENCODE_SJIS is a complicated transformation of the Japanese
+standard JIS encoding to Shift JIS. CCL_DECODE_SJIS is its inverse.)
+It is somewhat odd to represent the SJIS operations in infix form.
+
+\1f
+File: lispref.info, Node: Calling CCL, Next: CCL Examples, Prev: CCL Expressions, Up: CCL
+
+Calling CCL
+-----------
+
+ CCL programs are called automatically during Emacs buffer I/O when
+the external representation has a coding system type of `shift-jis',
+`big5', or `ccl'. The program is specified by the coding system (*note
+Coding Systems::). You can also call CCL programs from other CCL
+programs, and from Lisp using these functions:
+
+ - 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
+ CCL I/O command. STATUS must be a vector of nine values,
+ specifying the initial value for the R0, R1 .. R7 registers and
+ for the instruction counter IC. A `nil' value for a register
+ initializer causes the register to be set to 0. A `nil' value for
+ the IC initializer causes execution to start at the beginning of
+ the program. When the program is done, STATUS is modified (by
+ side-effect) to contain the ending values for the corresponding
+ registers and IC.
+
+ - 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
+ the R0, R1 .. R7 registers and for the instruction counter IC. A
+ `nil' value for a register initializer causes the register to be
+ set to 0. A `nil' value for the IC initializer causes execution
+ to start at the beginning of the program. An optional fourth
+ argument CONTINUE, if non-nil, causes the IC to remain on the
+ unsatisfied read operation if the program terminates due to
+ exhaustion of the input buffer. Otherwise the IC is set to the end
+ of the program. When the program is done, STATUS is modified (by
+ side-effect) to contain the ending values for the corresponding
+ registers and IC. Returns the resulting string.
+
+ To call a CCL program from another CCL program, it must first be
+registered:
+
+ - 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.
+
+ Information about the processor time used by the CCL interpreter can
+be obtained using these functions:
+
+ - Function: ccl-elapsed-time
+ Returns the elapsed processor time of the CCL interpreter as cons
+ of user and system time, as floating point numbers measured in
+ seconds. If only one overall value can be determined, the return
+ value will be a cons of that value and 0.
+
+ - Function: ccl-reset-elapsed-time
+ Resets the CCL interpreter's internal elapsed time registers.
+
+\1f
+File: lispref.info, Node: CCL Examples, Prev: Calling CCL, Up: CCL
+
+CCL Examples
+------------
+
+ This section is not yet written.
+
+\1f
+File: lispref.info, Node: Category Tables, Prev: CCL, Up: MULE
+
+Category Tables
+===============
+
+ A category table is a type of char table used for keeping track of
+categories. Categories are used for classifying characters for use in
+regexps--you can refer to a category rather than having to use a
+complicated [] expression (and category lookups are significantly
+faster).
+
+ There are 95 different categories available, one for each printable
+character (including space) in the ASCII charset. Each category is
+designated by one such character, called a "category designator". They
+are specified in a regexp using the syntax `\cX', where X is a category
+designator. (This is not yet implemented.)
+
+ A category table specifies, for each character, the categories that
+the character is in. Note that a character can be in more than one
+category. More specifically, a category table maps from a character to
+either the value `nil' (meaning the character is in no categories) or a
+95-element bit vector, specifying for each of the 95 categories whether
+the character is in that category.
+
+ Special Lisp functions are provided that abstract this, so you do not
+have to directly manipulate bit vectors.
+
+ - Function: category-table-p obj
+ This function returns `t' if ARG is a category table.
+
+ - 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'.
+
+ - Function: standard-category-table
+ This function returns the standard category table. This is the
+ one used for new buffers.
+
+ - 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
+ 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
+ This function returns `t' if ARG is a category designator (a char
+ in the range `' '' to `'~'').
+
+ - 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.
+
+\1f
+File: lispref.info, Node: Tips, Next: Building XEmacs and Object Allocation, Prev: MULE, Up: Top
+
+Tips and Standards
+******************
+
+ This chapter describes no additional features of XEmacs Lisp.
+Instead it gives advice on making effective use of the features
+described in the previous chapters.
+
+* Menu:
+* Style Tips:: Writing clean and robust programs.
+* Compilation Tips:: Making compiled code run fast.
+* Documentation Tips:: Writing readable documentation strings.
+* Comment Tips:: Conventions for writing comments.
+* Library Headers:: Standard headers for library packages.
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Style Tips, Next: Compilation Tips, Up: Tips
+
+Writing Clean Lisp Programs
+===========================
+
+ Here are some tips for avoiding common errors in writing Lisp code
+intended for widespread use:
+
+ * Since all global variables share the same name space, and all
+ functions share another name space, you should choose a short word
+ to distinguish your program from other Lisp programs. Then take
+ care to begin the names of all global variables, constants, and
+ functions with the chosen prefix. This helps avoid name conflicts.
+
+ This recommendation applies even to names for traditional Lisp
+ primitives that are not primitives in XEmacs Lisp--even to `cadr'.
+ Believe it or not, there is more than one plausible way to define
+ `cadr'. Play it safe; append your name prefix to produce a name
+ like `foo-cadr' or `mylib-cadr' instead.
+
+ If you write a function that you think ought to be added to Emacs
+ under a certain name, such as `twiddle-files', don't call it by
+ that name in your program. Call it `mylib-twiddle-files' in your
+ program, and send mail to `bug-gnu-emacs@prep.ai.mit.edu'
+ suggesting we add it to Emacs. If and when we do, we can change
+ the name easily enough.
+
+ If one prefix is insufficient, your package may use two or three
+ alternative common prefixes, so long as they make sense.
+
+ Separate the prefix from the rest of the symbol name with a hyphen,
+ `-'. This will be consistent with XEmacs itself and with most
+ Emacs Lisp programs.
+
+ * It is often useful to put a call to `provide' in each separate
+ library program, at least if there is more than one entry point to
+ the program.
+
+ * If a file requires certain other library programs to be loaded
+ beforehand, then the comments at the beginning of the file should
+ say so. Also, use `require' to make sure they are loaded.
+
+ * If one file FOO uses a macro defined in another file BAR, FOO
+ should contain this expression before the first use of the macro:
+
+ (eval-when-compile (require 'BAR))
+
+ (And BAR should contain `(provide 'BAR)', to make the `require'
+ work.) This will cause BAR to be loaded when you byte-compile
+ FOO. Otherwise, you risk compiling FOO without the necessary
+ macro loaded, and that would produce compiled code that won't work
+ right. *Note Compiling Macros::.
+
+ Using `eval-when-compile' avoids loading BAR when the compiled
+ 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::.
+
+ * If the purpose of a function is to tell you whether a certain
+ condition is true or false, give the function a name that ends in
+ `p'. If the name is one word, add just `p'; if the name is
+ multiple words, add `-p'. Examples are `framep' and
+ `frame-live-p'.
+
+ * If a user option variable records a true-or-false condition, give
+ it a name that ends in `-flag'.
+
+ * Please do not define `C-c LETTER' as a key in your major modes.
+ These sequences are reserved for users; they are the *only*
+ sequences reserved for users, so we cannot do without them.
+
+ Instead, define sequences consisting of `C-c' followed by a
+ non-letter. These sequences are reserved for major modes.
+
+ Changing all the major modes in Emacs 18 so they would follow this
+ convention was a lot of work. Abandoning this convention would
+ make that work go to waste, and inconvenience users.
+
+ * Sequences consisting of `C-c' followed by `{', `}', `<', `>', `:'
+ or `;' are also reserved for major modes.
+
+ * Sequences consisting of `C-c' followed by any other punctuation
+ character are allocated for minor modes. Using them in a major
+ mode is not absolutely prohibited, but if you do that, the major
+ mode binding may be shadowed from time to time by minor modes.
+
+ * You should not bind `C-h' following any prefix character (including
+ `C-c'). If you don't bind `C-h', it is automatically available as
+ a help character for listing the subcommands of the prefix
+ character.
+
+ * You should not bind a key sequence ending in <ESC> except following
+ another <ESC>. (That is, it is ok to bind a sequence ending in
+ `<ESC> <ESC>'.)
+
+ The reason for this rule is that a non-prefix binding for <ESC> in
+ any context prevents recognition of escape sequences as function
+ keys in that context.
+
+ * Applications should not bind mouse events based on button 1 with
+ the shift key held down. These events include `S-mouse-1',
+ `M-S-mouse-1', `C-S-mouse-1', and so on. They are reserved for
+ users.
+
+ * Modes should redefine `mouse-2' as a command to follow some sort of
+ reference in the text of a buffer, if users usually would not want
+ to alter the text in that buffer by hand. Modes such as Dired,
+ Info, Compilation, and Occur redefine it in this way.
+
+ * 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
+ 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.
+
+ * It is a bad idea to define aliases for the Emacs primitives. Use
+ the standard names instead.
+
+ * Redefining an Emacs primitive is an even worse idea. It may do
+ the right thing for a particular program, but there is no telling
+ what other programs might break as a result.
+
+ * If a file does replace any of the functions or library programs of
+ standard XEmacs, prominent comments at the beginning of the file
+ should say which functions are replaced, and how the behavior of
+ the replacements differs from that of the originals.
+
+ * Please keep the names of your XEmacs Lisp source files to 13
+ characters or less. This way, if the files are compiled, the
+ compiled files' names will be 14 characters or less, which is
+ short enough to fit on all kinds of Unix systems.
+
+ * Don't use `next-line' or `previous-line' in programs; nearly
+ always, `forward-line' is more convenient as well as more
+ predictable and robust. *Note Text Lines::.
+
+ * Don't call functions that set the mark, unless setting the mark is
+ one of the intended features of your program. The mark is a
+ user-level feature, so it is incorrect to change the mark except
+ to supply a value for the user's benefit. *Note The Mark::.
+
+ In particular, don't use these functions:
+
+ * `beginning-of-buffer', `end-of-buffer'
+
+ * `replace-string', `replace-regexp'
+
+ If you just want to move point, or replace a certain string,
+ without any of the other features intended for interactive users,
+ you can replace these functions with one or two lines of simple
+ Lisp code.
+
+ * Use lists rather than vectors, except when there is a particular
+ reason to use a vector. Lisp has more facilities for manipulating
+ lists than for vectors, and working with lists is usually more
+ convenient.
+
+ Vectors are advantageous for tables that are substantial in size
+ and are accessed in random order (not searched front to back),
+ provided there is no need to insert or delete elements (only lists
+ allow that).
+
+ * The recommended way to print a message in the echo area is with
+ the `message' function, not `princ'. *Note The Echo Area::.
+
+ * When you encounter an error condition, call the function `error'
+ (or `signal'). The function `error' does not return. *Note
+ Signaling Errors::.
+
+ Do not use `message', `throw', `sleep-for', or `beep' to report
+ errors.
+
+ * An error message should start with a capital letter but should not
+ end with a period.
+
+ * Try to avoid using recursive edits. Instead, do what the Rmail `e'
+ command does: use a new local keymap that contains one command
+ defined to switch back to the old local keymap. Or do what the
+ `edit-options' command does: switch to another buffer and let the
+ user switch back at will. *Note Recursive Editing::.
+
+ * In some other systems there is a convention of choosing variable
+ names that begin and end with `*'. We don't use that convention
+ in Emacs Lisp, so please don't use it in your programs. (Emacs
+ uses such names only for program-generated buffers.) The users
+ will find Emacs more coherent if all libraries use the same
+ conventions.
+
+ * Indent each function with `C-M-q' (`indent-sexp') using the
+ default indentation parameters.
+
+ * Don't make a habit of putting close-parentheses on lines by
+ themselves; Lisp programmers find this disconcerting. Once in a
+ while, when there is a sequence of many consecutive
+ close-parentheses, it may make sense to split them in one or two
+ significant places.
+
+ * Please put a copyright notice on the file if you give copies to
+ anyone. Use the same lines that appear at the top of the Lisp
+ files in XEmacs itself. If you have not signed papers to assign
+ the copyright to the Foundation, then place your name in the
+ copyright notice in place of the Foundation's name.
+
+\1f
+File: lispref.info, Node: Compilation Tips, Next: Documentation Tips, Prev: Style Tips, Up: Tips
+
+Tips for Making Compiled Code Fast
+==================================
+
+ Here are ways of improving the execution speed of byte-compiled Lisp
+programs.
+
+ * Use the `profile' library to profile your program. See the file
+ `profile.el' for instructions.
+
+ * Use iteration rather than recursion whenever possible. Function
+ calls are slow in XEmacs Lisp even when a compiled function is
+ calling another compiled function.
+
+ * Using the primitive list-searching functions `memq', `member',
+ `assq', or `assoc' is even faster than explicit iteration. It may
+ be worth rearranging a data structure so that one of these
+ primitive search functions can be used.
+
+ * Certain built-in functions are handled specially in byte-compiled
+ code, avoiding the need for an ordinary function call. It is a
+ good idea to use these functions rather than alternatives. To see
+ whether a function is handled specially by the compiler, examine
+ its `byte-compile' property. If the property is non-`nil', then
+ 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::):
+
+ (get 'aref 'byte-compile)
+ => byte-compile-two-args
+
+ (get 'elt 'byte-compile)
+ => nil
+
+ * If calling a small function accounts for a substantial part of
+ your program's running time, make the function inline. This
+ eliminates the function call overhead. Since making a function
+ inline reduces the flexibility of changing the program, don't do
+ it unless it gives a noticeable speedup in something slow enough
+ that users care about the speed. *Note Inline Functions::.
+
+\1f
+File: lispref.info, Node: Documentation Tips, Next: Comment Tips, Prev: Compilation Tips, Up: Tips
+
+Tips for Documentation Strings
+==============================
+
+ Here are some tips for the writing of documentation strings.
+
+ * Every command, function, or variable intended for users to know
+ about should have a documentation string.
+
+ * An internal variable or subroutine of a Lisp program might as well
+ have a documentation string. In earlier Emacs versions, you could
+ save space by using a comment instead of a documentation string,
+ but that is no longer the case.
+
+ * The first line of the documentation string should consist of one
+ or two complete sentences that stand on their own as a summary.
+ `M-x apropos' displays just the first line, and if it doesn't
+ stand on its own, the result looks bad. In particular, start the
+ first line with a capital letter and end with a period.
+
+ The documentation string can have additional lines that expand on
+ the details of how to use the function or variable. The
+ additional lines should be made up of complete sentences also, but
+ they may be filled if that looks good.
+
+ * For consistency, phrase the verb in the first sentence of a
+ documentation string as an infinitive with "to" omitted. For
+ instance, use "Return the cons of A and B." in preference to
+ "Returns the cons of A and B." Usually it looks good to do
+ likewise for the rest of the first paragraph. Subsequent
+ paragraphs usually look better if they have proper subjects.
+
+ * Write documentation strings in the active voice, not the passive,
+ and in the present tense, not the future. For instance, use
+ "Return a list containing A and B." instead of "A list containing
+ A and B will be returned."
+
+ * Avoid using the word "cause" (or its equivalents) unnecessarily.
+ Instead of, "Cause Emacs to display text in boldface," write just
+ "Display text in boldface."
+
+ * Do not start or end a documentation string with whitespace.
+
+ * Format the documentation string so that it fits in an Emacs window
+ on an 80-column screen. It is a good idea for most lines to be no
+ wider than 60 characters. The first line can be wider if
+ necessary to fit the information that ought to be there.
+
+ However, rather than simply filling the entire documentation
+ string, you can make it much more readable by choosing line breaks
+ with care. Use blank lines between topics if the documentation
+ string is long.
+
+ * *Do not* indent subsequent lines of a documentation string so that
+ the text is lined up in the source code with the text of the first
+ line. This looks nice in the source code, but looks bizarre when
+ users view the documentation. Remember that the indentation
+ before the starting double-quote is not part of the string!
+
+ * A variable's documentation string should start with `*' if the
+ variable is one that users would often want to set interactively.
+ If the value is a long list, or a function, or if the variable
+ would be set only in init files, then don't start the
+ documentation string with `*'. *Note Defining Variables::.
+
+ * The documentation string for a variable that is a yes-or-no flag
+ should start with words such as "Non-nil means...", to make it
+ clear that all non-`nil' values are equivalent and indicate
+ explicitly what `nil' and non-`nil' mean.
+
+ * When a function's documentation string mentions the value of an
+ argument of the function, use the argument name in capital letters
+ as if it were a name for that value. Thus, the documentation
+ string of the function `/' refers to its second argument as
+ `DIVISOR', because the actual argument name is `divisor'.
+
+ Also use all caps for meta-syntactic variables, such as when you
+ show the decomposition of a list or vector into subunits, some of
+ which may vary.
+
+ * When a documentation string refers to a Lisp symbol, write it as it
+ would be printed (which usually means in lower case), with
+ single-quotes around it. For example: `lambda'. There are two
+ exceptions: write t and nil without single-quotes. (In this
+ manual, we normally do use single-quotes for those symbols.)
+
+ * Don't write key sequences directly in documentation strings.
+ Instead, use the `\\[...]' construct to stand for them. For
+ example, instead of writing `C-f', write `\\[forward-char]'. When
+ Emacs displays the documentation string, it substitutes whatever
+ key is currently bound to `forward-char'. (This is normally `C-f',
+ but it may be some other character if the user has moved key
+ bindings.) *Note Keys in Documentation::.
+
+ * In documentation strings for a major mode, you will want to refer
+ to the key bindings of that mode's local map, rather than global
+ ones. Therefore, use the construct `\\<...>' once in the
+ documentation string to specify which key map to use. Do this
+ before the first use of `\\[...]'. The text inside the `\\<...>'
+ should be the name of the variable containing the local keymap for
+ the major mode.
+
+ It is not practical to use `\\[...]' very many times, because
+ display of the documentation string will become slow. So use this
+ to describe the most important commands in your major mode, and
+ then use `\\{...}' to display the rest of the mode's keymap.
+
+\1f
+File: lispref.info, Node: Comment Tips, Next: Library Headers, Prev: Documentation Tips, Up: Tips
+
+Tips on Writing Comments
+========================
+
+ We recommend these conventions for where to put comments and how to
+indent them:
+
+`;'
+ Comments that start with a single semicolon, `;', should all be
+ aligned to the same column on the right of the source code. Such
+ comments usually explain how the code on the same line does its
+ job. In Lisp mode and related modes, the `M-;'
+ (`indent-for-comment') command automatically inserts such a `;' in
+ the right place, or aligns such a comment if it is already present.
+
+ This and following examples are taken from the Emacs sources.
+
+ (setq base-version-list ; there was a base
+ (assoc (substring fn 0 start-vn) ; version to which
+ file-version-assoc-list)) ; this looks like
+ ; a subversion
+
+`;;'
+ Comments that start with two semicolons, `;;', should be aligned to
+ the same level of indentation as the code. Such comments usually
+ describe the purpose of the following lines or the state of the
+ program at that point. For example:
+
+ (prog1 (setq auto-fill-function
+ ...
+ ...
+ ;; update modeline
+ (redraw-modeline)))
+
+ Every function that has no documentation string (because it is use
+ only internally within the package it belongs to), should have
+ instead a two-semicolon comment right before the function,
+ explaining what the function does and how to call it properly.
+ Explain precisely what each argument means and how the function
+ interprets its possible values.
+
+`;;;'
+ Comments that start with three semicolons, `;;;', should start at
+ the left margin. Such comments are used outside function
+ definitions to make general statements explaining the design
+ principles of the program. For example:
+
+ ;;; This Lisp code is run in XEmacs
+ ;;; when it is to operate as a server
+ ;;; for other processes.
+
+ Another use for triple-semicolon comments is for commenting out
+ lines within a function. We use triple-semicolons for this
+ precisely so that they remain at the left margin.
+
+ (defun foo (a)
+ ;;; This is no longer necessary.
+ ;;; (force-mode-line-update)
+ (message "Finished with %s" a))
+
+`;;;;'
+ Comments that start with four semicolons, `;;;;', should be aligned
+ to the left margin and are used for headings of major sections of a
+ program. For example:
+
+ ;;;; The kill ring
+
+The indentation commands of the Lisp modes in XEmacs, such as `M-;'
+(`indent-for-comment') and <TAB> (`lisp-indent-line') automatically
+indent comments according to these conventions, depending on the number
+of semicolons. *Note Manipulating Comments: (emacs)Comments.
+
+\1f
+File: lispref.info, Node: Library Headers, Prev: Comment Tips, Up: Tips
+
+Conventional Headers for XEmacs Libraries
+=========================================
+
+ XEmacs has conventions for using special comments in Lisp libraries
+to divide them into sections and give information such as who wrote
+them. This section explains these conventions. First, an example:
+
+ ;;; lisp-mnt.el --- minor mode for Emacs Lisp maintainers
+
+ ;; Copyright (C) 1992 Free Software Foundation, Inc.
+
+ ;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
+ ;; Maintainer: Eric S. Raymond <esr@snark.thyrsus.com>
+ ;; Created: 14 Jul 1992
+ ;; Version: 1.2
+ ;; Keywords: docs
+
+ ;; This file is part of XEmacs.
+ COPYING PERMISSIONS...
+
+ The very first line should have this format:
+
+ ;;; FILENAME --- DESCRIPTION
+
+The description should be complete in one line.
+
+ After the copyright notice come several "header comment" lines, each
+beginning with `;; HEADER-NAME:'. Here is a table of the conventional
+possibilities for HEADER-NAME:
+
+`Author'
+ This line states the name and net address of at least the principal
+ author of the library.
+
+ If there are multiple authors, you can list them on continuation
+ lines led by `;;' and a tab character, like this:
+
+ ;; Author: Ashwin Ram <Ram-Ashwin@cs.yale.edu>
+ ;; Dave Sill <de5@ornl.gov>
+ ;; Dave Brennan <brennan@hal.com>
+ ;; Eric Raymond <esr@snark.thyrsus.com>
+
+`Maintainer'
+ This line should contain a single name/address as in the Author
+ line, or an address only, or the string `FSF'. If there is no
+ maintainer line, the person(s) in the Author field are presumed to
+ be the maintainers. The example above is mildly bogus because the
+ maintainer line is redundant.
+
+ The idea behind the `Author' and `Maintainer' lines is to make
+ possible a Lisp function to "send mail to the maintainer" without
+ having to mine the name out by hand.
+
+ Be sure to surround the network address with `<...>' if you
+ include the person's full name as well as the network address.
+
+`Created'
+ This optional line gives the original creation date of the file.
+ For historical interest only.
+
+`Version'
+ If you wish to record version numbers for the individual Lisp
+ program, put them in this line.
+
+`Adapted-By'
+ In this header line, place the name of the person who adapted the
+ library for installation (to make it fit the style conventions, for
+ example).
+
+`Keywords'
+ This line lists keywords for the `finder-by-keyword' help command.
+ This field is important; it's how people will find your package
+ when they're looking for things by topic area. To separate the
+ keywords, you can use spaces, commas, or both.
+
+ Just about every Lisp library ought to have the `Author' and
+`Keywords' header comment lines. Use the others if they are
+appropriate. You can also put in header lines with other header
+names--they have no standard meanings, so they can't do any harm.
+
+ We use additional stylized comments to subdivide the contents of the
+library file. Here is a table of them:
+
+`;;; Commentary:'
+ This begins introductory comments that explain how the library
+ works. It should come right after the copying permissions.
+
+`;;; Change log:'
+ This begins change log information stored in the library file (if
+ you store the change history there). For most of the Lisp files
+ distributed with XEmacs, the change history is kept in the file
+ `ChangeLog' and not in the source file at all; these files do not
+ have a `;;; Change log:' line.
+
+`;;; Code:'
+ This begins the actual code of the program.
+
+`;;; FILENAME ends here'
+ This is the "footer line"; it appears at the very end of the file.
+ Its purpose is to enable people to detect truncated versions of
+ the file from the lack of a footer line.
+
+\1f
+File: lispref.info, Node: Building XEmacs and Object Allocation, Next: Standard Errors, Prev: Tips, Up: Top
+
+Building XEmacs; Allocation of Objects
+**************************************
+
+ This chapter describes how the runnable XEmacs executable is dumped
+with the preloaded Lisp libraries in it and how storage is allocated.
+
+ There is an entire separate document, the `XEmacs Internals Manual',
+devoted to the internals of XEmacs from the perspective of the C
+programmer. It contains much more detailed information about the build
+process, the allocation and garbage-collection process, and other
+aspects related to the internals of XEmacs.
+
+* Menu:
+
+* Building XEmacs:: How to preload Lisp libraries into XEmacs.
+* Pure Storage:: A kludge to make preloaded Lisp functions sharable.
+* Garbage Collection:: Reclaiming space for Lisp objects no longer used.
+
+\1f
+File: lispref.info, Node: Building XEmacs, Next: Pure Storage, Up: Building XEmacs and Object Allocation
+
+Building XEmacs
+===============
+
+ This section explains the steps involved in building the XEmacs
+executable. You don't have to know this material to build and install
+XEmacs, since the makefiles do all these things automatically. This
+information is pertinent to XEmacs maintenance.
+
+ The `XEmacs Internals Manual' contains more information about this.
+
+ Compilation of the C source files in the `src' directory produces an
+executable file called `temacs', also called a "bare impure XEmacs".
+It contains the XEmacs Lisp interpreter and I/O routines, but not the
+editing commands.
+
+ Before XEmacs is actually usable, a number of Lisp files need to be
+loaded. These define all the editing commands, plus most of the startup
+code and many very basic Lisp primitives. This is accomplished by
+loading the file `loadup.el', which in turn loads all of the other
+standardly-loaded Lisp files.
+
+ It takes a substantial time to load the standard Lisp files.
+Luckily, you don't have to do this each time you run XEmacs; `temacs'
+can dump out an executable program called `xemacs' that has these files
+preloaded. `xemacs' starts more quickly because it does not need to
+load the files. This is the XEmacs executable that is normally
+installed.
+
+ To create `xemacs', use the command `temacs -batch -l loadup dump'.
+The purpose of `-batch' here is to tell `temacs' to run in
+non-interactive, command-line mode. (`temacs' can _only_ run in this
+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
+`xemacs'.
+
+ The dumping process is highly system-specific, and some operating
+systems don't support dumping. On those systems, you must start XEmacs
+with the `temacs -batch -l loadup run-temacs' command each time you use
+it. This takes a substantial time, but since you need to start Emacs
+once a day at most--or once a week if you never log out--the extra time
+is not too severe a problem. (In older versions of Emacs, you started
+Emacs from `temacs' using `temacs -l loadup'.)
+
+ You are free to start XEmacs directly from `temacs' if you want,
+even if there is already a dumped `xemacs'. Normally you wouldn't want
+to do that; but the Makefiles do this when you rebuild XEmacs using
+`make all-elc', which builds XEmacs and simultaneously compiles any
+out-of-date Lisp files. (You need `xemacs' in order to compile Lisp
+files. However, you also need the compiled Lisp files in order to dump
+out `xemacs'. If both of these are missing or corrupted, you are out
+of luck unless you're able to bootstrap `xemacs' from `temacs'. Note
+that `make all-elc' actually loads the alternative loadup file
+`loadup-el.el', which works like `loadup.el' but disables the
+pure-copying process and forces XEmacs to ignore any compiled Lisp
+files even if they exist.)
+
+ You can specify additional files to preload by writing a library
+named `site-load.el' that loads them. You may need to increase the
+value of `PURESIZE', in `src/puresize.h', to make room for the
+additional files. You should _not_ modify this file directly, however;
+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
+additional files decreases as machines get faster. On modern machines,
+it is often not advisable, especially if the Lisp code is on a file
+system local to the machine running XEmacs.
+
+ You can specify other Lisp expressions to execute just before dumping
+by putting them in a library named `site-init.el'. However, if they
+might alter the behavior that users expect from an ordinary unmodified
+XEmacs, it is better to put them in `default.el', so that users can
+override them if they wish. *Note Start-up Summary::.
+
+ Before `loadup.el' dumps the new executable, it finds the
+documentation strings for primitive and preloaded functions (and
+variables) in the file where they are stored, by calling
+`Snarf-documentation' (*note Accessing Documentation::). These strings
+were moved out of the `xemacs' executable to make it smaller. *Note
+Documentation Basics::.
+
+ - 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').
+
+ If you use this function in an XEmacs that was already dumped, you
+ must set `command-line-processed' to `nil' first for good results.
+ *Note Command Line Arguments::.
+
+ - 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
+ reinitialize your XEmacs process and you'll be sorry.
+
+ - Command: emacs-version
+ This function returns a string describing the version of XEmacs
+ that is running. It is useful to include this string in bug
+ reports.
+
+ (emacs-version)
+ => "XEmacs 20.1 [Lucid] (i586-unknown-linux2.0.29)
+ of Mon Apr 7 1997 on altair.xemacs.org"
+
+ Called interactively, the function prints the same information in
+ the echo area.
+
+ - Variable: emacs-build-time
+ The value of this variable is the time at which XEmacs was built
+ at the local site.
+
+ emacs-build-time "Mon Apr 7 20:28:52 1997"
+ =>
+
+ - Variable: emacs-version
+ The value of this variable is the version of Emacs being run. It
+ is a string, e.g. `"20.1 XEmacs Lucid"'.
+
+ The following two variables did not exist before FSF GNU Emacs
+version 19.23 and XEmacs version 19.10, which reduces their usefulness
+at present, but we hope they will be convenient in the future.
+
+ - Variable: emacs-major-version
+ The major version number of Emacs, as an integer. For XEmacs
+ version 20.1, the value is 20.
+
+ - Variable: emacs-minor-version
+ The minor version number of Emacs, as an integer. For XEmacs
+ version 20.1, the value is 1.
+
+\1f
File: lispref.info, Node: Pure Storage, Next: Garbage Collection, Prev: Building XEmacs, Up: Building XEmacs and Object Allocation
Pure Storage
`"Arithmetic underflow error"'
*Note Math Functions::.
-\1f
-File: lispref.info, Node: Standard Buffer-Local Variables, Next: Standard Keymaps, Prev: Standard Errors, Up: Top
-
-Buffer-Local Variables
-**********************
-
- The table below lists the general-purpose Emacs variables that are
-automatically local (when set) in each buffer. Many Lisp packages
-define such variables for their internal use; we don't list them here.
-
-`abbrev-mode'
- *note Abbrevs::
-
-`auto-fill-function'
- *note Auto Filling::
-
-`buffer-auto-save-file-name'
- *note Auto-Saving::
-
-`buffer-backed-up'
- *note Backup Files::
-
-`buffer-display-table'
- *note Display Tables::
-
-`buffer-file-format'
- *note Format Conversion::
-
-`buffer-file-name'
- *note Buffer File Name::
-
-`buffer-file-number'
- *note Buffer File Name::
-
-`buffer-file-truename'
- *note Buffer File Name::
-
-`buffer-file-type'
- *note Files and MS-DOS::
-
-`buffer-invisibility-spec'
- *note Invisible Text::
-
-`buffer-offer-save'
- *note Saving Buffers::
-
-`buffer-read-only'
- *note Read Only Buffers::
-
-`buffer-saved-size'
- *note Point::
-
-`buffer-undo-list'
- *note Undo::
-
-`cache-long-line-scans'
- *note Text Lines::
-
-`case-fold-search'
- *note Searching and Case::
-
-`ctl-arrow'
- *note Usual Display::
-
-`comment-column'
- *note Comments: (emacs)Comments.
-
-`default-directory'
- *note System Environment::
-
-`defun-prompt-regexp'
- *note List Motion::
-
-`fill-column'
- *note Auto Filling::
-
-`goal-column'
- *note Moving Point: (emacs)Moving Point.
-
-`left-margin'
- *note Indentation::
-
-`local-abbrev-table'
- *note Abbrevs::
-
-`local-write-file-hooks'
- *note Saving Buffers::
-
-`major-mode'
- *note Mode Help::
-
-`mark-active'
- *note The Mark::
-
-`mark-ring'
- *note The Mark::
-
-`minor-modes'
- *note Minor Modes::
-
-`modeline-format'
- *note Modeline Data::
-
-`modeline-buffer-identification'
- *note Modeline Variables::
-
-`modeline-format'
- *note Modeline Data::
-
-`modeline-modified'
- *note Modeline Variables::
-
-`modeline-process'
- *note Modeline Variables::
-
-`mode-name'
- *note Modeline Variables::
-
-`overwrite-mode'
- *note Insertion::
-
-`paragraph-separate'
- *note Standard Regexps::
-
-`paragraph-start'
- *note Standard Regexps::
-
-`point-before-scroll'
- Used for communication between mouse commands and scroll-bar
- commands.
-
-`require-final-newline'
- *note Insertion::
-
-`selective-display'
- *note Selective Display::
-
-`selective-display-ellipses'
- *note Selective Display::
-
-`tab-width'
- *note Usual Display::
-
-`truncate-lines'
- *note Truncation::
-
-`vc-mode'
- *note Modeline Variables::
-
-\1f
-File: lispref.info, Node: Standard Keymaps, Next: Standard Hooks, Prev: Standard Buffer-Local Variables, Up: Top
-
-Standard Keymaps
-****************
-
- The following symbols are used as the names for various keymaps.
-Some of these exist when XEmacs is first started, others are loaded
-only when their respective mode is used. This is not an exhaustive
-list.
-
- Almost all of these maps are used as local maps. Indeed, of the
-modes that presently exist, only Vip mode and Terminal mode ever change
-the global keymap.
-
-`bookmark-map'
- A keymap containing bindings to bookmark functions.
-
-`Buffer-menu-mode-map'
- A keymap used by Buffer Menu mode.
-
-`c++-mode-map'
- A keymap used by C++ mode.
-
-`c-mode-map'
- A keymap used by C mode. A sparse keymap used by C mode.
-
-`command-history-map'
- A keymap used by Command History mode.
-
-`ctl-x-4-map'
- A keymap for subcommands of the prefix `C-x 4'.
-
-`ctl-x-5-map'
- A keymap for subcommands of the prefix `C-x 5'.
-
-`ctl-x-map'
- A keymap for `C-x' commands.
-
-`debugger-mode-map'
- A keymap used by Debugger mode.
-
-`dired-mode-map'
- A keymap for `dired-mode' buffers.
-
-`edit-abbrevs-map'
- A keymap used in `edit-abbrevs'.
-
-`edit-tab-stops-map'
- A keymap used in `edit-tab-stops'.
-
-`electric-buffer-menu-mode-map'
- A keymap used by Electric Buffer Menu mode.
-
-`electric-history-map'
- A keymap used by Electric Command History mode.
-
-`emacs-lisp-mode-map'
- A keymap used by Emacs Lisp mode.
-
-`help-map'
- A keymap for characters following the Help key.
-
-`Helper-help-map'
- A keymap used by the help utility package.
- It has the same keymap in its value cell and in its function cell.
-
-`Info-edit-map'
- A keymap used by the `e' command of Info.
-
-`Info-mode-map'
- A keymap containing Info commands.
-
-`isearch-mode-map'
- A keymap that defines the characters you can type within
- incremental search.
-
-`itimer-edit-map'
- A keymap used when in Itimer Edit mode.
-
-`lisp-interaction-mode-map'
- A keymap used by Lisp mode.
-
-`lisp-mode-map'
- A keymap used by Lisp mode.
-
- A keymap for minibuffer input with completion.
-
-`minibuffer-local-isearch-map'
- A keymap for editing isearch strings in the minibuffer.
-
-`minibuffer-local-map'
- Default keymap to use when reading from the minibuffer.
-
-`minibuffer-local-must-match-map'
- A keymap for minibuffer input with completion, for exact match.
-
-`mode-specific-map'
- The keymap for characters following `C-c'. Note, this is in the
- global map. This map is not actually mode specific: its name was
- chosen to be informative for the user in `C-h b'
- (`display-bindings'), where it describes the main use of the `C-c'
- prefix key.
-
-`modeline-map'
- The keymap consulted for mouse-clicks on the modeline of a window.
-
-`objc-mode-map'
- A keymap used in Objective C mode as a local map.
-
-`occur-mode-map'
- A local keymap used by Occur mode.
-
-`overriding-local-map'
- A keymap that overrides all other local keymaps.
-
-`query-replace-map'
- A local keymap used for responses in `query-replace' and related
- commands; also for `y-or-n-p' and `map-y-or-n-p'. The functions
- that use this map do not support prefix keys; they look up one
- event at a time.
-
-`read-expression-map'
- The minibuffer keymap used for reading Lisp expressions.
-
-`read-shell-command-map'
- The minibuffer keymap used by shell-command and related commands.
-
-`shared-lisp-mode-map'
- A keymap for commands shared by all sorts of Lisp modes.
-
-`text-mode-map'
- A keymap used by Text mode.
-
-`toolbar-map'
- The keymap consulted for mouse-clicks over a toolbar.
-
-`view-mode-map'
- A keymap used by View mode.
-
-\1f
-File: lispref.info, Node: Standard Hooks, Next: Index, Prev: Standard Keymaps, Up: Top
-
-Standard Hooks
-**************
-
- The following is a list of hook variables that let you provide
-functions to be called from within Emacs on suitable occasions.
-
- Most of these variables have names ending with `-hook'. They are
-"normal hooks", run by means of `run-hooks'. The value of such a hook
-is a list of functions. The recommended way to put a new function on
-such a hook is to call `add-hook'. *Note Hooks::, for more information
-about using hooks.
-
- The variables whose names end in `-function' have single functions
-as their values. Usually there is a specific reason why the variable is
-not a normal hook, such as the need to pass arguments to the function.
-(In older Emacs versions, some of these variables had names ending in
-`-hook' even though they were not normal hooks.)
-
- The variables whose names end in `-hooks' or `-functions' have lists
-of functions as their values, but these functions are called in a
-special way (they are passed arguments, or else their values are used).
-
-`activate-menubar-hook'
-
-`activate-popup-menu-hook'
-
-`ad-definition-hooks'
-
-`adaptive-fill-function'
-
-`add-log-current-defun-function'
-
-`after-change-functions'
-
-`after-delete-annotation-hook'
-
-`after-init-hook'
-
-`after-insert-file-functions'
-
-`after-revert-hook'
-
-`after-save-hook'
-
-`after-set-visited-file-name-hooks'
-
-`after-write-file-hooks'
-
-`auto-fill-function'
-
-`auto-save-hook'
-
-`before-change-functions'
-
-`before-delete-annotation-hook'
-
-`before-init-hook'
-
-`before-revert-hook'
-
-`blink-paren-function'
-
-`buffers-menu-switch-to-buffer-function'
-
-`c++-mode-hook'
-
-`c-delete-function'
-
-`c-mode-common-hook'
-
-`c-mode-hook'
-
-`c-special-indent-hook'
-
-`calendar-load-hook'
-
-`change-major-mode-hook'
-
-`command-history-hook'
-
-`comment-indent-function'
-
-`compilation-buffer-name-function'
-
-`compilation-exit-message-function'
-
-`compilation-finish-function'
-
-`compilation-parse-errors-function'
-
-`compilation-mode-hook'
-
-`create-console-hook'
-
-`create-device-hook'
-
-`create-frame-hook'
-
-`dabbrev-friend-buffer-function'
-
-`dabbrev-select-buffers-function'
-
-`delete-console-hook'
-
-`delete-device-hook'
-
-`delete-frame-hook'
-
-`deselect-frame-hook'
-
-`diary-display-hook'
-
-`diary-hook'
-
-`dired-after-readin-hook'
-
-`dired-before-readin-hook'
-
-`dired-load-hook'
-
-`dired-mode-hook'
-
-`disabled-command-hook'
-
-`display-buffer-function'
-
-`ediff-after-setup-control-frame-hook'
-
-`ediff-after-setup-windows-hook'
-
-`ediff-before-setup-control-frame-hook'
-
-`ediff-before-setup-windows-hook'
-
-`ediff-brief-help-message-function'
-
-`ediff-cleanup-hook'
-
-`ediff-control-frame-position-function'
-
-`ediff-display-help-hook'
-
-`ediff-focus-on-regexp-matches-function'
-
-`ediff-forward-word-function'
-
-`ediff-hide-regexp-matches-function'
-
-`ediff-keymap-setup-hook'
-
-`ediff-load-hook'
-
-`ediff-long-help-message-function'
-
-`ediff-make-wide-display-function'
-
-`ediff-merge-split-window-function'
-
-`ediff-meta-action-function'
-
-`ediff-meta-redraw-function'
-
-`ediff-mode-hook'
-
-`ediff-prepare-buffer-hook'
-
-`ediff-quit-hook'
-
-`ediff-registry-setup-hook'
-
-`ediff-select-hook'
-
-`ediff-session-action-function'
-
-`ediff-session-group-setup-hook'
-
-`ediff-setup-diff-regions-function'
-
-`ediff-show-registry-hook'
-
-`ediff-show-session-group-hook'
-
-`ediff-skip-diff-region-function'
-
-`ediff-split-window-function'
-
-`ediff-startup-hook'
-
-`ediff-suspend-hook'
-
-`ediff-toggle-read-only-function'
-
-`ediff-unselect-hook'
-
-`ediff-window-setup-function'
-
-`edit-picture-hook'
-
-`electric-buffer-menu-mode-hook'
-
-`electric-command-history-hook'
-
-`electric-help-mode-hook'
-
-`emacs-lisp-mode-hook'
-
-`fill-paragraph-function'
-
-`find-file-hooks'
-
-`find-file-not-found-hooks'
-
-`first-change-hook'
-
-`font-lock-after-fontify-buffer-hook'
-
-`font-lock-beginning-of-syntax-function'
-
-`font-lock-mode-hook'
-
-`fume-found-function-hook'
-
-`fume-list-mode-hook'
-
-`fume-rescan-buffer-hook'
-
-`fume-sort-function'
-
-`gnus-startup-hook'
-
-`hack-local-variables-hook'
-
-`highlight-headers-follow-url-function'
-
-`hyper-apropos-mode-hook'
-
-`indent-line-function'
-
-`indent-mim-hook'
-
-`indent-region-function'
-
-`initial-calendar-window-hook'
-
-`isearch-mode-end-hook'
-
-`isearch-mode-hook'
-
-`java-mode-hook'
-
-`kill-buffer-hook'
-
-`kill-buffer-query-functions'
-
-`kill-emacs-hook'
-
-`kill-emacs-query-functions'
-
-`kill-hooks'
-
-`LaTeX-mode-hook'
-
-`latex-mode-hook'
-
-`ledit-mode-hook'
-
-`lisp-indent-function'
-
-`lisp-interaction-mode-hook'
-
-`lisp-mode-hook'
-
-`list-diary-entries-hook'
-
-`load-read-function'
-
-`log-message-filter-function'
-
-`m2-mode-hook'
-
-`mail-citation-hook'
-
-`mail-mode-hook'
-
-`mail-setup-hook'
-
-`make-annotation-hook'
-
-`makefile-mode-hook'
-
-`map-frame-hook'
-
-`mark-diary-entries-hook'
-
-`medit-mode-hook'
-
-`menu-no-selection-hook'
-
-`mh-compose-letter-hook'
-
-`mh-folder-mode-hook'
-
-`mh-letter-mode-hook'
-
-`mim-mode-hook'
-
-`minibuffer-exit-hook'
-
-`minibuffer-setup-hook'
-
-`mode-motion-hook'
-
-`mouse-enter-frame-hook'
-
-`mouse-leave-frame-hook'
-
-`mouse-track-cleanup-hook'
-
-`mouse-track-click-hook'
-
-`mouse-track-down-hook'
-
-`mouse-track-drag-hook'
-
-`mouse-track-drag-up-hook'
-
-`mouse-track-up-hook'
-
-`mouse-yank-function'
-
-`news-mode-hook'
-
-`news-reply-mode-hook'
-
-`news-setup-hook'
-
-`nongregorian-diary-listing-hook'
-
-`nongregorian-diary-marking-hook'
-
-`nroff-mode-hook'
-
-`objc-mode-hook'
-
-`outline-mode-hook'
-
-`perl-mode-hook'
-
-`plain-TeX-mode-hook'
-
-`post-command-hook'
-
-`post-gc-hook'
-
-`pre-abbrev-expand-hook'
-
-`pre-command-hook'
-
-`pre-display-buffer-function'
-
-`pre-gc-hook'
-
-`pre-idle-hook'
-
-`print-diary-entries-hook'
-
-`prolog-mode-hook'
-
-`protect-innocence-hook'
-
-`remove-message-hook'
-
-`revert-buffer-function'
-
-`revert-buffer-insert-contents-function'
-
-`rmail-edit-mode-hook'
-
-`rmail-mode-hook'
-
-`rmail-retry-setup-hook'
-
-`rmail-summary-mode-hook'
-
-`scheme-indent-hook'
-
-`scheme-mode-hook'
-
-`scribe-mode-hook'
-
-`select-frame-hook'
-
-`send-mail-function'
-
-`shell-mode-hook'
-
-`shell-set-directory-error-hook'
-
-`special-display-function'
-
-`suspend-hook'
-
-`suspend-resume-hook'
-
-`temp-buffer-show-function'
-
-`term-setup-hook'
-
-`terminal-mode-hook'
-
-`terminal-mode-break-hook'
-
-`TeX-mode-hook'
-
-`tex-mode-hook'
-
-`text-mode-hook'
-
-`today-visible-calendar-hook'
-
-`today-invisible-calendar-hook'
-
-`tooltalk-message-handler-hook'
-
-`tooltalk-pattern-handler-hook'
-
-`tooltalk-unprocessed-message-hook'
-
-`unmap-frame-hook'
-
-`vc-checkin-hook'
-
-`vc-checkout-writable-buffer-hook'
-
-`vc-log-after-operation-hook'
-
-`vc-make-buffer-writable-hook'
-
-`view-hook'
-
-`vm-arrived-message-hook'
-
-`vm-arrived-messages-hook'
-
-`vm-chop-full-name-function'
-
-`vm-display-buffer-hook'
-
-`vm-edit-message-hook'
-
-`vm-forward-message-hook'
-
-`vm-iconify-frame-hook'
-
-`vm-inhibit-write-file-hook'
-
-`vm-key-functions'
-
-`vm-mail-hook'
-
-`vm-mail-mode-hook'
-
-`vm-menu-setup-hook'
-
-`vm-mode-hook'
-
-`vm-quit-hook'
-
-`vm-rename-current-buffer-function'
-
-`vm-reply-hook'
-
-`vm-resend-bounced-message-hook'
-
-`vm-resend-message-hook'
-
-`vm-retrieved-spooled-mail-hook'
-
-`vm-select-message-hook'
-
-`vm-select-new-message-hook'
-
-`vm-select-unread-message-hook'
-
-`vm-send-digest-hook'
-
-`vm-summary-mode-hook'
-
-`vm-summary-pointer-update-hook'
-
-`vm-summary-redo-hook'
-
-`vm-summary-update-hook'
-
-`vm-undisplay-buffer-hook'
-
-`vm-visit-folder-hook'
-
-`window-setup-hook'
-
-`write-contents-hooks'
-
-`write-file-data-hooks'
-
-`write-file-hooks'
-
-`write-region-annotate-functions'
-
-`x-lost-selection-hooks'
-
-`x-sent-selection-hooks'
-
-`zmacs-activate-region-hook'
-
-`zmacs-deactivate-region-hook'
-
-`zmacs-update-region-hook'
Foundation instead of in the original English.
\1f
-File: lispref.info, Node: Index, Prev: Standard Hooks, Up: Top
-
-Index
-*****
-
-* Menu:
-
-* " in printing: Output Functions.
-* " in strings: String Type.
-* #$: Docs and Compilation.
-* #@COUNT: Docs and Compilation.
-* $ in display: Truncation.
-* $ in regexp: Syntax of Regexps.
-* %: Arithmetic Operations.
-* % in format: Formatting Strings.
-* & in replacement: Replacing Match.
-* &define (Edebug): Specification List.
-* ¬ (Edebug): Specification List.
-* &optional: Argument List.
-* &optional (Edebug): Specification List.
-* &or (Edebug): Specification List.
-* &rest: Argument List.
-* &rest (Edebug): Specification List.
-* ' for quoting: Quoting.
-* ( in regexp: Syntax of Regexps.
-* (...) in lists: Cons Cell Type.
-* ) in regexp: Syntax of Regexps.
-* *: Arithmetic Operations.
-* * in interactive: Using Interactive.
-* * in regexp: Syntax of Regexps.
-* *? in regexp: Syntax of Regexps.
-* *PQfn: Unimplemented libpq Functions.
-* *PQoidStatus: Unimplemented libpq Functions.
-* *PQsetdb: Unimplemented libpq Functions.
-* *PQsetdbLogin: Unimplemented libpq Functions.
-* *scratch*: Auto Major Mode.
-* +: Arithmetic Operations.
-* + in regexp: Syntax of Regexps.
-* +? in regexp: Syntax of Regexps.
-* , (with Backquote): Backquote.
-* ,@ (with Backquote): Backquote.
-* -: Arithmetic Operations.
-* . in lists: Dotted Pair Notation.
-* . in regexp: Syntax of Regexps.
-* .emacs: Init File.
-* .emacs customization: Major Mode Conventions.
-* /: Arithmetic Operations.
-* /=: Comparison of Numbers.
-* 1+: Arithmetic Operations.
-* 1-: Arithmetic Operations.
-* ; in comment: Comments.
-* <: Comparison of Numbers.
-* <=: Comparison of Numbers.
-* <ESC>: Functions for Key Lookup.
-* =: Comparison of Numbers.
-* >: Comparison of Numbers.
-* >=: Comparison of Numbers.
-* ? in character constant: Character Type.
-* ? in regexp: Syntax of Regexps.
-* @ in interactive: Using Interactive.
-* [ in regexp: Syntax of Regexps.
-* [...] (Edebug): Specification List.
-* \ in character constant: Character Type.
-* \ in display: Truncation.
-* \ in printing: Output Functions.
-* \ in regexp: Syntax of Regexps.
-* \ in replacement: Replacing Match.
-* \ in strings: String Type.
-* \ in symbols: Symbol Type.
-* \' in regexp: Syntax of Regexps.
-* \(?: in regexp: Syntax of Regexps.
-* \< in regexp: Syntax of Regexps.
-* \= in regexp: Syntax of Regexps.
-* \> in regexp: Syntax of Regexps.
-* \` in regexp: Syntax of Regexps.
-* \a: Character Type.
-* \b: Character Type.
-* \B in regexp: Syntax of Regexps.
-* \b in regexp: Syntax of Regexps.
-* \e: Character Type.
-* \f: Character Type.
-* \n: Character Type.
-* \n in print: Output Variables.
-* \N in replacement: Replacing Match.
-* \r: Character Type.
-* \S in regexp: Syntax of Regexps.
-* \s in regexp: Syntax of Regexps.
-* \t: Character Type.
-* \v: Character Type.
-* \W in regexp: Syntax of Regexps.
-* \w in regexp: Syntax of Regexps.
-* \{n,m\} in regexp: Syntax of Regexps.
-* ] in regexp: Syntax of Regexps.
-* ^ in regexp: Syntax of Regexps.
-* _ in interactive: Using Interactive.
-* `: Backquote.
-* ` (Edebug): Debugging Backquote.
-* ` (list substitution): Backquote.
-* abbrev: Abbrevs.
-* abbrev table: Abbrevs.
-* abbrev tables in modes: Major Mode Conventions.
-* abbrev-all-caps: Abbrev Expansion.
-* abbrev-expansion: Abbrev Expansion.
-* abbrev-file-name: Abbrev Files.
-* abbrev-mode: Abbrev Mode.
-* abbrev-prefix-mark: Abbrev Expansion.
-* abbrev-start-location: Abbrev Expansion.
-* abbrev-start-location-buffer: Abbrev Expansion.
-* abbrev-symbol: Abbrev Expansion.
-* abbrev-table-name-list: Abbrev Tables.
-* abbreviate-file-name: Directory Names.
-* abbrevs-changed: Abbrev Files.
-* abort-recursive-edit: Recursive Editing.
-* aborting: Recursive Editing.
-* abs: Arithmetic Operations.
-* absolute file name: Relative File Names.
-* accelerate-menu: Menu Accelerator Functions.
-* accept-process-output: Accepting Output.
-* accessibility of a file: Testing Accessibility.
-* accessible portion (of a buffer): Narrowing.
-* accessible-keymaps: Scanning Keymaps.
-* acos: Math Functions.
-* acosh: Math Functions.
-* activate-menubar-hook: Menubar.
-* activate-popup-menu-hook: Pop-Up Menus.
-* active display table: Active Display Table.
-* active keymap: Active Keymaps.
-* active-minibuffer-window: Minibuffer Misc.
-* add-abbrev: Defining Abbrevs.
-* add-hook: Hooks.
-* add-menu: Modifying Menus.
-* add-menu-button: Modifying Menus.
-* add-menu-item: Modifying Menus.
-* add-name-to-file: Changing File Attributes.
-* add-spec-list-to-specifier: Adding Specifications.
-* add-spec-to-specifier: Adding Specifications.
-* add-submenu: Modifying Menus.
-* add-text-properties: Changing Properties.
-* add-timeout: Timers.
-* add-to-list: Setting Variables.
-* add-tooltalk-message-arg: Elisp Interface for Sending Messages.
-* add-tooltalk-pattern-arg: Elisp Interface for Receiving Messages.
-* add-tooltalk-pattern-attribute: Elisp Interface for Receiving Messages.
-* address field of register: Cons Cell Type.
-* after-change-function: Change Hooks.
-* after-change-functions: Change Hooks.
-* after-find-file: Subroutines of Visiting.
-* after-init-hook: Init File.
-* after-insert-file-functions: Saving Properties.
-* after-load-alist: Hooks for Loading.
-* after-revert-hook: Reverting.
-* after-save-hook: Saving Buffers.
-* aliases, for variables: Variable Aliases.
-* alist: Association Lists.
-* alist-to-plist: Converting Plists To/From Alists.
-* all-annotations: Locating Annotations.
-* all-completions: Basic Completion.
-* and: Combining Conditions.
-* annotation: Annotations.
-* annotation hooks: Annotation Hooks.
-* annotation-action: Annotation Properties.
-* annotation-data: Annotation Properties.
-* annotation-down-glyph: Annotation Properties.
-* annotation-face: Annotation Properties.
-* annotation-glyph: Annotation Properties.
-* annotation-layout: Annotation Properties.
-* annotation-list: Locating Annotations.
-* annotation-menu: Annotation Properties.
-* annotation-side: Annotation Properties.
-* annotation-visible: Annotation Properties.
-* annotation-width: Annotation Properties.
-* annotationp: Annotation Primitives.
-* annotations-at: Locating Annotations.
-* annotations-in-region: Locating Annotations.
-* anonymous function: Anonymous Functions.
-* anonymous lambda expressions (Edebug): Instrumenting.
-* apostrophe for quoting: Quoting.
-* append: Building Lists.
-* append-to-file: Writing to Files.
-* apply: Calling Functions.
-* apply, and debugging: Internals of Debugger.
-* apropos: Help Functions.
-* aref: Array Functions.
-* argument binding: Argument List.
-* argument descriptors: Using Interactive.
-* argument evaluation form: Using Interactive.
-* argument prompt: Using Interactive.
-* arguments, reading: Minibuffers.
-* arith-error example: Handling Errors.
-* arith-error in division: Arithmetic Operations.
-* arithmetic shift: Bitwise Operations.
-* array: Arrays.
-* array elements: Array Functions.
-* arrayp: Array Functions.
-* ASCII character codes: Character Type.
-* aset: Array Functions.
-* ash: Bitwise Operations.
-* asin: Math Functions.
-* asinh: Math Functions.
-* ask-user-about-lock: File Locks.
-* ask-user-about-supersession-threat: Modification Time.
-* asking the user questions: Yes-or-No Queries.
-* assoc: Association Lists.
-* association list: Association Lists.
-* assq: Association Lists.
-* asynchronous subprocess: Asynchronous Processes.
-* atan: Math Functions.
-* atanh: Math Functions.
-* atom <1>: List-related Predicates.
-* atom: Cons Cell Type.
-* atomic extent: Atomic Extents.
-* atoms: List-related Predicates.
-* attributes of text: Text Properties.
-* Auto Fill mode: Auto Filling.
-* auto-fill-function: Auto Filling.
-* auto-lower-frame: Raising and Lowering.
-* auto-mode-alist: Auto Major Mode.
-* auto-raise-frame: Raising and Lowering.
-* auto-save-default: Auto-Saving.
-* auto-save-file-format: Format Conversion.
-* auto-save-file-name-p: Auto-Saving.
-* auto-save-hook: Auto-Saving.
-* auto-save-interval: Auto-Saving.
-* auto-save-list-file-name: Auto-Saving.
-* auto-save-mode: Auto-Saving.
-* auto-save-timeout: Auto-Saving.
-* auto-save-visited-file-name: Auto-Saving.
-* auto-saving: Auto-Saving.
-* autoload <1>: Domain Specification.
-* autoload: Autoload.
-* autoload errors: Autoload.
-* automatically buffer-local: Intro to Buffer-Local.
-* available fonts: Font Instance Names.
-* back-to-indentation: Motion by Indent.
-* background pixmap: Merging Faces.
-* backquote (Edebug): Debugging Backquote.
-* backquote (list substitution): Backquote.
-* backslash in character constant: Character Type.
-* backslash in strings: String Type.
-* backslash in symbols: Symbol Type.
-* backspace: Character Type.
-* backtrace: Internals of Debugger.
-* backtrace-debug: Internals of Debugger.
-* backtrace-frame: Internals of Debugger.
-* backtracking: Backtracking.
-* backup file: Backup Files.
-* backup files, how to make them: Rename or Copy.
-* backup-buffer: Making Backups.
-* backup-by-copying: Rename or Copy.
-* backup-by-copying-when-linked: Rename or Copy.
-* backup-by-copying-when-mismatch: Rename or Copy.
-* backup-enable-predicate: Making Backups.
-* backup-file-name-p: Backup Names.
-* backup-inhibited: Making Backups.
-* backward-char: Character Motion.
-* backward-delete-char-untabify: Deletion.
-* backward-list: List Motion.
-* backward-prefix-chars: Motion and Syntax.
-* backward-sexp: List Motion.
-* backward-to-indentation: Motion by Indent.
-* backward-word: Word Motion.
-* balancing parentheses: Blinking.
-* barf-if-buffer-read-only: Read Only Buffers.
-* base buffer: Indirect Buffers.
-* base64: Transformations.
-* base64-decode-region: Transformations.
-* base64-decode-string: Transformations.
-* base64-encode-region: Transformations.
-* base64-encode-string: Transformations.
-* batch mode: Batch Mode.
-* batch-byte-compile: Compilation Functions.
-* batch-byte-recompile-directory: Compilation Functions.
-* beep: Beeping.
-* beeping: Beeping.
-* before point, insertion: Insertion.
-* before-change-function: Change Hooks.
-* before-change-functions: Change Hooks.
-* before-init-hook: Init File.
-* before-revert-hook: Reverting.
-* beginning of line: Text Lines.
-* beginning of line in regexp: Syntax of Regexps.
-* beginning-of-buffer: Buffer End Motion.
-* beginning-of-defun: List Motion.
-* beginning-of-line: Text Lines.
-* bell: Beeping.
-* bell character: Character Type.
-* bell-volume: Beeping.
-* binary files and text files: Files and MS-DOS.
-* binary-process-input: MS-DOS Subprocesses.
-* binary-process-output: MS-DOS Subprocesses.
-* bind-text-domain: Level 3 Primitives.
-* binding arguments: Argument List.
-* binding local variables: Local Variables.
-* binding of a key: Keymap Terminology.
-* bit vector: Bit Vectors.
-* bit vector length: Sequence Functions.
-* bit-vector: Bit Vector Functions.
-* bit-vector-p: Bit Vector Functions.
-* bitp: Bit Vector Functions.
-* bitwise and: Bitwise Operations.
-* bitwise exclusive or: Bitwise Operations.
-* bitwise not: Bitwise Operations.
-* bitwise or: Bitwise Operations.
-* blink-matching-open: Blinking.
-* blink-matching-paren: Blinking.
-* blink-matching-paren-delay: Blinking.
-* blink-matching-paren-distance: Blinking.
-* blink-paren-function: Blinking.
-* blink-paren-hook: Blinking.
-* blinking: Blinking.
-* bobp: Near Point.
-* body of function: Lambda Components.
-* bold: Font Instance Characteristics.
-* bolp: Near Point.
-* bookmark-map: Standard Keymaps.
-* boolean: nil and t.
-* boolean-specifier-p: Specifier Types.
-* bootstrapping XEmacs from temacs: Building XEmacs.
-* bottom-gutter: Specifying a Gutter.
-* bottom-gutter-height: Other Gutter Variables.
-* bottom-gutter-visible-p: Other Gutter Variables.
-* bottom-toolbar: Specifying the Toolbar.
-* bottom-toolbar-height: Other Toolbar Variables.
-* bottom-toolbar-visible-p: Other Toolbar Variables.
-* boundp: Void Variables.
-* box diagrams, for lists: Cons Cell Type.
-* box representation for lists: Lists as Boxes.
-* break: Debugger.
-* breakpoints: Breakpoints.
-* bucket (in obarray): Creating Symbols.
-* buffer: Buffers.
-* buffer contents: Text.
-* buffer file name: Buffer File Name.
-* buffer input stream: Input Streams.
-* buffer list: The Buffer List.
-* buffer modification: Buffer Modification.
-* buffer names: Buffer Names.
-* buffer output stream: Output Streams.
-* buffer text notation: Buffer Text Notation.
-* buffer, read-only: Read Only Buffers.
-* buffer-auto-save-file-name: Auto-Saving.
-* buffer-backed-up: Making Backups.
-* buffer-base-buffer: Indirect Buffers.
-* buffer-disable-undo: Maintaining Undo.
-* buffer-enable-undo: Maintaining Undo.
-* buffer-end: Point.
-* buffer-file-format: Format Conversion.
-* buffer-file-name: Buffer File Name.
-* buffer-file-number: Buffer File Name.
-* buffer-file-truename: Buffer File Name.
-* buffer-file-type: Files and MS-DOS.
-* buffer-flush-undo: Maintaining Undo.
-* buffer-glyph-p: Glyph Types.
-* buffer-indirect-children: Indirect Buffers.
-* buffer-invisibility-spec: Invisible Text.
-* buffer-list: The Buffer List.
-* buffer-live-p: Killing Buffers.
-* buffer-local variables: Buffer-Local Variables.
-* buffer-local variables in modes: Major Mode Conventions.
-* buffer-local-variables: Creating Buffer-Local.
-* Buffer-menu-mode-map: Standard Keymaps.
-* buffer-modified-p: Buffer Modification.
-* buffer-modified-tick: Buffer Modification.
-* buffer-name: Buffer Names.
-* buffer-offer-save <1>: Killing Buffers.
-* buffer-offer-save: Saving Buffers.
-* buffer-read-only: Read Only Buffers.
-* buffer-saved-size <1>: Point.
-* buffer-saved-size: Auto-Saving.
-* buffer-size: Point.
-* buffer-string: Buffer Contents.
-* buffer-substring: Buffer Contents.
-* buffer-undo-list: Undo.
-* bufferp: Buffer Basics.
-* buffers menu: Buffers Menu.
-* buffers, controlled in windows: Buffers and Windows.
-* buffers, creating: Creating Buffers.
-* buffers, killing: Killing Buffers.
-* buffers-menu-filter: Menu Filters.
-* buffers-menu-max-size: Buffers Menu.
-* buffers-menu-switch-to-buffer-function: Buffers Menu.
-* building lists: Building Lists.
-* building XEmacs: Building XEmacs.
-* built-in function: What Is a Function.
-* bury-buffer: The Buffer List.
-* busy-pointer-glyph: Mouse Pointer.
-* button-event-p: Event Predicates.
-* button-press-event-p: Event Predicates.
-* button-release-event-p: Event Predicates.
-* bvconcat: Bit Vector Functions.
-* byte-code <1>: Compilation Functions.
-* byte-code: Byte Compilation.
-* byte-code function: Compiled-Function Objects.
-* byte-code interpreter: Compilation Functions.
-* byte-compile: Compilation Functions.
-* byte-compile-dynamic: Dynamic Loading.
-* byte-compile-dynamic-docstrings: Docs and Compilation.
-* byte-compile-file: Compilation Functions.
-* byte-compiling macros: Compiling Macros.
-* byte-compiling require: Named Features.
-* byte-recompile-directory: Compilation Functions.
-* byte-recompile-directory-ignore-errors-p: Compilation Functions.
-* bytes: Strings and Characters.
-* c++-mode-map: Standard Keymaps.
-* C-c: Prefix Keys.
-* C-g: Quitting.
-* C-h: Prefix Keys.
-* C-M-x: Instrumenting.
-* c-mode-abbrev-table: Standard Abbrev Tables.
-* c-mode-map: Standard Keymaps.
-* c-mode-syntax-table: Standard Syntax Tables.
-* C-q: Flow Control.
-* C-s: Flow Control.
-* C-x: Prefix Keys.
-* C-x 4: Prefix Keys.
-* C-x 5: Prefix Keys.
-* C-x a: Prefix Keys.
-* C-x n: Prefix Keys.
-* C-x r: Prefix Keys.
-* caaaar: List Elements.
-* caaadr: List Elements.
-* caaar: List Elements.
-* caadar: List Elements.
-* caaddr: List Elements.
-* caadr: List Elements.
-* caar: List Elements.
-* cadaar: List Elements.
-* cadadr: List Elements.
-* cadar: List Elements.
-* caddar: List Elements.
-* cadddr: List Elements.
-* caddr: List Elements.
-* cadr: List Elements.
-* call stack: Internals of Debugger.
-* call-interactively: Interactive Call.
-* call-process: Synchronous Processes.
-* call-process-region: Synchronous Processes.
-* calling a function: Calling Functions.
-* cancel-debug-on-entry: Function Debugging.
-* canonicalize-inst-list: Adding Specifications.
-* canonicalize-inst-pair: Adding Specifications.
-* canonicalize-lax-plist: Working With Lax Plists.
-* canonicalize-plist: Working With Normal Plists.
-* canonicalize-spec: Adding Specifications.
-* canonicalize-spec-list: Adding Specifications.
-* canonicalize-tag-set: Specifier Tag Functions.
-* capitalization: Character Case.
-* capitalize: Character Case.
-* capitalize-region: Case Changes.
-* capitalize-word: Case Changes.
-* car: List Elements.
-* car-safe: List Elements.
-* case changes: Case Changes.
-* case in replacements: Replacing Match.
-* case-fold-search: Searching and Case.
-* case-replace: Searching and Case.
-* case-table-p: Case Tables.
-* catch: Catch and Throw.
-* category-designator-p: Category Tables.
-* category-table: Category Tables.
-* category-table-p: Category Tables.
-* category-table-value-p: Category Tables.
-* CBREAK: Flow Control.
-* ccl-elapsed-time: Calling CCL.
-* ccl-execute: Calling CCL.
-* ccl-execute-on-string: Calling CCL.
-* ccl-reset-elapsed-time: Calling CCL.
-* cdaaar: List Elements.
-* cdaadr: List Elements.
-* cdaar: List Elements.
-* cdadar: List Elements.
-* cdaddr: List Elements.
-* cdadr: List Elements.
-* cdar: List Elements.
-* cddaar: List Elements.
-* cddadr: List Elements.
-* cddar: List Elements.
-* cdddar: List Elements.
-* cddddr: List Elements.
-* cdddr: List Elements.
-* cddr: List Elements.
-* CDE dt: CDE dt.
-* cdr: List Elements.
-* cdr-safe: List Elements.
-* ceiling: Numeric Conversions.
-* centering point: Vertical Scrolling.
-* cerror: Signaling Errors.
-* change hooks: Change Hooks.
-* change-major-mode-hook: Major Mode Conventions.
-* changing key bindings: Changing Key Bindings.
-* changing to another buffer: Current Buffer.
-* changing window size: Resizing Windows.
-* char table type: Char Table Type.
-* char-after: Near Point.
-* char-before: Near Point.
-* char-charset: MULE Characters.
-* char-equal: Text Comparison.
-* char-int: Character Codes.
-* char-int confoundance disease: Character Type.
-* char-int-p: Character Codes.
-* char-octet: MULE Characters.
-* char-or-char-int-p: Character Codes.
-* char-or-string-p: Predicates for Strings.
-* char-syntax: Syntax Table Functions.
-* char-table-p: Char Tables.
-* char-table-type: Char Table Types.
-* char-table-type-list: Char Table Types.
-* char-to-string: String Conversion.
-* char=: Text Comparison.
-* character arrays: Strings and Characters.
-* character case: Character Case.
-* character descriptor: Character Descriptors.
-* character insertion: Commands for Insertion.
-* character printing: Describing Characters.
-* character set (in regexp): Syntax of Regexps.
-* character to string: String Conversion.
-* character-to-event: Converting Events.
-* characteristics of font instances: Font Instance Characteristics.
-* 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.
-* charset-columns: Charset Property Functions.
-* charset-dimension: Charset Property Functions.
-* charset-direction: Charset Property Functions.
-* charset-doc-string: Charset Property Functions.
-* charset-final: Charset Property Functions.
-* charset-from-attributes: Basic Charset Functions.
-* charset-graphic: Charset Property Functions.
-* charset-list: Basic Charset Functions.
-* charset-name: Charset Property Functions.
-* charset-property: Charset Property Functions.
-* charset-registry: Charset Property Functions.
-* charset-reverse-direction-charset: Basic Charset Functions.
-* charsetp: Charsets.
-* check-argument-type: Signaling Errors.
-* check-gutter-button-syntax: Gutter Descriptor Format.
-* check-toolbar-button-syntax: Toolbar Descriptor Format.
-* check-valid-char-table-value: Working With Char Tables.
-* check-valid-inst-list: Specifier Validation Functions.
-* check-valid-instantiator: Specifier Validation Functions.
-* check-valid-plist: Property Lists.
-* 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--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.
-* cleanup forms: Cleanups.
-* clear-abbrev-table: Abbrev Tables.
-* clear-message: The Echo Area.
-* clear-range-table: Working With Range Tables.
-* clear-visited-file-modtime: Modification Time.
-* close parenthesis: Blinking.
-* 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.
-* coding standards: Tips.
-* coding system type: Coding System Type.
-* coding-category-list: Detection of Textual Encoding.
-* coding-category-system: Detection of Textual Encoding.
-* coding-priority-list: Detection of Textual Encoding.
-* coding-system-base: Basic Coding System Functions.
-* coding-system-doc-string: Coding System Property Functions.
-* coding-system-list: Basic Coding System Functions.
-* coding-system-name: Basic Coding System Functions.
-* coding-system-p: Coding Systems.
-* coding-system-property: Coding System Property Functions.
-* coding-system-type: Coding System Property Functions.
-* color instance type: Color Instance Type.
-* color instances: Color Instances.
-* color-instance-name: Color Instance Properties.
-* color-instance-p: Color Instances.
-* color-instance-rgb-components: Color Instance Properties.
-* color-name: Color Convenience Functions.
-* color-pixmap-image-instance-p: Image Instance Types.
-* color-rgb-components: Color Convenience Functions.
-* color-specifier-p <1>: Color Specifiers.
-* color-specifier-p: Specifier Types.
-* colorize-image-instance: Image Instance Functions.
-* colors: Colors.
-* columns: Columns.
-* command: What Is a Function.
-* command descriptions: A Sample Function Description.
-* command history: Command History.
-* command in keymap: Key Lookup.
-* command line arguments: Command Line Arguments.
-* command line options: Command Line Arguments.
-* command loop: Command Loop.
-* command loop, recursive: Recursive Editing.
-* command-debug-status: Internals of Debugger.
-* command-execute: Interactive Call.
-* command-history: Command History.
-* command-history-map: Standard Keymaps.
-* command-line: Command Line Arguments.
-* command-line-args: Command Line Arguments.
-* command-line-functions: Command Line Arguments.
-* command-line-processed: Command Line Arguments.
-* command-switch-alist: Command Line Arguments.
-* commandp: Interactive Call.
-* commandp example: High-Level Completion.
-* commands, defining: Defining Commands.
-* 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.
-* comparing buffer text: Comparing Text.
-* comparison of modification time: Modification Time.
-* compilation: Byte Compilation.
-* compilation functions: Compilation Functions.
-* compile-defun: Compilation Functions.
-* compiled function: Compiled-Function Objects.
-* compiled-function-arglist: Compiled-Function Objects.
-* compiled-function-constants: Compiled-Function Objects.
-* compiled-function-doc-string: Compiled-Function Objects.
-* compiled-function-domain: Compiled-Function Objects.
-* compiled-function-instructions: Compiled-Function Objects.
-* compiled-function-interactive: Compiled-Function Objects.
-* compiled-function-p: What Is a Function.
-* compiled-function-stack-size: Compiled-Function Objects.
-* complete key: Keymap Terminology.
-* completing-read: Minibuffer Completion.
-* completion: Completion.
-* completion, file name: File Name Completion.
-* completion, user name: User Name Completion.
-* completion-auto-help: Completion Commands.
-* completion-ignore-case: Basic Completion.
-* completion-ignored-extensions: File Name Completion.
-* complex arguments: Minibuffers.
-* complex command: Command History.
-* complex-buffers-menu-p: Buffers Menu.
-* compose-region: Composite Characters.
-* composite-char-string: Composite Characters.
-* concat: Creating Strings.
-* concatenating lists: Rearrangement.
-* concatenating strings: Creating Strings.
-* cond: Conditionals.
-* condition name: Error Symbols.
-* condition-case: Handling Errors.
-* conditional evaluation: Conditionals.
-* cons: Building Lists.
-* cons cell as box: Lists as Boxes.
-* cons cells: Building Lists.
-* consing: Building Lists.
-* console-device-list: Basic Console Functions.
-* console-disable-input: Console and Device I/O.
-* console-enable-input: Console and Device I/O.
-* console-list: Basic Console Functions.
-* console-live-p: Connecting to a Console or Device.
-* console-type-image-conversion-list: Image Instantiator Conversion.
-* consolep: Consoles and Devices.
-* consoles: Consoles and Devices.
-* consp: List-related Predicates.
-* continuation lines: Truncation.
-* continuation-glyph: Redisplay Glyphs.
-* continue-process: Signals to Processes.
-* control character printing: Describing Characters.
-* control characters: Character Type.
-* control characters in display: Usual Display.
-* control characters, reading: Quoted Character Input.
-* control structures: Control Structures.
-* control-arrow-glyph: Redisplay Glyphs.
-* Control-X-prefix: Prefix Keys.
-* conventions for writing minor modes: Minor Mode Conventions.
-* conversion of image instantiators: Image Instantiator Conversion.
-* conversion of strings: String Conversion.
-* copy-alist: Association Lists.
-* copy-category-table: Category Tables.
-* copy-coding-system: Basic Coding System Functions.
-* copy-event: Working With Events.
-* copy-extent: Detached Extents.
-* copy-face: Basic Face Functions.
-* copy-file: Changing File Attributes.
-* copy-hash-table: Introduction to Hash Tables.
-* copy-keymap: Creating Keymaps.
-* copy-marker: Creating Markers.
-* copy-range-table: Introduction to Range Tables.
-* copy-region-as-kill: Kill Functions.
-* copy-sequence: Sequence Functions.
-* copy-specifier: Other Specification Functions.
-* copy-syntax-table: Syntax Table Functions.
-* copying alists: Association Lists.
-* copying bit vectors: Bit Vector Functions.
-* copying files: Changing File Attributes.
-* copying lists: Building Lists.
-* copying sequences: Sequence Functions.
-* copying strings: Creating Strings.
-* copying vectors: Vector Functions.
-* cos: Math Functions.
-* cosh: Math Functions.
-* count-lines: Text Lines.
-* count-loop: A Sample Function Description.
-* counting columns: Columns.
-* coverage testing: Coverage Testing.
-* create-device-hook: Connecting to a Console or Device.
-* create-file-buffer: Subroutines of Visiting.
-* create-frame-hook: Frame Hooks.
-* create-tooltalk-message: Elisp Interface for Sending Messages.
-* create-tooltalk-pattern: Elisp Interface for Receiving Messages.
-* creating buffers: Creating Buffers.
-* creating keymaps: Creating Keymaps.
-* ctl-arrow: Usual Display.
-* 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.
-* current binding: Local Variables.
-* current buffer: Current Buffer.
-* current buffer excursion: Excursions.
-* current buffer mark: The Mark.
-* current buffer point and mark (Edebug): Edebug Display Update.
-* current buffer position: Point.
-* current command: Command Loop Info.
-* current stack frame: Using Debugger.
-* current-buffer: Current Buffer.
-* current-case-table: Case Tables.
-* current-column: Columns.
-* current-fill-column: Margins.
-* current-frame-configuration: Frame Configurations.
-* current-global-map: Active Keymaps.
-* current-indentation: Primitive Indent.
-* current-input-mode: Input Modes.
-* current-justification: Filling.
-* current-keymaps: Active Keymaps.
-* current-kill: Low-Level Kill Ring.
-* current-left-margin: Margins.
-* current-local-map: Active Keymaps.
-* current-menubar: Menubar.
-* current-message: The Echo Area.
-* current-minor-mode-maps: Active Keymaps.
-* current-mouse-event: Command Loop Info.
-* current-prefix-arg: Prefix Command Arguments.
-* current-time: Time of Day.
-* current-time-string: Time of Day.
-* current-time-zone: Time of Day.
-* current-window-configuration: Window Configurations.
-* cursor (mouse): Mouse Pointer.
-* cursor-in-echo-area: The Echo Area.
-* cust-print: Printing in Edebug.
-* cut buffer: X Selections.
-* cyclic ordering of windows: Cyclic Window Ordering.
-* data type: Lisp Data Types.
-* data-directory: Accessing Documentation.
-* database: Databases.
-* database type: Database Type.
-* database-file-name: Other Database Functions.
-* database-last-error: Other Database Functions.
-* database-live-p: Connecting to a Database.
-* database-subtype: Other Database Functions.
-* database-type: Other Database Functions.
-* databasep: Databases.
-* deallocate-event: Working With Events.
-* debug: Invoking the Debugger.
-* debug-allocation: Garbage Collection.
-* debug-allocation-backtrace: Garbage Collection.
-* debug-ignored-errors: Error Debugging.
-* debug-on-entry: Function Debugging.
-* debug-on-error: Error Debugging.
-* debug-on-error use: Processing of Errors.
-* debug-on-next-call: Internals of Debugger.
-* debug-on-quit: Infinite Loops.
-* debug-on-signal: Error Debugging.
-* debug-on-signal use: Handling Errors.
-* debugger <1>: Internals of Debugger.
-* debugger: Debugger.
-* debugger command list: Debugger Commands.
-* debugger-mode-map: Standard Keymaps.
-* debugging errors: Error Debugging.
-* debugging specific functions: Function Debugging.
-* decode-big5-char: Big5 and Shift-JIS Functions.
-* decode-coding-region: Encoding and Decoding Text.
-* decode-shift-jis-char: Big5 and Shift-JIS Functions.
-* decode-time: Time Conversion.
-* decoding file formats: Format Conversion.
-* decompose-region: Composite Characters.
-* decrement field of register: Cons Cell Type.
-* dedicated window: Choosing Window.
-* deep binding: Impl of Scope.
-* def-edebug-spec: Instrumenting Macro Calls.
-* defalias: Defining Functions.
-* default argument string: Interactive Codes.
-* default init file: Init File.
-* default value: Default Value.
-* default-abbrev-mode: Abbrev Mode.
-* default-boundp: Default Value.
-* default-buffer-file-type: Files and MS-DOS.
-* default-case-fold-search: Searching and Case.
-* default-ctl-arrow: Usual Display.
-* default-deselect-frame-hook: Raising and Lowering.
-* default-directory: File Name Expansion.
-* default-file-modes: Changing File Attributes.
-* default-fill-column: Margins.
-* default-frame-name: Frame Name.
-* default-frame-plist: Initial Properties.
-* default-gutter: Specifying a Gutter.
-* default-gutter-height: Other Gutter Variables.
-* default-gutter-position: Specifying a Gutter.
-* default-gutter-visible-p: Other Gutter Variables.
-* default-gutter-width: Other Gutter Variables.
-* default-justification: Filling.
-* default-major-mode: Auto Major Mode.
-* default-menubar: Menubar.
-* default-minibuffer-frame: Minibuffers and Frames.
-* default-modeline-format: Modeline Variables.
-* default-popup-menu: Pop-Up Menus.
-* default-select-frame-hook: Raising and Lowering.
-* default-text-properties: Examining Properties.
-* default-toolbar: Specifying the Toolbar.
-* default-toolbar-height: Other Toolbar Variables.
-* default-toolbar-position: Specifying the Toolbar.
-* default-toolbar-visible-p: Other Toolbar Variables.
-* default-toolbar-width: Other Toolbar Variables.
-* default-truncate-lines: Truncation.
-* default-value: Default Value.
-* default-x-device: Resources.
-* default.el: Start-up Summary.
-* defconst <1>: Domain Specification.
-* defconst: Defining Variables.
-* defcustom: Variable Definitions.
-* defgroup: Group Definitions.
-* define-abbrev: Defining Abbrevs.
-* define-abbrev-table: Abbrev Tables.
-* define-derived-mode: Derived Modes.
-* define-error: Error Symbols.
-* define-function: Defining Functions.
-* define-key: Changing Key Bindings.
-* define-logical-name: Changing File Attributes.
-* define-obsolete-function-alias: Obsoleteness.
-* define-obsolete-variable-alias: Obsoleteness.
-* define-prefix-command: Prefix Keys.
-* define-specifier-tag: Specifier Tag Functions.
-* defining a function: Defining Functions.
-* defining commands: Defining Commands.
-* defining-kbd-macro: Keyboard Macros.
-* definition of a symbol: Definitions.
-* defmacro: Defining Macros.
-* defsubst: Inline Functions.
-* defun: Defining Functions.
-* defun-prompt-regexp: List Motion.
-* defvar <1>: Domain Specification.
-* defvar: Defining Variables.
-* defvaralias: Variable Aliases.
-* deiconify-frame: Visibility of Frames.
-* delete: Sets And Lists.
-* delete previous char: Deletion.
-* delete-annotation: Annotation Primitives.
-* delete-auto-save-file-if-necessary: Auto-Saving.
-* delete-auto-save-files: Auto-Saving.
-* delete-backward-char: Deletion.
-* delete-blank-lines: User-Level Deletion.
-* delete-char: Deletion.
-* delete-device: Connecting to a Console or Device.
-* delete-device-hook: Connecting to a Console or Device.
-* delete-directory: Create/Delete Dirs.
-* delete-exited-processes: Deleting Processes.
-* delete-extent: Creating and Modifying Extents.
-* delete-file: Changing File Attributes.
-* delete-frame: Deleting Frames.
-* delete-frame-hook: Frame Hooks.
-* delete-horizontal-space: User-Level Deletion.
-* delete-indentation: User-Level Deletion.
-* delete-menu-item: Modifying Menus.
-* delete-old-versions: Numbered Backups.
-* delete-other-windows: Deleting Windows.
-* delete-process: Deleting Processes.
-* delete-region: Deletion.
-* delete-to-left-margin: Margins.
-* delete-window: Deleting Windows.
-* delete-windows-on: Deleting Windows.
-* deleting files: Changing File Attributes.
-* deleting processes: Deleting Processes.
-* deleting whitespace: User-Level Deletion.
-* deleting windows: Deleting Windows.
-* deletion of elements: Sets And Lists.
-* deletion of frames: Deleting Frames.
-* deletion vs killing: Deletion.
-* delq: Sets And Lists.
-* demibold: Font Instance Characteristics.
-* describe-bindings: Scanning Keymaps.
-* describe-bindings-internal: Scanning Keymaps.
-* describe-buffer-case-table: Case Tables.
-* describe-mode: Mode Help.
-* describe-prefix-bindings: Help Functions.
-* describe-tooltalk-message: Elisp Interface for Receiving Messages.
-* description for interactive codes: Interactive Codes.
-* description format: Format of Descriptions.
-* deselect-frame-hook: Frame Hooks.
-* destroy-tooltalk-message: Elisp Interface for Sending Messages.
-* destroy-tooltalk-pattern: Elisp Interface for Receiving Messages.
-* destructive-alist-to-plist: Converting Plists To/From Alists.
-* destructive-plist-to-alist: Converting Plists To/From Alists.
-* detach-extent: Detached Extents.
-* detached extent: Detached Extents.
-* detect-coding-region: Detection of Textual Encoding.
-* 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>: 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.
-* device-matching-specifier-tag-list: Specifier Tag Functions.
-* device-or-frame-p: Basic Device Functions.
-* device-or-frame-type: Console Types and Device Classes.
-* device-type: Console Types and Device Classes.
-* device-x-display: Connecting to a Console or Device.
-* devicep: Consoles and Devices.
-* devices: Consoles and Devices.
-* dgettext: Level 3 Primitives.
-* diagrams, boxed, for lists: Cons Cell Type.
-* dialog box: Dialog Boxes.
-* digit-argument: Prefix Command Arguments.
-* ding: Beeping.
-* directory name: Directory Names.
-* directory name abbreviation: Directory Names.
-* directory part (of file name): File Name Components.
-* directory-abbrev-alist: Directory Names.
-* directory-file-name: Directory Names.
-* directory-files: Contents of Directories.
-* directory-oriented functions: Contents of Directories.
-* dired-kept-versions: Numbered Backups.
-* dired-mode-map: Standard Keymaps.
-* disable undo: Maintaining Undo.
-* disable-command: Disabling Commands.
-* disable-menu-item: Modifying Menus.
-* disable-timeout: Timers.
-* disabled: Disabling Commands.
-* disabled command: Disabling Commands.
-* disabled-command-hook: Disabling Commands.
-* disassemble: Disassembly.
-* disassembled byte-code: Disassembly.
-* discard input: Peeking and Discarding.
-* discard-input: Peeking and Discarding.
-* dispatch-event: Dispatching an Event.
-* dispatching an event: Dispatching an Event.
-* display columns: Size and Position.
-* display lines: Size and Position.
-* display order: Extent Endpoints.
-* display table: Display Tables.
-* display update: Refresh Screen.
-* display-buffer: Choosing Window.
-* display-buffer-function: Choosing Window.
-* display-completion-list: Completion Commands.
-* display-error: Processing of Errors.
-* display-message: The Echo Area.
-* display-warning: Warnings.
-* display-warning-minimum-level: Warnings.
-* display-warning-suppressed-classes: Warnings.
-* displaying a buffer: Displaying Buffers.
-* do-auto-save: Auto-Saving.
-* DOC (documentation) file: Documentation Basics.
-* doc-directory: Accessing Documentation.
-* documentation: Accessing Documentation.
-* documentation conventions: Documentation Basics.
-* documentation for major mode: Mode Help.
-* documentation notation: Evaluation Notation.
-* documentation of function: Function Documentation.
-* documentation strings: Documentation.
-* documentation, keys in: Keys in Documentation.
-* documentation-property: Accessing Documentation.
-* domain: Level 3 Primitives.
-* domain (in a specifier): Specifiers In-Depth.
-* domain-of: Level 3 Primitives.
-* dotted lists (Edebug): Specification List.
-* dotted pair notation: Dotted Pair Notation.
-* double-quote in strings: String Type.
-* down-list: List Motion.
-* downcase: Character Case.
-* downcase-region: Case Changes.
-* downcase-word: Case Changes.
-* downcasing in lookup-key: Key Sequence Input.
-* drag: Drag Interface.
-* drag and drop: Drag and Drop.
-* Drag API: Drag Interface.
-* dribble file: Recording Input.
-* drop: Drop Interface.
-* Drop API: Drop Interface.
-* dump-emacs: Building XEmacs.
-* duplicable extent: Duplicable Extents.
-* dynamic loading of documentation: Docs and Compilation.
-* dynamic loading of functions: Dynamic Loading.
-* dynamic scoping: Variable Scoping.
-* echo area: The Echo Area.
-* echo-keystrokes <1>: The Echo Area.
-* echo-keystrokes: Command Loop Info.
-* 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>: 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>: 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>: 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-save-windows: Edebug Display Update.
-* edebug-set-global-break-condition: Global Break Condition.
-* edebug-setup-hook: Edebug Options.
-* edebug-test-coverage: Edebug Options.
-* edebug-trace <1>: Edebug Options.
-* edebug-trace: Tracing.
-* edebug-tracing: Tracing.
-* edebug-unwrap: Specification List.
-* 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.
-* edit-tab-stops-map: Standard Keymaps.
-* editing types: Editing Types.
-* editor command loop: Command Loop.
-* eighth: List Elements.
-* electric-buffer-menu-mode-map: Standard Keymaps.
-* electric-future-map: A Sample Variable Description.
-* electric-history-map: Standard Keymaps.
-* element (of list): Lists.
-* elements of sequences: Sequence Functions.
-* elt: Sequence Functions.
-* emacs-build-time: Building XEmacs.
-* emacs-lisp-mode-map: Standard Keymaps.
-* emacs-lisp-mode-syntax-table: Standard Syntax Tables.
-* emacs-major-version: Building XEmacs.
-* emacs-minor-version: Building XEmacs.
-* emacs-pid: System Environment.
-* emacs-version: Building XEmacs.
-* EMACSLOADPATH environment variable: How Programs Do Loading.
-* embedded breakpoints: Embedded Breakpoints.
-* empty list: Cons Cell Type.
-* enable-command: Disabling Commands.
-* enable-flow-control: Flow Control.
-* enable-flow-control-on: Flow Control.
-* enable-local-eval: Auto Major Mode.
-* enable-local-variables: Auto Major Mode.
-* enable-menu-item: Modifying Menus.
-* enable-recursive-minibuffers: Minibuffer Misc.
-* encode-big5-char: Big5 and Shift-JIS Functions.
-* encode-coding-region: Encoding and Decoding Text.
-* encode-shift-jis-char: Big5 and Shift-JIS Functions.
-* encode-time: Time Conversion.
-* encoding file formats: Format Conversion.
-* end of buffer marker: Creating Markers.
-* end-of-buffer: Buffer End Motion.
-* end-of-defun: List Motion.
-* end-of-file: Input Functions.
-* end-of-line: Text Lines.
-* enlarge-window: Resizing Windows.
-* enlarge-window-horizontally: Resizing Windows.
-* enlarge-window-pixels: Resizing Windows.
-* enqueue-eval-event: Reading One Event.
-* environment: Intro Eval.
-* environment variable access: System Environment.
-* environment variables, subprocesses: Subprocess Creation.
-* eobp: Near Point.
-* eolp: Near Point.
-* eq: Equality Predicates.
-* equal: Equality Predicates.
-* equality: Equality Predicates.
-* erase-buffer: Deletion.
-* error: Signaling Errors.
-* error cleanup: Cleanups.
-* error debugging: Error Debugging.
-* error display: The Echo Area.
-* error handler: Handling Errors.
-* error in debug: Invoking the Debugger.
-* error message notation: Error Messages.
-* error name: Error Symbols.
-* error symbol: Error Symbols.
-* error-conditions: Error Symbols.
-* error-message-string: Processing of Errors.
-* errors: Errors.
-* esc-map: Prefix Keys.
-* ESC-prefix: Prefix Keys.
-* escape <1>: Syntax Class Table.
-* escape: Character Type.
-* escape characters: Output Variables.
-* escape characters in printing: Output Functions.
-* escape sequence: Character Type.
-* eval: Eval.
-* eval, and debugging: Internals of Debugger.
-* eval-and-compile: Eval During Compile.
-* eval-buffer: Eval.
-* eval-current-buffer (Edebug): Instrumenting.
-* eval-defun (Edebug): Instrumenting.
-* eval-event-p: Event Predicates.
-* eval-expression (Edebug): Instrumenting.
-* eval-minibuffer: Object from Minibuffer.
-* eval-region: Eval.
-* eval-region (Edebug): Instrumenting.
-* eval-when-compile: Eval During Compile.
-* evaluated expression argument: Interactive Codes.
-* evaluation: Evaluation.
-* evaluation error: Local Variables.
-* evaluation list (Edebug): Eval List.
-* evaluation notation: Evaluation Notation.
-* evaluation of buffer contents: Eval.
-* event printing: Describing Characters.
-* event-buffer: Window-Level Event Position Info.
-* event-button: Accessing Other Event Info.
-* event-closest-point: Event Text Position Info.
-* event-device: Accessing Other Event Info.
-* event-frame: Frame-Level Event Position Info.
-* event-function: Accessing Other Event Info.
-* event-glyph-extent: Event Glyph Position Info.
-* event-glyph-x-pixel: Event Glyph Position Info.
-* event-glyph-y-pixel: Event Glyph Position Info.
-* event-key: Accessing Other Event Info.
-* event-live-p: Event Predicates.
-* event-matches-key-specifier-p: Key Sequences.
-* event-modifier-bits: Accessing Other Event Info.
-* event-modifiers: Accessing Other Event Info.
-* event-object: Accessing Other Event Info.
-* event-over-border-p: Other Event Position Info.
-* event-over-glyph-p: Event Glyph Position Info.
-* event-over-modeline-p: Event Text Position Info.
-* event-over-text-area-p: Event Text Position Info.
-* event-over-toolbar-p: Event Toolbar Position Info.
-* event-point: Event Text Position Info.
-* event-process: Accessing Other Event Info.
-* event-timestamp: Accessing Other Event Info.
-* event-to-character: Converting Events.
-* event-toolbar-button: Event Toolbar Position Info.
-* event-type: Event Contents.
-* event-window: Window-Level Event Position Info.
-* event-window-x-pixel: Window-Level Event Position Info.
-* event-window-y-pixel: Window-Level Event Position Info.
-* event-x: Event Text Position Info.
-* event-x-pixel: Frame-Level Event Position Info.
-* event-y: Event Text Position Info.
-* event-y-pixel: Frame-Level Event Position Info.
-* eventp: Events.
-* events: Events.
-* events-to-keys: Converting Events.
-* examining windows: Buffers and Windows.
-* examples of using interactive: Interactive Examples.
-* exchange-point-and-mark: The Mark.
-* excursion: Excursions.
-* exec-directory: Subprocess Creation.
-* exec-path: Subprocess Creation.
-* execute program: Subprocess Creation.
-* execute with prefix argument: Interactive Call.
-* execute-extended-command: Interactive Call.
-* execute-kbd-macro: Keyboard Macros.
-* executing-macro: Keyboard Macros.
-* execution speed: Compilation Tips.
-* exit: Recursive Editing.
-* exit recursive editing: Recursive Editing.
-* exit-minibuffer: Minibuffer Misc.
-* exit-recursive-edit: Recursive Editing.
-* exiting XEmacs: Getting Out.
-* exp: Math Functions.
-* expand-abbrev: Abbrev Expansion.
-* expand-file-name: File Name Expansion.
-* expansion of file names: File Name Expansion.
-* expansion of macros: Expansion.
-* expression: Intro Eval.
-* expression prefix: Syntax Class Table.
-* expt: Math Functions.
-* extended-command-history: Minibuffer History.
-* extent <1>: Extents.
-* extent: Variable Scoping.
-* extent children: Extent Parents.
-* extent end position: Extent Endpoints.
-* extent endpoint: Extent Endpoints.
-* extent order: Extent Endpoints.
-* extent parent: Extent Parents.
-* extent priority: Intro to Extents.
-* extent property: Extent Properties.
-* extent replica: Duplicable Extents.
-* extent start position: Extent Endpoints.
-* extent, duplicable: Duplicable Extents.
-* extent, unique: Duplicable Extents.
-* extent-at: Finding Extents.
-* extent-begin-glyph: Extent Properties.
-* extent-begin-glyph-layout: Extent Properties.
-* extent-children: Extent Parents.
-* extent-descendants: Extent Parents.
-* extent-detached-p: Detached Extents.
-* extent-end-glyph: Extent Properties.
-* extent-end-glyph-layout: Extent Properties.
-* extent-end-position: Extent Endpoints.
-* extent-face: Extent Properties.
-* extent-in-region-p: Mapping Over Extents.
-* extent-keymap: Extent Properties.
-* extent-length: Extent Endpoints.
-* extent-list: Finding Extents.
-* extent-live-p: Creating and Modifying Extents.
-* extent-mouse-face: Extent Properties.
-* extent-object: Creating and Modifying Extents.
-* extent-parent: Extent Parents.
-* extent-priority: Extent Properties.
-* extent-properties: Extent Properties.
-* extent-property: Extent Properties.
-* extent-start-position: Extent Endpoints.
-* extentp: Extents.
-* extents, locating: Finding Extents.
-* extents, mapping: Mapping Over Extents.
-* face type: Face Type.
-* face-background: Face Convenience Functions.
-* face-background-instance: Face Convenience Functions.
-* face-background-pixmap: Face Convenience Functions.
-* face-background-pixmap-instance: Face Convenience Functions.
-* face-boolean-specifier-p: Specifier Types.
-* face-differs-from-default-p: Other Face Display Functions.
-* face-equal: Other Face Display Functions.
-* face-font: Face Convenience Functions.
-* face-font-instance: Face Convenience Functions.
-* face-font-name: Face Convenience Functions.
-* face-foreground: Face Convenience Functions.
-* face-foreground-instance: Face Convenience Functions.
-* face-list: Basic Face Functions.
-* face-property: Face Properties.
-* face-property-instance: Face Properties.
-* face-underline-p: Face Convenience Functions.
-* facep: Basic Face Functions.
-* faces: Faces and Window-System Objects.
-* fallback (in a specifier): Specifier Instancing.
-* false: nil and t.
-* fboundp: Function Cells.
-* fceiling: Rounding Operations.
-* featurep: Named Features.
-* features: Named Features.
-* fetch-bytecode: Dynamic Loading.
-* ffloor: Rounding Operations.
-* field width: Formatting Strings.
-* fifth: List Elements.
-* file accessibility: Testing Accessibility.
-* file age: Testing Accessibility.
-* file attributes: File Attributes.
-* file format conversion: Format Conversion.
-* file hard link: Changing File Attributes.
-* file locks: File Locks.
-* file mode specification error: Auto Major Mode.
-* file modes and MS-DOS: Changing File Attributes.
-* file modification time: Testing Accessibility.
-* file name completion subroutines: File Name Completion.
-* file name of buffer: Buffer File Name.
-* file name of directory: Directory Names.
-* file names: File Names.
-* file names in directory: Contents of Directories.
-* file open error: Subroutines of Visiting.
-* file symbolic links: Kinds of Files.
-* file types on MS-DOS: Files and MS-DOS.
-* file with multiple names: Changing File Attributes.
-* file-accessible-directory-p: Testing Accessibility.
-* file-already-exists: Changing File Attributes.
-* file-attributes: File Attributes.
-* file-directory-p: Kinds of Files.
-* file-error: How Programs Do Loading.
-* file-executable-p: Testing Accessibility.
-* file-exists-p: Testing Accessibility.
-* file-local-copy: Magic File Names.
-* file-locked: File Locks.
-* file-locked-p: File Locks.
-* file-menu-filter: Menu Filters.
-* file-modes: File Attributes.
-* file-name-absolute-p: Relative File Names.
-* file-name-all-completions: File Name Completion.
-* file-name-as-directory: Directory Names.
-* file-name-buffer-file-type-alist: Files and MS-DOS.
-* file-name-completion: File Name Completion.
-* file-name-directory: File Name Components.
-* file-name-history: Minibuffer History.
-* file-name-nondirectory: File Name Components.
-* file-name-sans-extension: File Name Components.
-* file-name-sans-versions: File Name Components.
-* file-newer-than-file-p: Testing Accessibility.
-* file-newest-backup: Backup Names.
-* file-nlinks: File Attributes.
-* file-ownership-preserved-p: Testing Accessibility.
-* file-precious-flag: Saving Buffers.
-* file-readable-p: Testing Accessibility.
-* file-regular-p: Kinds of Files.
-* file-relative-name: File Name Expansion.
-* file-supersession: Modification Time.
-* file-symlink-p: Kinds of Files.
-* file-truename: Truenames.
-* file-writable-p: Testing Accessibility.
-* fill-column: Margins.
-* fill-individual-paragraphs: Filling.
-* fill-individual-varying-indent: Filling.
-* fill-paragraph: Filling.
-* fill-paragraph-function: Filling.
-* fill-prefix: Margins.
-* fill-region: Filling.
-* fill-region-as-paragraph: Filling.
-* fillarray: Array Functions.
-* filling a paragraph: Filling.
-* filling, automatic: Auto Filling.
-* filling, explicit: Filling.
-* filter function: Filter Functions.
-* find-backup-file-name: Backup Names.
-* find-buffer-file-type: Files and MS-DOS.
-* find-charset: Basic Charset Functions.
-* find-charset-region: MULE Characters.
-* find-charset-string: MULE Characters.
-* find-coding-system: Basic Coding System Functions.
-* find-file: Visiting Functions.
-* find-file-binary: Files and MS-DOS.
-* find-file-hooks: Visiting Functions.
-* find-file-name-handler: Magic File Names.
-* find-file-noselect: Visiting Functions.
-* find-file-not-found-hooks: Visiting Functions.
-* find-file-other-window: Visiting Functions.
-* find-file-read-only: Visiting Functions.
-* find-file-text: Files and MS-DOS.
-* find-menu-item: Modifying Menus.
-* finding files: Visiting Files.
-* finding windows: Selecting Windows.
-* first: List Elements.
-* first-change-hook: Change Hooks.
-* fixup-whitespace: User-Level Deletion.
-* float: Numeric Conversions.
-* float-output-format: Output Variables.
-* floating-point numbers, printing: Output Variables.
-* floatp: Predicates on Numbers.
-* floor: Numeric Conversions.
-* flow control characters: Flow Control.
-* flush input: Peeking and Discarding.
-* fmakunbound: Function Cells.
-* focus-frame: Input Focus.
-* following-char: Near Point.
-* font instance characteristics: Font Instance Characteristics.
-* font instance name: Font Instance Names.
-* font instance size: Font Instance Size.
-* font instance type: Font Instance Type.
-* font-instance-name: Font Instance Names.
-* font-instance-p: Font Instances.
-* font-instance-properties: Font Instance Characteristics.
-* font-instance-truename: Font Instance Names.
-* font-name: Font Convenience Functions.
-* font-properties: Font Convenience Functions.
-* font-specifier-p <1>: Font Specifiers.
-* font-specifier-p: Specifier Types.
-* font-truename: Font Convenience Functions.
-* fonts <1>: Fonts.
-* fonts: Some Terms.
-* fonts available: Font Instance Names.
-* foo: A Sample Function Description.
-* for: Argument Evaluation.
-* force-cursor-redisplay: Refresh Screen.
-* force-highlight-extent: Extents and Events.
-* forcing redisplay: Waiting.
-* format: Formatting Strings.
-* format definition: Format Conversion.
-* format of keymaps: Format of Keymaps.
-* format of menus: Menu Format.
-* format of the menubar: Menubar Format.
-* format precision: Formatting Strings.
-* format specification: Formatting Strings.
-* format-alist: Format Conversion.
-* format-buffers-menu-line: Buffers Menu.
-* format-find-file: Format Conversion.
-* format-insert-file: Format Conversion.
-* format-time-string: Time Conversion.
-* format-write-file: Format Conversion.
-* formatting strings: Formatting Strings.
-* formfeed: Character Type.
-* forms: Intro Eval.
-* forward-char: Character Motion.
-* forward-comment: Parsing Expressions.
-* forward-line: Text Lines.
-* forward-list: List Motion.
-* forward-sexp: List Motion.
-* forward-to-indentation: Motion by Indent.
-* forward-word: Word Motion.
-* fourth: List Elements.
-* frame: Frames.
-* frame configuration: Frame Configurations.
-* frame hooks: Frame Hooks.
-* frame name: Frame Name.
-* frame of terminal: Basic Windows.
-* frame position: Size and Position.
-* frame size: Size and Position.
-* frame visibility: Visibility of Frames.
-* frame-device: Basic Device Functions.
-* frame-height: Size and Position.
-* frame-icon-title-format: Frame Titles.
-* frame-iconified-p: Visibility of Frames.
-* frame-list: Finding All Frames.
-* frame-live-p: Deleting Frames.
-* frame-name: Frame Name.
-* frame-pixel-height: Size and Position.
-* frame-pixel-width: Size and Position.
-* frame-properties: Property Access.
-* frame-property: Property Access.
-* frame-root-window: Frames and Windows.
-* frame-selected-window: Frames and Windows.
-* frame-title-format: Frame Titles.
-* frame-top-window: Frames and Windows.
-* frame-totally-visible-p: Visibility of Frames.
-* frame-visible-p: Visibility of Frames.
-* frame-width: Size and Position.
-* framep: Frames.
-* free list: Garbage Collection.
-* frequency counts: Coverage Testing.
-* fround: Rounding Operations.
-* fset: Function Cells.
-* ftp-login: Cleanups.
-* ftruncate: Rounding Operations.
-* funcall: Calling Functions.
-* funcall, and debugging: Internals of Debugger.
-* function <1>: Anonymous Functions.
-* function: What Is a Function.
-* function call: Function Forms.
-* function call debugging: Function Debugging.
-* function cell: Symbol Components.
-* function cell in autoload: Autoload.
-* function definition: Function Names.
-* function descriptions: A Sample Function Description.
-* function form evaluation: Function Forms.
-* function input stream: Input Streams.
-* function invocation: Calling Functions.
-* function name: Function Names.
-* function output stream: Output Streams.
-* function quoting: Anonymous Functions.
-* function-interactive: Using Interactive.
-* function-key-map: Translating Input.
-* function-obsoleteness-doc: Obsoleteness.
-* functionals: Calling Functions.
-* functions in modes: Major Mode Conventions.
-* functions, making them interactive: Defining Commands.
-* Fundamental mode: Major Modes.
-* fundamental-mode: Auto Major Mode.
-* fundamental-mode-abbrev-table: Standard Abbrev Tables.
-* garbage collector: Garbage Collection.
-* garbage-collect: Garbage Collection.
-* gc-cons-threshold: Garbage Collection.
-* gc-message: 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.
-* get: Object Plists.
-* get-buffer: Buffer Names.
-* get-buffer-create: Creating Buffers.
-* get-buffer-process: Process Buffers.
-* get-buffer-window: Buffers and Windows.
-* get-char-property: Examining Properties.
-* get-char-table: Working With Char Tables.
-* get-charset: Basic Charset Functions.
-* get-coding-system: Basic Coding System Functions.
-* get-database: Working With a Database.
-* get-file-buffer: Buffer File Name.
-* get-largest-window: Selecting Windows.
-* get-lru-window: Selecting Windows.
-* get-process: Process Information.
-* get-range-char-table: Working With Char Tables.
-* get-range-table: Working With Range Tables.
-* get-register: Registers.
-* get-text-property: Examining Properties.
-* get-tooltalk-message-attribute: Elisp Interface for Sending Messages.
-* getenv: System Environment.
-* getf: Other Plists.
-* gethash: Working With Hash Tables.
-* gettext: Level 3 Primitives.
-* global binding: Local Variables.
-* global break condition: Global Break Condition.
-* global keymap: Active Keymaps.
-* global mark ring: The Mark.
-* global variable: Global Variables.
-* global-abbrev-table: Standard Abbrev Tables.
-* global-key-binding: Functions for Key Lookup.
-* global-map: Active Keymaps.
-* global-mark-ring: The Mark.
-* global-mode-string: Modeline Variables.
-* global-popup-menu: Pop-Up Menus.
-* global-set-key: Key Binding Commands.
-* global-unset-key: Key Binding Commands.
-* glyph type: Glyph Type.
-* glyph-ascent: Glyph Dimensions.
-* glyph-baseline: Glyph Convenience Functions.
-* glyph-baseline-instance: Glyph Convenience Functions.
-* glyph-contrib-p: Glyph Convenience Functions.
-* glyph-contrib-p-instance: Glyph Convenience Functions.
-* glyph-descent: Glyph Dimensions.
-* glyph-face: Glyph Convenience Functions.
-* glyph-height: Glyph Dimensions.
-* glyph-image: Glyph Convenience Functions.
-* glyph-image-instance: Glyph Convenience Functions.
-* glyph-property: Glyph Properties.
-* glyph-property-instance: Glyph Properties.
-* glyph-type: Glyph Types.
-* glyph-type-list: Glyph Types.
-* glyph-width: Glyph Dimensions.
-* glyphp: Glyphs.
-* glyphs: Glyphs.
-* goto-char: Character Motion.
-* goto-line: Text Lines.
-* gutter: Gutter.
-* gutter-buttons-captioned-p: Other Gutter Variables.
-* gutter-make-button-list: Gutter Descriptor Format.
-* gutter-specifier-p: Specifying a Gutter.
-* hack-local-variables: Auto Major Mode.
-* handling errors: Handling Errors.
-* hash notation: Printed Representation.
-* hash table: Hash Tables.
-* hash table type: Hash Table Type.
-* hash table, weak: Weak Hash Tables.
-* hash-table-count: Introduction to Hash Tables.
-* hash-table-p: Hash Tables.
-* hash-table-rehash-size: Introduction to Hash Tables.
-* hash-table-rehash-threshold: Introduction to Hash Tables.
-* hash-table-size: Introduction to Hash Tables.
-* hash-table-test: Introduction to Hash Tables.
-* hash-table-weakness: Introduction to Hash Tables.
-* hashing: Creating Symbols.
-* header comments: Library Headers.
-* help for major mode: Mode Help.
-* help-char: Help Functions.
-* help-command: Help Functions.
-* help-form: Help Functions.
-* help-map <1>: Standard Keymaps.
-* help-map: Help Functions.
-* Helper-describe-bindings: Help Functions.
-* Helper-help: Help Functions.
-* Helper-help-map: Standard Keymaps.
-* hide-annotation: Annotation Properties.
-* highlight-extent: Extents and Events.
-* history list: Minibuffer History.
-* history of commands: Command History.
-* HOME environment variable: Subprocess Creation.
-* hooks: Hooks.
-* hooks for loading: Hooks for Loading.
-* hooks for text changes: Change Hooks.
-* horizontal position: Columns.
-* horizontal scrolling: Horizontal Scrolling.
-* hscroll-glyph: Redisplay Glyphs.
-* icon-glyph-p: Glyph Types.
-* iconified frame: Visibility of Frames.
-* iconify-frame: Visibility of Frames.
-* identity: Calling Functions.
-* IEEE floating point: Float Basics.
-* if: Conditionals.
-* ignore: Calling Functions.
-* ignored-local-variables: Auto Major Mode.
-* image instance type: Image Instance Type.
-* image instance types: Image Instance Types.
-* image instances: Image Instances.
-* image instantiator conversion: Image Instantiator Conversion.
-* image specifiers: Image Specifiers.
-* image-instance-background: Image Instance Functions.
-* image-instance-depth: Image Instance Functions.
-* image-instance-file-name: Image Instance Functions.
-* image-instance-foreground: Image Instance Functions.
-* image-instance-height: Image Instance Functions.
-* image-instance-hotspot-x: Image Instance Functions.
-* image-instance-hotspot-y: Image Instance Functions.
-* image-instance-mask-file-name: Image Instance Functions.
-* image-instance-name: Image Instance Functions.
-* image-instance-p: Image Instances.
-* image-instance-string: Image Instance Functions.
-* image-instance-type: Image Instance Types.
-* image-instance-type-list: Image Instance Types.
-* image-instance-width: Image Instance Functions.
-* image-instantiator-format-list: 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.
-* indent-code-rigidly: Region Indent.
-* indent-for-tab-command: Mode-Specific Indent.
-* indent-line-function: Mode-Specific Indent.
-* indent-region: Region Indent.
-* indent-region-function: Region Indent.
-* indent-relative: Relative Indent.
-* indent-relative-maybe: Relative Indent.
-* indent-rigidly: Region Indent.
-* indent-tabs-mode: Primitive Indent.
-* indent-to: Primitive Indent.
-* indent-to-left-margin: Margins.
-* indentation: Indentation.
-* indenting with parentheses: Parsing Expressions.
-* indirect buffers: Indirect Buffers.
-* indirect specifications: Specification List.
-* indirect variables: Variable Aliases.
-* indirect-function: Function Indirection.
-* indirect-variable: Variable Aliases.
-* indirection: Function Indirection.
-* infinite loops: Infinite Loops.
-* infinite recursion: Local Variables.
-* infinity: Float Basics.
-* Info-edit-map: Standard Keymaps.
-* Info-minibuffer-history: Minibuffer History.
-* Info-mode-map: Standard Keymaps.
-* inherit: Syntax Class Table.
-* inheriting a keymap's bindings: Inheritance and Keymaps.
-* inhibit-default-init: Init File.
-* inhibit-file-name-handlers: Magic File Names.
-* inhibit-file-name-operation: Magic File Names.
-* inhibit-quit: Quitting.
-* inhibit-read-only: Read Only Buffers.
-* inhibit-startup-echo-area-message: Start-up Summary.
-* inhibit-startup-message: Start-up Summary.
-* init file: Init File.
-* initial-frame-plist: Initial Properties.
-* initial-gutter-spec: Other Gutter Variables.
-* initial-major-mode: Auto Major Mode.
-* initial-toolbar-spec: Other Toolbar Variables.
-* initialization: Start-up Summary.
-* inline functions: Inline Functions.
-* innermost containing parentheses: Parsing Expressions.
-* input events: Events.
-* input focus: Input Focus.
-* input modes: Input Modes.
-* input stream: Input Streams.
-* input-pending-p: Peeking and Discarding.
-* insert: Insertion.
-* insert-abbrev-table-description: Abbrev Tables.
-* insert-before-markers: Insertion.
-* insert-buffer: Commands for Insertion.
-* insert-buffer-substring: Insertion.
-* insert-char: Insertion.
-* insert-default-directory: Reading File Names.
-* insert-directory: Contents of Directories.
-* insert-directory-program: Contents of Directories.
-* insert-extent: Detached Extents.
-* insert-file-contents: Reading from Files.
-* insert-register: Registers.
-* insert-string: Insertion.
-* inserting killed text: Yank Commands.
-* insertion before point: Insertion.
-* insertion of text: Insertion.
-* inside comment: Parsing Expressions.
-* inside margin: Annotation Basics.
-* inside string: Parsing Expressions.
-* inst-list (in a specifier): Specifiers In-Depth.
-* inst-pair (in a specifier): Specifiers In-Depth.
-* installation-directory: System Environment.
-* instance (in a specifier): Specifiers In-Depth.
-* instancing (in a specifier): Specifiers In-Depth.
-* instantiator (in a specifier): Specifiers In-Depth.
-* int-char: Character Codes.
-* int-to-string: String Conversion.
-* integer to decimal: String Conversion.
-* integer to hexadecimal: Formatting Strings.
-* integer to octal: Formatting Strings.
-* integer to string: String Conversion.
-* integer-char-or-marker-p: Predicates on Markers.
-* integer-or-char-p: Predicates for Characters.
-* integer-or-marker-p: Predicates on Markers.
-* integer-specifier-p: Specifier Types.
-* integerp: Predicates on Numbers.
-* integers: Numbers.
-* interactive: Using Interactive.
-* interactive call: Interactive Call.
-* interactive code description: Interactive Codes.
-* interactive commands (Edebug): Instrumenting.
-* interactive completion: Interactive Codes.
-* interactive function: Defining Commands.
-* interactive, examples of using: Interactive Examples.
-* interactive-p: Interactive Call.
-* intern: Creating Symbols.
-* intern-soft: Creating Symbols.
-* internal-doc-file-name: Accessing Documentation.
-* interning: Creating Symbols.
-* interpreter: Evaluation.
-* interpreter-mode-alist: Auto Major Mode.
-* interprogram-cut-function: Low-Level Kill Ring.
-* interprogram-paste-function: Low-Level Kill Ring.
-* interrupt-process: Signals to Processes.
-* invalid function: Function Indirection.
-* invalid prefix key error: Changing Key Bindings.
-* invalid-function: Function Indirection.
-* invalid-read-syntax: Printed Representation.
-* invalid-regexp: Syntax of Regexps.
-* invert-face: Other Face Display Functions.
-* invisible frame: Visibility of Frames.
-* invisible text: Invisible Text.
-* invisible-text-glyph: Redisplay Glyphs.
-* invocation-directory: System Environment.
-* invocation-name: System Environment.
-* isearch-mode-map: Standard Keymaps.
-* ISO Latin 1: Case Tables.
-* ISO Latin-1 characters (input): Translating Input.
-* iso-syntax: Case Tables.
-* iso-transl: Translating Input.
-* italic: Font Instance Characteristics.
-* iteration: Iteration.
-* itimer-edit-map: Standard Keymaps.
-* joining lists: Rearrangement.
-* just-one-space: User-Level Deletion.
-* justify-current-line: Filling.
-* kept-new-versions: Numbered Backups.
-* kept-old-versions: Numbered Backups.
-* key: Keymap Terminology.
-* key binding: Keymap Terminology.
-* key lookup: Key Lookup.
-* key sequence: Key Sequence Input.
-* key sequence error: Changing Key Bindings.
-* key sequence input: Key Sequence Input.
-* key sequences: Key Sequences.
-* key translation function: Translating Input.
-* key-binding: Functions for Key Lookup.
-* key-description: Describing Characters.
-* key-press-event-p: Event Predicates.
-* key-translation-map: Translating Input.
-* keyboard macro execution: Interactive Call.
-* keyboard macro termination: Beeping.
-* keyboard macros: Keyboard Macros.
-* keyboard macros (Edebug): Edebug Execution Modes.
-* keyboard menu accelerators: Menu Accelerators.
-* keyboard-quit: Quitting.
-* keymap: Keymaps.
-* keymap entry: Key Lookup.
-* keymap format: Format of Keymaps.
-* keymap in keymap: Key Lookup.
-* keymap inheritance: Inheritance and Keymaps.
-* keymap parent: Inheritance and Keymaps.
-* keymap-default-binding: Inheritance and Keymaps.
-* keymap-fullness: Scanning Keymaps.
-* keymap-name: Creating Keymaps.
-* keymap-parents: Inheritance and Keymaps.
-* keymap-prompt: Other Keymap Functions.
-* keymapp: Format of Keymaps.
-* keymaps in modes: Major Mode Conventions.
-* keys in documentation strings: Keys in Documentation.
-* keystroke: Keymap Terminology.
-* keystroke command: What Is a Function.
-* keywordp: Specification List.
-* kill command repetition: Command Loop Info.
-* kill ring: The Kill Ring.
-* kill-all-local-variables: Creating Buffer-Local.
-* kill-append: Low-Level Kill Ring.
-* kill-buffer: Killing Buffers.
-* kill-buffer-hook: Killing Buffers.
-* kill-buffer-query-functions: Killing Buffers.
-* kill-emacs: Killing XEmacs.
-* kill-emacs-hook: Killing XEmacs.
-* kill-emacs-query-functions: Killing XEmacs.
-* kill-local-variable: Creating Buffer-Local.
-* kill-new: Low-Level Kill Ring.
-* kill-process: Signals to Processes.
-* kill-region: Kill Functions.
-* kill-ring: Internals of Kill Ring.
-* kill-ring-max: Internals of Kill Ring.
-* kill-ring-yank-pointer: Internals of Kill Ring.
-* killing buffers: Killing Buffers.
-* killing XEmacs: Killing XEmacs.
-* lambda expression: Lambda Expressions.
-* lambda expression in hook: Hooks.
-* lambda in debug: Invoking the Debugger.
-* lambda in keymap: Key Lookup.
-* lambda list: Lambda Components.
-* lambda-list (Edebug): Specification List.
-* lambda-list-keywordp: Specification List.
-* last-abbrev: Abbrev Expansion.
-* last-abbrev-location: Abbrev Expansion.
-* last-abbrev-text: Abbrev Expansion.
-* last-command: Command Loop Info.
-* last-command-char: Command Loop Info.
-* last-command-event: Command Loop Info.
-* last-input-char: Peeking and Discarding.
-* last-input-event: Peeking and Discarding.
-* last-kbd-macro: Keyboard Macros.
-* Latin-1 character set (input): Translating Input.
-* lax-plist-get: Working With Lax Plists.
-* lax-plist-member: Working With Lax Plists.
-* lax-plist-put: Working With Lax Plists.
-* lax-plist-remprop: Working With Lax Plists.
-* lax-plists-eq: Working With Lax Plists.
-* lax-plists-equal: Working With Lax Plists.
-* layout policy: Annotation Basics.
-* layout types: Annotation Basics.
-* lazy loading: Dynamic Loading.
-* LDAP: LDAP Support.
-* ldap-close: Opening and Closing a LDAP Connection.
-* ldap-default-base: LDAP Variables.
-* ldap-default-host: LDAP Variables.
-* ldap-default-port: LDAP Variables.
-* ldap-host: The LDAP Lisp Object.
-* ldap-host-parameters-alist: LDAP Variables.
-* ldap-live-p: The LDAP Lisp Object.
-* ldap-open: Opening and Closing a LDAP Connection.
-* ldap-search: The High-Level LDAP API.
-* ldap-search-internal: Searching on a LDAP Server (Low-level).
-* ldapp: The LDAP Lisp Object.
-* left-gutter: Specifying a Gutter.
-* left-gutter-visible-p: Other Gutter Variables.
-* left-gutter-width: Other Gutter Variables.
-* left-margin: Margins.
-* left-margin-width: Margin Primitives.
-* left-toolbar: Specifying the Toolbar.
-* left-toolbar-visible-p: Other Toolbar Variables.
-* left-toolbar-width: Other Toolbar Variables.
-* length: Sequence Functions.
-* let: Local Variables.
-* let*: Local Variables.
-* let-specifier: Adding Specifications.
-* lexical binding (Edebug): Edebug Eval.
-* lexical comparison: Text Comparison.
-* library: Loading.
-* library compilation: Compilation Functions.
-* library header comments: Library Headers.
-* line wrapping: Truncation.
-* lines: Text Lines.
-* lines in region: Text Lines.
-* linking files: Changing File Attributes.
-* Lisp debugger: Debugger.
-* Lisp expression motion: List Motion.
-* Lisp history: Lisp History.
-* Lisp library: Loading.
-* Lisp nesting error: Eval.
-* Lisp object: Lisp Data Types.
-* Lisp printer: Output Functions.
-* Lisp reader: Streams Intro.
-* lisp-interaction-mode-map: Standard Keymaps.
-* lisp-mode-abbrev-table: Standard Abbrev Tables.
-* lisp-mode-map: Standard Keymaps.
-* lisp-mode.el: Example Major Modes.
-* list <1>: Building Lists.
-* list: Lists.
-* list elements: List Elements.
-* list form evaluation: Classifying Lists.
-* list in keymap: Key Lookup.
-* list length: Sequence Functions.
-* list motion: List Motion.
-* list structure: Cons Cells.
-* list-buffers: The Buffer List.
-* list-buffers-directory: Buffer File Name.
-* list-fonts: Font Instance Names.
-* list-processes: Process Information.
-* listp: List-related Predicates.
-* lists and cons cells: Cons Cells.
-* lists as sets: Sets And Lists.
-* lists represented as boxes: Lists as Boxes.
-* literal evaluation: Self-Evaluating Forms.
-* lmessage: The Echo Area.
-* ln: Changing File Attributes.
-* load: How Programs Do Loading.
-* load error with require: Named Features.
-* load errors: How Programs Do Loading.
-* load-average: System Environment.
-* load-default-sounds: Beeping.
-* load-history: Unloading.
-* load-ignore-elc-files: How Programs Do Loading.
-* load-in-progress: How Programs Do Loading.
-* load-path: How Programs Do Loading.
-* load-read-function: How Programs Do Loading.
-* load-sound-file: Beeping.
-* load-warn-when-source-newer: How Programs Do Loading.
-* load-warn-when-source-only: How Programs Do Loading.
-* loading: Loading.
-* loading hooks: Hooks for Loading.
-* loadup.el: Building XEmacs.
-* local binding: Local Variables.
-* local keymap: Active Keymaps.
-* local variables: Local Variables.
-* local-abbrev-table: Standard Abbrev Tables.
-* local-key-binding: Functions for Key Lookup.
-* local-set-key: Key Binding Commands.
-* local-unset-key: Key Binding Commands.
-* local-variable-p: Creating Buffer-Local.
-* local-write-file-hooks: Saving Buffers.
-* locale (in a specifier): Specifiers In-Depth.
-* locate-file: How Programs Do Loading.
-* locate-file-clear-hashing: How Programs Do Loading.
-* lock-buffer: File Locks.
-* log: Math Functions.
-* log-message-ignore-labels: The Echo Area.
-* log-message-ignore-regexps: The Echo Area.
-* log-message-max-size: The Echo Area.
-* log-warning-minimum-level: Warnings.
-* log-warning-suppressed-classes: Warnings.
-* log10: Math Functions.
-* logand: Bitwise Operations.
-* logb: Float Basics.
-* logical and: Bitwise Operations.
-* logical exclusive or: Bitwise Operations.
-* logical inclusive or: Bitwise Operations.
-* logical not: Bitwise Operations.
-* logical shift: Bitwise Operations.
-* logior: Bitwise Operations.
-* lognot: Bitwise Operations.
-* logxor: Bitwise Operations.
-* looking-at: Regexp Search.
-* lookup-key: Functions for Key Lookup.
-* loops, infinite: Infinite Loops.
-* lower case: Character Case.
-* lower-frame: Raising and Lowering.
-* lowering a frame: Raising and Lowering.
-* lsh: Bitwise Operations.
-* lwarn: Warnings.
-* M-x: Interactive Call.
-* Maclisp: Lisp History.
-* macro: What Is a Function.
-* macro argument evaluation: Argument Evaluation.
-* macro call: Expansion.
-* macro call evaluation: Macro Forms.
-* macro compilation: Compilation Functions.
-* macro descriptions: A Sample Function Description.
-* macro expansion: Expansion.
-* macroexpand: Expansion.
-* macros: Macros.
-* magic file names: Magic File Names.
-* mail-host-address: System Environment.
-* major mode: Major Modes.
-* major mode hook: Major Mode Conventions.
-* major mode keymap: Active Keymaps.
-* major-mode: Mode Help.
-* make-abbrev-table: Abbrev Tables.
-* make-annotation: Annotation Primitives.
-* make-auto-save-file-name: Auto-Saving.
-* make-backup-file-name: Backup Names.
-* make-backup-files: Making Backups.
-* make-bit-vector: Bit Vector Functions.
-* make-byte-code: Compiled-Function Objects.
-* make-char: MULE Characters.
-* make-char-table: Working With Char Tables.
-* make-charset: Basic Charset Functions.
-* make-coding-system: Basic Coding System Functions.
-* make-composite-char: Composite Characters.
-* make-device: Connecting to a Console or Device.
-* make-directory: Create/Delete Dirs.
-* make-display-table: Display Table Format.
-* make-event: Working With Events.
-* make-extent: Creating and Modifying Extents.
-* make-face: Basic Face Functions.
-* make-file-part: Creating a Partial File.
-* make-font-instance: Font Instances.
-* make-frame: Creating Frames.
-* make-frame-invisible: Visibility of Frames.
-* make-frame-visible: Visibility of Frames.
-* make-glyph: Creating Glyphs.
-* make-glyph-internal: Creating Glyphs.
-* make-hash-table: Introduction to Hash Tables.
-* make-icon-glyph: Creating Glyphs.
-* make-image-instance: Image Instance Functions.
-* make-image-specifier: Image Specifiers.
-* make-indirect-buffer: Indirect Buffers.
-* make-keymap: Creating Keymaps.
-* make-list: Building Lists.
-* make-local-hook: Hooks.
-* make-local-variable: Creating Buffer-Local.
-* make-marker: Creating Markers.
-* make-obsolete: Obsoleteness.
-* make-obsolete-variable: Obsoleteness.
-* make-pointer-glyph: Creating Glyphs.
-* make-range-table: Introduction to Range Tables.
-* make-reverse-direction-charset: Basic Charset Functions.
-* make-sparse-keymap: Creating Keymaps.
-* make-specifier: Creating Specifiers.
-* make-specifier-and-init: Creating Specifiers.
-* make-string: Creating Strings.
-* make-symbol: Creating Symbols.
-* make-symbolic-link: Changing File Attributes.
-* make-syntax-table: Syntax Table Functions.
-* make-temp-name: Unique File Names.
-* make-tooltalk-message: Elisp Interface for Sending Messages.
-* make-tooltalk-pattern: Elisp Interface for Receiving Messages.
-* make-tty-device: Connecting to a Console or Device.
-* make-variable-buffer-local: Creating Buffer-Local.
-* make-vector: Vector Functions.
-* make-weak-list: Weak Lists.
-* make-x-device: Connecting to a Console or Device.
-* makunbound: Void Variables.
-* Manual-page-minibuffer-history: Minibuffer History.
-* map-char-table: Working With Char Tables.
-* map-database: Working With a Database.
-* map-extent-children: Mapping Over Extents.
-* map-extents: Mapping Over Extents.
-* map-frame-hook: Frame Hooks.
-* map-keymap: Scanning Keymaps.
-* map-range-table: Working With Range Tables.
-* map-specifier: Other Specification Functions.
-* map-y-or-n-p: Multiple Queries.
-* mapatoms: Creating Symbols.
-* mapcar: Mapping Functions.
-* mapcar-extents: Mapping Over Extents.
-* mapconcat: Mapping Functions.
-* maphash: Working With Hash Tables.
-* mapping functions: Mapping Functions.
-* margin: Annotation Basics.
-* margin width: Margin Primitives.
-* mark: The Mark.
-* mark excursion: Excursions.
-* mark ring: The Mark.
-* mark, the: The Mark.
-* mark-marker: The Mark.
-* mark-ring: The Mark.
-* mark-ring-max: The Mark.
-* marker argument: Interactive Codes.
-* marker garbage collection: Overview of Markers.
-* marker input stream: Input Streams.
-* marker output stream: Output Streams.
-* marker relocation: Overview of Markers.
-* marker-buffer: Information from Markers.
-* marker-position: Information from Markers.
-* markerp: Predicates on Markers.
-* markers: Markers.
-* markers as numbers: Overview of Markers.
-* markers vs. extents: Overview of Markers.
-* match data: Match Data.
-* match-beginning: Simple Match Data.
-* match-data: Entire Match Data.
-* match-end: Simple Match Data.
-* match-string: Simple Match Data.
-* mathematical functions: Math Functions.
-* max: Comparison of Numbers.
-* max-lisp-eval-depth: Eval.
-* max-specpdl-size: Local Variables.
-* md5: Transformations.
-* MD5 digests: Transformations.
-* member: Sets And Lists.
-* membership in a list: Sets And Lists.
-* memory allocation: Garbage Collection.
-* memory-limit: Garbage Collection.
-* memq: Sets And Lists.
-* menu: Menus.
-* menu accelerators: Menu Accelerators.
-* menu filters: Menu Filters.
-* menu format: Menu Format.
-* menu-accelerator-enabled: Menu Accelerator Functions.
-* menu-accelerator-map: Menu Accelerator Functions.
-* menu-accelerator-modifiers: Menu Accelerator Functions.
-* menu-accelerator-prefix: Menu Accelerator Functions.
-* menu-no-selection-hook: Menubar.
-* menubar: Menubar.
-* menubar format: Menubar Format.
-* menubar-configuration: Menu Format.
-* menubar-pointer-glyph: Mouse Pointer.
-* menubar-show-keybindings: Menubar.
-* message: The Echo Area.
-* meta character printing: Describing Characters.
-* meta-prefix-char: Functions for Key Lookup.
-* min: Comparison of Numbers.
-* minibuffer: Minibuffers.
-* minibuffer history: Minibuffer History.
-* minibuffer input: Recursive Editing.
-* minibuffer window: Cyclic Window Ordering.
-* minibuffer-complete: Completion Commands.
-* minibuffer-complete-and-exit: Completion Commands.
-* minibuffer-complete-word: Completion Commands.
-* minibuffer-completion-confirm: Completion Commands.
-* minibuffer-completion-help: Completion Commands.
-* minibuffer-completion-predicate: Completion Commands.
-* minibuffer-completion-table: Completion Commands.
-* minibuffer-depth: Minibuffer Misc.
-* minibuffer-exit-hook: Minibuffer Misc.
-* minibuffer-frame-plist: Initial Properties.
-* minibuffer-help-form: Minibuffer Misc.
-* minibuffer-history: Minibuffer History.
-* 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>: Standard Keymaps.
-* minibuffer-local-must-match-map: Completion Commands.
-* minibuffer-prompt: Minibuffer Misc.
-* minibuffer-prompt-width: Minibuffer Misc.
-* minibuffer-scroll-window: Minibuffer Misc.
-* minibuffer-setup-hook: Minibuffer Misc.
-* minibuffer-window: Minibuffer Misc.
-* minibuffer-window-active-p: Minibuffer Misc.
-* minimum window size: Resizing Windows.
-* minor mode: Minor Modes.
-* minor mode conventions: Minor Mode Conventions.
-* minor-mode-alist: Modeline Variables.
-* minor-mode-key-binding: Functions for Key Lookup.
-* minor-mode-map-alist: Active Keymaps.
-* misc-user-event-p: Event Predicates.
-* mod: Arithmetic Operations.
-* mode: Modes.
-* mode help: Mode Help.
-* mode hook: Major Mode Conventions.
-* mode loading: Major Mode Conventions.
-* mode variable: Minor Mode Conventions.
-* mode-class property: Major Mode Conventions.
-* mode-name: Modeline Variables.
-* mode-popup-menu: Pop-Up Menus.
-* mode-specific-map <1>: Standard Keymaps.
-* mode-specific-map: Prefix Keys.
-* modeline: Modeline Format.
-* modeline construct: Modeline Data.
-* modeline-buffer-identification: Modeline Variables.
-* modeline-format: Modeline Data.
-* modeline-map <1>: Standard Keymaps.
-* modeline-map: Active Keymaps.
-* modeline-modified: Modeline Variables.
-* modeline-pointer-glyph: Mouse Pointer.
-* modeline-process: Modeline Variables.
-* modification flag (of buffer): Buffer Modification.
-* modification of lists: Rearrangement.
-* modification time, comparison of: Modification Time.
-* modify-syntax-entry: Syntax Table Functions.
-* modulus: Arithmetic Operations.
-* momentary-string-display: Temporary Displays.
-* mono-pixmap-image-instance-p: Image Instance Types.
-* motion-event-p: Event Predicates.
-* mouse cursor: Mouse Pointer.
-* mouse pointer: Mouse Pointer.
-* mouse-event-p: Event Predicates.
-* mouse-grabbed-buffer: Active Keymaps.
-* mouse-highlight-priority: Extents and Events.
-* move-marker: Changing Markers.
-* move-to-column: Columns.
-* move-to-left-margin: Margins.
-* move-to-window-line: Screen Lines.
-* MS-DOS and file modes: Changing File Attributes.
-* MS-DOS file types: Files and MS-DOS.
-* MSWindows OLE: MSWindows OLE.
-* multilingual string formatting: Formatting Strings.
-* multiple windows: Basic Windows.
-* named function: Function Names.
-* NaN: Float Basics.
-* narrow-to-page: Narrowing.
-* narrow-to-region: Narrowing.
-* narrowing: Narrowing.
-* natnum-specifier-p: Specifier Types.
-* natnump: Predicates on Numbers.
-* natural numbers: Predicates on Numbers.
-* nconc: Rearrangement.
-* negative infinity: Float Basics.
-* negative-argument: Prefix Command Arguments.
-* network connection: Network.
-* new file message: Subroutines of Visiting.
-* 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.
-* newline-and-indent: Mode-Specific Indent.
-* next input: Peeking and Discarding.
-* next-command-event: Reading One Event.
-* next-event: Reading One Event.
-* next-extent: Finding Extents.
-* next-frame: Finding All Frames.
-* next-history-element: Minibuffer Misc.
-* next-matching-history-element: Minibuffer Misc.
-* next-property-change: Property Search.
-* next-screen-context-lines: Vertical Scrolling.
-* next-single-property-change: Property Search.
-* next-window: Cyclic Window Ordering.
-* nil: Constant Variables.
-* nil and lists: Cons Cells.
-* nil in keymap: Key Lookup.
-* nil in lists: Cons Cell Type.
-* nil input stream: Input Streams.
-* nil output stream: Output Streams.
-* nil, uses of: nil and t.
-* ninth: List Elements.
-* nlistp: List-related Predicates.
-* no-catch: Catch and Throw.
-* no-redraw-on-reenter: Refresh Screen.
-* nondirectory part (of file name): File Name Components.
-* noninteractive: Batch Mode.
-* noninteractive use: Batch Mode.
-* nonlocal exits: Nonlocal Exits.
-* nonprinting characters, reading: Quoted Character Input.
-* nontext-pointer-glyph: Mouse Pointer.
-* normal-mode: Auto Major Mode.
-* not: Combining Conditions.
-* not-modified: Buffer Modification.
-* nothing-image-instance-p: Image Instance Types.
-* nreverse: Rearrangement.
-* nth: List Elements.
-* nthcdr: List Elements.
-* null: List-related Predicates.
-* number equality: Comparison of Numbers.
-* number-char-or-marker-p: Predicates on Markers.
-* number-or-marker-p: Predicates on Markers.
-* number-to-string: String Conversion.
-* numberp: Predicates on Numbers.
-* numbers: Numbers.
-* numeric prefix: Formatting Strings.
-* numeric prefix argument: Prefix Command Arguments.
-* numeric prefix argument usage: Interactive Codes.
-* obarray: Creating Symbols.
-* obarray in completion: Basic Completion.
-* objc-mode-map: Standard Keymaps.
-* object: Lisp Data Types.
-* object to string: Output Functions.
-* object-plist: Object Plists.
-* oblique: Font Instance Characteristics.
-* obsolete buffer: Modification Time.
-* occur-mode-map: Standard Keymaps.
-* octal character code: Character Type.
-* octal character input: Quoted Character Input.
-* octal-escape-glyph: Redisplay Glyphs.
-* OffiX DND: OffiX DND.
-* old-eq: Equality Predicates.
-* one-window-p: Splitting Windows.
-* only-global-abbrevs: Defining Abbrevs.
-* 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.
-* options on command line: Command Line Arguments.
-* or: Combining Conditions.
-* order of extents: Extent Endpoints.
-* ordering of windows, cyclic: Cyclic Window Ordering.
-* other-buffer: The Buffer List.
-* other-window: Cyclic Window Ordering.
-* other-window-scroll-buffer: Vertical Scrolling.
-* Outline mode: Substitution.
-* output from processes: Output from Processes.
-* output stream: Output Streams.
-* outside margin: Annotation Basics.
-* overflow: Integer Basics.
-* overlay arrow: Overlay Arrow.
-* overlay-arrow-position: Overlay Arrow.
-* overlay-arrow-string: Overlay Arrow.
-* overriding-local-map <1>: Standard Keymaps.
-* overriding-local-map: Active Keymaps.
-* overriding-terminal-local-map: Active Keymaps.
-* overwrite-mode: Commands for Insertion.
-* padding: Formatting Strings.
-* page-delimiter: Standard Regexps.
-* paired delimiter: Syntax Class Table.
-* paragraph-separate: Standard Regexps.
-* paragraph-start: Standard Regexps.
-* parent of a keymap: Inheritance and Keymaps.
-* parent process: Processes.
-* parent, of extent: Extent Parents.
-* parenthesis: Cons Cell Type.
-* parenthesis depth: Parsing Expressions.
-* parenthesis matching: Blinking.
-* parenthesis syntax: Syntax Class Table.
-* parse state: Parsing Expressions.
-* parse-partial-sexp: Parsing Expressions.
-* parse-sexp-ignore-comments: Parsing Expressions.
-* parsing: Syntax Tables.
-* partial files: Partial Files.
-* passwd-echo: Reading a Password.
-* passwd-invert-frame-when-keyboard-grabbed: Reading a Password.
-* passwords, reading: Reading a Password.
-* PATH environment variable: Subprocess Creation.
-* path-separator: System Environment.
-* pausing: Waiting.
-* peeking at input: Peeking and Discarding.
-* percent symbol in modeline: Modeline Data.
-* perform-replace: Search and Replace.
-* performance analysis: Coverage Testing.
-* permanent local variable: Creating Buffer-Local.
-* permission: File Attributes.
-* pg-coding-system: libpq Lisp Variables.
-* pg:authtype: libpq Lisp Variables.
-* pg:client-encoding: libpq Lisp Variables.
-* pg:cost-heap: libpq Lisp Variables.
-* pg:cost-index: libpq Lisp Variables.
-* pg:database: libpq Lisp Variables.
-* pg:date-style: libpq Lisp Variables.
-* pg:geqo: libpq Lisp Variables.
-* pg:host: libpq Lisp Variables.
-* pg:options: libpq Lisp Variables.
-* pg:port: libpq Lisp Variables.
-* pg:realm: libpq Lisp Variables.
-* pg:tty: libpq Lisp Variables.
-* pg:tz: libpq Lisp Variables.
-* pg:user: libpq Lisp Variables.
-* pgres::polling-active: libpq Lisp Symbols and DataTypes.
-* pgres::polling-failed: libpq Lisp Symbols and DataTypes.
-* pgres::polling-ok: libpq Lisp Symbols and DataTypes.
-* pgres::polling-reading: libpq Lisp Symbols and DataTypes.
-* pgres::polling-writing: libpq Lisp Symbols and DataTypes.
-* pipes: Asynchronous Processes.
-* play-sound: Beeping.
-* play-sound-file: Beeping.
-* plist: Property Lists.
-* plist, symbol: Symbol Properties.
-* plist-get: Working With Normal Plists.
-* plist-member: Working With Normal Plists.
-* plist-put: Working With Normal Plists.
-* plist-remprop: Working With Normal Plists.
-* plist-to-alist: Converting Plists To/From Alists.
-* 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.
-* point with narrowing: Point.
-* point-marker: Creating Markers.
-* point-max: Point.
-* point-max-marker: Creating Markers.
-* point-min: Point.
-* point-min-marker: Creating Markers.
-* pointer (mouse): Mouse Pointer.
-* pointer-glyph-p: Glyph Types.
-* pointer-image-instance-p: Image Instance Types.
-* pop-global-mark: The Mark.
-* pop-mark: The Mark.
-* pop-to-buffer: Displaying Buffers.
-* pop-up menu: Pop-Up Menus.
-* pop-up-frame-function: Choosing Window.
-* pop-up-frame-plist: Choosing Window.
-* pop-up-frames: Choosing Window.
-* pop-up-windows: Choosing Window.
-* popup-buffer-menu: Pop-Up Menus.
-* popup-dialog-box: Dialog Box Functions.
-* popup-menu: Pop-Up Menus.
-* popup-menu-titles: Pop-Up Menus.
-* popup-menu-up-p: Pop-Up Menus.
-* popup-menubar-menu: Pop-Up Menus.
-* popup-mode-menu: Pop-Up Menus.
-* pos-visible-in-window-p: Window Start.
-* position (in buffer): Positions.
-* position argument: Interactive Codes.
-* position in window: Window Point.
-* position of frame: Size and Position.
-* position of window: Position of Window.
-* positive infinity: Float Basics.
-* posix-looking-at: POSIX Regexps.
-* posix-search-backward: POSIX Regexps.
-* posix-search-forward: POSIX Regexps.
-* posix-string-match: POSIX Regexps.
-* post-command-hook: Command Overview.
-* post-gc-hook: Garbage Collection.
-* PostgreSQL: PostgreSQL Support.
-* pq-binary-tuples: libpq Lisp Symbols and DataTypes.
-* pq-clear: Other libpq Functions.
-* pq-client-encoding: Other libpq Functions.
-* pq-cmd-status: libpq Lisp Symbols and DataTypes.
-* pq-cmd-tuples: libpq Lisp Symbols and DataTypes.
-* pq-conn-defaults: Other libpq Functions.
-* pq-connect-poll: Asynchronous Interface Functions.
-* pq-connect-start: Asynchronous Interface Functions.
-* pq-connectdb: Synchronous Interface Functions.
-* pq-consume-input: Asynchronous Interface Functions.
-* pq-env-2-encoding: Other libpq Functions.
-* pq-exec: Synchronous Interface Functions.
-* pq-finish: Other libpq Functions.
-* pq-flush: Asynchronous Interface Functions.
-* pq-fmod: libpq Lisp Symbols and DataTypes.
-* pq-fname: libpq Lisp Symbols and DataTypes.
-* pq-fnumber: libpq Lisp Symbols and DataTypes.
-* pq-fsize: libpq Lisp Symbols and DataTypes.
-* pq-ftype: libpq Lisp Symbols and DataTypes.
-* pq-get-is-null: libpq Lisp Symbols and DataTypes.
-* pq-get-length: libpq Lisp Symbols and DataTypes.
-* pq-get-result: Asynchronous Interface Functions.
-* pq-get-value: libpq Lisp Symbols and DataTypes.
-* pq-is-busy: Asynchronous Interface Functions.
-* pq-is-nonblocking: Asynchronous Interface Functions.
-* pq-lo-close: Unimplemented libpq Functions.
-* pq-lo-creat: Unimplemented libpq Functions.
-* pq-lo-export: Large Object Support.
-* pq-lo-import: Large Object Support.
-* pq-lo-lseek: Unimplemented libpq Functions.
-* pq-lo-open: Unimplemented libpq Functions.
-* pq-lo-read: Unimplemented libpq Functions.
-* pq-lo-tell: Unimplemented libpq Functions.
-* pq-lo-unlink: Unimplemented libpq Functions.
-* pq-lo-write: Unimplemented libpq Functions.
-* pq-make-empty-pgresult: libpq Lisp Symbols and DataTypes.
-* pq-nfields: libpq Lisp Symbols and DataTypes.
-* pq-notifies: Synchronous Interface Functions.
-* pq-ntuples: libpq Lisp Symbols and DataTypes.
-* pq-oid-value: libpq Lisp Symbols and DataTypes.
-* pq-pgconn: libpq Lisp Symbols and DataTypes.
-* pq-res-status: libpq Lisp Symbols and DataTypes.
-* pq-reset: Synchronous Interface Functions.
-* pq-reset-cancel: Asynchronous Interface Functions.
-* pq-reset-poll: Asynchronous Interface Functions.
-* pq-reset-start: Asynchronous Interface Functions.
-* pq-result-error-message: libpq Lisp Symbols and DataTypes.
-* pq-result-status: libpq Lisp Symbols and DataTypes.
-* pq-send-query: Asynchronous Interface Functions.
-* pq-set-client-encoding: Other libpq Functions.
-* pq-set-nonblocking: Asynchronous Interface Functions.
-* PQdisplayTuples: Unimplemented libpq Functions.
-* PQmblen: Unimplemented libpq Functions.
-* PQprint: Unimplemented libpq Functions.
-* PQprintTuples: Unimplemented libpq Functions.
-* PQsetenv: Synchronous Interface Functions.
-* PQsetenvAbort: Asynchronous Interface Functions.
-* PQsetenvPoll: Asynchronous Interface Functions.
-* PQsetenvStart: Asynchronous Interface Functions.
-* PQsocket: Unimplemented libpq Functions.
-* PQtrace: Unimplemented libpq Functions.
-* PQuntrace: Unimplemented libpq Functions.
-* pre-abbrev-expand-hook: Abbrev Expansion.
-* pre-command-hook: Command Overview.
-* pre-gc-hook: Garbage Collection.
-* preceding-char: Near Point.
-* precision of formatted numbers: Formatting Strings.
-* predicates: Type Predicates.
-* prefix argument: Prefix Command Arguments.
-* prefix argument unreading: Peeking and Discarding.
-* prefix command: Prefix Keys.
-* prefix key: Prefix Keys.
-* prefix-arg: Prefix Command Arguments.
-* prefix-help-command: Help Functions.
-* prefix-numeric-value: Prefix Command Arguments.
-* preventing backtracking: Specification List.
-* preventing prefix key: Key Lookup.
-* previous complete subexpression: Parsing Expressions.
-* previous-extent: Finding Extents.
-* previous-frame: Finding All Frames.
-* previous-history-element: Minibuffer Misc.
-* previous-matching-history-element: Minibuffer Misc.
-* previous-property-change: Property Search.
-* previous-single-property-change: Property Search.
-* previous-window: Cyclic Window Ordering.
-* primitive: What Is a Function.
-* primitive type: Lisp Data Types.
-* primitive types: Primitive Types.
-* primitive-undo: Undo.
-* prin1: Output Functions.
-* prin1-to-string: Output Functions.
-* princ: Output Functions.
-* print: Output Functions.
-* print example: Output Streams.
-* print name cell: Symbol Components.
-* print-escape-newlines: Output Variables.
-* print-gensym: Output Variables.
-* print-help-return-message: Help Functions.
-* print-length: Output Variables.
-* print-level: Output Variables.
-* print-readably <1>: Output Variables.
-* print-readably: Printing in Edebug.
-* print-string-length: Output Variables.
-* printed representation: Printed Representation.
-* printed representation for characters: Character Type.
-* printing: Streams Intro.
-* printing (Edebug): Printing in Edebug.
-* printing circular structures: Printing in Edebug.
-* printing floating-point numbers: Output Variables.
-* printing limits: Output Variables.
-* printing notation: Printing Notation.
-* printing readably: Output Variables.
-* printing uninterned symbols: Output Variables.
-* priority of an extent: Intro to Extents.
-* process: Processes.
-* process filter: Filter Functions.
-* process input: Input to Processes.
-* process output: Output from Processes.
-* process sentinel: Sentinels.
-* process signals: Signals to Processes.
-* process window size: Process Window Size.
-* process-buffer: Process Buffers.
-* process-command: Process Information.
-* process-connection-type: Asynchronous Processes.
-* process-environment: System Environment.
-* process-event-p: Event Predicates.
-* process-exit-status: Process Information.
-* process-filter: Filter Functions.
-* process-id: Process Information.
-* process-kill-without-query: Deleting Processes.
-* process-kill-without-query-p: Process Information.
-* process-list: Process Information.
-* process-mark: Process Buffers.
-* process-name: Process Information.
-* process-send-eof: Input to Processes.
-* process-send-region: Input to Processes.
-* process-send-string: Input to Processes.
-* process-sentinel: Sentinels.
-* process-status: Process Information.
-* process-tty-name: Process Information.
-* processp: Processes.
-* profile.el: Compilation Tips.
-* profiling: Compilation Tips.
-* prog1: Sequencing.
-* prog2: Sequencing.
-* progn: Sequencing.
-* program arguments: Subprocess Creation.
-* program directories: Subprocess Creation.
-* programmed completion: Programmed Completion.
-* programming types: Programming Types.
-* properties of strings: String Properties.
-* properties of text: Text Properties.
-* property list: Property Lists.
-* property list cell (symbol): Symbol Components.
-* property list, symbol: Symbol Properties.
-* property lists vs association lists: Plists and Alists.
-* property of an extent: Extent Properties.
-* protected forms: Cleanups.
-* provide: Named Features.
-* providing features: Named Features.
-* PTYs: Asynchronous Processes.
-* punctuation character: Syntax Class Table.
-* pure storage: Pure Storage.
-* pure-bytes-used: Pure Storage.
-* purecopy: Pure Storage.
-* purify-flag: Pure Storage.
-* push-mark: The Mark.
-* put: Object Plists.
-* put-char-table: Working With Char Tables.
-* put-database: Working With a Database.
-* put-range-table: Working With Range Tables.
-* put-text-property: Changing Properties.
-* putf: Other Plists.
-* puthash: Working With Hash Tables.
-* query-replace-history: Minibuffer History.
-* 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.
-* quit-flag: Quitting.
-* quit-process: Signals to Processes.
-* quitting: Quitting.
-* quitting from infinite loop: Infinite Loops.
-* quote: Quoting.
-* quote character: Parsing Expressions.
-* quoted character input: Quoted Character Input.
-* quoted-insert suppression: Changing Key Bindings.
-* quoting: Quoting.
-* quoting characters in printing: Output Functions.
-* quoting using apostrophe: Quoting.
-* raise-frame: Raising and Lowering.
-* raising a frame: Raising and Lowering.
-* random: Random Numbers.
-* random numbers: Random Numbers.
-* range table type: Range Table Type.
-* Range Tables: Range Tables.
-* range-table-p: Range Tables.
-* rassoc: Association Lists.
-* rassq: Association Lists.
-* raw prefix argument: Prefix Command Arguments.
-* raw prefix argument usage: Interactive Codes.
-* re-search-backward: Regexp Search.
-* re-search-forward: Regexp Search.
-* read: Input Functions.
-* read command name: Interactive Call.
-* read syntax: Printed Representation.
-* read syntax for characters: Character Type.
-* read-buffer: High-Level Completion.
-* read-char: Reading One Event.
-* read-command: High-Level Completion.
-* read-expression: Object from Minibuffer.
-* read-expression-history: Minibuffer History.
-* read-expression-map: Standard Keymaps.
-* read-file-name: Reading File Names.
-* read-from-minibuffer: Text from Minibuffer.
-* read-from-string: Input Functions.
-* read-key-sequence: Key Sequence Input.
-* read-minibuffer: Object from Minibuffer.
-* read-only buffer: Read Only Buffers.
-* read-only buffers in interactive: Using Interactive.
-* read-passwd: Reading a Password.
-* read-quoted-char: Quoted Character Input.
-* read-quoted-char quitting: Quitting.
-* read-shell-command-map: Standard Keymaps.
-* read-string: Text from Minibuffer.
-* read-variable: High-Level Completion.
-* reading: Streams Intro.
-* reading (Edebug): Reading in Edebug.
-* reading interactive arguments: Interactive Codes.
-* reading symbols: Creating Symbols.
-* rearrangement of lists: Rearrangement.
-* rebinding: Changing Key Bindings.
-* receiving ToolTalk messages: Receiving Messages.
-* recent-auto-save-p: Auto-Saving.
-* recent-keys: Recording Input.
-* recent-keys-ring-size: Recording Input.
-* recenter: Vertical Scrolling.
-* record command history: Interactive Call.
-* recursion: Iteration.
-* recursion-depth: Recursive Editing.
-* recursive command loop: Recursive Editing.
-* recursive editing level: Recursive Editing.
-* recursive evaluation: Intro Eval.
-* recursive-edit: Recursive Editing.
-* redo: Undo.
-* redraw-display: Refresh Screen.
-* redraw-frame: Refresh Screen.
-* redraw-modeline: Modeline Format.
-* refresh display: Refresh Screen.
-* regexp: Regular Expressions.
-* regexp alternative: Syntax of Regexps.
-* regexp grouping: Syntax of Regexps.
-* regexp searching: Regexp Search.
-* regexp-history: Minibuffer History.
-* regexp-quote: Syntax of Regexps.
-* regexps used standardly in editing: Standard Regexps.
-* region argument: Interactive Codes.
-* region, the: The Region.
-* region-active-p: The Region.
-* region-beginning: The Region.
-* region-end: The Region.
-* region-exists-p: The Region.
-* register-alist: Registers.
-* register-ccl-program: Calling CCL.
-* register-tooltalk-pattern: Elisp Interface for Receiving Messages.
-* registers: Registers.
-* regular expression: Regular Expressions.
-* regular expression searching: Regexp Search.
-* reindent-then-newline-and-indent: Mode-Specific Indent.
-* relabel-menu-item: Modifying Menus.
-* relative file name: Relative File Names.
-* remainder: Arithmetic Operations.
-* remassoc: Association Lists.
-* remassq: Association Lists.
-* remhash: Working With Hash Tables.
-* remove-database: Working With a Database.
-* remove-face-property: Face Properties.
-* remove-glyph-property: Glyph Properties.
-* remove-hook: Hooks.
-* remove-range-table: Working With Range Tables.
-* remove-specifier: Other Specification Functions.
-* remove-text-properties: Changing Properties.
-* remprop: Object Plists.
-* remrassoc: Association Lists.
-* remrassq: Association Lists.
-* rename-auto-save-file: Auto-Saving.
-* rename-buffer: Buffer Names.
-* rename-file: Changing File Attributes.
-* renaming files: Changing File Attributes.
-* repeated loading: Repeated Loading.
-* replace bindings: Changing Key Bindings.
-* replace characters: Substitution.
-* replace-buffer-in-windows: Displaying Buffers.
-* replace-match: Replacing Match.
-* replacement: Search and Replace.
-* repositioning format arguments: Formatting Strings.
-* require: Named Features.
-* require-final-newline: Saving Buffers.
-* requiring features: Named Features.
-* reset-char-table: Working With Char Tables.
-* resize redisplay: Size and Position.
-* rest arguments: Argument List.
-* restriction (in a buffer): Narrowing.
-* resume (cf. no-redraw-on-reenter): Refresh Screen.
-* return: Character Type.
-* return-tooltalk-message: Elisp Interface for Sending Messages.
-* reveal-annotation: Annotation Properties.
-* reverse: Building Lists.
-* reversing a list: Rearrangement.
-* revert-buffer: Reverting.
-* revert-buffer-function: Reverting.
-* revert-buffer-insert-file-contents-function: Reverting.
-* right-gutter: Specifying a Gutter.
-* right-gutter-visible-p: Other Gutter Variables.
-* right-gutter-width: Other Gutter Variables.
-* right-margin-width: Margin Primitives.
-* right-toolbar: Specifying the Toolbar.
-* right-toolbar-visible-p: Other Toolbar Variables.
-* right-toolbar-width: Other Toolbar Variables.
-* rm: Changing File Attributes.
-* round: Numeric Conversions.
-* rounding in conversions: Numeric Conversions.
-* rounding without conversion: Rounding Operations.
-* rplaca: Modifying Lists.
-* rplacd: Modifying Lists.
-* run time stack: Internals of Debugger.
-* run-emacs-from-temacs: Building XEmacs.
-* run-hooks: Hooks.
-* runnable temacs: Building XEmacs.
-* same-window-buffer-names: Choosing Window.
-* same-window-regexps: Choosing Window.
-* save-abbrevs: Abbrev Files.
-* save-buffer: Saving Buffers.
-* save-current-buffer: Excursions.
-* save-excursion: Excursions.
-* save-excursion (Edebug): Edebug Display Update.
-* save-match-data: Saving Match Data.
-* save-restriction: Narrowing.
-* save-selected-frame: Input Focus.
-* save-selected-window <1>: Excursions.
-* save-selected-window: Selecting Windows.
-* save-some-buffers: Saving Buffers.
-* save-window-excursion: Window Configurations.
-* saving text properties: Saving Properties.
-* saving window information: Window Configurations.
-* scan-lists: Parsing Expressions.
-* scan-sexps: Parsing Expressions.
-* scope: Variable Scoping.
-* screen layout: Window Configuration Type.
-* scroll-conservatively: Vertical Scrolling.
-* scroll-down: Vertical Scrolling.
-* scroll-left: Horizontal Scrolling.
-* scroll-other-window: Vertical Scrolling.
-* scroll-right: Horizontal Scrolling.
-* scroll-step: Vertical Scrolling.
-* scroll-up: Vertical Scrolling.
-* scrollbar-pointer-glyph: Mouse Pointer.
-* scrollbars: Scrollbars.
-* scrolling vertically: Vertical Scrolling.
-* search-backward: String Search.
-* search-failed: String Search.
-* search-forward: String Search.
-* searching: Searching and Matching.
-* searching and case: Searching and Case.
-* searching for regexp: Regexp Search.
-* second: List Elements.
-* select-console: The Selected Console and Device.
-* select-device: The Selected Console and Device.
-* select-frame: Input Focus.
-* select-frame-hook: Frame Hooks.
-* select-window: Selecting Windows.
-* selected frame: Input Focus.
-* selected window: Basic Windows.
-* selected-console: The Selected Console and Device.
-* selected-device: The Selected Console and Device.
-* selected-frame: Input Focus.
-* selected-window: Selecting Windows.
-* selecting a buffer: Current Buffer.
-* selecting windows: Selecting Windows.
-* selection (for X windows): X Selections.
-* selection-pointer-glyph: Mouse Pointer.
-* selective display: Selective Display.
-* selective-display: Selective Display.
-* selective-display-ellipses: Selective Display.
-* self-evaluating form: Self-Evaluating Forms.
-* self-insert-and-exit: Minibuffer Misc.
-* self-insert-command: Commands for Insertion.
-* self-insert-command override: Changing Key Bindings.
-* self-insert-command, minor modes: Keymaps and Minor Modes.
-* self-insertion: Commands for Insertion.
-* send-string-to-terminal: Terminal Output.
-* send-tooltalk-message: Elisp Interface for Sending Messages.
-* sending signals: Signals to Processes.
-* sending ToolTalk messages: Sending Messages.
-* sentence-end: Standard Regexps.
-* sentinel: Sentinels.
-* sequence: Sequences Arrays Vectors.
-* sequence length: Sequence Functions.
-* sequencep: Sequence Functions.
-* set: Setting Variables.
-* set-annotation-action: Annotation Properties.
-* set-annotation-data: Annotation Properties.
-* set-annotation-down-glyph: Annotation Properties.
-* set-annotation-face: Annotation Properties.
-* set-annotation-glyph: Annotation Properties.
-* set-annotation-layout: Annotation Properties.
-* set-annotation-menu: Annotation Properties.
-* set-auto-mode: Auto Major Mode.
-* set-buffer: Current Buffer.
-* set-buffer-auto-saved: Auto-Saving.
-* set-buffer-major-mode: Auto Major Mode.
-* set-buffer-menubar: Menubar.
-* set-buffer-modified-p: Buffer Modification.
-* set-case-syntax: Case Tables.
-* set-case-syntax-delims: Case Tables.
-* set-case-syntax-pair: Case Tables.
-* set-case-table: Case Tables.
-* set-category-table: Category Tables.
-* set-charset-ccl-program: Charset Property Functions.
-* set-coding-category-system: Detection of Textual Encoding.
-* set-coding-priority-list: Detection of Textual Encoding.
-* set-console-type-image-conversion-list: Image Instantiator Conversion.
-* set-default: Default Value.
-* set-default-file-modes: Changing File Attributes.
-* set-default-gutter-position: Specifying a Gutter.
-* set-default-toolbar-position: Specifying the Toolbar.
-* set-device-baud-rate <1>: Terminal Output.
-* set-device-baud-rate: Console and Device I/O.
-* set-extent-begin-glyph: Extent Properties.
-* set-extent-begin-glyph-layout: Extent Properties.
-* set-extent-end-glyph: Extent Properties.
-* set-extent-end-glyph-layout: Extent Properties.
-* set-extent-endpoints: Extent Endpoints.
-* set-extent-face: Extent Properties.
-* set-extent-initial-redisplay-function: Extent Properties.
-* set-extent-keymap: Extent Properties.
-* set-extent-mouse-face: Extent Properties.
-* set-extent-parent: Extent Parents.
-* set-extent-priority: Extent Properties.
-* set-extent-properties: Extent Properties.
-* set-extent-property: Extent Properties.
-* set-face-background: Face Convenience Functions.
-* set-face-background-pixmap: Face Convenience Functions.
-* set-face-font: Face Convenience Functions.
-* set-face-foreground: Face Convenience Functions.
-* set-face-property: Face Properties.
-* set-face-underline-p: Face Convenience Functions.
-* set-file-modes: Changing File Attributes.
-* set-frame-configuration: Frame Configurations.
-* set-frame-pointer: Mouse Pointer.
-* set-frame-position: Size and Position.
-* set-frame-properties: Property Access.
-* set-frame-property: Property Access.
-* set-frame-size: Size and Position.
-* set-glyph-baseline: Glyph Convenience Functions.
-* set-glyph-contrib-p: Glyph Convenience Functions.
-* set-glyph-face: Glyph Convenience Functions.
-* set-glyph-image: Glyph Convenience Functions.
-* set-glyph-property: Glyph Properties.
-* set-input-mode: Input Modes.
-* set-keymap-default-binding: Inheritance and Keymaps.
-* set-keymap-name: Creating Keymaps.
-* set-keymap-parents: Inheritance and Keymaps.
-* set-keymap-prompt: Other Keymap Functions.
-* set-left-margin: Margins.
-* set-mark: The Mark.
-* set-marker: Changing Markers.
-* set-match-data: Entire Match Data.
-* set-menubar: Menubar.
-* set-menubar-dirty-flag: Menubar.
-* set-process-buffer: Process Buffers.
-* set-process-filter: Filter Functions.
-* set-process-sentinel: Sentinels.
-* set-process-window-size: Process Window Size.
-* set-recent-keys-ring-size: Recording Input.
-* set-register: Registers.
-* set-right-margin: Margins.
-* set-specifier: Adding Specifications.
-* set-standard-case-table: Case Tables.
-* set-syntax-table: Syntax Table Functions.
-* set-text-properties: Changing Properties.
-* set-tooltalk-message-attribute: Elisp Interface for Sending Messages.
-* set-visited-file-modtime: Modification Time.
-* set-visited-file-name: Buffer File Name.
-* set-weak-list-list: Weak Lists.
-* set-window-buffer: Buffers and Windows.
-* set-window-buffer-dedicated: Choosing Window.
-* set-window-configuration: Window Configurations.
-* set-window-dedicated-p: Choosing Window.
-* set-window-hscroll: Horizontal Scrolling.
-* set-window-point: Window Point.
-* set-window-start: Window Start.
-* setcar: Setcar.
-* setcdr: Setcdr.
-* setenv: System Environment.
-* setplist: Object Plists.
-* setprv: System Environment.
-* setq: Setting Variables.
-* setq-default: Default Value.
-* sets: Sets And Lists.
-* setting modes of files: Changing File Attributes.
-* setting-constant: Constant Variables.
-* seventh: List Elements.
-* sexp motion: List Motion.
-* shadowing of variables: Local Variables.
-* shallow binding: Impl of Scope.
-* shared-lisp-mode-map: Standard Keymaps.
-* Shell mode modeline-format: Modeline Data.
-* shell-command-history: Minibuffer History.
-* shrink-window: Resizing Windows.
-* shrink-window-horizontally: Resizing Windows.
-* shrink-window-pixels: Resizing Windows.
-* side effect: Intro Eval.
-* signal: Signaling Errors.
-* signal-error: Signaling Errors.
-* signal-process: Signals to Processes.
-* signaling errors: Signaling Errors.
-* signals: Signals to Processes.
-* sin: Math Functions.
-* single-key-description: Describing Characters.
-* sinh: Math Functions.
-* sit-for: Waiting.
-* site-init.el: Building XEmacs.
-* site-load.el: Building XEmacs.
-* site-run-file: Init File.
-* site-start.el: Start-up Summary.
-* sixth: List Elements.
-* size of frame: Size and Position.
-* size of window: Size of Window.
-* skip-chars-backward: Skipping Characters.
-* skip-chars-forward: Skipping Characters.
-* skip-syntax-backward: Motion and Syntax.
-* skip-syntax-forward: Motion and Syntax.
-* skipping characters: Skipping Characters.
-* skipping comments: Parsing Expressions.
-* sleep-for: Waiting.
-* Snarf-documentation: Accessing Documentation.
-* sort: Rearrangement.
-* sort-columns: Sorting.
-* sort-fields: Sorting.
-* sort-lines: Sorting.
-* sort-numeric-fields: Sorting.
-* sort-pages: Sorting.
-* sort-paragraphs: Sorting.
-* sort-regexp-fields: Sorting.
-* sort-subr: Sorting.
-* sorting lists: Rearrangement.
-* sorting text: Sorting.
-* sound: Beeping.
-* sound-alist: Beeping.
-* special: Major Mode Conventions.
-* special form descriptions: A Sample Function Description.
-* special form evaluation: Special Forms.
-* special forms: Primitive Function Type.
-* special forms (Edebug): Instrumenting.
-* special forms for control structures: Control Structures.
-* special-display-buffer-names: Choosing Window.
-* special-display-frame-plist: Choosing Window.
-* special-display-function: Choosing Window.
-* special-display-popup-frame: Choosing Window.
-* special-display-regexps: Choosing Window.
-* specification (in a specifier): Specifiers In-Depth.
-* specifier: Specifiers.
-* specifier type: Specifier Type.
-* specifier, domain: Specifiers In-Depth.
-* specifier, fallback: Specifier Instancing.
-* specifier, inst-list: Specifiers In-Depth.
-* specifier, inst-pair: Specifiers In-Depth.
-* specifier, instance: Specifiers In-Depth.
-* specifier, instancing: Specifiers In-Depth.
-* specifier, instantiator: Specifiers In-Depth.
-* specifier, locale: Specifiers In-Depth.
-* specifier, specification: Specifiers In-Depth.
-* specifier, tag: Specifiers In-Depth.
-* specifier, tag set: Specifiers In-Depth.
-* specifier-fallback: Retrieving Specifications.
-* specifier-instance: Specifier Instancing Functions.
-* specifier-instance-from-inst-list: Specifier Instancing Functions.
-* specifier-locale-type-from-locale: Other Specification Functions.
-* specifier-spec-list: Retrieving Specifications.
-* specifier-specs: Retrieving Specifications.
-* specifier-tag-list: Specifier Tag Functions.
-* specifier-tag-predicate: Specifier Tag Functions.
-* specifier-type: Specifier Types.
-* specifierp: Specifiers.
-* speedups: Compilation Tips.
-* splicing (with backquote): Backquote.
-* split-height-threshold: Choosing Window.
-* split-line: Commands for Insertion.
-* split-path: Regexp Search.
-* split-string: Regexp Search.
-* split-window: Splitting Windows.
-* split-window-horizontally: Splitting Windows.
-* split-window-vertically: Splitting Windows.
-* splitting windows: Splitting Windows.
-* sqrt: Math Functions.
-* stable sort: Rearrangement.
-* standard regexps used in editing: Standard Regexps.
-* standard-case-table: Case Tables.
-* standard-category-table: Category Tables.
-* standard-input: Input Functions.
-* standard-output: Output Variables.
-* standard-syntax-table: Standard Syntax Tables.
-* standards of coding style: Tips.
-* start up of XEmacs: Start-up Summary.
-* start-process: Asynchronous Processes.
-* start-process-shell-command: Asynchronous Processes.
-* startup.el: Start-up Summary.
-* stop points: Using Edebug.
-* stop-process: Signals to Processes.
-* stopping an infinite loop: Infinite Loops.
-* stopping on events: Global Break Condition.
-* store-match-data: Entire Match Data.
-* stream (for printing): Output Streams.
-* stream (for reading): Input Streams.
-* string: Creating Strings.
-* string equality: Text Comparison.
-* string in keymap: Key Lookup.
-* string input stream: Input Streams.
-* string length: Sequence Functions.
-* string length, maximum when printing: Output Variables.
-* string properties: String Properties.
-* string search: String Search.
-* string to character: String Conversion.
-* string to number: String Conversion.
-* string to object: Input Functions.
-* string, writing a doc string: Documentation Basics.
-* string-equal: Text Comparison.
-* string-lessp: Text Comparison.
-* string-match: Regexp Search.
-* string-modified-tick: Modifying Strings.
-* string-to-char: String Conversion.
-* string-to-int: String Conversion.
-* string-to-number: String Conversion.
-* string<: Text Comparison.
-* string=: Text Comparison.
-* stringp: Predicates for Strings.
-* 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.
-* subsidiary-coding-system: Basic Coding System Functions.
-* subst-char-in-region: Substitution.
-* substitute-command-keys: Keys in Documentation.
-* substitute-in-file-name: File Name Expansion.
-* substitute-key-definition: Changing Key Bindings.
-* substituting keys in documentation: Keys in Documentation.
-* substring: Creating Strings.
-* subwindow type: Subwindow Type.
-* subwindow-image-instance-p: Image Instance Types.
-* subwindowp: Subwindows.
-* suppress-keymap: Changing Key Bindings.
-* suspend (cf. no-redraw-on-reenter): Refresh Screen.
-* suspend evaluation: Recursive Editing.
-* suspend-emacs: Suspending XEmacs.
-* suspend-hook: Suspending XEmacs.
-* suspend-resume-hook: Suspending XEmacs.
-* suspending XEmacs: Suspending XEmacs.
-* switch-to-buffer: Displaying Buffers.
-* switch-to-buffer-other-window: Displaying Buffers.
-* switches on command line: Command Line Arguments.
-* switching to a buffer: Displaying Buffers.
-* symbol: Symbols.
-* symbol components: Symbol Components.
-* symbol equality: Creating Symbols.
-* symbol evaluation: Symbol Forms.
-* symbol function indirection: Function Indirection.
-* symbol in keymap: Key Lookup.
-* symbol name hashing: Creating Symbols.
-* symbol-function: Function Cells.
-* symbol-name: Creating Symbols.
-* symbol-plist: Object Plists.
-* symbol-value: Accessing Variables.
-* symbolp: Symbols.
-* symbol constituent: Syntax Class Table.
-* synchronous subprocess: Synchronous Processes.
-* syntax classes: Syntax Descriptors.
-* syntax descriptor: Syntax Descriptors.
-* syntax error (Edebug): Backtracking.
-* syntax flags: Syntax Flags.
-* syntax for characters: Character Type.
-* syntax table: Syntax Tables.
-* syntax table example: Example Major Modes.
-* syntax table internals: Syntax Table Internals.
-* syntax tables in modes: Major Mode Conventions.
-* syntax-table: Syntax Table Functions.
-* syntax-table-p: Syntax Basics.
-* system-configuration: System Environment.
-* system-name: System Environment.
-* system-type: System Environment.
-* t: Constant Variables.
-* t and truth: nil and t.
-* t input stream: Input Streams.
-* t output stream: Output Streams.
-* tab: Character Type.
-* tab deletion: Deletion.
-* tab-stop-list: Indent Tabs.
-* tab-to-tab-stop: Indent Tabs.
-* tab-width: Usual Display.
-* tabs stops for indentation: Indent Tabs.
-* tag (in a specifier): Specifiers In-Depth.
-* tag on run time stack: Catch and Throw.
-* tag set (in a specifier): Specifiers In-Depth.
-* tan: Math Functions.
-* tanh: Math Functions.
-* TCP: Network.
-* temacs: Building XEmacs.
-* temp-buffer-show-function: Temporary Displays.
-* temp-directory: Unique File Names.
-* tenth: List Elements.
-* TERM environment variable: Terminal-Specific.
-* term-file-prefix: Terminal-Specific.
-* term-setup-hook: Terminal-Specific.
-* Termcap: Terminal-Specific.
-* terminal frame <1>: Frames.
-* terminal frame: Basic Windows.
-* terminal input: Terminal Input.
-* terminal input modes: Input Modes.
-* terminal output: Terminal Output.
-* terminal-device: Console Types and Device Classes.
-* terminal-specific initialization: Terminal-Specific.
-* terminate keyboard macro: Peeking and Discarding.
-* termscript file: Terminal Output.
-* terpri: Output Functions.
-* testing types: Type Predicates.
-* text: Text.
-* text files and binary files: Files and MS-DOS.
-* text insertion: Insertion.
-* text parsing: Syntax Tables.
-* text properties: Text Properties.
-* text properties in files: Saving Properties.
-* text-char-description: Describing Characters.
-* text-image-instance-p: Image Instance Types.
-* text-mode-abbrev-table: Standard Abbrev Tables.
-* text-mode-map: Standard Keymaps.
-* text-mode-syntax-table: Standard Syntax Tables.
-* text-pointer-glyph: Mouse Pointer.
-* text-properties-at: Examining Properties.
-* text-property-any: Property Search.
-* text-property-not-all: Property Search.
-* third: List Elements.
-* this-command: Command Loop Info.
-* this-command-keys: Command Loop Info.
-* throw: Catch and Throw.
-* throw example: Recursive Editing.
-* tiled windows: Basic Windows.
-* timeout-event-p: Event Predicates.
-* timing programs: Compilation Tips.
-* tips: Tips.
-* toggle-read-only: Read Only Buffers.
-* toolbar: Toolbar.
-* toolbar button type: Toolbar Button Type.
-* toolbar-buttons-captioned-p: Other Toolbar Variables.
-* toolbar-make-button-list: Toolbar Descriptor Format.
-* 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.
-* ToolTalk: ToolTalk Support.
-* ToolTalk message: Sending Messages.
-* ToolTalk pattern: Receiving Messages.
-* top-gutter: Specifying a Gutter.
-* top-gutter-height: Other Gutter Variables.
-* top-gutter-visible-p: Other Gutter Variables.
-* top-level: Recursive Editing.
-* top-level form: Loading.
-* top-toolbar: Specifying the Toolbar.
-* top-toolbar-height: Other Toolbar Variables.
-* top-toolbar-visible-p: Other Toolbar Variables.
-* tq-close: Transaction Queues.
-* tq-create: Transaction Queues.
-* tq-enqueue: Transaction Queues.
-* tracing: Tracing.
-* transaction queue: Transaction Queues.
-* transcendental functions: Math Functions.
-* translate-region: Substitution.
-* translating input events: Translating Input.
-* transpose-regions: Transposition.
-* true: nil and t.
-* truename (of file): Truenames.
-* truncate: Numeric Conversions.
-* truncate-lines: Truncation.
-* truncate-partial-width-windows: Truncation.
-* truncation-glyph: Redisplay Glyphs.
-* truth value: nil and t.
-* try-completion: Basic Completion.
-* two's complement: Integer Basics.
-* type: Lisp Data Types.
-* type checking: Type Predicates.
-* type predicates: Type Predicates.
-* type-of: Type Predicates.
-* unbinding keys: Key Binding Commands.
-* undefined: Functions for Key Lookup.
-* undefined in keymap: Key Lookup.
-* undefined key: Keymap Terminology.
-* undo avoidance: Substitution.
-* undo-boundary: Undo.
-* undo-limit: Maintaining Undo.
-* undo-strong-limit: Maintaining Undo.
-* unexec: Building XEmacs.
-* unhandled-file-name-directory: Magic File Names.
-* unintern: Creating Symbols.
-* uninterned symbol: Creating Symbols.
-* uninterned symbols, printing: Output Variables.
-* unique extents: Duplicable Extents.
-* universal-argument: Prefix Command Arguments.
-* unload-feature: Unloading.
-* unloading: Unloading.
-* unlock-buffer: File Locks.
-* unmap-frame-hook: Frame Hooks.
-* unread-command-event: Peeking and Discarding.
-* unread-command-events: Peeking and Discarding.
-* unreading: Input Streams.
-* unregister-tooltalk-pattern: Elisp Interface for Receiving Messages.
-* unwind-protect: Cleanups.
-* unwinding: Cleanups.
-* up-list: List Motion.
-* upcase: Character Case.
-* upcase-region: Case Changes.
-* upcase-word: Case Changes.
-* update display: Refresh Screen.
-* update-directory-autoloads: Autoload.
-* update-file-autoloads: Autoload.
-* upper case: Character Case.
-* upper case key sequence: Key Sequence Input.
-* use-global-map: Active Keymaps.
-* use-hard-newlines: Filling.
-* use-left-overflow: Margin Primitives.
-* use-local-map: Active Keymaps.
-* use-right-overflow: Margin Primitives.
-* user name completion subroutines: User Name Completion.
-* user option: Defining Variables.
-* user-defined error: Error Symbols.
-* user-full-name: User Identification.
-* user-home-directory: User Identification.
-* user-login-name: User Identification.
-* user-mail-address: User Identification.
-* user-name-all-completions: User Name Completion.
-* user-name-completion: User Name Completion.
-* user-name-completion-1: User Name Completion.
-* user-real-login-name: User Identification.
-* user-real-uid: User Identification.
-* user-uid: User Identification.
-* user-variable-p: Defining Variables.
-* user-variable-p example: High-Level Completion.
-* valid-char-table-type-p: Char Table Types.
-* valid-char-table-value-p: Working With Char Tables.
-* valid-device-class-p: Console Types and Device Classes.
-* valid-device-type-p: Console Types and Device Classes.
-* valid-glyph-type-p: Glyph Types.
-* valid-image-instance-type-p: Image Instance Types.
-* valid-image-instantiator-format-p: Image Specifiers.
-* valid-inst-list-p: Specifier Validation Functions.
-* valid-instantiator-p: Specifier Validation Functions.
-* valid-plist-p: Property Lists.
-* valid-spec-list-p: Specifier Validation Functions.
-* 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 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.
-* value of expression: Evaluation.
-* values: Eval.
-* variable: Variables.
-* variable aliases: Variable Aliases.
-* variable definition: Defining Variables.
-* variable descriptions: A Sample Variable Description.
-* variable limit error: Local Variables.
-* variable-alias: Variable Aliases.
-* variable-documentation: Documentation Basics.
-* variable-obsoleteness-doc: Obsoleteness.
-* variables, buffer-local: Buffer-Local Variables.
-* variables, indirect: Variable Aliases.
-* vc-mode: Modeline Variables.
-* vconcat: Vector Functions.
-* vector <1>: Vector Functions.
-* vector: Vectors.
-* vector evaluation: Self-Evaluating Forms.
-* vector length: Sequence Functions.
-* vectorp: Vector Functions.
-* verify-visited-file-modtime: Modification Time.
-* version number (in file name): File Name Components.
-* version-control: Numbered Backups.
-* vertical scrolling: Vertical Scrolling.
-* vertical tab: Character Type.
-* vertical-motion: Screen Lines.
-* vertical-motion-pixels: Screen Lines.
-* view-file: Visiting Functions.
-* view-mode-map: Standard Keymaps.
-* view-register: Registers.
-* visible frame: Visibility of Frames.
-* visible-bell: Beeping.
-* visible-frame-list: Finding All Frames.
-* visited file: Buffer File Name.
-* visited file mode: Auto Major Mode.
-* visited-file-modtime: Modification Time.
-* visiting files: Visiting Files.
-* void function: Function Indirection.
-* void function cell: Function Cells.
-* void variable: Void Variables.
-* void-function: Function Cells.
-* void-variable: Void Variables.
-* waiting: Waiting.
-* waiting for command key input: Peeking and Discarding.
-* waiting-for-user-input-p: Sentinels.
-* wakeup: Subprocess Creation.
-* walk-windows: Cyclic Window Ordering.
-* weak hash table: Weak Hash Tables.
-* weak list: Weak Lists.
-* weak list type: Weak List Type.
-* weak-list-list: Weak Lists.
-* weak-list-p: Weak Lists.
-* weak-list-type: Weak Lists.
-* where-is-internal: Scanning Keymaps.
-* while: Iteration.
-* whitespace: Character Type.
-* whitespace character: Syntax Class Table.
-* widen: Narrowing.
-* widening: Narrowing.
-* window: Basic Windows.
-* window configuration (Edebug): Edebug Display Update.
-* window configurations: Window Configurations.
-* window excursions: Excursions.
-* window ordering, cyclic: Cyclic Window Ordering.
-* window point: Window Point.
-* window position <1>: Position of Window.
-* window position: Window Point.
-* window resizing: Resizing Windows.
-* window size: Size of Window.
-* window size, changing: Resizing Windows.
-* window splitting: Splitting Windows.
-* window system types: Window-System Types.
-* window top line: Window Start.
-* window-buffer: Buffers and Windows.
-* window-configuration-p: Window Configurations.
-* window-dedicated-p: Choosing Window.
-* window-displayed-text-pixel-height: Size of Window.
-* window-end: Window Start.
-* window-frame: Frames and Windows.
-* window-height: Size of Window.
-* window-highest-p: Position of Window.
-* window-hscroll: Horizontal Scrolling.
-* window-left-margin-pixel-width: Margin Primitives.
-* window-live-p: Deleting Windows.
-* window-lowest-p: Position of Window.
-* window-min-height: Resizing Windows.
-* window-min-width: Resizing Windows.
-* window-minibuffer-p: Minibuffer Misc.
-* window-pixel-edges: Position of Window.
-* window-pixel-height: Size of Window.
-* window-pixel-width: Size of Window.
-* window-point: Window Point.
-* window-right-margin-pixel-width: Margin Primitives.
-* window-setup-hook: Terminal-Specific.
-* window-size-change-functions: Resizing Windows.
-* window-start: Window Start.
-* window-system objects: Faces and Window-System Objects.
-* window-text-area-pixel-edges: Position of Window.
-* window-text-area-pixel-height: Size of Window.
-* window-text-area-pixel-width: Size of Window.
-* window-width: Size of Window.
-* windowp: Basic Windows.
-* windows, controlling precisely: Buffers and Windows.
-* with-current-buffer: Excursions.
-* with-output-to-temp-buffer: Temporary Displays.
-* with-selected-frame: Input Focus.
-* with-temp-file: Excursions.
-* 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.
-* write-file: Saving Buffers.
-* write-file-hooks: Saving Buffers.
-* write-region: Writing to Files.
-* write-region-annotate-functions: Saving Properties.
-* writing a documentation string: Documentation Basics.
-* wrong-number-of-arguments: Argument List.
-* wrong-type-argument: Type Predicates.
-* X: X-Windows.
-* X resource type: X Resource Type.
-* X window frame: Frames.
-* x-allow-sendevents: X Miscellaneous.
-* x-bitmap-file-path <1>: X Miscellaneous.
-* x-bitmap-file-path: Image Specifiers.
-* x-debug-events: X Miscellaneous.
-* x-debug-mode: X Miscellaneous.
-* x-disown-selection: X Selections.
-* x-display-visual-class: Server Data.
-* x-emacs-application-class: Resources.
-* x-find-larger-font: Font Instance Size.
-* x-find-smaller-font: Font Instance Size.
-* x-font-size: Font Instance Size.
-* x-get-cutbuffer: X Selections.
-* x-get-resource: Resources.
-* x-get-selection: X Selections.
-* x-grab-keyboard: Grabs.
-* x-grab-pointer: Grabs.
-* x-library-search-path: X Miscellaneous.
-* x-make-font-bold: Font Instance Characteristics.
-* x-make-font-bold-italic: Font Instance Characteristics.
-* x-make-font-italic: Font Instance Characteristics.
-* x-make-font-unbold: Font Instance Characteristics.
-* x-make-font-unitalic: Font Instance Characteristics.
-* x-own-selection: X Selections.
-* x-put-resource: Resources.
-* x-server-vendor: Server Data.
-* x-server-version: Server Data.
-* x-set-frame-icon-pixmap: Frame Titles.
-* x-store-cutbuffer: X Selections.
-* x-ungrab-keyboard: Grabs.
-* x-ungrab-pointer: Grabs.
-* x-valid-keysym-name-p: X Miscellaneous.
-* x-window-id: X Miscellaneous.
-* X-Windows: X-Windows.
-* XEmacs event standard notation: Describing Characters.
-* xpm-color-symbols: Image Specifiers.
-* y-or-n-p: Yes-or-No Queries.
-* y-or-n-p-maybe-dialog-box: Yes-or-No Queries.
-* yank: Yank Commands.
-* yank suppression: Changing Key Bindings.
-* yank-pop: Yank Commands.
-* yes-or-no questions: Yes-or-No Queries.
-* yes-or-no-p: Yes-or-No Queries.
-* yes-or-no-p-dialog-box: Yes-or-No Queries.
-* yes-or-no-p-maybe-dialog-box: Yes-or-No Queries.
-* zero-length extent: Extent Endpoints.
-* zerop: Predicates on Numbers.
-* zmacs-activate-region: The Region.
-* zmacs-activate-region-hook: The Region.
-* zmacs-deactivate-region: The Region.
-* zmacs-deactivate-region-hook: The Region.
-* zmacs-region-stays: The Region.
-* zmacs-regions: The Region.
-* zmacs-update-region: The Region.
-* zmacs-update-region-hook: The Region.
-* | in regexp: Syntax of Regexps.
+File: lispref.info, Node: Standard Buffer-Local Variables, Next: Standard Keymaps, Prev: Standard Errors, Up: Top
+Buffer-Local Variables
+**********************
+ The table below lists the general-purpose Emacs variables that are
+automatically local (when set) in each buffer. Many Lisp packages
+define such variables for their internal use; we don't list them here.
+
+`abbrev-mode'
+ *note Abbrevs::
+
+`auto-fill-function'
+ *note Auto Filling::
+
+`buffer-auto-save-file-name'
+ *note Auto-Saving::
+
+`buffer-backed-up'
+ *note Backup Files::
+
+`buffer-display-table'
+ *note Display Tables::
+
+`buffer-file-format'
+ *note Format Conversion::
+
+`buffer-file-name'
+ *note Buffer File Name::
+
+`buffer-file-number'
+ *note Buffer File Name::
+
+`buffer-file-truename'
+ *note Buffer File Name::
+
+`buffer-file-type'
+ *note Files and MS-DOS::
+
+`buffer-invisibility-spec'
+ *note Invisible Text::
+
+`buffer-offer-save'
+ *note Saving Buffers::
+
+`buffer-read-only'
+ *note Read Only Buffers::
+
+`buffer-saved-size'
+ *note Point::
+
+`buffer-undo-list'
+ *note Undo::
+
+`cache-long-line-scans'
+ *note Text Lines::
+
+`case-fold-search'
+ *note Searching and Case::
+
+`ctl-arrow'
+ *note Usual Display::
+
+`comment-column'
+ *note Comments: (emacs)Comments.
+
+`default-directory'
+ *note System Environment::
+
+`defun-prompt-regexp'
+ *note List Motion::
+
+`fill-column'
+ *note Auto Filling::
+
+`goal-column'
+ *note Moving Point: (emacs)Moving Point.
+
+`left-margin'
+ *note Indentation::
+
+`local-abbrev-table'
+ *note Abbrevs::
+
+`local-write-file-hooks'
+ *note Saving Buffers::
+
+`major-mode'
+ *note Mode Help::
+
+`mark-active'
+ *note The Mark::
+
+`mark-ring'
+ *note The Mark::
+
+`minor-modes'
+ *note Minor Modes::
+
+`modeline-format'
+ *note Modeline Data::
+
+`modeline-buffer-identification'
+ *note Modeline Variables::
+
+`modeline-format'
+ *note Modeline Data::
+
+`modeline-modified'
+ *note Modeline Variables::
+
+`modeline-process'
+ *note Modeline Variables::
+
+`mode-name'
+ *note Modeline Variables::
+
+`overwrite-mode'
+ *note Insertion::
+
+`paragraph-separate'
+ *note Standard Regexps::
+
+`paragraph-start'
+ *note Standard Regexps::
+
+`point-before-scroll'
+ Used for communication between mouse commands and scroll-bar
+ commands.
+
+`require-final-newline'
+ *note Insertion::
+
+`selective-display'
+ *note Selective Display::
+
+`selective-display-ellipses'
+ *note Selective Display::
+
+`tab-width'
+ *note Usual Display::
+
+`truncate-lines'
+ *note Truncation::
+
+`vc-mode'
+ *note Modeline Variables::
+
+\1f
+File: lispref.info, Node: Standard Keymaps, Next: Standard Hooks, Prev: Standard Buffer-Local Variables, Up: Top
+
+Standard Keymaps
+****************
+
+ The following symbols are used as the names for various keymaps.
+Some of these exist when XEmacs is first started, others are loaded
+only when their respective mode is used. This is not an exhaustive
+list.
+
+ Almost all of these maps are used as local maps. Indeed, of the
+modes that presently exist, only Vip mode and Terminal mode ever change
+the global keymap.
+
+`bookmark-map'
+ A keymap containing bindings to bookmark functions.
+
+`Buffer-menu-mode-map'
+ A keymap used by Buffer Menu mode.
+
+`c++-mode-map'
+ A keymap used by C++ mode.
+
+`c-mode-map'
+ A keymap used by C mode. A sparse keymap used by C mode.
+
+`command-history-map'
+ A keymap used by Command History mode.
+
+`ctl-x-4-map'
+ A keymap for subcommands of the prefix `C-x 4'.
+
+`ctl-x-5-map'
+ A keymap for subcommands of the prefix `C-x 5'.
+
+`ctl-x-map'
+ A keymap for `C-x' commands.
+
+`debugger-mode-map'
+ A keymap used by Debugger mode.
+
+`dired-mode-map'
+ A keymap for `dired-mode' buffers.
+
+`edit-abbrevs-map'
+ A keymap used in `edit-abbrevs'.
+
+`edit-tab-stops-map'
+ A keymap used in `edit-tab-stops'.
+
+`electric-buffer-menu-mode-map'
+ A keymap used by Electric Buffer Menu mode.
+
+`electric-history-map'
+ A keymap used by Electric Command History mode.
+
+`emacs-lisp-mode-map'
+ A keymap used by Emacs Lisp mode.
+
+`help-map'
+ A keymap for characters following the Help key.
+
+`Helper-help-map'
+ A keymap used by the help utility package.
+ It has the same keymap in its value cell and in its function cell.
+
+`Info-edit-map'
+ A keymap used by the `e' command of Info.
+
+`Info-mode-map'
+ A keymap containing Info commands.
+
+`isearch-mode-map'
+ A keymap that defines the characters you can type within
+ incremental search.
+
+`itimer-edit-map'
+ A keymap used when in Itimer Edit mode.
+
+`lisp-interaction-mode-map'
+ A keymap used by Lisp mode.
+
+`lisp-mode-map'
+ A keymap used by Lisp mode.
+
+ A keymap for minibuffer input with completion.
+
+`minibuffer-local-isearch-map'
+ A keymap for editing isearch strings in the minibuffer.
+
+`minibuffer-local-map'
+ Default keymap to use when reading from the minibuffer.
+
+`minibuffer-local-must-match-map'
+ A keymap for minibuffer input with completion, for exact match.
+
+`mode-specific-map'
+ The keymap for characters following `C-c'. Note, this is in the
+ global map. This map is not actually mode specific: its name was
+ chosen to be informative for the user in `C-h b'
+ (`display-bindings'), where it describes the main use of the `C-c'
+ prefix key.
+
+`modeline-map'
+ The keymap consulted for mouse-clicks on the modeline of a window.
+
+`objc-mode-map'
+ A keymap used in Objective C mode as a local map.
+
+`occur-mode-map'
+ A local keymap used by Occur mode.
+
+`overriding-local-map'
+ A keymap that overrides all other local keymaps.
+
+`query-replace-map'
+ A local keymap used for responses in `query-replace' and related
+ commands; also for `y-or-n-p' and `map-y-or-n-p'. The functions
+ that use this map do not support prefix keys; they look up one
+ event at a time.
+
+`read-expression-map'
+ The minibuffer keymap used for reading Lisp expressions.
+
+`read-shell-command-map'
+ The minibuffer keymap used by shell-command and related commands.
+
+`shared-lisp-mode-map'
+ A keymap for commands shared by all sorts of Lisp modes.
+
+`text-mode-map'
+ A keymap used by Text mode.
+
+`toolbar-map'
+ The keymap consulted for mouse-clicks over a toolbar.
+
+`view-mode-map'
+ A keymap used by View mode.
+
+\1f
+File: lispref.info, Node: Standard Hooks, Next: Index, Prev: Standard Keymaps, Up: Top
+
+Standard Hooks
+**************
+
+ The following is a list of hook variables that let you provide
+functions to be called from within Emacs on suitable occasions.
+
+ Most of these variables have names ending with `-hook'. They are
+"normal hooks", run by means of `run-hooks'. The value of such a hook
+is a list of functions. The recommended way to put a new function on
+such a hook is to call `add-hook'. *Note Hooks::, for more information
+about using hooks.
+
+ The variables whose names end in `-function' have single functions
+as their values. Usually there is a specific reason why the variable is
+not a normal hook, such as the need to pass arguments to the function.
+(In older Emacs versions, some of these variables had names ending in
+`-hook' even though they were not normal hooks.)
+
+ The variables whose names end in `-hooks' or `-functions' have lists
+of functions as their values, but these functions are called in a
+special way (they are passed arguments, or else their values are used).
+
+`activate-menubar-hook'
+
+`activate-popup-menu-hook'
+
+`ad-definition-hooks'
+
+`adaptive-fill-function'
+
+`add-log-current-defun-function'
+
+`after-change-functions'
+
+`after-delete-annotation-hook'
+
+`after-init-hook'
+
+`after-insert-file-functions'
+
+`after-revert-hook'
+
+`after-save-hook'
+
+`after-set-visited-file-name-hooks'
+
+`after-write-file-hooks'
+
+`auto-fill-function'
+
+`auto-save-hook'
+
+`before-change-functions'
+
+`before-delete-annotation-hook'
+
+`before-init-hook'
+
+`before-revert-hook'
+
+`blink-paren-function'
+
+`buffers-menu-switch-to-buffer-function'
+
+`c++-mode-hook'
+
+`c-delete-function'
+
+`c-mode-common-hook'
+
+`c-mode-hook'
+
+`c-special-indent-hook'
+
+`calendar-load-hook'
+
+`change-major-mode-hook'
+
+`command-history-hook'
+
+`comment-indent-function'
+
+`compilation-buffer-name-function'
+
+`compilation-exit-message-function'
+
+`compilation-finish-function'
+
+`compilation-parse-errors-function'
+
+`compilation-mode-hook'
+
+`create-console-hook'
+
+`create-device-hook'
+
+`create-frame-hook'
+
+`dabbrev-friend-buffer-function'
+
+`dabbrev-select-buffers-function'
+
+`delete-console-hook'
+
+`delete-device-hook'
+
+`delete-frame-hook'
+
+`deselect-frame-hook'
+
+`diary-display-hook'
+
+`diary-hook'
+
+`dired-after-readin-hook'
+
+`dired-before-readin-hook'
+
+`dired-load-hook'
+
+`dired-mode-hook'
+
+`disabled-command-hook'
+
+`display-buffer-function'
+
+`ediff-after-setup-control-frame-hook'
+
+`ediff-after-setup-windows-hook'
+
+`ediff-before-setup-control-frame-hook'
+
+`ediff-before-setup-windows-hook'
+
+`ediff-brief-help-message-function'
+
+`ediff-cleanup-hook'
+
+`ediff-control-frame-position-function'
+
+`ediff-display-help-hook'
+
+`ediff-focus-on-regexp-matches-function'
+
+`ediff-forward-word-function'
+
+`ediff-hide-regexp-matches-function'
+
+`ediff-keymap-setup-hook'
+
+`ediff-load-hook'
+
+`ediff-long-help-message-function'
+
+`ediff-make-wide-display-function'
+
+`ediff-merge-split-window-function'
+
+`ediff-meta-action-function'
+
+`ediff-meta-redraw-function'
+
+`ediff-mode-hook'
+
+`ediff-prepare-buffer-hook'
+
+`ediff-quit-hook'
+
+`ediff-registry-setup-hook'
+
+`ediff-select-hook'
+
+`ediff-session-action-function'
+
+`ediff-session-group-setup-hook'
+
+`ediff-setup-diff-regions-function'
+
+`ediff-show-registry-hook'
+
+`ediff-show-session-group-hook'
+
+`ediff-skip-diff-region-function'
+
+`ediff-split-window-function'
+
+`ediff-startup-hook'
+
+`ediff-suspend-hook'
+
+`ediff-toggle-read-only-function'
+
+`ediff-unselect-hook'
+
+`ediff-window-setup-function'
+
+`edit-picture-hook'
+
+`electric-buffer-menu-mode-hook'
+
+`electric-command-history-hook'
+
+`electric-help-mode-hook'
+
+`emacs-lisp-mode-hook'
+
+`fill-paragraph-function'
+
+`find-file-hooks'
+
+`find-file-not-found-hooks'
+
+`first-change-hook'
+
+`font-lock-after-fontify-buffer-hook'
+
+`font-lock-beginning-of-syntax-function'
+
+`font-lock-mode-hook'
+
+`fume-found-function-hook'
+
+`fume-list-mode-hook'
+
+`fume-rescan-buffer-hook'
+
+`fume-sort-function'
+
+`gnus-startup-hook'
+
+`hack-local-variables-hook'
+
+`highlight-headers-follow-url-function'
+
+`hyper-apropos-mode-hook'
+
+`indent-line-function'
+
+`indent-mim-hook'
+
+`indent-region-function'
+
+`initial-calendar-window-hook'
+
+`isearch-mode-end-hook'
+
+`isearch-mode-hook'
+
+`java-mode-hook'
+
+`kill-buffer-hook'
+
+`kill-buffer-query-functions'
+
+`kill-emacs-hook'
+
+`kill-emacs-query-functions'
+
+`kill-hooks'
+
+`LaTeX-mode-hook'
+
+`latex-mode-hook'
+
+`ledit-mode-hook'
+
+`lisp-indent-function'
+
+`lisp-interaction-mode-hook'
+
+`lisp-mode-hook'
+
+`list-diary-entries-hook'
+
+`load-read-function'
+
+`log-message-filter-function'
+
+`m2-mode-hook'
+
+`mail-citation-hook'
+
+`mail-mode-hook'
+
+`mail-setup-hook'
+
+`make-annotation-hook'
+
+`makefile-mode-hook'
+
+`map-frame-hook'
+
+`mark-diary-entries-hook'
+
+`medit-mode-hook'
+
+`menu-no-selection-hook'
+
+`mh-compose-letter-hook'
+
+`mh-folder-mode-hook'
+
+`mh-letter-mode-hook'
+
+`mim-mode-hook'
+
+`minibuffer-exit-hook'
+
+`minibuffer-setup-hook'
+
+`mode-motion-hook'
+
+`mouse-enter-frame-hook'
+
+`mouse-leave-frame-hook'
+
+`mouse-track-cleanup-hook'
+
+`mouse-track-click-hook'
+
+`mouse-track-down-hook'
+
+`mouse-track-drag-hook'
+
+`mouse-track-drag-up-hook'
+
+`mouse-track-up-hook'
+
+`mouse-yank-function'
+
+`news-mode-hook'
+
+`news-reply-mode-hook'
+
+`news-setup-hook'
+
+`nongregorian-diary-listing-hook'
+
+`nongregorian-diary-marking-hook'
+
+`nroff-mode-hook'
+
+`objc-mode-hook'
+
+`outline-mode-hook'
+
+`perl-mode-hook'
+
+`plain-TeX-mode-hook'
+
+`post-command-hook'
+
+`post-gc-hook'
+
+`pre-abbrev-expand-hook'
+
+`pre-command-hook'
+
+`pre-display-buffer-function'
+
+`pre-gc-hook'
+
+`pre-idle-hook'
+
+`print-diary-entries-hook'
+
+`prolog-mode-hook'
+
+`protect-innocence-hook'
+
+`remove-message-hook'
+
+`revert-buffer-function'
+
+`revert-buffer-insert-contents-function'
+
+`rmail-edit-mode-hook'
+
+`rmail-mode-hook'
+
+`rmail-retry-setup-hook'
+
+`rmail-summary-mode-hook'
+
+`scheme-indent-hook'
+
+`scheme-mode-hook'
+
+`scribe-mode-hook'
+
+`select-frame-hook'
+
+`send-mail-function'
+
+`shell-mode-hook'
+
+`shell-set-directory-error-hook'
+
+`special-display-function'
+
+`suspend-hook'
+
+`suspend-resume-hook'
+
+`temp-buffer-show-function'
+
+`term-setup-hook'
+
+`terminal-mode-hook'
+
+`terminal-mode-break-hook'
+
+`TeX-mode-hook'
+
+`tex-mode-hook'
+
+`text-mode-hook'
+
+`today-visible-calendar-hook'
+
+`today-invisible-calendar-hook'
+
+`tooltalk-message-handler-hook'
+
+`tooltalk-pattern-handler-hook'
+
+`tooltalk-unprocessed-message-hook'
+
+`unmap-frame-hook'
+
+`vc-checkin-hook'
+
+`vc-checkout-writable-buffer-hook'
+
+`vc-log-after-operation-hook'
+
+`vc-make-buffer-writable-hook'
+
+`view-hook'
+
+`vm-arrived-message-hook'
+
+`vm-arrived-messages-hook'
+
+`vm-chop-full-name-function'
+
+`vm-display-buffer-hook'
+
+`vm-edit-message-hook'
+
+`vm-forward-message-hook'
+
+`vm-iconify-frame-hook'
+
+`vm-inhibit-write-file-hook'
+
+`vm-key-functions'
+
+`vm-mail-hook'
+
+`vm-mail-mode-hook'
+
+`vm-menu-setup-hook'
+
+`vm-mode-hook'
+
+`vm-quit-hook'
+
+`vm-rename-current-buffer-function'
+
+`vm-reply-hook'
+
+`vm-resend-bounced-message-hook'
+
+`vm-resend-message-hook'
+
+`vm-retrieved-spooled-mail-hook'
+
+`vm-select-message-hook'
+
+`vm-select-new-message-hook'
+
+`vm-select-unread-message-hook'
+
+`vm-send-digest-hook'
+
+`vm-summary-mode-hook'
+
+`vm-summary-pointer-update-hook'
+
+`vm-summary-redo-hook'
+
+`vm-summary-update-hook'
+
+`vm-undisplay-buffer-hook'
+
+`vm-visit-folder-hook'
+
+`window-setup-hook'
+
+`write-contents-hooks'
+
+`write-file-data-hooks'
+
+`write-file-hooks'
+
+`write-region-annotate-functions'
+
+`x-lost-selection-hooks'
+
+`x-sent-selection-hooks'
+
+`zmacs-activate-region-hook'
+
+`zmacs-deactivate-region-hook'
+
+`zmacs-update-region-hook'
String Properties
=================
- Similar to symbols, extents, faces, and glyphs, you can attach
+ Just as with symbols, extents, faces, and glyphs, you can attach
additional information to strings in the form of "string properties".
These differ from text properties, which are logically attached to
particular characters in the string.
To attach a property to a string, use `put'. To retrieve a property
from a string, use `get'. You can also use `remprop' to remove a
-property from a string and `object-props' to retrieve a list of all the
+property from a string and `object-plist' to retrieve a list of all the
properties in a string.
\1f
Symbol Properties
=================
- A "property list" ("plist" for short) is a list of paired elements
-stored in the property list cell of a symbol. Each of the pairs
+ A "property list" ("plist" for short) is a list of paired elements,
+often stored in the property list cell of a symbol. Each of the pairs
associates a property name (usually a symbol) with a property or value.
Property lists are generally used to record information about a
symbol, such as its documentation as a variable, the name of the file
where it was defined, or perhaps even the grammatical class of the
symbol (representing a word) in a language-understanding system.
- Many objects other than symbols can have property lists associated
-with them, and XEmacs provides a full complement of functions for
-working with property lists. *Note Property Lists::.
+ Some objects which are not symbols also have property lists
+associated with them, and XEmacs provides a full complement of
+functions for working with property lists. *Note Property Lists::.
The property names and values in a property list can be any Lisp
objects, but the names are usually symbols. They are compared using
* Plists and Alists:: Comparison of the advantages of property
lists and association lists.
-* Symbol Plists:: Functions to access symbols' property lists.
+* Object Plists:: Functions to access objects' property lists.
* Other Plists:: Accessing property lists stored elsewhere.
\1f
-File: lispref.info, Node: Plists and Alists, Next: Symbol Plists, Up: Symbol Properties
+File: lispref.info, Node: Plists and Alists, Next: Object Plists, Up: Symbol Properties
Property Lists and Association Lists
------------------------------------
possible with a property list.
\1f
-File: lispref.info, Node: Symbol Plists, Next: Other Plists, Prev: Plists and Alists, Up: Symbol Properties
+File: lispref.info, Node: Object Plists, Next: Other Plists, Prev: Plists and Alists, Up: Symbol Properties
-Property List Functions for Symbols
+Property List Functions for Objects
-----------------------------------
+ Once upon a time, only symbols had property lists. Now, several
+other object types, including strings, extents, faces and glyphs also
+have property lists.
+
- Function: symbol-plist symbol
This function returns the property list of SYMBOL.
+ - Function: object-plist object
+ This function returns the property list of OBJECT. If OBJECT is a
+ symbol, this is identical to `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
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::). But generally, its use is discouraged. Use `put'
+ instead. `setplist' can only be used with symbols, not other
+ object types.
- - Function: get symbol property
+ - Function: get object property &optional default
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'
- and the absence of the property.
+ OBJECT's property list. If there is no such property, `default'
+ (which itself defaults to `nil') is returned.
- The name PROPERTY is compared with the existing property names
- using `eq', so any object is a legitimate property.
+ PROPERTY is compared with the existing properties using `eq', so
+ any object is a legitimate property.
See `put' for an example.
- - Function: put symbol property value
- This function puts VALUE onto SYMBOL's property list under the
+ - Function: put object property value
+ This function puts VALUE onto OBJECT's property list under the
property name PROPERTY, replacing any previous property value.
The `put' function returns VALUE.
=> (a buzzing little bug)
(get 'fly 'verb)
=> transitive
- (symbol-plist 'fly)
+ (object-plist 'fly)
=> (verb transitive noun (a buzzing little bug))
+ - Function: remprop object property
+ This function removes the entry for PROPERTY from the property
+ list of OBJECT. It returns `t' if the property was indeed found
+ and removed, or `nil' if there was no such property. (This
+ function was probably omitted from Emacs originally because, since
+ `get' did not allow a DEFAULT, it was very difficult to
+ distinguish between a missing property and a property whose value
+ was `nil'; thus, setting a property to `nil' was close enough to
+ `remprop' for most purposes.)
+
\1f
-File: lispref.info, Node: Other Plists, Prev: Symbol Plists, Up: Symbol Properties
+File: lispref.info, Node: Other Plists, Prev: Object Plists, Up: Symbol Properties
-Property Lists Outside Symbols
-------------------------------
+Property Lists Not Associated with Objects
+------------------------------------------
These functions are useful for manipulating property lists that are
stored in places other than symbols:
* Autoloading:: Functions set up to load files
containing their real definitions.
-\1f
-File: lispref.info, Node: Self-Evaluating Forms, Next: Symbol Forms, Up: Forms
-
-Self-Evaluating Forms
----------------------
-
- A "self-evaluating form" is any form that is not a list or symbol.
-Self-evaluating forms evaluate to themselves: the result of evaluation
-is the same object that was evaluated. Thus, the number 25 evaluates to
-25, and the string `"foo"' evaluates to the string `"foo"'. Likewise,
-evaluation of a vector does not cause evaluation of the elements of the
-vector--it returns the same vector with its contents unchanged.
-
- '123 ; An object, shown without evaluation.
- => 123
- 123 ; Evaluated as usual--result is the same.
- => 123
- (eval '123) ; Evaluated "by hand"--result is the same.
- => 123
- (eval (eval '123)) ; Evaluating twice changes nothing.
- => 123
-
- It is common to write numbers, characters, strings, and even vectors
-in Lisp code, taking advantage of the fact that they self-evaluate.
-However, it is quite unusual to do this for types that lack a read
-syntax, because there's no way to write them textually. It is possible
-to construct Lisp expressions containing these types by means of a Lisp
-program. Here is an example:
-
- ;; Build an expression containing a buffer object.
- (setq buffer (list 'print (current-buffer)))
- => (print #<buffer eval.texi>)
- ;; Evaluate it.
- (eval buffer)
- -| #<buffer eval.texi>
- => #<buffer eval.texi>
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Self-Evaluating Forms, Next: Symbol Forms, Up: Forms
+
+Self-Evaluating Forms
+---------------------
+
+ A "self-evaluating form" is any form that is not a list or symbol.
+Self-evaluating forms evaluate to themselves: the result of evaluation
+is the same object that was evaluated. Thus, the number 25 evaluates to
+25, and the string `"foo"' evaluates to the string `"foo"'. Likewise,
+evaluation of a vector does not cause evaluation of the elements of the
+vector--it returns the same vector with its contents unchanged.
+
+ '123 ; An object, shown without evaluation.
+ => 123
+ 123 ; Evaluated as usual--result is the same.
+ => 123
+ (eval '123) ; Evaluated "by hand"--result is the same.
+ => 123
+ (eval (eval '123)) ; Evaluating twice changes nothing.
+ => 123
+
+ It is common to write numbers, characters, strings, and even vectors
+in Lisp code, taking advantage of the fact that they self-evaluate.
+However, it is quite unusual to do this for types that lack a read
+syntax, because there's no way to write them textually. It is possible
+to construct Lisp expressions containing these types by means of a Lisp
+program. Here is an example:
+
+ ;; Build an expression containing a buffer object.
+ (setq buffer (list 'print (current-buffer)))
+ => (print #<buffer eval.texi>)
+ ;; Evaluate it.
+ (eval buffer)
+ -| #<buffer eval.texi>
+ => #<buffer eval.texi>
+
+\1f
File: lispref.info, Node: Symbol Forms, Next: Classifying Lists, Prev: Self-Evaluating Forms, Up: Forms
Symbol Forms
\1f
Indirect:
xemacs-faq.info-1: 205
-xemacs-faq.info-2: 50061
-xemacs-faq.info-3: 99308
-xemacs-faq.info-4: 149302
-xemacs-faq.info-5: 196381
+xemacs-faq.info-2: 50086
+xemacs-faq.info-3: 99259
+xemacs-faq.info-4: 149253
+xemacs-faq.info-5: 196332
\1f
Tag Table:
(Indirect)
Node: Top\7f205
-Node: Introduction\7f16631
-Node: Q1.0.1\7f20034
-Node: Q1.0.2\7f20570
-Node: Q1.0.3\7f21065
-Node: Q1.0.4\7f21327
-Node: Q1.0.5\7f22777
-Node: Q1.0.6\7f23466
-Node: Q1.0.7\7f24472
-Node: Q1.0.8\7f24721
-Node: Q1.0.9\7f24936
-Node: Q1.0.10\7f25214
-Node: Q1.0.11\7f25457
-Node: Q1.0.12\7f25892
-Node: Q1.0.13\7f26260
-Node: Q1.0.14\7f26509
-Node: Q1.1.1\7f26983
-Node: Q1.1.2\7f28060
-Node: Q1.1.3\7f28453
-Node: Q1.2.1\7f29404
-Node: Q1.2.2\7f30460
-Node: Q1.2.3\7f30894
-Node: Q1.3.1\7f31978
-Node: Q1.3.2\7f35894
-Node: Q1.3.3\7f36449
-Node: Q1.3.4\7f36690
-Node: Q1.3.5\7f37479
-Node: Q1.3.6\7f39894
-Node: Q1.3.7\7f41431
-Node: Q1.4.1\7f42366
-Node: Q1.4.2\7f43228
-Node: Q1.4.3\7f43569
-Node: Q1.4.4\7f43988
-Node: Q1.4.5\7f45528
-Node: Q1.4.6\7f45832
-Node: Installation\7f46825
-Node: Q2.0.1\7f49188
-Node: Q2.0.2\7f50061
-Node: Q2.0.3\7f57513
-Node: Q2.0.4\7f58811
-Node: Q2.0.5\7f59403
-Node: Q2.0.6\7f59771
-Node: Q2.0.7\7f60152
-Node: Q2.0.8\7f60533
-Node: Q2.0.9\7f62110
-Node: Q2.0.10\7f63548
-Node: Q2.0.11\7f64392
-Node: Q2.0.12\7f65333
-Node: Q2.1.1\7f66855
-Node: Q2.1.2\7f69597
-Node: Q2.1.3\7f70774
-Node: Q2.1.4\7f72067
-Node: Q2.1.5\7f72866
-Node: Q2.1.6\7f73228
-Node: Q2.1.7\7f73705
-Node: Q2.1.8\7f74058
-Node: Q2.1.9\7f75592
-Node: Q2.1.10\7f76014
-Node: Q2.1.11\7f76771
-Node: Q2.1.12\7f77636
-Node: Q2.1.13\7f78591
-Node: Q2.1.14\7f79622
-Node: Q2.1.15\7f80733
-Node: Q2.1.16\7f87765
-Node: Q2.1.17\7f88459
-Node: Q2.1.18\7f89056
-Node: Q2.1.19\7f89183
-Node: Q2.1.20\7f89713
-Node: Q2.1.21\7f90095
-Node: Q2.1.22\7f90288
-Node: Q2.1.23\7f91585
-Node: Q2.1.24\7f92253
-Node: Customization\7f92783
-Node: Q3.0.1\7f97621
-Node: Q3.0.2\7f98327
-Node: Q3.0.3\7f98891
-Node: Q3.0.4\7f99308
-Node: Q3.0.5\7f100141
-Node: Q3.0.6\7f100922
-Node: Q3.0.7\7f101502
-Node: Q3.0.8\7f102166
-Node: Q3.0.9\7f103124
-Node: Q3.1.1\7f103685
-Node: Q3.1.2\7f104422
-Node: Q3.1.3\7f104853
-Node: Q3.1.4\7f105042
-Node: Q3.1.5\7f105231
-Node: Q3.1.6\7f105615
-Node: Q3.1.7\7f106324
-Node: Q3.1.8\7f108548
-Node: Q3.2.1\7f109090
-Node: Q3.2.2\7f110743
-Node: Q3.2.3\7f111542
-Node: Q3.2.4\7f112144
-Node: Q3.2.5\7f113178
-Node: Q3.2.6\7f113645
-Node: Q3.3.1\7f114607
-Node: Q3.3.2\7f115000
-Node: Q3.3.3\7f115631
-Node: Q3.3.4\7f116012
-Node: Q3.3.5\7f117113
-Node: Q3.4.1\7f118607
-Node: Q3.4.2\7f119250
-Node: Q3.5.1\7f119762
-Node: Q3.5.2\7f121211
-Node: Q3.5.3\7f121629
-Node: Q3.5.4\7f122467
-Node: Q3.5.5\7f123299
-Node: Q3.5.6\7f124439
-Node: Q3.5.7\7f125429
-Node: Q3.5.8\7f126869
-Node: Q3.5.9\7f127616
-Node: Q3.5.10\7f128396
-Node: Q3.5.11\7f129032
-Node: Q3.6.1\7f129585
-Node: Q3.6.2\7f130330
-Node: Q3.6.3\7f130758
-Node: Q3.7.1\7f131258
-Node: Q3.7.2\7f132146
-Node: Q3.7.3\7f132805
-Node: Q3.7.4\7f133227
-Node: Q3.7.5\7f133570
-Node: Q3.7.6\7f134038
-Node: Q3.7.7\7f134753
-Node: Q3.7.8\7f135773
-Node: Q3.8.1\7f136192
-Node: Q3.8.2\7f136652
-Node: Q3.8.3\7f137115
-Node: Q3.8.4\7f137721
-Node: Q3.8.5\7f138440
-Node: Q3.9.1\7f139225
-Node: Q3.9.2\7f140165
-Node: Q3.9.3\7f140763
-Node: Q3.9.4\7f141425
-Node: Q3.10.1\7f142304
-Node: Q3.10.2\7f143122
-Node: Q3.10.3\7f144127
-Node: Q3.10.4\7f144855
-Node: Q3.10.5\7f145238
-Node: Subsystems\7f146290
-Node: Q4.0.1\7f148777
-Node: Q4.0.2\7f149302
-Node: Q4.0.3\7f149860
-Node: Q4.0.4\7f150181
-Node: Q4.0.5\7f150423
-Node: Q4.0.6\7f150654
-Node: Q4.0.7\7f151242
-Node: Q4.0.8\7f151567
-Node: Q4.0.9\7f152794
-Node: Q4.0.10\7f154832
-Node: Q4.0.11\7f155321
-Node: Q4.0.12\7f156199
-Node: Q4.1.1\7f157172
-Node: Q4.1.2\7f157575
-Node: Q4.1.3\7f157902
-Node: Q4.2.1\7f158211
-Node: Q4.2.2\7f158841
-Node: Q4.2.3\7f159081
-Node: Q4.2.4\7f159625
-Node: Q4.3.1\7f160278
-Node: Q4.3.2\7f160862
-Node: Q4.3.3\7f162343
-Node: Q4.3.4\7f162615
-Node: Q4.3.5\7f163292
-Node: Q4.4.1\7f163920
-Node: Q4.4.2\7f165406
-Node: Q4.5.1\7f166610
-Node: Q4.6.1\7f167379
-Node: Q4.7.1\7f172639
-Node: Q4.7.2\7f173594
-Node: Q4.7.3\7f173891
-Node: Q4.7.4\7f174077
-Node: Q4.7.5\7f174961
-Node: Q4.7.6\7f176602
-Node: Miscellaneous\7f176891
-Node: Q5.0.1\7f180308
-Node: Q5.0.2\7f181047
-Node: Q5.0.3\7f181901
-Node: Q5.0.4\7f182603
-Node: Q5.0.5\7f183542
-Node: Q5.0.6\7f185522
-Node: Q5.0.7\7f186179
-Node: Q5.0.8\7f186784
-Node: Q5.0.9\7f187303
-Node: Q5.0.10\7f187817
-Node: Q5.0.11\7f188065
-Node: Q5.0.12\7f188603
-Node: Q5.0.13\7f189520
-Node: Q5.0.14\7f190204
-Node: Q5.0.15\7f190969
-Node: Q5.0.16\7f191266
-Node: Q5.0.17\7f191778
-Node: Q5.0.18\7f192043
-Node: Q5.0.19\7f192237
-Node: Q5.0.20\7f192661
-Node: Q5.1.1\7f193576
-Node: Q5.1.2\7f195645
-Node: Q5.1.3\7f196381
-Node: Q5.1.4\7f199775
-Node: Q5.1.5\7f200310
-Node: Q5.1.6\7f202434
-Node: Q5.1.7\7f203920
-Node: Q5.1.8\7f205521
-Node: Q5.1.9\7f206073
-Node: Q5.1.10\7f206958
-Node: Q5.1.11\7f208089
-Node: Q5.2.1\7f208638
-Node: Q5.2.2\7f209208
-Node: Q5.2.3\7f209625
-Node: Q5.2.4\7f209860
-Node: Q5.3.1\7f210770
-Node: Q5.3.2\7f211991
-Node: Q5.3.3\7f212767
-Node: Q5.3.4\7f213251
-Node: Q5.3.5\7f213918
-Node: Q5.3.6\7f214787
-Node: Q5.3.7\7f215032
-Node: Q5.3.8\7f217222
-Node: Q5.3.9\7f217469
-Node: Q5.3.10\7f218422
-Node: Q5.3.11\7f220506
-Node: Q5.3.12\7f222097
-Node: MS Windows\7f223371
-Node: Q6.0.1\7f224777
-Node: Q6.0.2\7f225524
-Node: Q6.0.3\7f225989
-Node: Q6.0.4\7f226269
-Node: Q6.1.1\7f228548
-Node: Q6.1.2\7f229419
-Node: Q6.1.3\7f229700
-Node: Q6.1.4\7f229982
-Node: Q6.1.5\7f230360
-Node: Q6.1.6\7f231192
-Node: Q6.2.1\7f231776
-Node: Q6.2.2\7f232677
-Node: Q6.2.3\7f233089
-Node: Q6.3.1\7f233378
-Node: Q6.3.2\7f234472
-Node: Q6.3.3\7f237653
-Node: Current Events\7f237907
-Node: Q7.0.1\7f238561
-Node: Q7.0.2\7f239200
-Node: Q7.0.3\7f240273
-Node: Q7.0.4\7f240501
+Node: Introduction\7f16702
+Node: Q1.0.1\7f20105
+Node: Q1.0.2\7f20641
+Node: Q1.0.3\7f21136
+Node: Q1.0.4\7f21398
+Node: Q1.0.5\7f22848
+Node: Q1.0.6\7f23537
+Node: Q1.0.7\7f24543
+Node: Q1.0.8\7f24792
+Node: Q1.0.9\7f25007
+Node: Q1.0.10\7f25285
+Node: Q1.0.11\7f25528
+Node: Q1.0.12\7f25917
+Node: Q1.0.13\7f26285
+Node: Q1.0.14\7f26534
+Node: Q1.1.1\7f27008
+Node: Q1.1.2\7f28085
+Node: Q1.1.3\7f28478
+Node: Q1.2.1\7f29429
+Node: Q1.2.2\7f30485
+Node: Q1.2.3\7f30919
+Node: Q1.3.1\7f32003
+Node: Q1.3.2\7f35919
+Node: Q1.3.3\7f36474
+Node: Q1.3.4\7f36715
+Node: Q1.3.5\7f37504
+Node: Q1.3.6\7f39919
+Node: Q1.3.7\7f41456
+Node: Q1.4.1\7f42391
+Node: Q1.4.2\7f43253
+Node: Q1.4.3\7f43594
+Node: Q1.4.4\7f44013
+Node: Q1.4.5\7f45553
+Node: Q1.4.6\7f45857
+Node: Installation\7f46850
+Node: Q2.0.1\7f49213
+Node: Q2.0.2\7f50086
+Node: Q2.0.3\7f57538
+Node: Q2.0.4\7f58836
+Node: Q2.0.5\7f59428
+Node: Q2.0.6\7f59796
+Node: Q2.0.7\7f60177
+Node: Q2.0.8\7f60558
+Node: Q2.0.9\7f62135
+Node: Q2.0.10\7f63573
+Node: Q2.0.11\7f64417
+Node: Q2.0.12\7f65358
+Node: Q2.1.1\7f66880
+Node: Q2.1.2\7f69622
+Node: Q2.1.3\7f70799
+Node: Q2.1.4\7f72092
+Node: Q2.1.5\7f72891
+Node: Q2.1.6\7f73253
+Node: Q2.1.7\7f73730
+Node: Q2.1.8\7f74083
+Node: Q2.1.9\7f75617
+Node: Q2.1.10\7f76039
+Node: Q2.1.11\7f76796
+Node: Q2.1.12\7f77661
+Node: Q2.1.13\7f78616
+Node: Q2.1.14\7f79647
+Node: Q2.1.15\7f80758
+Node: Q2.1.16\7f87790
+Node: Q2.1.17\7f88484
+Node: Q2.1.18\7f89081
+Node: Q2.1.19\7f89208
+Node: Q2.1.20\7f89738
+Node: Q2.1.21\7f90120
+Node: Q2.1.22\7f90313
+Node: Q2.1.23\7f91610
+Node: Q2.1.24\7f92278
+Node: Customization\7f92734
+Node: Q3.0.1\7f97572
+Node: Q3.0.2\7f98278
+Node: Q3.0.3\7f98842
+Node: Q3.0.4\7f99259
+Node: Q3.0.5\7f100092
+Node: Q3.0.6\7f100873
+Node: Q3.0.7\7f101453
+Node: Q3.0.8\7f102117
+Node: Q3.0.9\7f103075
+Node: Q3.1.1\7f103636
+Node: Q3.1.2\7f104373
+Node: Q3.1.3\7f104804
+Node: Q3.1.4\7f104993
+Node: Q3.1.5\7f105182
+Node: Q3.1.6\7f105566
+Node: Q3.1.7\7f106275
+Node: Q3.1.8\7f108499
+Node: Q3.2.1\7f109041
+Node: Q3.2.2\7f110694
+Node: Q3.2.3\7f111493
+Node: Q3.2.4\7f112095
+Node: Q3.2.5\7f113129
+Node: Q3.2.6\7f113596
+Node: Q3.3.1\7f114521
+Node: Q3.3.2\7f114951
+Node: Q3.3.3\7f115582
+Node: Q3.3.4\7f115963
+Node: Q3.3.5\7f117064
+Node: Q3.4.1\7f118558
+Node: Q3.4.2\7f119201
+Node: Q3.5.1\7f119713
+Node: Q3.5.2\7f121162
+Node: Q3.5.3\7f121580
+Node: Q3.5.4\7f122418
+Node: Q3.5.5\7f123250
+Node: Q3.5.6\7f124390
+Node: Q3.5.7\7f125380
+Node: Q3.5.8\7f126820
+Node: Q3.5.9\7f127567
+Node: Q3.5.10\7f128347
+Node: Q3.5.11\7f128983
+Node: Q3.6.1\7f129536
+Node: Q3.6.2\7f130281
+Node: Q3.6.3\7f130709
+Node: Q3.7.1\7f131209
+Node: Q3.7.2\7f132097
+Node: Q3.7.3\7f132756
+Node: Q3.7.4\7f133178
+Node: Q3.7.5\7f133521
+Node: Q3.7.6\7f133989
+Node: Q3.7.7\7f134704
+Node: Q3.7.8\7f135724
+Node: Q3.8.1\7f136143
+Node: Q3.8.2\7f136603
+Node: Q3.8.3\7f137066
+Node: Q3.8.4\7f137672
+Node: Q3.8.5\7f138391
+Node: Q3.9.1\7f139176
+Node: Q3.9.2\7f140116
+Node: Q3.9.3\7f140714
+Node: Q3.9.4\7f141376
+Node: Q3.10.1\7f142255
+Node: Q3.10.2\7f143073
+Node: Q3.10.3\7f144078
+Node: Q3.10.4\7f144806
+Node: Q3.10.5\7f145189
+Node: Subsystems\7f146241
+Node: Q4.0.1\7f148728
+Node: Q4.0.2\7f149253
+Node: Q4.0.3\7f149811
+Node: Q4.0.4\7f150132
+Node: Q4.0.5\7f150374
+Node: Q4.0.6\7f150605
+Node: Q4.0.7\7f151193
+Node: Q4.0.8\7f151518
+Node: Q4.0.9\7f152745
+Node: Q4.0.10\7f154783
+Node: Q4.0.11\7f155272
+Node: Q4.0.12\7f156150
+Node: Q4.1.1\7f157123
+Node: Q4.1.2\7f157526
+Node: Q4.1.3\7f157853
+Node: Q4.2.1\7f158162
+Node: Q4.2.2\7f158792
+Node: Q4.2.3\7f159032
+Node: Q4.2.4\7f159576
+Node: Q4.3.1\7f160229
+Node: Q4.3.2\7f160813
+Node: Q4.3.3\7f162294
+Node: Q4.3.4\7f162566
+Node: Q4.3.5\7f163243
+Node: Q4.4.1\7f163871
+Node: Q4.4.2\7f165357
+Node: Q4.5.1\7f166561
+Node: Q4.6.1\7f167330
+Node: Q4.7.1\7f172590
+Node: Q4.7.2\7f173545
+Node: Q4.7.3\7f173842
+Node: Q4.7.4\7f174028
+Node: Q4.7.5\7f174912
+Node: Q4.7.6\7f176553
+Node: Miscellaneous\7f176842
+Node: Q5.0.1\7f180259
+Node: Q5.0.2\7f180998
+Node: Q5.0.3\7f181852
+Node: Q5.0.4\7f182554
+Node: Q5.0.5\7f183493
+Node: Q5.0.6\7f185473
+Node: Q5.0.7\7f186130
+Node: Q5.0.8\7f186735
+Node: Q5.0.9\7f187254
+Node: Q5.0.10\7f187768
+Node: Q5.0.11\7f188016
+Node: Q5.0.12\7f188554
+Node: Q5.0.13\7f189471
+Node: Q5.0.14\7f190155
+Node: Q5.0.15\7f190920
+Node: Q5.0.16\7f191217
+Node: Q5.0.17\7f191729
+Node: Q5.0.18\7f191994
+Node: Q5.0.19\7f192188
+Node: Q5.0.20\7f192612
+Node: Q5.1.1\7f193527
+Node: Q5.1.2\7f195596
+Node: Q5.1.3\7f196332
+Node: Q5.1.4\7f199726
+Node: Q5.1.5\7f200261
+Node: Q5.1.6\7f202385
+Node: Q5.1.7\7f203871
+Node: Q5.1.8\7f205472
+Node: Q5.1.9\7f206024
+Node: Q5.1.10\7f206909
+Node: Q5.1.11\7f208040
+Node: Q5.2.1\7f208589
+Node: Q5.2.2\7f209159
+Node: Q5.2.3\7f209576
+Node: Q5.2.4\7f209811
+Node: Q5.3.1\7f210721
+Node: Q5.3.2\7f211942
+Node: Q5.3.3\7f212718
+Node: Q5.3.4\7f213202
+Node: Q5.3.5\7f213869
+Node: Q5.3.6\7f214738
+Node: Q5.3.7\7f214983
+Node: Q5.3.8\7f217173
+Node: Q5.3.9\7f217420
+Node: Q5.3.10\7f218373
+Node: Q5.3.11\7f220457
+Node: Q5.3.12\7f222048
+Node: MS Windows\7f223322
+Node: Q6.0.1\7f224799
+Node: Q6.0.2\7f225546
+Node: Q6.0.3\7f226011
+Node: Q6.0.4\7f226291
+Node: Q6.1.1\7f228570
+Node: Q6.1.2\7f229441
+Node: Q6.1.3\7f229722
+Node: Q6.1.4\7f230004
+Node: Q6.1.5\7f230382
+Node: Q6.1.6\7f231214
+Node: Q6.2.1\7f231798
+Node: Q6.2.2\7f232699
+Node: Q6.2.3\7f233111
+Node: Q6.3.1\7f233400
+Node: Q6.3.2\7f234494
+Node: Q6.3.3\7f237675
+Node: Q6.4.1\7f237944
+Node: Current Events\7f239032
+Node: Q7.0.1\7f239686
+Node: Q7.0.2\7f240325
+Node: Q7.0.3\7f241398
+Node: Q7.0.4\7f241626
\1f
End Tag Table
* 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?
+Troubleshooting:
+* Q6.4.1:: XEmacs won't start on Windows. (NEW)
+
Current Events:
* Q7.0.1:: What is new in 20.2?
----------------------------------------------------
Yes, there is a port of XEmacs 19.14, tested on MacOS 7.6.1 and MacOS
-8.5.1 by Pitts Jarvis (pjarvis@ispchannel.com). It's available at
-http://my.ispchannel.com/~pjarvis/xemacs.html
-(http://my.ispchannel.com/~pjarvis/xemacs.html).
+8.5.1 by Pitts Jarvis <pjarvis@ispchannel.com>. It's available at
+`http://my.ispchannel.com/~pjarvis/xemacs.html'.
\1f
File: xemacs-faq.info, Node: Q1.0.12, Next: Q1.0.13, Prev: Q1.0.11, Up: Introduction
Q2.1.24: XEmacs won't start without network. (NEW)
---------------------------------------------------
- Q2.1.23: Movemail on Linux does not work for XEmacs 19.15 and later.
-
If XEmacs starts when you're on the network, but fails when you're
not on the network, you may be missing a "localhost" entry in your
`/etc/hosts' file. The file should contain an entry like:
edit-faces'.
-3.3: The Modeline
-=================
-
\1f
File: xemacs-faq.info, Node: Q3.3.1, Next: Q3.3.2, Prev: Q3.2.6, Up: Customization
+3.3: The Modeline
+=================
+
Q3.3.1: How can I make the modeline go away?
--------------------------------------------
* 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?
+Troubleshooting:
+* Q6.4.1:: XEmacs won't start on Windows. (NEW)
+
\1f
File: xemacs-faq.info, Node: Q6.0.1, Next: Q6.0.2, Prev: MS Windows, Up: MS Windows
\1f
-File: xemacs-faq.info, Node: Q6.3.3, Prev: Q6.3.2, Up: MS Windows
+File: xemacs-faq.info, Node: Q6.3.3, Next: Q6.4.1, 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: Q6.4.1, Prev: Q6.3.3, Up: MS Windows
+
+6.3: Troubleshooting
+====================
+
+Q6.4.1 XEmacs won't start on Windows. (NEW)
+-------------------------------------------
+
+ XEmacs relies on a process called "dumping" to generate a working
+executable. Under MS-Windows this process effectively fixes the memory
+addresses of information in the executable. When XEmacs starts up it
+tries to reserve these memory addresses so that the dumping process can
+be reversed - putting the information back at the correct addresses.
+Unfortunately some .dlls (For instance the soundblaster driver) occupy
+memory addresses that can conflict with those needed by the dumped
+XEmacs executable. In this instance XEmacs will fail to start without
+any explanation. Note that this is extremely machine specific.
+
+ Work is being done on fixes for 21.1.* that will make more
+intelligent guesses about which memory addresses will be free and so
+this should cure the problem for most people.
+
+ 21.2 implements "portable dumping" which will eliminate the problem
+altogether.
+
+\1f
File: xemacs-faq.info, Node: Current Events, Prev: MS Windows, Up: Top
7 What the Future Holds
\1f
Indirect:
xemacs.info-1: 1350
-xemacs.info-2: 47935
-xemacs.info-3: 95913
-xemacs.info-4: 144439
-xemacs.info-5: 189703
-xemacs.info-6: 237773
-xemacs.info-7: 286800
-xemacs.info-8: 336141
-xemacs.info-9: 383895
-xemacs.info-10: 433201
-xemacs.info-11: 483034
-xemacs.info-12: 532929
-xemacs.info-13: 582109
-xemacs.info-14: 631472
-xemacs.info-15: 681291
-xemacs.info-16: 729785
-xemacs.info-17: 778484
-xemacs.info-18: 828140
-xemacs.info-19: 872498
-xemacs.info-20: 921169
-xemacs.info-21: 963076
+xemacs.info-2: 48915
+xemacs.info-3: 96893
+xemacs.info-4: 145419
+xemacs.info-5: 193446
+xemacs.info-6: 243306
+xemacs.info-7: 290410
+xemacs.info-8: 339182
+xemacs.info-9: 388710
+xemacs.info-10: 438339
+xemacs.info-11: 485732
+xemacs.info-12: 535325
+xemacs.info-13: 582878
+xemacs.info-14: 632686
+xemacs.info-15: 677477
+xemacs.info-16: 727101
+xemacs.info-17: 775368
+xemacs.info-18: 825010
+xemacs.info-19: 849389
+xemacs.info-20: 881042
+xemacs.info-21: 930187
+xemacs.info-22: 972577
\1f
Tag Table:
(Indirect)
Node: Top\7f1350
-Node: License\7f22506
-Node: Distrib\7f35788
-Node: Intro\7f37452
-Node: Frame\7f40323
-Node: Point\7f43591
-Node: Echo Area\7f45558
-Node: Mode Line\7f47935
-Node: XEmacs under X\7f52366
-Node: Keystrokes\7f55543
-Node: Intro to Keystrokes\7f56387
-Node: Representing Keystrokes\7f58490
-Node: Key Sequences\7f59847
-Node: String Key Sequences\7f63187
-Node: Meta Key\7f63570
-Node: Super and Hyper Keys\7f65043
-Node: Character Representation\7f71288
-Node: Commands\7f72308
-Node: Pull-down Menus\7f75157
-Node: File Menu\7f78506
-Node: Edit Menu\7f82328
-Node: Apps Menu\7f84711
-Node: Options Menu\7f85201
-Node: Buffers Menu\7f89181
-Node: Tools Menu\7f89488
-Node: Help Menu\7f89979
-Node: Menu Customization\7f90380
-Node: Entering Emacs\7f94610
-Node: Exiting\7f95913
-Node: Command Switches\7f99004
-Node: Startup Paths\7f108191
-Node: Basic\7f115771
-Node: Blank Lines\7f125249
-Node: Continuation Lines\7f126675
-Node: Position Info\7f128107
-Node: Arguments\7f131240
-Node: Undo\7f134377
-Node: Minibuffer\7f137324
-Node: Minibuffer File\7f139934
-Node: Minibuffer Edit\7f141739
-Node: Completion\7f144439
-Node: Completion Example\7f146370
-Node: Completion Commands\7f147464
-Node: Strict Completion\7f150120
-Node: Completion Options\7f151901
-Node: Minibuffer History\7f153195
-Node: Repetition\7f156379
-Node: M-x\7f159212
-Node: Help\7f164306
-Node: Mark\7f174225
-Node: Setting Mark\7f176079
-Node: Using Region\7f179201
-Node: Marking Objects\7f179938
-Node: Mark Ring\7f181776
-Node: Mouse Selection\7f183492
-Node: Additional Mouse Operations\7f185499
-Node: Killing\7f189703
-Node: Yanking\7f195339
-Node: Kill Ring\7f196142
-Node: Appending Kills\7f197744
-Node: Earlier Kills\7f199781
-Node: Using X Selections\7f202394
-Node: X Clipboard Selection\7f203644
-Node: X Selection Commands\7f205821
-Node: X Cut Buffers\7f206907
-Node: Active Regions\7f208266
-Node: Accumulating Text\7f212846
-Node: Rectangles\7f215919
-Node: Registers\7f219438
-Node: RegPos\7f220892
-Node: RegText\7f222048
-Node: RegRect\7f223154
-Node: RegConfig\7f224033
-Node: RegNumbers\7f224973
-Node: RegFiles\7f225691
-Node: Bookmarks\7f226349
-Node: Display\7f229721
-Node: Scrolling\7f231216
-Node: Horizontal Scrolling\7f235359
-Node: Selective Display\7f236554
-Node: Display Vars\7f237773
-Node: Search\7f240451
-Node: Incremental Search\7f241644
-Node: Non-Incremental Search\7f250571
-Node: Word Search\7f252013
-Node: Regexp Search\7f253631
-Node: Regexps\7f255167
-Node: Search Case\7f265468
-Node: Replace\7f266249
-Node: Unconditional Replace\7f267197
-Node: Regexp Replace\7f268332
-Node: Replacement and Case\7f269267
-Node: Query Replace\7f270247
-Node: Other Repeating Search\7f273474
-Node: Fixit\7f274729
-Node: Kill Errors\7f275309
-Node: Transpose\7f276642
-Node: Fixing Case\7f279046
-Node: Spelling\7f279692
-Node: Files\7f281153
-Node: File Names\7f282463
-Node: Visiting\7f286800
-Node: Saving\7f293486
-Node: Backup\7f298409
-Node: Backup Names\7f299805
-Node: Backup Deletion\7f301288
-Node: Backup Copying\7f302447
-Node: Interlocking\7f304153
-Node: Reverting\7f308281
-Node: Auto Save\7f310193
-Node: Auto Save Files\7f311160
-Node: Auto Save Control\7f313001
-Node: Recover\7f314839
-Node: Version Control\7f315994
-Node: Concepts of VC\7f318032
-Node: Editing with VC\7f319642
-Node: Variables for Check-in/out\7f324898
-Node: Log Entries\7f326797
-Node: Change Logs and VC\7f327977
-Node: Old Versions\7f331244
-Node: VC Status\7f333247
-Node: Renaming and VC\7f334961
-Node: Snapshots\7f335640
-Node: Making Snapshots\7f336141
-Node: Snapshot Caveats\7f337434
-Node: Version Headers\7f339243
-Node: ListDir\7f341942
-Node: Comparing Files\7f343991
-Node: Dired\7f345524
-Node: Dired Enter\7f346195
-Node: Dired Edit\7f347020
-Node: Dired Deletion\7f348767
-Node: Dired Immed\7f351990
-Node: Misc File Ops\7f353266
-Node: Buffers\7f355754
-Node: Select Buffer\7f357912
-Node: List Buffers\7f359707
-Node: Misc Buffer\7f361465
-Node: Kill Buffer\7f363108
-Node: Several Buffers\7f364238
-Node: Windows\7f368104
-Node: Basic Window\7f368815
-Node: Split Window\7f370534
-Node: Other Window\7f372667
-Node: Pop Up Window\7f375096
-Node: Change Window\7f376601
-Node: Mule\7f379509
-Node: Mule Intro\7f380772
-Node: Language Environments\7f381788
-Node: Input Methods\7f383895
-Node: Select Input Method\7f387615
-Node: Coding Systems\7f389770
-Node: Recognize Coding\7f393956
-Node: Specify Coding\7f397282
-Node: Major Modes\7f402213
-Node: Choosing Modes\7f404432
-Node: Indentation\7f406822
-Node: Indentation Commands\7f408917
-Node: Tab Stops\7f411646
-Node: Just Spaces\7f413495
-Node: Text\7f414310
-Node: Text Mode\7f416293
-Node: Nroff Mode\7f418372
-Node: TeX Mode\7f420015
-Node: TeX Editing\7f422267
-Node: TeX Print\7f425701
-Node: Outline Mode\7f428920
-Node: Outline Format\7f430401
-Node: Outline Motion\7f433201
-Node: Outline Visibility\7f434754
-Node: Words\7f437675
-Node: Sentences\7f440622
-Node: Paragraphs\7f442818
-Node: Pages\7f445106
-Node: Filling\7f447706
-Node: Auto Fill\7f448277
-Node: Fill Commands\7f450424
-Node: Fill Prefix\7f452589
-Node: Case\7f454777
-Node: Programs\7f456805
-Node: Program Modes\7f459354
-Node: Lists\7f461586
-Node: Defuns\7f467426
-Node: Grinding\7f470079
-Node: Basic Indent\7f470707
-Node: Multi-line Indent\7f472728
-Node: Lisp Indent\7f474344
-Node: C Indent\7f477794
-Node: Matching\7f483034
-Node: Comments\7f484556
-Node: Balanced Editing\7f491008
-Node: Lisp Completion\7f492022
-Node: Documentation\7f493037
-Node: Change Log\7f494276
-Node: Tags\7f496854
-Node: Tag Syntax\7f498503
-Node: Create Tags Table\7f502447
-Node: Etags Regexps\7f506507
-Node: Select Tags Table\7f511165
-Node: Find Tag\7f514938
-Node: Tags Search\7f517902
-Node: List Tags\7f521358
-Node: Fortran\7f522387
-Node: Fortran Motion\7f523463
-Node: Fortran Indent\7f524283
-Node: ForIndent Commands\7f524968
-Node: ForIndent Num\7f526113
-Node: ForIndent Conv\7f527387
-Node: ForIndent Vars\7f528163
-Node: Fortran Comments\7f529331
-Node: Fortran Columns\7f532929
-Node: Fortran Abbrev\7f534352
-Node: Asm Mode\7f535261
-Node: Running\7f535813
-Node: Compilation\7f536783
-Node: Lisp Modes\7f541633
-Node: Lisp Libraries\7f542906
-Node: Loading\7f543460
-Node: Compiling Libraries\7f547920
-Node: Mocklisp\7f550811
-Node: Lisp Eval\7f551488
-Node: Lisp Debug\7f555128
-Node: Lisp Interaction\7f560553
-Node: External Lisp\7f561908
-Node: Packages\7f563982
-Node: Package Terminology\7f564723
-Node: Using Packages\7f566081
-Node: Building Packages\7f574940
-Node: Abbrevs\7f577462
-Node: Defining Abbrevs\7f579662
-Node: Expanding Abbrevs\7f582109
-Node: Editing Abbrevs\7f584811
-Node: Saving Abbrevs\7f586684
-Node: Dynamic Abbrevs\7f588624
-Node: Picture\7f589926
-Node: Basic Picture\7f592359
-Node: Insert in Picture\7f594644
-Node: Tabs in Picture\7f596066
-Node: Rectangles in Picture\7f597587
-Node: Sending Mail\7f599495
-Node: Mail Format\7f601206
-Node: Mail Headers\7f602556
-Node: Mail Mode\7f608964
-Node: Reading Mail\7f612577
-Node: Calendar/Diary\7f614152
-Node: Calendar Motion\7f615824
-Node: Calendar Unit Motion\7f616707
-Node: Move to Beginning or End\7f619030
-Node: Specified Dates\7f620163
-Node: Scroll Calendar\7f621051
-Node: Mark and Region\7f622842
-Node: General Calendar\7f624748
-Node: LaTeX Calendar\7f626356
-Node: Holidays\7f628370
-Node: Sunrise/Sunset\7f631472
-Node: Lunar Phases\7f634515
-Node: Other Calendars\7f635900
-Node: Calendar Systems\7f637387
-Node: To Other Calendar\7f640498
-Node: From Other Calendar\7f642489
-Node: Mayan Calendar\7f644794
-Node: Diary\7f647989
-Node: Diary Commands\7f649738
-Node: Format of Diary File\7f653044
-Node: Date Formats\7f655914
-Node: Adding to Diary\7f658488
-Node: Special Diary Entries\7f660119
-Node: Calendar Customization\7f665458
-Node: Calendar Customizing\7f666320
-Node: Holiday Customizing\7f669539
-Node: Date Display Format\7f676007
-Node: Time Display Format\7f676965
-Node: Daylight Savings\7f678103
-Node: Diary Customizing\7f681291
-Node: Hebrew/Islamic Entries\7f685912
-Node: Fancy Diary Display\7f689252
-Node: Included Diary Files\7f691149
-Node: Sexp Diary Entries\7f692130
-Node: Appt Customizing\7f697220
-Node: Sorting\7f698266
-Node: Shell\7f703072
-Node: Single Shell\7f704365
-Node: Interactive Shell\7f705964
-Node: Shell Mode\7f709729
-Node: Terminal emulator\7f712220
-Node: Term Mode\7f714529
-Node: Paging in Term\7f715443
-Node: Narrowing\7f716241
-Node: Hardcopy\7f718191
-Node: Recursive Edit\7f719163
-Node: Dissociated Press\7f722150
-Node: CONX\7f724713
-Node: Amusements\7f725737
-Node: Emulation\7f726217
-Node: Customization\7f728061
-Node: Minor Modes\7f729785
-Node: Variables\7f731417
-Node: Examining\7f733373
-Node: Easy Customization\7f734834
-Node: Customization Groups\7f735848
-Node: Changing an Option\7f738777
-Node: Face Customization\7f745033
-Node: Specific Customization\7f746797
-Node: Edit Options\7f749404
-Node: Locals\7f750988
-Node: File Variables\7f754167
-Node: Keyboard Macros\7f758721
-Node: Basic Kbd Macro\7f760892
-Node: Save Kbd Macro\7f762824
-Node: Kbd Macro Query\7f764493
-Node: Key Bindings\7f766435
-Node: Keymaps\7f767309
-Node: Rebinding\7f771159
-Node: Interactive Rebinding\7f771858
-Node: Programmatic Rebinding\7f774050
-Node: Key Bindings Using Strings\7f776857
-Node: Disabling\7f778484
-Node: Syntax\7f780256
-Node: Syntax Entry\7f781137
-Node: Syntax Change\7f785221
-Node: Init File\7f787390
-Node: Init Syntax\7f788895
-Node: Init Examples\7f791247
-Node: Terminal Init\7f795437
-Node: Audible Bell\7f797147
-Node: Faces\7f800578
-Node: X Resources\7f805415
-Node: Geometry Resources\7f807063
-Node: Iconic Resources\7f809511
-Node: Resource List\7f809983
-Node: Face Resources\7f816490
-Node: Widgets\7f820167
-Node: Menubar Resources\7f821106
-Node: Quitting\7f822039
-Node: Lossage\7f825017
-Node: Stuck Recursive\7f825661
-Node: Screen Garbled\7f826367
-Node: Text Garbled\7f827501
-Node: Unasked-for Search\7f828140
-Node: Emergency Escape\7f828925
-Node: Total Frustration\7f830704
-Node: Bugs\7f831335
-Node: Glossary\7f840869
-Node: Manifesto\7f872498
-Node: Key Index\7f895974
-Node: Command Index\7f921169
-Node: Variable Index\7f963076
-Node: Concept Index\7f979213
+Node: License\7f22810
+Node: Distrib\7f36092
+Node: Intro\7f37756
+Node: Frame\7f40627
+Node: Point\7f44571
+Node: Echo Area\7f46538
+Node: Mode Line\7f48915
+Node: XEmacs under X\7f53346
+Node: Keystrokes\7f56523
+Node: Intro to Keystrokes\7f57367
+Node: Representing Keystrokes\7f59470
+Node: Key Sequences\7f60827
+Node: String Key Sequences\7f64167
+Node: Meta Key\7f64550
+Node: Super and Hyper Keys\7f66023
+Node: Character Representation\7f72268
+Node: Commands\7f73288
+Node: Pull-down Menus\7f76137
+Node: File Menu\7f79486
+Node: Edit Menu\7f83308
+Node: Apps Menu\7f85691
+Node: Options Menu\7f86181
+Node: Buffers Menu\7f90161
+Node: Tools Menu\7f90468
+Node: Help Menu\7f90959
+Node: Menu Customization\7f91360
+Node: Entering Emacs\7f95590
+Node: Exiting\7f96893
+Node: Command Switches\7f99984
+Node: Startup Paths\7f109171
+Node: Basic\7f116751
+Node: Blank Lines\7f126229
+Node: Continuation Lines\7f127655
+Node: Position Info\7f129087
+Node: Arguments\7f132220
+Node: Undo\7f135357
+Node: Minibuffer\7f138304
+Node: Minibuffer File\7f140914
+Node: Minibuffer Edit\7f142719
+Node: Completion\7f145419
+Node: Completion Example\7f147350
+Node: Completion Commands\7f148444
+Node: Strict Completion\7f151100
+Node: Completion Options\7f152881
+Node: Minibuffer History\7f154175
+Node: Repetition\7f157359
+Node: M-x\7f160192
+Node: Help\7f165286
+Node: Help Summary\7f166696
+Node: Key Help\7f169482
+Node: Name Help\7f170441
+Node: Apropos\7f173086
+Node: Library Keywords\7f176205
+Node: Help Mode\7f178526
+Node: Misc Help\7f179023
+Node: Mark\7f182172
+Node: Setting Mark\7f184026
+Node: Using Region\7f187148
+Node: Marking Objects\7f187885
+Node: Mark Ring\7f189723
+Node: Mouse Selection\7f191439
+Node: Additional Mouse Operations\7f193446
+Node: Killing\7f197650
+Node: Yanking\7f203286
+Node: Kill Ring\7f204089
+Node: Appending Kills\7f205691
+Node: Earlier Kills\7f207728
+Node: Using X Selections\7f210341
+Node: X Clipboard Selection\7f211591
+Node: X Selection Commands\7f213768
+Node: X Cut Buffers\7f214854
+Node: Active Regions\7f216213
+Node: Accumulating Text\7f220793
+Node: Rectangles\7f223866
+Node: Registers\7f227385
+Node: RegPos\7f228839
+Node: RegText\7f229995
+Node: RegRect\7f231101
+Node: RegConfig\7f231980
+Node: RegNumbers\7f232920
+Node: RegFiles\7f233638
+Node: Bookmarks\7f234296
+Node: Display\7f237668
+Node: Scrolling\7f239163
+Node: Horizontal Scrolling\7f243306
+Node: Selective Display\7f244501
+Node: Display Vars\7f245720
+Node: Search\7f248398
+Node: Incremental Search\7f249591
+Node: Non-Incremental Search\7f258518
+Node: Word Search\7f259960
+Node: Regexp Search\7f261578
+Node: Regexps\7f263114
+Node: Search Case\7f273415
+Node: Replace\7f274196
+Node: Unconditional Replace\7f275144
+Node: Regexp Replace\7f276279
+Node: Replacement and Case\7f277214
+Node: Query Replace\7f278194
+Node: Other Repeating Search\7f281421
+Node: Fixit\7f282676
+Node: Kill Errors\7f283256
+Node: Transpose\7f284589
+Node: Fixing Case\7f286993
+Node: Spelling\7f287639
+Node: Files\7f289100
+Node: File Names\7f290410
+Node: Visiting\7f294747
+Node: Saving\7f301433
+Node: Backup\7f306356
+Node: Backup Names\7f307752
+Node: Backup Deletion\7f309235
+Node: Backup Copying\7f310385
+Node: Interlocking\7f312091
+Node: Reverting\7f316219
+Node: Auto Save\7f318131
+Node: Auto Save Files\7f319098
+Node: Auto Save Control\7f320939
+Node: Recover\7f322777
+Node: Version Control\7f323932
+Node: Concepts of VC\7f325970
+Node: Editing with VC\7f327580
+Node: Variables for Check-in/out\7f332836
+Node: Log Entries\7f334735
+Node: Change Logs and VC\7f335915
+Node: Old Versions\7f339182
+Node: VC Status\7f341185
+Node: Renaming and VC\7f342899
+Node: Snapshots\7f343578
+Node: Making Snapshots\7f344079
+Node: Snapshot Caveats\7f345372
+Node: Version Headers\7f347181
+Node: ListDir\7f349880
+Node: Comparing Files\7f351929
+Node: Dired\7f353462
+Node: Dired Enter\7f354133
+Node: Dired Edit\7f354958
+Node: Dired Deletion\7f356705
+Node: Dired Immed\7f359928
+Node: Misc File Ops\7f361204
+Node: Buffers\7f363692
+Node: Select Buffer\7f365850
+Node: List Buffers\7f367645
+Node: Misc Buffer\7f369403
+Node: Kill Buffer\7f371046
+Node: Several Buffers\7f372176
+Node: Windows\7f376042
+Node: Basic Window\7f376753
+Node: Split Window\7f378472
+Node: Other Window\7f380605
+Node: Pop Up Window\7f383034
+Node: Change Window\7f384539
+Node: Mule\7f387447
+Node: Mule Intro\7f388710
+Node: Language Environments\7f389726
+Node: Input Methods\7f391833
+Node: Select Input Method\7f395553
+Node: Coding Systems\7f397708
+Node: Recognize Coding\7f401894
+Node: Specify Coding\7f405220
+Node: Major Modes\7f410151
+Node: Choosing Modes\7f412370
+Node: Indentation\7f414760
+Node: Indentation Commands\7f416855
+Node: Tab Stops\7f419584
+Node: Just Spaces\7f421433
+Node: Text\7f422248
+Node: Text Mode\7f424231
+Node: Nroff Mode\7f426310
+Node: TeX Mode\7f427953
+Node: TeX Editing\7f430205
+Node: TeX Print\7f433639
+Node: Outline Mode\7f436858
+Node: Outline Format\7f438339
+Node: Outline Motion\7f441139
+Node: Outline Visibility\7f442692
+Node: Words\7f445613
+Node: Sentences\7f448560
+Node: Paragraphs\7f450756
+Node: Pages\7f453044
+Node: Filling\7f455644
+Node: Auto Fill\7f456215
+Node: Fill Commands\7f458362
+Node: Fill Prefix\7f460527
+Node: Case\7f462715
+Node: Programs\7f464743
+Node: Program Modes\7f467292
+Node: Lists\7f469524
+Node: Defuns\7f475364
+Node: Grinding\7f478017
+Node: Basic Indent\7f478645
+Node: Multi-line Indent\7f480666
+Node: Lisp Indent\7f482282
+Node: C Indent\7f485732
+Node: Matching\7f490972
+Node: Comments\7f492494
+Node: Balanced Editing\7f498946
+Node: Lisp Completion\7f499960
+Node: Documentation\7f500975
+Node: Change Log\7f502214
+Node: Tags\7f504792
+Node: Tag Syntax\7f506441
+Node: Create Tags Table\7f510385
+Node: Etags Regexps\7f514445
+Node: Select Tags Table\7f519103
+Node: Find Tag\7f522876
+Node: Tags Search\7f525840
+Node: List Tags\7f529296
+Node: Fortran\7f530325
+Node: Fortran Motion\7f531401
+Node: Fortran Indent\7f532221
+Node: ForIndent Commands\7f532906
+Node: ForIndent Num\7f534051
+Node: ForIndent Conv\7f535325
+Node: ForIndent Vars\7f536101
+Node: Fortran Comments\7f537269
+Node: Fortran Columns\7f540867
+Node: Fortran Abbrev\7f542290
+Node: Asm Mode\7f543199
+Node: Running\7f543751
+Node: Compilation\7f544721
+Node: Lisp Modes\7f549571
+Node: Lisp Libraries\7f550844
+Node: Loading\7f551398
+Node: Compiling Libraries\7f555858
+Node: Mocklisp\7f558749
+Node: Lisp Eval\7f559426
+Node: Lisp Debug\7f563066
+Node: Lisp Interaction\7f568491
+Node: External Lisp\7f569846
+Node: Packages\7f571920
+Node: Package Terminology\7f572661
+Node: Using Packages\7f574019
+Node: Building Packages\7f582878
+Node: Abbrevs\7f585400
+Node: Defining Abbrevs\7f587600
+Node: Expanding Abbrevs\7f590047
+Node: Editing Abbrevs\7f592749
+Node: Saving Abbrevs\7f594622
+Node: Dynamic Abbrevs\7f596562
+Node: Picture\7f597864
+Node: Basic Picture\7f600297
+Node: Insert in Picture\7f602582
+Node: Tabs in Picture\7f604004
+Node: Rectangles in Picture\7f605525
+Node: Sending Mail\7f607433
+Node: Mail Format\7f609144
+Node: Mail Headers\7f610494
+Node: Mail Mode\7f616902
+Node: Reading Mail\7f620515
+Node: Calendar/Diary\7f622090
+Node: Calendar Motion\7f623762
+Node: Calendar Unit Motion\7f624645
+Node: Move to Beginning or End\7f626968
+Node: Specified Dates\7f628101
+Node: Scroll Calendar\7f628989
+Node: Mark and Region\7f630780
+Node: General Calendar\7f632686
+Node: LaTeX Calendar\7f634294
+Node: Holidays\7f636308
+Node: Sunrise/Sunset\7f639410
+Node: Lunar Phases\7f642453
+Node: Other Calendars\7f643838
+Node: Calendar Systems\7f645325
+Node: To Other Calendar\7f648436
+Node: From Other Calendar\7f650427
+Node: Mayan Calendar\7f652732
+Node: Diary\7f655927
+Node: Diary Commands\7f657676
+Node: Format of Diary File\7f660982
+Node: Date Formats\7f663852
+Node: Adding to Diary\7f666426
+Node: Special Diary Entries\7f668057
+Node: Calendar Customization\7f673396
+Node: Calendar Customizing\7f674258
+Node: Holiday Customizing\7f677477
+Node: Date Display Format\7f683945
+Node: Time Display Format\7f684903
+Node: Daylight Savings\7f686041
+Node: Diary Customizing\7f689229
+Node: Hebrew/Islamic Entries\7f693850
+Node: Fancy Diary Display\7f697190
+Node: Included Diary Files\7f699087
+Node: Sexp Diary Entries\7f700068
+Node: Appt Customizing\7f705158
+Node: Sorting\7f706204
+Node: Shell\7f711010
+Node: Single Shell\7f712303
+Node: Interactive Shell\7f713902
+Node: Shell Mode\7f717667
+Node: Terminal emulator\7f720158
+Node: Term Mode\7f722467
+Node: Paging in Term\7f723381
+Node: Narrowing\7f724179
+Node: Hardcopy\7f726129
+Node: Recursive Edit\7f727101
+Node: Dissociated Press\7f730088
+Node: CONX\7f732651
+Node: Amusements\7f733675
+Node: Emulation\7f734155
+Node: Customization\7f735999
+Node: Minor Modes\7f737844
+Node: Variables\7f739476
+Node: Examining\7f741432
+Node: Easy Customization\7f742893
+Node: Customization Groups\7f743907
+Node: Changing an Option\7f746836
+Node: Face Customization\7f753092
+Node: Specific Customization\7f754856
+Node: Edit Options\7f757463
+Node: Locals\7f759047
+Node: File Variables\7f762226
+Node: Keyboard Macros\7f766780
+Node: Basic Kbd Macro\7f768951
+Node: Save Kbd Macro\7f770883
+Node: Kbd Macro Query\7f772552
+Node: Key Bindings\7f774494
+Node: Keymaps\7f775368
+Node: Rebinding\7f779218
+Node: Interactive Rebinding\7f779917
+Node: Programmatic Rebinding\7f782109
+Node: Key Bindings Using Strings\7f784916
+Node: Disabling\7f786543
+Node: Syntax\7f788315
+Node: Syntax Entry\7f789196
+Node: Syntax Change\7f793280
+Node: Init File\7f795449
+Node: Init Syntax\7f796954
+Node: Init Examples\7f799306
+Node: Terminal Init\7f803496
+Node: Audible Bell\7f805206
+Node: Faces\7f808637
+Node: Frame Components\7f813479
+Node: X Resources\7f813924
+Node: Geometry Resources\7f815583
+Node: Iconic Resources\7f818031
+Node: Resource List\7f818503
+Node: Face Resources\7f825010
+Node: Widgets\7f828687
+Node: Menubar Resources\7f829626
+Node: Quitting\7f830559
+Node: Lossage\7f833537
+Node: Stuck Recursive\7f834181
+Node: Screen Garbled\7f834887
+Node: Text Garbled\7f836021
+Node: Unasked-for Search\7f836660
+Node: Emergency Escape\7f837445
+Node: Total Frustration\7f839224
+Node: Bugs\7f839855
+Node: Glossary\7f849389
+Node: Manifesto\7f881042
+Node: Key Index\7f904518
+Node: Command Index\7f930187
+Node: Variable Index\7f972577
+Node: Concept Index\7f988769
\1f
End Tag Table
Registers
-* RegPos:: Saving positions in registers.
-* RegText:: Saving text in registers.
-* RegRect:: Saving rectangles in registers.
+* Position: RegPos. Saving positions in registers.
+* Text: RegText. Saving text in registers.
+* Rectangle: RegRect. Saving rectangles in registers.
+* Configurations: RegConfig. Saving window configurations in registers.
+* Files: RegFiles. File names in registers.
+* Numbers: RegNumbers. Numbers in registers.
+* Bookmarks:: Bookmarks are like registers, but persistent.
Controlling the Display
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::).
+ * If you are running XEmacs under a graphical windowing system, a
+ menu bar at the top of the frame makes shortcuts to several of the
+ commands available (*note Pull-down Menus::).
+
+ * If you are running XEmacs under a graphical windowing system, a
+ toolbar at the top of the frame, just under the menu bar if it
+ exists, provides "one-touch" shortcuts to several commands. (Not
+ yet documented.)
+
+ * If you are running XEmacs under a graphical windowing system, a
+ gutter at the top (under the toolbar) and/or bottom of the frame
+ provides advanced GUI facilities like tab controls for rapid
+ switching among related windows and progress bars for
+ time-consuming operations like downloads across the Internet.
+ Gutters are an experimental feature introduced in XEmacs version
+ 21.2. (Not yet documented.)
You can subdivide the XEmacs frame into multiple text windows, and
use each window for a different file (*note Windows::). Multiple XEmacs
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Outline Format, Next: Outline Motion, Prev: Outline Mode, Up: Outline Mode
+
+Format of Outlines
+..................
+
+ Outline mode assumes that the lines in the buffer are of two types:
+"heading lines" and "body lines". A heading line represents a topic in
+the outline. Heading lines start with one or more stars; the number of
+stars determines the depth of the heading in the outline structure.
+Thus, a heading line with one star is a major topic; all the heading
+lines with two stars between it and the next one-star heading are its
+subtopics; and so on. Any line that is not a heading line is a body
+line. Body lines belong to the preceding heading line. Here is an
+example:
+
+ * Food
+
+ This is the body,
+ which says something about the topic of food.
+
+ ** Delicious Food
+
+ This is the body of the second-level header.
+
+ ** Distasteful Food
+
+ This could have
+ a body too, with
+ several lines.
+
+ *** Dormitory Food
+
+ * Shelter
+
+ A second first-level topic with its header line.
+
+ A heading line together with all following body lines is called
+collectively an "entry". A heading line together with all following
+deeper heading lines and their body lines is called a "subtree".
+
+ You can customize the criterion for distinguishing heading lines by
+setting the variable `outline-regexp'. Any line whose beginning has a
+match for this regexp is considered a heading line. Matches that start
+within a line (not at the beginning) do not count. The length of the
+matching text determines the level of the heading; longer matches make
+a more deeply nested level. Thus, for example, if a text formatter has
+commands `@chapter', `@section' and `@subsection' to divide the
+document into chapters and sections, you can make those lines count as
+heading lines by setting `outline-regexp' to
+`"@chap\\|@\\(sub\\)*section"'. Note the trick: the two words
+`chapter' and `section' are the same length, but by defining the regexp
+to match only `chap' we ensure that the length of the text matched on a
+chapter heading is shorter, so that Outline mode will know that
+sections are contained in chapters. This works as long as no other
+command starts with `@chap'.
+
+ Outline mode makes a line invisible by changing the newline before it
+into an ASCII Control-M (code 015). Most editing commands that work on
+lines treat an invisible line as part of the previous line because,
+strictly speaking, it is part of that line, since there is no longer a
+newline in between. When you save the file in Outline mode, Control-M
+characters are saved as newlines, so the invisible lines become ordinary
+lines in the file. Saving does not change the visibility status of a
+line inside Emacs.
+
+\1f
File: xemacs.info, Node: Outline Motion, Next: Outline Visibility, Prev: Outline Format, Up: Outline Mode
Outline Motion Commands
the value is a number, `C-M-q' need not recalculate indentation
for the following lines until the end of the list.
-\1f
-File: xemacs.info, Node: C Indent, Prev: Lisp Indent, Up: Grinding
-
-Customizing C Indentation
--------------------------
-
- Two variables control which commands perform C indentation and when.
-
- If `c-auto-newline' is non-`nil', newlines are inserted both before
-and after braces that you insert and after colons and semicolons.
-Correct C indentation is done on all the lines that are made this way.
-
- If `c-tab-always-indent' is non-`nil', the <TAB> command in C mode
-does indentation only if point is at the left margin or within the
-line's indentation. If there is non-whitespace to the left of point,
-<TAB> just inserts a tab character in the buffer. Normally, this
-variable is `nil', and <TAB> always reindents the current line.
-
- C does not have anything analogous to particular function names for
-which special forms of indentation are desirable. However, it has a
-different need for customization facilities: many different styles of C
-indentation are in common use.
-
- There are six variables you can set to control the style that Emacs C
-mode will use.
-
-`c-indent-level'
- Indentation of C statements within surrounding block. The
- surrounding block's indentation is the indentation of the line on
- which the open-brace appears.
-
-`c-continued-statement-offset'
- Extra indentation given to a substatement, such as the then-clause
- of an `if' or body of a `while'.
-
-`c-brace-offset'
- Extra indentation for lines that start with an open brace.
-
-`c-brace-imaginary-offset'
- An open brace following other text is treated as if it were this
- far to the right of the start of its line.
-
-`c-argdecl-indent'
- Indentation level of declarations of C function arguments.
-
-`c-label-offset'
- Extra indentation for a line that is a label, case, or default.
-
- The variable `c-indent-level' controls the indentation for C
-statements with respect to the surrounding block. In the example:
-
- {
- foo ();
-
-the difference in indentation between the lines is `c-indent-level'.
-Its standard value is 2.
-
- If the open-brace beginning the compound statement is not at the
-beginning of its line, the `c-indent-level' is added to the indentation
-of the line, not the column of the open-brace. For example,
-
- if (losing) {
- do_this ();
-
-One popular indentation style is that which results from setting
-`c-indent-level' to 8 and putting open-braces at the end of a line in
-this way. Another popular style prefers to put the open-brace on a
-separate line.
-
- In fact, the value of the variable `c-brace-imaginary-offset' is
-also added to the indentation of such a statement. Normally this
-variable is zero. Think of this variable as the imaginary position of
-the open brace, relative to the first non-blank character on the line.
-By setting the variable to 4 and `c-indent-level' to 0, you can get
-this style:
-
- if (x == y) {
- do_it ();
- }
-
- When `c-indent-level' is zero, the statements inside most braces
-line up exactly under the open brace. An exception are braces in column
-zero, like those surrounding a function's body. The statements inside
-those braces are not placed at column zero. Instead, `c-brace-offset'
-and `c-continued-statement-offset' (see below) are added to produce a
-typical offset between brace levels, and the statements are indented
-that far.
-
- `c-continued-statement-offset' controls the extra indentation for a
-line that starts within a statement (but not within parentheses or
-brackets). These lines are usually statements inside other statements,
-like the then-clauses of `if' statements and the bodies of `while'
-statements. The `c-continued-statement-offset' parameter determines
-the difference in indentation between the two lines in:
-
- if (x == y)
- do_it ();
-
-The default value for `c-continued-statement-offset' is 2. Some
-popular indentation styles correspond to a value of zero for
-`c-continued-statement-offset'.
-
- `c-brace-offset' is the extra indentation given to a line that
-starts with an open-brace. Its standard value is zero; compare:
-
- if (x == y)
- {
-
-with:
-
- if (x == y)
- do_it ();
-
-If you set `c-brace-offset' to 4, the first example becomes:
-
- if (x == y)
- {
-
- `c-argdecl-indent' controls the indentation of declarations of the
-arguments of a C function. It is absolute: argument declarations
-receive exactly `c-argdecl-indent' spaces. The standard value is 5 and
-results in code like this:
-
- char *
- index (string, char)
- char *string;
- int char;
-
- `c-label-offset' is the extra indentation given to a line that
-contains a label, a case statement, or a `default:' statement. Its
-standard value is -2 and results in code like this:
-
- switch (c)
- {
- case 'x':
-
-If `c-label-offset' were zero, the same code would be indented as:
-
- switch (c)
- {
- case 'x':
-
-This example assumes that the other variables above also have their
-default values.
-
- Using the indentation style produced by the default settings of the
-variables just discussed and putting open braces on separate lines
-produces clear and readable files. For an example, look at any of the C
-source files of XEmacs.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: C Indent, Prev: Lisp Indent, Up: Grinding
+
+Customizing C Indentation
+-------------------------
+
+ Two variables control which commands perform C indentation and when.
+
+ If `c-auto-newline' is non-`nil', newlines are inserted both before
+and after braces that you insert and after colons and semicolons.
+Correct C indentation is done on all the lines that are made this way.
+
+ If `c-tab-always-indent' is non-`nil', the <TAB> command in C mode
+does indentation only if point is at the left margin or within the
+line's indentation. If there is non-whitespace to the left of point,
+<TAB> just inserts a tab character in the buffer. Normally, this
+variable is `nil', and <TAB> always reindents the current line.
+
+ C does not have anything analogous to particular function names for
+which special forms of indentation are desirable. However, it has a
+different need for customization facilities: many different styles of C
+indentation are in common use.
+
+ There are six variables you can set to control the style that Emacs C
+mode will use.
+
+`c-indent-level'
+ Indentation of C statements within surrounding block. The
+ surrounding block's indentation is the indentation of the line on
+ which the open-brace appears.
+
+`c-continued-statement-offset'
+ Extra indentation given to a substatement, such as the then-clause
+ of an `if' or body of a `while'.
+
+`c-brace-offset'
+ Extra indentation for lines that start with an open brace.
+
+`c-brace-imaginary-offset'
+ An open brace following other text is treated as if it were this
+ far to the right of the start of its line.
+
+`c-argdecl-indent'
+ Indentation level of declarations of C function arguments.
+
+`c-label-offset'
+ Extra indentation for a line that is a label, case, or default.
+
+ The variable `c-indent-level' controls the indentation for C
+statements with respect to the surrounding block. In the example:
+
+ {
+ foo ();
+
+the difference in indentation between the lines is `c-indent-level'.
+Its standard value is 2.
+
+ If the open-brace beginning the compound statement is not at the
+beginning of its line, the `c-indent-level' is added to the indentation
+of the line, not the column of the open-brace. For example,
+
+ if (losing) {
+ do_this ();
+
+One popular indentation style is that which results from setting
+`c-indent-level' to 8 and putting open-braces at the end of a line in
+this way. Another popular style prefers to put the open-brace on a
+separate line.
+
+ In fact, the value of the variable `c-brace-imaginary-offset' is
+also added to the indentation of such a statement. Normally this
+variable is zero. Think of this variable as the imaginary position of
+the open brace, relative to the first non-blank character on the line.
+By setting the variable to 4 and `c-indent-level' to 0, you can get
+this style:
+
+ if (x == y) {
+ do_it ();
+ }
+
+ When `c-indent-level' is zero, the statements inside most braces
+line up exactly under the open brace. An exception are braces in column
+zero, like those surrounding a function's body. The statements inside
+those braces are not placed at column zero. Instead, `c-brace-offset'
+and `c-continued-statement-offset' (see below) are added to produce a
+typical offset between brace levels, and the statements are indented
+that far.
+
+ `c-continued-statement-offset' controls the extra indentation for a
+line that starts within a statement (but not within parentheses or
+brackets). These lines are usually statements inside other statements,
+like the then-clauses of `if' statements and the bodies of `while'
+statements. The `c-continued-statement-offset' parameter determines
+the difference in indentation between the two lines in:
+
+ if (x == y)
+ do_it ();
+
+The default value for `c-continued-statement-offset' is 2. Some
+popular indentation styles correspond to a value of zero for
+`c-continued-statement-offset'.
+
+ `c-brace-offset' is the extra indentation given to a line that
+starts with an open-brace. Its standard value is zero; compare:
+
+ if (x == y)
+ {
+
+with:
+
+ if (x == y)
+ do_it ();
+
+If you set `c-brace-offset' to 4, the first example becomes:
+
+ if (x == y)
+ {
+
+ `c-argdecl-indent' controls the indentation of declarations of the
+arguments of a C function. It is absolute: argument declarations
+receive exactly `c-argdecl-indent' spaces. The standard value is 5 and
+results in code like this:
+
+ char *
+ index (string, char)
+ char *string;
+ int char;
+
+ `c-label-offset' is the extra indentation given to a line that
+contains a label, a case statement, or a `default:' statement. Its
+standard value is -2 and results in code like this:
+
+ switch (c)
+ {
+ case 'x':
+
+If `c-label-offset' were zero, the same code would be indented as:
+
+ switch (c)
+ {
+ case 'x':
+
+This example assumes that the other variables above also have their
+default values.
+
+ Using the indentation style produced by the default settings of the
+variables just discussed and putting open braces on separate lines
+produces clear and readable files. For an example, look at any of the C
+source files of XEmacs.
+
+\1f
File: xemacs.info, Node: Matching, Next: Comments, Prev: Grinding, Up: Programs
Automatic Display of Matching Parentheses
`fortran-electric-line-number' to `nil'. Then inserting line numbers
is like inserting anything else.
-\1f
-File: xemacs.info, Node: ForIndent Conv, Next: ForIndent Vars, Prev: ForIndent Num, Up: Fortran Indent
-
-Syntactic Conventions
-.....................
-
- Fortran mode assumes that you follow certain conventions that
-simplify the task of understanding a Fortran program well enough to
-indent it properly:
-
- * Two nested `do' loops never share a `continue' statement.
-
- * The same character appears in column 5 of all continuation lines.
- It is the value of the variable `fortran-continuation-char'. By
- default, this character is `$'.
-
-If you fail to follow these conventions, the indentation commands may
-indent some lines unaesthetically. However, a correct Fortran program
-will retain its meaning when reindented even if the conventions are not
-followed.
-
-\1f
-File: xemacs.info, Node: ForIndent Vars, Prev: ForIndent Conv, Up: Fortran Indent
-
-Variables for Fortran Indentation
-.................................
-
- Several additional variables control how Fortran indentation works.
-
-`fortran-do-indent'
- Extra indentation within each level of `do' statement (the default
- is 3).
-
-`fortran-if-indent'
- Extra indentation within each level of `if' statement (the default
- is 3).
-
-`fortran-continuation-indent'
- Extra indentation for bodies of continuation lines (the default is
- 5).
-
-`fortran-check-all-num-for-matching-do'
- If this is `nil', indentation assumes that each `do' statement
- ends on a `continue' statement. Therefore, when computing
- indentation for a statement other than `continue', it can save
- time by not checking for a `do' statement ending there. If this
- is non-`nil', indenting any numbered statement must check for a
- `do' that ends there. The default is `nil'.
-
-`fortran-minimum-statement-indent'
- Minimum indentation for Fortran statements. For standard Fortran,
- this is 6. Statement bodies are always indented at least this
- much.
-
-\1f
-File: xemacs.info, Node: Fortran Comments, Next: Fortran Columns, Prev: Fortran Indent, Up: Fortran
-
-Comments
---------
-
- The usual Emacs comment commands assume that a comment can follow a
-line of code. In Fortran, the standard comment syntax requires an
-entire line to be just a comment. Therefore, Fortran mode replaces the
-standard Emacs comment commands and defines some new variables.
-
- Fortran mode can also handle a non-standard comment syntax where
-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::).
-
-`M-;'
- Align comment or insert new comment (`fortran-comment-indent').
-
-`C-x ;'
- Applies to nonstandard `!' comments only.
-
-`C-c ;'
- Turn all lines of the region into comments, or (with arg) turn
- them back into real code (`fortran-comment-region').
-
- `M-;' in Fortran mode is redefined as the command
-`fortran-comment-indent'. Like the usual `M-;' command, it recognizes
-an existing comment and aligns its text appropriately. If there is no
-existing comment, a comment is inserted and aligned.
-
- Inserting and aligning comments is not the same in Fortran mode as in
-other modes. When a new comment must be inserted, a full-line comment
-is inserted if the current line is blank. On a non-blank line, a
-non-standard `!' comment is inserted if you previously specified you
-wanted to use them. Otherwise a full-line comment is inserted on a new
-line before the current line.
-
- Non-standard `!' comments are aligned like comments in other
-languages, but full-line comments are aligned differently. In a
-standard full-line comment, the comment delimiter itself must always
-appear in column zero. What can be aligned is the text within the
-comment. You can choose from three styles of alignment by setting the
-variable `fortran-comment-indent-style' to one of these values:
-
-`fixed'
- The text is aligned at a fixed column, which is the value of
- `fortran-comment-line-column'. This is the default.
-
-`relative'
- The text is aligned as if it were a line of code, but with an
- additional `fortran-comment-line-column' columns of indentation.
-
-`nil'
- Text in full-line columns is not moved automatically.
-
- You can also specify the character to be used to indent within
-full-line comments by setting the variable `fortran-comment-indent-char'
-to the character you want to use.
-
- Fortran mode introduces two variables `comment-line-start' and
-`comment-line-start-skip', which do for full-line comments what
-`comment-start' and `comment-start-skip' do for ordinary text-following
-comments. Normally these are set properly by Fortran mode, so you do
-not need to change them.
-
- The normal Emacs comment command `C-x ;' has not been redefined. It
-can therefore be used if you use `!' comments, but is useless in
-Fortran mode otherwise.
-
- The command `C-c ;' (`fortran-comment-region') turns all the lines
-of the region into comments by inserting the string `C$$$' at the front
-of each one. With a numeric arg, the region is turned back into live
-code by deleting `C$$$' from the front of each line. You can control
-the string used for the comments by setting the variable
-`fortran-comment-region'. Note that here we have an example of a
-command and a variable with the same name; the two uses of the name
-never conflict because in Lisp and in Emacs it is always clear from the
-context which one is referred to.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: ForIndent Conv, Next: ForIndent Vars, Prev: ForIndent Num, Up: Fortran Indent
+
+Syntactic Conventions
+.....................
+
+ Fortran mode assumes that you follow certain conventions that
+simplify the task of understanding a Fortran program well enough to
+indent it properly:
+
+ * Two nested `do' loops never share a `continue' statement.
+
+ * The same character appears in column 5 of all continuation lines.
+ It is the value of the variable `fortran-continuation-char'. By
+ default, this character is `$'.
+
+If you fail to follow these conventions, the indentation commands may
+indent some lines unaesthetically. However, a correct Fortran program
+will retain its meaning when reindented even if the conventions are not
+followed.
+
+\1f
+File: xemacs.info, Node: ForIndent Vars, Prev: ForIndent Conv, Up: Fortran Indent
+
+Variables for Fortran Indentation
+.................................
+
+ Several additional variables control how Fortran indentation works.
+
+`fortran-do-indent'
+ Extra indentation within each level of `do' statement (the default
+ is 3).
+
+`fortran-if-indent'
+ Extra indentation within each level of `if' statement (the default
+ is 3).
+
+`fortran-continuation-indent'
+ Extra indentation for bodies of continuation lines (the default is
+ 5).
+
+`fortran-check-all-num-for-matching-do'
+ If this is `nil', indentation assumes that each `do' statement
+ ends on a `continue' statement. Therefore, when computing
+ indentation for a statement other than `continue', it can save
+ time by not checking for a `do' statement ending there. If this
+ is non-`nil', indenting any numbered statement must check for a
+ `do' that ends there. The default is `nil'.
+
+`fortran-minimum-statement-indent'
+ Minimum indentation for Fortran statements. For standard Fortran,
+ this is 6. Statement bodies are always indented at least this
+ much.
+
+\1f
+File: xemacs.info, Node: Fortran Comments, Next: Fortran Columns, Prev: Fortran Indent, Up: Fortran
+
+Comments
+--------
+
+ The usual Emacs comment commands assume that a comment can follow a
+line of code. In Fortran, the standard comment syntax requires an
+entire line to be just a comment. Therefore, Fortran mode replaces the
+standard Emacs comment commands and defines some new variables.
+
+ Fortran mode can also handle a non-standard comment syntax where
+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::).
+
+`M-;'
+ Align comment or insert new comment (`fortran-comment-indent').
+
+`C-x ;'
+ Applies to nonstandard `!' comments only.
+
+`C-c ;'
+ Turn all lines of the region into comments, or (with arg) turn
+ them back into real code (`fortran-comment-region').
+
+ `M-;' in Fortran mode is redefined as the command
+`fortran-comment-indent'. Like the usual `M-;' command, it recognizes
+an existing comment and aligns its text appropriately. If there is no
+existing comment, a comment is inserted and aligned.
+
+ Inserting and aligning comments is not the same in Fortran mode as in
+other modes. When a new comment must be inserted, a full-line comment
+is inserted if the current line is blank. On a non-blank line, a
+non-standard `!' comment is inserted if you previously specified you
+wanted to use them. Otherwise a full-line comment is inserted on a new
+line before the current line.
+
+ Non-standard `!' comments are aligned like comments in other
+languages, but full-line comments are aligned differently. In a
+standard full-line comment, the comment delimiter itself must always
+appear in column zero. What can be aligned is the text within the
+comment. You can choose from three styles of alignment by setting the
+variable `fortran-comment-indent-style' to one of these values:
+
+`fixed'
+ The text is aligned at a fixed column, which is the value of
+ `fortran-comment-line-column'. This is the default.
+
+`relative'
+ The text is aligned as if it were a line of code, but with an
+ additional `fortran-comment-line-column' columns of indentation.
+
+`nil'
+ Text in full-line columns is not moved automatically.
+
+ You can also specify the character to be used to indent within
+full-line comments by setting the variable `fortran-comment-indent-char'
+to the character you want to use.
+
+ Fortran mode introduces two variables `comment-line-start' and
+`comment-line-start-skip', which do for full-line comments what
+`comment-start' and `comment-start-skip' do for ordinary text-following
+comments. Normally these are set properly by Fortran mode, so you do
+not need to change them.
+
+ The normal Emacs comment command `C-x ;' has not been redefined. It
+can therefore be used if you use `!' comments, but is useless in
+Fortran mode otherwise.
+
+ The command `C-c ;' (`fortran-comment-region') turns all the lines
+of the region into comments by inserting the string `C$$$' at the front
+of each one. With a numeric arg, the region is turned back into live
+code by deleting `C$$$' from the front of each line. You can control
+the string used for the comments by setting the variable
+`fortran-comment-region'. Note that here we have an example of a
+command and a variable with the same name; the two uses of the name
+never conflict because in Lisp and in Emacs it is always clear from the
+context which one is referred to.
+
+\1f
File: xemacs.info, Node: Fortran Columns, Next: Fortran Abbrev, Prev: Fortran Comments, Up: Fortran
Columns
or changed packages.
-\1f
-File: xemacs.info, Node: Building Packages, Prev: Using Packages, Up: Packages
-
- Source packages are available from the `packages/source-packages'
-subdirectory of your favorite XEmacs distribution site. Alternatively,
-they are available via CVS from `cvs.xemacs.org'. Look at
-`http://cvs.xemacs.org' for instructions.
-
-Prerequisites for Building Source Packages
-------------------------------------------
-
- You must have GNU `cp', GNU `install' (or a BSD compatible `install'
-program) GNU `make' (3.75 or later preferred), `makeinfo' (1.68 from
-`texinfo-3.11' or later required), GNU `tar' and XEmacs 21.0. The
-source packages will untar into a correct directory structure. At the
-top level you must have `XEmacs.rules' and `package-compile.el'. These
-files are available from the XEmacs FTP site from the same place you
-obtained your source package distributions.
-
-What You Can Do With Source Packages
-------------------------------------
-
- NB: A global build operation doesn't exist yet as of 13 January
-1998.
-
- Source packages are most useful for creating XEmacs package tarballs
-for installation into your own XEmacs installations or for distributing
-to others.
-
- Supported operations from `make' are:
-
-`clean'
- Remove all built files except `auto-autoloads.el' and
- `custom-load.el'.
-
-`distclean'
- Remove XEmacs backups as well as the files deleted by `make clean'.
-
-`all'
- Bytecompile all files, build and bytecompile byproduct files like
- `auto-autoloads.el' and `custom-load.el'. Create info version of
- TeXinfo documentation if present.
-
-`srckit'
- Usually aliased to `make srckit-std'. This does a `make
- distclean' and creates a package source tarball in the staging
- directory. This is generally only of use for package maintainers.
-
-`binkit'
- May be aliased to `binkit-sourceonly', `binkit-sourceinfo',
- `binkit-sourcedata', or `binkit-sourcedatainfo'. `sourceonly'
- indicates there is nothing to install in a data directory or info
- directory. `sourceinfo' indicates that source and info files are
- to be installed. `sourcedata' indicates that source and etc
- (data) files are to be installed. `sourcedatainfo' indicates
- source, etc (data), and info files are to be installed. A few
- packages have needs beyond the basic templates so this is not yet
- complete.
-
-`dist'
- Runs the rules `srckit' followed by `binkit'. This is primarily
- of use by XEmacs maintainers producing files for distribution.
-
-\1f
-File: xemacs.info, Node: Abbrevs, Next: Picture, Prev: Packages, Up: Top
-
-Abbrevs
-*******
-
- An "abbrev" is a word which "expands" into some different text.
-Abbrevs are defined by the user to expand in specific ways. For
-example, you might define `foo' as an abbrev expanding to `find outer
-otter'. With this abbrev defined, you would be able to get `find outer
-otter ' into the buffer by typing `f o o <SPC>'.
-
- Abbrevs expand only when Abbrev mode (a minor mode) is enabled.
-Disabling Abbrev mode does not cause abbrev definitions to be discarded,
-but they do not expand until Abbrev mode is enabled again. The command
-`M-x abbrev-mode' toggles Abbrev mode; with a numeric argument, it
-turns Abbrev mode on if the argument is positive, off otherwise. *Note
-Minor Modes::. `abbrev-mode' is also a variable; Abbrev mode is on
-when the variable is non-`nil'. The variable `abbrev-mode'
-automatically becomes local to the current buffer when it is set.
-
- Abbrev definitions can be "mode-specific"--active only in one major
-mode. Abbrevs can also have "global" definitions that are active in
-all major modes. The same abbrev can have a global definition and
-various mode-specific definitions for different major modes. A
-mode-specific definition for the current major mode overrides a global
-definition.
-
- You can define Abbrevs interactively during an editing session. You
-can also save lists of abbrev definitions in files and reload them in
-later sessions. Some users keep extensive lists of abbrevs that they
-load in every session.
-
- A second kind of abbreviation facility is called the "dynamic
-expansion". Dynamic abbrev expansion happens only when you give an
-explicit command and the result of the expansion depends only on the
-current contents of the buffer. *Note Dynamic Abbrevs::.
-
-* Menu:
-
-* Defining Abbrevs:: Defining an abbrev, so it will expand when typed.
-* Expanding Abbrevs:: Controlling expansion: prefixes, canceling expansion.
-* Editing Abbrevs:: Viewing or editing the entire list of defined abbrevs.
-* Saving Abbrevs:: Saving the entire list of abbrevs for another session.
-* Dynamic Abbrevs:: Abbreviations for words already in the buffer.
-
-\1f
-File: xemacs.info, Node: Defining Abbrevs, Next: Expanding Abbrevs, Prev: Abbrevs, Up: Abbrevs
-
-Defining Abbrevs
-================
-
-`C-x a g'
- Define an abbrev to expand into some text before point
- (`add-global-abbrev').
-
-`C-x a l'
- Similar, but define an abbrev available only in the current major
- mode (`add-mode-abbrev').
-
-`C-x a i g'
- Define a word in the buffer as an abbrev
- (`inverse-add-global-abbrev').
-
-`C-x a i l'
- Define a word in the buffer as a mode-specific abbrev
- (`inverse-add-mode-abbrev').
-
-`M-x kill-all-abbrevs'
- After this command, no abbrev definitions remain in effect.
-
- The usual way to define an abbrev is to enter the text you want the
-abbrev to expand to, position point after it, and type `C-x a g'
-(`add-global-abbrev'). This reads the abbrev itself using the
-minibuffer, and then defines it as an abbrev for one or more words
-before point. Use a numeric argument to say how many words before point
-should be taken as the expansion. For example, to define the abbrev
-`foo' as in the example above, insert the text `find outer otter', then
-type
-`C-u 3 C-x a g f o o <RET>'.
-
- An argument of zero to `C-x a g' means to use the contents of the
-region as the expansion of the abbrev being defined.
-
- The command `C-x a l' (`add-mode-abbrev') is similar, but defines a
-mode-specific abbrev. Mode-specific abbrevs are active only in a
-particular major mode. `C-x a l' defines an abbrev for the major mode
-in effect at the time `C-x a l' is typed. The arguments work the same
-way they do for `C-x a g'.
-
- If the text of an abbrev you want is already in the buffer instead of
-the expansion, use command `C-x a i g' (`inverse-add-global-abbrev')
-instead of `C-x a g', or use `C-x a i l' (`inverse-add-mode-abbrev')
-instead of `C-x a l'. These commands are called "inverse" because they
-invert the meaning of the argument found in the buffer and the argument
-read using the minibuffer.
-
- To change the definition of an abbrev, just add the new definition.
-You will be asked to confirm if the abbrev has a prior definition. To
-remove an abbrev definition, give a negative argument to `C-x a g' or
-`C-x a l'. You must choose the command to specify whether to kill a
-global definition or a mode-specific definition for the current mode,
-since those two definitions are independent for one abbrev.
-
- `M-x kill-all-abbrevs' removes all existing abbrev definitions.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Building Packages, Prev: Using Packages, Up: Packages
+
+ Source packages are available from the `packages/source-packages'
+subdirectory of your favorite XEmacs distribution site. Alternatively,
+they are available via CVS from `cvs.xemacs.org'. Look at
+`http://cvs.xemacs.org' for instructions.
+
+Prerequisites for Building Source Packages
+------------------------------------------
+
+ You must have GNU `cp', GNU `install' (or a BSD compatible `install'
+program) GNU `make' (3.75 or later preferred), `makeinfo' (1.68 from
+`texinfo-3.11' or later required), GNU `tar' and XEmacs 21.0. The
+source packages will untar into a correct directory structure. At the
+top level you must have `XEmacs.rules' and `package-compile.el'. These
+files are available from the XEmacs FTP site from the same place you
+obtained your source package distributions.
+
+What You Can Do With Source Packages
+------------------------------------
+
+ NB: A global build operation doesn't exist yet as of 13 January
+1998.
+
+ Source packages are most useful for creating XEmacs package tarballs
+for installation into your own XEmacs installations or for distributing
+to others.
+
+ Supported operations from `make' are:
+
+`clean'
+ Remove all built files except `auto-autoloads.el' and
+ `custom-load.el'.
+
+`distclean'
+ Remove XEmacs backups as well as the files deleted by `make clean'.
+
+`all'
+ Bytecompile all files, build and bytecompile byproduct files like
+ `auto-autoloads.el' and `custom-load.el'. Create info version of
+ TeXinfo documentation if present.
+
+`srckit'
+ Usually aliased to `make srckit-std'. This does a `make
+ distclean' and creates a package source tarball in the staging
+ directory. This is generally only of use for package maintainers.
+
+`binkit'
+ May be aliased to `binkit-sourceonly', `binkit-sourceinfo',
+ `binkit-sourcedata', or `binkit-sourcedatainfo'. `sourceonly'
+ indicates there is nothing to install in a data directory or info
+ directory. `sourceinfo' indicates that source and info files are
+ to be installed. `sourcedata' indicates that source and etc
+ (data) files are to be installed. `sourcedatainfo' indicates
+ source, etc (data), and info files are to be installed. A few
+ packages have needs beyond the basic templates so this is not yet
+ complete.
+
+`dist'
+ Runs the rules `srckit' followed by `binkit'. This is primarily
+ of use by XEmacs maintainers producing files for distribution.
+
+\1f
+File: xemacs.info, Node: Abbrevs, Next: Picture, Prev: Packages, Up: Top
+
+Abbrevs
+*******
+
+ An "abbrev" is a word which "expands" into some different text.
+Abbrevs are defined by the user to expand in specific ways. For
+example, you might define `foo' as an abbrev expanding to `find outer
+otter'. With this abbrev defined, you would be able to get `find outer
+otter ' into the buffer by typing `f o o <SPC>'.
+
+ Abbrevs expand only when Abbrev mode (a minor mode) is enabled.
+Disabling Abbrev mode does not cause abbrev definitions to be discarded,
+but they do not expand until Abbrev mode is enabled again. The command
+`M-x abbrev-mode' toggles Abbrev mode; with a numeric argument, it
+turns Abbrev mode on if the argument is positive, off otherwise. *Note
+Minor Modes::. `abbrev-mode' is also a variable; Abbrev mode is on
+when the variable is non-`nil'. The variable `abbrev-mode'
+automatically becomes local to the current buffer when it is set.
+
+ Abbrev definitions can be "mode-specific"--active only in one major
+mode. Abbrevs can also have "global" definitions that are active in
+all major modes. The same abbrev can have a global definition and
+various mode-specific definitions for different major modes. A
+mode-specific definition for the current major mode overrides a global
+definition.
+
+ You can define Abbrevs interactively during an editing session. You
+can also save lists of abbrev definitions in files and reload them in
+later sessions. Some users keep extensive lists of abbrevs that they
+load in every session.
+
+ A second kind of abbreviation facility is called the "dynamic
+expansion". Dynamic abbrev expansion happens only when you give an
+explicit command and the result of the expansion depends only on the
+current contents of the buffer. *Note Dynamic Abbrevs::.
+
+* Menu:
+
+* Defining Abbrevs:: Defining an abbrev, so it will expand when typed.
+* Expanding Abbrevs:: Controlling expansion: prefixes, canceling expansion.
+* Editing Abbrevs:: Viewing or editing the entire list of defined abbrevs.
+* Saving Abbrevs:: Saving the entire list of abbrevs for another session.
+* Dynamic Abbrevs:: Abbreviations for words already in the buffer.
+
+\1f
+File: xemacs.info, Node: Defining Abbrevs, Next: Expanding Abbrevs, Prev: Abbrevs, Up: Abbrevs
+
+Defining Abbrevs
+================
+
+`C-x a g'
+ Define an abbrev to expand into some text before point
+ (`add-global-abbrev').
+
+`C-x a l'
+ Similar, but define an abbrev available only in the current major
+ mode (`add-mode-abbrev').
+
+`C-x a i g'
+ Define a word in the buffer as an abbrev
+ (`inverse-add-global-abbrev').
+
+`C-x a i l'
+ Define a word in the buffer as a mode-specific abbrev
+ (`inverse-add-mode-abbrev').
+
+`M-x kill-all-abbrevs'
+ After this command, no abbrev definitions remain in effect.
+
+ The usual way to define an abbrev is to enter the text you want the
+abbrev to expand to, position point after it, and type `C-x a g'
+(`add-global-abbrev'). This reads the abbrev itself using the
+minibuffer, and then defines it as an abbrev for one or more words
+before point. Use a numeric argument to say how many words before point
+should be taken as the expansion. For example, to define the abbrev
+`foo' as in the example above, insert the text `find outer otter', then
+type
+`C-u 3 C-x a g f o o <RET>'.
+
+ An argument of zero to `C-x a g' means to use the contents of the
+region as the expansion of the abbrev being defined.
+
+ The command `C-x a l' (`add-mode-abbrev') is similar, but defines a
+mode-specific abbrev. Mode-specific abbrevs are active only in a
+particular major mode. `C-x a l' defines an abbrev for the major mode
+in effect at the time `C-x a l' is typed. The arguments work the same
+way they do for `C-x a g'.
+
+ If the text of an abbrev you want is already in the buffer instead of
+the expansion, use command `C-x a i g' (`inverse-add-global-abbrev')
+instead of `C-x a g', or use `C-x a i l' (`inverse-add-mode-abbrev')
+instead of `C-x a l'. These commands are called "inverse" because they
+invert the meaning of the argument found in the buffer and the argument
+read using the minibuffer.
+
+ To change the definition of an abbrev, just add the new definition.
+You will be asked to confirm if the abbrev has a prior definition. To
+remove an abbrev definition, give a negative argument to `C-x a g' or
+`C-x a l'. You must choose the command to specify whether to kill a
+global definition or a mode-specific definition for the current mode,
+since those two definitions are independent for one abbrev.
+
+ `M-x kill-all-abbrevs' removes all existing abbrev definitions.
+
+\1f
File: xemacs.info, Node: Expanding Abbrevs, Next: Editing Abbrevs, Prev: Defining Abbrevs, Up: Abbrevs
Controlling Abbrev Expansion
use of this command moves point through all the old marks on the ring,
one by one.
-\1f
-File: xemacs.info, Node: General Calendar, Next: LaTeX Calendar, Prev: Mark and Region, Up: Calendar/Diary
-
-Miscellaneous Calendar Commands
--------------------------------
-
-`p d'
- Display day-in-year (`calendar-print-day-of-year').
-
-`?'
- Briefly describe calendar commands (`describe-calendar-mode').
-
-`C-c C-l'
- Regenerate the calendar window (`redraw-calendar').
-
-`SPC'
- Scroll the next window (`scroll-other-window').
-
-`q'
- Exit from calendar (`exit-calendar').
-
- If you want to know how many days have elapsed since the start of
-the year, or the number of days remaining in the year, type the `p d'
-command (`calendar-print-day-of-year'). This displays both of those
-numbers in the echo area.
-
- To display a brief description of the calendar commands, type `?'
-(`describe-calendar-mode'). For a fuller description, type `C-h m'.
-
- You can use `SPC' (`scroll-other-window') to scroll the other
-window. This is handy when you display a list of holidays or diary
-entries in another window.
-
- If the calendar window text gets corrupted, type `C-c C-l'
-(`redraw-calendar') to redraw it. (This can only happen if you use
-non-Calendar-mode editing commands.)
-
- In Calendar mode, you can use `SPC' (`scroll-other-window') to
-scroll the other window. This is handy when you display a list of
-holidays or diary entries in another window.
-
- To exit from the calendar, type `q' (`exit-calendar'). This buries
-all buffers related to the calendar, selecting other buffers. (If a
-frame contains a dedicated calendar window, exiting from the calendar
-iconifies that frame.)
-
-\1f
-File: xemacs.info, Node: LaTeX Calendar, Next: Holidays, Prev: General Calendar, Up: Calendar/Diary
-
-LaTeX Calendar
-==============
-
- The Calendar LaTeX commands produce a buffer of LaTeX code that
-prints as a calendar. Depending on the command you use, the printed
-calendar covers the day, week, month or year that point is in.
-
-`t m'
- Generate a one-month calendar (`cal-tex-cursor-month').
-
-`t M'
- Generate a sideways-printing one-month calendar
- (`cal-tex-cursor-month-landscape').
-
-`t d'
- Generate a one-day calendar (`cal-tex-cursor-day').
-
-`t w 1'
- Generate a one-page calendar for one week (`cal-tex-cursor-week').
-
-`t w 2'
- Generate a two-page calendar for one week (`cal-tex-cursor-week2').
-
-`t w 3'
- Generate an ISO-style calendar for one week
- (`cal-tex-cursor-week-iso').
-
-`t w 4'
- Generate a calendar for one Monday-starting week
- (`cal-tex-cursor-week-monday').
-
-`t f w'
- Generate a Filofax-style two-weeks-at-a-glance calendar
- (`cal-tex-cursor-filofax-2week').
-
-`t f W'
- Generate a Filofax-style one-week-at-a-glance calendar
- (`cal-tex-cursor-filofax-week').
-
-`t y'
- Generate a calendar for one year (`cal-tex-cursor-year').
-
-`t Y'
- Generate a sideways-printing calendar for one year
- (`cal-tex-cursor-year-landscape').
-
-`t f y'
- Generate a Filofax-style calendar for one year
- (`cal-tex-cursor-filofax-year').
-
- Some of these commands print the calendar sideways (in "landscape
-mode"), so it can be wider than it is long. Some of them use Filofax
-paper size (3.75in x 6.75in). All of these commands accept a prefix
-argument which specifies how many days, weeks, months or years to print
-(starting always with the selected one).
-
- If the variable `cal-tex-holidays' is non-`nil' (the default), then
-the printed calendars show the holidays in `calendar-holidays'. If the
-variable `cal-tex-diary' is non-`nil' (the default is `nil'), diary
-entries are included also (in weekly and monthly calendars only).
-
-\1f
-File: xemacs.info, Node: Holidays, Next: Sunrise/Sunset, Prev: LaTeX Calendar, Up: Calendar/Diary
-
-Holidays
---------
-
- The Emacs calendar knows about all major and many minor holidays,
-and can display them.
-
-`h'
- Display holidays for the selected date
- (`calendar-cursor-holidays').
-
-`Button2 Holidays'
- Display any holidays for the date you click on.
-
-`x'
- Mark holidays in the calendar window (`mark-calendar-holidays').
-
-`u'
- Unmark calendar window (`calendar-unmark').
-
-`a'
- List all holidays for the displayed three months in another window
- (`list-calendar-holidays').
-
-`M-x holidays'
- List all holidays for three months around today's date in another
- window.
-
-`M-x list-holidays'
- List holidays in another window for a specified range of years.
-
- To see if any holidays fall on a given date, position point on that
-date in the calendar window and use the `h' command. Alternatively,
-click on that date with `Button2' and then choose `Holidays' from the
-menu that appears. Either way, this displays the holidays for that
-date, in the echo area if they fit there, otherwise in a separate
-window.
-
- To view the distribution of holidays for all the dates shown in the
-calendar, use the `x' command. This displays the dates that are
-holidays in a different face (or places a `*' after these dates, if
-display with multiple faces is not available). The command applies both
-to the currently visible months and to other months that subsequently
-become visible by scrolling. To turn marking off and erase the current
-marks, type `u', which also erases any diary marks (*note Diary::).
-
- To get even more detailed information, use the `a' command, which
-displays a separate buffer containing a list of all holidays in the
-current three-month range. You can use <SPC> in the calendar window to
-scroll that list.
-
- The command `M-x holidays' displays the list of holidays for the
-current month and the preceding and succeeding months; this works even
-if you don't have a calendar window. If you want the list of holidays
-centered around a different month, use `C-u M-x holidays', which
-prompts for the month and year.
-
- The holidays known to Emacs include United States holidays and the
-major Christian, Jewish, and Islamic holidays; also the solstices and
-equinoxes.
-
- The command `M-x list-holidays' displays the list of holidays for a
-range of years. This function asks you for the starting and stopping
-years, and allows you to choose all the holidays or one of several
-categories of holidays. You can use this command even if you don't have
-a calendar window.
-
- The dates used by Emacs for holidays are based on _current
-practice_, not historical fact. Historically, for instance, the start
-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
-are set up for the United States, Emacs always uses the present
-definition, even though it is wrong for some prior years.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: General Calendar, Next: LaTeX Calendar, Prev: Mark and Region, Up: Calendar/Diary
+
+Miscellaneous Calendar Commands
+-------------------------------
+
+`p d'
+ Display day-in-year (`calendar-print-day-of-year').
+
+`?'
+ Briefly describe calendar commands (`describe-calendar-mode').
+
+`C-c C-l'
+ Regenerate the calendar window (`redraw-calendar').
+
+`SPC'
+ Scroll the next window (`scroll-other-window').
+
+`q'
+ Exit from calendar (`exit-calendar').
+
+ If you want to know how many days have elapsed since the start of
+the year, or the number of days remaining in the year, type the `p d'
+command (`calendar-print-day-of-year'). This displays both of those
+numbers in the echo area.
+
+ To display a brief description of the calendar commands, type `?'
+(`describe-calendar-mode'). For a fuller description, type `C-h m'.
+
+ You can use `SPC' (`scroll-other-window') to scroll the other
+window. This is handy when you display a list of holidays or diary
+entries in another window.
+
+ If the calendar window text gets corrupted, type `C-c C-l'
+(`redraw-calendar') to redraw it. (This can only happen if you use
+non-Calendar-mode editing commands.)
+
+ In Calendar mode, you can use `SPC' (`scroll-other-window') to
+scroll the other window. This is handy when you display a list of
+holidays or diary entries in another window.
+
+ To exit from the calendar, type `q' (`exit-calendar'). This buries
+all buffers related to the calendar, selecting other buffers. (If a
+frame contains a dedicated calendar window, exiting from the calendar
+iconifies that frame.)
+
+\1f
+File: xemacs.info, Node: LaTeX Calendar, Next: Holidays, Prev: General Calendar, Up: Calendar/Diary
+
+LaTeX Calendar
+==============
+
+ The Calendar LaTeX commands produce a buffer of LaTeX code that
+prints as a calendar. Depending on the command you use, the printed
+calendar covers the day, week, month or year that point is in.
+
+`t m'
+ Generate a one-month calendar (`cal-tex-cursor-month').
+
+`t M'
+ Generate a sideways-printing one-month calendar
+ (`cal-tex-cursor-month-landscape').
+
+`t d'
+ Generate a one-day calendar (`cal-tex-cursor-day').
+
+`t w 1'
+ Generate a one-page calendar for one week (`cal-tex-cursor-week').
+
+`t w 2'
+ Generate a two-page calendar for one week (`cal-tex-cursor-week2').
+
+`t w 3'
+ Generate an ISO-style calendar for one week
+ (`cal-tex-cursor-week-iso').
+
+`t w 4'
+ Generate a calendar for one Monday-starting week
+ (`cal-tex-cursor-week-monday').
+
+`t f w'
+ Generate a Filofax-style two-weeks-at-a-glance calendar
+ (`cal-tex-cursor-filofax-2week').
+
+`t f W'
+ Generate a Filofax-style one-week-at-a-glance calendar
+ (`cal-tex-cursor-filofax-week').
+
+`t y'
+ Generate a calendar for one year (`cal-tex-cursor-year').
+
+`t Y'
+ Generate a sideways-printing calendar for one year
+ (`cal-tex-cursor-year-landscape').
+
+`t f y'
+ Generate a Filofax-style calendar for one year
+ (`cal-tex-cursor-filofax-year').
+
+ Some of these commands print the calendar sideways (in "landscape
+mode"), so it can be wider than it is long. Some of them use Filofax
+paper size (3.75in x 6.75in). All of these commands accept a prefix
+argument which specifies how many days, weeks, months or years to print
+(starting always with the selected one).
+
+ If the variable `cal-tex-holidays' is non-`nil' (the default), then
+the printed calendars show the holidays in `calendar-holidays'. If the
+variable `cal-tex-diary' is non-`nil' (the default is `nil'), diary
+entries are included also (in weekly and monthly calendars only).
+
+\1f
+File: xemacs.info, Node: Holidays, Next: Sunrise/Sunset, Prev: LaTeX Calendar, Up: Calendar/Diary
+
+Holidays
+--------
+
+ The Emacs calendar knows about all major and many minor holidays,
+and can display them.
+
+`h'
+ Display holidays for the selected date
+ (`calendar-cursor-holidays').
+
+`Button2 Holidays'
+ Display any holidays for the date you click on.
+
+`x'
+ Mark holidays in the calendar window (`mark-calendar-holidays').
+
+`u'
+ Unmark calendar window (`calendar-unmark').
+
+`a'
+ List all holidays for the displayed three months in another window
+ (`list-calendar-holidays').
+
+`M-x holidays'
+ List all holidays for three months around today's date in another
+ window.
+
+`M-x list-holidays'
+ List holidays in another window for a specified range of years.
+
+ To see if any holidays fall on a given date, position point on that
+date in the calendar window and use the `h' command. Alternatively,
+click on that date with `Button2' and then choose `Holidays' from the
+menu that appears. Either way, this displays the holidays for that
+date, in the echo area if they fit there, otherwise in a separate
+window.
+
+ To view the distribution of holidays for all the dates shown in the
+calendar, use the `x' command. This displays the dates that are
+holidays in a different face (or places a `*' after these dates, if
+display with multiple faces is not available). The command applies both
+to the currently visible months and to other months that subsequently
+become visible by scrolling. To turn marking off and erase the current
+marks, type `u', which also erases any diary marks (*note Diary::).
+
+ To get even more detailed information, use the `a' command, which
+displays a separate buffer containing a list of all holidays in the
+current three-month range. You can use <SPC> in the calendar window to
+scroll that list.
+
+ The command `M-x holidays' displays the list of holidays for the
+current month and the preceding and succeeding months; this works even
+if you don't have a calendar window. If you want the list of holidays
+centered around a different month, use `C-u M-x holidays', which
+prompts for the month and year.
+
+ The holidays known to Emacs include United States holidays and the
+major Christian, Jewish, and Islamic holidays; also the solstices and
+equinoxes.
+
+ The command `M-x list-holidays' displays the list of holidays for a
+range of years. This function asks you for the starting and stopping
+years, and allows you to choose all the holidays or one of several
+categories of holidays. You can use this command even if you don't have
+a calendar window.
+
+ The dates used by Emacs for holidays are based on _current
+practice_, not historical fact. Historically, for instance, the start
+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
+are set up for the United States, Emacs always uses the present
+definition, even though it is wrong for some prior years.
+
+\1f
File: xemacs.info, Node: Sunrise/Sunset, Next: Lunar Phases, Prev: Holidays, Up: Calendar/Diary
Times of Sunrise and Sunset
A similar normal hook, `today-invisible-calendar-hook' is run if the
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
-
-Customizing the Holidays
-........................
-
- Emacs knows about holidays defined by entries on one of several
-lists. You can customize these lists of holidays to your own needs,
-adding or deleting holidays. The lists of holidays that Emacs uses are
-for general holidays (`general-holidays'), local holidays
-(`local-holidays'), Christian holidays (`christian-holidays'), Hebrew
-(Jewish) holidays (`hebrew-holidays'), Islamic (Moslem) holidays
-(`islamic-holidays'), and other holidays (`other-holidays').
-
- The general holidays are, by default, holidays common throughout the
-United States. To eliminate these holidays, set `general-holidays' to
-`nil'.
-
- There are no default local holidays (but sites may supply some). You
-can set the variable `local-holidays' to any list of holidays, as
-described below.
-
- By default, Emacs does not include all the holidays of the religions
-that it knows, only those commonly found in secular calendars. For a
-more extensive collection of religious holidays, you can set any (or
-all) of the variables `all-christian-calendar-holidays',
-`all-hebrew-calendar-holidays', or `all-islamic-calendar-holidays' to
-`t'. If you want to eliminate the religious holidays, set any or all
-of the corresponding variables `christian-holidays', `hebrew-holidays',
-and `islamic-holidays' to `nil'.
-
- You can set the variable `other-holidays' to any list of holidays.
-This list, normally empty, is intended for individual use.
-
- Each of the lists (`general-holidays', `local-holidays',
-`christian-holidays', `hebrew-holidays', `islamic-holidays', and
-`other-holidays') is a list of "holiday forms", each holiday form
-describing a holiday (or sometimes a list of holidays).
-
- Here is a table of the possible kinds of holiday form. Day numbers
-and month numbers count starting from 1, but "dayname" numbers count
-Sunday as 0. The element STRING is always the name of the holiday, as
-a string.
-
-`(holiday-fixed MONTH DAY STRING)'
- A fixed date on the Gregorian calendar. MONTH and DAY are
- numbers, STRING is the name of the holiday.
-
-`(holiday-float MONTH DAYNAME K STRING)'
- The Kth DAYNAME in MONTH on the Gregorian calendar (DAYNAME=0 for
- Sunday, and so on); negative K means count back from the end of
- the month. STRING is the name of the holiday.
-
-`(holiday-hebrew MONTH DAY STRING)'
- A fixed date on the Hebrew calendar. MONTH and DAY are numbers,
- STRING is the name of the holiday.
-
-`(holiday-islamic MONTH DAY STRING)'
- A fixed date on the Islamic calendar. MONTH and DAY are numbers,
- STRING is the name of the holiday.
-
-`(holiday-julian MONTH DAY STRING)'
- A fixed date on the Julian calendar. MONTH and DAY are numbers,
- STRING is the name of the holiday.
-
-`(holiday-sexp SEXP STRING)'
- A date calculated by the Lisp expression SEXP. The expression
- should use the variable `year' to compute and return the date of a
- holiday, or `nil' if the holiday doesn't happen this year. The
- value of SEXP must represent the date as a list of the form
- `(MONTH DAY YEAR)'. STRING is the name of the holiday.
-
-`(if CONDITION HOLIDAY-FORM &optional HOLIDAY-FORM)'
- A holiday that happens only if CONDITION is true.
-
-`(FUNCTION [ARGS])'
- A list of dates calculated by the function FUNCTION, called with
- arguments ARGS.
-
- For example, suppose you want to add Bastille Day, celebrated in
-France on July 14. You can do this by adding the following line to
-your `.emacs' file:
-
- (setq other-holidays '((holiday-fixed 7 14 "Bastille Day")))
-
-The holiday form `(holiday-fixed 7 14 "Bastille Day")' specifies the
-fourteenth day of the seventh month (July).
-
- Many holidays occur on a specific day of the week, at a specific time
-of month. Here is a holiday form describing Hurricane Supplication Day,
-celebrated in the Virgin Islands on the fourth Monday in August:
-
- (holiday-float 8 1 4 "Hurricane Supplication Day")
-
-Here the 8 specifies August, the 1 specifies Monday (Sunday is 0,
-Tuesday is 2, and so on), and the 4 specifies the fourth occurrence in
-the month (1 specifies the first occurrence, 2 the second occurrence,
--1 the last occurrence, -2 the second-to-last occurrence, and so on).
-
- You can specify holidays that occur on fixed days of the Hebrew,
-Islamic, and Julian calendars too. For example,
-
- (setq other-holidays
- '((holiday-hebrew 10 2 "Last day of Hanukkah")
- (holiday-islamic 3 12 "Mohammed's Birthday")
- (holiday-julian 4 2 "Jefferson's Birthday")))
-
-adds the last day of Hanukkah (since the Hebrew months are numbered with
-1 starting from Nisan), the Islamic feast celebrating Mohammed's
-birthday (since the Islamic months are numbered from 1 starting with
-Muharram), and Thomas Jefferson's birthday, which is 2 April 1743 on the
-Julian calendar.
-
- To include a holiday conditionally, use either Emacs Lisp's `if' or
-the `holiday-sexp' form. For example, American presidential elections
-occur on the first Tuesday after the first Monday in November of years
-divisible by 4:
-
- (holiday-sexp (if (= 0 (% year 4))
- (calendar-gregorian-from-absolute
- (1+ (calendar-dayname-on-or-before
- 1 (+ 6 (calendar-absolute-from-gregorian
- (list 11 1 year))))))
- "US Presidential Election"))
-
-or
-
- (if (= 0 (% displayed-year 4))
- (fixed 11
- (extract-calendar-day
- (calendar-gregorian-from-absolute
- (1+ (calendar-dayname-on-or-before
- 1 (+ 6 (calendar-absolute-from-gregorian
- (list 11 1 displayed-year)))))))
- "US Presidential Election"))
-
- Some holidays just don't fit into any of these forms because special
-calculations are involved in their determination. In such cases you
-must write a Lisp function to do the calculation. To include eclipses,
-for example, add `(eclipses)' to `other-holidays' and write an Emacs
-Lisp function `eclipses' that returns a (possibly empty) list of the
-relevant Gregorian dates among the range visible in the calendar
-window, with descriptive strings, like this:
-
- (((6 27 1991) "Lunar Eclipse") ((7 11 1991) "Solar Eclipse") ... )
-
-\1f
-File: xemacs.info, Node: Date Display Format, Next: Time Display Format, Prev: Holiday Customizing, Up: Calendar Customization
-
-Date Display Format
-...................
-
- You can customize the manner of displaying dates in the diary, in
-mode lines, and in messages by setting `calendar-date-display-form'.
-This variable holds a list of expressions that can involve the variables
-`month', `day', and `year', which are all numbers in string form, and
-`monthname' and `dayname', which are both alphabetic strings. In the
-American style, the default value of this list is as follows:
-
- ((if dayname (concat dayname ", ")) monthname " " day ", " year)
-
-while in the European style this value is the default:
-
- ((if dayname (concat dayname ", ")) day " " monthname " " year)
-
- + The ISO standard date representation is this:
-
- (year "-" month "-" day)
-
-This specifies a typical American format:
-
- (month "/" day "/" (substring year -2))
-
-\1f
-File: xemacs.info, Node: Time Display Format, Next: Daylight Savings, Prev: Date Display Format, Up: Calendar Customization
-
-Time Display Format
-...................
-
- The calendar and diary by default display times of day in the
-conventional American style with the hours from 1 through 12, minutes,
-and either `am' or `pm'. If you prefer the European style, also known
-in the US as military, in which the hours go from 00 to 23, you can
-alter the variable `calendar-time-display-form'. This variable is a
-list of expressions that can involve the variables `12-hours',
-`24-hours', and `minutes', which are all numbers in string form, and
-`am-pm' and `time-zone', which are both alphabetic strings. The
-default value of `calendar-time-display-form' is as follows:
-
- (12-hours ":" minutes am-pm
- (if time-zone " (") time-zone (if time-zone ")"))
-
-Here is a value that provides European style times:
-
- (24-hours ":" minutes
- (if time-zone " (") time-zone (if time-zone ")"))
-
-gives military-style times like `21:07 (UT)' if time zone names are
-defined, and times like `21:07' if they are not.
-
-\1f
-File: xemacs.info, Node: Daylight Savings, Next: Diary Customizing, Prev: Time Display Format, Up: Calendar Customization
-
-Daylight Savings Time
-.....................
-
- Emacs understands the difference between standard time and daylight
-savings time--the times given for sunrise, sunset, solstices,
-equinoxes, and the phases of the moon take that into account. The rules
-for daylight savings time vary from place to place and have also varied
-historically from year to year. To do the job properly, Emacs needs to
-know which rules to use.
-
- Some operating systems keep track of the rules that apply to the
-place where you are; on these systems, Emacs gets the information it
-needs from the system automatically. If some or all of this
-information is missing, Emacs fills in the gaps with the rules
-currently used in Cambridge, Massachusetts. If the resulting rules are
-not what you want, you can tell Emacs the rules to use by setting
-certain variables.
-
- If the default choice of rules is not appropriate for your location,
-you can tell Emacs the rules to use by setting the variables
-`calendar-daylight-savings-starts' and
-`calendar-daylight-savings-ends'. Their values should be Lisp
-expressions that refer to the variable `year', and evaluate to the
-Gregorian date on which daylight savings time starts or (respectively)
-ends, in the form of a list `(MONTH DAY YEAR)'. The values should be
-`nil' if your area does not use daylight savings time.
-
- Emacs uses these expressions to determine the starting date of
-daylight savings time for the holiday list and for correcting times of
-day in the solar and lunar calculations.
-
- The values for Cambridge, Massachusetts are as follows:
-
- (calendar-nth-named-day 1 0 4 year)
- (calendar-nth-named-day -1 0 10 year)
-
-That is, the first 0th day (Sunday) of the fourth month (April) in the
-year specified by `year', and the last Sunday of the tenth month
-(October) of that year. If daylight savings time were changed to start
-on October 1, you would set `calendar-daylight-savings-starts' to this:
-
- (list 10 1 year)
-
- For a more complex example, suppose daylight savings time begins on
-the first of Nisan on the Hebrew calendar. You should set
-`calendar-daylight-savings-starts' to this value:
-
- (calendar-gregorian-from-absolute
- (calendar-absolute-from-hebrew
- (list 1 1 (+ year 3760))))
-
-because Nisan is the first month in the Hebrew calendar and the Hebrew
-year differs from the Gregorian year by 3760 at Nisan.
-
- If there is no daylight savings time at your location, or if you want
-all times in standard time, set `calendar-daylight-savings-starts' and
-`calendar-daylight-savings-ends' to `nil'.
-
- The variable `calendar-daylight-time-offset' specifies the
-difference between daylight savings time and standard time, measured in
-minutes. The value for Cambridge, Massachusetts is 60.
-
- The two variables `calendar-daylight-savings-starts-time' and
-`calendar-daylight-savings-ends-time' specify the number of minutes
-after midnight local time when the transition to and from daylight
-savings time should occur. For Cambridge, Massachusetts both variables'
-values are 120.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Holiday Customizing, Next: Date Display Format, Prev: Calendar Customizing, Up: Calendar Customization
+
+Customizing the Holidays
+........................
+
+ Emacs knows about holidays defined by entries on one of several
+lists. You can customize these lists of holidays to your own needs,
+adding or deleting holidays. The lists of holidays that Emacs uses are
+for general holidays (`general-holidays'), local holidays
+(`local-holidays'), Christian holidays (`christian-holidays'), Hebrew
+(Jewish) holidays (`hebrew-holidays'), Islamic (Moslem) holidays
+(`islamic-holidays'), and other holidays (`other-holidays').
+
+ The general holidays are, by default, holidays common throughout the
+United States. To eliminate these holidays, set `general-holidays' to
+`nil'.
+
+ There are no default local holidays (but sites may supply some). You
+can set the variable `local-holidays' to any list of holidays, as
+described below.
+
+ By default, Emacs does not include all the holidays of the religions
+that it knows, only those commonly found in secular calendars. For a
+more extensive collection of religious holidays, you can set any (or
+all) of the variables `all-christian-calendar-holidays',
+`all-hebrew-calendar-holidays', or `all-islamic-calendar-holidays' to
+`t'. If you want to eliminate the religious holidays, set any or all
+of the corresponding variables `christian-holidays', `hebrew-holidays',
+and `islamic-holidays' to `nil'.
+
+ You can set the variable `other-holidays' to any list of holidays.
+This list, normally empty, is intended for individual use.
+
+ Each of the lists (`general-holidays', `local-holidays',
+`christian-holidays', `hebrew-holidays', `islamic-holidays', and
+`other-holidays') is a list of "holiday forms", each holiday form
+describing a holiday (or sometimes a list of holidays).
+
+ Here is a table of the possible kinds of holiday form. Day numbers
+and month numbers count starting from 1, but "dayname" numbers count
+Sunday as 0. The element STRING is always the name of the holiday, as
+a string.
+
+`(holiday-fixed MONTH DAY STRING)'
+ A fixed date on the Gregorian calendar. MONTH and DAY are
+ numbers, STRING is the name of the holiday.
+
+`(holiday-float MONTH DAYNAME K STRING)'
+ The Kth DAYNAME in MONTH on the Gregorian calendar (DAYNAME=0 for
+ Sunday, and so on); negative K means count back from the end of
+ the month. STRING is the name of the holiday.
+
+`(holiday-hebrew MONTH DAY STRING)'
+ A fixed date on the Hebrew calendar. MONTH and DAY are numbers,
+ STRING is the name of the holiday.
+
+`(holiday-islamic MONTH DAY STRING)'
+ A fixed date on the Islamic calendar. MONTH and DAY are numbers,
+ STRING is the name of the holiday.
+
+`(holiday-julian MONTH DAY STRING)'
+ A fixed date on the Julian calendar. MONTH and DAY are numbers,
+ STRING is the name of the holiday.
+
+`(holiday-sexp SEXP STRING)'
+ A date calculated by the Lisp expression SEXP. The expression
+ should use the variable `year' to compute and return the date of a
+ holiday, or `nil' if the holiday doesn't happen this year. The
+ value of SEXP must represent the date as a list of the form
+ `(MONTH DAY YEAR)'. STRING is the name of the holiday.
+
+`(if CONDITION HOLIDAY-FORM &optional HOLIDAY-FORM)'
+ A holiday that happens only if CONDITION is true.
+
+`(FUNCTION [ARGS])'
+ A list of dates calculated by the function FUNCTION, called with
+ arguments ARGS.
+
+ For example, suppose you want to add Bastille Day, celebrated in
+France on July 14. You can do this by adding the following line to
+your `.emacs' file:
+
+ (setq other-holidays '((holiday-fixed 7 14 "Bastille Day")))
+
+The holiday form `(holiday-fixed 7 14 "Bastille Day")' specifies the
+fourteenth day of the seventh month (July).
+
+ Many holidays occur on a specific day of the week, at a specific time
+of month. Here is a holiday form describing Hurricane Supplication Day,
+celebrated in the Virgin Islands on the fourth Monday in August:
+
+ (holiday-float 8 1 4 "Hurricane Supplication Day")
+
+Here the 8 specifies August, the 1 specifies Monday (Sunday is 0,
+Tuesday is 2, and so on), and the 4 specifies the fourth occurrence in
+the month (1 specifies the first occurrence, 2 the second occurrence,
+-1 the last occurrence, -2 the second-to-last occurrence, and so on).
+
+ You can specify holidays that occur on fixed days of the Hebrew,
+Islamic, and Julian calendars too. For example,
+
+ (setq other-holidays
+ '((holiday-hebrew 10 2 "Last day of Hanukkah")
+ (holiday-islamic 3 12 "Mohammed's Birthday")
+ (holiday-julian 4 2 "Jefferson's Birthday")))
+
+adds the last day of Hanukkah (since the Hebrew months are numbered with
+1 starting from Nisan), the Islamic feast celebrating Mohammed's
+birthday (since the Islamic months are numbered from 1 starting with
+Muharram), and Thomas Jefferson's birthday, which is 2 April 1743 on the
+Julian calendar.
+
+ To include a holiday conditionally, use either Emacs Lisp's `if' or
+the `holiday-sexp' form. For example, American presidential elections
+occur on the first Tuesday after the first Monday in November of years
+divisible by 4:
+
+ (holiday-sexp (if (= 0 (% year 4))
+ (calendar-gregorian-from-absolute
+ (1+ (calendar-dayname-on-or-before
+ 1 (+ 6 (calendar-absolute-from-gregorian
+ (list 11 1 year))))))
+ "US Presidential Election"))
+
+or
+
+ (if (= 0 (% displayed-year 4))
+ (fixed 11
+ (extract-calendar-day
+ (calendar-gregorian-from-absolute
+ (1+ (calendar-dayname-on-or-before
+ 1 (+ 6 (calendar-absolute-from-gregorian
+ (list 11 1 displayed-year)))))))
+ "US Presidential Election"))
+
+ Some holidays just don't fit into any of these forms because special
+calculations are involved in their determination. In such cases you
+must write a Lisp function to do the calculation. To include eclipses,
+for example, add `(eclipses)' to `other-holidays' and write an Emacs
+Lisp function `eclipses' that returns a (possibly empty) list of the
+relevant Gregorian dates among the range visible in the calendar
+window, with descriptive strings, like this:
+
+ (((6 27 1991) "Lunar Eclipse") ((7 11 1991) "Solar Eclipse") ... )
+
+\1f
+File: xemacs.info, Node: Date Display Format, Next: Time Display Format, Prev: Holiday Customizing, Up: Calendar Customization
+
+Date Display Format
+...................
+
+ You can customize the manner of displaying dates in the diary, in
+mode lines, and in messages by setting `calendar-date-display-form'.
+This variable holds a list of expressions that can involve the variables
+`month', `day', and `year', which are all numbers in string form, and
+`monthname' and `dayname', which are both alphabetic strings. In the
+American style, the default value of this list is as follows:
+
+ ((if dayname (concat dayname ", ")) monthname " " day ", " year)
+
+while in the European style this value is the default:
+
+ ((if dayname (concat dayname ", ")) day " " monthname " " year)
+
+ + The ISO standard date representation is this:
+
+ (year "-" month "-" day)
+
+This specifies a typical American format:
+
+ (month "/" day "/" (substring year -2))
+
+\1f
+File: xemacs.info, Node: Time Display Format, Next: Daylight Savings, Prev: Date Display Format, Up: Calendar Customization
+
+Time Display Format
+...................
+
+ The calendar and diary by default display times of day in the
+conventional American style with the hours from 1 through 12, minutes,
+and either `am' or `pm'. If you prefer the European style, also known
+in the US as military, in which the hours go from 00 to 23, you can
+alter the variable `calendar-time-display-form'. This variable is a
+list of expressions that can involve the variables `12-hours',
+`24-hours', and `minutes', which are all numbers in string form, and
+`am-pm' and `time-zone', which are both alphabetic strings. The
+default value of `calendar-time-display-form' is as follows:
+
+ (12-hours ":" minutes am-pm
+ (if time-zone " (") time-zone (if time-zone ")"))
+
+Here is a value that provides European style times:
+
+ (24-hours ":" minutes
+ (if time-zone " (") time-zone (if time-zone ")"))
+
+gives military-style times like `21:07 (UT)' if time zone names are
+defined, and times like `21:07' if they are not.
+
+\1f
+File: xemacs.info, Node: Daylight Savings, Next: Diary Customizing, Prev: Time Display Format, Up: Calendar Customization
+
+Daylight Savings Time
+.....................
+
+ Emacs understands the difference between standard time and daylight
+savings time--the times given for sunrise, sunset, solstices,
+equinoxes, and the phases of the moon take that into account. The rules
+for daylight savings time vary from place to place and have also varied
+historically from year to year. To do the job properly, Emacs needs to
+know which rules to use.
+
+ Some operating systems keep track of the rules that apply to the
+place where you are; on these systems, Emacs gets the information it
+needs from the system automatically. If some or all of this
+information is missing, Emacs fills in the gaps with the rules
+currently used in Cambridge, Massachusetts. If the resulting rules are
+not what you want, you can tell Emacs the rules to use by setting
+certain variables.
+
+ If the default choice of rules is not appropriate for your location,
+you can tell Emacs the rules to use by setting the variables
+`calendar-daylight-savings-starts' and
+`calendar-daylight-savings-ends'. Their values should be Lisp
+expressions that refer to the variable `year', and evaluate to the
+Gregorian date on which daylight savings time starts or (respectively)
+ends, in the form of a list `(MONTH DAY YEAR)'. The values should be
+`nil' if your area does not use daylight savings time.
+
+ Emacs uses these expressions to determine the starting date of
+daylight savings time for the holiday list and for correcting times of
+day in the solar and lunar calculations.
+
+ The values for Cambridge, Massachusetts are as follows:
+
+ (calendar-nth-named-day 1 0 4 year)
+ (calendar-nth-named-day -1 0 10 year)
+
+That is, the first 0th day (Sunday) of the fourth month (April) in the
+year specified by `year', and the last Sunday of the tenth month
+(October) of that year. If daylight savings time were changed to start
+on October 1, you would set `calendar-daylight-savings-starts' to this:
+
+ (list 10 1 year)
+
+ For a more complex example, suppose daylight savings time begins on
+the first of Nisan on the Hebrew calendar. You should set
+`calendar-daylight-savings-starts' to this value:
+
+ (calendar-gregorian-from-absolute
+ (calendar-absolute-from-hebrew
+ (list 1 1 (+ year 3760))))
+
+because Nisan is the first month in the Hebrew calendar and the Hebrew
+year differs from the Gregorian year by 3760 at Nisan.
+
+ If there is no daylight savings time at your location, or if you want
+all times in standard time, set `calendar-daylight-savings-starts' and
+`calendar-daylight-savings-ends' to `nil'.
+
+ The variable `calendar-daylight-time-offset' specifies the
+difference between daylight savings time and standard time, measured in
+minutes. The value for Cambridge, Massachusetts is 60.
+
+ The two variables `calendar-daylight-savings-starts-time' and
+`calendar-daylight-savings-ends-time' specify the number of minutes
+after midnight local time when the transition to and from daylight
+savings time should occur. For Cambridge, Massachusetts both variables'
+values are 120.
+
+\1f
File: xemacs.info, Node: Diary Customizing, Next: Hebrew/Islamic Entries, Prev: Daylight Savings, Up: Calendar Customization
Customizing the Diary
a list of strings, each string a switch starting with `-'. For
example, the value could be `("-Pfoo")' to print on printer `foo'.
-\1f
-File: xemacs.info, Node: Recursive Edit, Next: Dissociated Press, Prev: Hardcopy, Up: Top
-
-Recursive Editing Levels
-========================
-
- A "recursive edit" is a situation in which you are using XEmacs
-commands to perform arbitrary editing while in the middle of another
-XEmacs command. For example, when you type `C-r' inside a
-`query-replace', you enter a recursive edit in which you can change the
-current buffer. When you exit from the recursive edit, you go back to
-the `query-replace'.
-
- "Exiting" a recursive edit means returning to the unfinished
-command, which continues execution. For example, exiting the recursive
-edit requested by `C-r' in `query-replace' causes query replacing to
-resume. Exiting is done with `C-M-c' (`exit-recursive-edit').
-
- You can also "abort" a recursive edit. This is like exiting, but
-also quits the unfinished command immediately. Use the command `C-]'
-(`abort-recursive-edit') for this. *Note Quitting::.
-
- The mode line shows you when you are in a recursive edit by
-displaying square brackets around the parentheses that always surround
-the major and minor mode names. Every window's mode line shows the
-square brackets, since XEmacs as a whole, rather than any particular
-buffer, is in a recursive edit.
-
- It is possible to be in recursive edits within recursive edits. For
-example, after typing `C-r' in a `query-replace', you might type a
-command that entered the debugger. In such a case, two or more sets of
-square brackets appear in the mode line(s). Exiting the inner
-recursive edit (here with the debugger `c' command) resumes the
-query-replace command where it called the debugger. After the end of
-the query-replace command, you would be able to exit the first
-recursive edit. Aborting exits only one level of recursive edit; it
-returns to the command level of the previous recursive edit. You can
-then abort that one as well.
-
- The command `M-x top-level' aborts all levels of recursive edits,
-returning immediately to the top level command reader.
-
- The text you edit inside the recursive edit need not be the same text
-that you were editing at top level. If the command that invokes the
-recursive edit selects a different buffer first, that is the buffer you
-will edit recursively. You can switch buffers within the recursive edit
-in the normal manner (as long as the buffer-switching keys have not been
-rebound). While you could theoretically do the rest of your editing
-inside the recursive edit, including visiting files, this could have
-surprising effects (such as stack overflow) from time to time. It is
-best if you always exit or abort a recursive edit when you no longer
-need it.
-
- In general, XEmacs tries to avoid using recursive edits. It is
-usually preferable to allow users to switch among the possible editing
-modes in any order they like. With recursive edits, the only way to get
-to another state is to go "back" to the state that the recursive edit
-was invoked from.
-
-\1f
-File: xemacs.info, Node: Dissociated Press, Next: CONX, Prev: Recursive Edit, Up: Top
-
-Dissociated Press
-=================
-
- `M-x dissociated-press' is a command for scrambling a file of text
-either word by word or character by character. Starting from a buffer
-of straight English, it produces extremely amusing output. The input
-comes from the current XEmacs buffer. Dissociated Press writes its
-output in a buffer named `*Dissociation*', and redisplays that buffer
-after every couple of lines (approximately) to facilitate reading it.
-
- `dissociated-press' asks every so often whether to continue
-operating. Answer `n' to stop it. You can also stop at any time by
-typing `C-g'. The dissociation output remains in the `*Dissociation*'
-buffer for you to copy elsewhere if you wish.
-
- Dissociated Press operates by jumping at random from one point in the
-buffer to another. In order to produce plausible output rather than
-gibberish, it insists on a certain amount of overlap between the end of
-one run of consecutive words or characters and the start of the next.
-That is, if it has just printed out `president' and then decides to
-jump to a different point in the file, it might spot the `ent' in
-`pentagon' and continue from there, producing `presidentagon'. Long
-sample texts produce the best results.
-
- A positive argument to `M-x dissociated-press' tells it to operate
-character by character, and specifies the number of overlap characters.
-A negative argument tells it to operate word by word and specifies the
-number of overlap words. In this mode, whole words are treated as the
-elements to be permuted, rather than characters. No argument is
-equivalent to an argument of two. For your againformation, the output
-goes only into the buffer `*Dissociation*'. The buffer you start with
-is not changed.
-
- Dissociated Press produces nearly the same results as a Markov chain
-based on a frequency table constructed from the sample text. It is,
-however, an independent, ignoriginal invention. Dissociated Press
-techniquitously copies several consecutive characters from the sample
-between random choices, whereas a Markov chain would choose randomly for
-each word or character. This makes for more plausible sounding results
-and runs faster.
-
- It is a mustatement that too much use of Dissociated Press can be a
-developediment to your real work. Sometimes to the point of outragedy.
-And keep dissociwords out of your documentation, if you want it to be
-well userenced and properbose. Have fun. Your buggestions are welcome.
-
-\1f
-File: xemacs.info, Node: CONX, Next: Amusements, Prev: Dissociated Press, Up: Top
-
-CONX
-====
-
- Besides producing a file of scrambled text with Dissociated Press,
-you can generate random sentences by using CONX.
-
-`M-x conx'
- Generate random sentences in the `*conx*' buffer.
-
-`M-x conx-buffer'
- Absorb the text in the current buffer into the `conx' database.
-
-`M-x conx-init'
- Forget the current word-frequency tree.
-
-`M-x conx-load'
- Load a `conx' database that has been previously saved with `M-x
- conx-save'.
-
-`M-x conx-region'
- Absorb the text in the current buffer into the `conx' database.
-
-`M-x conx-save'
- Save the current `conx' database to a file for future retrieval.
-
- Copy text from a buffer using `M-x conx-buffer' or `M-x conx-region'
-and then type `M-x conx'. Output is continuously generated until you
-type <^G>. You can save the `conx' database to a file with `M-x
-conx-save', which you can retrieve with `M-x conx-load'. To clear the
-database, use `M-x conx-init'.
-
-\1f
-File: xemacs.info, Node: Amusements, Next: Emulation, Prev: CONX, Up: Top
-
-Other Amusements
-================
-
- If you are a little bit bored, you can try `M-x hanoi'. If you are
-considerably bored, give it a numeric argument. If you are very, very
-bored, try an argument of 9. Sit back and watch.
-
- When you are frustrated, try the famous Eliza program. Just do `M-x
-doctor'. End each input by typing `RET' twice.
-
- When you are feeling strange, type `M-x yow'.
-
-\1f
-File: xemacs.info, Node: Emulation, Next: Customization, Prev: Amusements, Up: Top
-
-Emulation
-=========
-
- XEmacs can be programmed to emulate (more or less) most other
-editors. Standard facilities can emulate these:
-
-Viper (a vi emulator)
- In XEmacs, Viper is the preferred emulation of vi within XEmacs.
- Viper is designed to allow you to take advantage of the best
- features of XEmacs while still doing your basic editing in a
- familiar, vi-like fashion. Viper provides various different
- levels of vi emulation, from a quite complete emulation that
- allows almost no access to native XEmacs commands, to an "expert"
- mode that combines the most useful vi commands with the most
- useful XEmacs commands.
-
- To start Viper, put the command
-
- (viper-mode)
-
- in your `.emacs' file.
-
- Viper comes with a separate manual that is provided standard with
- the XEmacs distribution.
-
-EDT (DEC VMS editor)
- Turn on EDT emulation with `M-x edt-emulation-on'. `M-x
- edt-emulation-off' restores normal Emacs command bindings.
-
- Most of the EDT emulation commands are keypad keys, and most
- standard Emacs key bindings are still available. The EDT
- emulation rebindings are done in the global keymap, so there is no
- problem switching buffers or major modes while in EDT emulation.
-
-Gosling Emacs
- Turn on emulation of Gosling Emacs (aka Unipress Emacs) with `M-x
- set-gosmacs-bindings'. This redefines many keys, mostly on the
- `C-x' and `ESC' prefixes, to work as they do in Gosmacs. `M-x
- set-gnu-bindings' returns to normal XEmacs by rebinding the same
- keys to the definitions they had at the time `M-x
- set-gosmacs-bindings' was done.
-
- It is also possible to run Mocklisp code written for Gosling Emacs.
- *Note Mocklisp::.
-
-\1f
-File: xemacs.info, Node: Customization, Next: Quitting, Prev: Emulation, Up: Top
-
-Customization
-*************
-
- This chapter talks about various topics relevant to adapting the
-behavior of Emacs in minor ways.
-
- All kinds of customization affect only the particular Emacs job that
-you do them in. They are completely lost when you kill the Emacs job,
-and have no effect on other Emacs jobs you may run at the same time or
-later. The only way an Emacs job can affect anything outside of it is
-by writing a file; in particular, the only way to make a customization
-`permanent' is to put something in your `.emacs' file or other
-appropriate file to do the customization in each session. *Note Init
-File::.
-
-* Menu:
-
-* Minor Modes:: Each minor mode is one feature you can turn on
- independently of any others.
-* Variables:: Many Emacs commands examine Emacs variables
- to decide what to do; by setting variables,
- you can control their functioning.
-* Keyboard Macros:: A keyboard macro records a sequence of keystrokes
- to be replayed with a single command.
-* Key Bindings:: The keymaps say what command each key runs.
- By changing them, you can "redefine keys".
-* Syntax:: The syntax table controls how words and expressions
- are parsed.
-* Init File:: How to write common customizations in the `.emacs'
- file.
-* Audible Bell:: Changing how Emacs sounds the bell.
-* Faces:: Changing the fonts and colors of a region of text.
-* X Resources:: X resources controlling various aspects of the
- behavior of XEmacs.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Recursive Edit, Next: Dissociated Press, Prev: Hardcopy, Up: Top
+
+Recursive Editing Levels
+========================
+
+ A "recursive edit" is a situation in which you are using XEmacs
+commands to perform arbitrary editing while in the middle of another
+XEmacs command. For example, when you type `C-r' inside a
+`query-replace', you enter a recursive edit in which you can change the
+current buffer. When you exit from the recursive edit, you go back to
+the `query-replace'.
+
+ "Exiting" a recursive edit means returning to the unfinished
+command, which continues execution. For example, exiting the recursive
+edit requested by `C-r' in `query-replace' causes query replacing to
+resume. Exiting is done with `C-M-c' (`exit-recursive-edit').
+
+ You can also "abort" a recursive edit. This is like exiting, but
+also quits the unfinished command immediately. Use the command `C-]'
+(`abort-recursive-edit') for this. *Note Quitting::.
+
+ The mode line shows you when you are in a recursive edit by
+displaying square brackets around the parentheses that always surround
+the major and minor mode names. Every window's mode line shows the
+square brackets, since XEmacs as a whole, rather than any particular
+buffer, is in a recursive edit.
+
+ It is possible to be in recursive edits within recursive edits. For
+example, after typing `C-r' in a `query-replace', you might type a
+command that entered the debugger. In such a case, two or more sets of
+square brackets appear in the mode line(s). Exiting the inner
+recursive edit (here with the debugger `c' command) resumes the
+query-replace command where it called the debugger. After the end of
+the query-replace command, you would be able to exit the first
+recursive edit. Aborting exits only one level of recursive edit; it
+returns to the command level of the previous recursive edit. You can
+then abort that one as well.
+
+ The command `M-x top-level' aborts all levels of recursive edits,
+returning immediately to the top level command reader.
+
+ The text you edit inside the recursive edit need not be the same text
+that you were editing at top level. If the command that invokes the
+recursive edit selects a different buffer first, that is the buffer you
+will edit recursively. You can switch buffers within the recursive edit
+in the normal manner (as long as the buffer-switching keys have not been
+rebound). While you could theoretically do the rest of your editing
+inside the recursive edit, including visiting files, this could have
+surprising effects (such as stack overflow) from time to time. It is
+best if you always exit or abort a recursive edit when you no longer
+need it.
+
+ In general, XEmacs tries to avoid using recursive edits. It is
+usually preferable to allow users to switch among the possible editing
+modes in any order they like. With recursive edits, the only way to get
+to another state is to go "back" to the state that the recursive edit
+was invoked from.
+
+\1f
+File: xemacs.info, Node: Dissociated Press, Next: CONX, Prev: Recursive Edit, Up: Top
+
+Dissociated Press
+=================
+
+ `M-x dissociated-press' is a command for scrambling a file of text
+either word by word or character by character. Starting from a buffer
+of straight English, it produces extremely amusing output. The input
+comes from the current XEmacs buffer. Dissociated Press writes its
+output in a buffer named `*Dissociation*', and redisplays that buffer
+after every couple of lines (approximately) to facilitate reading it.
+
+ `dissociated-press' asks every so often whether to continue
+operating. Answer `n' to stop it. You can also stop at any time by
+typing `C-g'. The dissociation output remains in the `*Dissociation*'
+buffer for you to copy elsewhere if you wish.
+
+ Dissociated Press operates by jumping at random from one point in the
+buffer to another. In order to produce plausible output rather than
+gibberish, it insists on a certain amount of overlap between the end of
+one run of consecutive words or characters and the start of the next.
+That is, if it has just printed out `president' and then decides to
+jump to a different point in the file, it might spot the `ent' in
+`pentagon' and continue from there, producing `presidentagon'. Long
+sample texts produce the best results.
+
+ A positive argument to `M-x dissociated-press' tells it to operate
+character by character, and specifies the number of overlap characters.
+A negative argument tells it to operate word by word and specifies the
+number of overlap words. In this mode, whole words are treated as the
+elements to be permuted, rather than characters. No argument is
+equivalent to an argument of two. For your againformation, the output
+goes only into the buffer `*Dissociation*'. The buffer you start with
+is not changed.
+
+ Dissociated Press produces nearly the same results as a Markov chain
+based on a frequency table constructed from the sample text. It is,
+however, an independent, ignoriginal invention. Dissociated Press
+techniquitously copies several consecutive characters from the sample
+between random choices, whereas a Markov chain would choose randomly for
+each word or character. This makes for more plausible sounding results
+and runs faster.
+
+ It is a mustatement that too much use of Dissociated Press can be a
+developediment to your real work. Sometimes to the point of outragedy.
+And keep dissociwords out of your documentation, if you want it to be
+well userenced and properbose. Have fun. Your buggestions are welcome.
+
+\1f
+File: xemacs.info, Node: CONX, Next: Amusements, Prev: Dissociated Press, Up: Top
+
+CONX
+====
+
+ Besides producing a file of scrambled text with Dissociated Press,
+you can generate random sentences by using CONX.
+
+`M-x conx'
+ Generate random sentences in the `*conx*' buffer.
+
+`M-x conx-buffer'
+ Absorb the text in the current buffer into the `conx' database.
+
+`M-x conx-init'
+ Forget the current word-frequency tree.
+
+`M-x conx-load'
+ Load a `conx' database that has been previously saved with `M-x
+ conx-save'.
+
+`M-x conx-region'
+ Absorb the text in the current buffer into the `conx' database.
+
+`M-x conx-save'
+ Save the current `conx' database to a file for future retrieval.
+
+ Copy text from a buffer using `M-x conx-buffer' or `M-x conx-region'
+and then type `M-x conx'. Output is continuously generated until you
+type <^G>. You can save the `conx' database to a file with `M-x
+conx-save', which you can retrieve with `M-x conx-load'. To clear the
+database, use `M-x conx-init'.
+
+\1f
+File: xemacs.info, Node: Amusements, Next: Emulation, Prev: CONX, Up: Top
+
+Other Amusements
+================
+
+ If you are a little bit bored, you can try `M-x hanoi'. If you are
+considerably bored, give it a numeric argument. If you are very, very
+bored, try an argument of 9. Sit back and watch.
+
+ When you are frustrated, try the famous Eliza program. Just do `M-x
+doctor'. End each input by typing `RET' twice.
+
+ When you are feeling strange, type `M-x yow'.
+
+\1f
+File: xemacs.info, Node: Emulation, Next: Customization, Prev: Amusements, Up: Top
+
+Emulation
+=========
+
+ XEmacs can be programmed to emulate (more or less) most other
+editors. Standard facilities can emulate these:
+
+Viper (a vi emulator)
+ In XEmacs, Viper is the preferred emulation of vi within XEmacs.
+ Viper is designed to allow you to take advantage of the best
+ features of XEmacs while still doing your basic editing in a
+ familiar, vi-like fashion. Viper provides various different
+ levels of vi emulation, from a quite complete emulation that
+ allows almost no access to native XEmacs commands, to an "expert"
+ mode that combines the most useful vi commands with the most
+ useful XEmacs commands.
+
+ To start Viper, put the command
+
+ (viper-mode)
+
+ in your `.emacs' file.
+
+ Viper comes with a separate manual that is provided standard with
+ the XEmacs distribution.
+
+EDT (DEC VMS editor)
+ Turn on EDT emulation with `M-x edt-emulation-on'. `M-x
+ edt-emulation-off' restores normal Emacs command bindings.
+
+ Most of the EDT emulation commands are keypad keys, and most
+ standard Emacs key bindings are still available. The EDT
+ emulation rebindings are done in the global keymap, so there is no
+ problem switching buffers or major modes while in EDT emulation.
+
+Gosling Emacs
+ Turn on emulation of Gosling Emacs (aka Unipress Emacs) with `M-x
+ set-gosmacs-bindings'. This redefines many keys, mostly on the
+ `C-x' and `ESC' prefixes, to work as they do in Gosmacs. `M-x
+ set-gnu-bindings' returns to normal XEmacs by rebinding the same
+ keys to the definitions they had at the time `M-x
+ set-gosmacs-bindings' was done.
+
+ It is also possible to run Mocklisp code written for Gosling Emacs.
+ *Note Mocklisp::.
+
+\1f
+File: xemacs.info, Node: Customization, Next: Quitting, Prev: Emulation, Up: Top
+
+Customization
+*************
+
+ This chapter talks about various topics relevant to adapting the
+behavior of Emacs in minor ways.
+
+ All kinds of customization affect only the particular Emacs job that
+you do them in. They are completely lost when you kill the Emacs job,
+and have no effect on other Emacs jobs you may run at the same time or
+later. The only way an Emacs job can affect anything outside of it is
+by writing a file; in particular, the only way to make a customization
+`permanent' is to put something in your `.emacs' file or other
+appropriate file to do the customization in each session. *Note Init
+File::.
+
+* Menu:
+
+* Minor Modes:: Each minor mode is one feature you can turn on
+ independently of any others.
+* Variables:: Many Emacs commands examine Emacs variables
+ to decide what to do; by setting variables,
+ you can control their functioning.
+* Keyboard Macros:: A keyboard macro records a sequence of keystrokes
+ to be replayed with a single command.
+* Key Bindings:: The keymaps say what command each key runs.
+ By changing them, you can "redefine keys".
+* Syntax:: The syntax table controls how words and expressions
+ are parsed.
+* Init File:: How to write common customizations in the `.emacs'
+ file.
+* Audible Bell:: Changing how Emacs sounds the bell.
+* Faces:: Changing the fonts and colors of a region of text.
+* Frame Components:: Controlling the presence and positions of the
+ menubar, toolbars, and gutters.
+* X Resources:: X resources controlling various aspects of the
+ behavior of XEmacs.
+
+\1f
File: xemacs.info, Node: Minor Modes, Next: Variables, Up: Customization
Minor Modes
before it can be executed. This is done to protect
beginners from surprises.
-\1f
-File: xemacs.info, Node: Keymaps, Next: Rebinding, Up: Key Bindings
-
-Keymaps
--------
-
- The bindings between characters and command functions are recorded in
-data structures called "keymaps". Emacs has many of these. One, the
-"global" keymap, defines the meanings of the single-character keys that
-are defined regardless of major mode. It is the value of the variable
-`global-map'.
-
- Each major mode has another keymap, its "local keymap", which
-contains overriding definitions for the single-character keys that are
-redefined in that mode. Each buffer records which local keymap is
-installed for it at any time, and the current buffer's local keymap is
-the only one that directly affects command execution. The local keymaps
-for Lisp mode, C mode, and many other major modes always exist even when
-not in use. They are the values of the variables `lisp-mode-map',
-`c-mode-map', and so on. For less frequently used major modes, the
-local keymap is sometimes constructed only when the mode is used for the
-first time in a session, to save space.
-
- There are local keymaps for the minibuffer, too; they contain various
-completion and exit commands.
-
- * `minibuffer-local-map' is used for ordinary input (no completion).
-
- * `minibuffer-local-ns-map' is similar, except that <SPC> exits just
- like <RET>. This is used mainly for Mocklisp compatibility.
-
- * `minibuffer-local-completion-map' is for permissive completion.
-
- * `minibuffer-local-must-match-map' is for strict completion and for
- cautious completion.
-
- * `repeat-complex-command-map' is for use in `C-x <ESC>'.
-
- * `isearch-mode-map' contains the bindings of the special keys which
- are bound in the pseudo-mode entered with `C-s' and `C-r'.
-
- Finally, each prefix key has a keymap which defines the key sequences
-that start with it. For example, `ctl-x-map' is the keymap used for
-characters following a `C-x'.
-
- * `ctl-x-map' is the variable name for the map used for characters
- that follow `C-x'.
-
- * `help-map' is used for characters that follow `C-h'.
-
- * `esc-map' is for characters that follow <ESC>. All Meta characters
- are actually defined by this map.
-
- * `ctl-x-4-map' is for characters that follow `C-x 4'.
-
- * `mode-specific-map' is for characters that follow `C-c'.
-
- The definition of a prefix key is the keymap to use for looking up
-the following character. Sometimes the definition is actually a Lisp
-symbol whose function definition is the following character keymap. The
-effect is the same, but it provides a command name for the prefix key
-that you can use as a description of what the prefix key is for. Thus
-the binding of `C-x' is the symbol `Ctl-X-Prefix', whose function
-definition is the keymap for `C-x' commands, the value of `ctl-x-map'.
-
- Prefix key definitions can appear in either the global map or a
-local map. The definitions of `C-c', `C-x', `C-h', and <ESC> as prefix
-keys appear in the global map, so these prefix keys are always
-available. Major modes can locally redefine a key as a prefix by
-putting a prefix key definition for it in the local map.
-
- A mode can also put a prefix definition of a global prefix character
-such as `C-x' into its local map. This is how major modes override the
-definitions of certain keys that start with `C-x'. This case is
-special, because the local definition does not entirely replace the
-global one. When both the global and local definitions of a key are
-other keymaps, the next character is looked up in both keymaps, with
-the local definition overriding the global one. The character after the
-`C-x' is looked up in both the major mode's own keymap for redefined
-`C-x' commands and in `ctl-x-map'. If the major mode's own keymap for
-`C-x' commands contains `nil', the definition from the global keymap
-for `C-x' commands is used.
-
-\1f
-File: xemacs.info, Node: Rebinding, Next: Disabling, Prev: Keymaps, Up: Key Bindings
-
-Changing Key Bindings
----------------------
-
- You can redefine an Emacs key by changing its entry in a keymap.
-You can change the global keymap, in which case the change is effective
-in all major modes except those that have their own overriding local
-definitions for the same key. Or you can change the current buffer's
-local map, which affects all buffers using the same major mode.
-
-* Menu:
-
-* Interactive Rebinding:: Changing Key Bindings Interactively
-* Programmatic Rebinding:: Changing Key Bindings Programmatically
-* Key Bindings Using Strings:: Using Strings for Changing Key Bindings
-
-\1f
-File: xemacs.info, Node: Interactive Rebinding, Next: Programmatic Rebinding, Up: Rebinding
-
-Changing Key Bindings Interactively
-...................................
-
-`M-x global-set-key <RET> KEY CMD <RET>'
- Defines KEY globally to run CMD.
-
-`M-x local-set-key <RET> KEYS CMD <RET>'
- Defines KEY locally (in the major mode now in effect) to run CMD.
-
-`M-x local-unset-key <RET> KEYS <RET>'
- Removes the local binding of KEY.
-
- CMD is a symbol naming an interactively-callable function.
-
- When called interactively, KEY is the next complete key sequence
-that you type. When called as a function, KEY is a string, a vector of
-events, or a vector of key-description lists as described in the
-`define-key' function description. The binding goes in the current
-buffer's local map, which is shared with other buffers in the same
-major mode.
-
- The following example:
-
- M-x global-set-key <RET> C-f next-line <RET>
-
-redefines `C-f' to move down a line. The fact that CMD is read second
-makes it serve as a kind of confirmation for KEY.
-
- These functions offer no way to specify a particular prefix keymap as
-the one to redefine in, but that is not necessary, as you can include
-prefixes in KEY. KEY is read by reading characters one by one until
-they amount to a complete key (that is, not a prefix key). Thus, if
-you type `C-f' for KEY, Emacs enters the minibuffer immediately to read
-CMD. But if you type `C-x', another character is read; if that
-character is `4', another character is read, and so on. For example,
-
- M-x global-set-key <RET> C-x 4 $ spell-other-window <RET>
-
-redefines `C-x 4 $' to run the (fictitious) command
-`spell-other-window'.
-
- The most general way to modify a keymap is the function
-`define-key', used in Lisp code (such as your `.emacs' file).
-`define-key' takes three arguments: the keymap, the key to modify in
-it, and the new definition. *Note Init File::, for an example.
-`substitute-key-definition' is used similarly; it takes three
-arguments, an old definition, a new definition, and a keymap, and
-redefines in that keymap all keys that were previously defined with the
-old definition to have the new definition instead.
-
-\1f
-File: xemacs.info, Node: Programmatic Rebinding, Next: Key Bindings Using Strings, Prev: Interactive Rebinding, Up: Rebinding
-
-Changing Key Bindings Programmatically
-......................................
-
- You can use the functions `global-set-key' and `define-key' to
-rebind keys under program control.
-
-``(global-set-key KEYS CMD)''
- Defines KEYS globally to run CMD.
-
-``(define-key KEYMAP KEYS DEF)''
- Defines KEYS to run DEF in the keymap KEYMAP.
-
- KEYMAP is a keymap object.
-
- KEYS is the sequence of keystrokes to bind.
-
- DEF is anything that can be a key's definition:
-
- * `nil', meaning key is undefined in this keymap
-
- * A command, that is, a Lisp function suitable for interactive
- calling
-
- * A string or key sequence vector, which is treated as a keyboard
- macro
-
- * A keymap to define a prefix key
-
- * A symbol so that when the key is looked up, the symbol stands for
- its function definition, which should at that time be one of the
- above, or another symbol whose function definition is used, and so
- on
-
- * A cons, `(string . defn)', meaning that DEFN is the definition
- (DEFN should be a valid definition in its own right)
-
- * A cons, `(keymap . char)', meaning use the definition of CHAR in
- map KEYMAP
-
- For backward compatibility, XEmacs allows you to specify key
-sequences as strings. However, the preferred method is to use the
-representations of key sequences as vectors of keystrokes. *Note
-Keystrokes::, for more information about the rules for constructing key
-sequences.
-
- Emacs allows you to abbreviate representations for key sequences in
-most places where there is no ambiguity. Here are some rules for
-abbreviation:
-
- * The keysym by itself is equivalent to a list of just that keysym,
- i.e., `f1' is equivalent to `(f1)'.
-
- * A keystroke by itself is equivalent to a vector containing just
- that keystroke, i.e., `(control a)' is equivalent to `[(control
- a)]'.
-
- * You can use ASCII codes for keysyms that have them. i.e., `65' is
- equivalent to `A'. (This is not so much an abbreviation as an
- alternate representation.)
-
- Here are some examples of programmatically binding keys:
-
-
- ;;; Bind `my-command' to <f1>
- (global-set-key 'f1 'my-command)
-
- ;;; Bind `my-command' to Shift-f1
- (global-set-key '(shift f1) 'my-command)
-
- ;;; Bind `my-command' to C-c Shift-f1
- (global-set-key '[(control c) (shift f1)] 'my-command)
-
- ;;; Bind `my-command' to the middle mouse button.
- (global-set-key 'button2 'my-command)
-
- ;;; Bind `my-command' to <META> <CTL> <Right Mouse Button>
- ;;; in the keymap that is in force when you are running `dired'.
- (define-key dired-mode-map '(meta control button3) 'my-command)
-
-\1f
-File: xemacs.info, Node: Key Bindings Using Strings, Prev: Programmatic Rebinding, Up: Rebinding
-
-Using Strings for Changing Key Bindings
-.......................................
-
- For backward compatibility, you can still use strings to represent
-key sequences. Thus you can use commands like the following:
-
- ;;; Bind `end-of-line' to C-f
- (global-set-key "\C-f" 'end-of-line)
-
- Note, however, that in some cases you may be binding more than one
-key sequence by using a single command. This situation can arise
-because in ASCII, `C-i' and <TAB> have the same representation.
-Therefore, when Emacs sees:
-
- (global-set-key "\C-i" 'end-of-line)
-
- it is unclear whether the user intended to bind `C-i' or <TAB>. The
-solution XEmacs adopts is to bind both of these key sequences.
-
- After binding a command to two key sequences with a form like:
-
- (define-key global-map "\^X\^I" 'command-1)
-
- it is possible to redefine only one of those sequences like so:
-
- (define-key global-map [(control x) (control i)] 'command-2)
- (define-key global-map [(control x) tab] 'command-3)
-
- This applies only when running under a window system. If you are
-talking to Emacs through an ASCII-only channel, you do not get any of
-these features.
-
- Here is a table of pairs of key sequences that behave in a similar
-fashion:
-
- control h backspace
- control l clear
- control i tab
- control m return
- control j linefeed
- control [ escape
- control @ control space
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Keymaps, Next: Rebinding, Up: Key Bindings
+
+Keymaps
+-------
+
+ The bindings between characters and command functions are recorded in
+data structures called "keymaps". Emacs has many of these. One, the
+"global" keymap, defines the meanings of the single-character keys that
+are defined regardless of major mode. It is the value of the variable
+`global-map'.
+
+ Each major mode has another keymap, its "local keymap", which
+contains overriding definitions for the single-character keys that are
+redefined in that mode. Each buffer records which local keymap is
+installed for it at any time, and the current buffer's local keymap is
+the only one that directly affects command execution. The local keymaps
+for Lisp mode, C mode, and many other major modes always exist even when
+not in use. They are the values of the variables `lisp-mode-map',
+`c-mode-map', and so on. For less frequently used major modes, the
+local keymap is sometimes constructed only when the mode is used for the
+first time in a session, to save space.
+
+ There are local keymaps for the minibuffer, too; they contain various
+completion and exit commands.
+
+ * `minibuffer-local-map' is used for ordinary input (no completion).
+
+ * `minibuffer-local-ns-map' is similar, except that <SPC> exits just
+ like <RET>. This is used mainly for Mocklisp compatibility.
+
+ * `minibuffer-local-completion-map' is for permissive completion.
+
+ * `minibuffer-local-must-match-map' is for strict completion and for
+ cautious completion.
+
+ * `repeat-complex-command-map' is for use in `C-x <ESC>'.
+
+ * `isearch-mode-map' contains the bindings of the special keys which
+ are bound in the pseudo-mode entered with `C-s' and `C-r'.
+
+ Finally, each prefix key has a keymap which defines the key sequences
+that start with it. For example, `ctl-x-map' is the keymap used for
+characters following a `C-x'.
+
+ * `ctl-x-map' is the variable name for the map used for characters
+ that follow `C-x'.
+
+ * `help-map' is used for characters that follow `C-h'.
+
+ * `esc-map' is for characters that follow <ESC>. All Meta characters
+ are actually defined by this map.
+
+ * `ctl-x-4-map' is for characters that follow `C-x 4'.
+
+ * `mode-specific-map' is for characters that follow `C-c'.
+
+ The definition of a prefix key is the keymap to use for looking up
+the following character. Sometimes the definition is actually a Lisp
+symbol whose function definition is the following character keymap. The
+effect is the same, but it provides a command name for the prefix key
+that you can use as a description of what the prefix key is for. Thus
+the binding of `C-x' is the symbol `Ctl-X-Prefix', whose function
+definition is the keymap for `C-x' commands, the value of `ctl-x-map'.
+
+ Prefix key definitions can appear in either the global map or a
+local map. The definitions of `C-c', `C-x', `C-h', and <ESC> as prefix
+keys appear in the global map, so these prefix keys are always
+available. Major modes can locally redefine a key as a prefix by
+putting a prefix key definition for it in the local map.
+
+ A mode can also put a prefix definition of a global prefix character
+such as `C-x' into its local map. This is how major modes override the
+definitions of certain keys that start with `C-x'. This case is
+special, because the local definition does not entirely replace the
+global one. When both the global and local definitions of a key are
+other keymaps, the next character is looked up in both keymaps, with
+the local definition overriding the global one. The character after the
+`C-x' is looked up in both the major mode's own keymap for redefined
+`C-x' commands and in `ctl-x-map'. If the major mode's own keymap for
+`C-x' commands contains `nil', the definition from the global keymap
+for `C-x' commands is used.
+
+\1f
+File: xemacs.info, Node: Rebinding, Next: Disabling, Prev: Keymaps, Up: Key Bindings
+
+Changing Key Bindings
+---------------------
+
+ You can redefine an Emacs key by changing its entry in a keymap.
+You can change the global keymap, in which case the change is effective
+in all major modes except those that have their own overriding local
+definitions for the same key. Or you can change the current buffer's
+local map, which affects all buffers using the same major mode.
+
+* Menu:
+
+* Interactive Rebinding:: Changing Key Bindings Interactively
+* Programmatic Rebinding:: Changing Key Bindings Programmatically
+* Key Bindings Using Strings:: Using Strings for Changing Key Bindings
+
+\1f
+File: xemacs.info, Node: Interactive Rebinding, Next: Programmatic Rebinding, Up: Rebinding
+
+Changing Key Bindings Interactively
+...................................
+
+`M-x global-set-key <RET> KEY CMD <RET>'
+ Defines KEY globally to run CMD.
+
+`M-x local-set-key <RET> KEYS CMD <RET>'
+ Defines KEY locally (in the major mode now in effect) to run CMD.
+
+`M-x local-unset-key <RET> KEYS <RET>'
+ Removes the local binding of KEY.
+
+ CMD is a symbol naming an interactively-callable function.
+
+ When called interactively, KEY is the next complete key sequence
+that you type. When called as a function, KEY is a string, a vector of
+events, or a vector of key-description lists as described in the
+`define-key' function description. The binding goes in the current
+buffer's local map, which is shared with other buffers in the same
+major mode.
+
+ The following example:
+
+ M-x global-set-key <RET> C-f next-line <RET>
+
+redefines `C-f' to move down a line. The fact that CMD is read second
+makes it serve as a kind of confirmation for KEY.
+
+ These functions offer no way to specify a particular prefix keymap as
+the one to redefine in, but that is not necessary, as you can include
+prefixes in KEY. KEY is read by reading characters one by one until
+they amount to a complete key (that is, not a prefix key). Thus, if
+you type `C-f' for KEY, Emacs enters the minibuffer immediately to read
+CMD. But if you type `C-x', another character is read; if that
+character is `4', another character is read, and so on. For example,
+
+ M-x global-set-key <RET> C-x 4 $ spell-other-window <RET>
+
+redefines `C-x 4 $' to run the (fictitious) command
+`spell-other-window'.
+
+ The most general way to modify a keymap is the function
+`define-key', used in Lisp code (such as your `.emacs' file).
+`define-key' takes three arguments: the keymap, the key to modify in
+it, and the new definition. *Note Init File::, for an example.
+`substitute-key-definition' is used similarly; it takes three
+arguments, an old definition, a new definition, and a keymap, and
+redefines in that keymap all keys that were previously defined with the
+old definition to have the new definition instead.
+
+\1f
+File: xemacs.info, Node: Programmatic Rebinding, Next: Key Bindings Using Strings, Prev: Interactive Rebinding, Up: Rebinding
+
+Changing Key Bindings Programmatically
+......................................
+
+ You can use the functions `global-set-key' and `define-key' to
+rebind keys under program control.
+
+``(global-set-key KEYS CMD)''
+ Defines KEYS globally to run CMD.
+
+``(define-key KEYMAP KEYS DEF)''
+ Defines KEYS to run DEF in the keymap KEYMAP.
+
+ KEYMAP is a keymap object.
+
+ KEYS is the sequence of keystrokes to bind.
+
+ DEF is anything that can be a key's definition:
+
+ * `nil', meaning key is undefined in this keymap
+
+ * A command, that is, a Lisp function suitable for interactive
+ calling
+
+ * A string or key sequence vector, which is treated as a keyboard
+ macro
+
+ * A keymap to define a prefix key
+
+ * A symbol so that when the key is looked up, the symbol stands for
+ its function definition, which should at that time be one of the
+ above, or another symbol whose function definition is used, and so
+ on
+
+ * A cons, `(string . defn)', meaning that DEFN is the definition
+ (DEFN should be a valid definition in its own right)
+
+ * A cons, `(keymap . char)', meaning use the definition of CHAR in
+ map KEYMAP
+
+ For backward compatibility, XEmacs allows you to specify key
+sequences as strings. However, the preferred method is to use the
+representations of key sequences as vectors of keystrokes. *Note
+Keystrokes::, for more information about the rules for constructing key
+sequences.
+
+ Emacs allows you to abbreviate representations for key sequences in
+most places where there is no ambiguity. Here are some rules for
+abbreviation:
+
+ * The keysym by itself is equivalent to a list of just that keysym,
+ i.e., `f1' is equivalent to `(f1)'.
+
+ * A keystroke by itself is equivalent to a vector containing just
+ that keystroke, i.e., `(control a)' is equivalent to `[(control
+ a)]'.
+
+ * You can use ASCII codes for keysyms that have them. i.e., `65' is
+ equivalent to `A'. (This is not so much an abbreviation as an
+ alternate representation.)
+
+ Here are some examples of programmatically binding keys:
+
+
+ ;;; Bind `my-command' to <f1>
+ (global-set-key 'f1 'my-command)
+
+ ;;; Bind `my-command' to Shift-f1
+ (global-set-key '(shift f1) 'my-command)
+
+ ;;; Bind `my-command' to C-c Shift-f1
+ (global-set-key '[(control c) (shift f1)] 'my-command)
+
+ ;;; Bind `my-command' to the middle mouse button.
+ (global-set-key 'button2 'my-command)
+
+ ;;; Bind `my-command' to <META> <CTL> <Right Mouse Button>
+ ;;; in the keymap that is in force when you are running `dired'.
+ (define-key dired-mode-map '(meta control button3) 'my-command)
+
+\1f
+File: xemacs.info, Node: Key Bindings Using Strings, Prev: Programmatic Rebinding, Up: Rebinding
+
+Using Strings for Changing Key Bindings
+.......................................
+
+ For backward compatibility, you can still use strings to represent
+key sequences. Thus you can use commands like the following:
+
+ ;;; Bind `end-of-line' to C-f
+ (global-set-key "\C-f" 'end-of-line)
+
+ Note, however, that in some cases you may be binding more than one
+key sequence by using a single command. This situation can arise
+because in ASCII, `C-i' and <TAB> have the same representation.
+Therefore, when Emacs sees:
+
+ (global-set-key "\C-i" 'end-of-line)
+
+ it is unclear whether the user intended to bind `C-i' or <TAB>. The
+solution XEmacs adopts is to bind both of these key sequences.
+
+ After binding a command to two key sequences with a form like:
+
+ (define-key global-map "\^X\^I" 'command-1)
+
+ it is possible to redefine only one of those sequences like so:
+
+ (define-key global-map [(control x) (control i)] 'command-2)
+ (define-key global-map [(control x) tab] 'command-3)
+
+ This applies only when running under a window system. If you are
+talking to Emacs through an ASCII-only channel, you do not get any of
+these features.
+
+ Here is a table of pairs of key sequences that behave in a similar
+fashion:
+
+ control h backspace
+ control l clear
+ control i tab
+ control m return
+ control j linefeed
+ control [ escape
+ control @ control space
+
+\1f
File: xemacs.info, Node: Disabling, Prev: Rebinding, Up: Key Bindings
Disabling Commands
You type something other than `yes' or `no'
\1f
-File: xemacs.info, Node: Faces, Next: X Resources, Prev: Audible Bell, Up: Customization
+File: xemacs.info, Node: Faces, Next: Frame Components, Prev: Audible Bell, Up: Customization
Faces
=====
otherwise, it is changed in all frames.
\1f
-File: xemacs.info, Node: X Resources, Prev: Faces, Up: Customization
+File: xemacs.info, Node: Frame Components, Next: X Resources, Prev: Faces, Up: Customization
+
+Frame Components
+================
+
+ You can control the presence and position of most frame components,
+such as the menubar, toolbars, and gutters.
+
+ This section is not written yet. Try the Lisp Reference Manual:
+*Note Menubar: (lispref)Menubar, *Note Toolbar Intro: (lispref)Toolbar
+Intro, and *Note Gutter Intro: (lispref)Gutter Intro.
+
+\1f
+File: xemacs.info, Node: X Resources, Prev: Frame Components, Up: Customization
X Resources
===========
resources are used to initialize the variables
`x-pointer-foreground-color' and `x-pointer-background-color'.
-\1f
-File: xemacs.info, Node: Face Resources, Next: Widgets, Prev: Resource List, Up: X Resources
-
-Face Resources
---------------
-
- The attributes of faces are also per-frame. They can be specified as:
-
- Emacs.FACE_NAME.parameter: value
-
-or
-
- Emacs*FRAME_NAME.FACE_NAME.parameter: value
-
-Faces accept the following resources:
-
-`attributeFont' (class `AttributeFont'): font-name
- The font of this face.
-
-`attributeForeground' (class `AttributeForeground'): color-name
-`attributeBackground' (class `AttributeBackground'): color-name
- The foreground and background colors of this face.
-
-`attributeBackgroundPixmap' (class `AttributeBackgroundPixmap'): file-name
- The name of an XBM file (or XPM file, if your version of Emacs
- supports XPM), to use as a background stipple.
-
-`attributeUnderline' (class `AttributeUnderline'): boolean
- Whether text in this face should be underlined.
-
- All text is displayed in some face, defaulting to the face named
-`default'. To set the font of normal text, use
-`Emacs*default.attributeFont'. To set it in the frame named `fred', use
-`Emacs*fred.default.attributeFont'.
-
- These are the names of the predefined faces:
-
-`default'
- Everything inherits from this.
-
-`bold'
- If this is not specified in the resource database, Emacs tries to
- find a bold version of the font of the default face.
-
-`italic'
- If this is not specified in the resource database, Emacs tries to
- find an italic version of the font of the default face.
-
-`bold-italic'
- If this is not specified in the resource database, Emacs tries to
- find a bold-italic version of the font of the default face.
-
-`modeline'
- This is the face that the modeline is displayed in. If not
- specified in the resource database, it is determined from the
- default face by reversing the foreground and background colors.
-
-`highlight'
- This is the face that highlighted extents (for example, Info
- cross-references and possible completions, when the mouse passes
- over them) are displayed in.
-
-`left-margin'
-`right-margin'
- These are the faces that the left and right annotation margins are
- displayed in.
-
-`zmacs-region'
- This is the face that mouse selections are displayed in.
-
-`isearch'
- This is the face that the matched text being searched for is
- displayed in.
-
-`info-node'
- This is the face of info menu items. If unspecified, it is copied
- from `bold-italic'.
-
-`info-xref'
- This is the face of info cross-references. If unspecified, it is
- copied from `bold'. (Note that, when the mouse passes over a
- cross-reference, the cross-reference's face is determined from a
- combination of the `info-xref' and `highlight' faces.)
-
- Other packages might define their own faces; to see a list of all
-faces, use any of the interactive face-manipulation commands such as
-`set-face-font' and type `?' when you are prompted for the name of a
-face.
-
- If the `bold', `italic', and `bold-italic' faces are not specified
-in the resource database, then XEmacs attempts to derive them from the
-font of the default face. It can only succeed at this if you have
-specified the default font using the XLFD (X Logical Font Description)
-format, which looks like
-
- *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
-
-If you use any of the other, less strict font name formats, some of
-which look like
-
- lucidasanstypewriter-12
- fixed
- 9x13
-
- then XEmacs won't be able to guess the names of the bold and italic
-versions. All X fonts can be referred to via XLFD-style names, so you
-should use those forms. See the man pages for `X(1)', `xlsfonts(1)',
-and `xfontsel(1)'.
-
-\1f
-File: xemacs.info, Node: Widgets, Next: Menubar Resources, Prev: Face Resources, Up: X Resources
-
-Widgets
--------
-
- There are several structural widgets between the terminal EmacsFrame
-widget and the top level ApplicationShell; the exact names and types of
-these widgets change from release to release (for example, they changed
-between 19.8 and 19.9, 19.9 and 19.10, and 19.10 and 19.12) and are
-subject to further change in the future, so you should avoid mentioning
-them in your resource database. The above-mentioned syntaxes should be
-forward- compatible. As of 19.13, the exact widget hierarchy is as
-follows:
-
- INVOCATION-NAME "shell" "container" FRAME-NAME
- x-emacs-application-class "EmacsShell" "EmacsManager" "EmacsFrame"
-
- where INVOCATION-NAME is the terminal component of the name of the
-XEmacs executable (usually `xemacs'), and `x-emacs-application-class'
-is generally `Emacs'.
-
-\1f
-File: xemacs.info, Node: Menubar Resources, Prev: Widgets, Up: X Resources
-
-Menubar Resources
------------------
-
- As the menubar is implemented as a widget which is not a part of
-XEmacs proper, it does not use the fac" mechanism for specifying fonts
-and colors: It uses whatever resources are appropriate to the type of
-widget which is used to implement it.
-
- If Emacs was compiled to use only the Motif-lookalike menu widgets,
-then one way to specify the font of the menubar would be
-
- Emacs*menubar*font: *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
-
- If the Motif library is being used, then one would have to use
-
- Emacs*menubar*fontList: *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
-
- because the Motif library uses the `fontList' resource name instead
-of `font', which has subtly different semantics.
-
- The same is true of the scrollbars: They accept whichever resources
-are appropriate for the toolkit in use.
-
-\1f
-File: xemacs.info, Node: Quitting, Next: Lossage, Prev: Customization, Up: Top
-
-Quitting and Aborting
-=====================
-
-`C-g'
- Quit. Cancel running or partially typed command.
-
-`C-]'
- Abort innermost recursive editing level and cancel the command
- which invoked it (`abort-recursive-edit').
-
-`M-x top-level'
- Abort all recursive editing levels that are currently executing.
-
-`C-x u'
- Cancel an already-executed command, usually (`undo').
-
- There are two ways of cancelling commands which are not finished
-executing: "quitting" with `C-g', and "aborting" with `C-]' or `M-x
-top-level'. Quitting is cancelling a partially typed command or one
-which is already running. Aborting is getting out of a recursive
-editing level and cancelling the command that invoked the recursive
-edit.
-
- Quitting with `C-g' is used for getting rid of a partially typed
-command or a numeric argument that you don't want. It also stops a
-running command in the middle in a relatively safe way, so you can use
-it if you accidentally start executing a command that takes a long
-time. In particular, it is safe to quit out of killing; either your
-text will ALL still be there, or it will ALL be in the kill ring (or
-maybe both). Quitting an incremental search does special things
-documented under searching; in general, it may take two successive
-`C-g' characters to get out of a search. `C-g' works by setting the
-variable `quit-flag' to `t' the instant `C-g' is typed; Emacs Lisp
-checks this variable frequently and quits if it is non-`nil'. `C-g' is
-only actually executed as a command if it is typed while Emacs is
-waiting for input.
-
- If you quit twice in a row before the first `C-g' is recognized, you
-activate the "emergency escape" feature and return to the shell. *Note
-Emergency Escape::.
-
- You can use `C-]' (`abort-recursive-edit') to get out of a recursive
-editing level and cancel the command which invoked it. Quitting with
-`C-g' does not do this, and could not do this because it is used to
-cancel a partially typed command within the recursive editing level.
-Both operations are useful. For example, if you are in the Emacs
-debugger (*note Lisp Debug::) and have typed `C-u 8' to enter a numeric
-argument, you can cancel that argument with `C-g' and remain in the
-debugger.
-
- 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.
-`C-]' only gets you out one level at a time, but `M-x top-level' goes
-out all levels at once. Both `C-]' and `M-x top-level' are like all
-other commands and unlike `C-g' in that they are effective only when
-Emacs is ready for a command. `C-]' is an ordinary key and has its
-meaning only because of its binding in the keymap. *Note Recursive
-Edit::.
-
- `C-x u' (`undo') is not strictly speaking a way of cancelling a
-command, but you can think of it as cancelling a command already
-finished executing. *Note Undo::.
-
-\1f
-File: xemacs.info, Node: Lossage, Next: Bugs, Prev: Quitting, Up: Top
-
-Dealing With Emacs Trouble
-==========================
-
- This section describes various conditions in which Emacs fails to
-work, and how to recognize them and correct them.
-
-* Menu:
-
-* Stuck Recursive:: `[...]' in mode line around the parentheses.
-* Screen Garbled:: Garbage on the screen.
-* Text Garbled:: Garbage in the text.
-* Unasked-for Search:: Spontaneous entry to incremental search.
-* Emergency Escape:: Emergency escape---
- What to do if Emacs stops responding.
-* Total Frustration:: When you are at your wits' end.
-
-\1f
-File: xemacs.info, Node: Stuck Recursive, Next: Screen Garbled, Prev: Lossage, Up: Lossage
-
-Recursive Editing Levels
-------------------------
-
- Recursive editing levels are important and useful features of Emacs,
-but they can seem like malfunctions to the user who does not understand
-them.
-
- If the mode line has square brackets `[...]' around the parentheses
-that contain the names of the major and minor modes, you have entered a
-recursive editing level. If you did not do this on purpose, or if you
-don't understand what that means, you should just get out of the
-recursive editing level. To do so, type `M-x top-level'. This is
-called getting back to top level. *Note Recursive Edit::.
-
-\1f
-File: xemacs.info, Node: Screen Garbled, Next: Text Garbled, Prev: Stuck Recursive, Up: Lossage
-
-Garbage on the Screen
----------------------
-
- If the data on the screen looks wrong, the first thing to do is see
-whether the text is actually wrong. Type `C-l', to redisplay the
-entire screen. If the text appears correct after this, the problem was
-entirely in the previous screen update.
-
- Display updating problems often result from an incorrect termcap
-entry for the terminal you are using. The file `etc/TERMS' in the Emacs
-distribution gives the fixes for known problems of this sort.
-`INSTALL' contains general advice for these problems in one of its
-sections. Very likely there is simply insufficient padding for certain
-display operations. To investigate the possibility that you have this
-sort of problem, try Emacs on another terminal made by a different
-manufacturer. If problems happen frequently on one kind of terminal but
-not another kind, the real problem is likely to be a bad termcap entry,
-though it could also be due to a bug in Emacs that appears for terminals
-that have or lack specific features.
-
-\1f
-File: xemacs.info, Node: Text Garbled, Next: Unasked-for Search, Prev: Screen Garbled, Up: Lossage
-
-Garbage in the Text
--------------------
-
- If `C-l' shows that the text is wrong, try undoing the changes to it
-using `C-x u' until it gets back to a state you consider correct. Also
-try `C-h l' to find out what command you typed to produce the observed
-results.
-
- If a large portion of text appears to be missing at the beginning or
-end of the buffer, check for the word `Narrow' in the mode line. If it
-appears, the text is still present, but marked off-limits. To make it
-visible again, type `C-x n w'. *Note Narrowing::.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Face Resources, Next: Widgets, Prev: Resource List, Up: X Resources
+
+Face Resources
+--------------
+
+ The attributes of faces are also per-frame. They can be specified as:
+
+ Emacs.FACE_NAME.parameter: value
+
+or
+
+ Emacs*FRAME_NAME.FACE_NAME.parameter: value
+
+Faces accept the following resources:
+
+`attributeFont' (class `AttributeFont'): font-name
+ The font of this face.
+
+`attributeForeground' (class `AttributeForeground'): color-name
+`attributeBackground' (class `AttributeBackground'): color-name
+ The foreground and background colors of this face.
+
+`attributeBackgroundPixmap' (class `AttributeBackgroundPixmap'): file-name
+ The name of an XBM file (or XPM file, if your version of Emacs
+ supports XPM), to use as a background stipple.
+
+`attributeUnderline' (class `AttributeUnderline'): boolean
+ Whether text in this face should be underlined.
+
+ All text is displayed in some face, defaulting to the face named
+`default'. To set the font of normal text, use
+`Emacs*default.attributeFont'. To set it in the frame named `fred', use
+`Emacs*fred.default.attributeFont'.
+
+ These are the names of the predefined faces:
+
+`default'
+ Everything inherits from this.
+
+`bold'
+ If this is not specified in the resource database, Emacs tries to
+ find a bold version of the font of the default face.
+
+`italic'
+ If this is not specified in the resource database, Emacs tries to
+ find an italic version of the font of the default face.
+
+`bold-italic'
+ If this is not specified in the resource database, Emacs tries to
+ find a bold-italic version of the font of the default face.
+
+`modeline'
+ This is the face that the modeline is displayed in. If not
+ specified in the resource database, it is determined from the
+ default face by reversing the foreground and background colors.
+
+`highlight'
+ This is the face that highlighted extents (for example, Info
+ cross-references and possible completions, when the mouse passes
+ over them) are displayed in.
+
+`left-margin'
+`right-margin'
+ These are the faces that the left and right annotation margins are
+ displayed in.
+
+`zmacs-region'
+ This is the face that mouse selections are displayed in.
+
+`isearch'
+ This is the face that the matched text being searched for is
+ displayed in.
+
+`info-node'
+ This is the face of info menu items. If unspecified, it is copied
+ from `bold-italic'.
+
+`info-xref'
+ This is the face of info cross-references. If unspecified, it is
+ copied from `bold'. (Note that, when the mouse passes over a
+ cross-reference, the cross-reference's face is determined from a
+ combination of the `info-xref' and `highlight' faces.)
+
+ Other packages might define their own faces; to see a list of all
+faces, use any of the interactive face-manipulation commands such as
+`set-face-font' and type `?' when you are prompted for the name of a
+face.
+
+ If the `bold', `italic', and `bold-italic' faces are not specified
+in the resource database, then XEmacs attempts to derive them from the
+font of the default face. It can only succeed at this if you have
+specified the default font using the XLFD (X Logical Font Description)
+format, which looks like
+
+ *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
+
+If you use any of the other, less strict font name formats, some of
+which look like
+
+ lucidasanstypewriter-12
+ fixed
+ 9x13
+
+ then XEmacs won't be able to guess the names of the bold and italic
+versions. All X fonts can be referred to via XLFD-style names, so you
+should use those forms. See the man pages for `X(1)', `xlsfonts(1)',
+and `xfontsel(1)'.
+
+\1f
+File: xemacs.info, Node: Widgets, Next: Menubar Resources, Prev: Face Resources, Up: X Resources
+
+Widgets
+-------
+
+ There are several structural widgets between the terminal EmacsFrame
+widget and the top level ApplicationShell; the exact names and types of
+these widgets change from release to release (for example, they changed
+between 19.8 and 19.9, 19.9 and 19.10, and 19.10 and 19.12) and are
+subject to further change in the future, so you should avoid mentioning
+them in your resource database. The above-mentioned syntaxes should be
+forward- compatible. As of 19.13, the exact widget hierarchy is as
+follows:
+
+ INVOCATION-NAME "shell" "container" FRAME-NAME
+ x-emacs-application-class "EmacsShell" "EmacsManager" "EmacsFrame"
+
+ where INVOCATION-NAME is the terminal component of the name of the
+XEmacs executable (usually `xemacs'), and `x-emacs-application-class'
+is generally `Emacs'.
+
+\1f
+File: xemacs.info, Node: Menubar Resources, Prev: Widgets, Up: X Resources
+
+Menubar Resources
+-----------------
+
+ As the menubar is implemented as a widget which is not a part of
+XEmacs proper, it does not use the face mechanism for specifying fonts
+and colors: It uses whatever resources are appropriate to the type of
+widget which is used to implement it.
+
+ If Emacs was compiled to use only the Motif-lookalike menu widgets,
+then one way to specify the font of the menubar would be
+
+ Emacs*menubar*font: *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
+
+ If the Motif library is being used, then one would have to use
+
+ Emacs*menubar*fontList: *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
+
+ because the Motif library uses the `fontList' resource name instead
+of `font', which has subtly different semantics.
+
+ The same is true of the scrollbars: They accept whichever resources
+are appropriate for the toolkit in use.
+
+\1f
+File: xemacs.info, Node: Quitting, Next: Lossage, Prev: Customization, Up: Top
+
+Quitting and Aborting
+=====================
+
+`C-g'
+ Quit. Cancel running or partially typed command.
+
+`C-]'
+ Abort innermost recursive editing level and cancel the command
+ which invoked it (`abort-recursive-edit').
+
+`M-x top-level'
+ Abort all recursive editing levels that are currently executing.
+
+`C-x u'
+ Cancel an already-executed command, usually (`undo').
+
+ There are two ways of cancelling commands which are not finished
+executing: "quitting" with `C-g', and "aborting" with `C-]' or `M-x
+top-level'. Quitting is cancelling a partially typed command or one
+which is already running. Aborting is getting out of a recursive
+editing level and cancelling the command that invoked the recursive
+edit.
+
+ Quitting with `C-g' is used for getting rid of a partially typed
+command or a numeric argument that you don't want. It also stops a
+running command in the middle in a relatively safe way, so you can use
+it if you accidentally start executing a command that takes a long
+time. In particular, it is safe to quit out of killing; either your
+text will ALL still be there, or it will ALL be in the kill ring (or
+maybe both). Quitting an incremental search does special things
+documented under searching; in general, it may take two successive
+`C-g' characters to get out of a search. `C-g' works by setting the
+variable `quit-flag' to `t' the instant `C-g' is typed; Emacs Lisp
+checks this variable frequently and quits if it is non-`nil'. `C-g' is
+only actually executed as a command if it is typed while Emacs is
+waiting for input.
+
+ If you quit twice in a row before the first `C-g' is recognized, you
+activate the "emergency escape" feature and return to the shell. *Note
+Emergency Escape::.
+
+ You can use `C-]' (`abort-recursive-edit') to get out of a recursive
+editing level and cancel the command which invoked it. Quitting with
+`C-g' does not do this, and could not do this because it is used to
+cancel a partially typed command within the recursive editing level.
+Both operations are useful. For example, if you are in the Emacs
+debugger (*note Lisp Debug::) and have typed `C-u 8' to enter a numeric
+argument, you can cancel that argument with `C-g' and remain in the
+debugger.
+
+ 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.
+`C-]' only gets you out one level at a time, but `M-x top-level' goes
+out all levels at once. Both `C-]' and `M-x top-level' are like all
+other commands and unlike `C-g' in that they are effective only when
+Emacs is ready for a command. `C-]' is an ordinary key and has its
+meaning only because of its binding in the keymap. *Note Recursive
+Edit::.
+
+ `C-x u' (`undo') is not strictly speaking a way of cancelling a
+command, but you can think of it as cancelling a command already
+finished executing. *Note Undo::.
+
+\1f
+File: xemacs.info, Node: Lossage, Next: Bugs, Prev: Quitting, Up: Top
+
+Dealing With Emacs Trouble
+==========================
+
+ This section describes various conditions in which Emacs fails to
+work, and how to recognize them and correct them.
+
+* Menu:
+
+* Stuck Recursive:: `[...]' in mode line around the parentheses.
+* Screen Garbled:: Garbage on the screen.
+* Text Garbled:: Garbage in the text.
+* Unasked-for Search:: Spontaneous entry to incremental search.
+* Emergency Escape:: Emergency escape---
+ What to do if Emacs stops responding.
+* Total Frustration:: When you are at your wits' end.
+
+\1f
+File: xemacs.info, Node: Stuck Recursive, Next: Screen Garbled, Prev: Lossage, Up: Lossage
+
+Recursive Editing Levels
+------------------------
+
+ Recursive editing levels are important and useful features of Emacs,
+but they can seem like malfunctions to the user who does not understand
+them.
+
+ If the mode line has square brackets `[...]' around the parentheses
+that contain the names of the major and minor modes, you have entered a
+recursive editing level. If you did not do this on purpose, or if you
+don't understand what that means, you should just get out of the
+recursive editing level. To do so, type `M-x top-level'. This is
+called getting back to top level. *Note Recursive Edit::.
+
+\1f
+File: xemacs.info, Node: Screen Garbled, Next: Text Garbled, Prev: Stuck Recursive, Up: Lossage
+
+Garbage on the Screen
+---------------------
+
+ If the data on the screen looks wrong, the first thing to do is see
+whether the text is actually wrong. Type `C-l', to redisplay the
+entire screen. If the text appears correct after this, the problem was
+entirely in the previous screen update.
+
+ Display updating problems often result from an incorrect termcap
+entry for the terminal you are using. The file `etc/TERMS' in the Emacs
+distribution gives the fixes for known problems of this sort.
+`INSTALL' contains general advice for these problems in one of its
+sections. Very likely there is simply insufficient padding for certain
+display operations. To investigate the possibility that you have this
+sort of problem, try Emacs on another terminal made by a different
+manufacturer. If problems happen frequently on one kind of terminal but
+not another kind, the real problem is likely to be a bad termcap entry,
+though it could also be due to a bug in Emacs that appears for terminals
+that have or lack specific features.
+
+\1f
+File: xemacs.info, Node: Text Garbled, Next: Unasked-for Search, Prev: Screen Garbled, Up: Lossage
+
+Garbage in the Text
+-------------------
+
+ If `C-l' shows that the text is wrong, try undoing the changes to it
+using `C-x u' until it gets back to a state you consider correct. Also
+try `C-h l' to find out what command you typed to produce the observed
+results.
+
+ If a large portion of text appears to be missing at the beginning or
+end of the buffer, check for the word `Narrow' in the mode line. If it
+appears, the text is still present, but marked off-limits. To make it
+visible again, type `C-x n w'. *Note Narrowing::.
+
+\1f
File: xemacs.info, Node: Unasked-for Search, Next: Emergency Escape, Prev: Text Garbled, Up: Lossage
Spontaneous Entry to Incremental Search
FTP server. It provides some introductory information and help for
initial configuration problems.
-\1f
-File: xemacs.info, Node: Glossary, Next: Manifesto, Prev: Intro, Up: Top
-
-Glossary
-********
-
-Abbrev
- An abbrev is a text string which expands into a different text
- string when present in the buffer. For example, you might define
- a short word as an abbrev for a long phrase that you want to insert
- frequently. *Note Abbrevs::.
-
-Aborting
- Aborting means getting out of a recursive edit (q.v.). You can use
- the commands `C-]' and `M-x top-level' for this. *Note Quitting::.
-
-Auto Fill mode
- Auto Fill mode is a minor mode in which text you insert is
- automatically broken into lines of fixed width. *Note Filling::.
-
-Auto Saving
- Auto saving means that Emacs automatically stores the contents of
- an Emacs buffer in a specially-named file so the information will
- not be lost if the buffer is lost due to a system error or user
- error. *Note Auto Save::.
-
-Backup File
- A backup file records the contents that a file had before the
- current editing session. Emacs creates backup files automatically
- to help you track down or cancel changes you later regret. *Note
- Backup::.
-
-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
- parenthesis that matches one just inserted (*note Matching Parens:
- Matching.).
-
-Bind
- To bind a key is to change its binding (q.v.). *Note Rebinding::.
-
-Binding
- A key gets its meaning in Emacs by having a binding which is a
- command (q.v.), a Lisp function that is run when the key is typed.
- *Note Binding: Commands. Customization often involves rebinding a
- character to a different command function. The bindings of all
- keys are recorded in the keymaps (q.v.). *Note Keymaps::.
-
-Blank Lines
- Blank lines are lines that contain only whitespace. Emacs has
- several commands for operating on the blank lines in a buffer.
-
-Buffer
- The buffer is the basic editing unit; one buffer corresponds to one
- piece of text being edited. You can have several buffers, but at
- any time you are editing only one, the `selected' buffer, though
- several buffers can be visible when you are using multiple
- windows. *Note Buffers::.
-
-Buffer Selection History
- Emacs keeps a buffer selection history which records how recently
- each Emacs buffer was selected. Emacs uses this list when
- choosing a buffer to select. *Note Buffers::.
-
-C-
- `C' in the name of a character is an abbreviation for Control.
- *Note C-: Keystrokes.
-
-C-M-
- `C-M-' in the name of a character is an abbreviation for
- Control-Meta. *Note C-M-: Keystrokes.
-
-Case Conversion
- Case conversion means changing text from upper case to lower case
- or vice versa. *Note Case::, for the commands for case conversion.
-
-Characters
- Characters form the contents of an Emacs buffer; also, Emacs
- commands are invoked by keys (q.v.), which are sequences of one or
- more characters. *Note Keystrokes::.
-
-Command
- A command is a Lisp function specially defined to be able to serve
- as a key binding in Emacs. When you type a key (q.v.), Emacs
- looks up its binding (q.v.) in the relevant keymaps (q.v.) to find
- the command to run. *Note Commands::.
-
-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::).
-
-Comments
- A comment is text in a program which is intended only for the
- people reading the program, and is marked specially so that it
- will be ignored when the program is loaded or compiled. Emacs
- offers special commands for creating, aligning, and killing
- comments. *Note Comments::.
-
-Compilation
- Compilation is the process of creating an executable program from
- source code. Emacs has commands for compiling files of Emacs Lisp
- code (*note Lisp Libraries::) and programs in C and other languages
- (*note Compilation::).
-
-Complete Key
- A complete key is a character or sequence of characters which,
- when typed by the user, fully specifies one action to be performed
- by Emacs. For example, `X' and `Control-f' and `Control-x m' are
- keys. Keys derive their meanings from being bound (q.v.) to
- commands (q.v.). Thus, `X' is conventionally bound to a command
- to insert `X' in the buffer; `C-x m' is conventionally bound to a
- command to begin composing a mail message. *Note Keystrokes::.
-
-Completion
- When Emacs automatically fills an abbreviation for a name into the
- entire name, that process is called completion. Completion is
- done for minibuffer (q.v.) arguments when the set of possible
- valid inputs is known; for example, on command names, buffer
- names, and file names. Completion occurs when you type <TAB>,
- <SPC>, or <RET>. *Note Completion::.
-
-Continuation Line
- When a line of text is longer than the width of the frame, it
- takes up more than one screen line when displayed. We say that the
- text line is continued, and all screen lines used for it after the
- first are called continuation lines. *Note Continuation: Basic.
-
-Control-Character
- ASCII characters with octal codes 0 through 037, and also code
- 0177, do not have graphic images assigned to them. These are the
- control characters. Any control character can be typed by holding
- down the <CTRL> key and typing some other character; some have
- special keys on the keyboard. <RET>, <TAB>, <ESC>, <LFD>, and
- <DEL> are all control characters. *Note Keystrokes::.
-
-Copyleft
- A copyleft is a notice giving the public legal permission to
- redistribute a program or other work of art. Copylefts are used
- by leftists to enrich the public just as copyrights are used by
- rightists to gain power over the public.
-
-Current Buffer
- The current buffer in Emacs is the Emacs buffer on which most
- editing commands operate. You can select any Emacs buffer as the
- current one. *Note Buffers::.
-
-Current Line
- The line point is on (*note Point::).
-
-Current Paragraph
- The paragraph that point is in. If point is between paragraphs,
- the current paragraph is the one that follows point. *Note
- Paragraphs::.
-
-Current Defun
- The defun (q.v.) that point is in. If point is between defuns, the
- current defun is the one that follows point. *Note Defuns::.
-
-Cursor
- The cursor is the rectangle on the screen which indicates the
- position called point (q.v.) at which insertion and deletion takes
- place. The cursor is on or under the character that follows
- point. Often people speak of `the cursor' when, strictly
- speaking, they mean `point'. *Note Cursor: Basic.
-
-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::).
-
-Default Argument
- The default for an argument is the value that is used if you do not
- specify one. When Emacs prompts you in the minibuffer for an
- argument, the default argument is used if you just type <RET>.
- *Note Minibuffer::.
-
-Default Directory
- When you specify a file name that does not start with `/' or `~',
- it is interpreted relative to the current buffer's default
- directory. *Note Default Directory: Minibuffer File.
-
-Defun
- A defun is a list at the top level of parenthesis or bracket
- structure in a program. It is so named because most such lists in
- Lisp programs are calls to the Lisp function `defun'. *Note
- Defuns::.
-
-<DEL>
- The <DEL> character runs the command that deletes one character of
- text. *Note DEL: Basic.
-
-Deletion
- Deleting text means erasing it without saving it. Emacs deletes
- text only when it is expected not to be worth saving (all
- whitespace, or only one character). The alternative is killing
- (q.v.). *Note Deletion: Killing.
-
-Deletion of Files
- Deleting a file means removing it from the file system. *Note
- Misc File Ops::.
-
-Deletion of Messages
- Deleting a message means flagging it to be eliminated from your
- mail file. Until the mail file is expunged, you can undo this by
- undeleting the message.
-
-Deletion of Frames
- When working under the multi-frame X-based version of XEmacs, you
- can delete individual frames using the Close menu item from the
- File menu.
-
-Deletion of Windows
- When you delete a subwindow of an Emacs frame, you eliminate it
- from the frame. Other windows expand to use up the space. The
- deleted window can never come back, but no actual text is lost.
- *Note Windows::.
-
-Directory
- Files in the Unix file system are grouped into file directories.
- *Note Directories: ListDir.
-
-Dired
- Dired is the Emacs facility that displays the contents of a file
- directory and allows you to "edit the directory", performing
- operations on the files in the directory. *Note Dired::.
-
-Disabled Command
- A disabled command is one that you may not run without special
- confirmation. Commands are usually disabled because they are
- confusing for beginning users. *Note Disabling::.
-
-Dribble File
- A file into which Emacs writes all the characters that the user
- types on the keyboard. Dribble files are used to make a record for
- debugging Emacs bugs. Emacs does not make a dribble file unless
- you tell it to. *Note Bugs::.
-
-Echo Area
- The area at the bottom of the Emacs frame which is used for
- echoing the arguments to commands, for asking questions, and for
- printing brief messages (including error messages). *Note Echo
- Area::.
-
-Echoing
- Echoing refers to acknowledging the receipt of commands by
- displaying them (in the echo area). Emacs never echoes
- single-character keys; longer keys echo only if you pause while
- typing them.
-
-Error
- An error occurs when an Emacs command cannot execute in the current
- circumstances. When an error occurs, execution of the command
- stops (unless the command has been programmed to do otherwise) and
- Emacs reports the error by printing an error message (q.v.).
- Type-ahead is discarded. Then Emacs is ready to read another
- editing command.
-
-Error Messages
- Error messages are single lines of output printed by Emacs when the
- user asks for something impossible to do (such as killing text
- forward when point is at the end of the buffer). They appear in
- the echo area, accompanied by a beep.
-
-<ESC>
- <ESC> is a character used as a prefix for typing Meta characters on
- keyboards lacking a <META> key. Unlike the <META> key (which,
- like the <SHIFT> key, is held down while another character is
- typed), the <ESC> key is pressed and released, and applies to the
- next character typed.
-
-Fill Prefix
- The fill prefix is a string that Emacs enters at the beginning of
- each line when it performs filling. It is not regarded as part of
- the text to be filled. *Note Filling::.
-
-Filling
- Filling text means moving text from line to line so that all the
- lines are approximately the same length. *Note Filling::.
-
-Frame
- When running Emacs on a TTY terminal, "frame" means the terminal's
- screen. When running Emacs under X, you can have multiple frames,
- each corresponding to a top-level X window and each looking like
- the screen on a TTY. Each frame contains one or more
- non-overlapping Emacs windows (possibly with associated
- scrollbars, under X), an echo area, and (under X) possibly a
- menubar.
-
-Global
- Global means `independent of the current environment; in effect
- throughout Emacs'. It is the opposite of local (q.v.). Examples
- of the use of `global' appear below.
-
-Global Abbrev
- A global definition of an abbrev (q.v.) is effective in all major
- modes that do not have local (q.v.) definitions for the same
- abbrev. *Note Abbrevs::.
-
-Global Keymap
- The global keymap (q.v.) contains key bindings that are in effect
- unless local key bindings in a major mode's local keymap (q.v.)
- override them.*Note Keymaps::.
-
-Global Substitution
- Global substitution means replacing each occurrence of one string
- by another string through a large amount of text. *Note Replace::.
-
-Global Variable
- The global value of a variable (q.v.) takes effect in all buffers
- that do not have their own local (q.v.) values for the variable.
- *Note Variables::.
-
-Graphic Character
- Graphic characters are those assigned pictorial images rather than
- just names. All the non-Meta (q.v.) characters except for the
- Control (q.v.) character are graphic characters. These include
- letters, digits, punctuation, and spaces; they do not include
- <RET> or <ESC>. In Emacs, typing a graphic character inserts that
- character (in ordinary editing modes). *Note Basic Editing: Basic.
-
-Grinding
- Grinding means adjusting the indentation in a program to fit the
- nesting structure. *Note Grinding: Indentation.
-
-Hardcopy
- Hardcopy means printed output. Emacs has commands for making
- printed listings of text in Emacs buffers. *Note Hardcopy::.
-
-<HELP>
- You can type <HELP> at any time to ask what options you have, or
- to ask what any command does. <HELP> is really `Control-h'.
- *Note Help::.
-
-Inbox
- An inbox is a file in which mail is delivered by the operating
- system. Some mail handlers transfers mail from inboxes to mail
- files (q.v.) in which the mail is then stored permanently or until
- explicitly deleted.
-
-Indentation
- Indentation means blank space at the beginning of a line. Most
- programming languages have conventions for using indentation to
- illuminate the structure of the program, and Emacs has special
- features to help you set up the correct indentation. *Note
- Indentation::.
-
-Insertion
- Insertion means copying text into the buffer, either from the
- keyboard or from some other place in Emacs.
-
-Justification
- Justification means adding extra spaces to lines of text to make
- them come exactly to a specified width. *Note Justification:
- Filling.
-
-Keyboard Macros
- Keyboard macros are a way of defining new Emacs commands from
- sequences of existing ones, with no need to write a Lisp program.
- *Note Keyboard Macros::.
-
-Key
- A key is a sequence of characters that, when input to Emacs,
- specify or begin to specify a single action for Emacs to perform.
- That is, the sequence is considered a single unit. If the key is
- enough to specify one action, it is a complete key (q.v.); if it
- is less than enough, it is a prefix key (q.v.). *Note
- Keystrokes::.
-
-Keymap
- The keymap is the data structure that records the bindings (q.v.)
- of keys to the commands that they run. For example, the keymap
- binds the character `C-n' to the command function `next-line'.
- *Note Keymaps::.
-
-Kill Ring
- The kill ring is the place where all text you have killed recently
- is saved. You can re-insert any of the killed text still in the
- ring; this is called yanking (q.v.). *Note Yanking::.
-
-Killing
- Killing means erasing text and saving it on the kill ring so it
- can be yanked (q.v.) later. Some other systems call this
- "cutting." Most Emacs commands to erase text do killing, as
- opposed to deletion (q.v.). *Note Killing::.
-
-Killing Jobs
- Killing a job (such as, an invocation of Emacs) means making it
- cease to exist. Any data within it, if not saved in a file, is
- lost. *Note Exiting::.
-
-List
- A list is, approximately, a text string beginning with an open
- parenthesis and ending with the matching close parenthesis. In C
- mode and other non-Lisp modes, groupings surrounded by other kinds
- of matched delimiters appropriate to the language, such as braces,
- are also considered lists. Emacs has special commands for many
- operations on lists. *Note Lists::.
-
-Local
- Local means `in effect only in a particular context'; the relevant
- kind of context is a particular function execution, a particular
- buffer, or a particular major mode. Local is the opposite of
- `global' (q.v.). Specific uses of `local' in Emacs terminology
- appear below.
-
-Local Abbrev
- A local abbrev definition is effective only if a particular major
- mode is selected. In that major mode, it overrides any global
- definition for the same abbrev. *Note Abbrevs::.
-
-Local Keymap
- A local keymap is used in a particular major mode; the key bindings
- (q.v.) in the current local keymap override global bindings of the
- same keys. *Note Keymaps::.
-
-Local Variable
- A local value of a variable (q.v.) applies to only one buffer.
- *Note Locals::.
-
-M-
- `M-' in the name of a character is an abbreviation for <META>, one
- of the modifier keys that can accompany any character. *Note
- Keystrokes::.
-
-M-C-
- `M-C-' in the name of a character is an abbreviation for
- Control-Meta; it means the same thing as `C-M-'. If your terminal
- lacks a real <META> key, you type a Control-Meta character by
- typing <ESC> and then typing the corresponding Control character.
- *Note C-M-: Keystrokes.
-
-M-x
- `M-x' is the key which is used to call an Emacs command by name.
- You use it to call commands that are not bound to keys. *Note
- M-x::.
-
-Mail
- Mail means messages sent from one user to another through the
- computer system, to be read at the recipient's convenience. Emacs
- has commands for composing and sending mail, and for reading and
- editing the mail you have received. *Note Sending Mail::.
-
-Major Mode
- The major modes are a mutually exclusive set of options each of
- which configures Emacs for editing a certain sort of text.
- Ideally, each programming language has its own major mode. *Note
- Major Modes::.
-
-Mark
- The mark points to a position in the text. It specifies one end
- of the region (q.v.), point being the other end. Many commands
- operate on the whole region, that is, all the text from point to
- the mark. *Note Mark::.
-
-Mark Ring
- The mark ring is used to hold several recent previous locations of
- the mark, just in case you want to move back to them. *Note Mark
- Ring::.
-
-Message
- See `mail'.
-
-Meta
- Meta is the name of a modifier bit which a command character may
- have. It is present in a character if the character is typed with
- the <META> key held down. Such characters are given names that
- start with `Meta-'. For example, `Meta-<' is typed by holding down
- <META> and at the same time typing `<' (which itself is done, on
- most terminals, by holding down <SHIFT> and typing `,'). *Note
- Meta: Keystrokes.
-
-Meta Character
- A Meta character is one whose character code includes the Meta bit.
-
-Minibuffer
- The minibuffer is the window that Emacs displays inside the echo
- area (q.v.) when it prompts you for arguments to commands. *Note
- Minibuffer::.
-
-Minor Mode
- A minor mode is an optional feature of Emacs which can be switched
- on or off independent of the major mode. Each minor mode has a
- command to turn it on or off. *Note Minor Modes::.
-
-Mode Line
- The mode line is the line at the bottom of each text window (q.v.),
- which gives status information on the buffer displayed in that
- window. *Note Mode Line::.
-
-Modified Buffer
- A buffer (q.v.) is modified if its text has been changed since the
- last time the buffer was saved (or since it was created, if it has
- never been saved). *Note Saving::.
-
-Moving Text
- Moving text means erasing it from one place and inserting it in
- another. This is done by killing (q.v.) and then yanking (q.v.).
- *Note Killing::.
-
-Named Mark
- A named mark is a register (q.v.) in its role of recording a
- location in text so that you can move point to that location.
- *Note Registers::.
-
-Narrowing
- Narrowing means creating a restriction (q.v.) that limits editing
- in the current buffer to only a part of the text in the buffer.
- Text outside that part is inaccessible to the user until the
- boundaries are widened again, but it is still there, and saving
- the file saves the invisible text. *Note Narrowing::.
-
-Newline
- <LFD> characters in the buffer terminate lines of text and are
- called newlines. *Note Newline: Keystrokes.
-
-Numeric Argument
- A numeric argument is a number, specified before a command, to
- change the effect of the command. Often the numeric argument
- serves as a repeat count. *Note Arguments::.
-
-Option
- An option is a variable (q.v.) that allows you to customize Emacs
- by giving it a new value. *Note Variables::.
-
-Overwrite Mode
- Overwrite mode is a minor mode. When it is enabled, ordinary text
- characters replace the existing text after point rather than
- pushing it to the right. *Note Minor Modes::.
-
-Page
- A page is a unit of text, delimited by formfeed characters (ASCII
- Control-L, code 014) coming at the beginning of a line. Some Emacs
- commands are provided for moving over and operating on pages.
- *Note Pages::.
-
-Paragraphs
- Paragraphs are the medium-size unit of English text. There are
- special Emacs commands for moving over and operating on paragraphs.
- *Note Paragraphs::.
-
-Parsing
- We say that Emacs parses words or expressions in the text being
- edited. Really, all it knows how to do is find the other end of a
- word or expression. *Note Syntax::.
-
-Point
- Point is the place in the buffer at which insertion and deletion
- occur. Point is considered to be between two characters, not at
- one character. The terminal's cursor (q.v.) indicates the
- location of point. *Note Point: Basic.
-
-Prefix Key
- A prefix key is a key (q.v.) whose sole function is to introduce a
- set of multi-character keys. `Control-x' is an example of a prefix
- key; any two-character sequence starting with `C-x' is also a
- legitimate key. *Note Keystrokes::.
-
-Prompt
- A prompt is text printed to ask the user for input. Printing a
- prompt is called prompting. Emacs prompts always appear in the
- echo area (q.v.). One kind of prompting happens when the
- minibuffer is used to read an argument (*note Minibuffer::); the
- echoing which happens when you pause in the middle of typing a
- multi-character key is also a kind of prompting (*note Echo
- Area::).
-
-Quitting
- Quitting means cancelling a partially typed command or a running
- command, using `C-g'. *Note Quitting::.
-
-Quoting
- Quoting means depriving a character of its usual special
- significance. In Emacs this is usually done with `Control-q'.
- What constitutes special significance depends on the context and
- on convention. For example, an "ordinary" character as an Emacs
- command inserts itself; so in this context, a special character is
- any character that does not normally insert itself (such as <DEL>,
- for example), and quoting it makes it insert itself as if it were
- not special. Not all contexts allow quoting. *Note Quoting:
- Basic.
-
-Read-only Buffer
- A read-only buffer is one whose text you are not allowed to change.
- Normally Emacs makes buffers read-only when they contain text which
- has a special significance to Emacs, such asDired buffers.
- Visiting a file that is write-protected also makes a read-only
- buffer. *Note Buffers::.
-
-Recursive Editing Level
- A recursive editing level is a state in which part of the
- execution of a command involves asking the user to edit some text.
- This text may or may not be the same as the text to which the
- command was applied. The mode line indicates recursive editing
- levels with square brackets (`[' and `]'). *Note Recursive Edit::.
-
-Redisplay
- Redisplay is the process of correcting the image on the screen to
- correspond to changes that have been made in the text being edited.
- *Note Redisplay: Frame.
-
-Regexp
- See `regular expression'.
-
-Region
- The region is the text between point (q.v.) and the mark (q.v.).
- Many commands operate on the text of the region. *Note Region:
- Mark.
-
-Registers
- Registers are named slots in which text or buffer positions or
- rectangles can be saved for later use. *Note Registers::.
-
-Regular Expression
- A regular expression is a pattern that can match various text
- strings; for example, `l[0-9]+' matches `l' followed by one or more
- digits. *Note Regexps::.
-
-Replacement
- See `global substitution'.
-
-Restriction
- A buffer's restriction is the amount of text, at the beginning or
- the end of the buffer, that is temporarily invisible and
- inaccessible. Giving a buffer a nonzero amount of restriction is
- called narrowing (q.v.). *Note Narrowing::.
-
-<RET>
- <RET> is the character than runs the command to insert a newline
- into the text. It is also used to terminate most arguments read
- in the minibuffer (q.v.). *Note Return: Keystrokes.
-
-Saving
- Saving a buffer means copying its text into the file that was
- visited (q.v.) in that buffer. To actually change a file you have
- edited in Emacs, you have to save it. *Note Saving::.
-
-Scrolling
- Scrolling means shifting the text in the Emacs window to make a
- different part ot the buffer visible. *Note Scrolling: Display.
-
-Searching
- Searching means moving point to the next occurrence of a specified
- string. *Note Search::.
-
-Selecting
- Selecting a buffer means making it the current (q.v.) buffer.
- *Note Selecting: Buffers.
-
-Self-documentation
- Self-documentation is the feature of Emacs which can tell you what
- any command does, or can give you a list of all commands related
- to a topic you specify. You ask for self-documentation with the
- help character, `C-h'. *Note Help::.
-
-Sentences
- Emacs has commands for moving by or killing by sentences. *Note
- Sentences::.
-
-Sexp
- An sexp (short for `s-expression,' itself short for `symbolic
- expression') is the basic syntactic unit of Lisp in its textual
- form: either a list, or Lisp atom. Many Emacs commands operate on
- sexps. The term `sexp' is generalized to languages other than
- Lisp to mean a syntactically recognizable expression. *Note
- Sexps: Lists.
-
-Simultaneous Editing
- Simultaneous editing means two users modifying the same file at
- once. If simultaneous editing is not detected, you may lose your
- work. Emacs detects all cases of simultaneous editing and warns
- the user to investigate them. *Note Simultaneous Editing:
- Interlocking.
-
-String
- A string is a kind of Lisp data object which contains a sequence of
- characters. Many Emacs variables are intended to have strings as
- values. The Lisp syntax for a string consists of the characters in
- the string with a `"' before and another `"' after. Write a `"'
- that is part of the string as `\"' and a `\' that is part of the
- string as `\\'. You can include all other characters, including
- newline, just by writing them inside the string. You can also
- include escape sequences as in C, such as `\n' for newline or
- `\241' using an octal character code.
-
-String Substitution
- See `global substitution'.
-
-Syntax Table
- The syntax table tells Emacs which characters are part of a word,
- which characters balance each other like parentheses, etc. *Note
- Syntax::.
-
-Tag Table
- A tag table is a file that serves as an index to the function
- definitions in one or more other files. *Note Tags::.
-
-Termscript File
- A termscript file contains a record of all characters Emacs sent to
- the terminal. It is used for tracking down bugs in Emacs
- redisplay. Emacs does not make a termscript file unless
- explicitly instructed to do so. *Note Bugs::.
-
-Text
- Text has two meanings (*note Text::):
-
- * Data consisting of a sequence of characters, as opposed to
- binary numbers, images, graphics commands, executable
- programs, and the like. The contents of an Emacs buffer are
- always text in this sense.
-
- * Data consisting of written human language, as opposed to
- programs, or something that follows the stylistic conventions
- of human language.
-
-Top Level
- Top level is the normal state of Emacs, in which you are editing
- the text of the file you have visited. You are at top level
- whenever you are not in a recursive editing level (q.v.) or the
- minibuffer (q.v.), and not in the middle of a command. You can
- get back to top level by aborting (q.v.) and quitting (q.v.).
- *Note Quitting::.
-
-Transposition
- Transposing two units of text means putting each one into the place
- formerly occupied by the other. There are Emacs commands to
- transpose two adjacent characters, words, sexps (q.v.), or lines
- (*note Transpose::).
-
-Truncation
- Truncating text lines in the display means leaving out any text on
- a line that does not fit within the right margin of the window
- displaying it. See also `continuation line'. *Note Truncation:
- Basic.
-
-Undoing
- Undoing means making your previous editing go in reverse, bringing
- back the text that existed earlier in the editing session. *Note
- Undo::.
-
-Variable
- A variable is Lisp object that can store an arbitrary value.
- Emacs uses some variables for internal purposes, and has others
- (known as `options' (q.v.)) you can set to control the behavior of
- Emacs. The variables used in Emacs that you are likely to be
- interested in are listed in the Variables Index of this manual.
- *Note Variables::, for information on variables.
-
-Visiting
- Visiting a file means loading its contents into a buffer (q.v.)
- where they can be edited. *Note Visiting::.
-
-Whitespace
- Whitespace is any run of consecutive formatting characters (spaces,
- tabs, newlines, and backspaces).
-
-Widening
- Widening is removing any restriction (q.v.) on the current buffer;
- it is the opposite of narrowing (q.v.). *Note Narrowing::.
-
-Window
- Emacs divides the frame into one or more windows, each of which can
- display the contents of one buffer (q.v.) at any time. *Note
- Frame::, for basic information on how Emacs uses the frame. *Note
- Windows::, for commands to control the use of windows. Note that if
- you are running Emacs under X, terminology can be confusing: Each
- Emacs frame occupies a separate X window and can, in turn, be
- divided into different subwindows.
-
-Word Abbrev
- Synonymous with `abbrev'.
-
-Word Search
- Word search is searching for a sequence of words, considering the
- punctuation between them as insignificant. *Note Word Search::.
-
-Yanking
- Yanking means reinserting text previously killed. It can be used
- to undo a mistaken kill, or for copying or moving text. Some other
- systems call this "pasting". *Note Yanking::.
-
translation approved by the author instead of in the original English.
\1f
-File: xemacs.info, Node: Manifesto, Next: Key Index, Prev: Glossary, Up: Top
-
-The GNU Manifesto
-*****************
-
-What's GNU? GNU's Not Unix!
-============================
-
- GNU, which stands for GNU's Not Unix, is the name for the complete
-Unix-compatible software system which I am writing so that I can give it
-away free to everyone who can use it. Several other volunteers are
-helping me. Contributions of time, money, programs, and equipment are
-greatly needed.
-
- So far we have an Emacs text editor with Lisp for writing editor
-commands, a source level debugger, a yacc-compatible parser generator,
-a linker, and around 35 utilities. A shell (command interpreter) is
-nearly completed. A new portable optimizing C compiler has compiled
-itself and may be released this year. An initial kernel exists, but
-many more features are needed to emulate Unix. When the kernel and
-compiler are finished, it will be possible to distribute a GNU system
-suitable for program development. We will use TeX as our text
-formatter, but an nroff is being worked on. We will use the free,
-portable X window system as well. After this we will add a portable
-Common Lisp, an Empire game, a spreadsheet, and hundreds of other
-things, plus online documentation. We hope to supply, eventually,
-everything useful that normally comes with a Unix system, and more.
-
- GNU will be able to run Unix programs, but will not be identical to
-Unix. We will make all improvements that are convenient, based on our
-experience with other operating systems. In particular, we plan to
-have longer filenames, file version numbers, a crashproof file system,
-filename completion perhaps, terminal-independent display support, and
-perhaps eventually a Lisp-based window system through which several
-Lisp programs and ordinary Unix programs can share a screen. Both C
-and Lisp will be available as system programming languages. We will
-try to support UUCP, MIT Chaosnet, and Internet protocols for
-communication.
-
- GNU is aimed initially at machines in the 68000/16000 class with
-virtual memory, because they are the easiest machines to make it run
-on. The extra effort to make it run on smaller machines will be left
-to someone who wants to use it on them.
-
- To avoid horrible confusion, please pronounce the `G' in the word
-`GNU' when it is the name of this project.
-
-Why I Must Write GNU
-====================
-
- I consider that the golden rule requires that if I like a program I
-must share it with other people who like it. Software sellers want to
-divide the users and conquer them, making each user agree not to share
-with others. I refuse to break solidarity with other users in this
-way. I cannot in good conscience sign a nondisclosure agreement or a
-software license agreement. For years I worked within the Artificial
-Intelligence Lab to resist such tendencies and other inhospitalities,
-but eventually they had gone too far: I could not remain in an
-institution where such things are done for me against my will.
-
- So that I can continue to use computers without dishonor, I have
-decided to put together a sufficient body of free software so that I
-will be able to get along without any software that is not free. I
-have resigned from the AI lab to deny MIT any legal excuse to prevent
-me from giving GNU away.
-
-Why GNU Will Be Compatible With Unix
-====================================
-
- Unix is not my ideal system, but it is not too bad. The essential
-features of Unix seem to be good ones, and I think I can fill in what
-Unix lacks without spoiling them. And a system compatible with Unix
-would be convenient for many other people to adopt.
-
-How GNU Will Be Available
-=========================
-
- GNU is not in the public domain. Everyone will be permitted to
-modify and redistribute GNU, but no distributor will be allowed to
-restrict its further redistribution. That is to say, proprietary
-modifications will not be allowed. I want to make sure that all
-versions of GNU remain free.
-
-Why Many Other Programmers Want to Help
-=======================================
-
- I have found many other programmers who are excited about GNU and
-want to help.
-
- Many programmers are unhappy about the commercialization of system
-software. It may enable them to make more money, but it requires them
-to feel in conflict with other programmers in general rather than feel
-as comrades. The fundamental act of friendship among programmers is the
-sharing of programs; marketing arrangements now typically used
-essentially forbid programmers to treat others as friends. The
-purchaser of software must choose between friendship and obeying the
-law. Naturally, many decide that friendship is more important. But
-those who believe in law often do not feel at ease with either choice.
-They become cynical and think that programming is just a way of making
-money.
-
- By working on and using GNU rather than proprietary programs, we can
-be hospitable to everyone and obey the law. In addition, GNU serves as
-an example to inspire and a banner to rally others to join us in
-sharing. This can give us a feeling of harmony which is impossible if
-we use software that is not free. For about half the programmers I
-talk to, this is an important happiness that money cannot replace.
-
-How You Can Contribute
-======================
-
- I am asking computer manufacturers for donations of machines and
-money. I'm asking individuals for donations of programs and work.
-
- One consequence you can expect if you donate machines is that GNU
-will run on them at an early date. The machines should be complete,
-ready-to-use systems, approved for use in a residential area, and not
-in need of sophisticated cooling or power.
-
- I have found very many programmers eager to contribute part-time
-work for GNU. For most projects, such part-time distributed work would
-be very hard to coordinate; the independently-written parts would not
-work together. But for the particular task of replacing Unix, this
-problem is absent. A complete Unix system contains hundreds of utility
-programs, each of which is documented separately. Most interface
-specifications are fixed by Unix compatibility. If each contributor
-can write a compatible replacement for a single Unix utility, and make
-it work properly in place of the original on a Unix system, then these
-utilities will work right when put together. Even allowing for Murphy
-to create a few unexpected problems, assembling these components will
-be a feasible task. (The kernel will require closer communication and
-will be worked on by a small, tight group.)
-
- If I get donations of money, I may be able to hire a few people full
-or part time. The salary won't be high by programmers' standards, but
-I'm looking for people for whom building community spirit is as
-important as making money. I view this as a way of enabling dedicated
-people to devote their full energies to working on GNU by sparing them
-the need to make a living in another way.
-
-Why All Computer Users Will Benefit
-===================================
-
- Once GNU is written, everyone will be able to obtain good system
-software free, just like air.
-
- This means much more than just saving everyone the price of a Unix
-license. It means that much wasteful duplication of system programming
-effort will be avoided. This effort can go instead into advancing the
-state of the art.
-
- Complete system sources will be available to everyone. As a result,
-a user who needs changes in the system will always be free to make them
-himself, or hire any available programmer or company to make them for
-him. Users will no longer be at the mercy of one programmer or company
-which owns the sources and is in sole position to make changes.
-
- Schools will be able to provide a much more educational environment
-by encouraging all students to study and improve the system code.
-Harvard's computer lab used to have the policy that no program could be
-installed on the system if its sources were not on public display, and
-upheld it by actually refusing to install certain programs. I was very
-much inspired by this.
-
- Finally, the overhead of considering who owns the system software
-and what one is or is not entitled to do with it will be lifted.
-
- Arrangements to make people pay for using a program, including
-licensing of copies, always incur a tremendous cost to society through
-the cumbersome mechanisms necessary to figure out how much (that is,
-which programs) a person must pay for. And only a police state can
-force everyone to obey them. Consider a space station where air must
-be manufactured at great cost: charging each breather per liter of air
-may be fair, but wearing the metered gas mask all day and all night is
-intolerable even if everyone can afford to pay the air bill. And the
-TV cameras everywhere to see if you ever take the mask off are
-outrageous. It's better to support the air plant with a head tax and
-chuck the masks.
-
- Copying all or parts of a program is as natural to a programmer as
-breathing, and as productive. It ought to be as free.
-
-Some Easily Rebutted Objections to GNU's Goals
-==============================================
-
- "Nobody will use it if it is free, because that means they can't
- rely on any support."
-
- "You have to charge for the program to pay for providing the
- support."
-
- If people would rather pay for GNU plus service than get GNU free
-without service, a company to provide just service to people who have
-obtained GNU free ought to be profitable.
-
- We must distinguish between support in the form of real programming
-work and mere handholding. The former is something one cannot rely on
-from a software vendor. If your problem is not shared by enough
-people, the vendor will tell you to get lost.
-
- If your business needs to be able to rely on support, the only way
-is to have all the necessary sources and tools. Then you can hire any
-available person to fix your problem; you are not at the mercy of any
-individual. With Unix, the price of sources puts this out of
-consideration for most businesses. With GNU this will be easy. It is
-still possible for there to be no available competent person, but this
-problem cannot be blamed on distibution arrangements. GNU does not
-eliminate all the world's problems, only some of them.
-
- Meanwhile, the users who know nothing about computers need
-handholding: doing things for them which they could easily do
-themselves but don't know how.
-
- Such services could be provided by companies that sell just
-hand-holding and repair service. If it is true that users would rather
-spend money and get a product with service, they will also be willing
-to buy the service having got the product free. The service companies
-will compete in quality and price; users will not be tied to any
-particular one. Meanwhile, those of us who don't need the service
-should be able to use the program without paying for the service.
-
- "You cannot reach many people without advertising, and you must
- charge for the program to support that."
-
- "It's no use advertising a program people can get free."
-
- There are various forms of free or very cheap publicity that can be
-used to inform numbers of computer users about something like GNU. But
-it may be true that one can reach more microcomputer users with
-advertising. If this is really so, a business which advertises the
-service of copying and mailing GNU for a fee ought to be successful
-enough to pay for its advertising and more. This way, only the users
-who benefit from the advertising pay for it.
-
- On the other hand, if many people get GNU from their friends, and
-such companies don't succeed, this will show that advertising was not
-really necessary to spread GNU. Why is it that free market advocates
-don't want to let the free market decide this?
-
- "My company needs a proprietary operating system to get a
- competitive edge."
-
- GNU will remove operating system software from the realm of
-competition. You will not be able to get an edge in this area, but
-neither will your competitors be able to get an edge over you. You and
-they will compete in other areas, while benefitting mutually in this
-one. If your business is selling an operating system, you will not
-like GNU, but that's tough on you. If your business is something else,
-GNU can save you from being pushed into the expensive business of
-selling operating systems.
-
- I would like to see GNU development supported by gifts from many
-manufacturers and users, reducing the cost to each.
-
- "Don't programmers deserve a reward for their creativity?"
-
- If anything deserves a reward, it is social contribution.
-Creativity can be a social contribution, but only in so far as society
-is free to use the results. If programmers deserve to be rewarded for
-creating innovative programs, by the same token they deserve to be
-punished if they restrict the use of these programs.
-
- "Shouldn't a programmer be able to ask for a reward for his
- creativity?"
-
- There is nothing wrong with wanting pay for work, or seeking to
-maximize one's income, as long as one does not use means that are
-destructive. But the means customary in the field of software today
-are based on destruction.
-
- Extracting money from users of a program by restricting their use of
-it is destructive because the restrictions reduce the amount and the
-ways that the program can be used. This reduces the amount of wealth
-that humanity derives from the program. When there is a deliberate
-choice to restrict, the harmful consequences are deliberate destruction.
-
- The reason a good citizen does not use such destructive means to
-become wealthier is that, if everyone did so, we would all become
-poorer from the mutual destructiveness. This is Kantian ethics; or,
-the Golden Rule. Since I do not like the consequences that result if
-everyone hoards information, I am required to consider it wrong for one
-to do so. Specifically, the desire to be rewarded for one's creativity
-does not justify depriving the world in general of all or part of that
-creativity.
-
- "Won't programmers starve?"
-
- I could answer that nobody is forced to be a programmer. Most of us
-cannot manage to get any money for standing on the street and making
-faces. But we are not, as a result, condemned to spend our lives
-standing on the street making faces, and starving. We do something
-else.
-
- But that is the wrong answer because it accepts the questioner's
-implicit assumption: that without ownership of software, programmers
-cannot possibly be paid a cent. Supposedly it is all or nothing.
-
- The real reason programmers will not starve is that it will still be
-possible for them to get paid for programming; just not paid as much as
-now.
-
- Restricting copying is not the only basis for business in software.
-It is the most common basis because it brings in the most money. If it
-were prohibited, or rejected by the customer, software business would
-move to other bases of organization which are now used less often.
-There are always numerous ways to organize any kind of business.
-
- Probably programming will not be as lucrative on the new basis as it
-is now. But that is not an argument against the change. It is not
-considered an injustice that sales clerks make the salaries that they
-now do. If programmers made the same, that would not be an injustice
-either. (In practice they would still make considerably more than
-that.)
-
- "Don't people have a right to control how their creativity is
- used?"
-
- "Control over the use of one's ideas" really constitutes control over
-other people's lives; and it is usually used to make their lives more
-difficult.
-
- People who have studied the issue of intellectual property rights
-carefully (such as lawyers) say that there is no intrinsic right to
-intellectual property. The kinds of supposed intellectual property
-rights that the government recognizes were created by specific acts of
-legislation for specific purposes.
-
- For example, the patent system was established to encourage
-inventors to disclose the details of their inventions. Its purpose was
-to help society rather than to help inventors. At the time, the life
-span of 17 years for a patent was short compared with the rate of
-advance of the state of the art. Since patents are an issue only among
-manufacturers, for whom the cost and effort of a license agreement are
-small compared with setting up production, the patents often do not do
-much harm. They do not obstruct most individuals who use patented
-products.
-
- The idea of copyright did not exist in ancient times, when authors
-frequently copied other authors at length in works of non-fiction. This
-practice was useful, and is the only way many authors' works have
-survived even in part. The copyright system was created expressly for
-the purpose of encouraging authorship. In the domain for which it was
-invented--books, which could be copied economically only on a printing
-press--it did little harm, and did not obstruct most of the individuals
-who read the books.
-
- All intellectual property rights are just licenses granted by society
-because it was thought, rightly or wrongly, that society as a whole
-would benefit by granting them. But in any particular situation, we
-have to ask: are we really better off granting such license? What kind
-of act are we licensing a person to do?
-
- The case of programs today is very different from that of books a
-hundred years ago. The fact that the easiest way to copy a program is
-from one neighbor to another, the fact that a program has both source
-code and object code which are distinct, and the fact that a program is
-used rather than read and enjoyed, combine to create a situation in
-which a person who enforces a copyright is harming society as a whole
-both materially and spiritually; in which a person should not do so
-regardless of whether the law enables him to.
-
- "Competition makes things get done better."
-
- The paradigm of competition is a race: by rewarding the winner, we
-encourage everyone to run faster. When capitalism really works this
-way, it does a good job; but its defenders are wrong in assuming it
-always works this way. If the runners forget why the reward is offered
-and become intent on winning, no matter how, they may find other
-strategies--such as, attacking other runners. If the runners get into
-a fist fight, they will all finish late.
-
- Proprietary and secret software is the moral equivalent of runners
-in a fist fight. Sad to say, the only referee we've got does not seem
-to object to fights; he just regulates them ("For every ten yards you
-run, you can fire one shot"). He really ought to break them up, and
-penalize runners for even trying to fight.
-
- "Won't everyone stop programming without a monetary incentive?"
-
- Actually, many people will program with absolutely no monetary
-incentive. Programming has an irresistible fascination for some
-people, usually the people who are best at it. There is no shortage of
-professional musicians who keep at it even though they have no hope of
-making a living that way.
-
- But really this question, though commonly asked, is not appropriate
-to the situation. Pay for programmers will not disappear, only become
-less. So the right question is, will anyone program with a reduced
-monetary incentive? My experience shows that they will.
-
- For more than ten years, many of the world's best programmers worked
-at the Artificial Intelligence Lab for far less money than they could
-have had anywhere else. They got many kinds of non-monetary rewards:
-fame and appreciation, for example. And creativity is also fun, a
-reward in itself.
-
- Then most of them left when offered a chance to do the same
-interesting work for a lot of money.
-
- What the facts show is that people will program for reasons other
-than riches; but if given a chance to make a lot of money as well, they
-will come to expect and demand it. Low-paying organizations do poorly
-in competition with high-paying ones, but they do not have to do badly
-if the high-paying ones are banned.
-
- "We need the programmers desperately. If they demand that we stop
- helping our neighbors, we have to obey."
-
- You're never so desperate that you have to obey this sort of demand.
-Remember: millions for defense, but not a cent for tribute!
-
- "Programmers need to make a living somehow."
-
- In the short run, this is true. However, there are plenty of ways
-that programmers could make a living without selling the right to use a
-program. This way is customary now because it brings programmers and
-businessmen the most money, not because it is the only way to make a
-living. It is easy to find other ways if you want to find them. Here
-are a number of examples.
-
- A manufacturer introducing a new computer will pay for the porting of
-operating systems onto the new hardware.
-
- The sale of teaching, hand-holding, and maintenance services could
-also employ programmers.
-
- People with new ideas could distribute programs as freeware and ask
-for donations from satisfied users or sell hand-holding services. I
-have met people who are already working this way successfully.
-
- Users with related needs can form users' groups and pay dues. A
-group would contract with programming companies to write programs that
-the group's members would like to use.
-
- All sorts of development can be funded with a Software Tax:
-
- Suppose everyone who buys a computer has to pay a certain percent
- of the price as a software tax. The government gives this to an
- agency like the NSF to spend on software development.
-
- But if the computer buyer makes a donation to software development
- himself, he can take a credit against the tax. He can donate to
- the project of his own choosing--often, chosen because he hopes to
- use the results when
-
- it is done. He can take a credit for any amount of donation up to
- the total tax he had to pay.
-
- The total tax rate could be decided by a vote of the payers of the
- tax, weighted according to the amount they will be taxed on.
-
- The consequences:
-
- * The computer-using community supports software development.
-
- * This community decides what level of support is needed.
-
- * Users who care which projects their share is spent on can
- choose this for themselves.
-
- In the long run, making programs free is a step toward the
-post-scarcity world, where nobody will have to work very hard just to
-make a living. People will be free to devote themselves to activities
-that are fun, such as programming, after spending the necessary ten
-hours a week on required tasks such as legislation, family counseling,
-robot repair, and asteroid prospecting. There will be no need to be
-able to make a living from programming.
-
- We have already greatly reduced the amount of work that the whole
-society must do for its actual productivity, but only a little of this
-has translated itself into leisure for workers because much
-nonproductive activity is required to accompany productive activity.
-The main causes of this are bureaucracy and isometric struggles against
-competition. Free software will greatly reduce these drains in the
-area of software production. We must do this, in order for technical
-gains in productivity to translate into less work for us.
-
-\1f
-File: xemacs.info, Node: Key Index, Next: Command Index, Prev: Manifesto, Up: Top
-
-Key (Character) Index
-*********************
-
-* Menu:
-
-* ! (query-replace): Query Replace.
-* " (TeX mode): TeX Editing.
-* , (query-replace): Query Replace.
-* . (Calendar mode): Specified Dates.
-* . (query-replace): Query Replace.
-* ? (Calendar mode): General Calendar.
-* ^ (query-replace): Query Replace.
-* a (Calendar mode): Holidays.
-* button1: Intro to Keystrokes.
-* button1up: Intro to Keystrokes.
-* button2: Intro to Keystrokes.
-* button2up: Intro to Keystrokes.
-* button3: Intro to Keystrokes.
-* button3up: Intro to Keystrokes.
-* C-<: Setting Mark.
-* C->: Setting Mark.
-* C-@ (Calendar mode): Mark and Region.
-* C-\: Select Input Method.
-* C-] <1>: Quitting.
-* C-]: Recursive Edit.
-* C-_: Undo.
-* C-a: Basic.
-* C-a (Calendar mode): Move to Beginning or End.
-* C-b: Basic.
-* C-b (Calendar mode): Calendar Unit Motion.
-* C-c: Key Sequences.
-* C-c ' (Picture mode): Insert in Picture.
-* C-c . (Picture mode): Insert in Picture.
-* C-c / (Picture mode): Insert in Picture.
-* C-c ; (Fortran mode): Fortran Comments.
-* C-c < (Picture mode): Insert in Picture.
-* C-c > (Picture mode): Insert in Picture.
-* C-c \ (Picture mode): Insert in Picture.
-* C-c ^ (Picture mode): Insert in Picture.
-* C-c ` (Picture mode): Insert in Picture.
-* C-c C-\ (Shell mode): Shell Mode.
-* C-c C-b (Outline mode): Outline Motion.
-* C-c C-b (Picture mode): Insert in Picture.
-* C-c C-b (TeX mode): TeX Print.
-* C-c C-c (Edit Abbrevs): Editing Abbrevs.
-* C-c C-c (Edit Tab Stops): Tab Stops.
-* C-c C-c (Mail mode): Mail Mode.
-* C-c C-c (Occur mode): Other Repeating Search.
-* C-c C-c (Shell mode): Shell Mode.
-* C-c C-d (Picture mode): Basic Picture.
-* C-c C-d (Shell mode): Shell Mode.
-* C-c C-f (LaTeX mode): TeX Editing.
-* C-c C-f (Outline mode): Outline Motion.
-* C-c C-f (Picture mode): Insert in Picture.
-* C-c C-f C-c (Mail mode): Mail Mode.
-* C-c C-f C-s (Mail mode): Mail Mode.
-* C-c C-f C-t (Mail mode): Mail Mode.
-* C-c C-h (Outline mode): Outline Visibility.
-* C-c C-i (Outline mode): Outline Visibility.
-* C-c C-j (Term mode): Term Mode.
-* C-c C-k (Picture mode): Rectangles in Picture.
-* C-c C-k (Term mode): Term Mode.
-* C-c C-k (TeX mode): TeX Print.
-* C-c C-l (Calendar mode): General Calendar.
-* C-c C-l (TeX mode): TeX Print.
-* C-c C-n (Fortran mode): Fortran Motion.
-* C-c C-n (Outline mode): Outline Motion.
-* C-c C-o (Shell mode): Shell Mode.
-* C-c C-p (Fortran mode): Fortran Motion.
-* C-c C-p (Outline mode): Outline Motion.
-* C-c C-p (TeX mode): TeX Print.
-* C-c C-q (Mail mode): Mail Mode.
-* C-c C-q (Term mode): Paging in Term.
-* C-c C-q (TeX mode): TeX Print.
-* C-c C-r (Fortran mode): Fortran Columns.
-* C-c C-r (Shell mode): Shell Mode.
-* C-c C-r (TeX mode): TeX Print.
-* C-c C-s (Mail mode): Mail Mode.
-* C-c C-s (Outline mode): Outline Visibility.
-* C-c C-u (Outline mode): Outline Motion.
-* C-c C-u (Shell mode): Shell Mode.
-* C-c C-w (Fortran mode): Fortran Columns.
-* C-c C-w (Mail mode): Mail Mode.
-* C-c C-w (Picture mode): Rectangles in Picture.
-* C-c C-w (Shell mode): Shell Mode.
-* C-c C-x (Picture mode): Rectangles in Picture.
-* C-c C-y (Mail mode): Mail Mode.
-* C-c C-y (Picture mode): Rectangles in Picture.
-* C-c C-y (Shell mode): Shell Mode.
-* C-c C-z (Shell mode): Shell Mode.
-* C-c TAB (Picture mode): Tabs in Picture.
-* C-c { (TeX mode): TeX Editing.
-* C-c } (TeX mode): TeX Editing.
-* C-d: Killing.
-* C-d (Shell mode): Shell Mode.
-* C-e: Basic.
-* C-e (Calendar mode): Move to Beginning or End.
-* C-END: Basic.
-* C-f: Basic.
-* C-f (Calendar mode): Calendar Unit Motion.
-* C-g <1>: Quitting.
-* C-g: Minibuffer.
-* C-g (isearch-mode): Incremental Search.
-* C-h: Key Sequences.
-* C-h a: Help.
-* C-h b: Help.
-* C-h C: Coding Systems.
-* C-h c: Help.
-* C-h C-\: Select Input Method.
-* C-h C-c: Help.
-* C-h C-d: Help.
-* C-h C-w: Help.
-* 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 k: Help.
-* C-h L: Language Environments.
-* C-h l: Help.
-* C-h m: Help.
-* C-h n: Help.
-* C-h s: Syntax Change.
-* C-h t <1>: Help.
-* C-h t: Basic.
-* 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>: Scrolling.
-* C-l: Basic.
-* C-l (query-replace): Query Replace.
-* C-LEFT: Basic.
-* 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-c: Recursive Edit.
-* C-M-d: Lists.
-* C-M-e: Defuns.
-* C-M-e (Fortran mode): Fortran Motion.
-* C-M-f: Lists.
-* C-M-h <1>: Defuns.
-* C-M-h: Marking Objects.
-* C-M-h (Fortran mode): Fortran Motion.
-* 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>: Lists.
-* C-M-t: Transpose.
-* C-M-u: Lists.
-* C-M-v <1>: Other Window.
-* C-M-v: Minibuffer Edit.
-* C-M-w: Appending Kills.
-* C-M-x <1>: External Lisp.
-* C-M-x: Lisp Eval.
-* C-n: Basic.
-* C-n (Calendar mode): Calendar Unit Motion.
-* C-o: Blank Lines.
-* C-p: Basic.
-* C-p (Calendar mode): Calendar Unit Motion.
-* C-q: Basic.
-* C-q (isearch-mode): Incremental Search.
-* C-r: Incremental Search.
-* C-r (isearch-mode): Incremental Search.
-* C-r (query-replace): Query Replace.
-* C-RIGHT: Basic.
-* C-s: Incremental Search.
-* C-s (isearch-mode): Incremental Search.
-* C-SPC: Setting Mark.
-* C-SPC (Calendar mode): Mark and Region.
-* C-t <1>: Transpose.
-* C-t: Basic.
-* C-u: Arguments.
-* C-u - C-x ;: Comments.
-* C-u C-@: Mark Ring.
-* C-u C-SPC: Mark Ring.
-* C-u C-x v v: Editing with VC.
-* C-u TAB: Multi-line Indent.
-* C-v <1>: Scrolling.
-* C-v: Basic.
-* C-v (Calendar mode): Scroll Calendar.
-* C-w: Killing.
-* C-w (isearch-mode): Incremental Search.
-* C-w (query-replace): Query Replace.
-* C-x: Key Sequences.
-* C-x $: Selective Display.
-* C-x (: Basic Kbd Macro.
-* C-x ): Basic Kbd Macro.
-* C-x .: Fill Prefix.
-* C-x 0: Change Window.
-* C-x 1: Change Window.
-* C-x 2: Split Window.
-* C-x 3: Split Window.
-* C-x 4: Pop Up Window.
-* C-x 4 .: Find Tag.
-* C-x 4 b: Select Buffer.
-* C-x 4 d: Dired Enter.
-* C-x 4 f: Visiting.
-* C-x 4 m: Sending Mail.
-* C-x 5 b: Select Buffer.
-* C-x 5 C-f: Visiting.
-* C-x ;: Comments.
-* C-x <: Horizontal Scrolling.
-* C-x < (Calendar mode): Scroll Calendar.
-* C-x =: Position Info.
-* C-x >: Horizontal Scrolling.
-* C-x > (Calendar mode): Scroll Calendar.
-* C-x [: Pages.
-* C-x [ (Calendar mode): Calendar Unit Motion.
-* C-x ]: Pages.
-* C-x ] (Calendar mode): Calendar Unit Motion.
-* C-x ^: Change Window.
-* C-x `: Compilation.
-* C-x a g: Defining Abbrevs.
-* C-x a i g: Defining Abbrevs.
-* C-x a i l: Defining Abbrevs.
-* C-x a l: Defining Abbrevs.
-* C-x b: Select Buffer.
-* C-x C-b: List Buffers.
-* C-x C-c: Exiting.
-* C-x C-d: ListDir.
-* C-x C-e: Lisp Eval.
-* C-x C-l: Case.
-* C-x C-o <1>: Killing.
-* C-x C-o: Blank Lines.
-* 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-x C-t: Transpose.
-* C-x C-u: Case.
-* C-x C-v: Visiting.
-* C-x C-w: Saving.
-* C-x C-x: Setting Mark.
-* C-x C-x (Calendar mode): Mark and Region.
-* C-x d: Dired Enter.
-* C-x DEL <1>: Sentences.
-* C-x DEL <2>: Kill Errors.
-* C-x DEL: Killing.
-* C-x e: Basic Kbd Macro.
-* C-x ESC ESC: Repetition.
-* C-x f: Fill Commands.
-* C-x h: Marking Objects.
-* C-x k: Kill Buffer.
-* C-x l: Pages.
-* C-x m: Sending Mail.
-* C-x n n: Narrowing.
-* C-x n w: Narrowing.
-* C-x o: Other Window.
-* C-x q: Kbd Macro Query.
-* C-x r +: RegNumbers.
-* C-x r b: Bookmarks.
-* C-x r g: RegText.
-* C-x r i: RegText.
-* C-x r j: RegPos.
-* C-x r l: Bookmarks.
-* C-x r m: Bookmarks.
-* C-x r n: RegNumbers.
-* C-x r r: RegRect.
-* C-x r s: RegText.
-* C-x r SPC: RegPos.
-* C-x r w: RegConfig.
-* C-x RET: Mule Intro.
-* C-x RET c: Specify Coding.
-* C-x RET C-\: Select Input Method.
-* C-x RET f: Specify Coding.
-* C-x RET k: Specify Coding.
-* C-x RET p: Specify Coding.
-* C-x RET t: Specify Coding.
-* C-x s: Saving.
-* C-x TAB: Indentation Commands.
-* C-x u: Undo.
-* C-x v =: Old Versions.
-* C-x v a: Change Logs and VC.
-* C-x v c: Editing with VC.
-* C-x v d: VC Status.
-* C-x v h: Version Headers.
-* C-x v i: Editing with VC.
-* C-x v l: VC Status.
-* C-x v r: Making Snapshots.
-* C-x v s: Making Snapshots.
-* C-x v u: Editing with VC.
-* C-x v ~: Old Versions.
-* C-x }: Change Window.
-* C-y: Kill Ring.
-* C-y (isearch-mode): Incremental Search.
-* C-z: Exiting.
-* control key: Intro to Keystrokes.
-* d (Calendar mode): Diary Commands.
-* DEL <1>: Program Modes.
-* DEL <2>: Major Modes.
-* DEL <3>: Kill Errors.
-* DEL <4>: Killing.
-* DEL: Basic.
-* DEL (isearch-mode): Incremental Search.
-* DEL (query-replace): Query Replace.
-* DOWN: Basic.
-* END: Basic.
-* 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>: Super and Hyper Keys.
-* hyper key <2>: Representing Keystrokes.
-* 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 d (Calendar mode): Adding to Diary.
-* i m (Calendar mode): Adding to Diary.
-* i w (Calendar mode): Adding to Diary.
-* i y (Calendar mode): Adding to Diary.
-* LEFT: Basic.
-* LFD <1>: Basic Indent.
-* LFD <2>: Major Modes.
-* LFD: String Key Sequences.
-* LFD (TeX mode): TeX Editing.
-* m (Calendar mode): Diary Commands.
-* M (Calendar mode): Lunar Phases.
-* M-!: Single Shell.
-* M-$: Spelling.
-* M-%: Query Replace.
-* M-': Expanding Abbrevs.
-* M-(: Balanced Editing.
-* M-): Balanced Editing.
-* M-,: Tags Search.
-* M--: Arguments.
-* M-- M-c: Fixing Case.
-* M-- M-l: Fixing Case.
-* M-- M-u: Fixing Case.
-* M-.: Find Tag.
-* M-/: Dynamic Abbrevs.
-* M-1: Arguments.
-* M-;: Comments.
-* M-<: Basic.
-* M-< (Calendar mode): Move to Beginning or End.
-* M-=: Position Info.
-* M-= (Calendar mode): Mark and Region.
-* M->: Basic.
-* M-> (Calendar mode): Move to Beginning or End.
-* M-?: Nroff Mode.
-* M-@ <1>: Words.
-* M-@: Marking Objects.
-* M-[: Paragraphs.
-* M-\ <1>: Indentation Commands.
-* M-\: Killing.
-* M-]: Paragraphs.
-* M-^ <1>: Indentation Commands.
-* M-^: Killing.
-* M-a: Sentences.
-* M-a (Calendar mode): Move to Beginning or End.
-* M-b: Words.
-* M-c: Case.
-* M-C-s: Regexp Search.
-* M-d <1>: Words.
-* M-d: Killing.
-* M-DEL <1>: Words.
-* M-DEL <2>: Kill Errors.
-* M-DEL: Killing.
-* M-e: Sentences.
-* M-e (Calendar mode): Move to Beginning or End.
-* M-ESC: Lisp Eval.
-* M-f: Words.
-* M-g: Fill Commands.
-* M-h <1>: Paragraphs.
-* M-h: Marking Objects.
-* M-i: Tab Stops.
-* M-k <1>: Sentences.
-* M-k: Killing.
-* M-l: Case.
-* M-LFD: Comments.
-* M-LFD (Fortran mode): ForIndent Commands.
-* M-m: Indentation Commands.
-* M-n <1>: Nroff Mode.
-* M-n: Repetition.
-* M-n (isearch-mode): Incremental Search.
-* M-n (minibuffer history): Minibuffer History.
-* M-n (Shell mode): Shell Mode.
-* M-p <1>: Nroff Mode.
-* M-p: Repetition.
-* M-p (isearch-mode): Incremental Search.
-* M-p (minibuffer history): Minibuffer History.
-* M-p (Shell mode): Shell Mode.
-* M-q: Fill Commands.
-* M-r: Basic.
-* M-r (minibuffer history): Minibuffer History.
-* M-s: Fill Commands.
-* M-s (minibuffer history): Minibuffer History.
-* M-SPC: Killing.
-* 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>: Scrolling.
-* M-v: Basic.
-* M-v (Calendar mode): Scroll Calendar.
-* M-w: Kill Ring.
-* M-x: M-x.
-* M-y: Earlier Kills.
-* M-z: Killing.
-* M-{ (Calendar mode): Calendar Unit Motion.
-* M-|: Single Shell.
-* M-} (Calendar mode): Calendar Unit Motion.
-* M-~: Saving.
-* META: Meta Key.
-* meta key: Intro to Keystrokes.
-* next: Scrolling.
-* o (Calendar mode): Specified Dates.
-* p (Calendar mode): To Other Calendar.
-* p d (Calendar mode): General Calendar.
-* pgdn: Scrolling.
-* PGDN: Basic.
-* pgup: Scrolling.
-* PGUP: Basic.
-* prior: Scrolling.
-* q (Calendar mode): General Calendar.
-* RET: Basic.
-* RET (isearch-mode): Incremental Search.
-* RET (Shell mode): Shell Mode.
-* RIGHT: Basic.
-* s (Calendar mode): Diary Commands.
-* S (Calendar mode): Sunrise/Sunset.
-* S-TAB (customization buffer): Changing an Option.
-* shift key: Intro to Keystrokes.
-* SPC: Completion Commands.
-* SPC (Calendar mode): General Calendar.
-* SPC (query-replace): Query Replace.
-* super key <1>: Super and Hyper Keys.
-* super key <2>: Representing Keystrokes.
-* super key: Intro to Keystrokes.
-* t (Calendar mode): LaTeX Calendar.
-* TAB <1>: Basic Indent.
-* TAB <2>: Text Mode.
-* TAB <3>: Indentation.
-* TAB <4>: Major Modes.
-* TAB <5>: Completion Example.
-* TAB: String Key Sequences.
-* TAB (customization buffer): Changing an Option.
-* TAB (Shell mode): Shell Mode.
-* u (Calendar mode) <1>: Diary Commands.
-* u (Calendar mode): Holidays.
-* UP: Basic.
-* x (Calendar mode): Holidays.
+File: xemacs.info, Node: Glossary, Next: Manifesto, Prev: Intro, Up: Top
+
+Glossary
+********
+
+Abbrev
+ An abbrev is a text string which expands into a different text
+ string when present in the buffer. For example, you might define
+ a short word as an abbrev for a long phrase that you want to insert
+ frequently. *Note Abbrevs::.
+
+Aborting
+ Aborting means getting out of a recursive edit (q.v.). You can use
+ the commands `C-]' and `M-x top-level' for this. *Note Quitting::.
+
+Auto Fill mode
+ Auto Fill mode is a minor mode in which text you insert is
+ automatically broken into lines of fixed width. *Note Filling::.
+
+Auto Saving
+ Auto saving means that Emacs automatically stores the contents of
+ an Emacs buffer in a specially-named file so the information will
+ not be lost if the buffer is lost due to a system error or user
+ error. *Note Auto Save::.
+
+Backup File
+ A backup file records the contents that a file had before the
+ current editing session. Emacs creates backup files automatically
+ to help you track down or cancel changes you later regret. *Note
+ Backup::.
+
+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
+ parenthesis that matches one just inserted (*note Matching Parens:
+ Matching.).
+
+Bind
+ To bind a key is to change its binding (q.v.). *Note Rebinding::.
+
+Binding
+ A key gets its meaning in Emacs by having a binding which is a
+ command (q.v.), a Lisp function that is run when the key is typed.
+ *Note Binding: Commands. Customization often involves rebinding a
+ character to a different command function. The bindings of all
+ keys are recorded in the keymaps (q.v.). *Note Keymaps::.
+
+Blank Lines
+ Blank lines are lines that contain only whitespace. Emacs has
+ several commands for operating on the blank lines in a buffer.
+
+Buffer
+ The buffer is the basic editing unit; one buffer corresponds to one
+ piece of text being edited. You can have several buffers, but at
+ any time you are editing only one, the `selected' buffer, though
+ several buffers can be visible when you are using multiple
+ windows. *Note Buffers::.
+
+Buffer Selection History
+ Emacs keeps a buffer selection history which records how recently
+ each Emacs buffer was selected. Emacs uses this list when
+ choosing a buffer to select. *Note Buffers::.
+
+C-
+ `C' in the name of a character is an abbreviation for Control.
+ *Note C-: Keystrokes.
+
+C-M-
+ `C-M-' in the name of a character is an abbreviation for
+ Control-Meta. *Note C-M-: Keystrokes.
+
+Case Conversion
+ Case conversion means changing text from upper case to lower case
+ or vice versa. *Note Case::, for the commands for case conversion.
+
+Characters
+ Characters form the contents of an Emacs buffer; also, Emacs
+ commands are invoked by keys (q.v.), which are sequences of one or
+ more characters. *Note Keystrokes::.
+
+Command
+ A command is a Lisp function specially defined to be able to serve
+ as a key binding in Emacs. When you type a key (q.v.), Emacs
+ looks up its binding (q.v.) in the relevant keymaps (q.v.) to find
+ the command to run. *Note Commands::.
+
+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::).
+
+Comments
+ A comment is text in a program which is intended only for the
+ people reading the program, and is marked specially so that it
+ will be ignored when the program is loaded or compiled. Emacs
+ offers special commands for creating, aligning, and killing
+ comments. *Note Comments::.
+
+Compilation
+ Compilation is the process of creating an executable program from
+ source code. Emacs has commands for compiling files of Emacs Lisp
+ code (*note Lisp Libraries::) and programs in C and other languages
+ (*note Compilation::).
+
+Complete Key
+ A complete key is a character or sequence of characters which,
+ when typed by the user, fully specifies one action to be performed
+ by Emacs. For example, `X' and `Control-f' and `Control-x m' are
+ keys. Keys derive their meanings from being bound (q.v.) to
+ commands (q.v.). Thus, `X' is conventionally bound to a command
+ to insert `X' in the buffer; `C-x m' is conventionally bound to a
+ command to begin composing a mail message. *Note Keystrokes::.
+
+Completion
+ When Emacs automatically fills an abbreviation for a name into the
+ entire name, that process is called completion. Completion is
+ done for minibuffer (q.v.) arguments when the set of possible
+ valid inputs is known; for example, on command names, buffer
+ names, and file names. Completion occurs when you type <TAB>,
+ <SPC>, or <RET>. *Note Completion::.
+
+Continuation Line
+ When a line of text is longer than the width of the frame, it
+ takes up more than one screen line when displayed. We say that the
+ text line is continued, and all screen lines used for it after the
+ first are called continuation lines. *Note Continuation: Basic.
+
+Control-Character
+ ASCII characters with octal codes 0 through 037, and also code
+ 0177, do not have graphic images assigned to them. These are the
+ control characters. Any control character can be typed by holding
+ down the <CTRL> key and typing some other character; some have
+ special keys on the keyboard. <RET>, <TAB>, <ESC>, <LFD>, and
+ <DEL> are all control characters. *Note Keystrokes::.
+
+Copyleft
+ A copyleft is a notice giving the public legal permission to
+ redistribute a program or other work of art. Copylefts are used
+ by leftists to enrich the public just as copyrights are used by
+ rightists to gain power over the public.
+
+Current Buffer
+ The current buffer in Emacs is the Emacs buffer on which most
+ editing commands operate. You can select any Emacs buffer as the
+ current one. *Note Buffers::.
+
+Current Line
+ The line point is on (*note Point::).
+
+Current Paragraph
+ The paragraph that point is in. If point is between paragraphs,
+ the current paragraph is the one that follows point. *Note
+ Paragraphs::.
+
+Current Defun
+ The defun (q.v.) that point is in. If point is between defuns, the
+ current defun is the one that follows point. *Note Defuns::.
+
+Cursor
+ The cursor is the rectangle on the screen which indicates the
+ position called point (q.v.) at which insertion and deletion takes
+ place. The cursor is on or under the character that follows
+ point. Often people speak of `the cursor' when, strictly
+ speaking, they mean `point'. *Note Cursor: Basic.
+
+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::).
+
+Default Argument
+ The default for an argument is the value that is used if you do not
+ specify one. When Emacs prompts you in the minibuffer for an
+ argument, the default argument is used if you just type <RET>.
+ *Note Minibuffer::.
+
+Default Directory
+ When you specify a file name that does not start with `/' or `~',
+ it is interpreted relative to the current buffer's default
+ directory. *Note Default Directory: Minibuffer File.
+
+Defun
+ A defun is a list at the top level of parenthesis or bracket
+ structure in a program. It is so named because most such lists in
+ Lisp programs are calls to the Lisp function `defun'. *Note
+ Defuns::.
+
+<DEL>
+ The <DEL> character runs the command that deletes one character of
+ text. *Note DEL: Basic.
+
+Deletion
+ Deleting text means erasing it without saving it. Emacs deletes
+ text only when it is expected not to be worth saving (all
+ whitespace, or only one character). The alternative is killing
+ (q.v.). *Note Deletion: Killing.
+
+Deletion of Files
+ Deleting a file means removing it from the file system. *Note
+ Misc File Ops::.
+
+Deletion of Messages
+ Deleting a message means flagging it to be eliminated from your
+ mail file. Until the mail file is expunged, you can undo this by
+ undeleting the message.
+
+Deletion of Frames
+ When working under the multi-frame X-based version of XEmacs, you
+ can delete individual frames using the Close menu item from the
+ File menu.
+
+Deletion of Windows
+ When you delete a subwindow of an Emacs frame, you eliminate it
+ from the frame. Other windows expand to use up the space. The
+ deleted window can never come back, but no actual text is lost.
+ *Note Windows::.
+
+Directory
+ Files in the Unix file system are grouped into file directories.
+ *Note Directories: ListDir.
+
+Dired
+ Dired is the Emacs facility that displays the contents of a file
+ directory and allows you to "edit the directory", performing
+ operations on the files in the directory. *Note Dired::.
+
+Disabled Command
+ A disabled command is one that you may not run without special
+ confirmation. Commands are usually disabled because they are
+ confusing for beginning users. *Note Disabling::.
+
+Dribble File
+ A file into which Emacs writes all the characters that the user
+ types on the keyboard. Dribble files are used to make a record for
+ debugging Emacs bugs. Emacs does not make a dribble file unless
+ you tell it to. *Note Bugs::.
+
+Echo Area
+ The area at the bottom of the Emacs frame which is used for
+ echoing the arguments to commands, for asking questions, and for
+ printing brief messages (including error messages). *Note Echo
+ Area::.
+
+Echoing
+ Echoing refers to acknowledging the receipt of commands by
+ displaying them (in the echo area). Emacs never echoes
+ single-character keys; longer keys echo only if you pause while
+ typing them.
+
+Error
+ An error occurs when an Emacs command cannot execute in the current
+ circumstances. When an error occurs, execution of the command
+ stops (unless the command has been programmed to do otherwise) and
+ Emacs reports the error by printing an error message (q.v.).
+ Type-ahead is discarded. Then Emacs is ready to read another
+ editing command.
+
+Error Messages
+ Error messages are single lines of output printed by Emacs when the
+ user asks for something impossible to do (such as killing text
+ forward when point is at the end of the buffer). They appear in
+ the echo area, accompanied by a beep.
+
+<ESC>
+ <ESC> is a character used as a prefix for typing Meta characters on
+ keyboards lacking a <META> key. Unlike the <META> key (which,
+ like the <SHIFT> key, is held down while another character is
+ typed), the <ESC> key is pressed and released, and applies to the
+ next character typed.
+
+Fill Prefix
+ The fill prefix is a string that Emacs enters at the beginning of
+ each line when it performs filling. It is not regarded as part of
+ the text to be filled. *Note Filling::.
+
+Filling
+ Filling text means moving text from line to line so that all the
+ lines are approximately the same length. *Note Filling::.
+
+Frame
+ When running Emacs on a TTY terminal, "frame" means the terminal's
+ screen. When running Emacs under X, you can have multiple frames,
+ each corresponding to a top-level X window and each looking like
+ the screen on a TTY. Each frame contains one or more
+ non-overlapping Emacs windows (possibly with associated
+ scrollbars, under X), an echo area, and (under X) possibly a
+ menubar, toolbar, and/or gutter.
+
+Global
+ Global means `independent of the current environment; in effect
+ throughout Emacs'. It is the opposite of local (q.v.). Examples
+ of the use of `global' appear below.
+
+Global Abbrev
+ A global definition of an abbrev (q.v.) is effective in all major
+ modes that do not have local (q.v.) definitions for the same
+ abbrev. *Note Abbrevs::.
+
+Global Keymap
+ The global keymap (q.v.) contains key bindings that are in effect
+ unless local key bindings in a major mode's local keymap (q.v.)
+ override them.*Note Keymaps::.
+
+Global Substitution
+ Global substitution means replacing each occurrence of one string
+ by another string through a large amount of text. *Note Replace::.
+
+Global Variable
+ The global value of a variable (q.v.) takes effect in all buffers
+ that do not have their own local (q.v.) values for the variable.
+ *Note Variables::.
+
+Graphic Character
+ Graphic characters are those assigned pictorial images rather than
+ just names. All the non-Meta (q.v.) characters except for the
+ Control (q.v.) character are graphic characters. These include
+ letters, digits, punctuation, and spaces; they do not include
+ <RET> or <ESC>. In Emacs, typing a graphic character inserts that
+ character (in ordinary editing modes). *Note Basic Editing: Basic.
+
+Grinding
+ Grinding means adjusting the indentation in a program to fit the
+ nesting structure. *Note Grinding: Indentation.
+
+Hardcopy
+ Hardcopy means printed output. Emacs has commands for making
+ printed listings of text in Emacs buffers. *Note Hardcopy::.
+
+<HELP>
+ You can type <HELP> at any time to ask what options you have, or
+ to ask what any command does. <HELP> is really `Control-h'.
+ *Note Help::.
+
+Inbox
+ An inbox is a file in which mail is delivered by the operating
+ system. Some mail handlers transfers mail from inboxes to mail
+ files (q.v.) in which the mail is then stored permanently or until
+ explicitly deleted.
+
+Indentation
+ Indentation means blank space at the beginning of a line. Most
+ programming languages have conventions for using indentation to
+ illuminate the structure of the program, and Emacs has special
+ features to help you set up the correct indentation. *Note
+ Indentation::.
+
+Insertion
+ Insertion means copying text into the buffer, either from the
+ keyboard or from some other place in Emacs.
+
+Justification
+ Justification means adding extra spaces to lines of text to make
+ them come exactly to a specified width. *Note Justification:
+ Filling.
+
+Keyboard Macros
+ Keyboard macros are a way of defining new Emacs commands from
+ sequences of existing ones, with no need to write a Lisp program.
+ *Note Keyboard Macros::.
+
+Key
+ A key is a sequence of characters that, when input to Emacs,
+ specify or begin to specify a single action for Emacs to perform.
+ That is, the sequence is considered a single unit. If the key is
+ enough to specify one action, it is a complete key (q.v.); if it
+ is less than enough, it is a prefix key (q.v.). *Note
+ Keystrokes::.
+
+Keymap
+ The keymap is the data structure that records the bindings (q.v.)
+ of keys to the commands that they run. For example, the keymap
+ binds the character `C-n' to the command function `next-line'.
+ *Note Keymaps::.
+
+Kill Ring
+ The kill ring is the place where all text you have killed recently
+ is saved. You can re-insert any of the killed text still in the
+ ring; this is called yanking (q.v.). *Note Yanking::.
+
+Killing
+ Killing means erasing text and saving it on the kill ring so it
+ can be yanked (q.v.) later. Some other systems call this
+ "cutting." Most Emacs commands to erase text do killing, as
+ opposed to deletion (q.v.). *Note Killing::.
+
+Killing Jobs
+ Killing a job (such as, an invocation of Emacs) means making it
+ cease to exist. Any data within it, if not saved in a file, is
+ lost. *Note Exiting::.
+
+List
+ A list is, approximately, a text string beginning with an open
+ parenthesis and ending with the matching close parenthesis. In C
+ mode and other non-Lisp modes, groupings surrounded by other kinds
+ of matched delimiters appropriate to the language, such as braces,
+ are also considered lists. Emacs has special commands for many
+ operations on lists. *Note Lists::.
+
+Local
+ Local means `in effect only in a particular context'; the relevant
+ kind of context is a particular function execution, a particular
+ buffer, or a particular major mode. Local is the opposite of
+ `global' (q.v.). Specific uses of `local' in Emacs terminology
+ appear below.
+
+Local Abbrev
+ A local abbrev definition is effective only if a particular major
+ mode is selected. In that major mode, it overrides any global
+ definition for the same abbrev. *Note Abbrevs::.
+
+Local Keymap
+ A local keymap is used in a particular major mode; the key bindings
+ (q.v.) in the current local keymap override global bindings of the
+ same keys. *Note Keymaps::.
+
+Local Variable
+ A local value of a variable (q.v.) applies to only one buffer.
+ *Note Locals::.
+
+M-
+ `M-' in the name of a character is an abbreviation for <META>, one
+ of the modifier keys that can accompany any character. *Note
+ Keystrokes::.
+
+M-C-
+ `M-C-' in the name of a character is an abbreviation for
+ Control-Meta; it means the same thing as `C-M-'. If your terminal
+ lacks a real <META> key, you type a Control-Meta character by
+ typing <ESC> and then typing the corresponding Control character.
+ *Note C-M-: Keystrokes.
+
+M-x
+ `M-x' is the key which is used to call an Emacs command by name.
+ You use it to call commands that are not bound to keys. *Note
+ M-x::.
+
+Mail
+ Mail means messages sent from one user to another through the
+ computer system, to be read at the recipient's convenience. Emacs
+ has commands for composing and sending mail, and for reading and
+ editing the mail you have received. *Note Sending Mail::.
+
+Major Mode
+ The major modes are a mutually exclusive set of options each of
+ which configures Emacs for editing a certain sort of text.
+ Ideally, each programming language has its own major mode. *Note
+ Major Modes::.
+
+Mark
+ The mark points to a position in the text. It specifies one end
+ of the region (q.v.), point being the other end. Many commands
+ operate on the whole region, that is, all the text from point to
+ the mark. *Note Mark::.
+
+Mark Ring
+ The mark ring is used to hold several recent previous locations of
+ the mark, just in case you want to move back to them. *Note Mark
+ Ring::.
+
+Message
+ See `mail'.
+
+Meta
+ Meta is the name of a modifier bit which a command character may
+ have. It is present in a character if the character is typed with
+ the <META> key held down. Such characters are given names that
+ start with `Meta-'. For example, `Meta-<' is typed by holding down
+ <META> and at the same time typing `<' (which itself is done, on
+ most terminals, by holding down <SHIFT> and typing `,'). *Note
+ Meta: Keystrokes.
+
+Meta Character
+ A Meta character is one whose character code includes the Meta bit.
+
+Minibuffer
+ The minibuffer is the window that Emacs displays inside the echo
+ area (q.v.) when it prompts you for arguments to commands. *Note
+ Minibuffer::.
+
+Minor Mode
+ A minor mode is an optional feature of Emacs which can be switched
+ on or off independent of the major mode. Each minor mode has a
+ command to turn it on or off. *Note Minor Modes::.
+
+Mode Line
+ The mode line is the line at the bottom of each text window (q.v.),
+ which gives status information on the buffer displayed in that
+ window. *Note Mode Line::.
+
+Modified Buffer
+ A buffer (q.v.) is modified if its text has been changed since the
+ last time the buffer was saved (or since it was created, if it has
+ never been saved). *Note Saving::.
+
+Moving Text
+ Moving text means erasing it from one place and inserting it in
+ another. This is done by killing (q.v.) and then yanking (q.v.).
+ *Note Killing::.
+
+Named Mark
+ A named mark is a register (q.v.) in its role of recording a
+ location in text so that you can move point to that location.
+ *Note Registers::.
+
+Narrowing
+ Narrowing means creating a restriction (q.v.) that limits editing
+ in the current buffer to only a part of the text in the buffer.
+ Text outside that part is inaccessible to the user until the
+ boundaries are widened again, but it is still there, and saving
+ the file saves the invisible text. *Note Narrowing::.
+
+Newline
+ <LFD> characters in the buffer terminate lines of text and are
+ called newlines. *Note Newline: Keystrokes.
+
+Numeric Argument
+ A numeric argument is a number, specified before a command, to
+ change the effect of the command. Often the numeric argument
+ serves as a repeat count. *Note Arguments::.
+
+Option
+ An option is a variable (q.v.) that allows you to customize Emacs
+ by giving it a new value. *Note Variables::.
+
+Overwrite Mode
+ Overwrite mode is a minor mode. When it is enabled, ordinary text
+ characters replace the existing text after point rather than
+ pushing it to the right. *Note Minor Modes::.
+
+Page
+ A page is a unit of text, delimited by formfeed characters (ASCII
+ Control-L, code 014) coming at the beginning of a line. Some Emacs
+ commands are provided for moving over and operating on pages.
+ *Note Pages::.
+
+Paragraphs
+ Paragraphs are the medium-size unit of English text. There are
+ special Emacs commands for moving over and operating on paragraphs.
+ *Note Paragraphs::.
+
+Parsing
+ We say that Emacs parses words or expressions in the text being
+ edited. Really, all it knows how to do is find the other end of a
+ word or expression. *Note Syntax::.
+
+Point
+ Point is the place in the buffer at which insertion and deletion
+ occur. Point is considered to be between two characters, not at
+ one character. The terminal's cursor (q.v.) indicates the
+ location of point. *Note Point: Basic.
+
+Prefix Key
+ A prefix key is a key (q.v.) whose sole function is to introduce a
+ set of multi-character keys. `Control-x' is an example of a prefix
+ key; any two-character sequence starting with `C-x' is also a
+ legitimate key. *Note Keystrokes::.
+
+Prompt
+ A prompt is text printed to ask the user for input. Printing a
+ prompt is called prompting. Emacs prompts always appear in the
+ echo area (q.v.). One kind of prompting happens when the
+ minibuffer is used to read an argument (*note Minibuffer::); the
+ echoing which happens when you pause in the middle of typing a
+ multi-character key is also a kind of prompting (*note Echo
+ Area::).
+
+Quitting
+ Quitting means cancelling a partially typed command or a running
+ command, using `C-g'. *Note Quitting::.
+
+Quoting
+ Quoting means depriving a character of its usual special
+ significance. In Emacs this is usually done with `Control-q'.
+ What constitutes special significance depends on the context and
+ on convention. For example, an "ordinary" character as an Emacs
+ command inserts itself; so in this context, a special character is
+ any character that does not normally insert itself (such as <DEL>,
+ for example), and quoting it makes it insert itself as if it were
+ not special. Not all contexts allow quoting. *Note Quoting:
+ Basic.
+
+Read-only Buffer
+ A read-only buffer is one whose text you are not allowed to change.
+ Normally Emacs makes buffers read-only when they contain text which
+ has a special significance to Emacs, such asDired buffers.
+ Visiting a file that is write-protected also makes a read-only
+ buffer. *Note Buffers::.
+
+Recursive Editing Level
+ A recursive editing level is a state in which part of the
+ execution of a command involves asking the user to edit some text.
+ This text may or may not be the same as the text to which the
+ command was applied. The mode line indicates recursive editing
+ levels with square brackets (`[' and `]'). *Note Recursive Edit::.
+
+Redisplay
+ Redisplay is the process of correcting the image on the screen to
+ correspond to changes that have been made in the text being edited.
+ *Note Redisplay: Frame.
+
+Regexp
+ See `regular expression'.
+
+Region
+ The region is the text between point (q.v.) and the mark (q.v.).
+ Many commands operate on the text of the region. *Note Region:
+ Mark.
+
+Registers
+ Registers are named slots in which text or buffer positions or
+ rectangles can be saved for later use. *Note Registers::.
+
+Regular Expression
+ A regular expression is a pattern that can match various text
+ strings; for example, `l[0-9]+' matches `l' followed by one or more
+ digits. *Note Regexps::.
+
+Replacement
+ See `global substitution'.
+
+Restriction
+ A buffer's restriction is the amount of text, at the beginning or
+ the end of the buffer, that is temporarily invisible and
+ inaccessible. Giving a buffer a nonzero amount of restriction is
+ called narrowing (q.v.). *Note Narrowing::.
+
+<RET>
+ <RET> is the character than runs the command to insert a newline
+ into the text. It is also used to terminate most arguments read
+ in the minibuffer (q.v.). *Note Return: Keystrokes.
+
+Saving
+ Saving a buffer means copying its text into the file that was
+ visited (q.v.) in that buffer. To actually change a file you have
+ edited in Emacs, you have to save it. *Note Saving::.
+
+Scrolling
+ Scrolling means shifting the text in the Emacs window to make a
+ different part ot the buffer visible. *Note Scrolling: Display.
+
+Searching
+ Searching means moving point to the next occurrence of a specified
+ string. *Note Search::.
+
+Selecting
+ Selecting a buffer means making it the current (q.v.) buffer.
+ *Note Selecting: Buffers.
+
+Self-documentation
+ Self-documentation is the feature of Emacs which can tell you what
+ any command does, or can give you a list of all commands related
+ to a topic you specify. You ask for self-documentation with the
+ help character, `C-h'. *Note Help::.
+
+Sentences
+ Emacs has commands for moving by or killing by sentences. *Note
+ Sentences::.
+
+Sexp
+ An sexp (short for `s-expression,' itself short for `symbolic
+ expression') is the basic syntactic unit of Lisp in its textual
+ form: either a list, or Lisp atom. Many Emacs commands operate on
+ sexps. The term `sexp' is generalized to languages other than
+ Lisp to mean a syntactically recognizable expression. *Note
+ Sexps: Lists.
+
+Simultaneous Editing
+ Simultaneous editing means two users modifying the same file at
+ once. If simultaneous editing is not detected, you may lose your
+ work. Emacs detects all cases of simultaneous editing and warns
+ the user to investigate them. *Note Simultaneous Editing:
+ Interlocking.
+
+String
+ A string is a kind of Lisp data object which contains a sequence of
+ characters. Many Emacs variables are intended to have strings as
+ values. The Lisp syntax for a string consists of the characters in
+ the string with a `"' before and another `"' after. Write a `"'
+ that is part of the string as `\"' and a `\' that is part of the
+ string as `\\'. You can include all other characters, including
+ newline, just by writing them inside the string. You can also
+ include escape sequences as in C, such as `\n' for newline or
+ `\241' using an octal character code.
+
+String Substitution
+ See `global substitution'.
+
+Syntax Table
+ The syntax table tells Emacs which characters are part of a word,
+ which characters balance each other like parentheses, etc. *Note
+ Syntax::.
+
+Tag Table
+ A tag table is a file that serves as an index to the function
+ definitions in one or more other files. *Note Tags::.
+
+Termscript File
+ A termscript file contains a record of all characters Emacs sent to
+ the terminal. It is used for tracking down bugs in Emacs
+ redisplay. Emacs does not make a termscript file unless
+ explicitly instructed to do so. *Note Bugs::.
+
+Text
+ Text has two meanings (*note Text::):
+
+ * Data consisting of a sequence of characters, as opposed to
+ binary numbers, images, graphics commands, executable
+ programs, and the like. The contents of an Emacs buffer are
+ always text in this sense.
+
+ * Data consisting of written human language, as opposed to
+ programs, or something that follows the stylistic conventions
+ of human language.
+
+Top Level
+ Top level is the normal state of Emacs, in which you are editing
+ the text of the file you have visited. You are at top level
+ whenever you are not in a recursive editing level (q.v.) or the
+ minibuffer (q.v.), and not in the middle of a command. You can
+ get back to top level by aborting (q.v.) and quitting (q.v.).
+ *Note Quitting::.
+
+Transposition
+ Transposing two units of text means putting each one into the place
+ formerly occupied by the other. There are Emacs commands to
+ transpose two adjacent characters, words, sexps (q.v.), or lines
+ (*note Transpose::).
+
+Truncation
+ Truncating text lines in the display means leaving out any text on
+ a line that does not fit within the right margin of the window
+ displaying it. See also `continuation line'. *Note Truncation:
+ Basic.
+
+Undoing
+ Undoing means making your previous editing go in reverse, bringing
+ back the text that existed earlier in the editing session. *Note
+ Undo::.
+
+Variable
+ A variable is Lisp object that can store an arbitrary value.
+ Emacs uses some variables for internal purposes, and has others
+ (known as `options' (q.v.)) you can set to control the behavior of
+ Emacs. The variables used in Emacs that you are likely to be
+ interested in are listed in the Variables Index of this manual.
+ *Note Variables::, for information on variables.
+
+Visiting
+ Visiting a file means loading its contents into a buffer (q.v.)
+ where they can be edited. *Note Visiting::.
+
+Whitespace
+ Whitespace is any run of consecutive formatting characters (spaces,
+ tabs, newlines, and backspaces).
+
+Widening
+ Widening is removing any restriction (q.v.) on the current buffer;
+ it is the opposite of narrowing (q.v.). *Note Narrowing::.
+
+Window
+ Emacs divides the frame into one or more windows, each of which can
+ display the contents of one buffer (q.v.) at any time. *Note
+ Frame::, for basic information on how Emacs uses the frame. *Note
+ Windows::, for commands to control the use of windows. Note that if
+ you are running Emacs under X, terminology can be confusing: Each
+ Emacs frame occupies a separate X window and can, in turn, be
+ divided into different subwindows.
+
+Word Abbrev
+ Synonymous with `abbrev'.
+
+Word Search
+ Word search is searching for a sequence of words, considering the
+ punctuation between them as insignificant. *Note Word Search::.
+
+Yanking
+ Yanking means reinserting text previously killed. It can be used
+ to undo a mistaken kill, or for copying or moving text. Some other
+ systems call this "pasting". *Note Yanking::.
translation approved by the author instead of in the original English.
\1f
-File: xemacs.info, Node: Command Index, Next: Variable Index, Prev: Key Index, Up: Top
+File: xemacs.info, Node: Manifesto, Next: Key Index, Prev: Glossary, Up: Top
-Command and Function Index
-**************************
+The GNU Manifesto
+*****************
+
+What's GNU? GNU's Not Unix!
+============================
+
+ GNU, which stands for GNU's Not Unix, is the name for the complete
+Unix-compatible software system which I am writing so that I can give it
+away free to everyone who can use it. Several other volunteers are
+helping me. Contributions of time, money, programs, and equipment are
+greatly needed.
+
+ So far we have an Emacs text editor with Lisp for writing editor
+commands, a source level debugger, a yacc-compatible parser generator,
+a linker, and around 35 utilities. A shell (command interpreter) is
+nearly completed. A new portable optimizing C compiler has compiled
+itself and may be released this year. An initial kernel exists, but
+many more features are needed to emulate Unix. When the kernel and
+compiler are finished, it will be possible to distribute a GNU system
+suitable for program development. We will use TeX as our text
+formatter, but an nroff is being worked on. We will use the free,
+portable X window system as well. After this we will add a portable
+Common Lisp, an Empire game, a spreadsheet, and hundreds of other
+things, plus online documentation. We hope to supply, eventually,
+everything useful that normally comes with a Unix system, and more.
+
+ GNU will be able to run Unix programs, but will not be identical to
+Unix. We will make all improvements that are convenient, based on our
+experience with other operating systems. In particular, we plan to
+have longer filenames, file version numbers, a crashproof file system,
+filename completion perhaps, terminal-independent display support, and
+perhaps eventually a Lisp-based window system through which several
+Lisp programs and ordinary Unix programs can share a screen. Both C
+and Lisp will be available as system programming languages. We will
+try to support UUCP, MIT Chaosnet, and Internet protocols for
+communication.
+
+ GNU is aimed initially at machines in the 68000/16000 class with
+virtual memory, because they are the easiest machines to make it run
+on. The extra effort to make it run on smaller machines will be left
+to someone who wants to use it on them.
+
+ To avoid horrible confusion, please pronounce the `G' in the word
+`GNU' when it is the name of this project.
+
+Why I Must Write GNU
+====================
+
+ I consider that the golden rule requires that if I like a program I
+must share it with other people who like it. Software sellers want to
+divide the users and conquer them, making each user agree not to share
+with others. I refuse to break solidarity with other users in this
+way. I cannot in good conscience sign a nondisclosure agreement or a
+software license agreement. For years I worked within the Artificial
+Intelligence Lab to resist such tendencies and other inhospitalities,
+but eventually they had gone too far: I could not remain in an
+institution where such things are done for me against my will.
+
+ So that I can continue to use computers without dishonor, I have
+decided to put together a sufficient body of free software so that I
+will be able to get along without any software that is not free. I
+have resigned from the AI lab to deny MIT any legal excuse to prevent
+me from giving GNU away.
+
+Why GNU Will Be Compatible With Unix
+====================================
+
+ Unix is not my ideal system, but it is not too bad. The essential
+features of Unix seem to be good ones, and I think I can fill in what
+Unix lacks without spoiling them. And a system compatible with Unix
+would be convenient for many other people to adopt.
+
+How GNU Will Be Available
+=========================
+
+ GNU is not in the public domain. Everyone will be permitted to
+modify and redistribute GNU, but no distributor will be allowed to
+restrict its further redistribution. That is to say, proprietary
+modifications will not be allowed. I want to make sure that all
+versions of GNU remain free.
+
+Why Many Other Programmers Want to Help
+=======================================
+
+ I have found many other programmers who are excited about GNU and
+want to help.
+
+ Many programmers are unhappy about the commercialization of system
+software. It may enable them to make more money, but it requires them
+to feel in conflict with other programmers in general rather than feel
+as comrades. The fundamental act of friendship among programmers is the
+sharing of programs; marketing arrangements now typically used
+essentially forbid programmers to treat others as friends. The
+purchaser of software must choose between friendship and obeying the
+law. Naturally, many decide that friendship is more important. But
+those who believe in law often do not feel at ease with either choice.
+They become cynical and think that programming is just a way of making
+money.
+
+ By working on and using GNU rather than proprietary programs, we can
+be hospitable to everyone and obey the law. In addition, GNU serves as
+an example to inspire and a banner to rally others to join us in
+sharing. This can give us a feeling of harmony which is impossible if
+we use software that is not free. For about half the programmers I
+talk to, this is an important happiness that money cannot replace.
+
+How You Can Contribute
+======================
+
+ I am asking computer manufacturers for donations of machines and
+money. I'm asking individuals for donations of programs and work.
+
+ One consequence you can expect if you donate machines is that GNU
+will run on them at an early date. The machines should be complete,
+ready-to-use systems, approved for use in a residential area, and not
+in need of sophisticated cooling or power.
+
+ I have found very many programmers eager to contribute part-time
+work for GNU. For most projects, such part-time distributed work would
+be very hard to coordinate; the independently-written parts would not
+work together. But for the particular task of replacing Unix, this
+problem is absent. A complete Unix system contains hundreds of utility
+programs, each of which is documented separately. Most interface
+specifications are fixed by Unix compatibility. If each contributor
+can write a compatible replacement for a single Unix utility, and make
+it work properly in place of the original on a Unix system, then these
+utilities will work right when put together. Even allowing for Murphy
+to create a few unexpected problems, assembling these components will
+be a feasible task. (The kernel will require closer communication and
+will be worked on by a small, tight group.)
+
+ If I get donations of money, I may be able to hire a few people full
+or part time. The salary won't be high by programmers' standards, but
+I'm looking for people for whom building community spirit is as
+important as making money. I view this as a way of enabling dedicated
+people to devote their full energies to working on GNU by sparing them
+the need to make a living in another way.
+
+Why All Computer Users Will Benefit
+===================================
+
+ Once GNU is written, everyone will be able to obtain good system
+software free, just like air.
+
+ This means much more than just saving everyone the price of a Unix
+license. It means that much wasteful duplication of system programming
+effort will be avoided. This effort can go instead into advancing the
+state of the art.
+
+ Complete system sources will be available to everyone. As a result,
+a user who needs changes in the system will always be free to make them
+himself, or hire any available programmer or company to make them for
+him. Users will no longer be at the mercy of one programmer or company
+which owns the sources and is in sole position to make changes.
+
+ Schools will be able to provide a much more educational environment
+by encouraging all students to study and improve the system code.
+Harvard's computer lab used to have the policy that no program could be
+installed on the system if its sources were not on public display, and
+upheld it by actually refusing to install certain programs. I was very
+much inspired by this.
+
+ Finally, the overhead of considering who owns the system software
+and what one is or is not entitled to do with it will be lifted.
+
+ Arrangements to make people pay for using a program, including
+licensing of copies, always incur a tremendous cost to society through
+the cumbersome mechanisms necessary to figure out how much (that is,
+which programs) a person must pay for. And only a police state can
+force everyone to obey them. Consider a space station where air must
+be manufactured at great cost: charging each breather per liter of air
+may be fair, but wearing the metered gas mask all day and all night is
+intolerable even if everyone can afford to pay the air bill. And the
+TV cameras everywhere to see if you ever take the mask off are
+outrageous. It's better to support the air plant with a head tax and
+chuck the masks.
+
+ Copying all or parts of a program is as natural to a programmer as
+breathing, and as productive. It ought to be as free.
+
+Some Easily Rebutted Objections to GNU's Goals
+==============================================
+
+ "Nobody will use it if it is free, because that means they can't
+ rely on any support."
+
+ "You have to charge for the program to pay for providing the
+ support."
+
+ If people would rather pay for GNU plus service than get GNU free
+without service, a company to provide just service to people who have
+obtained GNU free ought to be profitable.
+
+ We must distinguish between support in the form of real programming
+work and mere handholding. The former is something one cannot rely on
+from a software vendor. If your problem is not shared by enough
+people, the vendor will tell you to get lost.
+
+ If your business needs to be able to rely on support, the only way
+is to have all the necessary sources and tools. Then you can hire any
+available person to fix your problem; you are not at the mercy of any
+individual. With Unix, the price of sources puts this out of
+consideration for most businesses. With GNU this will be easy. It is
+still possible for there to be no available competent person, but this
+problem cannot be blamed on distibution arrangements. GNU does not
+eliminate all the world's problems, only some of them.
+
+ Meanwhile, the users who know nothing about computers need
+handholding: doing things for them which they could easily do
+themselves but don't know how.
+
+ Such services could be provided by companies that sell just
+hand-holding and repair service. If it is true that users would rather
+spend money and get a product with service, they will also be willing
+to buy the service having got the product free. The service companies
+will compete in quality and price; users will not be tied to any
+particular one. Meanwhile, those of us who don't need the service
+should be able to use the program without paying for the service.
+
+ "You cannot reach many people without advertising, and you must
+ charge for the program to support that."
+
+ "It's no use advertising a program people can get free."
+
+ There are various forms of free or very cheap publicity that can be
+used to inform numbers of computer users about something like GNU. But
+it may be true that one can reach more microcomputer users with
+advertising. If this is really so, a business which advertises the
+service of copying and mailing GNU for a fee ought to be successful
+enough to pay for its advertising and more. This way, only the users
+who benefit from the advertising pay for it.
+
+ On the other hand, if many people get GNU from their friends, and
+such companies don't succeed, this will show that advertising was not
+really necessary to spread GNU. Why is it that free market advocates
+don't want to let the free market decide this?
+
+ "My company needs a proprietary operating system to get a
+ competitive edge."
+
+ GNU will remove operating system software from the realm of
+competition. You will not be able to get an edge in this area, but
+neither will your competitors be able to get an edge over you. You and
+they will compete in other areas, while benefitting mutually in this
+one. If your business is selling an operating system, you will not
+like GNU, but that's tough on you. If your business is something else,
+GNU can save you from being pushed into the expensive business of
+selling operating systems.
+
+ I would like to see GNU development supported by gifts from many
+manufacturers and users, reducing the cost to each.
+
+ "Don't programmers deserve a reward for their creativity?"
+
+ If anything deserves a reward, it is social contribution.
+Creativity can be a social contribution, but only in so far as society
+is free to use the results. If programmers deserve to be rewarded for
+creating innovative programs, by the same token they deserve to be
+punished if they restrict the use of these programs.
+
+ "Shouldn't a programmer be able to ask for a reward for his
+ creativity?"
+
+ There is nothing wrong with wanting pay for work, or seeking to
+maximize one's income, as long as one does not use means that are
+destructive. But the means customary in the field of software today
+are based on destruction.
+
+ Extracting money from users of a program by restricting their use of
+it is destructive because the restrictions reduce the amount and the
+ways that the program can be used. This reduces the amount of wealth
+that humanity derives from the program. When there is a deliberate
+choice to restrict, the harmful consequences are deliberate destruction.
+
+ The reason a good citizen does not use such destructive means to
+become wealthier is that, if everyone did so, we would all become
+poorer from the mutual destructiveness. This is Kantian ethics; or,
+the Golden Rule. Since I do not like the consequences that result if
+everyone hoards information, I am required to consider it wrong for one
+to do so. Specifically, the desire to be rewarded for one's creativity
+does not justify depriving the world in general of all or part of that
+creativity.
+
+ "Won't programmers starve?"
+
+ I could answer that nobody is forced to be a programmer. Most of us
+cannot manage to get any money for standing on the street and making
+faces. But we are not, as a result, condemned to spend our lives
+standing on the street making faces, and starving. We do something
+else.
+
+ But that is the wrong answer because it accepts the questioner's
+implicit assumption: that without ownership of software, programmers
+cannot possibly be paid a cent. Supposedly it is all or nothing.
+
+ The real reason programmers will not starve is that it will still be
+possible for them to get paid for programming; just not paid as much as
+now.
+
+ Restricting copying is not the only basis for business in software.
+It is the most common basis because it brings in the most money. If it
+were prohibited, or rejected by the customer, software business would
+move to other bases of organization which are now used less often.
+There are always numerous ways to organize any kind of business.
+
+ Probably programming will not be as lucrative on the new basis as it
+is now. But that is not an argument against the change. It is not
+considered an injustice that sales clerks make the salaries that they
+now do. If programmers made the same, that would not be an injustice
+either. (In practice they would still make considerably more than
+that.)
+
+ "Don't people have a right to control how their creativity is
+ used?"
+
+ "Control over the use of one's ideas" really constitutes control over
+other people's lives; and it is usually used to make their lives more
+difficult.
+
+ People who have studied the issue of intellectual property rights
+carefully (such as lawyers) say that there is no intrinsic right to
+intellectual property. The kinds of supposed intellectual property
+rights that the government recognizes were created by specific acts of
+legislation for specific purposes.
+
+ For example, the patent system was established to encourage
+inventors to disclose the details of their inventions. Its purpose was
+to help society rather than to help inventors. At the time, the life
+span of 17 years for a patent was short compared with the rate of
+advance of the state of the art. Since patents are an issue only among
+manufacturers, for whom the cost and effort of a license agreement are
+small compared with setting up production, the patents often do not do
+much harm. They do not obstruct most individuals who use patented
+products.
+
+ The idea of copyright did not exist in ancient times, when authors
+frequently copied other authors at length in works of non-fiction. This
+practice was useful, and is the only way many authors' works have
+survived even in part. The copyright system was created expressly for
+the purpose of encouraging authorship. In the domain for which it was
+invented--books, which could be copied economically only on a printing
+press--it did little harm, and did not obstruct most of the individuals
+who read the books.
+
+ All intellectual property rights are just licenses granted by society
+because it was thought, rightly or wrongly, that society as a whole
+would benefit by granting them. But in any particular situation, we
+have to ask: are we really better off granting such license? What kind
+of act are we licensing a person to do?
+
+ The case of programs today is very different from that of books a
+hundred years ago. The fact that the easiest way to copy a program is
+from one neighbor to another, the fact that a program has both source
+code and object code which are distinct, and the fact that a program is
+used rather than read and enjoyed, combine to create a situation in
+which a person who enforces a copyright is harming society as a whole
+both materially and spiritually; in which a person should not do so
+regardless of whether the law enables him to.
+
+ "Competition makes things get done better."
+
+ The paradigm of competition is a race: by rewarding the winner, we
+encourage everyone to run faster. When capitalism really works this
+way, it does a good job; but its defenders are wrong in assuming it
+always works this way. If the runners forget why the reward is offered
+and become intent on winning, no matter how, they may find other
+strategies--such as, attacking other runners. If the runners get into
+a fist fight, they will all finish late.
+
+ Proprietary and secret software is the moral equivalent of runners
+in a fist fight. Sad to say, the only referee we've got does not seem
+to object to fights; he just regulates them ("For every ten yards you
+run, you can fire one shot"). He really ought to break them up, and
+penalize runners for even trying to fight.
+
+ "Won't everyone stop programming without a monetary incentive?"
+
+ Actually, many people will program with absolutely no monetary
+incentive. Programming has an irresistible fascination for some
+people, usually the people who are best at it. There is no shortage of
+professional musicians who keep at it even though they have no hope of
+making a living that way.
+
+ But really this question, though commonly asked, is not appropriate
+to the situation. Pay for programmers will not disappear, only become
+less. So the right question is, will anyone program with a reduced
+monetary incentive? My experience shows that they will.
+
+ For more than ten years, many of the world's best programmers worked
+at the Artificial Intelligence Lab for far less money than they could
+have had anywhere else. They got many kinds of non-monetary rewards:
+fame and appreciation, for example. And creativity is also fun, a
+reward in itself.
+
+ Then most of them left when offered a chance to do the same
+interesting work for a lot of money.
+
+ What the facts show is that people will program for reasons other
+than riches; but if given a chance to make a lot of money as well, they
+will come to expect and demand it. Low-paying organizations do poorly
+in competition with high-paying ones, but they do not have to do badly
+if the high-paying ones are banned.
+
+ "We need the programmers desperately. If they demand that we stop
+ helping our neighbors, we have to obey."
+
+ You're never so desperate that you have to obey this sort of demand.
+Remember: millions for defense, but not a cent for tribute!
+
+ "Programmers need to make a living somehow."
+
+ In the short run, this is true. However, there are plenty of ways
+that programmers could make a living without selling the right to use a
+program. This way is customary now because it brings programmers and
+businessmen the most money, not because it is the only way to make a
+living. It is easy to find other ways if you want to find them. Here
+are a number of examples.
+
+ A manufacturer introducing a new computer will pay for the porting of
+operating systems onto the new hardware.
+
+ The sale of teaching, hand-holding, and maintenance services could
+also employ programmers.
+
+ People with new ideas could distribute programs as freeware and ask
+for donations from satisfied users or sell hand-holding services. I
+have met people who are already working this way successfully.
+
+ Users with related needs can form users' groups and pay dues. A
+group would contract with programming companies to write programs that
+the group's members would like to use.
+
+ All sorts of development can be funded with a Software Tax:
+
+ Suppose everyone who buys a computer has to pay a certain percent
+ of the price as a software tax. The government gives this to an
+ agency like the NSF to spend on software development.
+
+ But if the computer buyer makes a donation to software development
+ himself, he can take a credit against the tax. He can donate to
+ the project of his own choosing--often, chosen because he hopes to
+ use the results when
+
+ it is done. He can take a credit for any amount of donation up to
+ the total tax he had to pay.
+
+ The total tax rate could be decided by a vote of the payers of the
+ tax, weighted according to the amount they will be taxed on.
+
+ The consequences:
+
+ * The computer-using community supports software development.
+
+ * This community decides what level of support is needed.
+
+ * Users who care which projects their share is spent on can
+ choose this for themselves.
+
+ In the long run, making programs free is a step toward the
+post-scarcity world, where nobody will have to work very hard just to
+make a living. People will be free to devote themselves to activities
+that are fun, such as programming, after spending the necessary ten
+hours a week on required tasks such as legislation, family counseling,
+robot repair, and asteroid prospecting. There will be no need to be
+able to make a living from programming.
+
+ We have already greatly reduced the amount of work that the whole
+society must do for its actual productivity, but only a little of this
+has translated itself into leisure for workers because much
+nonproductive activity is required to accompany productive activity.
+The main causes of this are bureaucracy and isometric struggles against
+competition. Free software will greatly reduce these drains in the
+area of software production. We must do this, in order for technical
+gains in productivity to translate into less work for us.
+
+\1f
+File: xemacs.info, Node: Key Index, Next: Command Index, Prev: Manifesto, Up: Top
+
+Key (Character) Index
+*********************
* Menu:
-* abbrev-mode <1>: Minor Modes.
-* abbrev-mode: Abbrevs.
-* abbrev-prefix-mark: Expanding Abbrevs.
-* 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.
-* add-menu-item: Menu Customization.
-* add-mode-abbrev: Defining Abbrevs.
-* add-name-to-file: Misc File Ops.
-* american-calendar: Date Formats.
-* append-next-kill: Appending Kills.
-* append-to-buffer: Accumulating Text.
-* append-to-file <1>: Misc File Ops.
-* append-to-file: Accumulating Text.
-* apropos: Help.
-* ask-user-about-lock: Interlocking.
-* auto-fill-mode <1>: Minor Modes.
-* auto-fill-mode: Auto Fill.
-* auto-save-mode: Auto Save Control.
-* back-to-indentation: Indentation Commands.
-* backward-char: Basic.
-* backward-delete-char-untabify: Program Modes.
-* backward-kill-sentence <1>: Sentences.
-* backward-kill-sentence <2>: Kill Errors.
-* backward-kill-sentence: Killing.
-* backward-kill-word <1>: Words.
-* backward-kill-word <2>: Kill Errors.
-* backward-kill-word: Killing.
-* backward-list: Lists.
-* backward-page: Pages.
-* backward-paragraph: Paragraphs.
-* backward-sentence: Sentences.
-* backward-sexp: Lists.
-* backward-text-line: Nroff Mode.
-* backward-up-list: Lists.
-* backward-word: Words.
-* batch-byte-compile: Compiling Libraries.
-* beginning-of-buffer: Basic.
-* beginning-of-defun: Defuns.
-* beginning-of-fortran-subprogram: Fortran Motion.
-* beginning-of-line: Basic.
-* bookmark-delete: Bookmarks.
-* bookmark-insert: Bookmarks.
-* bookmark-insert-location: Bookmarks.
-* bookmark-jump: Bookmarks.
-* bookmark-load: Bookmarks.
-* bookmark-save: Bookmarks.
-* bookmark-set: Bookmarks.
-* bookmark-write: Bookmarks.
-* buffer-menu: Several Buffers.
-* byte-compile-and-load-file: Compiling Libraries.
-* byte-compile-buffer: Compiling Libraries.
-* byte-compile-file: Compiling Libraries.
-* byte-recompile-directory: Compiling Libraries.
-* c-indent-line: Basic Indent.
-* calendar: Calendar/Diary.
-* calendar-backward-day: Calendar Unit Motion.
-* calendar-backward-month: Calendar Unit Motion.
-* calendar-backward-week: Calendar Unit Motion.
-* calendar-beginning-of-month: Move to Beginning or End.
-* calendar-beginning-of-week: Move to Beginning or End.
-* calendar-beginning-of-year: Move to Beginning or End.
-* calendar-count-days-region: Mark and Region.
-* calendar-cursor-holidays: Holidays.
-* calendar-end-of-month: Move to Beginning or End.
-* calendar-end-of-week: Move to Beginning or End.
-* calendar-end-of-year: Move to Beginning or End.
-* calendar-exchange-point-and-mark: Mark and Region.
-* calendar-forward-day: Calendar Unit Motion.
-* calendar-forward-month: Calendar Unit Motion.
-* calendar-forward-week: Calendar Unit Motion.
-* calendar-forward-year: Calendar Unit Motion.
-* calendar-goto-astro-day-number: From Other Calendar.
-* calendar-goto-chinese-date: From Other Calendar.
-* calendar-goto-coptic-date: From Other Calendar.
-* calendar-goto-date: Specified Dates.
-* calendar-goto-ethiopic-date: From Other Calendar.
-* calendar-goto-french-date: From Other Calendar.
-* calendar-goto-hebrew-date: From Other Calendar.
-* calendar-goto-islamic-date: From Other Calendar.
-* calendar-goto-iso-date: From Other Calendar.
-* calendar-goto-julian-date: From Other Calendar.
-* calendar-goto-mayan-long-count-date: Mayan Calendar.
-* calendar-goto-persian-date: From Other Calendar.
-* calendar-goto-today: Specified Dates.
-* calendar-mark-today: Calendar Customizing.
-* calendar-next-calendar-round-date: Mayan Calendar.
-* calendar-next-haab-date: Mayan Calendar.
-* calendar-next-tzolkin-date: Mayan Calendar.
-* calendar-other-month: Specified Dates.
-* calendar-phases-of-moon: Lunar Phases.
-* calendar-previous-haab-date: Mayan Calendar.
-* calendar-previous-tzolkin-date: Mayan Calendar.
-* calendar-print-astro-day-number: To Other Calendar.
-* calendar-print-chinese-date: To Other Calendar.
-* calendar-print-coptic-date: To Other Calendar.
-* calendar-print-day-of-year: General Calendar.
-* calendar-print-ethiopic-date: To Other Calendar.
-* calendar-print-french-date: To Other Calendar.
-* calendar-print-hebrew-date: To Other Calendar.
-* calendar-print-islamic-date: To Other Calendar.
-* calendar-print-iso-date: To Other Calendar.
-* calendar-print-julian-date: To Other Calendar.
-* calendar-print-mayan-date: To Other Calendar.
-* calendar-print-persian-date: To Other Calendar.
-* calendar-set-mark: Mark and Region.
-* calendar-star-date: Calendar Customizing.
-* calendar-sunrise-sunset: Sunrise/Sunset.
-* calendar-unmark <1>: Diary Commands.
-* calendar-unmark: Holidays.
-* call-last-kbd-macro: Basic Kbd Macro.
-* cancel-debug-on-entry: Lisp Debug.
-* capitalize-word <1>: Case.
-* capitalize-word: Fixing Case.
-* center-line: Fill Commands.
-* choose-completion: Completion Commands.
-* clear-rectangle: Rectangles.
-* comint-delchar-or-maybe-eof: Shell Mode.
-* comint-dynamic-complete: Shell Mode.
-* comint-next-input: Shell Mode.
-* comint-previous-input: Shell Mode.
-* command-apropos: Help.
-* compare-windows <1>: Other Window.
-* compare-windows: Comparing Files.
-* compile: Compilation.
-* compile-defun: Defuns.
-* convert-mocklisp-buffer: Mocklisp.
-* conx: CONX.
-* conx-buffer: CONX.
-* conx-init: CONX.
-* conx-load: CONX.
-* conx-region: CONX.
-* conx-save: CONX.
-* copy-file: Misc File Ops.
-* copy-last-shell-input: Shell Mode.
-* copy-rectangle-to-register: RegRect.
-* copy-region-as-kill: Kill Ring.
-* copy-to-buffer: Accumulating Text.
-* copy-to-register: RegText.
-* count-lines-page: Pages.
-* count-lines-region: Position Info.
-* count-matches: Other Repeating Search.
-* count-text-lines: Nroff Mode.
-* customize: Easy Customization.
-* customize-apropos: Specific Customization.
-* customize-browse: Customization Groups.
-* customize-customized: Specific Customization.
-* customize-face: Specific Customization.
-* customize-group: Specific Customization.
-* customize-option: Specific Customization.
-* customize-saved: Specific Customization.
-* dabbrev-expand: Dynamic Abbrevs.
-* debug: Lisp Debug.
-* debug-on-entry: Lisp Debug.
-* default-value: Locals.
-* define-abbrevs: Saving Abbrevs.
-* define-key <1>: Programmatic Rebinding.
-* define-key: Interactive Rebinding.
-* delete-backward-char <1>: Kill Errors.
-* delete-backward-char <2>: Killing.
-* delete-backward-char: Basic.
-* delete-blank-lines <1>: Killing.
-* delete-blank-lines: Blank Lines.
-* delete-char <1>: Basic Picture.
-* delete-char: Killing.
-* delete-file: Misc File Ops.
-* delete-horizontal-space <1>: Indentation Commands.
-* delete-horizontal-space: Killing.
-* delete-indentation <1>: Indentation Commands.
-* delete-indentation: Killing.
-* delete-matching-lines: Other Repeating Search.
-* delete-menu-item: Menu Customization.
-* delete-non-matching-lines: Other Repeating Search.
-* delete-other-windows: Change Window.
-* delete-rectangle: Rectangles.
-* delete-window: Change Window.
-* describe-bindings: Help.
-* describe-calendar-mode: General Calendar.
-* describe-coding-system: Coding Systems.
-* describe-copying: Help.
-* describe-distribution: Help.
-* describe-function <1>: Documentation.
-* describe-function: Help.
-* describe-input-method: Select Input Method.
-* describe-key: Help.
-* describe-key-briefly: Help.
-* describe-language-environment: Language Environments.
-* describe-mode: Help.
-* describe-no-warranty: Help.
-* describe-syntax: Syntax Change.
-* describe-variable <1>: Examining.
-* describe-variable <2>: Documentation.
-* describe-variable: Help.
-* diary: Diary Commands.
-* 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>: 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.
-* diary-hebrew-date: Sexp Diary Entries.
-* diary-islamic-date: Sexp Diary Entries.
-* diary-iso-date: Sexp Diary Entries.
-* diary-julian-date: Sexp Diary Entries.
-* diary-mail-entries: Diary Commands.
-* diary-mayan-date: Sexp Diary Entries.
-* diary-omer: Sexp Diary Entries.
-* diary-parasha: Sexp Diary Entries.
-* diary-phases-of-moon: Sexp Diary Entries.
-* diary-rosh-hodesh: Sexp Diary Entries.
-* diary-sabbath-candles: Sexp Diary Entries.
-* diary-sunrise-sunset: Sexp Diary Entries.
-* diary-yahrzeit: Sexp Diary Entries.
-* diff: Comparing Files.
-* diff-backup: Comparing Files.
-* digit-argument: Arguments.
-* dired: Dired Enter.
-* dired-other-window <1>: Pop Up Window.
-* dired-other-window: Dired Enter.
-* disable-command: Disabling.
-* disable-menu-item: Menu Customization.
-* disassemble: Compiling Libraries.
-* display-time: Mode Line.
-* dissociated-press: Dissociated Press.
-* do-auto-save: Auto Save Control.
-* doctor: Total Frustration.
-* down-list: Lists.
-* downcase-region: Case.
-* downcase-word <1>: Case.
-* downcase-word: Fixing Case.
-* edit-abbrevs: Editing Abbrevs.
-* edit-abbrevs-redefine: Editing Abbrevs.
-* edit-options: Edit Options.
-* edit-picture: Picture.
-* edit-tab-stops <1>: Text Mode.
-* edit-tab-stops: Tab Stops.
-* edit-tab-stops-note-changes: Tab Stops.
-* edt-emulation-off: Emulation.
-* edt-emulation-on: Emulation.
-* electric-nroff-mode: Nroff Mode.
-* emacs-lisp-mode: Lisp Eval.
-* emacs-version: Bugs.
-* enable-command: Disabling.
-* enable-menu-item: Menu Customization.
-* end-kbd-macro: Basic Kbd Macro.
-* end-of-buffer: Basic.
-* end-of-defun: Defuns.
-* end-of-fortran-subprogram: Fortran Motion.
-* end-of-line: Basic.
-* enlarge-window: Change Window.
-* enlarge-window-horizontally: Change Window.
-* european-calendar: Date Formats.
-* eval-current-buffer: Lisp Eval.
-* eval-defun: Lisp Eval.
-* eval-expression: Lisp Eval.
-* eval-last-sexp: Lisp Eval.
-* eval-region: Lisp Eval.
-* exchange-point-and-mark: Setting Mark.
-* execute-extended-command: M-x.
-* exit-calendar: General Calendar.
-* exit-recursive-edit: Recursive Edit.
-* expand-abbrev: Expanding Abbrevs.
-* expand-region-abbrevs: Expanding Abbrevs.
-* fancy-diary-display: Fancy Diary Display.
-* fill-individual-paragraphs: Fill Prefix.
-* fill-paragraph: Fill Commands.
-* fill-region: Fill Commands.
-* fill-region-as-paragraph: Fill Commands.
-* find-alternate-file: Visiting.
-* find-file: 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.
-* find-tag-other-window <1>: Find Tag.
-* find-tag-other-window: Pop Up Window.
-* find-this-file: Visiting.
-* find-this-file-other-window: Visiting.
-* fortran-column-ruler: Fortran Columns.
-* fortran-comment-region: Fortran Comments.
-* fortran-indent-line: ForIndent Commands.
-* fortran-indent-subprogram: ForIndent Commands.
-* fortran-mode: Fortran.
-* fortran-next-statement: Fortran Motion.
-* fortran-previous-statement: Fortran Motion.
-* fortran-split-line: ForIndent Commands.
-* fortran-window-create: Fortran Columns.
-* forward-char: Basic.
-* forward-list: Lists.
-* forward-page: Pages.
-* forward-paragraph: Paragraphs.
-* forward-sentence: Sentences.
-* forward-sexp: Lists.
-* forward-text-line: Nroff Mode.
-* forward-word: Words.
-* frame-configuration-to-register: RegConfig.
-* global-set-key <1>: Programmatic Rebinding.
-* global-set-key: Interactive Rebinding.
-* goto-char: Basic.
-* goto-line: Basic.
-* hanoi: Amusements.
-* help-with-tutorial <1>: Help.
-* help-with-tutorial: Basic.
-* hide-body: Outline Visibility.
-* hide-entry: Outline Visibility.
-* hide-leaves: Outline Visibility.
-* hide-subtree: Outline Visibility.
-* holidays: Holidays.
-* include-other-diary-files: Included Diary Files.
-* increment-register: RegNumbers.
-* indent-c-exp: Multi-line Indent.
-* indent-for-comment: Comments.
-* indent-new-comment-line: Comments.
-* indent-region <1>: Multi-line Indent.
-* indent-region: Indentation Commands.
-* indent-relative: Indentation Commands.
-* indent-rigidly: Indentation Commands.
-* indent-sexp: Multi-line Indent.
-* indented-text-mode: Text Mode.
-* info: Help.
-* insert-abbrevs: Saving Abbrevs.
-* insert-anniversary-diary-entry: Special Diary Entries.
-* insert-block-diary-entry: Special Diary Entries.
-* insert-cyclic-diary-entry: Special Diary Entries.
-* insert-diary-entry: Adding to Diary.
-* insert-file: Misc File Ops.
-* insert-hebrew-diary-entry: Hebrew/Islamic Entries.
-* insert-islamic-diary-entry: Hebrew/Islamic Entries.
-* insert-kbd-macro: Save Kbd Macro.
-* insert-monthly-diary-entry: Adding to Diary.
-* insert-monthly-hebrew-diary-entry: Hebrew/Islamic Entries.
-* insert-monthly-islamic-diary-entry: Hebrew/Islamic Entries.
-* insert-parentheses: Balanced Editing.
-* insert-register: RegText.
-* insert-weekly-diary-entry: Adding to Diary.
-* insert-yearly-diary-entry: Adding to Diary.
-* insert-yearly-hebrew-diary-entry: Hebrew/Islamic Entries.
-* insert-yearly-islamic-diary-entry: Hebrew/Islamic Entries.
-* interactive: M-x.
-* interrupt-shell-subjob: Shell Mode.
-* inverse-add-global-abbrev: Defining Abbrevs.
-* inverse-add-mode-abbrev: Defining Abbrevs.
-* invert-face: Faces.
-* isearch-abort: Incremental Search.
-* isearch-backward: Incremental Search.
-* isearch-backward-regexp: Regexp Search.
-* isearch-complete: Incremental Search.
-* isearch-delete-char: Incremental Search.
-* isearch-exit: Incremental Search.
-* isearch-forward: Incremental Search.
-* isearch-forward-regexp: Regexp Search.
-* isearch-quote-char: Incremental Search.
-* isearch-repeat-backward: Incremental Search.
-* isearch-repeat-forward: Incremental Search.
-* isearch-ring-advance: Incremental Search.
-* isearch-ring-retreat: Incremental Search.
-* isearch-yank-line: Incremental Search.
-* isearch-yank-word: Incremental Search.
-* jump-to-register <1>: Split Window.
-* jump-to-register: RegPos.
-* just-one-space: Killing.
-* kbd-macro-query: Kbd Macro Query.
-* kill-all-abbrevs: Defining Abbrevs.
-* kill-buffer: Kill Buffer.
-* kill-comment: Comments.
-* kill-compilation: Compilation.
-* kill-line: Killing.
-* kill-local-variable: Locals.
-* kill-output-from-shell: Shell Mode.
-* kill-rectangle: Rectangles.
-* kill-region: Killing.
-* kill-sentence <1>: Sentences.
-* kill-sentence: Killing.
-* kill-sexp <1>: Lists.
-* kill-sexp: Killing.
-* kill-some-buffers: Kill Buffer.
-* kill-word <1>: Words.
-* kill-word: Killing.
-* latex-mode: TeX Mode.
-* LaTeX-mode: TeX Mode.
-* lisp-complete-symbol: Lisp Completion.
-* lisp-indent-line: Basic Indent.
-* lisp-interaction-mode: Lisp Interaction.
-* lisp-mode: External Lisp.
-* lisp-send-defun: External Lisp.
-* list-abbrevs: Editing Abbrevs.
-* list-bookmarks: Bookmarks.
-* list-buffers: List Buffers.
-* list-calendar-holidays: Holidays.
-* list-coding-systems: Coding Systems.
-* list-command-history: Repetition.
-* list-directory: ListDir.
-* list-hebrew-diary-entries: Hebrew/Islamic Entries.
-* list-holidays: Holidays.
-* list-input-methods: Select Input Method.
-* list-islamic-diary-entries: Hebrew/Islamic Entries.
-* list-matching-lines: Other Repeating Search.
-* list-options: Edit Options.
-* list-tags: List Tags.
-* list-yahrzeit-dates: From Other Calendar.
-* load: Loading.
-* load-default-sounds: Audible Bell.
-* load-file: Loading.
-* load-library <1>: Loading.
-* load-library: Startup Paths.
-* load-sound-file: Audible Bell.
-* local-set-key: Interactive Rebinding.
-* local-unset-key: Interactive Rebinding.
-* locate-library: Loading.
-* lpr-buffer: Hardcopy.
-* lpr-region: Hardcopy.
-* mail: Sending Mail.
-* mail-cc: Mail Mode.
-* mail-fill-yanked-message: Mail Mode.
-* mail-interactive-insert-alias: Mail Headers.
-* 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.
-* mail-subject: Mail Mode.
-* mail-to: Mail Mode.
-* mail-yank-original: Mail Mode.
-* make-directory: File Names.
-* make-face-bold: Faces.
-* make-face-bold-italic: Faces.
-* make-face-italic: Faces.
-* make-face-larger: Faces.
-* make-face-smaller: Faces.
-* make-face-unbold: Faces.
-* make-face-unitalic: Faces.
-* make-frame: XEmacs under X.
-* make-local-variable: Locals.
-* make-obsolete: Compiling Libraries.
-* make-symbolic-link: Misc File Ops.
-* make-variable-buffer-local: Locals.
-* manual-entry: Documentation.
-* mark-beginning-of-buffer: Setting Mark.
-* mark-calendar-holidays: Holidays.
-* mark-defun <1>: Defuns.
-* mark-defun: Marking Objects.
-* mark-diary-entries: Diary Commands.
-* mark-end-of-buffer: Setting Mark.
-* mark-fortran-subprogram: Fortran Motion.
-* mark-hebrew-diary-entries: Hebrew/Islamic Entries.
-* mark-included-diary-files: Included Diary Files.
-* mark-islamic-diary-entries: Hebrew/Islamic Entries.
-* mark-page <1>: Pages.
-* mark-page: Marking Objects.
-* mark-paragraph <1>: Paragraphs.
-* mark-paragraph: Marking Objects.
-* mark-sexp <1>: Lists.
-* mark-sexp: Marking Objects.
-* mark-whole-buffer: Marking Objects.
-* mark-word <1>: Words.
-* mark-word: Marking Objects.
-* minibuffer-complete: Completion Example.
-* minibuffer-complete-word: Completion Commands.
-* modify-syntax-entry: Syntax Change.
-* mouse-choose-completion: Completion Commands.
-* mouse-del-char: Additional Mouse Operations.
-* mouse-delete-window: Additional Mouse Operations.
-* mouse-keep-one-window: Additional Mouse Operations.
-* mouse-kill-line: Additional Mouse Operations.
-* mouse-line-length: Additional Mouse Operations.
-* mouse-scroll: Additional Mouse Operations.
-* mouse-select: Additional Mouse Operations.
-* mouse-select-and-split: Additional Mouse Operations.
-* mouse-set-mark: Additional Mouse Operations.
-* mouse-set-point: Additional Mouse Operations.
-* mouse-track: Additional Mouse Operations.
-* mouse-track-adjust: Additional Mouse Operations.
-* mouse-track-and-copy-to-cutbuffer: Additional Mouse Operations.
-* mouse-track-delete-and-insert: Additional Mouse Operations.
-* move-over-close-and-reindent: Balanced Editing.
-* move-to-window-line: Basic.
-* name-last-kbd-macro: Save Kbd Macro.
-* narrow-to-region: Narrowing.
-* negative-argument: Arguments.
-* newline: Basic.
-* newline-and-indent: Basic Indent.
-* next-complex-command: Repetition.
-* next-error: Compilation.
-* next-history-element: Minibuffer History.
-* next-line: Basic.
-* next-list-mode-item: Completion Commands.
-* next-matching-history-element: Minibuffer History.
-* not-modified: Saving.
-* nroff-mode: Nroff Mode.
-* number-to-register: RegNumbers.
-* occur: Other Repeating Search.
-* open-dribble-file: Bugs.
-* open-line: Blank Lines.
-* open-rectangle: Rectangles.
-* open-termscript: Bugs.
-* other-window: Other Window.
-* other-window-any-frame: Other Window.
-* outline-backward-same-level: Outline Motion.
-* outline-forward-same-level: Outline Motion.
-* outline-next-visible-heading: Outline Motion.
-* outline-previous-visible-heading: Outline Motion.
-* outline-up-heading: Outline Motion.
-* overwrite-mode: Minor Modes.
-* phases-of-moon: Lunar Phases.
-* picture-backward-clear-column: Basic Picture.
-* picture-backward-column: Basic Picture.
-* picture-clear-column: Basic Picture.
-* picture-clear-line: Basic Picture.
-* picture-clear-rectangle: Rectangles in Picture.
-* picture-clear-rectangle-to-register: Rectangles in Picture.
-* picture-forward-column: Basic Picture.
-* picture-motion: Insert in Picture.
-* picture-motion-reverse: Insert in Picture.
-* picture-move-down: Basic Picture.
-* picture-move-up: Basic Picture.
-* picture-movement-down: Insert in Picture.
-* picture-movement-left: Insert in Picture.
-* picture-movement-ne: Insert in Picture.
-* picture-movement-nw: Insert in Picture.
-* picture-movement-right: Insert in Picture.
-* picture-movement-se: Insert in Picture.
-* picture-movement-sw: Insert in Picture.
-* picture-movement-up: Insert in Picture.
-* picture-newline: Basic Picture.
-* picture-open-line: Basic Picture.
-* picture-set-tab-stops: Tabs in Picture.
-* picture-tab: Tabs in Picture.
-* 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.
-* play-sound: Audible Bell.
-* point-to-register: RegPos.
-* prefer-coding-system: Recognize Coding.
-* prepend-to-buffer: Accumulating Text.
-* previous-complex-command: Repetition.
-* previous-history-element: Minibuffer History.
-* previous-line: Basic.
-* previous-list-mode-item: Completion Commands.
-* previous-matching-history-element: Minibuffer History.
-* print-buffer: Hardcopy.
-* print-diary-entries <1>: Diary Customizing.
-* print-diary-entries: Diary Commands.
-* print-region: Hardcopy.
-* quail-set-keyboard-layout: Select Input Method.
-* query-replace: Query Replace.
-* query-replace-regexp: Query Replace.
-* quietly-read-abbrev-file: Saving Abbrevs.
-* quit-shell-subjob: Shell Mode.
-* quoted-insert: Basic.
-* re-search-backward: Regexp Search.
-* re-search-forward: Regexp Search.
-* read-abbrev-file: Saving Abbrevs.
-* read-key-sequence: Representing Keystrokes.
-* recenter <1>: Scrolling.
-* recenter: Basic.
-* recover-file: Recover.
-* redraw-calendar: General Calendar.
-* relabel-menu-item: Menu Customization.
-* remove-directory: File Names.
-* rename-buffer: Misc Buffer.
-* rename-file: Misc File Ops.
-* repeat-complex-command: Repetition.
-* replace-regexp: Unconditional Replace.
-* replace-string: Unconditional Replace.
-* revert-buffer: Reverting.
-* run-lisp: External Lisp.
-* save-buffer: Saving.
-* save-buffers-kill-emacs: Exiting.
-* save-some-buffers: Saving.
-* scroll-calendar-left: Scroll Calendar.
-* scroll-calendar-left-three-months: Scroll Calendar.
-* scroll-calendar-right: Scroll Calendar.
-* scroll-calendar-right-three-months: Scroll Calendar.
-* scroll-down: Scrolling.
-* scroll-left: Horizontal Scrolling.
-* scroll-other-window <1>: General Calendar.
-* scroll-other-window: Other Window.
-* scroll-right: Horizontal Scrolling.
-* scroll-up: Scrolling.
-* search-backward: Non-Incremental Search.
-* search-forward: Non-Incremental Search.
-* select-input-method: Select Input Method.
-* self-insert: Basic.
-* send-shell-input: Shell Mode.
-* set-buffer-file-coding-system: Specify Coding.
-* set-buffer-process-coding-system: Specify Coding.
-* set-comment-column: Comments.
-* set-default-file-modes: Interlocking.
-* set-face-background: Faces.
-* set-face-background-pixmap: Faces.
-* set-face-font: Faces.
-* set-face-foreground: Faces.
-* set-face-underline-p: Faces.
-* set-fill-column: Fill Commands.
-* set-fill-prefix: Fill Prefix.
-* set-gnu-bindings: Emulation.
-* set-goal-column: Basic.
-* set-gosmacs-bindings: Emulation.
-* set-keyboard-coding-system: Specify Coding.
-* set-language-environment: Language Environments.
-* set-mark-command: Setting Mark.
-* set-selective-display: Selective Display.
-* set-terminal-coding-system: Specify Coding.
-* set-variable: Examining.
-* set-visited-file-name: Saving.
-* setq-default: Locals.
-* shell: Interactive Shell.
-* shell-command: Single Shell.
-* shell-command-on-region: Single Shell.
-* shell-send-eof: Shell Mode.
-* show-all: Outline Visibility.
-* show-all-diary-entries: Diary Commands.
-* show-branches: Outline Visibility.
-* show-children: Outline Visibility.
-* show-entry: Outline Visibility.
-* show-output-from-shell: Shell Mode.
-* show-subtree: Outline Visibility.
-* simple-diary-display: Fancy Diary Display.
-* sort-columns: Sorting.
-* sort-diary-entries: Fancy Diary Display.
-* sort-fields: Sorting.
-* sort-lines: Sorting.
-* sort-numeric-fields: Sorting.
-* sort-pages: Sorting.
-* sort-paragraphs: Sorting.
-* spell-buffer: Spelling.
-* spell-region: Spelling.
-* spell-string: Spelling.
-* spell-word: Spelling.
-* split-line: Indentation Commands.
-* split-window-horizontally: Split Window.
-* split-window-vertically: Split Window.
-* start-kbd-macro: Basic Kbd Macro.
-* stop-shell-subjob: Shell Mode.
-* substitute-key-definition: Interactive Rebinding.
-* sunrise-sunset: Sunrise/Sunset.
-* suspend-emacs: Exiting.
-* switch-to-buffer: Select Buffer.
-* 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>: Text Mode.
-* tab-to-tab-stop: Tab Stops.
-* tabify: Just Spaces.
-* tags-apropos: List Tags.
-* tags-loop-continue: Tags Search.
-* tags-query-replace: Tags Search.
-* tags-search: Tags Search.
-* term: Terminal emulator.
-* term-line-mode: Term Mode.
-* term-pager-toggle: Paging in Term.
-* tex-buffer: TeX Print.
-* tex-close-latex-block: TeX Editing.
-* tex-insert-braces: TeX Editing.
-* tex-insert-quote: TeX Editing.
-* tex-kill-job: TeX Print.
-* tex-mode: TeX Mode.
-* TeX-mode: TeX Mode.
-* tex-print: TeX Print.
-* tex-recenter-output-buffer: TeX Print.
-* tex-region: TeX Print.
-* tex-show-print-queue: TeX Print.
-* tex-terminate-paragraph: TeX Editing.
-* text-mode: Text Mode.
-* toggle-input-method: Select Input Method.
-* toggle-read-only: Misc Buffer.
-* 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>: Words.
-* transpose-words: Transpose.
-* undo: Undo.
-* unexpand-abbrev: Expanding Abbrevs.
-* universal-argument: Arguments.
-* universal-coding-system-argument: Specify Coding.
-* untabify: Just Spaces.
-* up-list: TeX Editing.
-* upcase-region: 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.
-* vc-diff: Old Versions.
-* vc-directory: VC Status.
-* vc-insert-headers: Version Headers.
-* vc-next-action: Editing with VC.
-* vc-print-log: VC Status.
-* vc-register: Editing with VC.
-* vc-rename-file: Renaming and VC.
-* vc-retrieve-snapshot: Making Snapshots.
-* vc-revert-buffer: Editing with VC.
-* vc-update-change-log: Change Logs and VC.
-* vc-version-other-window: Old Versions.
-* view-buffer: Misc Buffer.
-* view-diary-entries: Diary Commands.
-* view-emacs-news: Help.
-* view-file: Misc File Ops.
-* view-hello-file: Mule Intro.
-* view-lossage: Help.
-* view-register: Registers.
-* visit-tags-table: Select Tags Table.
-* what-cursor-position: Position Info.
-* what-line: Position Info.
-* what-page: Position Info.
-* where-is: Help.
-* widen: Narrowing.
-* widget-backward: Changing an Option.
-* widget-complete: Changing an Option.
-* widget-forward: Changing an Option.
-* window-configuration-to-register <1>: Split Window.
-* window-configuration-to-register: RegConfig.
-* word-search-backward: Word Search.
-* word-search-forward: Word Search.
-* write-abbrev-file: Saving Abbrevs.
-* write-file: Saving.
-* x-copy-primary-selection: X Selection Commands.
-* x-create-frame: X Resources.
-* x-delete-primary-selection: X Selection Commands.
-* x-insert-selection: X Selection Commands.
-* x-kill-primary-selection: X Selection Commands.
-* x-mouse-kill: X Selection Commands.
-* x-own-secondary-selection: X Selection Commands.
-* x-own-selection: X Selection Commands.
-* x-set-point-and-insert-selection: X Selection Commands.
-* Yank: Kill Ring.
-* yank-pop: Earlier Kills.
-* yank-rectangle: Rectangles.
-* yow: Amusements.
-* zap-to-char: Killing.
-* zmacs-activate-region: Active Regions.
-* zmacs-deactivate-region: Active Regions.
+* ! (query-replace): Query Replace.
+* " (TeX mode): TeX Editing.
+* , (query-replace): Query Replace.
+* . (Calendar mode): Specified Dates.
+* . (query-replace): Query Replace.
+* ? (Calendar mode): General Calendar.
+* ^ (query-replace): Query Replace.
+* a (Calendar mode): Holidays.
+* button1: Intro to Keystrokes.
+* button1up: Intro to Keystrokes.
+* button2: Intro to Keystrokes.
+* button2up: Intro to Keystrokes.
+* button3: Intro to Keystrokes.
+* button3up: Intro to Keystrokes.
+* C-<: Setting Mark.
+* C->: Setting Mark.
+* C-@ (Calendar mode): Mark and Region.
+* C-\: Select Input Method.
+* C-] <1>: Quitting.
+* C-]: Recursive Edit.
+* C-_: Undo.
+* C-a: Basic.
+* C-a (Calendar mode): Move to Beginning or End.
+* C-b: Basic.
+* C-b (Calendar mode): Calendar Unit Motion.
+* C-c: Key Sequences.
+* C-c ' (Picture mode): Insert in Picture.
+* C-c . (Picture mode): Insert in Picture.
+* C-c / (Picture mode): Insert in Picture.
+* C-c ; (Fortran mode): Fortran Comments.
+* C-c < (Picture mode): Insert in Picture.
+* C-c > (Picture mode): Insert in Picture.
+* C-c \ (Picture mode): Insert in Picture.
+* C-c ^ (Picture mode): Insert in Picture.
+* C-c ` (Picture mode): Insert in Picture.
+* C-c C-\ (Shell mode): Shell Mode.
+* C-c C-b (Outline mode): Outline Motion.
+* C-c C-b (Picture mode): Insert in Picture.
+* C-c C-b (TeX mode): TeX Print.
+* C-c C-c (Edit Abbrevs): Editing Abbrevs.
+* C-c C-c (Edit Tab Stops): Tab Stops.
+* C-c C-c (Mail mode): Mail Mode.
+* C-c C-c (Occur mode): Other Repeating Search.
+* C-c C-c (Shell mode): Shell Mode.
+* C-c C-d (Picture mode): Basic Picture.
+* C-c C-d (Shell mode): Shell Mode.
+* C-c C-f (LaTeX mode): TeX Editing.
+* C-c C-f (Outline mode): Outline Motion.
+* C-c C-f (Picture mode): Insert in Picture.
+* C-c C-f C-c (Mail mode): Mail Mode.
+* C-c C-f C-s (Mail mode): Mail Mode.
+* C-c C-f C-t (Mail mode): Mail Mode.
+* C-c C-h (Outline mode): Outline Visibility.
+* C-c C-i (Outline mode): Outline Visibility.
+* C-c C-j (Term mode): Term Mode.
+* C-c C-k (Picture mode): Rectangles in Picture.
+* C-c C-k (Term mode): Term Mode.
+* C-c C-k (TeX mode): TeX Print.
+* C-c C-l (Calendar mode): General Calendar.
+* C-c C-l (TeX mode): TeX Print.
+* C-c C-n (Fortran mode): Fortran Motion.
+* C-c C-n (Outline mode): Outline Motion.
+* C-c C-o (Shell mode): Shell Mode.
+* C-c C-p (Fortran mode): Fortran Motion.
+* C-c C-p (Outline mode): Outline Motion.
+* C-c C-p (TeX mode): TeX Print.
+* C-c C-q (Mail mode): Mail Mode.
+* C-c C-q (Term mode): Paging in Term.
+* C-c C-q (TeX mode): TeX Print.
+* C-c C-r (Fortran mode): Fortran Columns.
+* C-c C-r (Shell mode): Shell Mode.
+* C-c C-r (TeX mode): TeX Print.
+* C-c C-s (Mail mode): Mail Mode.
+* C-c C-s (Outline mode): Outline Visibility.
+* C-c C-u (Outline mode): Outline Motion.
+* C-c C-u (Shell mode): Shell Mode.
+* C-c C-w (Fortran mode): Fortran Columns.
+* C-c C-w (Mail mode): Mail Mode.
+* C-c C-w (Picture mode): Rectangles in Picture.
+* C-c C-w (Shell mode): Shell Mode.
+* C-c C-x (Picture mode): Rectangles in Picture.
+* C-c C-y (Mail mode): Mail Mode.
+* C-c C-y (Picture mode): Rectangles in Picture.
+* C-c C-y (Shell mode): Shell Mode.
+* C-c C-z (Shell mode): Shell Mode.
+* C-c TAB (Picture mode): Tabs in Picture.
+* C-c { (TeX mode): TeX Editing.
+* C-c } (TeX mode): TeX Editing.
+* C-d: Killing.
+* C-d (Shell mode): Shell Mode.
+* C-e: Basic.
+* C-e (Calendar mode): Move to Beginning or End.
+* C-END: Basic.
+* C-f: Basic.
+* C-f (Calendar mode): Calendar Unit Motion.
+* C-g <1>: Quitting.
+* C-g: Minibuffer.
+* C-g (isearch-mode): Incremental Search.
+* C-h <1>: Help.
+* C-h: Key Sequences.
+* C-h A: Apropos.
+* C-h b: Misc Help.
+* C-h C: Coding Systems.
+* C-h c: Key Help.
+* C-h C-\: Select Input Method.
+* C-h C-c: Misc Help.
+* C-h C-d: Misc Help.
+* C-h C-f: Misc Help.
+* C-h C-h: Help.
+* C-h C-k: Misc Help.
+* C-h C-w: Misc Help.
+* C-h f: Documentation.
+* C-h F: Misc Help.
+* C-h f: Name Help.
+* C-h h: Mule Intro.
+* C-h I: Select Input Method.
+* C-h i: Misc Help.
+* C-h k: Key Help.
+* C-h L: Language Environments.
+* C-h l: Misc Help.
+* C-h m: Misc Help.
+* C-h n: Misc Help.
+* C-h p: Library Keywords.
+* C-h s: Syntax Change.
+* C-h t <1>: Misc Help.
+* C-h t: Basic.
+* C-h v <1>: Examining.
+* C-h v <2>: Documentation.
+* C-h v: Name Help.
+* C-h w: Name Help.
+* C-HOME: Basic.
+* C-k: Killing.
+* C-l <1>: Scrolling.
+* C-l: Basic.
+* C-l (query-replace): Query Replace.
+* C-LEFT: Basic.
+* 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-c: Recursive Edit.
+* C-M-d: Lists.
+* C-M-e: Defuns.
+* C-M-e (Fortran mode): Fortran Motion.
+* C-M-f: Lists.
+* C-M-h <1>: Defuns.
+* C-M-h: Marking Objects.
+* C-M-h (Fortran mode): Fortran Motion.
+* 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>: Lists.
+* C-M-t: Transpose.
+* C-M-u: Lists.
+* C-M-v <1>: Other Window.
+* C-M-v: Minibuffer Edit.
+* C-M-w: Appending Kills.
+* C-M-x <1>: External Lisp.
+* C-M-x: Lisp Eval.
+* C-n: Basic.
+* C-n (Calendar mode): Calendar Unit Motion.
+* C-o: Blank Lines.
+* C-p: Basic.
+* C-p (Calendar mode): Calendar Unit Motion.
+* C-q: Basic.
+* C-q (isearch-mode): Incremental Search.
+* C-r: Incremental Search.
+* C-r (isearch-mode): Incremental Search.
+* C-r (query-replace): Query Replace.
+* C-RIGHT: Basic.
+* C-s: Incremental Search.
+* C-s (isearch-mode): Incremental Search.
+* C-SPC: Setting Mark.
+* C-SPC (Calendar mode): Mark and Region.
+* C-t <1>: Transpose.
+* C-t: Basic.
+* C-u: Arguments.
+* C-u - C-x ;: Comments.
+* C-u C-@: Mark Ring.
+* C-u C-SPC: Mark Ring.
+* C-u C-x v v: Editing with VC.
+* C-u TAB: Multi-line Indent.
+* C-v <1>: Scrolling.
+* C-v: Basic.
+* C-v (Calendar mode): Scroll Calendar.
+* C-w: Killing.
+* C-w (isearch-mode): Incremental Search.
+* C-w (query-replace): Query Replace.
+* C-x: Key Sequences.
+* C-x $: Selective Display.
+* C-x (: Basic Kbd Macro.
+* C-x ): Basic Kbd Macro.
+* C-x .: Fill Prefix.
+* C-x 0: Change Window.
+* C-x 1: Change Window.
+* C-x 2: Split Window.
+* C-x 3: Split Window.
+* C-x 4: Pop Up Window.
+* C-x 4 .: Find Tag.
+* C-x 4 b: Select Buffer.
+* C-x 4 d: Dired Enter.
+* C-x 4 f: Visiting.
+* C-x 4 m: Sending Mail.
+* C-x 5 b: Select Buffer.
+* C-x 5 C-f: Visiting.
+* C-x ;: Comments.
+* C-x <: Horizontal Scrolling.
+* C-x < (Calendar mode): Scroll Calendar.
+* C-x =: Position Info.
+* C-x >: Horizontal Scrolling.
+* C-x > (Calendar mode): Scroll Calendar.
+* C-x [: Pages.
+* C-x [ (Calendar mode): Calendar Unit Motion.
+* C-x ]: Pages.
+* C-x ] (Calendar mode): Calendar Unit Motion.
+* C-x ^: Change Window.
+* C-x `: Compilation.
+* C-x a g: Defining Abbrevs.
+* C-x a i g: Defining Abbrevs.
+* C-x a i l: Defining Abbrevs.
+* C-x a l: Defining Abbrevs.
+* C-x b: Select Buffer.
+* C-x C-b: List Buffers.
+* C-x C-c: Exiting.
+* C-x C-d: ListDir.
+* C-x C-e: Lisp Eval.
+* C-x C-l: Case.
+* C-x C-o <1>: Killing.
+* C-x C-o: Blank Lines.
+* 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-x C-t: Transpose.
+* C-x C-u: Case.
+* C-x C-v: Visiting.
+* C-x C-w: Saving.
+* C-x C-x: Setting Mark.
+* C-x C-x (Calendar mode): Mark and Region.
+* C-x d: Dired Enter.
+* C-x DEL <1>: Sentences.
+* C-x DEL <2>: Kill Errors.
+* C-x DEL: Killing.
+* C-x e: Basic Kbd Macro.
+* C-x ESC ESC: Repetition.
+* C-x f: Fill Commands.
+* C-x h: Marking Objects.
+* C-x k: Kill Buffer.
+* C-x l: Pages.
+* C-x m: Sending Mail.
+* C-x n n: Narrowing.
+* C-x n w: Narrowing.
+* C-x o: Other Window.
+* C-x q: Kbd Macro Query.
+* C-x r +: RegNumbers.
+* C-x r b: Bookmarks.
+* C-x r g: RegText.
+* C-x r i: RegText.
+* C-x r j: RegPos.
+* C-x r l: Bookmarks.
+* C-x r m: Bookmarks.
+* C-x r n: RegNumbers.
+* C-x r r: RegRect.
+* C-x r s: RegText.
+* C-x r SPC: RegPos.
+* C-x r w: RegConfig.
+* C-x RET: Mule Intro.
+* C-x RET c: Specify Coding.
+* C-x RET C-\: Select Input Method.
+* C-x RET f: Specify Coding.
+* C-x RET k: Specify Coding.
+* C-x RET p: Specify Coding.
+* C-x RET t: Specify Coding.
+* C-x s: Saving.
+* C-x TAB: Indentation Commands.
+* C-x u: Undo.
+* C-x v =: Old Versions.
+* C-x v a: Change Logs and VC.
+* C-x v c: Editing with VC.
+* C-x v d: VC Status.
+* C-x v h: Version Headers.
+* C-x v i: Editing with VC.
+* C-x v l: VC Status.
+* C-x v r: Making Snapshots.
+* C-x v s: Making Snapshots.
+* C-x v u: Editing with VC.
+* C-x v ~: Old Versions.
+* C-x }: Change Window.
+* C-y: Kill Ring.
+* C-y (isearch-mode): Incremental Search.
+* C-z: Exiting.
+* control key: Intro to Keystrokes.
+* d (Calendar mode): Diary Commands.
+* DEL <1>: Program Modes.
+* DEL <2>: Major Modes.
+* DEL <3>: Kill Errors.
+* DEL <4>: Killing.
+* DEL: Basic.
+* DEL (isearch-mode): Incremental Search.
+* DEL (query-replace): Query Replace.
+* DOWN: Basic.
+* END: Basic.
+* ESC <1>: Meta Key.
+* ESC: Key Sequences.
+* ESC (query-replace): Query Replace.
+* F1: Help.
+* g CHAR (Calendar mode): From Other Calendar.
+* g d (Calendar mode): Specified Dates.
+* g m l (Calendar mode): Mayan Calendar.
+* h (Calendar mode): Holidays.
+* Help: Help.
+* HOME: Basic.
+* hyper key <1>: Super and Hyper Keys.
+* hyper key <2>: Representing Keystrokes.
+* 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 d (Calendar mode): Adding to Diary.
+* i m (Calendar mode): Adding to Diary.
+* i w (Calendar mode): Adding to Diary.
+* i y (Calendar mode): Adding to Diary.
+* LEFT: Basic.
+* LFD <1>: Basic Indent.
+* LFD <2>: Major Modes.
+* LFD: String Key Sequences.
+* LFD (TeX mode): TeX Editing.
+* m (Calendar mode): Diary Commands.
+* M (Calendar mode): Lunar Phases.
+* M-!: Single Shell.
+* M-$: Spelling.
+* M-%: Query Replace.
+* M-': Expanding Abbrevs.
+* M-(: Balanced Editing.
+* M-): Balanced Editing.
+* M-,: Tags Search.
+* M--: Arguments.
+* M-- M-c: Fixing Case.
+* M-- M-l: Fixing Case.
+* M-- M-u: Fixing Case.
+* M-.: Find Tag.
+* M-/: Dynamic Abbrevs.
+* M-1: Arguments.
+* M-;: Comments.
+* M-<: Basic.
+* M-< (Calendar mode): Move to Beginning or End.
+* M-=: Position Info.
+* M-= (Calendar mode): Mark and Region.
+* M->: Basic.
+* M-> (Calendar mode): Move to Beginning or End.
+* M-?: Nroff Mode.
+* M-@ <1>: Words.
+* M-@: Marking Objects.
+* M-[: Paragraphs.
+* M-\ <1>: Indentation Commands.
+* M-\: Killing.
+* M-]: Paragraphs.
+* M-^ <1>: Indentation Commands.
+* M-^: Killing.
+* M-a: Sentences.
+* M-a (Calendar mode): Move to Beginning or End.
+* M-b: Words.
+* M-c: Case.
+* M-C-s: Regexp Search.
+* M-d <1>: Words.
+* M-d: Killing.
+* M-DEL <1>: Words.
+* M-DEL <2>: Kill Errors.
+* M-DEL: Killing.
+* M-e: Sentences.
+* M-e (Calendar mode): Move to Beginning or End.
+* M-ESC: Lisp Eval.
+* M-f: Words.
+* M-g: Fill Commands.
+* M-h <1>: Paragraphs.
+* M-h: Marking Objects.
+* M-i: Tab Stops.
+* M-k <1>: Sentences.
+* M-k: Killing.
+* M-l: Case.
+* M-LFD: Comments.
+* M-LFD (Fortran mode): ForIndent Commands.
+* M-m: Indentation Commands.
+* M-n <1>: Nroff Mode.
+* M-n: Repetition.
+* M-n (isearch-mode): Incremental Search.
+* M-n (minibuffer history): Minibuffer History.
+* M-n (Shell mode): Shell Mode.
+* M-p <1>: Nroff Mode.
+* M-p: Repetition.
+* M-p (isearch-mode): Incremental Search.
+* M-p (minibuffer history): Minibuffer History.
+* M-p (Shell mode): Shell Mode.
+* M-q: Fill Commands.
+* M-r: Basic.
+* M-r (minibuffer history): Minibuffer History.
+* M-s: Fill Commands.
+* M-s (minibuffer history): Minibuffer History.
+* M-SPC: Killing.
+* 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>: Scrolling.
+* M-v: Basic.
+* M-v (Calendar mode): Scroll Calendar.
+* M-w: Kill Ring.
+* M-x: M-x.
+* M-y: Earlier Kills.
+* M-z: Killing.
+* M-{ (Calendar mode): Calendar Unit Motion.
+* M-|: Single Shell.
+* M-} (Calendar mode): Calendar Unit Motion.
+* M-~: Saving.
+* META: Meta Key.
+* meta key: Intro to Keystrokes.
+* next: Scrolling.
+* o (Calendar mode): Specified Dates.
+* p (Calendar mode): To Other Calendar.
+* p d (Calendar mode): General Calendar.
+* pgdn: Scrolling.
+* PGDN: Basic.
+* pgup: Scrolling.
+* PGUP: Basic.
+* prior: Scrolling.
+* q (Calendar mode): General Calendar.
+* RET: Basic.
+* RET (isearch-mode): Incremental Search.
+* RET (Shell mode): Shell Mode.
+* RIGHT: Basic.
+* s (Calendar mode): Diary Commands.
+* S (Calendar mode): Sunrise/Sunset.
+* S-TAB (customization buffer): Changing an Option.
+* shift key: Intro to Keystrokes.
+* SPC: Completion Commands.
+* SPC (Calendar mode): General Calendar.
+* SPC (query-replace): Query Replace.
+* super key <1>: Super and Hyper Keys.
+* super key <2>: Representing Keystrokes.
+* super key: Intro to Keystrokes.
+* t (Calendar mode): LaTeX Calendar.
+* TAB <1>: Basic Indent.
+* TAB <2>: Text Mode.
+* TAB <3>: Indentation.
+* TAB <4>: Major Modes.
+* TAB <5>: Completion Example.
+* TAB: String Key Sequences.
+* TAB (customization buffer): Changing an Option.
+* TAB (Shell mode): Shell Mode.
+* u (Calendar mode) <1>: Diary Commands.
+* u (Calendar mode): Holidays.
+* UP: Basic.
+* x (Calendar mode): Holidays.
translation approved by the author instead of in the original English.
\1f
-File: xemacs.info, Node: Variable Index, Next: Concept Index, Prev: Command Index, Up: Top
+File: xemacs.info, Node: Command Index, Next: Variable Index, Prev: Key Index, Up: Top
-Variable Index
-**************
+Command and Function Index
+**************************
* Menu:
-* abbrev-all-caps: Expanding Abbrevs.
-* abbrev-file-name: Saving Abbrevs.
+* abbrev-mode <1>: Minor Modes.
* abbrev-mode: Abbrevs.
-* after-load-alist: Loading.
-* after-save-hook: Saving.
-* all-christian-calendar-holidays: Holiday Customizing.
-* all-hebrew-calendar-holidays: Holiday Customizing.
-* all-islamic-calendar-holidays: Holiday Customizing.
-* appt-audible: Appt Customizing.
-* appt-display-duration: Appt Customizing.
-* appt-display-mode-line: Appt Customizing.
-* appt-message-warning-time: Appt Customizing.
-* appt-msg-window: Appt Customizing.
-* appt-visible: Appt Customizing.
-* auto-fill-inhibit-regexp: Fill Commands.
-* auto-lower-frame: XEmacs under X.
-* auto-mode-alist: Choosing Modes.
-* auto-raise-frame: XEmacs under X.
-* auto-save-default: Auto Save Control.
-* auto-save-interval: Auto Save Control.
-* auto-save-timeout: Auto Save Control.
-* auto-save-visited-file-name: Auto Save Files.
-* backup-by-copying: Backup Copying.
-* backup-by-copying-when-linked: Backup Copying.
-* backup-by-copying-when-mismatch: Backup Copying.
-* bell-volume: Audible Bell.
-* blink-matching-paren: Matching.
-* blink-matching-paren-distance: Matching.
-* bookmark-save-flag: Bookmarks.
-* bookmark-search-size: Bookmarks.
-* buffer-file-coding-system: Recognize Coding.
-* buffer-file-name: Visiting.
-* buffer-file-truename: Visiting.
-* buffer-read-only: Misc Buffer.
-* buffer-tag-table: Find Tag.
-* c-argdecl-indent: C Indent.
-* c-auto-newline: C Indent.
-* c-brace-imaginary-offset: C Indent.
-* c-brace-offset: C Indent.
-* c-continued-statement-offset: C Indent.
-* c-indent-level: C Indent.
-* c-label-offset: C Indent.
-* c-mode-hook: Program Modes.
-* c-mode-map: Keymaps.
-* c-tab-always-indent: C Indent.
-* calendar-date-display-form: Date Display Format.
-* calendar-daylight-savings-ends: Daylight Savings.
-* calendar-daylight-savings-ends-time: Daylight Savings.
-* calendar-daylight-savings-starts: Daylight Savings.
-* calendar-daylight-time-offset: Daylight Savings.
-* calendar-daylight-time-zone-name: Sunrise/Sunset.
-* calendar-holiday-marker: Calendar Customizing.
-* calendar-holidays: Holiday Customizing.
-* calendar-latitude: Sunrise/Sunset.
-* calendar-load-hook: Calendar Customizing.
-* calendar-location-name: Sunrise/Sunset.
-* calendar-longitude: Sunrise/Sunset.
-* calendar-standard-time-zone-name: Sunrise/Sunset.
-* calendar-time-display-form: Time Display Format.
-* calendar-time-zone: Sunrise/Sunset.
-* calendar-today-marker: Calendar Customizing.
-* calendar-week-start-day: Move to Beginning or End.
-* case-fold-search <1>: Replacement and Case.
-* case-fold-search: Search Case.
-* case-replace: Replacement and Case.
-* christian-holidays: Holiday Customizing.
-* coding: Recognize Coding.
-* command-history: Repetition.
-* command-line-args: Command Switches.
-* comment-column: Comments.
-* comment-end: Comments.
-* comment-indent-hook: Comments.
-* comment-line-start: Fortran Comments.
-* comment-line-start-skip: Fortran Comments.
-* comment-multi-line: Comments.
-* comment-start: Comments.
-* comment-start-skip: Comments.
-* compare-ignore-case: Comparing Files.
-* compile-command: Compilation.
-* completion-auto-help: Completion Options.
-* completion-ignored-extensions: Completion Options.
-* create-frame-hook: XEmacs under X.
-* ctl-arrow: Display Vars.
-* ctl-x-map: Keymaps.
-* current-input-method: Select Input Method.
-* data-directory: Startup Paths.
-* data-directory-list: Startup Paths.
-* debug-on-error: Lisp Debug.
-* debug-on-quit: Lisp Debug.
-* default-buffer-file-coding-system: Specify Coding.
-* default-directory: File Names.
-* default-directory-alist: File Names.
-* default-frame-alist: XEmacs under X.
-* default-input-method: Select Input Method.
-* default-major-mode: Choosing Modes.
-* delete-auto-save-files: Auto Save Files.
-* describe-function-show-arglist: Help.
-* diary-date-forms: Diary Customizing.
-* diary-display-hook: Fancy Diary Display.
-* diary-entry-marker: Calendar Customizing.
-* diary-file: Format of Diary File.
-* diary-list-include-blanks: Fancy Diary Display.
-* diary-mail-days: Diary Commands.
-* diff-switches: Comparing Files.
-* dired-kept-versions: Dired Deletion.
-* dired-listing-switches: Dired Enter.
-* display-buffer-function: Pop Up Window.
-* doc-directory: Startup Paths.
-* echo-keystrokes: Display Vars.
-* emacs-lisp-mode-hook: Program Modes.
-* emacs-roots: Startup Paths.
-* EMACSDATA: Startup Paths.
-* EMACSLOADPATH: Startup Paths.
-* EMACSLOCKDIR: Startup Paths.
-* EMACSPATH: Startup Paths.
-* enable-local-variables: File Variables.
-* enable-recursive-minibuffers: Minibuffer Edit.
-* esc-map: Keymaps.
-* european-calendar-style: Date Formats.
-* exec-directory: Startup Paths.
-* exec-path: Startup Paths.
-* explicit-shell-file-name: Interactive Shell.
-* file-coding-system-alist: Recognize Coding.
-* file-name-coding-system: Specify Coding.
-* fill-column: Fill Commands.
-* fill-prefix: Fill Prefix.
-* find-file-compare-truenames: Visiting.
-* find-file-hooks: Visiting.
-* find-file-not-found-hooks: Visiting.
-* find-file-run-dired: Visiting.
-* find-file-use-truenames: Visiting.
-* fortran-check-all-num-for-matching-do: ForIndent Vars.
-* fortran-comment-indent-char: Fortran Comments.
-* fortran-comment-indent-style: Fortran Comments.
-* fortran-comment-line-column: Fortran Comments.
-* fortran-comment-region: Fortran Comments.
-* fortran-continuation-char: ForIndent Conv.
-* fortran-continuation-indent: ForIndent Vars.
-* fortran-do-indent: ForIndent Vars.
-* fortran-electric-line-number: ForIndent Num.
-* fortran-if-indent: ForIndent Vars.
-* fortran-line-number-indent: ForIndent Num.
-* fortran-minimum-statement-indent: ForIndent Vars.
-* 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.
-* global-map: Keymaps.
-* hebrew-holidays: Holiday Customizing.
-* help-map: Keymaps.
-* holidays-in-diary-buffer: Diary Customizing.
-* indent-tabs-mode: Just Spaces.
-* Info-directory-list: Startup Paths.
-* INFOPATH: Startup Paths.
-* initial-calendar-window-hook: Calendar Customizing.
-* initial-major-mode: Entering Emacs.
-* input-method-highlight-flag: Input Methods.
-* input-method-verbose-flag: Input Methods.
-* input-ring-size: Interactive Shell.
-* insert-default-directory <1>: File Names.
-* insert-default-directory: Minibuffer File.
-* isearch-mode-map: Keymaps.
-* islamic-holidays: Holiday Customizing.
-* kept-new-versions: Backup Deletion.
-* kept-old-versions: Backup Deletion.
-* keyboard-translate-table: Intro to Keystrokes.
-* kill-ring-max: Earlier Kills.
-* LaTeX-mode-hook: TeX Print.
-* lisp-body-indention: Lisp Indent.
-* lisp-directory: Startup Paths.
-* lisp-indent-offset: Lisp Indent.
-* lisp-interaction-mode-hook: Program Modes.
-* lisp-mode-hook: Program Modes.
-* lisp-mode-map: Keymaps.
-* list-diary-entries-hook: Included Diary Files.
-* list-directory-brief-switches: ListDir.
-* list-directory-verbose-switches: ListDir.
-* load-path <1>: Loading.
-* load-path: Startup Paths.
-* local-holidays: Holiday Customizing.
-* lock-directory: Startup Paths.
-* lpr-switches: Hardcopy.
-* mail-abbrev-mailrc-file: Mail Headers.
-* mail-abbrev-mode-regexp: Mail Headers.
-* mail-alias-seperator-string: Mail Headers.
-* mail-archive-file-name: Mail Headers.
-* mail-header-separator: Mail Format.
-* mail-mode-hook: Mail Mode.
-* make-backup-files: Backup.
-* make-tags-files-invisible: Find Tag.
-* mark-diary-entries-hook: Included Diary Files.
-* mark-diary-entries-in-calendar: Calendar Customizing.
-* mark-holidays-in-calendar: Calendar Customizing.
-* mark-ring: Mark Ring.
-* mark-ring-max: Mark Ring.
-* meta-flag: Meta Key.
-* minibuffer-confirm-incomplete <1>: Completion Options.
-* minibuffer-confirm-incomplete: Minibuffer Edit.
-* minibuffer-local-completion-map: Keymaps.
-* minibuffer-local-map: Keymaps.
-* minibuffer-local-must-match-map: Keymaps.
-* minibuffer-local-ns-map: Keymaps.
-* mode-line-inverse-video: Mode Line.
-* modeline-pointer-glyph: Mouse Selection.
-* muddle-mode-hook: Program Modes.
-* next-screen-context-lines: Scrolling.
-* no-redraw-on-reenter: Display Vars.
-* nongregorian-diary-listing-hook: Hebrew/Islamic Entries.
-* nongregorian-diary-marking-hook: Hebrew/Islamic Entries.
-* nontext-pointer-glyph: Mouse Selection.
-* nroff-mode-hook: Nroff Mode.
-* number-of-diary-entries: Diary Customizing.
-* other-holidays: Holiday Customizing.
-* outline-mode-hook: Outline Mode.
-* outline-regexp: Outline Format.
-* page-delimiter: Pages.
-* paragraph-separate: Paragraphs.
-* paragraph-start: Paragraphs.
-* parse-sexp-ignore-comments: Syntax Entry.
-* PATH: Startup Paths.
-* picture-mode-hook: Picture.
-* picture-tab-chars: Tabs in Picture.
-* plain-TeX-mode-hook: TeX Print.
-* print-diary-entries-hook: Diary Customizing.
-* repeat-complex-command-map: Keymaps.
-* require-final-newline: Saving.
-* save-abbrevs: Saving Abbrevs.
-* scheme-mode-hook: Program Modes.
-* scroll-conservatively: Scrolling.
-* scroll-step: Scrolling.
-* search-slow-speed: Incremental Search.
-* search-slow-window-lines: Incremental Search.
-* selective-display-ellipses <1>: Outline Visibility.
-* selective-display-ellipses: Display Vars.
-* sentence-end: Sentences.
-* shell-cd-regexp: Interactive Shell.
-* shell-file-name: Single Shell.
-* shell-popd-regexp: Interactive Shell.
-* shell-prompt-pattern: Shell Mode.
-* shell-pushd-regexp: Interactive Shell.
-* sound-alist: Audible Bell.
-* superlock-file: Startup Paths.
-* tab-stop-list: Tab Stops.
-* tab-width: Display Vars.
-* tag-mark-stack-max: Find Tag.
-* tag-table-alist <1>: Find Tag.
-* tag-table-alist: Select Tags Table.
-* tags-always-build-completion-table: Select Tags Table.
-* tags-build-completion-table: Find Tag.
-* tags-file-name <1>: Find Tag.
-* tags-file-name: Select Tags Table.
-* term-file-prefix: Terminal Init.
-* term-setup-hook: Terminal Init.
-* TeX-mode-hook: TeX Print.
-* text-mode-hook: Text Mode.
-* text-pointer-glyph: Mouse Selection.
-* today-invisible-calendar-hook: Calendar Customizing.
-* today-visible-calendar-hook: Calendar Customizing.
-* track-eol: Basic.
-* trim-versions-without-asking: Backup Deletion.
-* truncate-lines: Continuation Lines.
-* truncate-partial-width-windows: Split Window.
-* vc-command-messages: Variables for Check-in/out.
-* vc-comment-alist: Version Headers.
-* vc-default-back-end: Editing with VC.
-* vc-header-alist: Version Headers.
-* vc-initial-comment: Editing with VC.
-* vc-keep-workfiles: Editing with VC.
-* vc-log-mode-hook: Log Entries.
-* vc-make-backup-files: Editing with VC.
-* vc-mistrust-permissions: Variables for Check-in/out.
-* vc-path: Variables for Check-in/out.
-* vc-static-header-alist: Version Headers.
-* vc-suppress-confirm: Variables for Check-in/out.
-* version-control: Backup Names.
-* view-calendar-holidays-initially: Calendar Customizing.
-* view-diary-entries-initially: Calendar Customizing.
-* window-min-height: Change Window.
-* window-min-width: Change Window.
-* write-file-hooks: Saving.
-* x-frame-defaults: XEmacs under X.
-* zmacs-region-stays: Active Regions.
-* zmacs-regions: Active Regions.
-
-\1f
-File: xemacs.info, Node: Concept Index, Next: Frame, Prev: Variable Index, Up: Top
-
-Concept Index
-*************
-
-* Menu:
-
-* .mailrc file: Mail Headers.
-* // in file name: Minibuffer File.
-* Abbrev mode: Minor Modes.
-* abbrevs: Abbrevs.
-* aborting: Quitting.
-* accumulating text: Accumulating Text.
-* active fields (customization buffer): Customization Groups.
-* active regions: Active Regions.
-* adding menu items: Menu Customization.
-* adding menus: Menu Customization.
-* againformation: Dissociated Press.
-* Apps menu <1>: Apps Menu.
-* Apps menu: Pull-down Menus.
-* apropos: Help.
-* architecture-specific directories: Startup Paths.
-* arguments (from shell): Command Switches.
-* ASCII: Intro to Keystrokes.
-* Asm mode: Asm Mode.
-* astronomical day numbers: Calendar Systems.
-* audible bell, changing: Audible Bell.
-* Auto Delete Selection menu item: Options Menu.
-* 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.
-* batch mode: Command Switches.
-* bell, changing: Audible Bell.
-* binary packages: Package Terminology.
-* binding: Commands.
-* blank lines <1>: Comments.
-* blank lines: Blank Lines.
-* body lines (Outline mode): Outline Format.
-* bold font: Face Customization.
-* bookmarks: Bookmarks.
-* boredom: Amusements.
-* buffer: Frame.
-* buffer menu: Several Buffers.
-* buffers: Buffers.
-* Buffers menu <1>: Buffers Menu.
-* Buffers menu: Pull-down Menus.
-* Buffers Menu Length... menu item: Options Menu.
-* Buffers Sub-Menus menu item: Options Menu.
-* buggestion: Dissociated Press.
-* bugs: Bugs.
-* byte code: Compiling Libraries.
-* C: Programs.
-* C mode: Program Modes.
+* abbrev-prefix-mark: Expanding Abbrevs.
+* 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.
+* add-menu-item: Menu Customization.
+* add-mode-abbrev: Defining Abbrevs.
+* add-name-to-file: Misc File Ops.
+* american-calendar: Date Formats.
+* append-next-kill: Appending Kills.
+* append-to-buffer: Accumulating Text.
+* append-to-file <1>: Misc File Ops.
+* append-to-file: Accumulating Text.
+* apropos: Apropos.
+* apropos-documentation: Apropos.
+* apropos-value: Apropos.
+* ask-user-about-lock: Interlocking.
+* auto-fill-mode <1>: Minor Modes.
+* auto-fill-mode: Auto Fill.
+* auto-save-mode: Auto Save Control.
+* back-to-indentation: Indentation Commands.
+* backward-char: Basic.
+* backward-delete-char-untabify: Program Modes.
+* backward-kill-sentence <1>: Sentences.
+* backward-kill-sentence <2>: Kill Errors.
+* backward-kill-sentence: Killing.
+* backward-kill-word <1>: Words.
+* backward-kill-word <2>: Kill Errors.
+* backward-kill-word: Killing.
+* backward-list: Lists.
+* backward-page: Pages.
+* backward-paragraph: Paragraphs.
+* backward-sentence: Sentences.
+* backward-sexp: Lists.
+* backward-text-line: Nroff Mode.
+* backward-up-list: Lists.
+* backward-word: Words.
+* batch-byte-compile: Compiling Libraries.
+* beginning-of-buffer: Basic.
+* beginning-of-defun: Defuns.
+* beginning-of-fortran-subprogram: Fortran Motion.
+* beginning-of-line: Basic.
+* bookmark-delete: Bookmarks.
+* bookmark-insert: Bookmarks.
+* bookmark-insert-location: Bookmarks.
+* bookmark-jump: Bookmarks.
+* bookmark-load: Bookmarks.
+* bookmark-save: Bookmarks.
+* bookmark-set: Bookmarks.
+* bookmark-write: Bookmarks.
+* buffer-menu: Several Buffers.
+* byte-compile-and-load-file: Compiling Libraries.
+* byte-compile-buffer: Compiling Libraries.
+* byte-compile-file: Compiling Libraries.
+* byte-recompile-directory: Compiling Libraries.
+* c-indent-line: Basic Indent.
* calendar: Calendar/Diary.
-* calendar and LaTeX: LaTeX Calendar.
-* calendar, first day of week: Move to Beginning or End.
-* candle lighting times: Sexp Diary Entries.
-* case conversion <1>: Case.
-* case conversion: Fixing Case.
-* Case Sensitive Search menu item: Options Menu.
-* centering: Fill Commands.
-* change log: Change Log.
-* changing buffers: Select Buffer.
-* changing menu items: Menu Customization.
-* character set: Intro to Keystrokes.
-* checking in files: Concepts of VC.
-* checking out files: Concepts of VC.
-* Chinese: Mule.
-* Chinese calendar: Calendar Systems.
-* Clear menu item: Edit Menu.
-* clipboard selections: X Clipboard Selection.
-* coding systems: Coding Systems.
-* command <1>: Key Bindings.
-* command: Commands.
-* command history: Repetition.
-* command line arguments: Command Switches.
-* command name: Key Bindings.
-* comments: Comments.
-* comparing files: Comparing Files.
-* compilation errors: Compilation.
-* compiling files: Compilation.
-* completion: Completion.
-* completion (symbol names): Lisp Completion.
-* continuation line: Continuation Lines.
-* Control-Meta: Lists.
-* Coptic calendar: Calendar Systems.
-* Copy menu item: Edit Menu.
-* copying files: Misc File Ops.
-* 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>: Basic.
-* cursor: Point.
-* customization <1>: Customization.
-* customization <2>: Lisp Indent.
-* customization: Commands.
-* customization buffer: Easy Customization.
-* customization groups: Customization Groups.
-* customizing faces: Face Customization.
-* cut buffers: X Selection Commands.
-* Cut menu item: Edit Menu.
-* cutting: Killing.
-* day of year: General Calendar.
-* daylight savings time: Daylight Savings.
-* debugger: Lisp Debug.
-* default argument: Minibuffer.
-* defuns: Defuns.
-* Delete Frame menu item: File Menu.
-* deleting menu items: Menu Customization.
-* deletion <1>: Killing.
-* deletion: Basic.
-* deletion (of files) <1>: Misc File Ops.
-* deletion (of files): Dired.
-* diary: Diary.
-* diary buffer: Fancy Diary Display.
-* diary file: Format of Diary File.
-* ding: Audible Bell.
-* directories: Startup Paths.
-* directory hierarchies: Startup Paths.
-* directory listing: ListDir.
-* Dired: Dired.
-* disabled command: Disabling.
-* disabling menu items: Menu Customization.
-* Distribution: License.
+* calendar-backward-day: Calendar Unit Motion.
+* calendar-backward-month: Calendar Unit Motion.
+* calendar-backward-week: Calendar Unit Motion.
+* calendar-beginning-of-month: Move to Beginning or End.
+* calendar-beginning-of-week: Move to Beginning or End.
+* calendar-beginning-of-year: Move to Beginning or End.
+* calendar-count-days-region: Mark and Region.
+* calendar-cursor-holidays: Holidays.
+* calendar-end-of-month: Move to Beginning or End.
+* calendar-end-of-week: Move to Beginning or End.
+* calendar-end-of-year: Move to Beginning or End.
+* calendar-exchange-point-and-mark: Mark and Region.
+* calendar-forward-day: Calendar Unit Motion.
+* calendar-forward-month: Calendar Unit Motion.
+* calendar-forward-week: Calendar Unit Motion.
+* calendar-forward-year: Calendar Unit Motion.
+* calendar-goto-astro-day-number: From Other Calendar.
+* calendar-goto-chinese-date: From Other Calendar.
+* calendar-goto-coptic-date: From Other Calendar.
+* calendar-goto-date: Specified Dates.
+* calendar-goto-ethiopic-date: From Other Calendar.
+* calendar-goto-french-date: From Other Calendar.
+* calendar-goto-hebrew-date: From Other Calendar.
+* calendar-goto-islamic-date: From Other Calendar.
+* calendar-goto-iso-date: From Other Calendar.
+* calendar-goto-julian-date: From Other Calendar.
+* calendar-goto-mayan-long-count-date: Mayan Calendar.
+* calendar-goto-persian-date: From Other Calendar.
+* calendar-goto-today: Specified Dates.
+* calendar-mark-today: Calendar Customizing.
+* calendar-next-calendar-round-date: Mayan Calendar.
+* calendar-next-haab-date: Mayan Calendar.
+* calendar-next-tzolkin-date: Mayan Calendar.
+* calendar-other-month: Specified Dates.
+* calendar-phases-of-moon: Lunar Phases.
+* calendar-previous-haab-date: Mayan Calendar.
+* calendar-previous-tzolkin-date: Mayan Calendar.
+* calendar-print-astro-day-number: To Other Calendar.
+* calendar-print-chinese-date: To Other Calendar.
+* calendar-print-coptic-date: To Other Calendar.
+* calendar-print-day-of-year: General Calendar.
+* calendar-print-ethiopic-date: To Other Calendar.
+* calendar-print-french-date: To Other Calendar.
+* calendar-print-hebrew-date: To Other Calendar.
+* calendar-print-islamic-date: To Other Calendar.
+* calendar-print-iso-date: To Other Calendar.
+* calendar-print-julian-date: To Other Calendar.
+* calendar-print-mayan-date: To Other Calendar.
+* calendar-print-persian-date: To Other Calendar.
+* calendar-set-mark: Mark and Region.
+* calendar-star-date: Calendar Customizing.
+* calendar-sunrise-sunset: Sunrise/Sunset.
+* calendar-unmark <1>: Diary Commands.
+* calendar-unmark: Holidays.
+* call-last-kbd-macro: Basic Kbd Macro.
+* cancel-debug-on-entry: Lisp Debug.
+* capitalize-word <1>: Case.
+* capitalize-word: Fixing Case.
+* center-line: Fill Commands.
+* choose-completion: Completion Commands.
+* clear-rectangle: Rectangles.
+* comint-delchar-or-maybe-eof: Shell Mode.
+* comint-dynamic-complete: Shell Mode.
+* comint-next-input: Shell Mode.
+* comint-previous-input: Shell Mode.
+* command-apropos: Apropos.
+* compare-windows <1>: Other Window.
+* compare-windows: Comparing Files.
+* compile: Compilation.
+* compile-defun: Defuns.
+* convert-mocklisp-buffer: Mocklisp.
+* conx: CONX.
+* conx-buffer: CONX.
+* conx-init: CONX.
+* conx-load: CONX.
+* conx-region: CONX.
+* conx-save: CONX.
+* copy-file: Misc File Ops.
+* copy-last-shell-input: Shell Mode.
+* copy-rectangle-to-register: RegRect.
+* copy-region-as-kill: Kill Ring.
+* copy-to-buffer: Accumulating Text.
+* copy-to-register: RegText.
+* count-lines-page: Pages.
+* count-lines-region: Position Info.
+* count-matches: Other Repeating Search.
+* count-text-lines: Nroff Mode.
+* customize: Easy Customization.
+* customize-apropos: Specific Customization.
+* customize-browse: Customization Groups.
+* customize-customized: Specific Customization.
+* customize-face: Specific Customization.
+* customize-group: Specific Customization.
+* customize-option: Specific Customization.
+* customize-saved: Specific Customization.
+* dabbrev-expand: Dynamic Abbrevs.
+* debug: Lisp Debug.
+* debug-on-entry: Lisp Debug.
+* default-value: Locals.
+* define-abbrevs: Saving Abbrevs.
+* define-key <1>: Programmatic Rebinding.
+* define-key: Interactive Rebinding.
+* delete-backward-char <1>: Kill Errors.
+* delete-backward-char <2>: Killing.
+* delete-backward-char: Basic.
+* delete-blank-lines <1>: Killing.
+* delete-blank-lines: Blank Lines.
+* delete-char <1>: Basic Picture.
+* delete-char: Killing.
+* delete-file: Misc File Ops.
+* delete-horizontal-space <1>: Indentation Commands.
+* delete-horizontal-space: Killing.
+* delete-indentation <1>: Indentation Commands.
+* delete-indentation: Killing.
+* delete-matching-lines: Other Repeating Search.
+* delete-menu-item: Menu Customization.
+* delete-non-matching-lines: Other Repeating Search.
+* delete-other-windows: Change Window.
+* delete-rectangle: Rectangles.
+* delete-window: Change Window.
+* describe-bindings: Misc Help.
+* describe-calendar-mode: General Calendar.
+* describe-coding-system: Coding Systems.
+* describe-copying: Misc Help.
+* describe-distribution: Misc Help.
+* describe-function <1>: Documentation.
+* describe-function: Name Help.
+* describe-input-method: Select Input Method.
+* describe-key: Key Help.
+* describe-key-briefly: Key Help.
+* describe-language-environment: Language Environments.
+* describe-mode: Misc Help.
+* describe-no-warranty: Misc Help.
+* describe-syntax: Syntax Change.
+* describe-variable <1>: Examining.
+* describe-variable <2>: Documentation.
+* describe-variable: Name Help.
+* diary: Diary Commands.
+* 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>: 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.
+* diary-hebrew-date: Sexp Diary Entries.
+* diary-islamic-date: Sexp Diary Entries.
+* diary-iso-date: Sexp Diary Entries.
+* diary-julian-date: Sexp Diary Entries.
+* diary-mail-entries: Diary Commands.
+* diary-mayan-date: Sexp Diary Entries.
+* diary-omer: Sexp Diary Entries.
+* diary-parasha: Sexp Diary Entries.
+* diary-phases-of-moon: Sexp Diary Entries.
+* diary-rosh-hodesh: Sexp Diary Entries.
+* diary-sabbath-candles: Sexp Diary Entries.
+* diary-sunrise-sunset: Sexp Diary Entries.
+* diary-yahrzeit: Sexp Diary Entries.
+* diff: Comparing Files.
+* diff-backup: Comparing Files.
+* digit-argument: Arguments.
+* dired: Dired Enter.
+* dired-other-window <1>: Pop Up Window.
+* dired-other-window: Dired Enter.
+* disable-command: Disabling.
+* disable-menu-item: Menu Customization.
+* disassemble: Compiling Libraries.
+* display-time: Mode Line.
+* dissociated-press: Dissociated Press.
+* do-auto-save: Auto Save Control.
* doctor: Total Frustration.
-* double slash in file name: Minibuffer File.
-* drastic changes: Reverting.
-* dribble file: Bugs.
-* early package hierarchies: Startup Paths.
-* echo area: Echo Area.
-* Edit menu <1>: Edit Menu.
-* Edit menu: Pull-down Menus.
-* editable fields (customization buffer): Customization Groups.
-* editing level, recursive <1>: Quitting.
-* editing level, recursive: Recursive Edit.
-* EDT: Emulation.
-* Eliza: Total Frustration.
-* Emacs initialization file: Init File.
-* Emacs-Lisp mode: Lisp Eval.
-* enabling menu items: Menu Customization.
-* encoding of characters: Mule.
-* End Macro Recording menu item: Edit Menu.
-* entering Emacs: Entering Emacs.
-* entering XEmacs: Entering Emacs.
-* environment: Single Shell.
-* error log: Compilation.
-* etags program: Create Tags Table.
-* Ethiopic calendar: Calendar Systems.
-* Execute Last Macro menu item: Edit Menu.
-* Exit Emacs menu item: File Menu.
-* exiting <1>: Recursive Edit.
-* exiting: Exiting.
-* expansion (of abbrevs): Abbrevs.
-* expression: Lists.
-* file dates: Interlocking.
-* file directory: ListDir.
-* File menu <1>: File Menu.
-* File menu: Pull-down Menus.
-* file names: File Names.
-* file protection: Interlocking.
-* files <1>: Visiting.
-* files <2>: Files.
-* files: Basic.
-* fill prefix: Fill Prefix.
-* filling: Filling.
-* Font menu item: Options Menu.
-* fonts and faces: Face Customization.
-* formfeed: Pages.
-* Fortran mode: Fortran.
-* frame: Frame.
-* French Revolutionary calendar: Calendar Systems.
-* function <1>: Key Bindings.
-* function: Commands.
-* General Public License: License.
-* global keymap: Keymaps.
-* global substitution: Replace.
-* graphic characters: Basic.
-* Greek: Mule.
-* Gregorian calendar: Other Calendars.
-* grinding: Grinding.
-* hardcopy: Hardcopy.
-* header (TeX mode): TeX Print.
-* headers (of mail message): Mail Headers.
-* heading lines (Outline mode): Outline Format.
-* Hebrew calendar: Calendar Systems.
-* help: Help.
-* Help menu <1>: Help Menu.
-* Help menu: Pull-down Menus.
-* hierarchies: Startup Paths.
-* history of commands: Repetition.
-* history of minibuffer input: Minibuffer History.
-* holiday forms: Holiday Customizing.
+* down-list: Lists.
+* downcase-region: Case.
+* downcase-word <1>: Case.
+* downcase-word: Fixing Case.
+* edit-abbrevs: Editing Abbrevs.
+* edit-abbrevs-redefine: Editing Abbrevs.
+* edit-options: Edit Options.
+* edit-picture: Picture.
+* edit-tab-stops <1>: Text Mode.
+* edit-tab-stops: Tab Stops.
+* edit-tab-stops-note-changes: Tab Stops.
+* edt-emulation-off: Emulation.
+* edt-emulation-on: Emulation.
+* electric-nroff-mode: Nroff Mode.
+* emacs-lisp-mode: Lisp Eval.
+* emacs-version: Bugs.
+* enable-command: Disabling.
+* enable-menu-item: Menu Customization.
+* end-kbd-macro: Basic Kbd Macro.
+* end-of-buffer: Basic.
+* end-of-defun: Defuns.
+* end-of-fortran-subprogram: Fortran Motion.
+* end-of-line: Basic.
+* enlarge-window: Change Window.
+* enlarge-window-horizontally: Change Window.
+* european-calendar: Date Formats.
+* eval-current-buffer: Lisp Eval.
+* eval-defun: Lisp Eval.
+* eval-expression: Lisp Eval.
+* eval-last-sexp: Lisp Eval.
+* eval-region: Lisp Eval.
+* exchange-point-and-mark: Setting Mark.
+* execute-extended-command: M-x.
+* exit-calendar: General Calendar.
+* exit-recursive-edit: Recursive Edit.
+* expand-abbrev: Expanding Abbrevs.
+* expand-region-abbrevs: Expanding Abbrevs.
+* fancy-diary-display: Fancy Diary Display.
+* fill-individual-paragraphs: Fill Prefix.
+* fill-paragraph: Fill Commands.
+* fill-region: Fill Commands.
+* fill-region-as-paragraph: Fill Commands.
+* find-alternate-file: Visiting.
+* find-file: 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.
+* find-tag-other-window <1>: Find Tag.
+* find-tag-other-window: Pop Up Window.
+* find-this-file: Visiting.
+* find-this-file-other-window: Visiting.
+* finder-by-keyword: Library Keywords.
+* fortran-column-ruler: Fortran Columns.
+* fortran-comment-region: Fortran Comments.
+* fortran-indent-line: ForIndent Commands.
+* fortran-indent-subprogram: ForIndent Commands.
+* fortran-mode: Fortran.
+* fortran-next-statement: Fortran Motion.
+* fortran-previous-statement: Fortran Motion.
+* fortran-split-line: ForIndent Commands.
+* fortran-window-create: Fortran Columns.
+* forward-char: Basic.
+* forward-list: Lists.
+* forward-page: Pages.
+* forward-paragraph: Paragraphs.
+* forward-sentence: Sentences.
+* forward-sexp: Lists.
+* forward-text-line: Nroff Mode.
+* forward-word: Words.
+* frame-configuration-to-register: RegConfig.
+* global-set-key <1>: Programmatic Rebinding.
+* global-set-key: Interactive Rebinding.
+* goto-char: Basic.
+* goto-line: Basic.
+* hanoi: Amusements.
+* help-command: Help.
+* help-for-help: Help.
+* help-with-tutorial <1>: Misc Help.
+* help-with-tutorial: Basic.
+* hide-body: Outline Visibility.
+* hide-entry: Outline Visibility.
+* hide-leaves: Outline Visibility.
+* hide-subtree: Outline Visibility.
* holidays: Holidays.
-* horizontal scrolling: Horizontal Scrolling.
-* ignoriginal: Dissociated Press.
-* 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): Etags Regexps.
-* invisible lines: Outline Mode.
-* IPA: Mule.
-* Islamic calendar: Calendar Systems.
-* ISO commercial calendar: Calendar Systems.
-* italic font: Face Customization.
-* Japanese: Mule.
-* Julian calendar: Calendar Systems.
-* Julian day numbers: Calendar Systems.
-* justification: Fill Commands.
-* key rebinding, permanent: Init File.
-* key rebinding, this session: Rebinding.
-* keyboard macros: Keyboard Macros.
-* keycode: Super and Hyper Keys.
-* keymap <1>: Keymaps.
-* keymap: Commands.
-* keystroke: Intro to Keystrokes.
-* keysym: Intro to Keystrokes.
-* keysyms: Super and Hyper Keys.
-* Kill Buffer menu item: File Menu.
-* kill ring: Yanking.
-* killing: Killing.
-* killing Emacs: Exiting.
-* Korean: Mule.
-* language environments: Language Environments.
-* last package hierarchies: Startup Paths.
-* late package hierarchies: Startup Paths.
-* LaTeX: TeX Mode.
-* libraries: Lisp Libraries.
-* license to copy XEmacs: License.
-* line number: Position Info.
-* Lisp: Programs.
-* Lisp mode: Program Modes.
-* list: Lists.
-* loading libraries: Loading.
-* loading Lisp code: Lisp Libraries.
-* local keymap: Keymaps.
-* local variables: Locals.
-* local variables in files: File Variables.
-* locking and version control: Concepts of VC.
-* log entry: Editing with VC.
-* mail <1>: Reading Mail.
+* include-other-diary-files: Included Diary Files.
+* increment-register: RegNumbers.
+* indent-c-exp: Multi-line Indent.
+* indent-for-comment: Comments.
+* indent-new-comment-line: Comments.
+* indent-region <1>: Multi-line Indent.
+* indent-region: Indentation Commands.
+* indent-relative: Indentation Commands.
+* indent-rigidly: Indentation Commands.
+* indent-sexp: Multi-line Indent.
+* indented-text-mode: Text Mode.
+* info: Misc Help.
+* Info-elisp-ref: Misc Help.
+* Info-goto-emacs-command-node: Misc Help.
+* insert-abbrevs: Saving Abbrevs.
+* insert-anniversary-diary-entry: Special Diary Entries.
+* insert-block-diary-entry: Special Diary Entries.
+* insert-cyclic-diary-entry: Special Diary Entries.
+* insert-diary-entry: Adding to Diary.
+* insert-file: Misc File Ops.
+* insert-hebrew-diary-entry: Hebrew/Islamic Entries.
+* insert-islamic-diary-entry: Hebrew/Islamic Entries.
+* insert-kbd-macro: Save Kbd Macro.
+* insert-monthly-diary-entry: Adding to Diary.
+* insert-monthly-hebrew-diary-entry: Hebrew/Islamic Entries.
+* insert-monthly-islamic-diary-entry: Hebrew/Islamic Entries.
+* insert-parentheses: Balanced Editing.
+* insert-register: RegText.
+* insert-weekly-diary-entry: Adding to Diary.
+* insert-yearly-diary-entry: Adding to Diary.
+* insert-yearly-hebrew-diary-entry: Hebrew/Islamic Entries.
+* insert-yearly-islamic-diary-entry: Hebrew/Islamic Entries.
+* interactive: M-x.
+* interrupt-shell-subjob: Shell Mode.
+* inverse-add-global-abbrev: Defining Abbrevs.
+* inverse-add-mode-abbrev: Defining Abbrevs.
+* invert-face: Faces.
+* isearch-abort: Incremental Search.
+* isearch-backward: Incremental Search.
+* isearch-backward-regexp: Regexp Search.
+* isearch-complete: Incremental Search.
+* isearch-delete-char: Incremental Search.
+* isearch-exit: Incremental Search.
+* isearch-forward: Incremental Search.
+* isearch-forward-regexp: Regexp Search.
+* isearch-quote-char: Incremental Search.
+* isearch-repeat-backward: Incremental Search.
+* isearch-repeat-forward: Incremental Search.
+* isearch-ring-advance: Incremental Search.
+* isearch-ring-retreat: Incremental Search.
+* isearch-yank-line: Incremental Search.
+* isearch-yank-word: Incremental Search.
+* jump-to-register <1>: Split Window.
+* jump-to-register: RegPos.
+* just-one-space: Killing.
+* kbd-macro-query: Kbd Macro Query.
+* kill-all-abbrevs: Defining Abbrevs.
+* kill-buffer: Kill Buffer.
+* kill-comment: Comments.
+* kill-compilation: Compilation.
+* kill-line: Killing.
+* kill-local-variable: Locals.
+* kill-output-from-shell: Shell Mode.
+* kill-rectangle: Rectangles.
+* kill-region: Killing.
+* kill-sentence <1>: Sentences.
+* kill-sentence: Killing.
+* kill-sexp <1>: Lists.
+* kill-sexp: Killing.
+* kill-some-buffers: Kill Buffer.
+* kill-word <1>: Words.
+* kill-word: Killing.
+* latex-mode: TeX Mode.
+* LaTeX-mode: TeX Mode.
+* lisp-complete-symbol: Lisp Completion.
+* lisp-indent-line: Basic Indent.
+* lisp-interaction-mode: Lisp Interaction.
+* lisp-mode: External Lisp.
+* lisp-send-defun: External Lisp.
+* list-abbrevs: Editing Abbrevs.
+* list-bookmarks: Bookmarks.
+* list-buffers: List Buffers.
+* list-calendar-holidays: Holidays.
+* list-coding-systems: Coding Systems.
+* list-command-history: Repetition.
+* list-directory: ListDir.
+* list-hebrew-diary-entries: Hebrew/Islamic Entries.
+* list-holidays: Holidays.
+* list-input-methods: Select Input Method.
+* list-islamic-diary-entries: Hebrew/Islamic Entries.
+* list-matching-lines: Other Repeating Search.
+* list-options: Edit Options.
+* list-tags: List Tags.
+* list-yahrzeit-dates: From Other Calendar.
+* load: Loading.
+* load-default-sounds: Audible Bell.
+* load-file: Loading.
+* load-library <1>: Loading.
+* load-library: Startup Paths.
+* load-sound-file: Audible Bell.
+* local-set-key: Interactive Rebinding.
+* local-unset-key: Interactive Rebinding.
+* locate-library: Loading.
+* lpr-buffer: Hardcopy.
+* lpr-region: Hardcopy.
* mail: Sending Mail.
-* major modes: Major Modes.
-* make: Compilation.
-* mark: Mark.
-* mark ring <1>: Mark and Region.
-* mark ring: Mark Ring.
-* Markov chain: Dissociated Press.
-* master file: Concepts of VC.
-* matching parentheses: Matching.
-* Mayan calendar: Calendar Systems.
-* Mayan calendar round: Mayan Calendar.
-* Mayan haab calendar: Mayan Calendar.
-* Mayan long count: Mayan Calendar.
-* Mayan tzolkin calendar: Mayan Calendar.
-* menus <1>: Change Window.
-* menus: Pull-down Menus.
-* message <1>: Reading Mail.
-* message: Sending Mail.
-* Meta: Words.
-* minibuffer <1>: Keymaps.
-* minibuffer <2>: M-x.
-* minibuffer: Minibuffer.
-* minibuffer history: Minibuffer History.
-* minor modes: Minor Modes.
-* mistakes, correcting <1>: Fixit.
-* mistakes, correcting: Undo.
-* mocklisp: Mocklisp.
-* mode hook: Program Modes.
-* mode line <1>: Minor Modes.
-* mode line: Mode Line.
-* mode, Term: Term Mode.
-* modified (buffer): Visiting.
-* modifier key: Intro to Keystrokes.
-* modifier mapping: Super and Hyper Keys.
-* moon, phases of: Lunar Phases.
-* mouse operations: Additional Mouse Operations.
-* mouse selection: Mouse Selection.
-* moving inside the calendar: Calendar Motion.
-* moving text: Yanking.
-* MULE: Mule.
-* multi-frame XEmacs: XEmacs under X.
-* multibyte characters: Mule.
-* named configurations (RCS): Snapshot Caveats.
-* narrowing: Narrowing.
-* New Frame menu item: File Menu.
+* mail-cc: Mail Mode.
+* mail-fill-yanked-message: Mail Mode.
+* mail-interactive-insert-alias: Mail Headers.
+* 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.
+* mail-subject: Mail Mode.
+* mail-to: Mail Mode.
+* mail-yank-original: Mail Mode.
+* make-directory: File Names.
+* make-face-bold: Faces.
+* make-face-bold-italic: Faces.
+* make-face-italic: Faces.
+* make-face-larger: Faces.
+* make-face-smaller: Faces.
+* make-face-unbold: Faces.
+* make-face-unitalic: Faces.
+* make-frame: XEmacs under X.
+* make-local-variable: Locals.
+* make-obsolete: Compiling Libraries.
+* make-symbolic-link: Misc File Ops.
+* make-variable-buffer-local: Locals.
+* manual-entry: Documentation.
+* mark-beginning-of-buffer: Setting Mark.
+* mark-calendar-holidays: Holidays.
+* mark-defun <1>: Defuns.
+* mark-defun: Marking Objects.
+* mark-diary-entries: Diary Commands.
+* mark-end-of-buffer: Setting Mark.
+* mark-fortran-subprogram: Fortran Motion.
+* mark-hebrew-diary-entries: Hebrew/Islamic Entries.
+* mark-included-diary-files: Included Diary Files.
+* mark-islamic-diary-entries: Hebrew/Islamic Entries.
+* mark-page <1>: Pages.
+* mark-page: Marking Objects.
+* mark-paragraph <1>: Paragraphs.
+* mark-paragraph: Marking Objects.
+* mark-sexp <1>: Lists.
+* mark-sexp: Marking Objects.
+* mark-whole-buffer: Marking Objects.
+* mark-word <1>: Words.
+* mark-word: Marking Objects.
+* minibuffer-complete: Completion Example.
+* minibuffer-complete-word: Completion Commands.
+* modify-syntax-entry: Syntax Change.
+* mouse-choose-completion: Completion Commands.
+* mouse-del-char: Additional Mouse Operations.
+* mouse-delete-window: Additional Mouse Operations.
+* mouse-keep-one-window: Additional Mouse Operations.
+* mouse-kill-line: Additional Mouse Operations.
+* mouse-line-length: Additional Mouse Operations.
+* mouse-scroll: Additional Mouse Operations.
+* mouse-select: Additional Mouse Operations.
+* mouse-select-and-split: Additional Mouse Operations.
+* mouse-set-mark: Additional Mouse Operations.
+* mouse-set-point: Additional Mouse Operations.
+* mouse-track: Additional Mouse Operations.
+* mouse-track-adjust: Additional Mouse Operations.
+* mouse-track-and-copy-to-cutbuffer: Additional Mouse Operations.
+* mouse-track-delete-and-insert: Additional Mouse Operations.
+* move-over-close-and-reindent: Balanced Editing.
+* move-to-window-line: Basic.
+* name-last-kbd-macro: Save Kbd Macro.
+* narrow-to-region: Narrowing.
+* negative-argument: Arguments.
* newline: Basic.
-* non-incremental search: Non-Incremental Search.
-* nroff: Nroff Mode.
-* numeric arguments: Arguments.
-* omer count: Sexp Diary Entries.
-* Open File, New Frame... menu item: File Menu.
-* Open File... menu item: File 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.
-* Overstrike menu item: Options Menu.
-* Overwrite mode: Minor Modes.
-* package hierarchies: Startup Paths.
-* package path: Startup Paths.
-* packages: Packages.
-* page number: Position Info.
-* pages: Pages.
-* paragraphs: Paragraphs.
-* parasha, weekly: Sexp Diary Entries.
-* Paren Highlighting menu item: Options Menu.
-* parentheses: Matching.
-* Paste menu item: Edit Menu.
-* pasting: Yanking.
-* path: Startup Paths.
-* paths: Startup Paths.
-* per-buffer variables: Locals.
-* Persian calendar: Calendar Systems.
-* phases of the moon: Lunar Phases.
-* pictures: Picture.
-* point <1>: Basic.
-* point: Point.
-* pointer face: Mouse Selection.
-* pointer shapes: Mouse Selection.
-* prefix key sequence: Key Sequences.
-* presidentagon: Dissociated Press.
-* primary selections: X Selection Commands.
-* Print Buffer menu item: File Menu.
-* prompt: Minibuffer.
-* properbose: Dissociated Press.
-* Pull-down Menus <1>: Change Window.
-* Pull-down Menus: Pull-down Menus.
-* query replace: Query Replace.
-* quitting: Quitting.
-* quitting (in search): Incremental Search.
-* quoting: Basic.
-* random sentences: CONX.
-* RCS: Concepts of VC.
-* Read Only menu item: Options Menu.
-* read-only buffer: Misc Buffer.
-* rebinding keys, permanently: Init File.
-* rebinding keys, this session: Rebinding.
-* rectangle <1>: Rectangles in Picture.
-* rectangle: RegRect.
-* rectangles: Rectangles.
-* recursive editing level <1>: Quitting.
-* recursive editing level: Recursive Edit.
-* redefining keys: Key Bindings Using Strings.
-* regexp: Regexp Search.
-* region <1>: Case.
-* region: Mark.
-* registered file: Concepts of VC.
-* registers: Registers.
-* regular expression: Regexp Search.
-* regular packages: Package Terminology.
-* removing directories: File Names.
-* replacement: Replace.
-* restriction: Narrowing.
-* Revert Buffer menu item: File Menu.
-* root of a hierarchy: Startup Paths.
-* rosh hodesh: Sexp Diary Entries.
-* Russian: Mule.
-* Save Buffer As ... menu item: File Menu.
-* Save Buffer menu item: File Menu.
-* Save Options: Options Menu.
-* saving: Visiting.
-* saving option value: Changing an Option.
-* SCCS: Concepts of VC.
-* Scheme mode: Program Modes.
-* scrolling: Scrolling.
-* scrolling in the calendar: Scroll Calendar.
-* searching: Search.
-* selected buffer: Buffers.
-* selected window: Basic Window.
-* selective display: Outline Mode.
-* self-documentation: Help.
-* sentences: Sentences.
-* setting option value: Changing an Option.
-* setting variables: Examining.
-* sexp: Lists.
-* sexp diary entries: Sexp Diary Entries.
-* shell commands: Shell.
-* Shell mode: Shell Mode.
-* shift modifer: Representing Keystrokes.
-* shrinking XEmacs frame: Exiting.
-* simultaneous editing: Interlocking.
-* single-file packages: Package Terminology.
-* site-specific directories: Startup Paths.
-* Size menu item: Options Menu.
-* slashes repeated in file name: Minibuffer File.
-* snapshots and version control: Snapshots.
-* sorting: Sorting.
-* sorting diary entries: Fancy Diary Display.
-* source packages: Package Terminology.
-* spelling: Spelling.
-* Split Frame: File Menu.
-* Start Macro Recording menu item: Edit Menu.
-* startup paths: Startup Paths.
-* string substitution: Replace.
-* subshell: Shell.
-* subtree (Outline mode): Outline Visibility.
-* sunrise and sunset: Sunrise/Sunset.
-* suspending: Exiting.
-* switching buffers: Select Buffer.
-* Syntax Highlighting menu item: Options Menu.
-* syntax table <1>: Syntax.
-* syntax table: Words.
-* tags table: Tags.
-* Teach Extended Commands menu item: Options Menu.
-* techniquitous: Dissociated Press.
-* television: Appending Kills.
-* Term mode: Term Mode.
-* termscript file: Bugs.
-* TeX: TeX Mode.
-* text: Text.
-* Text mode: Text Mode.
-* Tools menu <1>: Tools Menu.
-* Tools menu: Pull-down Menus.
-* top level: Mode Line.
-* transposition <1>: Lists.
-* transposition <2>: Words.
-* transposition: Transpose.
-* truncation: Continuation Lines.
-* typos: Fixit.
-* Un-split (Keep Others): File Menu.
-* Un-split (Keep This): File Menu.
+* newline-and-indent: Basic Indent.
+* next-complex-command: Repetition.
+* next-error: Compilation.
+* next-history-element: Minibuffer History.
+* next-line: Basic.
+* next-list-mode-item: Completion Commands.
+* next-matching-history-element: Minibuffer History.
+* not-modified: Saving.
+* nroff-mode: Nroff Mode.
+* number-to-register: RegNumbers.
+* occur: Other Repeating Search.
+* open-dribble-file: Bugs.
+* open-line: Blank Lines.
+* open-rectangle: Rectangles.
+* open-termscript: Bugs.
+* other-window: Other Window.
+* other-window-any-frame: Other Window.
+* outline-backward-same-level: Outline Motion.
+* outline-forward-same-level: Outline Motion.
+* outline-next-visible-heading: Outline Motion.
+* outline-previous-visible-heading: Outline Motion.
+* outline-up-heading: Outline Motion.
+* overwrite-mode: Minor Modes.
+* phases-of-moon: Lunar Phases.
+* picture-backward-clear-column: Basic Picture.
+* picture-backward-column: Basic Picture.
+* picture-clear-column: Basic Picture.
+* picture-clear-line: Basic Picture.
+* picture-clear-rectangle: Rectangles in Picture.
+* picture-clear-rectangle-to-register: Rectangles in Picture.
+* picture-forward-column: Basic Picture.
+* picture-motion: Insert in Picture.
+* picture-motion-reverse: Insert in Picture.
+* picture-move-down: Basic Picture.
+* picture-move-up: Basic Picture.
+* picture-movement-down: Insert in Picture.
+* picture-movement-left: Insert in Picture.
+* picture-movement-ne: Insert in Picture.
+* picture-movement-nw: Insert in Picture.
+* picture-movement-right: Insert in Picture.
+* picture-movement-se: Insert in Picture.
+* picture-movement-sw: Insert in Picture.
+* picture-movement-up: Insert in Picture.
+* picture-newline: Basic Picture.
+* picture-open-line: Basic Picture.
+* picture-set-tab-stops: Tabs in Picture.
+* picture-tab: Tabs in Picture.
+* 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.
+* play-sound: Audible Bell.
+* point-to-register: RegPos.
+* prefer-coding-system: Recognize Coding.
+* prepend-to-buffer: Accumulating Text.
+* previous-complex-command: Repetition.
+* previous-history-element: Minibuffer History.
+* previous-line: Basic.
+* previous-list-mode-item: Completion Commands.
+* previous-matching-history-element: Minibuffer History.
+* print-buffer: Hardcopy.
+* print-diary-entries <1>: Diary Customizing.
+* print-diary-entries: Diary Commands.
+* print-region: Hardcopy.
+* quail-set-keyboard-layout: Select Input Method.
+* query-replace: Query Replace.
+* query-replace-regexp: Query Replace.
+* quietly-read-abbrev-file: Saving Abbrevs.
+* quit-shell-subjob: Shell Mode.
+* quoted-insert: Basic.
+* re-search-backward: Regexp Search.
+* re-search-forward: Regexp Search.
+* read-abbrev-file: Saving Abbrevs.
+* read-key-sequence: Representing Keystrokes.
+* recenter <1>: Scrolling.
+* recenter: Basic.
+* recover-file: Recover.
+* redraw-calendar: General Calendar.
+* relabel-menu-item: Menu Customization.
+* remove-directory: File Names.
+* rename-buffer: Misc Buffer.
+* rename-file: Misc File Ops.
+* repeat-complex-command: Repetition.
+* replace-regexp: Unconditional Replace.
+* replace-string: Unconditional Replace.
+* revert-buffer: Reverting.
+* run-lisp: External Lisp.
+* save-buffer: Saving.
+* save-buffers-kill-emacs: Exiting.
+* save-some-buffers: Saving.
+* scroll-calendar-left: Scroll Calendar.
+* scroll-calendar-left-three-months: Scroll Calendar.
+* scroll-calendar-right: Scroll Calendar.
+* scroll-calendar-right-three-months: Scroll Calendar.
+* scroll-down: Scrolling.
+* scroll-left: Horizontal Scrolling.
+* scroll-other-window <1>: General Calendar.
+* scroll-other-window: Other Window.
+* scroll-right: Horizontal Scrolling.
+* scroll-up: Scrolling.
+* search-backward: Non-Incremental Search.
+* search-forward: Non-Incremental Search.
+* select-input-method: Select Input Method.
+* self-insert: Basic.
+* send-shell-input: Shell Mode.
+* set-buffer-file-coding-system: Specify Coding.
+* set-buffer-process-coding-system: Specify Coding.
+* set-comment-column: Comments.
+* set-default-file-modes: Interlocking.
+* set-face-background: Faces.
+* set-face-background-pixmap: Faces.
+* set-face-font: Faces.
+* set-face-foreground: Faces.
+* set-face-underline-p: Faces.
+* set-fill-column: Fill Commands.
+* set-fill-prefix: Fill Prefix.
+* set-gnu-bindings: Emulation.
+* set-goal-column: Basic.
+* set-gosmacs-bindings: Emulation.
+* set-keyboard-coding-system: Specify Coding.
+* set-language-environment: Language Environments.
+* set-mark-command: Setting Mark.
+* set-selective-display: Selective Display.
+* set-terminal-coding-system: Specify Coding.
+* set-variable: Examining.
+* set-visited-file-name: Saving.
+* setq-default: Locals.
+* shell: Interactive Shell.
+* shell-command: Single Shell.
+* shell-command-on-region: Single Shell.
+* shell-send-eof: Shell Mode.
+* show-all: Outline Visibility.
+* show-all-diary-entries: Diary Commands.
+* show-branches: Outline Visibility.
+* show-children: Outline Visibility.
+* show-entry: Outline Visibility.
+* show-output-from-shell: Shell Mode.
+* show-subtree: Outline Visibility.
+* simple-diary-display: Fancy Diary Display.
+* sort-columns: Sorting.
+* sort-diary-entries: Fancy Diary Display.
+* sort-fields: Sorting.
+* sort-lines: Sorting.
+* sort-numeric-fields: Sorting.
+* sort-pages: Sorting.
+* sort-paragraphs: Sorting.
+* spell-buffer: Spelling.
+* spell-region: Spelling.
+* spell-string: Spelling.
+* spell-word: Spelling.
+* split-line: Indentation Commands.
+* split-window-horizontally: Split Window.
+* split-window-vertically: Split Window.
+* start-kbd-macro: Basic Kbd Macro.
+* stop-shell-subjob: Shell Mode.
+* substitute-key-definition: Interactive Rebinding.
+* sunrise-sunset: Sunrise/Sunset.
+* suspend-emacs: Exiting.
+* switch-to-buffer: Select Buffer.
+* 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>: Text Mode.
+* tab-to-tab-stop: Tab Stops.
+* tabify: Just Spaces.
+* tags-apropos: List Tags.
+* tags-loop-continue: Tags Search.
+* tags-query-replace: Tags Search.
+* tags-search: Tags Search.
+* term: Terminal emulator.
+* term-line-mode: Term Mode.
+* term-pager-toggle: Paging in Term.
+* tex-buffer: TeX Print.
+* tex-close-latex-block: TeX Editing.
+* tex-insert-braces: TeX Editing.
+* tex-insert-quote: TeX Editing.
+* tex-kill-job: TeX Print.
+* tex-mode: TeX Mode.
+* TeX-mode: TeX Mode.
+* tex-print: TeX Print.
+* tex-recenter-output-buffer: TeX Print.
+* tex-region: TeX Print.
+* tex-show-print-queue: TeX Print.
+* tex-terminate-paragraph: TeX Editing.
+* text-mode: Text Mode.
+* toggle-input-method: Select Input Method.
+* toggle-read-only: Misc Buffer.
+* 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>: Words.
+* transpose-words: Transpose.
* undo: Undo.
-* Undo menu item: Edit Menu.
-* variable: Variables.
-* variables: Commands.
-* version control: Version Control.
-* version-specific directories: Startup Paths.
-* vi: Emulation.
-* viewing: Misc File Ops.
-* Viper: Emulation.
-* visiting: Visiting.
-* visiting files: Visiting.
-* weeks, which day they start on: Move to Beginning or End.
-* Weight menu item: Options Menu.
-* widening: Narrowing.
-* window: Frame.
-* windows: Windows.
-* Windows menu: Change Window.
-* word search: Word Search.
-* words <1>: Case.
-* words <2>: Words.
-* words: Fixing Case.
-* work file: Concepts of VC.
-* X resources: X Resources.
-* yahrzeits <1>: Sexp Diary Entries.
-* yahrzeits: From Other Calendar.
-* yanking: Yanking.
-
+* unexpand-abbrev: Expanding Abbrevs.
+* universal-argument: Arguments.
+* universal-coding-system-argument: Specify Coding.
+* untabify: Just Spaces.
+* up-list: TeX Editing.
+* upcase-region: 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.
+* vc-diff: Old Versions.
+* vc-directory: VC Status.
+* vc-insert-headers: Version Headers.
+* vc-next-action: Editing with VC.
+* vc-print-log: VC Status.
+* vc-register: Editing with VC.
+* vc-rename-file: Renaming and VC.
+* vc-retrieve-snapshot: Making Snapshots.
+* vc-revert-buffer: Editing with VC.
+* vc-update-change-log: Change Logs and VC.
+* vc-version-other-window: Old Versions.
+* view-buffer: Misc Buffer.
+* view-diary-entries: Diary Commands.
+* view-emacs-news: Misc Help.
+* view-file: Misc File Ops.
+* view-hello-file: Mule Intro.
+* view-lossage: Misc Help.
+* view-register: Registers.
+* visit-tags-table: Select Tags Table.
+* what-cursor-position: Position Info.
+* what-line: Position Info.
+* what-page: Position Info.
+* where-is: Name Help.
+* widen: Narrowing.
+* widget-backward: Changing an Option.
+* widget-complete: Changing an Option.
+* widget-forward: Changing an Option.
+* window-configuration-to-register <1>: Split Window.
+* window-configuration-to-register: RegConfig.
+* word-search-backward: Word Search.
+* word-search-forward: Word Search.
+* write-abbrev-file: Saving Abbrevs.
+* write-file: Saving.
+* x-copy-primary-selection: X Selection Commands.
+* x-create-frame: X Resources.
+* x-delete-primary-selection: X Selection Commands.
+* x-insert-selection: X Selection Commands.
+* x-kill-primary-selection: X Selection Commands.
+* x-mouse-kill: X Selection Commands.
+* x-own-secondary-selection: X Selection Commands.
+* x-own-selection: X Selection Commands.
+* x-set-point-and-insert-selection: X Selection Commands.
+* xemacs-local-faq: Misc Help.
+* Yank: Kill Ring.
+* yank-pop: Earlier Kills.
+* yank-rectangle: Rectangles.
+* yow: Amusements.
+* zap-to-char: Killing.
+* zmacs-activate-region: Active Regions.
+* zmacs-deactivate-region: Active Regions.
Help
****
- Emacs provides extensive help features which revolve around a single
+ XEmacs provides extensive help features accessible through a single
character, `C-h'. `C-h' is a prefix key that is used only for
-documentation-printing commands. The characters you can type after
-`C-h' are called "help options". One help option is `C-h'; you use it
-to ask for help about using `C-h'.
+documentation-printing commands. The characters that you can type after
+`C-h' are called "help options". One help option is `C-h'; that is how
+you ask for help about using `C-h'. To cancel, type `C-g'. The
+function key <F1> is equivalent to `C-h'.
- `C-h C-h' prints a list of the possible help options, and then asks
-you to type the desired option. It prompts with the string:
+ `C-h C-h' (`help-for-help') displays a list of the possible help
+options, and then asks you to type the desired option. It prompts with
+the string:
- A, B, C, F, I, K, L, M, N, S, T, V, W, C-c, C-d, C-n, C-w or C-h for more help:
+ A B C F I K L M N P S T V W C-c C-d C-f C-i C-k C-n C-w; ? for more help:
You should type one of those characters.
Typing a third `C-h' displays a description of what the options mean;
Emacs still waits for you to type an option. To cancel, type `C-g'.
+ Most help buffers use a special major mode, Help mode, which lets you
+scroll conveniently with <SPC> and <DEL> or <BS>.
+
+* Menu:
+
+* Help Summary:: Brief list of all Help commands.
+* Key Help:: Asking what a key does in XEmacs.
+* Name Help:: Asking about a command, variable or function name.
+* Apropos:: Asking what pertains to a given topic.
+* Library Keywords:: Finding Lisp libraries by keywords (topics).
+* Help Mode:: Special features of Help mode and Help buffers.
+* Misc Help:: Other help commands.
+
+\1f
+File: xemacs.info, Node: Help Summary, Next: Key Help, Prev: Help, Up: Help
+
+Help Summary
+============
+
Here is a summary of the defined help commands.
-`C-h a STRING <RET>'
- Display a list of commands whose names contain STRING (`command-
- apropos').
+`C-h a REGEXP <RET>'
+ Display a list of functions and variables whose names match REGEXP
+ (`heper-apropos').
+
+`C-h A REGEXP'
+ Show all commands whose names contain matches for REGEXP
+ (`command-apropos').
`C-h b'
- Display a table of all key bindings currently in effect, with
- local bindings of the current major mode first, followed by all
- global bindings (`describe-bindings').
+ Display a table of all key bindings currently in effect, with local
+ bindings of the current major mode first, followed by all global
+ bindings (`describe-bindings').
`C-h c KEY'
- Print the name of the command that KEY runs (`describe-key-
- briefly'). `c' is for `character'. For more extensive
- information on KEY, use `C-h k'.
+ Print the name of the command that KEY runs
+ (`describe-key-briefly'). Here `c' stands for `character'. For
+ more extensive information on KEY, use `C-h k'.
+`C-h d FUNCTION <RET>'
`C-h f FUNCTION <RET>'
Display documentation on the Lisp function named FUNCTION
- (`describe-function'). Note that commands are Lisp functions, so
- a command name may be used.
+ (`describe-function'). Since commands are Lisp functions, a
+ command name may be used.
`C-h i'
Run Info, the program for browsing documentation files (`info').
- The complete Emacs manual is available online in Info.
+ The complete XEmacs manual is available online in Info.
`C-h k KEY'
- Display name and documentation of the command KEY runs
+ Display the name and documentation of the command that KEY runs
(`describe-key').
`C-h l'
Display documentation of the current major mode (`describe-mode').
`C-h n'
- Display documentation of Emacs changes, most recent first
+`C-h C-n'
+ Display documentation of XEmacs changes, most recent first
(`view-emacs-news').
`C-h p'
+ Find packages by topic keyword (`finder-by-keyword').
+
+`C-h C-p'
Display a table of all mouse bindings currently in effect now, with
local bindings of the current major mode first, followed by all
global bindings (`describe-pointer').
`C-h s'
Display current contents of the syntax table, plus an explanation
- of what they mean (`describe-syntax').
+ of what they mean (`describe-syntax'). *Note Syntax::.
`C-h t'
- Display the Emacs tutorial (`help-with-tutorial').
+ Enter the XEmacs interactive tutorial (`help-with-tutorial').
`C-h v VAR <RET>'
- Display the documentation of the Lisp variable VAR (`describe-
- variable').
+ Display the documentation of the Lisp variable VAR
+ (`describe-variable').
`C-h w COMMAND <RET>'
Print which keys run the command named COMMAND (`where-is').
-`M-x apropos REGEXP'
- Show all symbols whose names contain matches for REGEXP.
+`C-h B <RET>'
+ Display info on how to deal with Beta versions of XEmacs
+ (`describe-beta').
+
+`C-h C GROUP <RET>'
+ Select customization buffer for GROUP (`customize').
+
+`C-h F <RET>'
+ View the local copy of the XEmacs FAQ (`xemacs-local-faq').
+
+`C-h C-i FILE <RET>'
+ Read Info file FILE with Info browser (`Info-query').
+
+`C-h C-c COMMAND <RET>'
+ Look up an Emacs command COMMAND in the Emacs manual in the Info
+ system (`Info-goto-emacs-command-node').
+
+`C-h C-f FUNCTION <RET>'
+ Look up an Emacs Lisp function FUNCTION in the Elisp manual in the
+ Info system (`Info-elisp-ref').
+
+\1f
+File: xemacs.info, Node: Key Help, Next: Name Help, Prev: Help Summary, Up: Help
Documentation for a Key
=======================
The most basic `C-h' options are `C-h c' (`describe-key-briefly')
-and `C-h k'
-(`describe-key'). `C-h c KEY' prints the name of the command that KEY
-is bound to in the echo area. For example, `C-h c C-f' prints
-`forward-char'. Since command names are chosen to describe what the
-command does, using this option is a good way to get a somewhat cryptic
-description of what KEY does.
+and `C-h k' (`describe-key'). `C-h c KEY' prints in the echo area the
+name of the command that KEY is bound to. For example, `C-h c C-f'
+prints `forward-char'. Since command names are chosen to describe what
+the commands do, this is a good way to get a very brief description of
+what KEY does.
`C-h k KEY' is similar to `C-h c' but gives more information. It
displays the documentation string of the function KEY is bound to as
interactively, KEY may also be a menu selection. This information does
not usually fit into the echo area, so a window is used for the display.
+ `C-h c' and `C-h k' work for any sort of key sequences, including
+function keys and mouse events.
+
+\1f
+File: xemacs.info, Node: Name Help, Next: Apropos, Prev: Key Help, Up: Help
+
Help by Command or Variable Name
================================
variable `describe-function-show-arglist' is `t', `describe-function'
shows its arglist if the FUNCTION is not an autoload function.
- `C-h f' is also useful for Lisp functions you are planning to use in
-a Lisp program. For example, if you have just written the code
-`(make-vector len)' and want to make sure you are using `make-vector'
-properly, type `C-h f make-vector <RET>'. Because `C-h f' allows all
-function names, not just command names, you may find that some of your
-favorite abbreviations that work in `M-x' don't work in `C-h f'. An
-abbreviation may be unique among command names, yet fail to be unique
-when other function names are allowed.
-
- If you type <RET>, leaving the minibuffer empty, `C-h f' by default
-describes the function called by the innermost Lisp expression in the
-buffer around point, provided that that is a valid, defined Lisp
-function name. For example, if point is located following the text
-`(make-vector (car x)', the innermost list containing point is the one
-starting with `(make-vector', so the default is to describe the
-function `make-vector'.
+ `C-h f' is also useful for Lisp functions that you are planning to
+use in a Lisp program. For example, if you have just written the
+expression `(make-vector len)' and want to make sure you are using
+`make-vector' properly, type `C-h f make-vector <RET>'. Because `C-h
+f' allows all function names, not just command names, you may find that
+some of your favorite abbreviations that work in `M-x' don't work in
+`C-h f'. An abbreviation may be unique among command names, yet fail
+to be unique when other function names are allowed.
+
+ The function name for `C-h f' to describe has a default which is
+used if you type <RET> leaving the minibuffer empty. The default is
+the function called by the innermost Lisp expression in the buffer
+around point, _provided_ that is a valid, defined Lisp function name.
+For example, if point is located following the text `(make-vector (car
+x)', the innermost list containing point is the one that starts with
+`(make-vector', so the default is to describe the function
+`make-vector'.
`C-h f' is often useful just to verify that you have the right
-spelling for the function name. If `C-h f' mentions a default in the
-prompt, you have typed the name of a defined Lisp function. If that is
-what you wanted to know, just type `C-g' to cancel the `C-h f' command
-and continue editing.
+spelling for the function name. If `C-h f' mentions a name from the
+buffer as the default, that name must be defined as a Lisp function. If
+that is all you want to know, just type `C-g' to cancel the `C-h f'
+command, then go on editing.
- `C-h w COMMAND <RET>' (`where-s') tells you what keys are bound to
+ `C-h w COMMAND <RET>' (`where-is') tells you what keys are bound to
COMMAND. It prints a list of the keys in the echo area. Alternatively,
it informs you that a command is not bound to any keys, which implies
that you must use `M-x' to call the command.
around or before point, if that is the name of a known Lisp variable.
*Note Variables::.
+\1f
+File: xemacs.info, Node: Apropos, Next: Library Keywords, Prev: Name Help, Up: Help
+
Apropos
=======
-`C-h a'
+`C-h A'
Show only symbols that are names of commands (`command-apropos').
`M-x apropos REGEXP'
Show all symbols whose names comtain matches for REGEXP.
- It is possible to ask a question like, "What are the commands for
-working with files?" To do this, type `C-h a file <RET>', which
-displays a list of all command names that contain `file', such as
-`copy-file', `find-file', and so on. With each command name a brief
-description of its use and information on the keys you can use to
-invoke it is displayed. For example, you would be informed that you
-can invoke `find-file' by typing `C-x C-f'. The `a' in `C-h a' stands
-for `Apropos'; `C-h a' runs the Lisp function `command-apropos'.
-
- Because `C-h a' looks only for functions whose names contain the
+ A more sophisticated sort of question to ask is, "What are the
+commands for working with files?" To ask this question, type `C-h a
+file <RET>', which displays a list of all command names that contain
+`file', including `copy-file', `find-file', and so on. With each
+command name appears a brief description of how to use the command, and
+what keys you can currently invoke it with. For example, it would say
+that you can invoke `find-file' by typing `C-x C-f'. The `A' in `C-h
+A' stands for `Apropos'; `C-h A' runs the command `command-apropos'.
+This command normally checks only commands (interactive functions); if
+you specify a prefix argument, it checks noninteractive functions as
+well.
+
+ Because `C-h A' looks only for functions whose names contain the
string you specify, you must use ingenuity in choosing the string. If
you are looking for commands for killing backwards and `C-h a
-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::).
+kill-backwards <RET>' doesn't reveal any, 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, for more flexibility (*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
-standard Emacs commands. By giving you a feeling for the naming
-conventions, this set of arguments can also help you develop a
-technique for picking `apropos' strings.
+classes of XEmacs commands, since there are strong conventions for
+naming the standard XEmacs commands. By giving you a feel for the
+naming conventions, this set should also serve to aid you in developing
+a technique for picking `apropos' strings.
char, line, word, sentence, paragraph, region, page, sexp, list,
- defun, buffer, frame, window, file, dir, register, mode,
- beginning, end, forward, backward, next, previous, up, down,
- search, goto, kill, delete, mark, insert, yank, fill, indent, case,
- change, set, what, list, find, view, describe.
+ defun, rect, buffer, frame, window, face, file, dir, register,
+ mode, beginning, end, forward, backward, next, previous, up, down,
+ search, goto, kill, delete, mark, insert, yank, fill, indent,
+ case, change, set, what, list, find, view, describe, default.
To list all Lisp symbols that contain a match for a regexp, not just
the ones that are defined as commands, use the command `M-x apropos'
-instead of `C-h a'.
+instead of `C-h A'. This command does not check key bindings by
+default; specify a numeric argument if you want it to check them.
+
+ The `apropos-documentation' command is like `apropos' except that it
+searches documentation strings for matches for the specified regular
+expression.
+
+ The `apropos-value' command is like `apropos' except that it
+searches symbols' values for matches for the specified regular
+expression. This command does not check function definitions or
+property lists by default; specify a numeric argument if you want it to
+check them.
+
+ If the variable `apropos-do-all' is non-`nil', the commands above
+all behave as if they had been given a prefix argument.
+
+ If you want more information about a function definition, variable or
+symbol property listed in the Apropos buffer, you can click on it with
+`Mouse-2' or move there and type <RET>.
+
+\1f
+File: xemacs.info, Node: Library Keywords, Next: Help Mode, Prev: Apropos, Up: Help
+
+Keyword Search for Lisp Libraries
+=================================
+
+ The `C-h p' command lets you search the standard Emacs Lisp
+libraries by topic keywords. Here is a partial list of keywords you can
+use:
+
+ abbrev abbreviation handling, typing shortcuts, macros
+ bib code related to the `bib' bibliography processor
+ c C, C++, and Objective-C language support
+ calendar calendar and time management support
+ comm communications, networking, remote access to files
+ data support for editing files of data
+ docs support for Emacs documentation
+ dumped files preloaded into Emacs
+ emulations emulations of other editors
+ extensions Emacs Lisp language extensions
+ faces support for multiple fonts
+ frames support for Emacs frames and window systems
+ games games, jokes and amusements
+ hardware support for interfacing with exotic hardware
+ help support for on-line help systems
+ hypermedia support for links between text or other media types
+ i18n internationalization and alternate character-set support
+ internal code for Emacs internals, build process, defaults
+ languages specialized modes for editing programming languages
+ lisp Lisp support, including Emacs Lisp
+ local code local to your site
+ maint maintenance aids for the Emacs development group
+ mail modes for electronic-mail handling
+ matching various sorts of searching and matching
+ mouse mouse support
+ mule multi-language extensions
+ news support for netnews reading and posting
+ oop support for object-oriented programming
+ outlines support for hierarchical outlining
+ processes process, subshell, compilation, and job control support
+ terminals support for terminal types
+ tex code related to the TeX formatter
+ tools programming tools
+ unix front-ends/assistants for, or emulators of, UNIX features
+ vms support code for vms
+ wp word processing
+
+\1f
+File: xemacs.info, Node: Help Mode, Next: Misc Help, Prev: Library Keywords, Up: Help
+
+Help Mode Commands
+==================
+
+ Help buffers provide the commands of View mode (*note Misc File
+Ops::), plus a few special commands of their own.
+
+`<SPC>'
+ Scroll forward.
+
+`<DEL>'
+`<BS>'
+ Scroll backward.
+
+ When a command name (*note Running Commands by Name: M-x.) or
+variable name (*note Variables::) appears in the documentation, it
+normally appears inside paired single-quotes.
+
+\1f
+File: xemacs.info, Node: Misc Help, Prev: Help Mode, Up: Help
Other Help Commands
===================
`C-h i' (`info') runs the Info program, which is used for browsing
-through structured documentation files. The entire Emacs manual is
+through structured documentation files. The entire XEmacs manual is
available within Info. Eventually all the documentation of the GNU
system will be available. Type `h' after entering Info to run a
tutorial on using Info.
+ If you specify a numeric argument, `C-h i' prompts for the name of a
+documentation file. This way, you can browse a file which doesn't have
+an entry in the top-level Info menu. It is also handy when you need to
+get to the documentation quickly, and you know the exact name of the
+file.
+
+ There are two special help commands for accessing XEmacs
+documentation through Info. `C-h C-f FUNCTION <RET>' enters Info and
+goes straight to the documentation of the XEmacs function FUNCTION.
+`C-h C-k KEY' enters Info and goes straight to the documentation of the
+key KEY. These two keys run the commands `Info-elisp-ref' and
+`Info-goto-emacs-key-command-node'.
+
If something surprising happens, and you are not sure what commands
you typed, use `C-h l' (`view-lossage'). `C-h l' prints the last 100
-command characters you typed. If you see commands you don't know, use
-`C-h c' to find out what they do.
+command characters you typed in. If you see commands that you don't
+know, you can use `C-h c' to find out what they do.
- Emacs has several major modes. Each mode redefines a few keys and
+ XEmacs has several major modes. Each mode redefines a few keys and
makes a few other changes in how editing works. `C-h m'
(`describe-mode') prints documentation on the current major mode, which
normally describes all the commands that are changed in this mode.
`C-h b' (`describe-bindings') and `C-h s' (`describe-syntax')
-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,
+present information about the current XEmacs mode that is not covered
+by `C-h m'. `C-h b' displays a list of all the 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'
displays the contents of the syntax table with explanations of each
character's syntax (*note Syntax::).
+ You can get a similar list for a particular prefix key by typing
+`C-h' after the prefix key. (There are a few prefix keys for which
+this does not work--those that provide their own bindings for `C-h'.
+One of these is <ESC>, because `<ESC> C-h' is actually `C-M-h', which
+marks a defun.)
+
The other `C-h' options display various files of useful information.
-`C-h C-w' (`describe-no-warranty') displays details on the complete
-absence of warranty for XEmacs. `C-h n' (`view-emacs-news') displays
-the file `emacs/etc/NEWS', which contains documentation on Emacs
-changes arranged chronologically. `C-h t' (`help-with-tutorial')
-displays the learn-by-doing Emacs tutorial. `C-h C-c'
-(`describe-copying') displays the file `emacs/etc/COPYING', which tells
-you the conditions you must obey in distributing copies of Emacs. `C-h
-C-d' (`describe-distribution') displays another file named
-`emacs/etc/DISTRIB', which tells you how you can order a copy of the
-latest version of Emacs.
+`C-h C-w' (`describe-no-warranty') displays the full details on the
+complete absence of warranty for XEmacs. `C-h n' (`view-emacs-news')
+displays the file `xemacs/etc/NEWS', which contains documentation on
+XEmacs changes arranged chronologically. `C-h F' (`xemacs-local-faq')
+displays local version of the XEmacs
+frequentliy-answered-questions-list. `C-h t' (`help-with-tutorial')
+displays the learn-by-doing XEmacs tutorial. `C-h C-c'
+(`describe-copying') displays the file `xemacs/etc/COPYING', which
+tells you the conditions you must obey in distributing copies of
+XEmacs. `C-h C-d' (`describe-distribution') displays another file named
+`xemacs/etc/DISTRIB', which tells you how you can order a copy of the
+latest version of XEmacs.
\1f
File: xemacs.info, Node: Mark, Next: Mouse Selection, Prev: Help, Up: Top
Edit pull-down menu on it. Since it is also the Emacs region, you can
use Emacs region commands on it.
-\1f
-File: xemacs.info, Node: Additional Mouse Operations, Next: Killing, Prev: Mouse Selection, Up: Top
-
-Additional Mouse Operations
-===========================
-
- XEmacs also provides the following mouse functions. Most of these
-are not bound to mouse gestures by default, but they are provided for
-your customization pleasure. For example, if you wanted `shift-left'
-(that is, holding down the <Shift> key and clicking the left mouse
-button) to delete the character at which you are pointing, then you
-could do this:
-
- (global-set-key '(shift button1) 'mouse-del-char)
-
-`mouse-del-char'
- Delete the character pointed to by the mouse.
-
-`mouse-delete-window'
- Delete the Emacs window that the mouse is on.
-
-`mouse-keep-one-window'
- Select the Emacs window that the mouse is on, then delete all other
- windows on this frame.
-
-`mouse-kill-line'
- Kill the line pointed to by the mouse.
-
-`mouse-line-length'
- Print the length of the line indicated by the pointer.
-
-`mouse-scroll'
- Scroll point to the mouse position.
-
-`mouse-select'
- Select the Emacs window the mouse is on.
-
-`mouse-select-and-split'
- Select the Emacs window mouse is on, then split it vertically in
- half.
-
-`mouse-set-mark'
- Select the Emacs window the mouse is on and set the mark at the
- mouse position. Display the cursor at that position for a second.
-
-`mouse-set-point'
- Select the Emacs window that the mouse is on and move point to the
- mouse position.
-
-`mouse-track'
- Make a selection with the mouse. This is the default binding of
- the left mouse button (<button1>).
-
-`mouse-track-adjust'
- Extend the existing selection. This is the default binding of
- <Shift-button1>.
-
-`mouse-track-and-copy-to-cutbuffer'
- Make a selection like `mouse-track', but also copy it to the cut
- buffer.
-
-`mouse-track-delete-and-insert'
- Make a selection with the mouse and insert it at point. This is
- the default binding of <control-shift-button1>.
-
-`mouse-track-insert'
- Make a selection with the mouse and insert it at point. This is
- the default binding of <control-button1>.
-
-`mouse-window-to-region'
- Narrow a window to the region between the cursor and the mouse
- pointer.
-
- The `M-x mouse-track' command should be bound to a mouse button. If
-you click-and-drag, the selection is set to the region between the
-point of the initial click and the point at which you release the
-button. These positions do not need to be ordered.
-
- If you click-and-release without moving the mouse, the point is
-moved, and the selection is disowned (there will be no selection
-owner.) The mark will be set to the previous position of point.
-
- If you double-click, the selection will extend by symbols instead of
-by characters. If you triple-click, the selection will extend by lines.
-
- If you drag the mouse off the top or bottom of the window, you can
-select pieces of text that are larger than the visible part of the
-buffer; the buffer will scroll as necessary.
-
- The selected text becomes the current X selection, and is also
-copied to the top of the kill ring. Point will be left at the position
-at which you released the button and the mark will be left at the
-initial click position. Bind a mouse click to
-`mouse-track-and-copy-to-cutbuffer' to copy selections to the cut
-buffer. (See also the `mouse-track-adjust' command, on
-`Shift-button1'.)
-
- The `M-x mouse-track-adjust' command should be bound to a mouse
-button. The selection will be enlarged or shrunk so that the point of
-the mouse click is one of its endpoints. This is only meaningful after
-the `mouse-track' command (<button1>) has been executed.
-
- The `M-x mouse-track-delete-and-insert' command is exactly the same
-as the `mouse-track' command on <button1>, except that point is not
-moved; the selected text is immediately inserted after being selected;
-and the text of the selection is deleted.
-
- The `M-x mouse-track-insert' command is exactly the same as the
-`mouse-track' command on <button1>, except that point is not moved; the
-selected text is immediately inserted after being selected; and the
-selection is immediately disowned afterwards.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Additional Mouse Operations, Next: Killing, Prev: Mouse Selection, Up: Top
+
+Additional Mouse Operations
+===========================
+
+ XEmacs also provides the following mouse functions. Most of these
+are not bound to mouse gestures by default, but they are provided for
+your customization pleasure. For example, if you wanted `shift-left'
+(that is, holding down the <Shift> key and clicking the left mouse
+button) to delete the character at which you are pointing, then you
+could do this:
+
+ (global-set-key '(shift button1) 'mouse-del-char)
+
+`mouse-del-char'
+ Delete the character pointed to by the mouse.
+
+`mouse-delete-window'
+ Delete the Emacs window that the mouse is on.
+
+`mouse-keep-one-window'
+ Select the Emacs window that the mouse is on, then delete all other
+ windows on this frame.
+
+`mouse-kill-line'
+ Kill the line pointed to by the mouse.
+
+`mouse-line-length'
+ Print the length of the line indicated by the pointer.
+
+`mouse-scroll'
+ Scroll point to the mouse position.
+
+`mouse-select'
+ Select the Emacs window the mouse is on.
+
+`mouse-select-and-split'
+ Select the Emacs window mouse is on, then split it vertically in
+ half.
+
+`mouse-set-mark'
+ Select the Emacs window the mouse is on and set the mark at the
+ mouse position. Display the cursor at that position for a second.
+
+`mouse-set-point'
+ Select the Emacs window that the mouse is on and move point to the
+ mouse position.
+
+`mouse-track'
+ Make a selection with the mouse. This is the default binding of
+ the left mouse button (<button1>).
+
+`mouse-track-adjust'
+ Extend the existing selection. This is the default binding of
+ <Shift-button1>.
+
+`mouse-track-and-copy-to-cutbuffer'
+ Make a selection like `mouse-track', but also copy it to the cut
+ buffer.
+
+`mouse-track-delete-and-insert'
+ Make a selection with the mouse and insert it at point. This is
+ the default binding of <control-shift-button1>.
+
+`mouse-track-insert'
+ Make a selection with the mouse and insert it at point. This is
+ the default binding of <control-button1>.
+
+`mouse-window-to-region'
+ Narrow a window to the region between the cursor and the mouse
+ pointer.
+
+ The `M-x mouse-track' command should be bound to a mouse button. If
+you click-and-drag, the selection is set to the region between the
+point of the initial click and the point at which you release the
+button. These positions do not need to be ordered.
+
+ If you click-and-release without moving the mouse, the point is
+moved, and the selection is disowned (there will be no selection
+owner.) The mark will be set to the previous position of point.
+
+ If you double-click, the selection will extend by symbols instead of
+by characters. If you triple-click, the selection will extend by lines.
+
+ If you drag the mouse off the top or bottom of the window, you can
+select pieces of text that are larger than the visible part of the
+buffer; the buffer will scroll as necessary.
+
+ The selected text becomes the current X selection, and is also
+copied to the top of the kill ring. Point will be left at the position
+at which you released the button and the mark will be left at the
+initial click position. Bind a mouse click to
+`mouse-track-and-copy-to-cutbuffer' to copy selections to the cut
+buffer. (See also the `mouse-track-adjust' command, on
+`Shift-button1'.)
+
+ The `M-x mouse-track-adjust' command should be bound to a mouse
+button. The selection will be enlarged or shrunk so that the point of
+the mouse click is one of its endpoints. This is only meaningful after
+the `mouse-track' command (<button1>) has been executed.
+
+ The `M-x mouse-track-delete-and-insert' command is exactly the same
+as the `mouse-track' command on <button1>, except that point is not
+moved; the selected text is immediately inserted after being selected;
+and the text of the selection is deleted.
+
+ The `M-x mouse-track-insert' command is exactly the same as the
+`mouse-track' command on <button1>, except that point is not moved; the
+selected text is immediately inserted after being selected; and the
+selection is immediately disowned afterwards.
+
+\1f
File: xemacs.info, Node: Killing, Next: Yanking, Prev: Additional Mouse Operations, Up: Top
Deletion and Killing
`scroll-conservatively' to a small value, which will have the result of
overriding the redisplay preemption.
-\1f
-File: xemacs.info, Node: Horizontal Scrolling, Prev: Scrolling, Up: Display
-
-Horizontal Scrolling
-====================
-
-`C-x <'
- Scroll text in current window to the left (`scroll-left').
-
-`C-x >'
- Scroll to the right (`scroll-right').
-
- The text in a window can also be scrolled horizontally. This means
-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
-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.
-
- The command `C-x <' (`scroll-left') scrolls the selected window to
-the left by N columns with argument N. With no argument, it scrolls by
-almost the full width of the window (two columns less, to be precise).
-`C-x >' (`scroll-right') scrolls similarly to the right. The window
-cannot be scrolled any farther to the right once it is displaying
-normally (with each line starting at the window's left margin);
-attempting to do so has no effect.
-
-\1f
-File: xemacs.info, Node: Selective Display, Next: Display Vars, Prev: Display, Up: Display
-
-Selective Display
-=================
-
- XEmacs can hide lines indented more than a certain number of columns
-(you specify how many columns). This allows you to get an overview of
-a part of a program.
-
- To hide lines, type `C-x $' (`set-selective-display') with a numeric
-argument N. (*Note Arguments::, for information on giving the
-argument.) Lines with at least N columns of indentation disappear from
-the screen. The only indication of their presence are three dots
-(`...'), which appear at the end of each visible line that is followed
-by one or more invisible ones.
-
- The invisible lines are still present in the buffer, and most editing
-commands see them as usual, so it is very easy to put point in the
-middle of invisible text. When this happens, the cursor appears at the
-end of the previous line, after the three dots. If point is at the end
-of the visible line, before the newline that ends it, the cursor
-appears before the three dots.
-
- The commands `C-n' and `C-p' move across the invisible lines as if
-they were not there.
-
- To make everything visible again, type `C-x $' with no argument.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Horizontal Scrolling, Prev: Scrolling, Up: Display
+
+Horizontal Scrolling
+====================
+
+`C-x <'
+ Scroll text in current window to the left (`scroll-left').
+
+`C-x >'
+ Scroll to the right (`scroll-right').
+
+ The text in a window can also be scrolled horizontally. This means
+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
+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.
+
+ The command `C-x <' (`scroll-left') scrolls the selected window to
+the left by N columns with argument N. With no argument, it scrolls by
+almost the full width of the window (two columns less, to be precise).
+`C-x >' (`scroll-right') scrolls similarly to the right. The window
+cannot be scrolled any farther to the right once it is displaying
+normally (with each line starting at the window's left margin);
+attempting to do so has no effect.
+
+\1f
+File: xemacs.info, Node: Selective Display, Next: Display Vars, Prev: Display, Up: Display
+
+Selective Display
+=================
+
+ XEmacs can hide lines indented more than a certain number of columns
+(you specify how many columns). This allows you to get an overview of
+a part of a program.
+
+ To hide lines, type `C-x $' (`set-selective-display') with a numeric
+argument N. (*Note Arguments::, for information on giving the
+argument.) Lines with at least N columns of indentation disappear from
+the screen. The only indication of their presence are three dots
+(`...'), which appear at the end of each visible line that is followed
+by one or more invisible ones.
+
+ The invisible lines are still present in the buffer, and most editing
+commands see them as usual, so it is very easy to put point in the
+middle of invisible text. When this happens, the cursor appears at the
+end of the previous line, after the three dots. If point is at the end
+of the visible line, before the newline that ends it, the cursor
+appears before the three dots.
+
+ The commands `C-n' and `C-p' move across the invisible lines as if
+they were not there.
+
+ To make everything visible again, type `C-x $' with no argument.
+
+\1f
File: xemacs.info, Node: Display Vars, Prev: Selective Display, Up: Display
Variables Controlling Display
the files in it.
* Misc File Ops:: Other things you can do on files.
-\1f
-File: xemacs.info, Node: File Names, Next: Visiting, Prev: Files, Up: Files
-
-File Names
-==========
-
- Most Emacs commands that operate on a file require you to specify the
-file name. (Saving and reverting are exceptions; the buffer knows which
-file name to use for them.) File names are specified in the minibuffer
-(*note Minibuffer::). "Completion" is available, to make it easier to
-specify long file names. *Note Completion::.
-
- There is always a "default file name" which is used if you enter an
-empty argument by typing just <RET>. Normally the default file name is
-the name of the file visited in the current buffer; this makes it easy
-to operate on that file with any of the Emacs file commands.
-
- Each buffer has a default directory, normally the same as the
-directory of the file visited in that buffer. When Emacs reads a file
-name, the default directory is used if you do not specify a directory.
-If you specify a directory in a relative fashion, with a name that does
-not start with a slash, it is interpreted with respect to the default
-directory. The default directory of the current buffer is kept in the
-variable `default-directory', which has a separate value in every
-buffer. The value of the variable should end with a slash.
-
- For example, if the default file name is `/u/rms/gnu/gnu.tasks' then
-the default directory is `/u/rms/gnu/'. If you type just `foo', which
-does not specify a directory, it is short for `/u/rms/gnu/foo'.
-`../.login' would stand for `/u/rms/.login'. `new/foo' would stand for
-the filename `/u/rms/gnu/new/foo'.
-
- The variable `default-directory-alist' takes an alist of major modes
-and their opinions on `default-directory' as a Lisp expression to
-evaluate. A resulting value of `nil' is ignored in favor of
-`default-directory'.
-
- You can create a new directory with the function `make-directory',
-which takes as an argument a file name string. The current directory is
-displayed in the minibuffer when the function is called; you can delete
-the old directory name and supply a new directory name. For example, if
-the current directory is `/u/rms/gnu', you can delete `gnu' and type
-`oryx' and <RET> to create `/u/rms/oryx'. Removing a directory is
-similar to creating one. To remove a directory, use
-`remove-directory'; it takes one argument, a file name string.
-
- The command `M-x pwd' prints the current buffer's default directory,
-and the command `M-x cd' sets it (to a value read using the
-minibuffer). A buffer's default directory changes only when the `cd'
-command is used. A file-visiting buffer's default directory is
-initialized to the directory of the file that is visited there. If a
-buffer is created with `C-x b', its default directory is copied from
-that of the buffer that was current at the time.
-
- The default directory name actually appears in the minibuffer when
-the minibuffer becomes active to read a file name. This serves two
-purposes: it shows you what the default is, so that you can type a
-relative file name and know with certainty what it will mean, and it
-allows you to edit the default to specify a different directory. To
-inhibit the insertion of the default directory, set the variable
-`insert-default-directory' to `nil'.
-
- Note that it is legitimate to type an absolute file name after you
-enter the minibuffer, ignoring the presence of the default directory
-name. The final minibuffer contents may look invalid, but that is not
-so. *Note Minibuffer File::.
-
- `$' in a file name is used to substitute environment variables. For
-example, if you have used the shell command `setenv FOO rms/hacks' to
-set up an environment variable named `FOO', then you can use
-`/u/$FOO/test.c' or `/u/${FOO}/test.c' as an abbreviation for
-`/u/rms/hacks/test.c'. The environment variable name consists of all
-the alphanumeric characters after the `$'; alternatively, it may be
-enclosed in braces after the `$'. Note that the `setenv' command
-affects Emacs only if done before Emacs is started.
-
- To access a file with `$' in its name, type `$$'. This pair is
-converted to a single `$' at the same time variable substitution is
-performed for single `$'. The Lisp function that performs the
-substitution is called `substitute-in-file-name'. The substitution is
-performed only on filenames read as such using the minibuffer.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: File Names, Next: Visiting, Prev: Files, Up: Files
+
+File Names
+==========
+
+ Most Emacs commands that operate on a file require you to specify the
+file name. (Saving and reverting are exceptions; the buffer knows which
+file name to use for them.) File names are specified in the minibuffer
+(*note Minibuffer::). "Completion" is available, to make it easier to
+specify long file names. *Note Completion::.
+
+ There is always a "default file name" which is used if you enter an
+empty argument by typing just <RET>. Normally the default file name is
+the name of the file visited in the current buffer; this makes it easy
+to operate on that file with any of the Emacs file commands.
+
+ Each buffer has a default directory, normally the same as the
+directory of the file visited in that buffer. When Emacs reads a file
+name, the default directory is used if you do not specify a directory.
+If you specify a directory in a relative fashion, with a name that does
+not start with a slash, it is interpreted with respect to the default
+directory. The default directory of the current buffer is kept in the
+variable `default-directory', which has a separate value in every
+buffer. The value of the variable should end with a slash.
+
+ For example, if the default file name is `/u/rms/gnu/gnu.tasks' then
+the default directory is `/u/rms/gnu/'. If you type just `foo', which
+does not specify a directory, it is short for `/u/rms/gnu/foo'.
+`../.login' would stand for `/u/rms/.login'. `new/foo' would stand for
+the filename `/u/rms/gnu/new/foo'.
+
+ The variable `default-directory-alist' takes an alist of major modes
+and their opinions on `default-directory' as a Lisp expression to
+evaluate. A resulting value of `nil' is ignored in favor of
+`default-directory'.
+
+ You can create a new directory with the function `make-directory',
+which takes as an argument a file name string. The current directory is
+displayed in the minibuffer when the function is called; you can delete
+the old directory name and supply a new directory name. For example, if
+the current directory is `/u/rms/gnu', you can delete `gnu' and type
+`oryx' and <RET> to create `/u/rms/oryx'. Removing a directory is
+similar to creating one. To remove a directory, use
+`remove-directory'; it takes one argument, a file name string.
+
+ The command `M-x pwd' prints the current buffer's default directory,
+and the command `M-x cd' sets it (to a value read using the
+minibuffer). A buffer's default directory changes only when the `cd'
+command is used. A file-visiting buffer's default directory is
+initialized to the directory of the file that is visited there. If a
+buffer is created with `C-x b', its default directory is copied from
+that of the buffer that was current at the time.
+
+ The default directory name actually appears in the minibuffer when
+the minibuffer becomes active to read a file name. This serves two
+purposes: it shows you what the default is, so that you can type a
+relative file name and know with certainty what it will mean, and it
+allows you to edit the default to specify a different directory. To
+inhibit the insertion of the default directory, set the variable
+`insert-default-directory' to `nil'.
+
+ Note that it is legitimate to type an absolute file name after you
+enter the minibuffer, ignoring the presence of the default directory
+name. The final minibuffer contents may look invalid, but that is not
+so. *Note Minibuffer File::.
+
+ `$' in a file name is used to substitute environment variables. For
+example, if you have used the shell command `setenv FOO rms/hacks' to
+set up an environment variable named `FOO', then you can use
+`/u/$FOO/test.c' or `/u/${FOO}/test.c' as an abbreviation for
+`/u/rms/hacks/test.c'. The environment variable name consists of all
+the alphanumeric characters after the `$'; alternatively, it may be
+enclosed in braces after the `$'. Note that the `setenv' command
+affects Emacs only if done before Emacs is started.
+
+ To access a file with `$' in its name, type `$$'. This pair is
+converted to a single `$' at the same time variable substitution is
+performed for single `$'. The Lisp function that performs the
+substitution is called `substitute-in-file-name'. The substitution is
+performed only on filenames read as such using the minibuffer.
+
+\1f
File: xemacs.info, Node: Visiting, Next: Saving, Prev: File Names, Up: Files
Visiting Files
new backup version is made; that newly made backup is included in the
count in `kept-new-versions'. By default, both variables are 2.
- If `trim-versions-without-asking' is non-`nil', excess middle
-versions are deleted without notification. If it is `nil', the
-default, you are asked whether the excess middle versions should really
-be deleted.
+ If `delete-old-versions' is non-`nil', excess middle versions are
+deleted without notification. If it is `nil', the default, you are
+asked whether the excess middle versions should really be deleted.
You can also use Dired's `.' (Period) command to delete old versions.
*Note Dired::.
log the change with an entry beginning with `#' to avoid putting such
trivia into `ChangeLog'.
-\1f
-File: xemacs.info, Node: Old Versions, Next: VC Status, Prev: Change Logs and VC, Up: Version Control
-
-Examining And Comparing Old Versions
-------------------------------------
-
-`C-x v ~ VERSION <RET>'
- Examine version VERSION of the visited file, in a buffer of its
- own (`vc-version-other-window').
-
-`C-x v ='
- Compare the current buffer contents with the latest checked-in
- version of the file.
-
-`C-u C-x v = FILE <RET> OLDVERS <RET> NEWVERS <RET>'
- Compare the specified two versions of FILE.
-
- You can examine any version of a file by first visiting it, and then
-using `C-x v ~ VERSION <RET>' (`vc-version-other-window'). This puts
-the text of version VERSION in a file named `FILENAME.~VERSION~', then
-visits it in a separate window.
-
- To compare two versions of a file, use the command `C-x v ='
-(`vc-diff').
-
- Plain `C-x v =' compares the current buffer contents (saving them in
-the file if necessary) with the last checked-in version of the file.
-With a prefix argument, `C-x v =' reads a file name and two version
-numbers, then compares those versions of the specified file.
-
- If you supply a directory name instead of the name of a work file,
-this command compares the two specified versions of all registered files
-in that directory and its subdirectories. You can also specify a
-snapshot name (*note Snapshots::) instead of one or both version
-numbers.
-
- You can specify a checked-in version by its number; you can specify
-the most recent checked-in version with an empty version number.
-
- This command works by running the `vcdiff' utility, getting the
-options from the variable `diff-switches'. It displays the output in a
-special buffer in another window. Unlike the `M-x diff' command, `C-x
-v =' does not try to find the changes in the old and new versions.
-This is because one or both versions normally do not exist as files.
-They exist only in the records of the master file. *Note Comparing
-Files::, for more information about `M-x diff'.
-
-\1f
-File: xemacs.info, Node: VC Status, Next: Renaming and VC, Prev: Old Versions, Up: Version Control
-
-VC Status Commands
-------------------
-
- To view the detailed version control status and history of a file,
-type `C-x v l' (`vc-print-log'). It displays the history of changes to
-the current file, including the text of the log entries. The output
-appears in a separate window.
-
- When you are working on a large program, it's often useful to find
-all the files that are currently locked, or all the files maintained in
-version control at all. You can use `C-x v d' (`vc-directory') to show
-all the locked files in or beneath the current directory. This
-includes all files that are locked by any user. `C-u C-x v d' lists
-all files in or beneath the current directory that are maintained with
-version control.
-
- The list of files is displayed as a buffer that uses an augmented
-Dired mode. The names of the users locking various files are shown (in
-parentheses) in place of the owner and group. All the normal Dired
-commands work in this buffer. Most interactive VC commands work also,
-and apply to the file name on the current line.
-
- The `C-x v v' command (`vc-next-action'), when used in the augmented
-Dired buffer, operates on all the marked files (or the file on the
-current line). If it operates on more than one file, it handles each
-file according to its current state; thus, it may check out one file
-and check in another (because it is already checked out). If it has to
-check in any files, it reads a single log entry, then uses that text
-for all the files being checked in. This can be convenient for
-registering or checking in several files at once, as part of the same
-change.
-
-\1f
-File: xemacs.info, Node: Renaming and VC, Next: Snapshots, Prev: VC Status, Up: Version Control
-
-Renaming VC Work Files and Master Files
----------------------------------------
-
- When you rename a registered file, you must also rename its master
-file correspondingly to get proper results. Use `vc-rename-file' to
-rename the source file as you specify, and rename its master file
-accordingly. It also updates any snapshots (*note Snapshots::) that
-mention the file, so that they use the new name; despite this, the
-snapshot thus modified may not completely work (*note Snapshot
-Caveats::).
-
- You cannot use `vc-rename-file' on a file that is locked by someone
-else.
-
-\1f
-File: xemacs.info, Node: Snapshots, Next: Version Headers, Prev: Renaming and VC, Up: Version Control
-
-Snapshots
----------
-
- A "snapshot" is a named set of file versions (one for each
-registered file) that you can treat as a unit. One important kind of
-snapshot is a "release", a (theoretically) stable version of the system
-that is ready for distribution to users.
-
-* Menu:
-
-* Making Snapshots:: The snapshot facilities.
-* Snapshot Caveats:: Things to be careful of when using snapshots.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Old Versions, Next: VC Status, Prev: Change Logs and VC, Up: Version Control
+
+Examining And Comparing Old Versions
+------------------------------------
+
+`C-x v ~ VERSION <RET>'
+ Examine version VERSION of the visited file, in a buffer of its
+ own (`vc-version-other-window').
+
+`C-x v ='
+ Compare the current buffer contents with the latest checked-in
+ version of the file.
+
+`C-u C-x v = FILE <RET> OLDVERS <RET> NEWVERS <RET>'
+ Compare the specified two versions of FILE.
+
+ You can examine any version of a file by first visiting it, and then
+using `C-x v ~ VERSION <RET>' (`vc-version-other-window'). This puts
+the text of version VERSION in a file named `FILENAME.~VERSION~', then
+visits it in a separate window.
+
+ To compare two versions of a file, use the command `C-x v ='
+(`vc-diff').
+
+ Plain `C-x v =' compares the current buffer contents (saving them in
+the file if necessary) with the last checked-in version of the file.
+With a prefix argument, `C-x v =' reads a file name and two version
+numbers, then compares those versions of the specified file.
+
+ If you supply a directory name instead of the name of a work file,
+this command compares the two specified versions of all registered files
+in that directory and its subdirectories. You can also specify a
+snapshot name (*note Snapshots::) instead of one or both version
+numbers.
+
+ You can specify a checked-in version by its number; you can specify
+the most recent checked-in version with an empty version number.
+
+ This command works by running the `vcdiff' utility, getting the
+options from the variable `diff-switches'. It displays the output in a
+special buffer in another window. Unlike the `M-x diff' command, `C-x
+v =' does not try to find the changes in the old and new versions.
+This is because one or both versions normally do not exist as files.
+They exist only in the records of the master file. *Note Comparing
+Files::, for more information about `M-x diff'.
+
+\1f
+File: xemacs.info, Node: VC Status, Next: Renaming and VC, Prev: Old Versions, Up: Version Control
+
+VC Status Commands
+------------------
+
+ To view the detailed version control status and history of a file,
+type `C-x v l' (`vc-print-log'). It displays the history of changes to
+the current file, including the text of the log entries. The output
+appears in a separate window.
+
+ When you are working on a large program, it's often useful to find
+all the files that are currently locked, or all the files maintained in
+version control at all. You can use `C-x v d' (`vc-directory') to show
+all the locked files in or beneath the current directory. This
+includes all files that are locked by any user. `C-u C-x v d' lists
+all files in or beneath the current directory that are maintained with
+version control.
+
+ The list of files is displayed as a buffer that uses an augmented
+Dired mode. The names of the users locking various files are shown (in
+parentheses) in place of the owner and group. All the normal Dired
+commands work in this buffer. Most interactive VC commands work also,
+and apply to the file name on the current line.
+
+ The `C-x v v' command (`vc-next-action'), when used in the augmented
+Dired buffer, operates on all the marked files (or the file on the
+current line). If it operates on more than one file, it handles each
+file according to its current state; thus, it may check out one file
+and check in another (because it is already checked out). If it has to
+check in any files, it reads a single log entry, then uses that text
+for all the files being checked in. This can be convenient for
+registering or checking in several files at once, as part of the same
+change.
+
+\1f
+File: xemacs.info, Node: Renaming and VC, Next: Snapshots, Prev: VC Status, Up: Version Control
+
+Renaming VC Work Files and Master Files
+---------------------------------------
+
+ When you rename a registered file, you must also rename its master
+file correspondingly to get proper results. Use `vc-rename-file' to
+rename the source file as you specify, and rename its master file
+accordingly. It also updates any snapshots (*note Snapshots::) that
+mention the file, so that they use the new name; despite this, the
+snapshot thus modified may not completely work (*note Snapshot
+Caveats::).
+
+ You cannot use `vc-rename-file' on a file that is locked by someone
+else.
+
+\1f
+File: xemacs.info, Node: Snapshots, Next: Version Headers, Prev: Renaming and VC, Up: Version Control
+
+Snapshots
+---------
+
+ A "snapshot" is a named set of file versions (one for each
+registered file) that you can treat as a unit. One important kind of
+snapshot is a "release", a (theoretically) stable version of the system
+that is ready for distribution to users.
+
+* Menu:
+
+* Making Snapshots:: The snapshot facilities.
+* Snapshot Caveats:: Things to be careful of when using snapshots.
+
+\1f
File: xemacs.info, Node: Making Snapshots, Next: Snapshot Caveats, Prev: Snapshots, Up: Snapshots
Making and Using Snapshots
* Recognize Coding:: How XEmacs figures out which conversion to use.
* Specify Coding:: Various ways to choose which conversion to use.
-\1f
-File: xemacs.info, Node: Mule Intro, Next: Language Environments, Prev: Mule, Up: Mule
-
-Introduction to world scripts
-=============================
-
- The users of these scripts have established many more-or-less
-standard coding systems for storing files. XEmacs translates between
-the internal character encoding and various other coding systems when
-reading and writing files, when exchanging data with subprocesses, and
-(in some cases) in the `C-q' command (see below).
-
- The command `C-h h' (`view-hello-file') displays the file
-`etc/HELLO', which shows how to say "hello" in many languages. This
-illustrates various scripts.
-
- Keyboards, even in the countries where these character sets are used,
-generally don't have keys for all the characters in them. So XEmacs
-supports various "input methods", typically one for each script or
-language, to make it convenient to type them.
-
- The prefix key `C-x <RET>' is used for commands that pertain to
-world scripts, coding systems, and input methods.
-
-\1f
-File: xemacs.info, Node: Language Environments, Next: Input Methods, Prev: Mule Intro, Up: Mule
-
-Language Environments
-=====================
-
- All supported character sets are supported in XEmacs buffers if it is
-compile with mule; there is no need to select a particular language in
-order to display its characters in an XEmacs buffer. However, it is
-important to select a "language environment" in order to set various
-defaults. The language environment really represents a choice of
-preferred script (more or less) rather that a choice of language.
-
- The language environment controls which coding systems to recognize
-when reading text (*note Recognize Coding::). This applies to files,
-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.
-
- The command to select a language environment is `M-x
-set-language-environment'. It makes no difference which buffer is
-current when you use this command, because the effects apply globally to
-the XEmacs session. The supported language environments include:
-
- Chinese-BIG5, Chinese-CNS, Chinese-GB, Cyrillic-ISO, English,
- Ethiopic, Greek, Japanese, Korean, Latin-1, Latin-2, Latin-3,
- Latin-4, Latin-5.
-
- Some operating systems let you specify the language you are using by
-setting locale environment variables. XEmacs handles one common special
-case of this: if your locale name for character types contains the
-string `8859-N', XEmacs automatically selects the corresponding
-language environment.
-
- To display information about the effects of a certain language
-environment LANG-ENV, use the command `C-h L LANG-ENV <RET>'
-(`describe-language-environment'). This tells you which languages this
-language environment is useful for, and lists the character sets,
-coding systems, and input methods that go with it. It also shows some
-sample text to illustrate scripts used in this language environment.
-By default, this command describes the chosen language environment.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Mule Intro, Next: Language Environments, Prev: Mule, Up: Mule
+
+Introduction to world scripts
+=============================
+
+ The users of these scripts have established many more-or-less
+standard coding systems for storing files. XEmacs translates between
+the internal character encoding and various other coding systems when
+reading and writing files, when exchanging data with subprocesses, and
+(in some cases) in the `C-q' command (see below).
+
+ The command `C-h h' (`view-hello-file') displays the file
+`etc/HELLO', which shows how to say "hello" in many languages. This
+illustrates various scripts.
+
+ Keyboards, even in the countries where these character sets are used,
+generally don't have keys for all the characters in them. So XEmacs
+supports various "input methods", typically one for each script or
+language, to make it convenient to type them.
+
+ The prefix key `C-x <RET>' is used for commands that pertain to
+world scripts, coding systems, and input methods.
+
+\1f
+File: xemacs.info, Node: Language Environments, Next: Input Methods, Prev: Mule Intro, Up: Mule
+
+Language Environments
+=====================
+
+ All supported character sets are supported in XEmacs buffers if it is
+compile with mule; there is no need to select a particular language in
+order to display its characters in an XEmacs buffer. However, it is
+important to select a "language environment" in order to set various
+defaults. The language environment really represents a choice of
+preferred script (more or less) rather that a choice of language.
+
+ The language environment controls which coding systems to recognize
+when reading text (*note Recognize Coding::). This applies to files,
+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.
+
+ The command to select a language environment is `M-x
+set-language-environment'. It makes no difference which buffer is
+current when you use this command, because the effects apply globally to
+the XEmacs session. The supported language environments include:
+
+ Chinese-BIG5, Chinese-CNS, Chinese-GB, Cyrillic-ISO, English,
+ Ethiopic, Greek, Japanese, Korean, Latin-1, Latin-2, Latin-3,
+ Latin-4, Latin-5.
+
+ Some operating systems let you specify the language you are using by
+setting locale environment variables. XEmacs handles one common special
+case of this: if your locale name for character types contains the
+string `8859-N', XEmacs automatically selects the corresponding
+language environment.
+
+ To display information about the effects of a certain language
+environment LANG-ENV, use the command `C-h L LANG-ENV <RET>'
+(`describe-language-environment'). This tells you which languages this
+language environment is useful for, and lists the character sets,
+coding systems, and input methods that go with it. It also shows some
+sample text to illustrate scripts used in this language environment.
+By default, this command describes the chosen language environment.
+
+\1f
File: xemacs.info, Node: Input Methods, Next: Select Input Method, Prev: Language Environments, Up: Mule
Input Methods
* Motion: Outline Motion. Special commands for moving through outlines.
* Visibility: Outline Visibility. Commands to control what is visible.
-\1f
-File: xemacs.info, Node: Outline Format, Next: Outline Motion, Prev: Outline Mode, Up: Outline Mode
-
-Format of Outlines
-..................
-
- Outline mode assumes that the lines in the buffer are of two types:
-"heading lines" and "body lines". A heading line represents a topic in
-the outline. Heading lines start with one or more stars; the number of
-stars determines the depth of the heading in the outline structure.
-Thus, a heading line with one star is a major topic; all the heading
-lines with two stars between it and the next one-star heading are its
-subtopics; and so on. Any line that is not a heading line is a body
-line. Body lines belong to the preceding heading line. Here is an
-example:
-
- * Food
-
- This is the body,
- which says something about the topic of food.
-
- ** Delicious Food
-
- This is the body of the second-level header.
-
- ** Distasteful Food
-
- This could have
- a body too, with
- several lines.
-
- *** Dormitory Food
-
- * Shelter
-
- A second first-level topic with its header line.
-
- A heading line together with all following body lines is called
-collectively an "entry". A heading line together with all following
-deeper heading lines and their body lines is called a "subtree".
-
- You can customize the criterion for distinguishing heading lines by
-setting the variable `outline-regexp'. Any line whose beginning has a
-match for this regexp is considered a heading line. Matches that start
-within a line (not at the beginning) do not count. The length of the
-matching text determines the level of the heading; longer matches make
-a more deeply nested level. Thus, for example, if a text formatter has
-commands `@chapter', `@section' and `@subsection' to divide the
-document into chapters and sections, you can make those lines count as
-heading lines by setting `outline-regexp' to
-`"@chap\\|@\\(sub\\)*section"'. Note the trick: the two words
-`chapter' and `section' are the same length, but by defining the regexp
-to match only `chap' we ensure that the length of the text matched on a
-chapter heading is shorter, so that Outline mode will know that
-sections are contained in chapters. This works as long as no other
-command starts with `@chap'.
-
- Outline mode makes a line invisible by changing the newline before it
-into an ASCII Control-M (code 015). Most editing commands that work on
-lines treat an invisible line as part of the previous line because,
-strictly speaking, it is part of that line, since there is no longer a
-newline in between. When you save the file in Outline mode, Control-M
-characters are saved as newlines, so the invisible lines become ordinary
-lines in the file. Saving does not change the visibility status of a
-line inside Emacs.
-
* update-elc.sh (ignore_dirs): Ignore lisp/utf-2000 subdirectory.
+2000-05-01 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.33 is released.
+
+2000-04-19 Martin Buchholz <martin@xemacs.org>
+
+ * gnuclient.c (initialize_signals): Always use full ANSI prototypes.
+
+2000-04-06 Kirill 'Big K' Katsnelson <kkm@dtmx.com>
+
+ * i.c: New file, source for the i utility.
+
+2000-03-22 Mike Alexander <mta@arbortext.com>
+
+ * make-dump-id.c (gettimeofday): new (Windows only)
+
+2000-03-20 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.32 is released.
+
+2000-03-20 Martin Buchholz <martin@xemacs.org>
+
+ * make-dump-id.c: Use config.h and systime.h for portability.
+
+2000-02-20 Olivier Galibert <galibert@pobox.com>
+
+ * make-dump-id.c: Added.
+
+ * Makefile.in.in: Add support for make-dump-id.
+
+2000-03-12 Ben Wing <ben@xemacs.org>
+
+ * etags.c (canonicalize_filename): fixed a problem with gratuitous
+ capitalization of file names under MS Windows.
+
+2000-02-23 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.31 is released.
+
+2000-02-21 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.30 is released.
+
+2000-02-16 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.29 is released.
+
+2000-02-13 Martin Buchholz <martin@xemacs.org>
+
+ * etags.c: Upgrade to version 13.44.
+ Only added (unsigned char) casts to calls like isspace (*cp).
+
2000-02-07 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.28 is released.
make-po: ${srcdir}/make-po.c
$(CC) $(cflags) ${srcdir}/make-po.c $(ldflags) -o $@
+make-dump-id: ${srcdir}/make-dump-id.c
+ $(CC) $(cflags) ${srcdir}/make-dump-id.c $(ldflags) -o $@
+
cflags_gnuserv = $(CFLAGS) $(cppflags) $(c_switch_all)
ldflags_gnuserv = $(LDFLAGS) $(ld_switch_all) @libs_xauth@ $(ld_libs_general)
gnuslib.o: ${srcdir}/gnuslib.c ${srcdir}/gnuserv.h ../src/config.h
static void *xmalloc (size_t);
static void *xrealloc (void *, size_t);
static void skip_to_lf (FILE *stream);
-static void fatal (CONST char *s1, CONST char *s2);
-static void error (CONST char *s1, CONST char *s2);
+static void fatal (const char *s1, const char *s2);
+static void error (const char *s1, const char *s2);
int
main (int argc, char *argv[])
/* Print error message and exit. */
static void
-fatal (CONST char *s1, CONST char *s2)
+fatal (const char *s1, const char *s2)
{
error (s1, s2);
exit (1);
}
static void
-error (CONST char *s1, CONST char *s2)
+error (const char *s1, const char *s2)
{
fprintf (stderr, "cvtmail: ");
fprintf (stderr, s1, s2);
#endif
static void *xmalloc (size_t);
static void fatal (char *, char *);
-static void add_to_argv (CONST 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);
* arguments, taking quoting into account. This can get ugly.
*/
static void
-add_to_argv (CONST char *str)
+add_to_argv (const char *str)
{
int sm = 0;
- CONST char *s = (CONST char *)0;
+ const char *s = (const char *)0;
- if ((str == (CONST char *)0) || (str[0] == '\0'))
+ if ((str == (const char *)0) || (str[0] == '\0'))
return;
while (*str)
exec_argv[real_argc][l] = '\0';
real_argc++;
sm = 0; /* Back to start state */
- s = (CONST char *)0;
+ s = (const char *)0;
break;
}
else if (*str == '\\')
}
}
- if (s != (CONST char *)0)
+ if (s != (const char *)0)
{
int l = str-s;
exec_argv[real_argc] = xnew (l+2, char);
strncpy (exec_argv[real_argc], s, l);
exec_argv[real_argc][l] = '\0';
real_argc++;
- s = (CONST char *)0;
+ s = (const char *)0;
}
}
* Regexp tags by Tom Tromey.
*
* Francesco Potorti` (pot@gnu.org) is the current maintainer.
- * Ansified by Martin Buchholz, 19991105.
*/
-char pot_etags_version[] = "@(#) pot revision number is 13.33";
+char pot_etags_version[] = "@(#) pot revision number is 13.44";
#define TRUE 1
#define FALSE 0
# define DEBUG FALSE
#endif
+#if defined(__STDC__) && (__STDC__ || defined(__SUNPRO_C))
+# define P_(proto) proto
+#else
+# define P_(proto) ()
+#endif
+
#ifdef HAVE_CONFIG_H
# include <config.h>
/* On some systems, Emacs defines static as nothing for the sake
#endif
#ifdef MSDOS
+# undef MSDOS
+# define MSDOS TRUE
# include <fcntl.h>
# include <sys/param.h>
# include <io.h>
# define DOS_NT
# include <sys/config.h>
# endif
+#else
+# define MSDOS FALSE
#endif /* MSDOS */
#ifdef WINDOWSNT
# include <stdlib.h>
# include <fcntl.h>
# include <string.h>
+# include <direct.h>
# include <io.h>
# define MAXPATHLEN _MAX_PATH
# ifdef HAVE_CONFIG_H
# ifndef HAVE_GETCWD
# define HAVE_GETCWD
# endif /* undef HAVE_GETCWD */
-#endif /* WINDOWSNT */
-
-#if !defined (WINDOWSNT) && defined (STDC_HEADERS)
-#include <stdlib.h>
-#include <string.h>
-#endif
+#else /* !WINDOWSNT */
+# ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <string.h>
+# else
+ extern char *getenv ();
+# endif
+#endif /* !WINDOWSNT */
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#else
-# ifdef HAVE_GETCWD
- extern char *getcwd ();
+# if defined (HAVE_GETCWD) && !WINDOWSNT
+ extern char *getcwd (char *buf, size_t size);
# 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>
typedef int bool;
-typedef void Lang_function ();
+typedef void Lang_function P_((FILE *));
typedef struct
{
/* 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);
+static void Ada_funcs P_((FILE *));
+static void Asm_labels P_((FILE *));
+static void C_entries P_((int c_ext, FILE *));
+static void default_C_entries P_((FILE *));
+static void plain_C_entries P_((FILE *));
+static void Cjava_entries P_((FILE *));
+static void Cobol_paragraphs P_((FILE *));
+static void Cplusplus_entries P_((FILE *));
+static void Cstar_entries P_((FILE *));
+static void Erlang_functions P_((FILE *));
+static void Fortran_functions P_((FILE *));
+static void Yacc_entries P_((FILE *));
+static void Lisp_functions P_((FILE *));
+static void Pascal_functions P_((FILE *));
+static void Perl_functions P_((FILE *));
+static void Postscript_functions P_((FILE *));
+static void Prolog_functions P_((FILE *));
+static void Python_functions P_((FILE *));
+static void Scheme_functions P_((FILE *));
+static void TeX_functions P_((FILE *));
+static void just_read_file P_((FILE *));
+
+static void print_language_names P_((void));
+static void print_version P_((void));
+static void print_help P_((void));
+int main P_((int, char **));
+static int number_len P_((long));
+
+static compressor *get_compressor_from_suffix P_((char *, char **));
+static language *get_language_from_name P_((char *));
+static language *get_language_from_interpreter P_((char *));
+static language *get_language_from_suffix P_((char *));
+static int total_size_of_entries P_((node *));
+static long readline P_((linebuffer *, FILE *));
+static long readline_internal P_((linebuffer *, FILE *));
+static void get_tag P_((char *));
#ifdef ETAGS_REGEXPS
-void analyse_regex (char *regex_arg, bool ignore_case);
-void add_regex (char *regexp_pattern, bool ignore_case, language *lan);
-void free_patterns (void);
+static void analyse_regex P_((char *, bool));
+static void add_regex P_((char *, bool, language *));
+static void free_patterns P_((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 (const char *sp, int c);
-char *etags_strrchr (const char *sp, int 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);
+static void error P_((const char *, const char *));
+static void suggest_asking_for_help P_((void));
+static void fatal P_((char *, char *));
+static void pfatal P_((char *));
+static void add_node P_((node *, node **));
+
+static void init P_((void));
+static void initbuffer P_((linebuffer *));
+static void find_entries P_((char *, FILE *));
+static void free_tree P_((node *));
+static void pfnote P_((char *, bool, char *, int, int, long));
+static void new_pfnote P_((char *, int, bool, char *, int, int, long));
+static void process_file P_((char *));
+static void put_entries P_((node *));
+static void takeprec P_((void));
+
+static char *concat P_((char *, char *, char *));
+static char *skip_spaces P_((char *));
+static char *skip_non_spaces P_((char *));
+static char *savenstr P_((char *, int));
+static char *savestr P_((char *));
+static char *etags_strchr P_((const char *, int));
+static char *etags_strrchr P_((const char *, int));
+static char *etags_getcwd P_((void));
+static char *relative_filename P_((char *, char *));
+static char *absolute_filename P_((char *, char *));
+static char *absolute_dirname P_((char *, char *));
+static bool filename_is_absolute P_((char *f));
+static void canonicalize_filename P_((char *));
+static void grow_linebuffer P_((linebuffer *, int));
+static long *xmalloc P_((unsigned int));
+static long *xrealloc P_((char *, unsigned int));
\f
char searchar = '/'; /* use /.../ searches */
bool _wht[CHARS], _nin[CHARS], _itk[CHARS], _btk[CHARS], _etk[CHARS];
char
/* white chars */
- *white = " \f\t\n\r",
+ *white = " \f\t\n\r\v",
/* not in a name */
*nonam = " \f\t\n\r(=,[;",
/* token ending chars */
Compressed files are supported using gzip and bzip2.");
}
-#ifdef XEMACS
-# define EMACS_NAME "XEmacs"
-#else
+#ifndef EMACS_NAME
# define EMACS_NAME "GNU Emacs"
#endif
-
#ifndef VERSION
-# define VERSION "20"
+# define VERSION "21"
#endif
static void
print_version ()
{
- printf ("%s (" EMACS_NAME " %s)\n", (CTAGS) ? "ctags" : "etags", VERSION);
+ printf ("%s (%s %s)\n", (CTAGS) ? "ctags" : "etags", EMACS_NAME, VERSION);
puts ("Copyright (C) 1999 Free Software Foundation, Inc. and Ken Arnold");
puts ("This program is distributed under the same terms as Emacs");
#include <rmsdef.h>
#include <descrip.h>
#define OUTSIZE MAX_FILE_SPEC_LEN
-short
+static short
fn_exp (out, in)
vspec *out;
char *in;
v1.01 nmm 19-Aug-85 gfnames - return in successive calls the
name of each file specified by the provided arg expanding wildcards.
*/
-char *
+static char *
gfnames (arg, p_error)
char *arg;
bool *p_error;
* and EXTPTR is not significant.
* Idea by Vladimir Alexiev <vladimir@cs.ualberta.ca>
*/
-compressor *
+static compressor *
get_compressor_from_suffix (file, extptr)
char *file;
char **extptr;
/* 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 */
-#ifdef MSDOS
do
{
for (compr = compressors; compr->suffix != NULL; compr++)
if (streq (compr->suffix, suffix))
return compr;
+ if (!MSDOS)
+ break; /* do it only once: not really a loop */
if (extptr != NULL)
*extptr = ++suffix;
} while (*suffix != '\0');
-#else
- for (compr = compressors; compr->suffix != NULL; compr++)
- if (streq (compr->suffix, suffix))
- return compr;
-#endif
-
return NULL;
}
/*
* Return a language given the name.
*/
-language *
+static language *
get_language_from_name (name)
char *name;
{
/*
* Return a language given the interpreter name.
*/
-language *
+static language *
get_language_from_interpreter (interpreter)
char *interpreter;
{
/*
* Return a language given the file name.
*/
-language *
+static language *
get_language_from_suffix (file)
char *file;
{
/*
* This routine is called on each file argument.
*/
-void
+static void
process_file (file)
char *file;
{
compressed_name = concat (file, ".", compr->suffix);
if (stat (compressed_name, &stat_buf) != 0)
{
-#ifdef MSDOS
- char *suf = compressed_name + strlen (file);
- size_t suflen = strlen (compr->suffix) + 1;
- for ( ; suf[1]; suf++, suflen--)
+ if (MSDOS)
{
- memmove (suf, suf + 1, suflen);
- if (stat (compressed_name, &stat_buf) == 0)
+ char *suf = compressed_name + strlen (file);
+ size_t suflen = strlen (compr->suffix) + 1;
+ for ( ; suf[1]; suf++, suflen--)
{
- real_name = compressed_name;
- break;
+ memmove (suf, suf + 1, suflen);
+ if (stat (compressed_name, &stat_buf) == 0)
+ {
+ real_name = compressed_name;
+ break;
+ }
}
- }
- if (real_name != NULL)
- break;
-#endif
+ if (real_name != NULL)
+ break;
+ } /* MSDOS */
free (compressed_name);
compressed_name = NULL;
}
* subscripted by the chars in "white" are set to TRUE. Thus "_wht"
* of a char is TRUE if it is the string "white", else FALSE.
*/
-void
+static void
init ()
{
register char *sp;
iswhite(i) = notinname(i) = begtoken(i) = intoken(i) = endtoken(i) = FALSE;
for (sp = white; *sp != '\0'; sp++) iswhite (*sp) = TRUE;
for (sp = nonam; *sp != '\0'; sp++) notinname (*sp) = TRUE;
- for (sp = begtk; *sp != '\0'; sp++) begtoken (*sp) = TRUE;
- for (sp = midtk; *sp != '\0'; sp++) intoken (*sp) = TRUE;
- for (sp = endtk; *sp != '\0'; sp++) endtoken (*sp) = TRUE;
- iswhite('\0') = iswhite('\n');
notinname('\0') = notinname('\n');
+ for (sp = begtk; *sp != '\0'; sp++) begtoken (*sp) = TRUE;
begtoken('\0') = begtoken('\n');
+ for (sp = midtk; *sp != '\0'; sp++) intoken (*sp) = TRUE;
intoken('\0') = intoken('\n');
+ for (sp = endtk; *sp != '\0'; sp++) endtoken (*sp) = TRUE;
endtoken('\0') = endtoken('\n');
}
*/
node *last_node = NULL;
-void
+static void
find_entries (file, inf)
char *file;
FILE *inf;
}
\f
/* Record a tag. */
-void
+static void
pfnote (name, is_func, linestart, linelen, lno, cno)
char *name; /* tag name, or NULL if unnamed */
bool is_func; /* tag is a function */
* `nonam'.
*/
#define traditional_tag_style TRUE
-void
+static void
new_pfnote (name, namelen, is_func, linestart, linelen, lno, cno)
char *name; /* tag name, or NULL if unnamed */
int namelen; /* tag length */
* free_tree ()
* recurse on left children, iterate on right children.
*/
-void
+static void
free_tree (np)
register node *np;
{
* add_node is the only function allowed to add nodes, so it can
* maintain state.
*/
-void
+static void
add_node (np, cur_node_p)
node *np, **cur_node_p;
{
}
}
\f
-void
+static void
put_entries (np)
register node *np;
{
* is irrelevant with the new tags.el, but is still supplied for
* backward compatibility.
*/
-int
+static int
total_size_of_entries (np)
register node *np;
{
st_C_struct, st_C_extern, st_C_enum, st_C_define, st_C_typedef, st_C_typespec
};
+static unsigned int hash P_((const char *, unsigned int));
+static struct C_stab_entry * in_word_set P_((const char *, unsigned int));
+static enum sym_type C_symtype P_((char *, int, int));
+
/* Feed stuff between (but not including) %[ and %] lines to:
gperf -c -k 1,3 -o -p -r -t
%[
*/
int methodlen;
+static bool consider_token P_((char *, int, int, int, int, int, bool *));
+static void make_C_tag P_((bool));
+
/*
* consider_token ()
* checks to see if the current token is at the start of a
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 */
- register char c; /* IN: first char after the token */
+ register int c; /* IN: first char after the token */
int c_ext; /* IN: C extensions mask */
int cblev; /* IN: curly brace level */
int parlev; /* IN: parenthesis level */
}
-void
+static void
C_entries (c_ext, inf)
int c_ext; /* extension of C */
FILE *inf; /* input file */
if (*lp != '\0')
lp += 1;
while (*lp != '\0'
- && !isspace (*lp) && *lp != '(')
+ && !iswhite (*lp) && *lp != '(')
lp += 1;
c = *lp++;
toklen += lp - oldlp;
* Process either a C++ file or a C file depending on the setting
* of a global flag.
*/
-void
+static void
default_C_entries (inf)
FILE *inf;
{
}
/* Always do plain ANSI C. */
-void
+static void
plain_C_entries (inf)
FILE *inf;
{
}
/* Always do C++. */
-void
+static void
Cplusplus_entries (inf)
FILE *inf;
{
}
/* Always do Java. */
-void
+static void
Cjava_entries (inf)
FILE *inf;
{
}
/* Always do C*. */
-void
+static void
Cstar_entries (inf)
FILE *inf;
{
}
/* Always do Yacc. */
-void
+static void
Yacc_entries (inf)
FILE *inf;
{
* Read a file, but do no processing. This is used to do regexp
* matching on files that have no language defined.
*/
-void
+static void
just_read_file (inf)
FILE *inf;
{
\f
/* Fortran parsing */
+static bool tail P_((char *));
+static void takeprec P_((void));
+static void getit P_((FILE *));
+
static bool
tail (cp)
char *cp;
return FALSE;
}
-void
+static void
takeprec ()
{
dbp = skip_spaces (dbp);
dbp += 3;
return;
}
- if (!isdigit (*dbp))
+ if (!isdigit ((unsigned char) *dbp))
{
--dbp; /* force failure */
return;
}
do
dbp++;
- while (isdigit (*dbp));
+ while (isdigit ((unsigned char) *dbp));
}
static void
dbp += 6;
dbp = skip_spaces (dbp);
}
- if (!isalpha (*dbp) && *dbp != '_' && *dbp != '$')
+ if (!isalpha ((unsigned char) *dbp) && *dbp != '_' && *dbp != '$')
return;
for (cp = dbp + 1; *cp != '\0' && intoken (*cp); cp++)
continue;
}
-void
+static void
Fortran_functions (inf)
FILE *inf;
{
* Philippe Waroquiers <philippe.waroquiers@eurocontrol.be>, 1998-04-24
* Ada parsing
*/
+
+static void adagetit P_((FILE *, char *));
+
/* Once we are positioned after an "interesting" keyword, let's get
the real tag value necessary. */
static void
dbp = skip_spaces (dbp);
for (cp = dbp;
(*cp != '\0'
- && (isalpha (*cp) || isdigit (*cp) || *cp == '_' || *cp == '.'));
+ && (isalpha ((unsigned char) *cp) || isdigit ((unsigned char) *cp) || *cp == '_' || *cp == '.'));
cp++)
continue;
if (cp == dbp)
}
}
-void
+static void
Ada_funcs (inf)
FILE *inf;
{
* Unix and microcontroller assembly tag handling
* look for '^[a-zA-Z_.$][a-zA_Z0-9_.$]*[: ^I^J]'
*/
-void
+static void
Asm_labels (inf)
FILE *inf;
{
{
/* If first char is alphabetic or one of [_.$], test for colon
following identifier. */
- if (isalpha (*cp) || *cp == '_' || *cp == '.' || *cp == '$')
+ if (isalpha ((unsigned char) *cp) || *cp == '_' || *cp == '.' || *cp == '$')
{
/* Read past label. */
cp++;
- while (isalnum (*cp) || *cp == '_' || *cp == '.' || *cp == '$')
+ while (isalnum ((unsigned char) *cp) || *cp == '_' || *cp == '.' || *cp == '$')
cp++;
- if (*cp == ':' || isspace (*cp))
+ if (*cp == ':' || iswhite (*cp))
{
/* Found end of label, so copy it and add it to the table. */
pfnote (savenstr(lb.buffer, cp-lb.buffer), TRUE,
* Perl sub names: look for /^sub[ \t\n]+[^ \t\n{]+/
* Perl variable names: /^(my|local).../
*/
-void
+static void
Perl_functions (inf)
FILE *inf;
{
{
if (*cp++ == 's'
&& *cp++ == 'u'
- && *cp++ == 'b' && isspace (*cp++))
+ && *cp++ == 'b' && iswhite (*cp++))
{
cp = skip_spaces (cp);
if (*cp != '\0')
{
char *sp = cp;
while (*cp != '\0'
- && !isspace (*cp) && *cp != '{' && *cp != '(')
+ && !iswhite (*cp) && *cp != '{' && *cp != '(')
cp++;
pfnote (savenstr (sp, cp-sp), TRUE,
lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
&& *cp++ == 'c'
&& *cp++ == 'a'
&& *cp++ == 'l'))
- && (*cp == '(' || isspace (*cp)))
+ && (*cp == '(' || iswhite (*cp)))
{
/* After "my" or "local", but before any following paren or space. */
char *varname = NULL;
if (*cp == '$' || *cp == '@' || *cp == '%')
{
char* varstart = ++cp;
- while (isalnum (*cp) || *cp == '_')
+ while (isalnum ((unsigned char) *cp) || *cp == '_')
cp++;
varname = savenstr (varstart, cp-varstart);
}
* Python support by Eric S. Raymond <esr@thyrsus.com>
* Look for /^def[ \t\n]+[^ \t\n(:]+/ or /^class[ \t\n]+[^ \t\n(:]+/
*/
-void
+static void
Python_functions (inf)
FILE *inf;
{
{
if (*cp++ == 'd'
&& *cp++ == 'e'
- && *cp++ == 'f' && isspace (*cp++))
+ && *cp++ == 'f' && iswhite (*cp++))
{
cp = skip_spaces (cp);
- while (*cp != '\0' && !isspace (*cp) && *cp != '(' && *cp != ':')
+ while (*cp != '\0' && !iswhite (*cp) && *cp != '(' && *cp != ':')
cp++;
pfnote (NULL, TRUE,
lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
&& *cp++ == 'l'
&& *cp++ == 'a'
&& *cp++ == 's'
- && *cp++ == 's' && isspace (*cp++))
+ && *cp++ == 's' && iswhite (*cp++))
{
cp = skip_spaces (cp);
- while (*cp != '\0' && !isspace (*cp) && *cp != '(' && *cp != ':')
+ while (*cp != '\0' && !iswhite (*cp) && *cp != '(' && *cp != ':')
cp++;
pfnote (NULL, TRUE,
lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
* We could look for anything that could be a paragraph name.
* i.e. anything that starts in column 8 is one word and ends in a full stop.
*/
-void
+static void
Cobol_paragraphs (inf)
FILE *inf;
{
bp += 8;
/* If eoln, compiler option or comment ignore whole line. */
- if (bp[-1] != ' ' || !isalnum (bp[0]))
+ if (bp[-1] != ' ' || !isalnum ((unsigned char) bp[0]))
continue;
- for (ep = bp; isalnum (*ep) || *ep == '-'; ep++)
+ for (ep = bp; isalnum ((unsigned char) *ep) || *ep == '-'; ep++)
continue;
if (*ep++ == '.')
pfnote (savenstr (bp, ep-bp), TRUE,
* "forward" immediately following the procedure statement; if found,
* the tag is skipped.
*/
-void
+static void
Pascal_functions (inf)
FILE *inf;
{
* lisp tag functions
* look for (def or (DEF, quote or QUOTE
*/
+
+static int L_isdef P_((char *));
+static int L_isquote P_((char *));
+static void L_getit P_((void));
+
static int
L_isdef (strp)
register char *strp;
&& (*++strp == 'o' || *strp == 'O')
&& (*++strp == 't' || *strp == 'T')
&& (*++strp == 'e' || *strp == 'E')
- && isspace (*++strp));
+ && iswhite (*++strp));
}
static void
}
for (cp = dbp /*+1*/;
- *cp != '\0' && *cp != '(' && !isspace(*cp) && *cp != ')';
+ *cp != '\0' && *cp != '(' && !iswhite(*cp) && *cp != ')';
cp++)
continue;
if (cp == dbp)
lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
}
-void
+static void
Lisp_functions (inf)
FILE *inf;
{
/* Check for (foo::defmumble name-defined ... */
do
dbp++;
- while (*dbp != '\0' && !isspace (*dbp)
+ while (*dbp != '\0' && !iswhite (*dbp)
&& *dbp != ':' && *dbp != '(' && *dbp != ')');
if (*dbp == ':')
{
* Also look at "defineps" for PSWrap
* suggested by Masatake YAMATO <masata-y@is.aist-nara.ac.jp>
*/
-void
+static void
Postscript_functions (inf)
FILE *inf;
{
* look for (set! xyzzy
*/
-void
+static void
Scheme_functions (inf)
FILE *inf;
{
{
bp = skip_non_spaces (bp);
/* Skip over open parens and white space */
- while (isspace (*bp) || *bp == '(')
+ while (iswhite (*bp) || *bp == '(')
bp++;
get_tag (bp);
}
&& (bp[2] == 'E' || bp[2] == 'e')
&& (bp[3] == 'T' || bp[3] == 't')
&& (bp[4] == '!' || bp[4] == '!')
- && (isspace (bp[5])))
+ && (iswhite (bp[5])))
{
bp = skip_non_spaces (bp);
bp = skip_spaces (bp);
:chapter:section:subsection:subsubsection:eqno:label:ref:cite:bibitem\
:part:appendix:entry:index";
-void TEX_mode (FILE *inf);
-struct TEX_tabent *TEX_decode_env (char *evarname, char *defenv);
-int TEX_Token (char *cp);
+static void TEX_mode P_((FILE *));
+static struct TEX_tabent *TEX_decode_env P_((char *, char *));
+static int TEX_Token P_((char *));
char TEX_esc = '\\';
char TEX_opgrp = '{';
/*
* TeX/LaTeX scanning loop.
*/
-void
+static void
TeX_functions (inf)
FILE *inf;
{
/* Figure out whether TeX's escapechar is '\\' or '!' and set grouping
chars accordingly. */
-void
+static void
TEX_mode (inf)
FILE *inf;
{
/* Read environment and prepend it to the default string.
Build token table. */
-struct TEX_tabent *
+static struct TEX_tabent *
TEX_decode_env (evarname, defenv)
char *evarname;
char *defenv;
Otherwise return -1.
Keep the capital `T' in `token' for dumb truncating compilers
(this distinguishes it from `TEX_toktab' */
-int
+static int
TEX_Token (cp)
char *cp;
{
* Assumes that the predicate starts at column 0.
* Only the first clause of a predicate is added.
*/
-int prolog_pred (char *s, char *last);
-void prolog_skip_comment (linebuffer *plb, FILE *inf);
-int prolog_atom (char *s, int pos);
+static int prolog_pred P_((char *, char *));
+static void prolog_skip_comment P_((linebuffer *, FILE *));
+static int prolog_atom P_((char *, int));
-void
+static void
Prolog_functions (inf)
FILE *inf;
{
{
if (cp[0] == '\0') /* Empty line */
continue;
- else if (isspace (cp[0])) /* Not a predicate */
+ else if (iswhite (cp[0])) /* Not a predicate */
continue;
else if (cp[0] == '/' && cp[1] == '*') /* comment. */
prolog_skip_comment (&lb, inf);
}
-void
+static void
prolog_skip_comment (plb, inf)
linebuffer *plb;
FILE *inf;
* Return the size of the name of the predicate, or 0 if no header
* was found.
*/
-int
+static int
prolog_pred (s, last)
char *s;
char *last; /* Name of last clause. */
* - A quoted arbitrary string. Single quotes can escape themselves.
* Backslash quotes everything.
*/
-int
+static int
prolog_atom (s, pos)
char *s;
int pos;
origpos = pos;
- if (islower(s[pos]) || (s[pos] == '_'))
+ if (islower((unsigned char) s[pos]) || (s[pos] == '_'))
{
/* The atom is unquoted. */
pos++;
- while (isalnum(s[pos]) || (s[pos] == '_'))
+ while (isalnum((unsigned char) s[pos]) || (s[pos] == '_'))
{
pos++;
}
*
* Assumes that Erlang functions start at column 0.
*/
-int erlang_func (char *s, char *last);
-void erlang_attribute (char *s);
-int erlang_atom (char *s, int pos);
+static int erlang_func P_((char *, char *));
+static void erlang_attribute P_((char *));
+static int erlang_atom P_((char *, int));
-void
+static void
Erlang_functions (inf)
FILE *inf;
{
{
if (cp[0] == '\0') /* Empty line */
continue;
- else if (isspace (cp[0])) /* Not function nor attribute */
+ else if (iswhite (cp[0])) /* Not function nor attribute */
continue;
else if (cp[0] == '%') /* comment */
continue;
* Return the size of the name of the function, or 0 if no function
* was found.
*/
-int
+static int
erlang_func (s, last)
char *s;
char *last; /* Name of last clause. */
* -define(Foo(M, N), M+N).
* -record(graph, {vtab = notable, cyclic = true}).
*/
-void
+static void
erlang_attribute (s)
char *s;
{
* Consume an Erlang atom (or variable).
* Return the number of bytes consumed, or -1 if there was an error.
*/
-int
+static int
erlang_atom (s, pos)
char *s;
int pos;
origpos = pos;
- if (isalpha (s[pos]) || s[pos] == '_')
+ if (isalpha ((unsigned char) s[pos]) || s[pos] == '_')
{
/* The atom is unquoted. */
pos++;
- while (isalnum (s[pos]) || s[pos] == '_')
+ while (isalnum ((unsigned char) s[pos]) || s[pos] == '_')
pos++;
return pos - origpos;
}
\f
#ifdef ETAGS_REGEXPS
+static char *scan_separators P_((char *));
+static void analyse_regex P_((char *, bool));
+static void add_regex P_((char *, bool, language *));
+static char *substitute P_((char *, char *, struct re_registers *));
+
/* Take a string like "/blah/" and turn it into "blah", making sure
that the first and last characters are the same, and handling
quoted separator characters. Actually, stops on the occurrence of
/* Look at the argument of --regex or --no-regex and do the right
thing. Same for each line of a regexp file. */
-void
+static void
analyse_regex (regex_arg, ignore_case)
char *regex_arg;
bool ignore_case;
/* Turn a name, which is an ed-style (but Emacs syntax) regular
expression, into a real regular expression by compiling it. */
-void
+static void
add_regex (regexp_pattern, ignore_case, lang)
char *regexp_pattern;
bool ignore_case;
for (t = etags_strchr (out, '\\');
t != NULL;
t = etags_strchr (t + 2, '\\'))
- if (isdigit (t[1]))
+ if (isdigit ((unsigned char) t[1]))
{
dig = t[1] - '0';
diglen = regs->end[dig] - regs->start[dig];
result = xnew (size + 1, char);
for (t = result; *out != '\0'; out++)
- if (*out == '\\' && isdigit (*++out))
+ if (*out == '\\' && isdigit ((unsigned char) *++out))
{
/* Using "dig2" satisfies my debugger. Bleah. */
dig = *out - '0';
}
/* Deallocate all patterns. */
-void
+static void
free_patterns ()
{
pattern *pp;
return;
}
\f
-void
+static void
get_tag (bp)
register char *bp;
{
return;
/* Go till you get to white space or a syntactic break */
for (cp = bp + 1;
- *cp != '\0' && *cp != '(' && *cp != ')' && !isspace (*cp);
+ *cp != '\0' && *cp != '(' && *cp != ')' && !iswhite (*cp);
cp++)
continue;
pfnote (savenstr (bp, cp-bp), TRUE,
#endif /* ETAGS_REGEXPS */
/* Initialize a linebuffer for use */
-void
+static void
initbuffer (lbp)
linebuffer *lbp;
{
* platforms (for text files, it translates CR-NL to NL as it reads in the
* file).
*/
-long
+static long
readline_internal (lbp, stream)
linebuffer *lbp;
register FILE *stream;
* Like readline_internal, above, but in addition try to match the
* input line against relevant regular expressions.
*/
-long
+static long
readline (lbp, stream)
linebuffer *lbp;
FILE *stream;
* Return a pointer to a space of size strlen(cp)+1 allocated
* with xnew where the string CP has been copied.
*/
-char *
+static char *
savestr (cp)
char *cp;
{
* Return a pointer to a space of size LEN+1 allocated with xnew where
* the string CP has been copied for at most the first LEN characters.
*/
-char *
+static char *
savenstr (cp, len)
char *cp;
int len;
/*
* Return the ptr in sp at which the character c last
* appears; NULL if not found
+ *
+ * Identical to POSIX strrchr, included for portability.
*/
-char *
+static char *
etags_strrchr (sp, c)
- const char *sp;
- int c;
+ register const char *sp;
+ register int c;
{
register const char *r;
if (*sp == c)
r = sp;
} while (*sp++);
- return (char *) r;
+ return (char *)r;
}
/*
* Return the ptr in sp at which the character c first
* appears; NULL if not found
+ *
+ * Identical to POSIX strchr, included for portability.
*/
-char *
+static char *
etags_strchr (sp, c)
- const char *sp;
- int c;
+ register const char *sp;
+ register int c;
{
do
{
if (*sp == c)
- return (char *) sp;
+ return (char *)sp;
} while (*sp++);
return NULL;
}
/* Skip spaces, return new pointer. */
-char *
+static char *
skip_spaces (cp)
char *cp;
{
- while (isspace (*cp)) /* isspace('\0')==FALSE */
+ while (iswhite (*cp))
cp++;
return cp;
}
/* Skip non spaces, return new pointer. */
-char *
+static char *
skip_non_spaces (cp)
char *cp;
{
- while (!iswhite (*cp)) /* iswhite('\0')==TRUE */
+ while (*cp != '\0' && !iswhite (*cp))
cp++;
return cp;
}
/* Print error message and exit. */
-void
+static void
fatal (s1, s2)
char *s1, *s2;
{
exit (BAD);
}
-void
+static void
pfatal (s1)
char *s1;
{
exit (BAD);
}
-void
+static void
suggest_asking_for_help ()
{
fprintf (stderr, "\tTry `%s %s' for a complete list of options.\n",
}
/* Print error message. `s1' is printf control string, `s2' is arg for it. */
-void
+static void
error (s1, s2)
const char *s1, *s2;
{
/* Return a newly-allocated string whose contents
concatenate those of s1, s2, s3. */
-char *
+static char *
concat (s1, s2, s3)
char *s1, *s2, *s3;
{
\f
/* Does the same work as the system V getcwd, but does not need to
guess the buffer size in advance. */
-char *
+static char *
etags_getcwd ()
{
#ifdef HAVE_GETCWD
/* Return a newly allocated string containing the file name of FILE
relative to the absolute directory DIR (which should end with a slash). */
-char *
+static char *
relative_filename (file, dir)
char *file, *dir;
{
/* Return a newly allocated string containing the absolute file name
of FILE given DIR (which should end with a slash). */
-char *
+static char *
absolute_filename (file, dir)
char *file, *dir;
{
/* Return a newly allocated string containing the absolute
file name of dir where FILE resides given DIR (which should
end with a slash). */
-char *
+static char *
absolute_dirname (file, dir)
char *file, *dir;
{
/* Whether the argument string is an absolute file name. The argument
string must have been canonicalized with canonicalize_filename. */
-bool
+static bool
filename_is_absolute (fn)
char *fn;
{
}
/* Translate backslashes into slashes. Works in place. */
-void
+static void
canonicalize_filename (fn)
register char *fn;
{
#ifdef DOS_NT
/* Canonicalize drive letter case. */
- if (islower (fn[0]))
+ if (islower (fn[0]) && fn[1] == ':')
fn[0] = toupper (fn[0]);
/* Convert backslashes to slashes. */
for (; *fn != '\0'; fn++)
}
/* Increase the size of a linebuffer. */
-void
+static void
grow_linebuffer (lbp, toksize)
linebuffer *lbp;
int toksize;
}
/* Like malloc but get fatal error if memory is exhausted. */
-long *
+static long *
xmalloc (size)
unsigned int size;
{
return result;
}
-long *
+static long *
xrealloc (ptr, size)
char *ptr;
unsigned int size;
#define MAIL_PROGRAM_NAME "/bin/mail"
#endif
-static CONST char *my_name;
+static const char *my_name;
static char *the_date;
static char *the_user;
static line_list file_preface;
/* Print error message. `s1' is printf control string, `s2' is arg for it. */
static void
-error (CONST char *s1, CONST char *s2)
+error (const char *s1, const char *s2)
{
printf ("%s: ", my_name);
printf (s1, s2);
/* Print error message and exit. */
static void
-fatal (CONST char *s1, CONST char *s2)
+fatal (const char *s1, const char *s2)
{
error (s1, s2);
exit (1);
}
static void
-put_line (CONST char *string)
+put_line (const char *string)
{
register stream_list rem;
for (rem = the_streams;
rem != ((stream_list) NULL);
rem = rem->rest_streams)
{
- CONST char *s = string;
+ const char *s = string;
int column = 0;
/* Divide STRING into lines. */
while (*s != 0)
{
- CONST char *breakpos;
+ const char *breakpos;
/* Find the last char that fits. */
for (breakpos = s; *breakpos && column < 78; ++breakpos)
}
void
-initialize_signals ()
+initialize_signals (void)
{
/* Set up signal handler to pass relevant signals to emacs process.
We used to send SIGSEGV, SIGBUS, SIGPIPE, SIGILL and others to
/* Encase the string in quotes, escape all the backslashes and quotes
in string. */
static char *
-clean_string (CONST char *s)
+clean_string (const char *s)
{
int i = 0;
char *p, *res;
{
- CONST char *const_p;
+ const char *const_p;
for (const_p = s; *const_p; const_p++, i++)
{
if (*const_p == '\\' || *const_p == '\"')
/* A strdup imitation. */
static char *
-my_strdup (CONST char *s)
+my_strdup (const char *s)
{
char *new_s = (char *) malloc (strlen (s) + 1);
if (new_s)
void disconnect_from_ipc_server();
#endif
#if defined(INTERNET_DOMAIN_SOCKETS) || defined(UNIX_DOMAIN_SOCKETS)
-void send_string (int s, CONST char *msg);
+void send_string (int s, const char *msg);
void disconnect_from_server (int s, int echo);
int read_line (int s, char *dest);
#endif
send_string -- send string to socket.
*/
void
-send_string (int s, CONST char *msg)
+send_string (int s, const char *msg)
{
#if 0
if (send(s,msg,strlen(msg),0) < 0) {
c_file
} Current_file_type;
-static int scan_file (CONST char *filename);
+static int scan_file (const char *filename);
static int read_c_string (FILE *, int, int);
-static void write_c_args (FILE *out, CONST char *func, char *buf, int minargs,
+static void write_c_args (FILE *out, const char *func, char *buf, int minargs,
int maxargs);
-static int scan_c_file (CONST char *filename, CONST char *mode);
+static int scan_c_file (const char *filename, const char *mode);
static void skip_white (FILE *);
static void read_lisp_symbol (FILE *, char *);
-static int scan_lisp_file (CONST char *filename, CONST char *mode);
+static int scan_lisp_file (const char *filename, const char *mode);
#define C_IDENTIFIER_CHAR_P(c) \
(('A' <= c && c <= 'Z') || \
/* Print error message. `s1' is printf control string, `s2' is arg for it. */
static void
-error (CONST char *s1, CONST char *s2)
+error (const char *s1, const char *s2)
{
fprintf (stderr, "%s: ", progname);
fprintf (stderr, s1, s2);
/* Print error message and exit. */
static void
-fatal (CONST char *s1, CONST char *s2)
+fatal (const char *s1, const char *s2)
{
error (s1, s2);
exit (1);
/* Return 1 if file is not found, 0 if it is found. */
static int
-scan_file (CONST char *filename)
+scan_file (const char *filename)
{
int len = strlen (filename);
if (ellcc == 0 && len > 4 && !strcmp (filename + len - 4, ".elc"))
MINARGS and MAXARGS are the minimum and maximum number of arguments. */
static void
-write_c_args (FILE *out, CONST char *func, char *buff, int minargs,
+write_c_args (FILE *out, const char *func, char *buff, int minargs,
int maxargs)
{
register char *p;
Accepts any word starting DEF... so it finds DEFSIMPLE and DEFPRED. */
static int
-scan_c_file (CONST char *filename, CONST char *mode)
+scan_c_file (const char *filename, const char *mode)
{
FILE *infile;
register int c;
}
static int
-scan_lisp_file (CONST char *filename, CONST char *mode)
+scan_lisp_file (const char *filename, const char *mode)
{
FILE *infile;
register int c;
#include <stdlib.h>
#include "../src/systime.h"
+#ifdef WINDOWSNT
+#include <sys/timeb.h>
+
+/* Emulate gettimeofday (Ulrich Leodolter, 1/11/95). */
+void
+gettimeofday (struct timeval *tv, struct timezone *tz)
+{
+ struct _timeb tb;
+ _ftime (&tb);
+
+ tv->tv_sec = tb.time;
+ tv->tv_usec = tb.millitm * 1000L;
+ if (tz)
+ {
+ tz->tz_minuteswest = tb.timezone; /* minutes west of Greenwich */
+ tz->tz_dsttime = tb.dstflag; /* type of dst correction */
+ }
+}
+#endif
+
/* Generates an (extremely) pseudo random number for the dump-id */
static unsigned int
generate_dump_id (void)
#define DEFAULT_LOCKING DOTLOCKING
#endif
+#ifndef DISABLE_DIRECT_ACCESS
static void lock_dot(char *);
+#endif
static void unlock_dot(char *);
static int parse_lock_method(char *);
static char *unparse_lock_method(int);
static char *dotlock_filename = NULL;
+#ifndef DISABLE_DIRECT_ACCESS
static void
lock_dot(char *filename)
{
}
strcpy(dotlock_filename, filename);
}
+#endif /* not DISABLE_DIRECT_ACCESS */
static void
unlock_dot(char *filename)
#include <stdlib.h> /* for qsort() and malloc() */
#include <string.h>
static void *xmalloc (size_t);
-#ifndef CONST
-# define CONST const
-#endif
#define NUL '\0'
#define MARKER '\037'
WAITING, BEG_NAME, NAME_GET, BEG_DESC, DESC_GET
};
-CONST char *states[] =
+const char *states[] =
{
"WAITING", "BEG_NAME", "NAME_GET", "BEG_DESC", "DESC_GET"
};
/* sort the array by name; within each name, by type */
qsort ((char*)array, cnt, sizeof (DOCSTR*),
- /* was cast to (int (*)(CONST void *, CONST void *))
- but that loses on HP because CONST_IS_LOSING. */
- /* This one loses too: (int (*)()) */
- /* Ok, so let's try const instead of CONST. Fuck me!!! */
- (int (*)(const void *, const void *))
- cmpdoc);
+ (int (*)(const void *, const void *)) cmpdoc);
/* write the output header */
* files.el (insert-file-contents-literally): Treat file as binary;
call file-name-handlers. [sync with Emacs 20.3.10]
+2000-05-01 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.33 is released.
+
+2000-04-29 Martin Buchholz <martin@xemacs.org>
+
+ * dialog.el (yes-or-no-p-dialog-box):
+ Fix docstring.
+ Fix following horrible bug in X11 mode with focus-follows-mouse:
+ 1. Visit two files in two different frames.
+ 2. do File->Revert Buffer in one of those frames.
+ 3. Dialog box appears.
+ 4. Arrange things so that the mouse passes over the *other*
+ frame, then to the dialog box, and click on "Yes".
+ 5. The file contents end up in the *wrong* buffer!
+ Add TODO comment.
+
+2000-04-28 Ben Wing <ben@xemacs.org>
+
+ * help.el (describe-installation): correct typo introduced
+ in last patch: boundp -> fboundp.
+
+ * etags.el (buffer-tag-table-list):
+ canonicalize filenames to Unix format so that tag-table-alist
+ searching works under Windows.
+
+ * autoload.el:
+ Bowdlerize the supposedly objectionable words
+ "who couldn't quite manage to cleanly modify batch-update-autoloads".
+
+ * gutter-items.el (set-progress-display-style):
+ * gutter-items.el (search-dialog-callback):
+ * gutter-items.el (make-search-dialog):
+ Change to new callback-ex api.
+
+2000-04-26 Björn Torkelsson <torkel@hpc2n.umu.se>
+
+ * help.el: (describe-installation): decode-coding-string is not
+ defined in a non MULE environment.
+
+2000-04-28 Ben Wing <ben@xemacs.org>
+
+ * gutter-items.el (buffer-list-changed-hook):
+ use it, not record-buffer-hook.
+
+ * subr.el (record-buffer-hook): Removed.
+
+2000-04-27 Ben Wing <ben@xemacs.org>
+
+ * gutter-items.el (buffers-tab-switch-to-buffer): do not
+ use NORECORD option. Andy will not like this, but the existing
+ gutter behavior is just wrong, as per this comment:
+
+ ;; this used to add the norecord flag to both calls below.
+ ;; this is bogus because it is a pervasive assumption in XEmacs
+ ;; that the current buffer is at the front of the buffers list.
+ ;; for example, select an item and then do M-C-l
+ ;; (switch-to-other-buffer). Things get way confused.
+ ;;
+ ;; Andy, if you want to maintain the current look, you must
+ ;; *uncouple* the gutter order and buffers order.
+
+ * loaddefs.el (completion-ignored-extensions): unfuckify.
+
+ * bytecomp.el (batch-byte-compile-one-file): new function, used in
+ xemacs.mak.
+
+ * autoload.el (batch-update-one-directory): new function, used in
+ xemacs.mak.
+
+ * loadup.el: set gc-cons-threshold very high unless dumping --
+ loadup during update-elc is much much much faster. also do this
+ when quick-building.
+
+ add commented-out code for profiling loadup.
+
+
+ * update-elc.el (preloaded-file-list): add bytecomp.el, since it
+ is required in order to build xemacs.
+
+2000-04-26 Ben Wing <ben@xemacs.org>
+
+ * loadup.el: don't garbage collect during loadup if quick-build
+ compile-time option is set.
+
+2000-04-23 Ben Wing <ben@xemacs.org>
+
+ * update-elc.el: compute whether any dumped .el or .elc files
+ are newer than the dumped exe, and touch the file ../src/NEEDTODUMP
+ if so.
+
+ * update-elc.el (update-elc-files-to-compile): always change
+ NOBYTECOMPILE in the src directory rather than current dir,
+ so it will work under NT.
+
+ * autoload.el (autoload-trim-file-name): canonicalize to slashes so
+ the form of this file is identical between Unix and Windows.
+ (autoload-target-directory): Fixed to be lisp/ not lisp/prim/.
+ Added comment.
+ (update-autoloads-from-directory): updated doc string.
+ updated doc strings in a few other places.
+
+2000-04-18 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * bytecomp.el (byte-force-recompile): Fix argument to
+ byte-recompile-directory.
+
+2000-04-17 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * gutter-items.el (progress-display-clear-when-idle): Use
+ add-one-shot-hook.
+ * gutter-items.el (clear-progress-display): Adjust number of
+ arguments.
+
+2000-04-13 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * dumped-lisp.el (preloaded-file-list): Always dump select.el.
+
+2000-04-16 Ben Wing <ben@xemacs.org>
+
+ * printer.el: New file.
+
+ * dumped-lisp.el (preloaded-file-list): Declare printer.el.
+
+ * help.el (describe-installation): Fix decoding for Windows.
+
+ * menubar-items.el:
+ * menubar-items.el (default-menubar):
+ * menubar-items.el (tutorials-menu-filter): New.
+ * menubar-items.el (popup-menubar-menu):
+ Add authorship. Redo Help menu and Tutorials filter.
+
+ * menubar.el: Correct comment.
+
+ * modeline.el (modeline-buffer-identification): Correct doc string.
+
+ * simple.el:
+ * simple.el (printing): Removed.
+ * simple.el (printer-name): Removed.
+ * simple.el (generic-print-buffer): Removed.
+ * simple.el (generic-print-region): Removed.
+ Move generic print code to printer.el.
+
+2000-04-15 Ben Wing <ben@xemacs.org>
+
+ * simple.el (generic-print-region): New.
+ make this function actually work.
+ (generic-print-buffer): call generic-print-region.
+
+2000-04-14 Andy Piper <andy@xemacs.org>
+
+ * gutter-items.el (make-search-dialog): avoid unneccessary futzing
+ by using the new widget-callback-current-channel.
+ (search-dialog-callback): ditto.
+
+2000-04-12 Andy Piper <andy@xemacs.org>
+
+ * gutter.el (default-gutter-position): moved from gutter-items.el.
+ (default-gutter-position-changed-hook): ditto.
+ (gutter-element-visibility-changed-hook): ditto.
+ (set-gutter-element): ditto.
+ (remove-gutter-element): ditto.
+ (set-gutter-element-visible-p): ditto.
+ (gutter-element-visible-p): ditto.
+ (init-gutter): ditto.
+
+ * dialog.el (make-dialog-box): renamed and moved from
+ gutter-items.el
+
+ * gutter-items.el: move various functions elsewhere.
+
+2000-04-13 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * menubar-items.el: Fixed place of parenthesis.
+
+2000-04-12 Ben Wing <ben@xemacs.org>
+
+ * etags.el (find-tag-at-point): New. Lets you do find-tag
+ without constantly being prompted for the tag.
+ * simple.el: Added a number of section headings, to clarify the
+ organization of this file.
+ * simple.el (activate-region):
+ * simple.el (region-exists-p):
+ * simple.el (region-active-p):
+ Moved these three function down to the other side of
+ the case-changing functions, so they join the rest of
+ the region code.
+ * simple.el (printing): New.
+ * simple.el (printer-name): New.
+ * simple.el (generic-print-buffer): New.
+ New functions, a very simple prototype for a unified
+ printing interface.
+
+ * process.el (call-process-internal): Real fix for null BUFFER,
+ other problems with BUFFER specs.
+
+ * menubar-items.el:
+ Fixed up File->Print to use new printing functions.
+ Various corrections and expansions to Grep/Compile menus.
+ New options for Printing.
+ New options for SMTP Mail, the way to send mail under
+ MS Windows. (There's also a package patch to make SMTP
+ Mail be the default under MSWin.)
+
+2000-04-09 Jeff Miller <jmiller@cablespeed.com>
+
+ * menubar-items.el: Selecting Rectangle Mousing from menubar
+ did not work. Needed to quote mouse-track-rectangle-p.
+
+2000-04-06 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * cl-compat.el (keywordp): Removed.
+
+2000-04-05 Andy Piper <andy@xemacs.org>
+
+ * gutter-items.el (progress-layout-glyph): don't initialize here.
+ (progress-gauge-glyph): use dynamic sizing.
+ (set-progress-display-style): new function. Set progress glyphs
+ appropriately depending on the style.
+ (progress-display-style): new variable. Custom version of
+ set-progress-display-style.
+ (progress-abort-glyph): switch to dynamic sizes.
+ (search-dialog-text): make the edit field active.
+
+2000-04-04 Andy Piper <andy@xemacs.org>
+
+ * gutter-items.el (make-search-dialog): need to make the search
+ dialog visible after creation.
+
+ * menubar-items.el (default-menubar): use the search dialog for
+ searching. Remove some extraneous search menu items.
+
+ * gutter-items.el (set-gutter-element): allow glyphs to be used as
+ well as strings.
+ (make-gutter-only-dialog-frame): allow the user to create the
+ frame unmapped. Allow the gutter spec to be given as a glyph.
+ (search-dialog-direction): new variable.
+ (search-dialog-text): new variable.
+ (search-dialog-callback): new function. Callback for the search
+ dialog action.
+ (make-search-dialog): new function. Create a user-friendly search
+ dialog.
+
+2000-04-04 Hrvoje Niksic <hniksic@iskon.hr>
+
+ * faces.el (set-face-stipple): Use mswindows-bitmap-file-path
+ under Windows.
+
+2000-04-01 Andy Piper <andy@xemacs.org>
+
+ * font-lock.el (font-lock-fontify-keywords-region): Calculate
+ progress more accurately.
+
+2000-02-02 Hirokazu FUKUI <hfukui@sannet.ne.jp>
+
+ * finder.el (finder-compile-keywords): Process readable files only.
+ Because error in process of .#finder-inf.el when compile xemacs
+ with --with-clash-detection option.
+
+2000-03-31 Andy Piper <andy@xemacs.org>
+
+ * gutter-items.el (append-progress-display): don't delay after a
+ successful font-lock.
+ (make-gutter-only-dialog-frame): new function. Allow users to
+ create gutter-only dialogs.
+
+2000-03-27 Mike Alexander <mta@arbortext.com>
+
+ * process.el (call-process-internal): Handle a null BUFFER
+ parameter correctly.
+
+2000-03-28 Andy Piper <andy@xemacs.org>
+
+ * gutter-items.el (abort-progress-display): put strings in the
+ gutter not extents.
+ (progress-layout-glyph): signal special 'quit callback.
+ (progress-display-quit-function): deleted.
+ (progress-display-stop-callback): deleted.
+ (progress-display-dispatch-command-events): deleted.
+ (append-progress-display): remove calls to
+ progress-display-dispatch-command-events.
+ (raw-append-progress-display): ditto.
+
+2000-03-23 Hrvoje Niksic <hniksic@iskon.hr>
+
+ * faces.el (set-face-stipple): Rewrite to correctly handle PIXMAP
+ being a list. Actually define `stipple-pixmap-p' which is used as
+ an error predicate. Correctly handle PIXMAP being either relative
+ or absolute file name.
+
+2000-03-24 Andy Piper <andy@xemacs.org>
+
+ * gutter-items.el (add-tab-to-gutter): use copy-sequence.
+ (abort-progress-display): ditto. Don't delete the created extent.
+ (raw-append-progress-display): ditto.
+ (progress-display-dispatch-non-command-events): new
+ function. Encapsulates what we want to do when no command input is
+ required.
+ (progress-display-dispatch-command-events): likewise, but disable
+ for now since it causes too many problems.
+ (append-progress-display): use them.
+ (raw-append-progress-display): ditto.
+ (default-gutter-position-changed-hook): set this rather than
+ default-gutter-position-changed.
+ (default-gutter-position-changed-hook): lambda with zero arguments
+ rather than one.
+ (raw-append-progress-display): trap errors in pending input since
+ allowing them to signal will hose the gauge well and
+ truly. Ideally we would like to delay these until we are more able
+ to cope.
+ (append-progress-display): ditto.
+
+2000-03-20 Jeff Miller <jmiller@cablespeed.com>
+
+ * lisp/make-docfile.el: call-process-internal is now implemented
+ in process.el.
+
+2000-03-21 Ben Wing <ben@xemacs.org>
+
+ * mule\mule-cmds.el (set-language-info-alist):
+ Fix to correspond to new menu arrangement.
+
+2000-03-21 Ben Wing <ben@xemacs.org>
+
+ * process.el:
+ * process.el (call-process-internal): New.
+ New implementation of call-process. Only enabled under NT, so far.
+ stderr handling not implemented yet in CVS'd C code.
+
+2000-03-20 Ben Wing <ben@xemacs.org>
+
+ * lisp-mode.el:
+ * lisp-mode.el (lisp-interaction-mode-menubar-menu): New.
+ * lisp-mode.el (lisp-interaction-mode):
+ Put back Lisp Interaction menubar for Jan V's sake.
+
+ * simple.el:
+ * simple.el (mark-ring):
+ * simple.el (dont-record-current-mark): New.
+ * simple.el (in-shifted-motion-command): New.
+ * simple.el (mark-ring-unrecorded-commands): New.
+ * simple.el (mark-ring-max):
+ * simple.el (set-mark-command):
+ * simple.el (push-mark):
+ * simple.el (handle-pre-motion-command):
+ Implement scheme for not recording unimportant marks.
+
+ * subr.el:
+ * subr.el (function-allows-args): New.
+ New function function-allows-args.
+
+2000-03-20 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.32 is released.
+
+2000-03-20 Andy Piper <andy@xemacs.org>
+
+ * gutter-items.el (update-tab-in-gutter): force selection of the
+ selected-window if required to do so.
+ (buffers-tab-items): ditto.
+ (add-tab-to-gutter): ditto.
+ (create-frame-hook): use force-selection.
+ (default-gutter-position-changed): lambdify.
+ (update-tab-hook): deleted since it was only used in one place.
+
+2000-03-18 Andy Piper <andy@xemacs.org>
+
+ * files.el (find-file-noselect): undo change that shouldn't have
+ gone in.
+
+2000-03-17 Andy Piper <andy@xemacs.org>
+
+ * buffer.el (switch-to-buffer): use last-nonminibuf-window instead
+ of selected-window trickery.
+
+ * gutter-items.el (update-tab-in-gutter): don't give dedicated
+ frames tabs.
+ (progress-display-stop-callback): progress -> progress-display
+ (progress-display-quit-function): ditto.
+ (clear-progress-display): ditto.
+ (remove-progress-display): ditto.
+ (append-progress-display): ditto.
+ (abort-progress-display): ditto.
+ (raw-append-progress-display): ditto.
+ (display-progress-display): ditto.
+ (current-progress-display-label): ditto.
+ (current-progress-display): ditto.
+ (lprogress-display): ditto and save the buffer
+ (progress-display): ditto. Otherwise the buffer sometimes gets
+ changed which confuses font-lock.
+
+ * font-lock.el (font-lock-default-fontify-buffer): catch all
+ errors, not just quit.
+ (font-lock-mode): progress -> display-progress
+ (font-lock-default-fontify-buffer): ditto.
+ (font-lock-fontify-syntactically-region): ditto.
+ (font-lock-fontify-keywords-region): ditto.
+
+2000-03-14 Hrvoje Niksic <hniksic@iskon.hr>
+
+ * cl.el (gensym): Move to here from cl-macs.el.
+ (gentemp): Ditto.
+
+2000-03-16 Andy Piper <andy@xemacs.org>
+
+ * font-lock.el (font-lock-mode): use lprogress and friends for
+ progress management.
+ (font-lock-default-fontify-buffer): ditto.
+ (font-lock-fontify-syntactically-region): ditto.
+ (font-lock-fontify-keywords-region): ditto.
+ (font-lock-revert-cleanup): fix reverting.
+ (font-lock-revert-setup): ditto.
+
+ * gutter-items.el (progress-use-echo-area): new variable. Use the
+ echo area for progress gauges if non-nil.
+ (clear-progress): remove echo area stuff and defer to
+ clear-message.
+ (append-progress): dispatch non-command events after each progress
+ increment. Remove echo area stuff.
+ (abort-progress): remove echo area stuff and defer to
+ display-message.
+ (raw-append-progress): ditto. Dispatch non-command events after
+ gutter redisplay.
+ (display-progress): defer echo area stuff to display-message.
+
+ * gutter-items.el (clear-progress):
+ (abort-progress): indentation changes.
+ (display-progress): don't clear progress.
+ (append-progress): compare messages with equal.
+ (raw-append-progress): use dispatch-non-command-events to flush
+ widget creation events.
+
+2000-03-13 Ben Wing <ben@xemacs.org>
+
+ * abbrev.el:
+ * abbrev.el (abbrev-string-to-be-defined): New.
+ * abbrev.el (inverse-abbrev-string-to-be-defined): New.
+ Changes for use with the menubar.
+
+2000-03-12 Ben Wing <ben@xemacs.org>
+
+ * alist.el (vassoc): moved here from font-menu.el.
+
+ * custom.el (defface): typo fix.
+
+ * dialog.el (yes-or-no-p-dialog-box):
+ * dialog.el (message-box):
+ * files.el (save-some-buffers-1):
+ Put accelerators in the button names.
+
+ * font-lock.el (font-lock-comment-face):
+ * font-lock.el (font-lock-keyword-face):
+ * font-lock.el (font-lock-function-name-face):
+ Fixed some of the colors under MS Windows because the existing
+ default colors were hardly different from black and needed to be
+ made lighter.
+
+ * font-menu.el:
+ * font-menu.el (font-menu-split-long-menu):
+ * font-menu.el (font-menu-family-constructor):
+ * font-menu.el (font-menu-size-constructor):
+ * font-menu.el (font-menu-weight-constructor):
+ * font-menu.el (font-menu-set-font):
+ vassoc moved to alist.el.
+ Accelerators added to all menus.
+ Unused bound var new-props removed.
+
+ * keydefs.el: I did a whole lot of rearranging to put things in a
+ more consistent order and fixed a number of cases where key
+ combinations involving up, down, left, right and so on were
+ defined but the corresponding keypad combinations were not
+ defined.
+
+ * lisp-mode.el:
+ * lisp-mode.el (lisp-interaction-mode-popup-menu):
+ * lisp-mode.el (emacs-lisp-mode):
+ * lisp-mode.el (lisp-interaction-mode):
+ * lisp-mode.el (flet):
+ Added accelerators onto the menus.
+ Made all the different versions of the let function be indented
+ the same way.
+ Undid Steve's easy-menu-ification, because it makes it impossible
+ to have the menubar and popup menus different.
+ Cleaned up the menu; added items for find-function &c and some
+ indenting, and removed debug-on-*.
+
+ * list-mode.el (list-mode-hook):
+ * list-mode.el (list-mode):
+ * list-mode.el (completion-setup-hook):
+ * list-mode.el (display-completion-list):
+ Added support for the :window-height keyword, which is required
+ because of other changes that I made for the file dialog box. I
+ also made the hook variables list-mode-hook and
+ completion-setup-hook and also minibuffer-setup-hook in
+ minibuf.el be permanent-local; see comment in list-mode.el.
+
+ * map-ynp.el (map-y-or-n-p):
+ Added accelerators to the dialog buttons.
+
+ * menubar-items.el (menu-truncate-list):
+ New internal function.
+ * menubar-items.el (submenu-generate-accelerator-spec):
+ * menubar-items.el (menu-item-strip-accelerator-spec):
+ * menubar-items.el (menu-item-generate-accelerator-spec):
+ New exported functions, for use in auto-generating accelerator specs.
+
+ * menubar-items.el:
+ * menubar-items.el (default-menubar):
+ * menubar-items.el (maybe-add-init-button):
+ * menubar-items.el (bookmark-menu-filter):
+ * menubar-items.el (slow-format-buffers-menu-line):
+ * menubar-items.el (build-buffers-menu-internal):
+ * menubar-items.el (language-environment-menu-filter):
+ * menubar-items.el (default-popup-menu):
+ * menubar-items.el (popup-buffer-menu):
+ * menubar-items.el (popup-menubar-menu):
+ Did a major overhaul on this file, and in fact I'm nowhere near
+ done working on the menubar, and there will be more patches to
+ come. A basic summary of what I've done:
+
+ a) I added accelerators to all of the menu items. For menus that
+ are auto-generated, such as the buffers menu, the accelerators are
+ automatically added to the beginning of each line using the
+ numbers 1 through 9, then zero, and then letters starting with A,
+ but omitting the letters that are already in use for the fixed
+ menu items at the top of the buffers menu. To facilitate adding
+ accelerators of this kind, I created some new functions
+ (*-accelerator-spec), which are also being used by other filters
+ that auto generate lists of things such as ftp sites to download
+ packages. If people really don't like these accelerators
+ appearing at the beginning of the menu items, a variable can be
+ added to optionally turn them off, but I think this is rather
+ pointless because other menu items have accelerators and many or
+ most of the menu users will use the accelerators if the support is
+ there.
+
+ b) I combined the top level Tools and Apps menus into a single
+ Tools menu, because the distinction between the two is not
+ obvious, and the items on the menus are not used often enough that
+ putting some of them onto submenus is a problem.
+
+ c) I created two new top level menus called View and Cmds because
+ there were too many items on the File and Edit menus, and I'm going
+ to be adding more items to these menus. In contrast to the Tools
+ menu, the items on these menus may be used quite often during an
+ editing session, and so should be available with fewer
+ keystrokes.
+
+ d) I added a number of options to the options menu, including one
+ for controlling whether the alt key can be used to traverse to
+ menu items using the accelerators, one for controlling behavior of
+ control-k, one for controlling how the kill and yank functions
+ interact with the clipboard, a few additional buffers-menu
+ options, and various other things. I also did a bit of
+ rearranging, for example, combining the keyboard and mouse options
+ into a single keyboard and mouse submenu to facilitate the
+ accelerators on that level.
+
+ e) I changed the variable buffers-menu-format-buffer-line-function
+ to take two arguments instead of one, the second argument being
+ the line number for use in creating an accelerator. I added a
+ hack to support existing functions with one argument (although I
+ doubt that very many of these exist), for backward compatibility.
+
+ f) I moved the top level mule menu to be a submenu of the edit
+ menu. I think that most of the items on this menu are fairly
+ useless and there are certainly not enough frequently used items
+ to justify this being its own top level menu.
+
+ g) I combined most of the items in big-menubar.el into the main menu.
+ If people think the main menu is too big, it would be possible to
+ create different configurations, some smaller.
+
+ * menubar.el (check-menu-syntax):
+ Deleted some syntax checks that were no longer valid, partly
+ because of changes that were already made a long time ago, and
+ partly because of a change I made where I allow the name of the
+ menu item to be an evaluated expression rather than just a string,
+ similar to all of the other parameters of a menu item.
+
+ * minibuf.el:
+ * minibuf.el (read-file-name-1):
+ * minibuf.el (mouse-read-file-name-1):
+ I made a number of changes to improve the appearance
+ and functioning of the file dialog box. They include:
+
+ a) Fixing the problem where closing the dialog box by clicking on
+ the close button of the window didn't properly exit the
+ minibuffer.
+
+ b) Fixing the problem that if you typed part of a file name, and
+ then clicked on a completion with the mouse, the file was not
+ correctly selected.
+
+ c) Changing the title of the dialog box to reflect the operation
+ being done in accordance with user interface conventions, rather
+ than the name of the dialog box buffer, which is rather useless.
+
+ d) Remove the words "possible completions are" which didn't
+ belong.
+
+ e) Fix things so that the completions scroll off the end of the
+ completions windows only to the right, rather than both to the
+ right and down, which is in accordance with Windows user interface
+ conventions.
+
+ * msw-init.el (init-post-mswindows-win):
+ Added a binding for meta-F4, which is the standard windows binding
+ for exiting a program.
+
+ * select.el (get-selection-no-error):
+ * select.el (own-selection):
+ * select.el (own-clipboard):
+ Added an optional argument called append to the functions
+ own-selection and own-clipboard. This adds support for appending
+ text to the existing selection and allows the function
+ own-clipboard to be used as the value of the variable
+ interprogram- cut-function.
+
+ Fixed a bug in own-selection in handling zmacs-region-stays.
+
+ * simple.el (historical-kill-line): New.
+
+ * simple.el (kill-line):
+ * simple.el (interprogram-cut-function):
+ * simple.el (interprogram-paste-function):
+ * simple.el (handle-pre-motion-command):
+ * simple.el (next-line):
+ * simple.el (previous-line):
+ a) Expanded the variable kill-whole-line, so that function
+ kill-line can be set to delete the entire line always, not just
+ when cursor is at the beginning of the line. This is controlled
+ by setting the variable kill-whole-line to the symbol 'always.
+ This behavior, as well as the existing kill-whole-line behavior,
+ now only take effect when kill-line is called interactively,
+ although this is a departure from a previous behavior in the case
+ of setting this variable kill-whole-line to t. It is almost
+ certainly what has always been intended, and most likely the old
+ way of doing things introduced bugs. I also created a function
+ called historical-kill-line, which ignores the kill-whole-line
+ setting and always gives the historical behavior of only killing
+ to the end of the line. I bound this function to shift- control-k
+ so that the kill to end of line behavior is available, even when
+ kill-whole-line has been set to change control-k into the simple
+ delete-whole-line behavior. (This can be set using the options
+ menu.)
+
+ b) I changed things so that kill and yank now interact with the
+ clipboard by default under windows. This was done by changing the
+ default value of interprogram-cut- function and
+ interprogram-paste-function. You can get the old behavior by
+ setting these to nil, and there is an option on the options menu
+ to do this.
+
+ c) I added support for selecting text using shifted motion keys.
+ This support is on by default and can be controlled by the
+ variable shifted-motion-keys-select-region. There is also a
+ variable called unshifted-motion-keys-deselect-region that
+ controls more specifically how the shifted motion key behavior
+ works. I did not put an option on the options menu to turn this
+ off, because I can't imagine why this would be useful.
+
+ * simple.el (forward-block-of-lines):
+ * simple.el (backward-block-of-lines):
+ * simple.el (block-movement-size):
+ New.
+
+ * simple.el (uncapitalized-title-words):
+ * simple.el (uncapitalized-title-word-regexp):
+ * simple.el (capitalize-string-as-title):
+ * simple.el (capitalize-region-as-title):
+ New.
+
+
+ * subr.el (add-hook):
+ * subr.el (make-local-hook): New.
+ * subr.el (remove-local-hook): New.
+ * subr.el (add-one-shot-hook): New.
+ * subr.el (add-local-one-shot-hook): New.
+ Added some functions to make using hooks easier.
+ These include:
+
+ a) Functions add-local-hook and remove-local-hook to make it easy
+ to use local hooks.
+
+ b) Functions add-one-shot-hook and add-local-one-shot-hook, which
+ make it possible to add a "one-shot" hook, which is to say a hook
+ that runs only once, and automatically removes itself after the
+ first time it has run.
+
+2000-03-09 Andy Piper <andy@xemacs.org>
+
+ * files.el (auto-mode-alist): pick up jsp, jhtml and xml files.
+
+2000-03-09 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * buff-menu.el (buffers-menu-omit-invisible-buffers):
+ Moved from menubar-items.el.
+ * dumped-lisp.el: Dump gutter-items regardless of menubar.
+
+2000-03-08 Andy Piper <andy@xemacs.org>
+
+ * gutter-items.el (build-buffers-tab-internal): add selected field
+ to buffers tab spec.
+
+2000-03-07 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * minibuf.el (last-exact-completion): Initialize to nil.
+
+2000-03-07 Didier Verna <didier@xemacs.org>
+
+ * startup.el (command-line-1): remove unused variable
+ `first-file-buffer'.
+
+2000-02-29 Hrvoje Niksic <hniksic@iskon.hr>
+
+ * loaddefs.el (completion-ignored-extensions): Removed ".log",
+ which is also used for Web server log files.
+
+2000-02-03 IKEYAMA Tomonori <tomonori@suiyokai.org>
+
+ * mule/mule-charset.el: Setup auto-fill-chars.
+
+2000-03-02 SL Baur <steve@beopen.com>
+
+ * subr.el (with-string-as-buffer-contents): Reimplement using
+ `with-temp-buffer'. Fixes non-unique buffer name problem, fixes
+ non-deletion of buffer after execution problem.
+ (with-output-to-string): Use unique buffer name.
+
+2000-02-29 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * gutter-items.el (buffers-tab-sort-function): New variable.
+ (buffers-tab-items): Funcall it to sort the buffer tab list.
+
+2000-02-29 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * startup.el (load-user-init-file): Merge two `if's to one `or'.
+
+2000-02-28 Martin Buchholz <martin@xemacs.org>
+
+ * menubar-items.el (maybe-add-init-button): Remove the "Load
+ .emacs" button from all menubars.
+
+2000-03-01 Didier Verna <didier@xemacs.org>
+
+ * rect.el (string-rectangle): depend on `pending-delete-mode' for
+ region rectangle replacement (from Jan Vroonhof).
+ (replace-rectangle): new function.
+
+2000-01-05 Yoshiki Hayashi <t90553@mail.ecc.u-tokyo.ac.jp>
+
+ * mule/mule-cmds.el (set-default-coding-systems): Use
+ set-terminal-coding-system and set-keyboard-coding-system.
+ * coding.el (set-terminal-coding-system): Use
+ set-console-tty-output-coding-system.
+ (set-keyboard-coding-system): Use
+ set-console-tty-input-coding-system.
+
+2000-02-21 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * minibuf.el (read-variable): Allow symbol to default argument.
+
+2000-02-27 Andy Piper <andy@xemacs.org>
+
+ * gutter-items.el (update-tab-hook): new function to be used for
+ hooks.
+ (create-frame-hook): add update-tab-hook.
+ (record-buffer-hook): ditto.
+ (default-gutter-position-changed): ditto.
+ (default-gutter-position): updating the buffers tab is now handled
+ by a hook.
+ (default-gutter-position-changed-hook): new variable.
+ (gutter-element-visibility-changed-hook): ditto.
+ (set-gutter-element-visible-p): call it.
+ (set-gutter-element): use modify-specifier-instances. Set extents
+ as duplicable before using.
+ (remove-gutter-element): ditto.
+ (set-gutter-element-visible-p): ditto.
+ (init-gutter): new function.
+ (add-tab-to-gutter): use new gutter-element functions rather than
+ setting specifiers directly.
+ (clear-progress): ditto.
+ (abort-progress): ditto.
+ (gutter-buffers-tab-visible-p): renamed from
+ default-gutter-visible-p
+
+ * specifier.el (modify-specifier-instances): new function from Jan
+ Vroonhof.
+
+ * x-init.el (init-post-x-win): call init-gutter.
+
+ * msw-init.el (init-post-mswindows-win): call init-gutter.
+
+ * menubar-items.el (default-menubar): Update to reflect new gutter
+ variables.
+
+2000-02-26 Andy Piper <andy@xemacs.org>
+
+ * gutter-items.el (set-gutter-element): new function. Add gutter
+ elements to the specified gutter.
+ (remove-gutter-element): new function. Remove gutter elements from
+ the specified gutter.
+ (set-gutter-element-visible-p): new function. Set gutter element
+ visibility for the provided gutter-visible specifier.
+
+2000-02-23 Andy Piper <andy@xemacs.org>
+
+ * gutter-items.el (add-tab-to-gutter): specify dimensions
+ dynamically.
+
+2000-02-24 Martin Buchholz <martin@xemacs.org>
+
+ * gutter-items.el (add-tab-to-gutter):
+ * package-get.el (package-get-interactive-package-query):
+ * package-ui.el (pui-directory-exists):
+ (pui-install-selected-packages):
+ (pui-list-packages):
+ Use #'(lambda ...) instead of '(lambda ...).
+
+2000-02-21 Gregory Neil Shapiro <gshapiro@gshapiro.net>
+
+ * startup.el (load-user-init-file): Check to make sure user
+ has an init-file before calling load().
+
+2000-02-20 Kirill 'Big K' Katsnelson <kkm@dtmx.com>
+
+ * msw-glyphs.el (msgdi-device-p): Added this and 'msgdi specifier tag.
+
+2000-02-23 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.31 is released.
+
+2000-02-21 Mike Sperber <mike@xemacs.org>
+
+ * loadup.el (really-early-error-handler):
+ * update-elc.el:
+ * make-docfile.el:
+ Remove dependency on EMACSBOOTSTRAP... environment variables.
+
+2000-02-21 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.30 is released.
+
+2000-02-19 Martin Buchholz <martin@xemacs.org>
+
+ * byte-optimize.el (byte-optimize-plus):
+ (byte-optimize-minus):
+ (byte-optimize-multiply):
+ Optimize (- 0) to 0, not (-)
+ Optimize (+ 5 3.0) to 8.0
+ Optimize (* 5 3.0) to 15.0
+ Improve readability.
+
+2000-02-21 Jonathan Harris <jhar@tardis.ed.ac.uk>
+
+ * modeline.el: (modeline-scrolling-method): change modeline
+ mswindows cursor appearance according to the value.
+
+ * msw-faces.el: (mswindows-init-device-faces): Initialise 'default
+ and 'gui-element face colors and 'gui-element face font to Windows
+ defaults.
+
+2000-02-09 Stef Epardaud <stef@lunatech.com>
+
+ * font-lock.el: Javadoc enhancements
+
+1999-11-27 Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch>
+
+ * ldap.el (toplevel): Test if LDAP support has been compiled in
+ (ldap-verbose): New option
+ (ldap-search-entries): Renamed from the previous ldap-search
+ Conditionalize message display on ldap-verbose
+ (ldap-add-entries, ldap-modify-entries, ldap-delete-entries): New
+ defuns
+ (ldap-search): Is now defined as an obsolete wrapper calling
+ ldap-search-basic or ldap-search-entries
+
+
+1999-12-06 Hirokazu FUKUI <hfukui@sannet.ne.jp>
+ Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp>
+ Jan Vroonhof <jan@xemacs.org>
+
+ * byte-optimize.el (byte-optimize-form-code-walker): Fixed.
+ When for-effect is true, didn't call `byte-optimize-form'
+ in and/or subforms without last.
+
+1999-12-07 Jan Vroonhof <vroonhof@math.ethz.ch>
+
+ * package-get.el (package-get-download-sites): Use correct custom
+ type.
+
+2000-02-15 Kirill 'Big K' Katsnelson <kkm@dtmx.com>
+
+ * files.el (write-file): Ask for coding system when compiled with
+ file-coding.
+
+2000-02-16 Andy Piper <andy@xemacs.org>
+
+ * buffer.el (switch-to-buffer): give norecord argument to
+ set-window-buffer instead of explicitly recording.
+
+ * gutter-items.el (buffers-tab-switch-to-buffer): don't record if
+ we have to pick a window.
+
+1999-12-24 Yoshiki Hayashi <t90553@mail.ecc.u-tokyo.ac.jp>
+
+ * mule/mule-cmds.el (describe-language-support): Don't add
+ unexist function to help-map.
+ (describe-coding-system): Don't use already assigend `C'.
+
+2000-01-23 Bjrn Torkelsson <torkel@hpc2n.umu.se>
+
+ * info.el (Info-save-auto-generated-dir): nil -> 'never to make it
+ work in custom.
+
+2000-02-04 Kazuyuki IENAGA <kazz@imasy.or.jp>
+
+ * about.el: Ienaga's e-mail address change.
+
+2000-02-16 Samuel Mikes <smikes@alumni.hmc.edu>
+
+ * etags.el (find-tag): force new window -- even if buf already
+ visible -- when other-window is t
+
+2000-02-16 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.29 is released.
+
+2000-02-09 Martin Buchholz <martin@xemacs.org>
+
+ * cl-extra.el (getf): This is now identical to `plist-get', so
+ just defalias it.
+ * cl-macs.el: Make getf an alias to plist-get, at the
+ byte-compiler level, using define-compiler-macro.
+
+2000-02-08 Martin Buchholz <martin@xemacs.org>
+
+ * cl-extra.el (cl-remprop): Remove. remprop is now in C.
+
+2000-02-07 Kyle Jones <kyle_jones@wonderworks.com>
+
+ * lisp/etags.el (find-tag-internal): set exact-tagname to
+ a regular expression that matches against the tagname
+ part of the tag entry first instead of only looking in
+ the context area.
+
+2000-01-23 Bjrn Torkelsson <torkel@hpc2n.umu.se>
+
+ * gutter-items.el: fixed typo(s) in customizing default-gutter-position
+ * toobar.el: fixed typo(s) in customizing default-toolbar-position
+
2000-02-07 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.28 is released.
2000-02-02 Per Abrahamsen <abraham@dina.kvl.dk>
* wid-edit.el (widget-match-inline): An atom never matches a
- list.
+ list.
2000-01-29 Kirill 'Big K' Katsnelson <kkm@dtmx.com>
2000-01-28 Martin Buchholz <martin@xemacs.org>
- * coding.el (dontusethis-set-value-file-name-coding-system-handler):
- (dontusethis-set-value-terminal-coding-system-handler):
- (dontusethis-set-value-keyboard-coding-system-handler):
+ * coding.el (dontusethis-set-value-file-name-coding-system-handler):
+ (dontusethis-set-value-terminal-coding-system-handler):
+ (dontusethis-set-value-keyboard-coding-system-handler):
Never undefine coding system aliases. Emergency fix for gnus.
2000-01-26 Hrvoje Niksic <hniksic@iskon.hr>
* process.el (shell-quote-argument): Use (nt-quote-process-args)
for windows-nt.
- * version.el:
- * startup.el (user-init-file-base):
- * process.el (call-process-region):
- * files.el (make-backup-file-name):
- (backup-file-name-p):
- (file-relative-name):
- (abbreviate-file-name):
- (set-auto-mode):
+ * version.el:
+ * startup.el (user-init-file-base):
+ * process.el (call-process-region):
+ * files.el (make-backup-file-name):
+ (backup-file-name-p):
+ (file-relative-name):
+ (abbreviate-file-name):
+ (set-auto-mode):
* code-process.el (call-process-region): Removed unnecessary
branching on 'windows-nt and 'ms-dos system types. Phased 'ms-dos
support out of the universe.
* process.el:
- * code-process.el:
+ * code-process.el:
* bytecomp.el (byte-compile-file): Removed reference to
buffer-file-type, and commented usage of binary-process-output
NTEmacs variables.
a call to load-user-init-file, as the function managed to lose its
formal parameter a few betas ago.
-
2000-01-18 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.27 is released.
(ldap-encode-string): Guard against `encode-coding-string' not
being defined
-1999-08-23 Didier Verna <verna@inf.enst.fr>
+1999-08-23 Didier Verna <didier@xemacs.org>
* rect.el: Cosmetics suggested by Dave Love <d.love@dl.ac.uk>.
Some doc strings improvements, and add a star to the `interactive'
* gutter-items.el (remove-buffer-from-gutter-tab): fix *scratch*
deletion problem.
-1999-07-30 Didier Verna <verna@inf.enst.fr>
+1999-07-30 Didier Verna <didier@xemacs.org>
* 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>
+1999-08-09 Didier Verna <didier@xemacs.org>
* gutter-items.el (select-buffers-tab-buffers-by-mode): use
`regexp-quote' to protect the major mode name for use as a regular
doc-directory.
From Karl M. Hegbloom <karlheg@cathcart.sysc.pdx.edu>
-1999-07-19 Didier Verna <verna@inf.enst.fr>
+1999-07-19 Didier Verna <didier@xemacs.org>
* rect.el: all functions rewritten, except when noted. Below is a
list of interface changes.
* gui.el (make-dialog-frame): turn off gutters for dialogs.
-1999-07-15 Didier Verna <verna@inf.enst.fr>
+1999-07-15 Didier Verna <didier@xemacs.org>
* cus-edit.el (custom-prompt-variable): optional third arg makes
prompt for a comment string.
* simple.el (delete-key-deletes-forward): Revert to previous
behavior.
-1999-01-18 Didier Verna <verna@inf.enst.fr>
+1999-01-18 Didier Verna <didier@xemacs.org>
* menubar-items.el (xemacs-splash-buffer): handle the case of
multiple elements in the splash buffer body.
* package-get.el (package-get-custom): don't load
package-get-custom as it is auto-generated. Fix group definition.
-1999-03-05 Didier Verna <verna@inf.enst.fr>
+1999-03-05 Didier Verna <didier@xemacs.org>
* cus-dep.el (Custom-make-dependencies): use `prin1-to-string'
instead of `symbol-name' (Thanks Kyle).
* font-lock.el (font-lock-revert-cleanup): Null out to avoid repeated
calls to font-lock during buffer reversion.
-1999-02-12 Didier Verna <verna@inf.enst.fr>
+1999-02-12 Didier Verna <didier@xemacs.org>
* info.el (Info-build-node-completions): unconditionally widen the
tag table buffer.
* XEmacs 21.2.9 is released
-1999-01-19 Didier Verna <verna@inf.enst.fr>
+1999-01-19 Didier Verna <didier@xemacs.org>
* replace.el (replace-search-function): new variable containing a
function to perform a search-forward.
to perform a re-search-forward.
(perform-replace): use them.
-1999-01-25 Didier Verna <verna@inf.enst.fr>
+1999-01-25 Didier Verna <didier@xemacs.org>
* select.el (selection-owner-p): use the name `XEmacs'.
(cut-copy-clear-internal): ditto.
* minibuf.el (minibuffer-completion-table): ditto.
* cl-macs.el (return-from): ditto.
-1999-01-04 Didier Verna <verna@inf.enst.fr>
+1999-01-04 Didier Verna <didier@xemacs.org>
* replace.el (delete-non-matching-lines): temporarily disable
case-folding when called interactively with a regexp containing
(pui-list-packages): Add warning when `package-get-remote' is nil.
(package-ui-add-site): New function.
-1998-12-01 Didier Verna <verna@inf.enst.fr>
+1998-12-01 Didier Verna <didier@xemacs.org>
* hyper-apropos.el (hyper-where-is): added the missing autoload.
* package-get-base.el: removed.
-1998-09-23 Didier Verna <verna@inf.enst.fr>
+1998-09-23 Didier Verna <didier@xemacs.org>
* simple.el (search-caps-disable-folding): moved from isearch-mode.el
(no-upper-case-p): new function.
* lisp-mode.el (with-string-as-buffer-contents): Set indentation.
-1998-07-17 Didier Verna <verna@inf.enst.fr>
+1998-07-17 Didier Verna <didier@xemacs.org>
* faces.el (set-face-property):
(set-face-dim-p):
`save-some-buffers'.
(save-some-buffers): Force redisplay only if windows were deleted.
-1998-06-02 Didier Verna <verna@inf.enst.fr>
+1998-06-02 Didier Verna <didier@xemacs.org>
* cus-face.el (custom-face-attributes): generalized the use of
toggle buttons for boolean attributes.
* simple.el (zap-up-to-char): New function. Behaves like `zap-to-char'
in Emacs 18.
-1998-05-13 Didier Verna <verna@inf.enst.fr>
+1998-05-13 Didier Verna <didier@xemacs.org>
* mouse.el (drag-window-divider): give the vertical divider a
pressed look when dragging it.
* default.el: Removed.
* site-start.el: Removed.
-1998-04-29 Didier Verna <verna@inf.enst.fr>
+1998-04-29 Didier Verna <didier@xemacs.org>
* minibuf.el (minibuffer-history-minimum-string-length): Default
to nil.
* msw-glyphs.el: enable graphics support.
-1998-04-23 Didier Verna <verna@inf.enst.fr>
+1998-04-23 Didier Verna <didier@xemacs.org>
* x-menubar.el (default-menubar): restored the line-number-mode
option.
* package-get.el (package-get-all): add `\n' separator to
interactive specification so that both variables are read
-1998-04-22 Didier Verna <verna@inf.enst.fr>
+1998-04-22 Didier Verna <didier@xemacs.org>
* x-menubar.el: ported the options menu to Custom.
Moved the "read only" toggle button to the buffers menu.
1998-04-16 SL Baur <steve@altair.xemacs.org>
* files.el (toggle-read-only): Fix docstring.
- From Didier Verna <verna@inf.enst.fr>
+ From Didier Verna <didier@xemacs.org>
1998-04-14 Michael Sperber [Mr. Preprocessor] <sperber@informatik.uni-tuebingen.de>
windows on the currently selected fgrame before searching
other frames.
-1998-02-25 Didier Verna <verna@inf.enst.fr>
+1998-02-25 Didier Verna <didier@xemacs.org>
* modeline.el (modeline-swap-buffers): originally named
`mouse-release-modeline'. Whether to actually swap the buffers is
configuration, hosing temp-buffer-show-function.
-1998-02-23 Didier Verna <verna@inf.enst.fr>
+1998-02-23 Didier Verna <didier@xemacs.org>
* modeline.el (mouse-drag-modeline):
- Always scroll the modeline that was originally clicked on.
keep on dragging the modeline even if the motion event occurs in
another window.
-1998-02-23 Didier Verna <verna@inf.enst.fr>
+1998-02-23 Didier Verna <didier@xemacs.org>
* x-mouse.el (x-init-pointer-shape): use a crossed-arrows cursor
glyph on the modeline to indicate that dragging the mouse has an
Prevents display flickering when the mouse pointer
moves.
-1998-02-17 Didier Verna <verna@inf.enst.fr>
+1998-02-17 Didier Verna <didier@xemacs.org>
* mouse.el (default-mouse-track-set-point-in-window): rewrote this
function to handle correctly the case of a toolbar one side of the
* loadup.el: test-atoms debugging stuffs removed.
-1998-02-03 Martin Buchholz <Martin Buchholz <martin@xemacs.org>>
+1998-02-03 Martin Buchholz <Martin Buchholz <martin@xemacs.org>
* lisp/loaddefs.el (completion-ignored-extensions): Add ".class"
* (abbrev-mode): (put)'ed a `:menu-tag' on it and
`auto-fill-function'.
-1998-01-02 Karl M. Hegbloom <<karlheg@bittersweet.inetarena.com>>
+1998-01-02 Karl M. Hegbloom <karlheg@bittersweet.inetarena.com>
* modeline.el (modeline-minor-mode-menu): Changed the string-only
menus to :style 'toggle.
(toolbar-mail-reader): Add support for `send'.
From Jonathan Marten <jonathan.marten@UK.Sun.COM>
-1998-01-05 Karl M. Hegbloom <<karlheg@bittersweet.inetarena.com>>
+1998-01-05 Karl M. Hegbloom <karlheg@bittersweet.inetarena.com>
* info.el (Info-emacs-info-file-name): Add defvar for
`Info-emacs-info-file-name' so that `Info-goto-emacs-command-node'
* packages.el (package-require): Update to reflect new data format.
-1998-01-02 Didier Verna <verna@inf.enst.fr>
+1998-01-02 Didier Verna <didier@xemacs.org>
* x-menubar.el (default-menubar): make the tutorials available
through the menubar. (Plus some compilation warnings cleanup).
* cl.el (eql): Compare integers with `eq'.
(cl-map-extents): Check for `map-extents' first.
-1997-12-17 Didier Verna <verna@inf.enst.fr>
+1997-12-17 Didier Verna <didier@xemacs.org>
* leim/quail/latin-pre.el ("french-prefix"): doc string cleanup +
added the 'numero', 'copyright' and 'trademark' symbols.
1997-12-07 Hrvoje Niksic <hniksic@srce.hr>
- * wid-edit.el (widget-prettyprint-to-string): Nix cl-prettyprint's
+ * wid-edit.el (widget-prettyprint-to-string): Nix cl-prettyprint's
newlines.
1997-12-06 Hrvoje Niksic <hniksic@srce.hr>
1997-12-07 SL Baur <steve@altair.xemacs.org>
- * egg/egg-cwnn-leim.el (egg-pinyin-activate): New file. Interface
+ * egg/egg-cwnn-leim.el (egg-pinyin-activate): New file. Interface
to Chinese Wnn server.
* egg/egg-kwnn-leim.el: New file. Interface to Korean Wnn
1997-12-05 Mark Borges <mdb@cdc.noaa.gov>
* mail/mail-extr.el (all-top-level-domains):
- Two letter country codes synched with
+ Two letter country codes synched with
http://www.iana.org/in-notes/iana/assignments/country-codes
as updated by the RIPE Network Coordination Centre.
- Source: ISO 3166 Maintenance Agency
+ Source: ISO 3166 Maintenance Agency
Latest change: Thu Aug 7 17:59:51 MET DST 1997
1997-12-03 Eric Eide <eeide@cs.utah.edu>
1997-11-29 SL Baur <steve@altair.xemacs.org>
- * update-elc.el ((preloaded-file-list site-load-packages)): Modify
+ * update-elc.el ((preloaded-file-list site-load-packages)): Modify
error message to be more build-report.el friendly.
* dumped-lisp.el (preloaded-file-list): Remove tooltalk/ prefix
* x-menubar.el (default-menubar): Disable WWW items in help menu
if no browse-url.
- * help.el (xemacs-www-page): Print error message intead of bombing
+ * help.el (xemacs-www-page): Print error message intead of bombing
if not browse-url.
(xemacs-www-faq): Ditto.
* x-toolbar.el (pending-delete): Don't (require 'pending-del).
* x-menubar.el (pending-delete): Don't (require 'pending-del).
- * x-menubar.el (bookmark-menu-filter): Add guards against bookmark
+ * x-menubar.el (bookmark-menu-filter): Add guards against bookmark
package not being loaded.
* mule/char-table.el: Imported from tm.
* mule/chartblxmas.el: Ditto.
* alist.el: Ditto.
* overlay.el: Unpackaged for Quail.
-
+
* x-menubar.el (default-menubar): Put guard on evaluation of
`ps-paper-type'.
(default-menubar): Put guard on `paren-mode'.
* packages.el (packages-useful-lisp): advice.el is a package.
- * x-menubar.el (default-menubar): Make `Options ... Color Printing'
+ * x-menubar.el (default-menubar): Make `Options ... Color Printing'
a toggle.
1997-11-26 Kyle Jones <kyle_jones@wonderworks.com>
1997-11-25 Hrvoje Niksic <hniksic@srce.hr>
- * custom.el (custom-declare-variable): Attach the symbol to
+ * custom.el (custom-declare-variable): Attach the symbol to
load history.
1997-11-23 SL Baur <steve@altair.xemacs.org>
1997-11-17 Marc Paquette <marcpa@cam.org>
* efs/dired.el: Removed special case for windows-nt in
- dired-get-filename(); no longer needed because we now do
+ dired-get-filename(); no longer needed because we now do
CRLF->LF conversion upstream.
1997-11-18 Jonathan Harris <jhar@tardis.ed.ac.uk>
1997-11-12 Greg Klanderman <greg@alphatech.com>
- * packages/compile.el (compilation-build-compilation-error-regexp-alist):
+ * packages/compile.el (compilation-build-compilation-error-regexp-alist):
Added documentation for this function.
-
+
** (compilation-error-regexp-systems-list): Update documentation
to note that `compilation-build-compilation-error-regexp-alist'
must be called after changing the value. Update customization to
* utils/shadow.el (list-load-path-shadows): Supress message when
no shadowings are found.
- * loadup.el: Modify algorithm for finding initial lisp directories
+ * loadup.el: Modify algorithm for finding initial lisp directories
since the search now starts from lisp/ not lisp/prim/.
* update-elc.el: Ditto.
* make-docfile.el: Ditto.
Reinstated code that uses (mono x) as a specifer tag, but
conditioned it on (featurep 'x) because x is not a valid
specifier tag under native-win32.
-
+
* Added file headers to:
w32-faces.el, w32-init.el
1997-11-07 Kyle Jones <kyle_jones@wonderworks.com>
* prim/modeline.el (mouse-drag-modeline): Don't
- allow the window size to shrink to a size that is not a
+ allow the window size to shrink to a size that is not a
multiple of the height of the default face's font.
* prim/modeline.el (mouse-drag-modeline): Don't
1997-11-05 Jens-Ulrik Holger Petersen <petersen@kurims.kyoto-u.ac.jp>
* mule/mule-cmds.el (set-default-coding-systems): Make
- add-hook to `comint-exec-hook' be an append, for when the user
+ add-hook to `comint-exec-hook' be an append, for when the user
changes language environment say.
1997-11-05 SL Baur <steve@altair.xemacs.org>
- * prim/winnt.el: Use a cleaner method for getting Text/Binary file
+ * prim/winnt.el: Use a cleaner method for getting Text/Binary file
type in the mode-line for MS Windows.
1997-11-06 Hrvoje Niksic <hniksic@srce.hr>
fontifying after fontify-buffer.
(lazy-shot-unstall): Make sure buffer is left in a fontified state if
needed. Take optional argument.
-
+
* packages/ps-print.el (ps-print-ensure-fontified): Added
temporary support for lazy-shot.
* utils/text-props.el (set-text-properties): Updated docstring.
-1997-11-04 Didier Verna <verna@inf.enst.fr>
+1997-11-04 Didier Verna <didier@xemacs.org>
- * mule/mule-cmds.el (set-default-coding-systems):
- The coding-system argument to comint-exec-hook wasn't evaluated
+ * mule/mule-cmds.el (set-default-coding-systems):
+ The coding-system argument to comint-exec-hook wasn't evaluated
before building the lambda expression.
1997-11-04 Jens-Ulrik Holger Petersen <petersen@kurims.kyoto-u.ac.jp>
* shell.el (shell-chdrive-regexp): New for DOS/NT
(shell-mode): Added shell-font-lock-keywrods
(shell-mode): Use $PWD for ksh
- (shell-directory-tracker): Use dirs and dirtrack-toggle. This may
+ (shell-directory-tracker): Use dirs and dirtrack-toggle. This may
cause problems at is interferes with "dired"
(shell-snarf-envar): NEW
(shell-copy-environment-variable): NEW
characters, instead of consing a string each time.
(synthesize-keysym): Better error checking.
- * prim/keymap.el (synthesize-keysym): Don't bug out when reading a
+ * prim/keymap.el (synthesize-keysym): Don't bug out when reading a
non-character event.
1997-11-02 Tomasz Cholewo <tjchol01@mecca.spd.louisville.edu>
* prim/packages.el: Updated commentary.
(packages-useful-lisp): Added `cl-macs'.
-1997-10-27 Didier Verna <verna@inf.enst.fr>
+1997-10-27 Didier Verna <didier@xemacs.org>
* prim/help-nomule.el (help-with-tutorial): The 'didactic' blank
lines message is now taken directly from each tutorial, and thus
Suggested by Michael Kifer <kifer@CS.SunySB.EDU>
* mule/mule-init.el: Remove `help-with-tutorial-for-mule'.
- Suggested by Didier Verna <verna@inf.enst.fr>
+ Suggested by Didier Verna <didier@xemacs.org>
* Disable Cyrillic CCL until CCL engine gets fixed.
From: Martin Buchholz <mrb@Eng.Sun.COM>
1997-10-30 SL Baur <steve@altair.xemacs.org>
- * vm/vm-vars.el (vm-image-directory): Use locate-data-directory if
+ * vm/vm-vars.el (vm-image-directory): Use locate-data-directory if
it exists.
* language/european.el: Remove erroneous references to
* modes/enriched.el (enriched-face-ans): Use
color-name instead of color-instance-name.
- color-instance-name will not handle the specifiers that
+ color-instance-name will not handle the specifiers that
are passed as arguments.
1997-10-28 Tomasz Cholewo <tjchol01@mecca.spd.louisville.edu>
* pcl-cvs/pcl-cvs-xemacs.el: Add `cvs-mode-update-no-prompt' to menu.
From Stig Bjorlykke <stigb@tihlde.hist.no>
-1997-10-28 Didier Verna <verna@inf.enst.fr>
+1997-10-28 Didier Verna <didier@xemacs.org>
* packages/man.el (manual-entry): corrected the `when'
form to include 'section' in the buffer name.
1997-10-28 SL Baur <steve@altair.xemacs.org>
- * prim/packages (packages-find-pacakges): Fix test on
+ * prim/packages (packages-find-pacakges): Fix test on
inhibit-package-init
1997-10-27 Tomasz Cholewo <tjchol01@mecca.spd.louisville.edu>
* egg/egg-leim.el: Registers EGG/Wnn with LEIM when loaded
* egg/egg.el: Bind `toggle-egg-mode' to "\C-\" only if LEIM is
- not present when loaded
+ not present when loaded
1997-10-27 SL Baur <steve@altair.xemacs.org>
1997-10-23 Per Abrahamsen <abraham@dina.kvl.dk>
* custom/cus-edit.el (hook): Use `widget-group-match' instead of
- `widget-editable-list-match'.
+ `widget-editable-list-match'.
1997-10-23 SL Baur <steve@altair.xemacs.org>
1997-10-20 Jan Vroonhof <vroonhof@math.ethz.ch>
* extents.c: Renamed shot property to initial-redisplay-function
- (extent_fragment_update): Changed the bookkeeping whether an event
+ (extent_fragment_update): Changed the bookkeeping whether an event
has been spawned. The initial-redisplay-function property is no
longer set to nil.
1997-10-22 Hrvoje Niksic <hniksic@srce.hr>
- * prim/startup.el (command-line-1): Run term-setup-hook regardless
+ * prim/startup.el (command-line-1): Run term-setup-hook regardless
of `input-pending-p'.
* custom/cus-edit.el (custom-split-regexp-maybe): Use `split-string'.
1997-10-21 SL Baur <steve@altair.xemacs.org>
- * prim/about.el (about-maintainer-glyph): Pictures have been moved
+ * prim/about.el (about-maintainer-glyph): Pictures have been moved
to photos subdirectory.
1997-10-21 Hrvoje Niksic <hniksic@srce.hr>
1997-10-21 Colin Rafferty <craffert@ml.com>
* x11/x-menubar.el (default-menubar): Made it use lazy-shot
- instead of lazy-lock in "Syntax Highlighting->Lazy".
+ instead of lazy-lock in "Syntax Highlighting->Lazy".
(options-menu-saved-forms): Made it save lazy-shot instead of
lazy-lock in the options.
* help.el (function-at-point): Use `function-at-point-function'.
(function-at-point-function): New variable, formerly
- `find-function-function'.
+ `find-function-function'.
(describe-function): Use `function-at-point'.
(where-is): Ditto.
* find-func.el (find-function-read-function): Use
- `function-at-point'.
+ `function-at-point'.
* packages/info.el (Info-elisp-ref): Use `function-at-point'.
* prim/packages.el (packages-find-packages-1): New argument:
`user-package' non-nil when searching user packages.
- Load any autoloads found in user packages.
-
+
1997-10-17 Karl M. Hegbloom <karlheg@inetarena.com>
* packages/info.el (Info-insert-dir): Also kill the localdir temp
* utils/facemenu.el: autoload the `facemenu-keymap' properly.
* mule/mule-cmds.el (read-language-name): Fix typo.
- From Didier Verna <verna@inf.enst.fr>
+ From Didier Verna <didier@xemacs.org>
1997-10-15 Adrian Aichner <aichner@ecf.teradyne.com>
From Hrvoje Niksic <hniksic@srce.hr>
* prim/glyphs.el (init-glyphs): Use different logo for beta XEmacsen.
- From Didier Verna <verna@inf.enst.fr>
+ From Didier Verna <didier@xemacs.org>
1997-10-15 Hrvoje Niksic <hniksic@srce.hr>
* custom/wid-edit.el: (widget-glyph-insert-glyph): Use
`widget-mouse-help' if necessary.
- (widget-documentation-string-value-create): Don't coerce help-echo
+ (widget-documentation-string-value-create): Don't coerce help-echo
WIDGET to widget.
(widget-button-keymap): New keymap.
(widget-specify-button): Use it.
1997-10-14 SL Baur <steve@altair.xemacs.org>
* default.el: New file.
- * site-start.el: New file. XEmacs starts faster if dummy versions
+ * site-start.el: New file. XEmacs starts faster if dummy versions
of these files are found early in the `load-path'.
Suggested by Kyle Jones <kyle_jones@wonderworks.com>
* custom/cus-face.el (custom-face-attributes): Support
inverse-video for TTY-s.
- * prim/cmdloop.el (keyboard-escape-quit): Abort recursive edit, as
+ * prim/cmdloop.el (keyboard-escape-quit): Abort recursive edit, as
documented.
1997-10-12 Hrvoje Niksic <hniksic@srce.hr>
* '' Added toplevel block (when (fboundp 'load-gc) ...to init the
Info-def..list from the environment variable INFOPATH at dump time.
-
+
* prim/packages.el (packages-find-packages-1): append the list of
packages info directories to `Info-default-directory-list' rather
than prepending them. Don't add them if they're already in the
* packages/info.el (Info-directory-list): various fixes to the
directory list handling.
* (Info-localdir-heading-regexp) added.
-
+
* '' removed the unrequired defcustom of `Info-default-directory-
list'
* packages/bookmark.el:
* packages/iswitchb.el:
* utils/speedbar.el:
- * utils/xemacs-build-report.el:
+ * utils/xemacs-build-report.el:
- change Xemacs --> XEmacs
1997-10-09 Colin Rafferty <craffert@ml.com>
(describe-function-arglist): Commented out -- seems unused.
(find-function): ALL find-function stuff moved to "find-func.el"
- * prim/find-func.el: new file created from functions previously in
+ * prim/find-func.el: new file created from functions previously in
"help.el".
1997-10-09 SL Baur <steve@altair.xemacs.org>
Fri Sep 26 23:30:58 1997 Barry A. Warsaw <cc-mode-help@python.org>
- * cc-mode/cc-menus.el: Patches to Imenu support given by
+ * cc-mode/cc-menus.el: Patches to Imenu support given by
"Masatake (jet) YAMATO" <masata-y@is.aist-nara.ac.jp>.
(Jan Dubois) jan.dubois@ibm.net
* x11/x-menubar.el (file-menu-filter): Reverse sense of bounds
test.
- From: Didier Verna <verna@inf.enst.fr>
+ From: Didier Verna <didier@xemacs.org>
- * prim/format.el (format-annotate-function): Reverse sync to Emacs
+ * prim/format.el (format-annotate-function): Reverse sync to Emacs
19.
1997-10-08 Hrvoje Niksic <hniksic@srce.hr>
* mule/mule-cmds.el (read-input-method-name): Use a default if
available.
- From Didier Verna <verna@inf.enst.fr>
+ From Didier Verna <didier@xemacs.org>
* prim/about.el (about-url-alist): Update jwz's home page.
1997-10-05 Hrvoje Niksic <hniksic@srce.hr>
- * prim/simple.el: Minor docstring and comment changes. Customized
+ * prim/simple.el: Minor docstring and comment changes. Customized
some more.
1997-10-04 Hrvoje Niksic <hniksic@srce.hr>
* cl/cl-seq.el (remq): Reformat and add doc-string.
Suggested by: Karl M. Hegbloom <karlheg@inetarena.com>
-
+
1997-10-03 Karl M. Hegbloom <karlheg@inetarena.com>
* packages/func-menu.el: change the countups from message's to
(custom-declare-face): Don't invoke init-face-from-resources
explicitly.
- * prim/profile.el (pretty-print-profiling-info): When interactive,
+ * prim/profile.el (pretty-print-profiling-info): When interactive,
use a separate buffer instead of current-buffer.
(pretty-print-profiling-info): Prettified output.
(widget-text-keymap): Use it.
(widget-princ-to-string): Use `with-current-buffer'.
(widget-map-buttons): Ditto.
- (widget-push-button-gui): Set to value of `widget-glyph-enable' by
+ (widget-push-button-gui): Set to value of `widget-glyph-enable' by
default.
(widget-push-button-value-create): Call `widget-specify-button'.
* x11/x-menubar.el: Customized.
- * custom/cus-face.el (face-spec-set-match-display): Use `warn' for
+ * custom/cus-face.el (face-spec-set-match-display): Use `warn' for
warnings.
* x11/x-font-menu.el: Customized.
1997-09-18 Jens-Ulrik Holger Petersen <petersen@kurims.kyoto-u.ac.jp>
* prim/isearch-mode.el (isearch-message): Display-message as
- progress (this way isearch message won't appear in the message
+ progress (this way isearch message won't appear in the message
log).
1997-09-18 Jens-Ulrik Holger Petersen <petersen@kurims.kyoto-u.ac.jp>
* prim/packages.el (locate-library): Simplify regexp for
compression suffixes.
Suggested by: Hrvoje Niksic <hniksic@srce.hr>
-
+
1997-09-17 Karl M. Hegbloom <karlheg@inetarena.com>
* ilisp/ilisp-out.el (ilisp-scroll-output): bind `scroll-in-place'
I don't know if this breaks something else, because I can't figure out
why it was commented out in the first place.
-
+
* cc-mode/cc-langs.el:
Define `/' in c-mode-base-map since all modes now support
c-electric-slash.
1997-09-11 Jens-Ulrik Holger Petersen <petersen@kurims.kyoto-u.ac.jp>
- * packages/vc.el (vc-default-init-version): Make the default value
+ * packages/vc.el (vc-default-init-version): Make the default value
be `nil'. Improve the docstring.
1997-09-12 SL Baur <steve@altair.xemacs.org>
1997-09-09 Jens-Ulrik Holger Petersen <petersen@kurims.kyoto-u.ac.jp>
- * packages/vc.el (vc-register): make the second option arg COMMENT
+ * packages/vc.el (vc-register): make the second option arg COMMENT
do something
* packages/vc.el (vc-register): Make the default initial
1997-09-07 Hrvoje Niksic <hniksic@srce.hr>
- * utils/edmacro.el (edmacro-parse-word): Accept ^foo (would signal
+ * utils/edmacro.el (edmacro-parse-word): Accept ^foo (would signal
error).
(edmacro-format-1): Add SPC after ^.
always has directories ending with trailing `/'s.
* version.el (emacs-version): Preserve previous matching info.
- From Didier Verna <verna@inf.enst.fr>
+ From Didier Verna <didier@xemacs.org>
Wed Sep 3 13:53:10 1997 SL Baur <steve@altair.xemacs.org>
1997-09-01 SL Baur <steve@altair.xemacs.org>
- * x11/x-menubar.el (default-menubar): Put tetris in the game menu,
+ * x11/x-menubar.el (default-menubar): Put tetris in the game menu,
and move it and the mine game to the top of the menu.
1997-08-29 SL Baur <steve@altair.xemacs.org>
* support for "dir" merging 'ala Emacs-19.34, with
fallback to cheap localdir files in the secondary info
directories.
-
+
* changed default `Info-annotations-path' from
~/.infonotes to ~/.xemacs/info.notes
-
+
* added `Info-additional-directory-list'
-
+
* changed a call to w3-fetch to browse-url
-
+
* added new variables and functions from GNU Emacs 19.34:
`Info-dir-contents', `Info-dir-contents-directory',
`Info-dir-file-attributes', and the function
`Info-insert-dir'
-
+
* rewrote `Info-suffixed-file' to a cond block rather than
nested if's for aesthetic reasons.
-
+
* made the top line get split if it's longer than 79
characters and tweaked fontification to handle that.
-
+
* changed the look of the pop-up mouse menus by utilizing
the "--:etchedThing" dividers.
-
+
* several docstring reformats and typo fixes, a few
comments deleted.
1997-07-24 SL Baur <steve@altair.xemacs.org>
- * prim/make-docfile.el (docfile-out-of-date): Workaround for NEWOS
+ * prim/make-docfile.el (docfile-out-of-date): Workaround for NEWOS
process exit handling bug.
Suggested by Katsumi Yamaoka <yamaoka@ga.sony.co.jp>
1997-07-21 SL Baur <steve@altair.xemacs.org>
- * prim/packages.el (locate-data-directory): New function to search
+ * prim/packages.el (locate-data-directory): New function to search
for directories in the data-directory-list.
1997-07-21 Karl M. Hegbloom <karlheg@inetarena.com>
(speedbar-get-focus): Autoload.
(speedbar): Autoload (correctly).
- (speedbar-frame-width): Test liveness of frame
+ (speedbar-frame-width): Test liveness of frame
too.
(speedbar-frame-mode): Avoid some Emacs 20 code.
From Markus Linnala <maage@cs.tut.fi>
1997-07-16 Steven L Baur <steve@altair.xemacs.org>
- * utils/crontab.el (crontab-get): Check for `no crontab for' as an
+ * utils/crontab.el (crontab-get): Check for `no crontab for' as an
error return.
Suggested by Jeff Miller <jmiller@smart.net>
* prim/files.el: Use `files' group.
- * prim/disp-table.el (describe-display-table): Made it work; don't
+ * prim/disp-table.el (describe-display-table): Made it work; don't
use `describe-vector'.
* prim/gui.el: Customized.
* packages/igrep.el: Don't insinuate XEmacs when loading.
(igrep-insinuate): New function.
- * packages/blink-cursor.el (blink-cursor-callback): Don't blink on
+ * packages/blink-cursor.el (blink-cursor-callback): Don't blink on
TTY-s.
* prim/console.el (resume-pid-console): Use `eql'.
* packages/pending-del.el (pending-delete-pre-hook): Don't quote
lambda.
(pending-delete-pre-hook): Use `error-message-string'.
- (pending-delete): Treat as minor mode; define the standard turn-on
+ (pending-delete): Treat as minor mode; define the standard turn-on
and turn-off functions.
(delete-active-region): Simplified.
* packages/pending-del.el: Correct typo in Hrvoje's upgrade.
* mel/mel-u.el (uuencode-external-decode-region): Force
- buffer-read-only nil because it gets changed magically to t during
+ buffer-read-only nil because it gets changed magically to t during
the call to `insert-file-contents'.
- * tm/tm-image.el (mime-preview/filter-for-image): Comment out test
+ * tm/tm-image.el (mime-preview/filter-for-image): Comment out test
for invalid glyph. It appears to be non-functional.
* modes/lisp-mode.el (lisp-interaction-mode-popup-menu-1): Add
* hypberbole/hact.el (action:commandp): Don't reference bytecode
objects as vectors.
(action:params): Ditto.
-
+
* hyperbole/hypb.el (hypb:function-copy): Don't reference byte
code objects as vectors.
(hypb:function-symbol-replace): Document as broken. The
* utils/easymenu.el (easy-menu-add): Oops, wrong sense in
comparison.
- * comint/gdb.el (gdb-mode-syntax-table): New variable. Initialize
+ * comint/gdb.el (gdb-mode-syntax-table): New variable. Initialize
with the logic currently in CC Mode 5.11.
(gdb-mode): Use it.
* prim/cmdloop.el (errors-deactivate-region): Default to existing
behavior.
- * leim/quail.el (quail-mode): Correct addition of quail minor mode
+ * leim/quail.el (quail-mode): Correct addition of quail minor mode
info to minor-mode-map-alist.
(top-level): Ditto.
make it look better (and will prevent some consing, but that's
being anal).
From Hrvoje Niksic <hniksic@srce.hr>
-
+
* prim/simple.el (delete-key-deletes-forward): Mark docstring as
an user option.
From Gary D. Foster <Gary.Foster@Corp.Sun.COM>
* efs/efs-ovwrt.el (efs-overwrite-fn): efs is manufacturing its
own byte code. Whee.
- * utils/advice.el (ad-interactive-form): Don't treat bytecode as a
+ * utils/advice.el (ad-interactive-form): Don't treat bytecode as a
vector if it can be avoided.
From Kyle Jones <kyle_jones@wonderworks.com>
-
+
1997-06-30 Steven L Baur <steve@altair.xemacs.org>
* prim/files.el (auto-mode-alist): Don't set image-mode by default
Sun Jun 29 20:57:15 1997 Kyle Jones <kyle_jones@wonderworks.com>
- * prim/simple.el: bind inhibit-read-only to t before
+ * prim/simple.el: bind inhibit-read-only to t before
trying to erase or otherwise modify the echo area buffer.
1997-07-01 MORIOKA Tomohiko <morioka@jaist.ac.jp>
* src/undo.c (record_extent):
If the extent's object is a string, just return. We
can't record undo information for strings, and it is
- very bad to reference through a string pointer as if it
+ very bad to reference through a string pointer as if it
were a buffer pointer.
1997-06-28 Steven L Baur <steve@altair.xemacs.org>
* utils/autoload.el (batch-update-directory): Kill command line
args when done.
(autoload-save-customization): Print a warning message with the
- offending symbol when we run across the elusive malformed property
+ offending symbol when we run across the elusive malformed property
list ((0 0)).
1997-06-26 Hrvoje Niksic <hniksic@srce.hr>
(pretty-print-profiling-info): Allow interactive calls.
* prim/overlay.el: Make more FSF compatible.
-
+
1997-06-27 Steven L Baur <steve@altair.xemacs.org>
* prim/loaddefs.el (debug-ignored-errors): Fix regexps.
Mule menu because they bombed after recompilation.
* packages/hyper-apropos.el
- (hyper-apropos-toggle-programming-flag): Use `with-current-buffer'
+ (hyper-apropos-toggle-programming-flag): Use `with-current-buffer'
instead of `eval-in-buffer'.
* term/sun-mouse.el: Remove bogus redefinition of
* prim/make-docfile.el: Use princ not print.
Suggested by Hrvoje Niksic.
- * packages/info.el (Info-select-node): Desensitive case search for
+ * packages/info.el (Info-select-node): Desensitive case search for
Note:.
(Info-next-reference): Ditto.
* prim/simple.el (kill-region): Adjust endpoints of extent to
* prim/subr.el (eval-in-buffer): Make obsolete.
Suggested by Hrvoje Niksic.
- * packages/hyper-apropos.el (hyper-apropos-faces): Change group to
+ * packages/hyper-apropos.el (hyper-apropos-faces): Change group to
'faces.
Suggested by Per Abrahamsen.
- Get keybinding before command is executed.
Suggested by Kyle Jones and Steve Baur.
-
+
1997-06-24 Steven L Baur <steve@altair.xemacs.org>
* packages/gnuserv.el: Make old symbols Obsolete.
minibuffer.
* prim/minibuf.el (minibuffer-keyboard-quit): Ditto.
From Hrvoje Niksic <hniksic@srce.hr>
-
+
* prim/help.el (help-mode-quit): Bury buffer when quitting.
From Hrvoje Niksic <hniksic@srce.hr>
1997-06-23 Hrvoje Niksic <hniksic@srce.hr>
- * packages/info.el (Info-next-reference): Fix up for M-TAB to work
+ * packages/info.el (Info-next-reference): Fix up for M-TAB to work
correctly.
* utils/live-icon.el (live-icon-one-frame): Don't set glyphs to
1997-06-22 Steven L Baur <steve@altair.xemacs.org>
- * x11/x-menubar.el (default-menubar): Make `Jump to bookmark' menu
+ * x11/x-menubar.el (default-menubar): Make `Jump to bookmark' menu
dynamic.
From Gary D. Foster <Gary.Foster@Corp.Sun.COM>
* prim/tabify.el (untabify): Return nil.
From contributor name lost.
- * prim/packages.el (packages-hardcoded-lisp): startup.elc needs to
+ * prim/packages.el (packages-hardcoded-lisp): startup.elc needs to
be scanned for docstrings.
1997-06-21 Hrvoje Niksic <hniksic@srce.hr>
1997-06-20 Steven L Baur <steve@altair.xemacs.org>
- * utils/autoload.el (fixup-autoload-buffer): New function. Insert
+ * utils/autoload.el (fixup-autoload-buffer): New function. Insert
guards so a (load "auto-autoloads") works the same as require.
(batch-update-directory): Use it.
From Karl M. Hegbloom <karlheg@inetarena.com>
(archive-mode-map): Bind it to `q'.
- * utils/autoload.el (cusload-file-name): Default to custom-load.el
+ * utils/autoload.el (cusload-file-name): Default to custom-load.el
for each individual file.
* prim/minibuf.el (minibuffer-max-depth-exceeded): Use
- `custom-file' as a location for saving enable multiple minibuffers
+ `custom-file' as a location for saving enable multiple minibuffers
option.
* packages/man.el (manual-entry): Don't leave empty buffer if
1997-06-17 Steven L Baur <steve@altair.xemacs.org>
- * prim/files.el (auto-mode-alist): Add /app-defaults/ as candidate
+ * prim/files.el (auto-mode-alist): Add /app-defaults/ as candidate
for xrdb-mode.
Suggested by Karl Hegbloom, Regexp by David Moore.
- * version.el: Remove variables emacs-version, emacs-major-version,
+ * version.el: Remove variables emacs-version, emacs-major-version,
and emacs-minor-version.
- * tooltalk/tooltalk-load.el: Comment as obsolete and move contents
+ * tooltalk/tooltalk-load.el: Comment as obsolete and move contents
to dumped-lisp.el.
* prim/make-docfile.el: New file.
* prim/dumped-lisp.el: New file.
- * prim/update-elc.el (toplevel): Rework using a better function to
+ * prim/update-elc.el (toplevel): Rework using a better function to
determine autoload file locations.
* prim/packages.el: New file.
as an option.
Eliminate XEmacs specific autoloads.
From Hrvoje Niksic <hniksic@srce.hr>
-
+
* efs/dired.el (dired-save-excursion): Ebola cleanup.
* packages/hyper-apropos.el: Massive cleanup, Customize.
- From Hrvoje Niksic <hniksic@srce.hr>
+ From Hrvoje Niksic <hniksic@srce.hr>
Fri Jun 13 13:20:39 1997 Kyle Jones <kyle_jones@wonderworks.com>
* prim/syntax.el (symbol-near-point):
- Check for bobp and avoid (char-syntax (char-before)) if
+ Check for bobp and avoid (char-syntax (char-before)) if
there.
1997-06-13 Steven L Baur <steve@altair.xemacs.org>
* modes/make-mode.el (makefile-browse): Shouldn't be interactive.
From Hrvoje Niksic <hniksic@srce.hr>
- * prim/files.el (interpreter-mode-alist): ksh-mode is obsoleted by
+ * prim/files.el (interpreter-mode-alist): ksh-mode is obsoleted by
sh-script.
From Hrvoje Niksic <hniksic@srce.hr>
* prim/subr.el (with-current-buffer): New macro.
(with-temp-file): Ditto.
- * bytecomp/byte-optimize.el (byte-optimize-form-code-walker): Test
+ * bytecomp/byte-optimize.el (byte-optimize-form-code-walker): Test
for `save-current-buffer'.
* bytecomp/bytecomp.el: Recognize `save-current-buffer'.
From Heiko Muenkel <muenkel@tnt.uni-hannover.de>
1997-06-10 Gary D. Foster <Gary.Foster@corp.sun.com>
-
+
* modes/view-less.el: Changed \177 bindings to 'delete
* modes/help.el: Changed \177 bindings to 'delete
* modes/cc-mode.el:
* modes/cperl-mode.el: Fixed references to delete functions
to use the new names.
-
+
1997-06-11 Karl M Hegbloom <karlheg@inetarena.com>
* ilisp/ilisp-def.el (toplevel): Changed `ilisp-prefix' from
Change usage of \177 to use keysym 'delete.
From Gary D. Foster <Gary.Foster@Corp.Sun.COM>
- * packages/etags.el (tags-loop-scan): Don't pass a straight string
+ * packages/etags.el (tags-loop-scan): Don't pass a straight string
to error as a format string.
Reported by Miles Duke <mduke@erdas.com>
1997-06-04 Gary D. Foster <Gary.Foster@corp.sun.com>
- * modes/cc-mode.el: Modified `c-electric-delete' to honor the
+ * modes/cc-mode.el: Modified `c-electric-delete' to honor the
desired delete direction in both normal and "hungry" modes.
- * modes/cperl-mode.el: Modified `cperl-electric-backspace' to
+ * modes/cperl-mode.el: Modified `cperl-electric-backspace' to
honor the desired delete direction.
1997-06-03 MORIOKA Tomohiko <morioka@jaist.ac.jp>
* modes/*.el: Removed conflicting \177 bindings.
* modes/cc-mode.el: Modified `c-electric-delete' to use new
delete bindings.
- * modes/cperl-mode.el: Modified `cperl-electric-backspace' to
+ * modes/cperl-mode.el: Modified `cperl-electric-backspace' to
use new delete bindings.
-
+
1997-06-03 MORIOKA Tomohiko <morioka@jaist.ac.jp>
* leim/quail.el: to sync with quail.el of Emacs-19.34.94-epsilon.
* prim/about.el: Installed new version 2.1.
From Hrvoje Niksic <hniksic@srce.hr>
-
+
* prim/profile.el (pretty-print-profiling-info): Autoload don't
dump.
Clean up comments.
as toolbar callbacks.
From weiner@altrasoft.com
- * prim/mouse.el (default-mouse-track-cleanup-extent): Correct test
+ * prim/mouse.el (default-mouse-track-cleanup-extent): Correct test
on dead-func extent.
* prim/help.el (view-emacs-news): outl-mouse turned off in
`icomplete-max-delay-chars' - Maximum number of initial chars to
apply icomplete compute delay.
-
+
`icomplete-compute-delay' - Completions-computation stall, used
only with large-number completions
(insert-parentheses): Let a negative argument enclose preceding
sexps.
From Erik Naggum <erik@naggum.no>
-
+
* prim/window-xemacs.el: New file, split from window.el with
XEmacs-specific stuff.
* prim/window.el (kill-buffer-and-window): New command.
Bind it to C-x 4 0.
From Richard Stallman <rms@whiz-bang.gnu.ai.mit.edu>
-
+
* prim/window.el (split-window-vertically): Don't change point in old
window if both the original point and the end of the buffer are
visible after splitting, when split-window-keep-point is nil.
From Noah Friedman <friedman@prep.ai.mit.edu>
-
+
* prim/files.el (revert-buffer-internal-hook): Declare.
* utils/map-ynp.el: Synch with Emacs 19.34.94.
standard-value for Custom-1.98.
1997-05-26 Steven L Baur <steve@altair.xemacs.org>
-
+
* prim/help.el (view-lossage-key-count): New variable.
(view-lossage-message-count): New variable.
(view-lossage): Use them.
Tue May 20 20:32:59 1997 Steven L Baur <steve@altair.xemacs.org>
- * prim/subr.el (buffer-substring-no-properties): Clean out extents
+ * prim/subr.el (buffer-substring-no-properties): Clean out extents
too.
Mon May 19 19:48:35 1997 Steven L Baur <steve@altair.xemacs.org>
* prim/files.el (revert-buffer): Add optional third parameter to
preserve buffer modes (from Emacs 19.34.94).
- (after-find-file): Add optional fifth parameter to preserve buffer
+ (after-find-file): Add optional fifth parameter to preserve buffer
modes (from Emacs 19.34.94).
- * packages/vc.el: Synch with Emacs 19.34.94 because our version was
+ * packages/vc.el: Synch with Emacs 19.34.94 because our version was
hopeless.
(vc-checkout): Autoload.
(vc-find-binary): Ditto.
Fri Apr 25 13:21:46 1997 Per Abrahamsen <abraham@dina.kvl.dk>
- * apropos.el (apropos): Add support for customization groups.
+ * apropos.el (apropos): Add support for customization groups.
(apropos-print): Ditto.
Sat May 17 19:56:31 1997 Glynn Clements <glynn@sensei.co.uk>
* tm/tm-vm.el: Provide for vm-unsaved-message having been removed
in recent versions of VM.
-
+
Fri May 9 10:41:44 1997 Steven L Baur <steve@altair.xemacs.org>
* iso/iso-acc.el (iso-accents-compose): Fix XEmacs 19.14
* hm--html-menus/hm--html.el: Define obsolete aliases for the
previous function spellings.
- * hm--html-menus/hm--html-keys.el: Define obsolete aliases for the
+ * hm--html-menus/hm--html-keys.el: Define obsolete aliases for the
previous variable spellings.
- * prim/obsolete.el (define-obsolete-variable-alias): Fix docstring
+ * prim/obsolete.el (define-obsolete-variable-alias): Fix docstring
spelling.
(define-compatible-variable-alias): Ditto.
Tue Apr 29 18:51:31 1997 Steven L Baur <steve@altair.xemacs.org>
- * mule/mule-files.el (buffer-file-coding-system-alist): Regexp for
+ * mule/mule-files.el (buffer-file-coding-system-alist): Regexp for
handling info files didn't match the right pattern.
Sun Apr 27 18:09:48 1997 Steven L Baur <steve@altair.xemacs.org>
Fri Apr 25 08:39:50 1997 Steven L Baur <steve@altair.xemacs.org>
- * modes/sh-script.el (sh-indent-line): Deal with pathological case
+ * modes/sh-script.el (sh-indent-line): Deal with pathological case
of indenting a first line containing a `#' as first non-white
space character.
* packages/vc.el (vc-directory): Dired requires a list not a
string of space separated names.
- * utils/live-icon.el (live-icon-colour-name-from-face): `face' may
+ * utils/live-icon.el (live-icon-colour-name-from-face): `face' may
be a list of faces since it is generated by `extent-face'.
Fri Apr 11 21:12:57 1997 Steven L Baur <steve@altair.xemacs.org>
- * packages/ispell.el: Don't attempt creation of the menubar unless
+ * packages/ispell.el: Don't attempt creation of the menubar unless
XEmacs has been compiled with menubars.
* prim/simple.el (yank-pop): mark-marker needs optional force
Tue Apr 8 12:57:05 1997 Steven L Baur <steve@altair.xemacs.org>
* modes/lisp-mode.el (eval-defun): Evaluate defcustom in defconst
- style instead of defvar style (patch derived from Emacs 19.35/Lars
+ style instead of defvar style (patch derived from Emacs 19.35/Lars
Magne Ingebrigtsen).
Mon Apr 7 16:38:43 1997 Steven L Baur <steve@altair.xemacs.org>
* x11/x-menubar.el (default-menubar): Use xmine not mine.
- * prim/help.el (describe-variable): Some doc strings weren't being
+ * prim/help.el (describe-variable): Some doc strings weren't being
terminated with a newline.
Sat Apr 5 20:20:00 1997 Steven L Baur <steve@altair.xemacs.org>
Sat Apr 5 13:18:05 1997 Tomasz J. Cholewo <t.cholewo@ieee.org>
- * packages/etags.el (tags-query-replace): Fixed DELIMITED argument
+ * packages/etags.el (tags-query-replace): Fixed DELIMITED argument
bug. `with-caps-disable-folding' moved to isearch-mode.el.
* packages/info.el (Info-search): Use `with-caps-disable-folding'.
(fancy-diary-display): Use modeline-buffer-identification.
* calendar/appt.el (appt-diary-entries): Do not display diary.
- (appt-check): Display diary buffer at midnight.
-
+ (appt-check): Display diary buffer at midnight.
+
Fri Mar 21 19:16:46 1997 Steven L Baur <steve@altair.xemacs.org>
* mule/mule-coding.el (enable-multibyte-characters): MULE
* utils/eldoc.el (eldoc-pre-command-refresh-echo-area): Use
eldoc-display-message-p, not eldoc-display-message-no-interference-p.
-
+
Sat Mar 8 11:20:47 1997 Steven L Baur <steve@altair.xemacs.org>
* prim/startup.el (startup-splash-frame-body): More text tweaking.
* x11/x-menubar.el (default-menubar): Reorganize again undoing
previous change. Customize submenu moved to top of options menu.
Edit faces restored to edit-faces and renamed to Browse faces.
-
+
Thu Mar 6 08:43:27 1997 Steven L Baur <steve@altair.xemacs.org>
* x11/x-menubar.el (options-menu): New variable.
* site-load.el: Move site-packages to the top level.
Sun Mar 2 01:37:04 1997 Hrvoje Niksic <hniksic@srce.hr>
-
+
* utils/mail-extr.el (all-top-level-domains): Added "hr" domain.
* packages/ps-print.el (ps-print-color-p): Default to nil.
Sat Feb 15 11:05:29 1997 Kyle Jones <kyle_jones@wonderworks.com>
* utils/redo.el: made before and after status messages so that
the user is aware if a long action is still being processed.
-
+
rolled version number up to 1.00, since the package seems to be
stable.
cosmetic changes so the file could be included in the XEmacs
distribution.
-
+
Sat Feb 15 11:13:05 1997 Hrvoje Niksic <hniksic@srce.hr>
* prim/simple.el (line-move-ignore-invisible): Change default to
* packages/ps-print.el: Update maintainer address.
Thu Feb 6 12:35:39 1997 Bill Dubuque <wgd@martigny.ai.mit.edu>
-
+
* cl/cl-macs.el (cl-do-proclaim): Correct addition of bound
variables to `byte-compile-bound-variables'.
* x11/x-toolbar.el (toolbar-mail-commands-alist): Updated with a
lot of new mailer possiblities.
-
+
Fri Jan 31 09:28:49 1997 Martin Buchholz <mrb@eng.sun.com>
* x11/x-font-menu.el (reset-device-font-menus): Correct guard on
* packages/compile.el: Speed up regexps.
(compilation-parse-errors): replace re-search-forward with
something faster.
-
+
Thu Jan 30 20:33:56 1997 Hvoje Niksic <hniksic@srce.hr>
* x11/x-toolbar.el
(toolbar-mail-commands-alist): New variable.
(toolbar-mail-reader): Ditto.
(toolbar-mail): Use them.
-
+
* x11/x-menubar.el: Shorten help menu item names.
Thu Jan 30 17:22:15 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
(ps-print-version): Fix value.
(cl lisp-float-type): Require them.
(ps-number-of-columns ps-*-font-size): Try to select defaults
- better suited when `ps-landscape-mode' is non-nil.
+ better suited when `ps-landscape-mode' is non-nil.
(ps-*-faces): Change default for Font Lock mode faces when
- `ps-print-color-p' is nil.
+ `ps-print-color-p' is nil.
(ps-right-header): Replace `time-stamp-yy/mm/dd'
- by `time-stamp-mon-dd-yyyy'.
- (ps-end-file ps-begin-page): Fix bug in page count for Ghostview.
+ by `time-stamp-mon-dd-yyyy'.
+ (ps-end-file ps-begin-page): Fix bug in page count for Ghostview.
(ps-generate-postscript-with-faces): Replace `ps-sorter' by
- `car-less-than-car'.
- (ps-plot ps-generate): Replace `%d' by `%3d'.
+ `car-less-than-car'.
+ (ps-plot ps-generate): Replace `%d' by `%3d'.
Wed Jan 22 15:32:39 1997 Greg Klanderman <greg@alphatech.com>
* mule/mule-init.el (init-mule): Get Japanese man pages working.
Fri Jan 17 17:22:54 1997 Hrvoje Niksic <hniksic@bjesomar.srce.hr>
-
+
* man.el (Manual-mode): Don't mess with scrollbars if they aren't
present.
Let `buffers-menu-submenus-for-groups-p' be an integer : if there
are more buffers than this value, use submenus, otherwise not.
-
+
* packages/vc.el (vc-rename-this-file): New function (was missing,
but referred to on the menubar).
* electric/ebuff-menu.el (electric-buffer-menu-mode-map): Correct
bad 19.34 synch patch.
-
+
* utils/pretty-print.el: New File.
Sun Dec 8 13:59:40 1996 Steven L Baur <steve@altair.xemacs.org>
evaluated more than once.
Comment formatting changes.
-
+
* edebug/advise-eval-region.el: New File. Separate out advise for
eval-region so it is only evaluated once.
icomplete-exhibit needs to be called in the setup-hook.
- * packages/apropos.el: Correct a typo in button binding.
+ * packages/apropos.el: Correct a typo in button binding.
Fixes the bug where if apropos-label-face is actually defined as
face, apropos bombs with an error
Redefines the default faces for the various apropos faces so they
come out in color by default (defaults are based on various
standard font-lock faces).
-
- * version.el: Bumped up to b31.
-
+ * version.el: Bumped up to b31.
(write-region 1 (point-max) file)
(erase-buffer)))
\f
+(defun abbrev-string-to-be-defined (arg)
+ "Return the string for which an abbrev will be defined.
+ARG is the argument to `add-global-abbrev' or `add-mode-abbrev'."
+ (if (and (not arg) (region-active-p)) (setq arg 0)
+ (setq arg (prefix-numeric-value arg)))
+ (and (>= arg 0)
+ (buffer-substring
+ (point)
+ (if (= arg 0) (mark)
+ (save-excursion (forward-word (- arg)) (point))))))
+
(defun add-mode-abbrev (arg)
"Define mode-specific abbrev for last word(s) before point.
Argument is how many words before point form the expansion;
(defun add-abbrev (table type arg)
;; XEmacs change:
- (if (and (not arg) (region-active-p)) (setq arg 0)
- (setq arg (prefix-numeric-value arg)))
- (let ((exp (and (>= arg 0)
- (buffer-substring
- (point)
- (if (= arg 0) (mark)
- (save-excursion (forward-word (- arg)) (point))))))
+ (let ((exp (abbrev-string-to-be-defined arg))
name)
(setq name
(read-string (format (if exp "%s abbrev for \"%s\": "
name (abbrev-expansion name table))))
(define-abbrev table (downcase name) exp))))
+(defun inverse-abbrev-string-to-be-defined (arg)
+ "Return the string for which an inverse abbrev will be defined.
+ARG is the argument to `inverse-add-global-abbrev' or
+`inverse-add-mode-abbrev'."
+ (save-excursion
+ (forward-word (- arg))
+ (buffer-substring (point) (progn (forward-word 1) (point)))))
+
(defun inverse-add-mode-abbrev (arg)
"Define last word before point as a mode-specific abbrev.
With prefix argument N, defines the Nth word before point.
(jmiller "Jeff Miller" "jmiller@smart.net")
(juhp "Jens-Ulrik Holger Petersen" "petersen@kurims.kyoto-u.ac.jp")
(jwz "Jamie Zawinski" "jwz@jwz.org")
- (kazz "IENAGA Kazuyuki" "ienaga@jsys.co.jp")
+ (kazz "IENAGA Kazuyuki" "ienaga@xemacs.org")
(kyle "Kyle Jones" "kyle_jones@wonderworks.com")
(larsi "Lars Magne Ingebrigtsen" "larsi@gnus.org")
(marcpa "Marc Paquette" "marcpa@CAM.ORG")
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
-;;; Code:
+\f
+;;;###autoload
+(defun vassoc (key valist)
+ "Search VALIST for a vector whose first element is equal to KEY.
+See also `assoc'."
+ ;; by Stig@hackvan.com
+ (let (el)
+ (catch 'done
+ (while (setq el (pop valist))
+ (and (equal key (aref el 0))
+ (throw 'done el))))))
+\f
;;;###autoload
(defun put-alist (item value alist)
;;; DO NOT MODIFY THIS FILE
-(if (featurep 'Standard-autoloads) (error "Already loaded"))
+(if (featurep 'lisp-autoloads) (error "Already loaded"))
\f
-;;;### (autoloads nil "abbrev" "lisp/abbrev.el")
-
-;;;***
-\f
-;;;### (autoloads (about-xemacs) "about" "lisp/about.el")
-
-(autoload 'about-xemacs "about" "\
-Describe the True Editor and its minions." t nil)
-
-;;;***
-\f
-;;;### (autoloads (set-modified-alist modify-alist remove-alist set-alist del-alist put-alist) "alist" "lisp/alist.el")
-
-(autoload 'put-alist "alist" "\
-Modify ALIST to set VALUE to ITEM.
-If there is a pair whose car is ITEM, replace its cdr by VALUE.
-If there is not such pair, create new pair (ITEM . VALUE) and
-return new alist whose car is the new pair and cdr is ALIST.
-[tomo's ELIS like function]" nil nil)
-
-(autoload 'del-alist "alist" "\
-If there is a pair whose key is ITEM, delete it from ALIST.
-[tomo's ELIS emulating function]" nil nil)
-
-(autoload 'set-alist "alist" "\
-Modify a alist indicated by SYMBOL to set VALUE to ITEM." nil nil)
-
-(autoload 'remove-alist "alist" "\
-Remove ITEM from the alist indicated by SYMBOL." nil nil)
-
-(autoload 'modify-alist "alist" "\
-Modify alist DEFAULT into alist MODIFIER." nil nil)
-
-(autoload 'set-modified-alist "alist" "\
-Modify a value of a symbol SYM into alist MODIFIER.
-The symbol SYM should be alist. If it is not bound,
-its value regard as nil." nil nil)
-
-;;;***
-\f
-;;;### (autoloads (apropos-documentation apropos-value apropos apropos-command) "apropos" "lisp/apropos.el")
-
-(fset 'command-apropos 'apropos-command)
-
-(autoload 'apropos-command "apropos" "\
-Shows commands (interactively callable functions) that match REGEXP.
-With optional prefix ARG or if `apropos-do-all' is non-nil, also show
-variables." t nil)
-
-(autoload 'apropos "apropos" "\
-Show all bound symbols whose names match REGEXP.
-With optional prefix ARG or if `apropos-do-all' is non-nil, also show unbound
-symbols and key bindings, which is a little more time-consuming.
-Returns list of symbols and documentation found." t nil)
-
-(autoload 'apropos-value "apropos" "\
-Show all symbols whose value's printed image matches REGEXP.
-With optional prefix ARG or if `apropos-do-all' is non-nil, also looks
-at the function and at the names and values of properties.
-Returns list of symbols and values found." t nil)
-
-(autoload 'apropos-documentation "apropos" "\
-Show symbols whose documentation contain matches for REGEXP.
-With optional prefix ARG or if `apropos-do-all' is non-nil, also use
-documentation that is not stored in the documentation file and show key
-bindings.
-Returns list of symbols and documentation found." t nil)
-
-;;;***
-\f
-;;;### (autoloads (batch-update-directory batch-update-autoloads update-autoloads-from-directory update-autoloads-here update-file-autoloads generate-file-autoloads) "autoload" "lisp/autoload.el")
+;;;### (autoloads (batch-update-one-directory batch-update-directory batch-update-autoloads update-autoloads-from-directory update-autoloads-here update-file-autoloads generate-file-autoloads) "autoload" "lisp/autoload.el")
(autoload 'generate-file-autoloads "autoload" "\
Insert at point a loaddefs autoload section for FILE.
(autoload 'update-file-autoloads "autoload" "\
Update the autoloads for FILE in `generated-autoload-file'
\(which FILE might bind in its local variables).
-This functions refuses to update autoloads files." t nil)
+This function refuses to update autoloads files." t nil)
(autoload 'update-autoloads-here "autoload" "\
Update sections of the current buffer generated by `update-file-autoloads'." t nil)
(autoload 'update-autoloads-from-directory "autoload" "\
Update `generated-autoload-file' with all the current autoloads from DIR.
This runs `update-file-autoloads' on each .el file in DIR.
-Obsolete autoload entries for files that no longer exist are deleted." t nil)
+Obsolete autoload entries for files that no longer exist are deleted.
+Note that, if this function is called from `batch-update-directory',
+`generated-autoload-file' was rebound in that function." t nil)
(autoload 'batch-update-autoloads "autoload" "\
Update the autoloads for the files or directories on the command line.
on the command line." nil nil)
(autoload 'batch-update-directory "autoload" "\
-Update the autoloads for the directory on the command line.
-Runs `update-file-autoloads' on each file in the given directory, must
-be used only with -batch and kills XEmacs on completion." nil nil)
-
-;;;***
-\f
-;;;### (autoloads nil "buff-menu" "lisp/buff-menu.el")
-
-(defvar list-buffers-directory nil)
+Update the autoloads for the directories on the command line.
+Runs `update-file-autoloads' on each file in the given directory, and must
+be used only with -batch." nil nil)
-(make-variable-buffer-local 'list-buffers-directory)
+(autoload 'batch-update-one-directory "autoload" "\
+Update the autoloads for a single directory on the command line.
+Runs `update-file-autoloads' on each file in the given directory, and must
+be used only with -batch." nil nil)
;;;***
\f
-;;;### (autoloads (batch-byte-recompile-directory batch-byte-recompile-directory-norecurse batch-byte-compile display-call-tree byte-compile-sexp byte-compile compile-defun byte-compile-buffer byte-compile-and-load-file byte-compile-file byte-recompile-file byte-recompile-directory byte-force-recompile) "bytecomp" "lisp/bytecomp.el")
+;;;### (autoloads (batch-byte-recompile-directory batch-byte-recompile-directory-norecurse batch-byte-compile-one-file batch-byte-compile display-call-tree byte-compile-sexp byte-compile compile-defun byte-compile-buffer byte-compile-and-load-file byte-compile-file byte-recompile-file byte-recompile-directory byte-force-recompile) "bytecomp" "lisp/bytecomp.el")
(autoload 'byte-force-recompile "bytecomp" "\
Recompile every `.el' file in DIRECTORY that already has a `.elc' file.
Each file is processed even if an error occurred previously.
For example, invoke \"xemacs -batch -f batch-byte-compile $emacs/ ~/*.el\"" nil nil)
+(autoload 'batch-byte-compile-one-file "bytecomp" "\
+Run `byte-compile-file' on a single file remaining on the command line.
+Use this from the command line, with `-batch';
+it won't work in an interactive Emacs." nil nil)
+
(autoload 'batch-byte-recompile-directory-norecurse "bytecomp" "\
Same as `batch-byte-recompile-directory' but without recursion." nil nil)
;;;***
\f
-;;;### (autoloads (compiler-macroexpand define-compiler-macro ignore-file-errors ignore-errors assert check-type typep deftype cl-struct-setf-expander defstruct define-modify-macro callf2 callf letf* letf rotatef shiftf remf cl-do-pop psetf setf get-setf-method defsetf define-setf-method declare the locally multiple-value-setq multiple-value-bind lexical-let* lexical-let symbol-macrolet macrolet labels flet progv psetq do-all-symbols do-symbols dotimes dolist do* do loop return-from return block etypecase typecase ecase case load-time-value eval-when destructuring-bind function* defmacro* defun* gentemp gensym cl-compile-time-init) "cl-macs" "lisp/cl-macs.el")
+;;;### (autoloads (pop-tag-mark tags-apropos list-tags tags-query-replace tags-search tags-loop-continue next-file tag-complete-symbol find-tag-other-window find-tag find-tag-at-point visit-tags-table) "etags" "lisp/etags.el")
-(autoload 'cl-compile-time-init "cl-macs" nil nil nil)
+(autoload 'visit-tags-table "etags" "\
+Tell tags commands to use tags table file FILE when all else fails.
+FILE should be the name of a file created with the `etags' program.
+A directory name is ok too; it means file TAGS in that directory." t nil)
-(autoload 'gensym "cl-macs" "\
-Generate a new uninterned symbol.
-The name is made by appending a number to PREFIX, default \"G\"." nil nil)
+(autoload 'find-tag-at-point "etags" "\
+*Find tag whose name contains TAGNAME.
+Identical to `find-tag' but does not prompt for tag when called interactively;
+instead, uses tag around or before point." t nil)
-(autoload 'gentemp "cl-macs" "\
-Generate a new interned symbol with a unique name.
-The name is made by appending a number to PREFIX, default \"G\"." nil nil)
+(autoload 'find-tag "etags" "\
+*Find tag whose name contains TAGNAME.
+ Selects the buffer that the tag is contained in
+and puts point at its definition.
+ If TAGNAME is a null string, the expression in the buffer
+around or before point is used as the tag name.
+ If called interactively with a numeric argument, searches for the next tag
+in the tag table that matches the tagname used in the previous find-tag.
+ If second arg OTHER-WINDOW is non-nil, uses another window to display
+the tag.
-(autoload 'defun* "cl-macs" "\
-(defun* NAME ARGLIST [DOCSTRING] BODY...): define NAME as a function.
-Like normal `defun', except ARGLIST allows full Common Lisp conventions,
-and BODY is implicitly surrounded by (block NAME ...)." nil 'macro)
+This version of this function supports multiple active tags tables,
+and completion.
-(autoload 'defmacro* "cl-macs" "\
-(defmacro* NAME ARGLIST [DOCSTRING] BODY...): define NAME as a macro.
-Like normal `defmacro', except ARGLIST allows full Common Lisp conventions,
-and BODY is implicitly surrounded by (block NAME ...)." nil 'macro)
+Variables of note:
-(autoload 'function* "cl-macs" "\
-(function* SYMBOL-OR-LAMBDA): introduce a function.
-Like normal `function', except that if argument is a lambda form, its
-ARGLIST allows full Common Lisp conventions." nil 'macro)
+ tag-table-alist controls which tables apply to which buffers
+ tags-file-name a default tags table
+ tags-build-completion-table controls completion behavior
+ buffer-tag-table another way of specifying a buffer-local table
+ make-tags-files-invisible whether tags tables should be very hidden
+ tag-mark-stack-max how many tags-based hops to remember" t nil)
-(autoload 'destructuring-bind "cl-macs" nil nil 'macro)
+(autoload 'find-tag-other-window "etags" "\
+*Find tag whose name contains TAGNAME, in another window.
+ Selects the buffer that the tag is contained in in another window
+and puts point at its definition.
+ If TAGNAME is a null string, the expression in the buffer
+around or before point is used as the tag name.
+ If second arg NEXT is non-nil (interactively, with prefix arg),
+searches for the next tag in the tag table
+that matches the tagname used in the previous find-tag.
-(autoload 'eval-when "cl-macs" "\
-(eval-when (WHEN...) BODY...): control when BODY is evaluated.
-If `compile' is in WHEN, BODY is evaluated when compiled at top-level.
-If `load' is in WHEN, BODY is evaluated when loaded after top-level compile.
-If `eval' is in WHEN, BODY is evaluated when interpreted or at non-top-level." nil 'macro)
+This version of this function supports multiple active tags tables,
+and completion.
-(autoload 'load-time-value "cl-macs" "\
-Like `progn', but evaluates the body at load time.
-The result of the body appears to the compiler as a quoted constant." nil 'macro)
+Variables of note:
-(autoload 'case "cl-macs" "\
-(case EXPR CLAUSES...): evals EXPR, chooses from CLAUSES on that value.
-Each clause looks like (KEYLIST BODY...). EXPR is evaluated and compared
-against each key in each KEYLIST; the corresponding BODY is evaluated.
-If no clause succeeds, case returns nil. A single atom may be used in
-place of a KEYLIST of one atom. A KEYLIST of `t' or `otherwise' is
-allowed only in the final clause, and matches if no other keys match.
-Key values are compared by `eql'." nil 'macro)
+ tag-table-alist controls which tables apply to which buffers
+ tags-file-name a default tags table
+ tags-build-completion-table controls completion behavior
+ buffer-tag-table another way of specifying a buffer-local table
+ make-tags-files-invisible whether tags tables should be very hidden
+ tag-mark-stack-max how many tags-based hops to remember" t nil)
-(autoload 'ecase "cl-macs" "\
-(ecase EXPR CLAUSES...): like `case', but error if no case fits.
-`otherwise'-clauses are not allowed." nil 'macro)
+(autoload 'tag-complete-symbol "etags" "\
+The function used to do tags-completion (using 'tag-completion-predicate)." t nil)
-(autoload 'typecase "cl-macs" "\
-(typecase EXPR CLAUSES...): evals EXPR, chooses from CLAUSES on that value.
-Each clause looks like (TYPE BODY...). EXPR is evaluated and, if it
-satisfies TYPE, the corresponding BODY is evaluated. If no clause succeeds,
-typecase returns nil. A TYPE of `t' or `otherwise' is allowed only in the
-final clause, and matches if no other keys match." nil 'macro)
+(autoload 'next-file "etags" "\
+Select next file among files in current tag table(s).
-(autoload 'etypecase "cl-macs" "\
-(etypecase EXPR CLAUSES...): like `typecase', but error if no case fits.
-`otherwise'-clauses are not allowed." nil 'macro)
+A first argument of t (prefix arg, if interactive) initializes to the
+beginning of the list of files in the (first) tags table. If the argument
+is neither nil nor t, it is evalled to initialize the list of files.
-(autoload 'block "cl-macs" "\
-(block NAME BODY...): define a lexically-scoped block named NAME.
-NAME may be any symbol. Code inside the BODY forms can call `return-from'
-to jump prematurely out of the block. This differs from `catch' and `throw'
-in two respects: First, the NAME is an unevaluated symbol rather than a
-quoted symbol or other form; and second, NAME is lexically rather than
-dynamically scoped: Only references to it within BODY will work. These
-references may appear inside macro expansions, but not inside functions
-called from BODY." nil 'macro)
+Non-nil second argument NOVISIT means use a temporary buffer
+to save time and avoid uninteresting warnings.
-(autoload 'return "cl-macs" "\
-(return [RESULT]): return from the block named nil.
-This is equivalent to `(return-from nil RESULT)'." nil 'macro)
+Value is nil if the file was already visited;
+if the file was newly read in, the value is the filename." t nil)
-(autoload 'return-from "cl-macs" "\
-(return-from NAME [RESULT]): return from the block named NAME.
-This jumps out to the innermost enclosing `(block NAME ...)' form,
-returning RESULT from that form (or nil if RESULT is omitted).
-This is compatible with Common Lisp, but note that `defun' and
-`defmacro' do not create implicit blocks as they do in Common Lisp." nil 'macro)
+(autoload 'tags-loop-continue "etags" "\
+Continue last \\[tags-search] or \\[tags-query-replace] command.
+Used noninteractively with non-nil argument to begin such a command (the
+argument is passed to `next-file', which see).
+Two variables control the processing we do on each file:
+the value of `tags-loop-scan' is a form to be executed on each file
+to see if it is interesting (it returns non-nil if so)
+and `tags-loop-operate' is a form to execute to operate on an interesting file
+If the latter returns non-nil, we exit; otherwise we scan the next file." t nil)
-(autoload 'loop "cl-macs" "\
-(loop CLAUSE...): The Common Lisp `loop' macro.
-Valid clauses are:
- for VAR from/upfrom/downfrom NUM to/upto/downto/above/below NUM by NUM,
- for VAR in LIST by FUNC, for VAR on LIST by FUNC, for VAR = INIT then EXPR,
- for VAR across ARRAY, repeat NUM, with VAR = INIT, while COND, until COND,
- always COND, never COND, thereis COND, collect EXPR into VAR,
- append EXPR into VAR, nconc EXPR into VAR, sum EXPR into VAR,
- count EXPR into VAR, maximize EXPR into VAR, minimize EXPR into VAR,
- if COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...],
- unless COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...],
- do EXPRS..., initially EXPRS..., finally EXPRS..., return EXPR,
- finally return EXPR, named NAME." nil 'macro)
+(autoload 'tags-search "etags" "\
+Search through all files listed in tags table for match for REGEXP.
+Stops when a match is found.
+To continue searching for next match, use command \\[tags-loop-continue].
-(autoload 'do "cl-macs" "\
-The Common Lisp `do' loop.
-Format is: (do ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)" nil 'macro)
+See documentation of variable `tag-table-alist'." t nil)
-(autoload 'do* "cl-macs" "\
-The Common Lisp `do*' loop.
-Format is: (do* ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)" nil 'macro)
+(autoload 'tags-query-replace "etags" "\
+Query-replace-regexp FROM with TO through all files listed in tags table.
+Third arg DELIMITED (prefix arg) means replace only word-delimited matches.
+If you exit (\\[keyboard-quit] or ESC), you can resume the query-replace
+with the command \\[tags-loop-continue].
-(autoload 'dolist "cl-macs" "\
-(dolist (VAR LIST [RESULT]) BODY...): loop over a list.
-Evaluate BODY with VAR bound to each `car' from LIST, in turn.
-Then evaluate RESULT to get return value, default nil." nil 'macro)
+See documentation of variable `tag-table-alist'." t nil)
-(autoload 'dotimes "cl-macs" "\
-(dotimes (VAR COUNT [RESULT]) BODY...): loop a certain number of times.
-Evaluate BODY with VAR bound to successive integers from 0, inclusive,
-to COUNT, exclusive. Then evaluate RESULT to get return value, default
-nil." nil 'macro)
+(autoload 'list-tags "etags" "\
+Display list of tags in FILE." t nil)
-(autoload 'do-symbols "cl-macs" "\
-(dosymbols (VAR [OBARRAY [RESULT]]) BODY...): loop over all symbols.
-Evaluate BODY with VAR bound to each interned symbol, or to each symbol
-from OBARRAY." nil 'macro)
+(autoload 'tags-apropos "etags" "\
+Display list of all tags in tag table REGEXP matches." t nil)
+(define-key esc-map "*" 'pop-tag-mark)
-(autoload 'do-all-symbols "cl-macs" nil nil 'macro)
+(autoload 'pop-tag-mark "etags" "\
+Go to last tag position.
+`find-tag' maintains a mark-stack seperate from the \\[set-mark-command] mark-stack.
+This function pops (and moves to) the tag at the top of this stack." t nil)
-(autoload 'psetq "cl-macs" "\
-(psetq SYM VAL SYM VAL ...): set SYMs to the values VALs in parallel.
-This is like `setq', except that all VAL forms are evaluated (in order)
-before assigning any symbols SYM to the corresponding values." nil 'macro)
+;;;***
+\f
+;;;### (autoloads (finder-by-keyword) "finder" "lisp/finder.el")
-(autoload 'progv "cl-macs" "\
-(progv SYMBOLS VALUES BODY...): bind SYMBOLS to VALUES dynamically in BODY.
-The forms SYMBOLS and VALUES are evaluated, and must evaluate to lists.
-Each SYMBOL in the first list is bound to the corresponding VALUE in the
-second list (or made unbound if VALUES is shorter than SYMBOLS); then the
-BODY forms are executed and their result is returned. This is much like
-a `let' form, except that the list of symbols can be computed at run-time." nil 'macro)
+(autoload 'finder-by-keyword "finder" "\
+Find packages matching a given keyword." t nil)
-(autoload 'flet "cl-macs" "\
-(flet ((FUNC ARGLIST BODY...) ...) FORM...): make temporary function defns.
-This is an analogue of `let' that operates on the function cell of FUNC
-rather than its value cell. The FORMs are evaluated with the specified
-function definitions in place, then the definitions are undone (the FUNCs
-go back to their previous definitions, or lack thereof)." nil 'macro)
+;;;***
+\f
+;;;### (autoloads (font-lock-set-defaults-1 font-lock-fontify-buffer turn-off-font-lock turn-on-font-lock font-lock-mode) "font-lock" "lisp/font-lock.el")
-(autoload 'labels "cl-macs" "\
-(labels ((FUNC ARGLIST BODY...) ...) FORM...): make temporary func bindings.
-This is like `flet', except the bindings are lexical instead of dynamic.
-Unlike `flet', this macro is fully compliant with the Common Lisp standard." nil 'macro)
+(defcustom font-lock-auto-fontify t "*Whether font-lock should automatically fontify files as they're loaded.\nThis will only happen if font-lock has fontifying keywords for the major\nmode of the file. You can get finer-grained control over auto-fontification\nby using this variable in combination with `font-lock-mode-enable-list' or\n`font-lock-mode-disable-list'." :type 'boolean :group 'font-lock)
-(autoload 'macrolet "cl-macs" "\
-(macrolet ((NAME ARGLIST BODY...) ...) FORM...): make temporary macro defns.
-This is like `flet', but for macros instead of functions." nil 'macro)
+(defcustom font-lock-mode-enable-list nil "*List of modes to auto-fontify, if `font-lock-auto-fontify' is nil." :type '(repeat (symbol :tag "Mode")) :group 'font-lock)
-(autoload 'symbol-macrolet "cl-macs" "\
-(symbol-macrolet ((NAME EXPANSION) ...) FORM...): make symbol macro defns.
-Within the body FORMs, references to the variable NAME will be replaced
-by EXPANSION, and (setq NAME ...) will act like (setf EXPANSION ...)." nil 'macro)
+(defcustom font-lock-mode-disable-list nil "*List of modes not to auto-fontify, if `font-lock-auto-fontify' is t." :type '(repeat (symbol :tag "Mode")) :group 'font-lock)
-(autoload 'lexical-let "cl-macs" "\
-(lexical-let BINDINGS BODY...): like `let', but lexically scoped.
-The main visible difference is that lambdas inside BODY will create
-lexical closures as in Common Lisp." nil 'macro)
+(defcustom font-lock-use-colors '(color) "*Specification for when Font Lock will set up color defaults.\nNormally this should be '(color), meaning that Font Lock will set up\ncolor defaults that are only used on color displays. Set this to nil\nif you don't want Font Lock to set up color defaults at all. This\nshould be one of\n\n-- a list of valid tags, meaning that the color defaults will be used\n when all of the tags apply. (e.g. '(color x))\n-- a list whose first element is 'or and whose remaining elements are\n lists of valid tags, meaning that the defaults will be used when\n any of the tag lists apply.\n-- nil, meaning that the defaults should not be set up at all.\n\n(If you specify face values in your init file, they will override any\nthat Font Lock specifies, regardless of whether you specify the face\nvalues before or after loading Font Lock.)\n\nSee also `font-lock-use-fonts'. If you want more control over the faces\nused for fontification, see the documentation of `font-lock-mode' for\nhow to do it." :type 'sexp :group 'font-lock)
-(autoload 'lexical-let* "cl-macs" "\
-(lexical-let* BINDINGS BODY...): like `let*', but lexically scoped.
-The main visible difference is that lambdas inside BODY will create
-lexical closures as in Common Lisp." nil 'macro)
+(defcustom font-lock-use-fonts '(or (mono) (grayscale)) "*Specification for when Font Lock will set up non-color defaults.\n\nNormally this should be '(or (mono) (grayscale)), meaning that Font\nLock will set up non-color defaults that are only used on either mono\nor grayscale displays. Set this to nil if you don't want Font Lock to\nset up non-color defaults at all. This should be one of\n\n-- a list of valid tags, meaning that the non-color defaults will be used\n when all of the tags apply. (e.g. '(grayscale x))\n-- a list whose first element is 'or and whose remaining elements are\n lists of valid tags, meaning that the defaults will be used when\n any of the tag lists apply.\n-- nil, meaning that the defaults should not be set up at all.\n\n(If you specify face values in your init file, they will override any\nthat Font Lock specifies, regardless of whether you specify the face\nvalues before or after loading Font Lock.)\n\nSee also `font-lock-use-colors'. If you want more control over the faces\nused for fontification, see the documentation of `font-lock-mode' for\nhow to do it." :type 'sexp :group 'font-lock)
-(autoload 'multiple-value-bind "cl-macs" "\
-(multiple-value-bind (SYM SYM...) FORM BODY): collect multiple return values.
-FORM must return a list; the BODY is then executed with the first N elements
-of this list bound (`let'-style) to each of the symbols SYM in turn. This
-is analogous to the Common Lisp `multiple-value-bind' macro, using lists to
-simulate true multiple return values. For compatibility, (values A B C) is
-a synonym for (list A B C)." nil 'macro)
+(defcustom font-lock-maximum-decoration t "*If non-nil, the maximum decoration level for fontifying.\nIf nil, use the minimum decoration (equivalent to level 0).\nIf t, use the maximum decoration available.\nIf a number, use that level of decoration (or if not available the maximum).\nIf a list, each element should be a cons pair of the form (MAJOR-MODE . LEVEL),\nwhere MAJOR-MODE is a symbol or t (meaning the default). For example:\n ((c++-mode . 2) (c-mode . t) (t . 1))\nmeans use level 2 decoration for buffers in `c++-mode', the maximum decoration\navailable for buffers in `c-mode', and level 1 decoration otherwise." :type '(choice (const :tag "default" nil) (const :tag "maximum" t) (integer :tag "level" 1) (repeat :menu-tag "mode specific" :tag "mode specific" :value ((t . t)) (cons :tag "Instance" (radio :tag "Mode" (const :tag "all" t) (symbol :tag "name")) (radio :tag "Decoration" (const :tag "default" nil) (const :tag "maximum" t) (integer :tag "level" 1))))) :group 'font-lock)
-(autoload 'multiple-value-setq "cl-macs" "\
-(multiple-value-setq (SYM SYM...) FORM): collect multiple return values.
-FORM must return a list; the first N elements of this list are stored in
-each of the symbols SYM in turn. This is analogous to the Common Lisp
-`multiple-value-setq' macro, using lists to simulate true multiple return
-values. For compatibility, (values A B C) is a synonym for (list A B C)." nil 'macro)
+(define-obsolete-variable-alias 'font-lock-use-maximal-decoration 'font-lock-maximum-decoration)
-(autoload 'locally "cl-macs" nil nil 'macro)
+(defcustom font-lock-maximum-size (* 250 1024) "*If non-nil, the maximum size for buffers for fontifying.\nOnly buffers less than this can be fontified when Font Lock mode is turned on.\nIf nil, means size is irrelevant.\nIf a list, each element should be a cons pair of the form (MAJOR-MODE . SIZE),\nwhere MAJOR-MODE is a symbol or t (meaning the default). For example:\n ((c++-mode . 256000) (c-mode . 256000) (rmail-mode . 1048576))\nmeans that the maximum size is 250K for buffers in `c++-mode' or `c-mode', one\nmegabyte for buffers in `rmail-mode', and size is irrelevant otherwise." :type '(choice (const :tag "none" nil) (integer :tag "size") (repeat :menu-tag "mode specific" :tag "mode specific" :value ((t)) (cons :tag "Instance" (radio :tag "Mode" (const :tag "all" t) (symbol :tag "name")) (radio :tag "Size" (const :tag "none" nil) (integer :tag "size"))))) :group 'font-lock)
-(autoload 'the "cl-macs" nil nil 'macro)
+(defvar font-lock-keywords nil "\
+A list of the keywords to highlight.
+Each element should be of the form:
-(autoload 'declare "cl-macs" nil nil 'macro)
+ MATCHER
+ (MATCHER . MATCH)
+ (MATCHER . FACENAME)
+ (MATCHER . HIGHLIGHT)
+ (MATCHER HIGHLIGHT ...)
+ (eval . FORM)
-(autoload 'define-setf-method "cl-macs" "\
-(define-setf-method NAME ARGLIST BODY...): define a `setf' method.
-This method shows how to handle `setf's to places of the form (NAME ARGS...).
-The argument forms ARGS are bound according to ARGLIST, as if NAME were
-going to be expanded as a macro, then the BODY forms are executed and must
-return a list of five elements: a temporary-variables list, a value-forms
-list, a store-variables list (of length one), a store-form, and an access-
-form. See `defsetf' for a simpler way to define most setf-methods." nil 'macro)
+where HIGHLIGHT should be either MATCH-HIGHLIGHT or MATCH-ANCHORED.
-(autoload 'defsetf "cl-macs" "\
-(defsetf NAME FUNC): define a `setf' method.
-This macro is an easy-to-use substitute for `define-setf-method' that works
-well for simple place forms. In the simple `defsetf' form, `setf's of
-the form (setf (NAME ARGS...) VAL) are transformed to function or macro
-calls of the form (FUNC ARGS... VAL). Example: (defsetf aref aset).
-Alternate form: (defsetf NAME ARGLIST (STORE) BODY...).
-Here, the above `setf' call is expanded by binding the argument forms ARGS
-according to ARGLIST, binding the value form VAL to STORE, then executing
-BODY, which must return a Lisp form that does the necessary `setf' operation.
-Actually, ARGLIST and STORE may be bound to temporary variables which are
-introduced automatically to preserve proper execution order of the arguments.
-Example: (defsetf nth (n x) (v) (list 'setcar (list 'nthcdr n x) v))." nil 'macro)
+FORM is an expression, whose value should be a keyword element,
+evaluated when the keyword is (first) used in a buffer. This feature
+can be used to provide a keyword that can only be generated when Font
+Lock mode is actually turned on.
-(autoload 'get-setf-method "cl-macs" "\
-Return a list of five values describing the setf-method for PLACE.
-PLACE may be any Lisp form which can appear as the PLACE argument to
-a macro like `setf' or `incf'." nil nil)
+For highlighting single items, typically only MATCH-HIGHLIGHT is required.
+However, if an item or (typically) items is to be highlighted following the
+instance of another item (the anchor) then MATCH-ANCHORED may be required.
-(autoload 'setf "cl-macs" "\
-(setf PLACE VAL PLACE VAL ...): set each PLACE to the value of its VAL.
-This is a generalized version of `setq'; the PLACEs may be symbolic
-references such as (car x) or (aref x i), as well as plain symbols.
-For example, (setf (cadar x) y) is equivalent to (setcar (cdar x) y).
-The return value is the last VAL in the list." nil 'macro)
+MATCH-HIGHLIGHT should be of the form:
-(autoload 'psetf "cl-macs" "\
-(psetf PLACE VAL PLACE VAL ...): set PLACEs to the values VALs in parallel.
-This is like `setf', except that all VAL forms are evaluated (in order)
-before assigning any PLACEs to the corresponding values." nil 'macro)
+ (MATCH FACENAME OVERRIDE LAXMATCH)
-(autoload 'cl-do-pop "cl-macs" nil nil nil)
+Where MATCHER can be either the regexp to search for, a variable
+containing the regexp to search for, or the function to call to make
+the search (called with one argument, the limit of the search). MATCH
+is the subexpression of MATCHER to be highlighted. FACENAME is either
+a symbol naming a face, or an expression whose value is the face name
+to use. If you want FACENAME to be a symbol that evaluates to a face,
+use a form like \"(progn sym)\".
-(autoload 'remf "cl-macs" "\
-(remf PLACE TAG): remove TAG from property list PLACE.
-PLACE may be a symbol, or any generalized variable allowed by `setf'.
-The form returns true if TAG was found and removed, nil otherwise." nil 'macro)
+OVERRIDE and LAXMATCH are flags. If OVERRIDE is t, existing fontification may
+be overwritten. If `keep', only parts not already fontified are highlighted.
+If `prepend' or `append', existing fontification is merged with the new, in
+which the new or existing fontification, respectively, takes precedence.
+If LAXMATCH is non-nil, no error is signalled if there is no MATCH in MATCHER.
-(autoload 'shiftf "cl-macs" "\
-(shiftf PLACE PLACE... VAL): shift left among PLACEs.
-Example: (shiftf A B C) sets A to B, B to C, and returns the old A.
-Each PLACE may be a symbol, or any generalized variable allowed by `setf'." nil 'macro)
+For example, an element of the form highlights (if not already highlighted):
-(autoload 'rotatef "cl-macs" "\
-(rotatef PLACE...): rotate left among PLACEs.
-Example: (rotatef A B C) sets A to B, B to C, and C to A. It returns nil.
-Each PLACE may be a symbol, or any generalized variable allowed by `setf'." nil 'macro)
+ \"\\\\\\=<foo\\\\\\=>\" Discrete occurrences of \"foo\" in the value of the
+ variable `font-lock-keyword-face'.
+ (\"fu\\\\(bar\\\\)\" . 1) Substring \"bar\" within all occurrences of \"fubar\" in
+ the value of `font-lock-keyword-face'.
+ (\"fubar\" . fubar-face) Occurrences of \"fubar\" in the value of `fubar-face'.
+ (\"foo\\\\|bar\" 0 foo-bar-face t)
+ Occurrences of either \"foo\" or \"bar\" in the value
+ of `foo-bar-face', even if already highlighted.
-(autoload 'letf "cl-macs" "\
-(letf ((PLACE VALUE) ...) BODY...): temporarily bind to PLACEs.
-This is the analogue of `let', but with generalized variables (in the
-sense of `setf') for the PLACEs. Each PLACE is set to the corresponding
-VALUE, then the BODY forms are executed. On exit, either normally or
-because of a `throw' or error, the PLACEs are set back to their original
-values. Note that this macro is *not* available in Common Lisp.
-As a special case, if `(PLACE)' is used instead of `(PLACE VALUE)',
-the PLACE is not modified before executing BODY." nil 'macro)
+MATCH-ANCHORED should be of the form:
-(autoload 'letf* "cl-macs" "\
-(letf* ((PLACE VALUE) ...) BODY...): temporarily bind to PLACEs.
-This is the analogue of `let*', but with generalized variables (in the
-sense of `setf') for the PLACEs. Each PLACE is set to the corresponding
-VALUE, then the BODY forms are executed. On exit, either normally or
-because of a `throw' or error, the PLACEs are set back to their original
-values. Note that this macro is *not* available in Common Lisp.
-As a special case, if `(PLACE)' is used instead of `(PLACE VALUE)',
-the PLACE is not modified before executing BODY." nil 'macro)
+ (MATCHER PRE-MATCH-FORM POST-MATCH-FORM MATCH-HIGHLIGHT ...)
-(autoload 'callf "cl-macs" "\
-(callf FUNC PLACE ARGS...): set PLACE to (FUNC PLACE ARGS...).
-FUNC should be an unquoted function name. PLACE may be a symbol,
-or any generalized variable allowed by `setf'." nil 'macro)
+Where MATCHER is as for MATCH-HIGHLIGHT with one exception; see below.
+PRE-MATCH-FORM and POST-MATCH-FORM are evaluated before the first, and after
+the last, instance MATCH-ANCHORED's MATCHER is used. Therefore they can be
+used to initialize before, and cleanup after, MATCHER is used. Typically,
+PRE-MATCH-FORM is used to move to some position relative to the original
+MATCHER, before starting with MATCH-ANCHORED's MATCHER. POST-MATCH-FORM might
+be used to move, before resuming with MATCH-ANCHORED's parent's MATCHER.
-(autoload 'callf2 "cl-macs" "\
-(callf2 FUNC ARG1 PLACE ARGS...): set PLACE to (FUNC ARG1 PLACE ARGS...).
-Like `callf', but PLACE is the second argument of FUNC, not the first." nil 'macro)
+For example, an element of the form highlights (if not already highlighted):
-(autoload 'define-modify-macro "cl-macs" "\
-(define-modify-macro NAME ARGLIST FUNC): define a `setf'-like modify macro.
-If NAME is called, it combines its PLACE argument with the other arguments
-from ARGLIST using FUNC: (define-modify-macro incf (&optional (n 1)) +)" nil 'macro)
+ (\"\\\\\\=<anchor\\\\\\=>\" (0 anchor-face) (\"\\\\\\=<item\\\\\\=>\" nil nil (0 item-face)))
-(autoload 'defstruct "cl-macs" "\
-(defstruct (NAME OPTIONS...) (SLOT SLOT-OPTS...)...): define a struct type.
-This macro defines a new Lisp data type called NAME, which contains data
-stored in SLOTs. This defines a `make-NAME' constructor, a `copy-NAME'
-copier, a `NAME-p' predicate, and setf-able `NAME-SLOT' accessors." nil 'macro)
+ Discrete occurrences of \"anchor\" in the value of `anchor-face', and subsequent
+ discrete occurrences of \"item\" (on the same line) in the value of `item-face'.
+ (Here PRE-MATCH-FORM and POST-MATCH-FORM are nil. Therefore \"item\" is
+ initially searched for starting from the end of the match of \"anchor\", and
+ searching for subsequent instance of \"anchor\" resumes from where searching
+ for \"item\" concluded.)
-(autoload 'cl-struct-setf-expander "cl-macs" nil nil nil)
+The above-mentioned exception is as follows. The limit of the MATCHER search
+defaults to the end of the line after PRE-MATCH-FORM is evaluated.
+However, if PRE-MATCH-FORM returns a position greater than the position after
+PRE-MATCH-FORM is evaluated, that position is used as the limit of the search.
+It is generally a bad idea to return a position greater than the end of the
+line, i.e., cause the MATCHER search to span lines.
-(autoload 'deftype "cl-macs" "\
-(deftype NAME ARGLIST BODY...): define NAME as a new data type.
-The type name can then be used in `typecase', `check-type', etc." nil 'macro)
+Note that the MATCH-ANCHORED feature is experimental; in the future, we may
+replace it with other ways of providing this functionality.
-(autoload 'typep "cl-macs" "\
-Check that OBJECT is of type TYPE.
-TYPE is a Common Lisp-style type specifier." nil nil)
+These regular expressions should not match text which spans lines. While
+\\[font-lock-fontify-buffer] handles multi-line patterns correctly, updating
+when you edit the buffer does not, since it considers text one line at a time.
-(autoload 'check-type "cl-macs" "\
-Verify that FORM is of type TYPE; signal an error if not.
-STRING is an optional description of the desired type." nil 'macro)
+Be very careful composing regexps for this list;
+the wrong pattern can dramatically slow things down!")
-(autoload 'assert "cl-macs" "\
-Verify that FORM returns non-nil; signal an error if not.
-Second arg SHOW-ARGS means to include arguments of FORM in message.
-Other args STRING and ARGS... are arguments to be passed to `error'.
-They are not evaluated unless the assertion fails. If STRING is
-omitted, a default message listing FORM itself is used." nil 'macro)
+(make-variable-buffer-local 'font-lock-keywords)
-(autoload 'ignore-errors "cl-macs" "\
-Execute FORMS; if an error occurs, return nil.
-Otherwise, return result of last FORM." nil 'macro)
+(defcustom font-lock-mode nil "Non nil means `font-lock-mode' is on" :group 'font-lock :type 'boolean :initialize 'custom-initialize-default :require 'font-lock :set (function (lambda (var val) (font-lock-mode (or val 0)))))
-(autoload 'ignore-file-errors "cl-macs" "\
-Execute FORMS; if an error of type `file-error' occurs, return nil.
-Otherwise, return result of last FORM." nil 'macro)
+(defvar font-lock-mode-hook nil "\
+Function or functions to run on entry to font-lock-mode.")
-(autoload 'define-compiler-macro "cl-macs" "\
-(define-compiler-macro FUNC ARGLIST BODY...): Define a compiler-only macro.
-This is like `defmacro', but macro expansion occurs only if the call to
-FUNC is compiled (i.e., not interpreted). Compiler macros should be used
-for optimizing the way calls to FUNC are compiled; the form returned by
-BODY should do the same thing as a call to the normal function called
-FUNC, though possibly more efficiently. Note that, like regular macros,
-compiler macros are expanded repeatedly until no further expansions are
-possible. Unlike regular macros, BODY can decide to \"punt\" and leave the
-original function call alone by declaring an initial `&whole foo' parameter
-and then returning foo." nil 'macro)
+(autoload 'font-lock-mode "font-lock" "\
+Toggle Font Lock Mode.
+With arg, turn font-lock mode on if and only if arg is positive.
-(autoload 'compiler-macroexpand "cl-macs" nil nil nil)
+When Font Lock mode is enabled, text is fontified as you type it:
-;;;***
-\f
-;;;### (autoloads (batch-remove-old-elc) "cleantree" "lisp/cleantree.el")
+ - Comments are displayed in `font-lock-comment-face';
+ - Strings are displayed in `font-lock-string-face';
+ - Documentation strings (in Lisp-like languages) are displayed in
+ `font-lock-doc-string-face';
+ - Language keywords (\"reserved words\") are displayed in
+ `font-lock-keyword-face';
+ - Function names in their defining form are displayed in
+ `font-lock-function-name-face';
+ - Variable names in their defining form are displayed in
+ `font-lock-variable-name-face';
+ - Type names are displayed in `font-lock-type-face';
+ - References appearing in help files and the like are displayed
+ in `font-lock-reference-face';
+ - Preprocessor declarations are displayed in
+ `font-lock-preprocessor-face';
-(autoload 'batch-remove-old-elc "cleantree" nil nil nil)
+ and
-;;;***
-\f
-;;;### (autoloads (config-value config-value-hash-table) "config" "lisp/config.el")
+ - Certain other expressions are displayed in other faces according
+ to the value of the variable `font-lock-keywords'.
-(autoload 'config-value-hash-table "config" "\
-Return hash table of configuration parameters and their values." nil nil)
+Where modes support different levels of fontification, you can use the variable
+`font-lock-maximum-decoration' to specify which level you generally prefer.
+When you turn Font Lock mode on/off the buffer is fontified/defontified, though
+fontification occurs only if the buffer is less than `font-lock-maximum-size'.
+To fontify a buffer without turning on Font Lock mode, and regardless of buffer
+size, you can use \\[font-lock-fontify-buffer].
-(autoload 'config-value "config" "\
-Return the value of the configuration parameter CONFIG_SYMBOL." nil nil)
+See the variable `font-lock-keywords' for customization." t nil)
-;;;***
-\f
-;;;### (autoloads (Custom-make-dependencies) "cus-dep" "lisp/cus-dep.el")
+(autoload 'turn-on-font-lock "font-lock" "\
+Unconditionally turn on Font Lock mode." nil nil)
-(autoload 'Custom-make-dependencies "cus-dep" "\
-Extract custom dependencies from .el files in SUBDIRS.
-SUBDIRS is a list of directories. If it is nil, the command-line
-arguments are used. If it is a string, only that directory is
-processed. This function is especially useful in batch mode.
+(autoload 'turn-off-font-lock "font-lock" "\
+Unconditionally turn off Font Lock mode." nil nil)
-Batch usage: xemacs -batch -l cus-dep.el -f Custom-make-dependencies DIRS" t nil)
+(autoload 'font-lock-fontify-buffer "font-lock" "\
+Fontify the current buffer the way `font-lock-mode' would.
+See `font-lock-mode' for details.
+
+This can take a while for large buffers." t nil)
+
+(autoload 'font-lock-set-defaults-1 "font-lock" nil nil nil)
+
+(add-minor-mode 'font-lock-mode " Font")
;;;***
\f
-;;;### (autoloads (customize-menu-create custom-menu-create custom-save-all customize-save-customized customize-browse custom-buffer-create-other-window custom-buffer-create customize-apropos-groups customize-apropos-faces customize-apropos-options customize-apropos customize-saved customize-customized customize-face-other-window customize-face customize-option-other-window customize-changed-options customize-variable customize-other-window customize customize-save-variable customize-set-variable customize-set-value) "cus-edit" "lisp/cus-edit.el")
+;;;### (autoloads (gnuserv-start gnuserv-running-p) "gnuserv" "lisp/gnuserv.el")
-(autoload 'customize-set-value "cus-edit" "\
-Set VARIABLE to VALUE. VALUE is a Lisp object.
+(defcustom gnuserv-frame nil "*The frame to be used to display all edited files.\nIf nil, then a new frame is created for each file edited.\nIf t, then the currently selected frame will be used.\nIf a function, then this will be called with a symbol `x' or `tty' as the\nonly argument, and its return value will be interpreted as above." :tag "Gnuserv Frame" :type '(radio (const :tag "Create new frame each time" nil) (const :tag "Use selected frame" t) (function-item :tag "Use main Emacs frame" gnuserv-main-frame-function) (function-item :tag "Use visible frame, otherwise create new" gnuserv-visible-frame-function) (function-item :tag "Create special Gnuserv frame and use it" gnuserv-special-frame-function) (function :tag "Other")) :group 'gnuserv :group 'frames)
-If VARIABLE has a `variable-interactive' property, that is used as if
-it were the arg to `interactive' (which see) to interactively read the value.
+(autoload 'gnuserv-running-p "gnuserv" "\
+Return non-nil if a gnuserv process is running from this XEmacs session." nil nil)
-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.
+(autoload 'gnuserv-start "gnuserv" "\
+Allow this Emacs process to be a server for client processes.
+This starts a gnuserv communications subprocess through which
+client \"editors\" (gnuclient and gnudoit) can send editing commands to
+this Emacs job. See the gnuserv(1) manual page for more details.
-If given a prefix (or a COMMENT argument), also prompt for a comment." t nil)
+Prefix arg means just kill any existing server communications subprocess." t nil)
-(autoload 'customize-set-variable "cus-edit" "\
-Set the default for VARIABLE to VALUE. VALUE is a Lisp object.
+;;;***
+\f
+;;;### (autoloads nil "help-macro" "lisp/help-macro.el")
-If VARIABLE has a `custom-set' property, that is used for setting
-VARIABLE, otherwise `set-default' is used.
+(defcustom three-step-help t "*Non-nil means give more info about Help command in three steps.\nThe three steps are simple prompt, prompt with all options,\nand window listing and describing the options.\nA value of nil means skip the middle step, so that\n\\[help-command] \\[help-command] gives the window that lists the options." :type 'boolean :group 'help-appearance)
-The `customized-value' property of the VARIABLE will be set to a list
-with a quoted VALUE as its sole list member.
+;;;***
+\f
+;;;### (autoloads (hyper-apropos-popup-menu hyper-apropos-set-variable hyper-set-variable hyper-apropos-read-variable-symbol hyper-describe-function hyper-where-is hyper-describe-variable hyper-describe-face hyper-describe-key-briefly hyper-describe-key hyper-apropos) "hyper-apropos" "lisp/hyper-apropos.el")
-If VARIABLE has a `variable-interactive' property, that is used as if
-it were the arg to `interactive' (which see) to interactively read the value.
+(autoload 'hyper-apropos "hyper-apropos" "\
+Display lists of functions and variables matching REGEXP
+in buffer \"*Hyper Apropos*\". If optional prefix arg is given, then the
+value of `hyper-apropos-programming-apropos' is toggled for this search.
+See also `hyper-apropos-mode'." t nil)
-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.
+(autoload 'hyper-describe-key "hyper-apropos" nil t nil)
-If given a prefix (or a COMMENT argument), also prompt for a comment." t nil)
+(autoload 'hyper-describe-key-briefly "hyper-apropos" nil t nil)
-(autoload 'customize-save-variable "cus-edit" "\
-Set the default for VARIABLE to VALUE, and save it for future sessions.
-If VARIABLE has a `custom-set' property, that is used for setting
-VARIABLE, otherwise `set-default' is used.
+(autoload 'hyper-describe-face "hyper-apropos" "\
+Describe face..
+See also `hyper-apropos' and `hyper-describe-function'." t nil)
-The `customized-value' property of the VARIABLE will be set to a list
-with a quoted VALUE as its sole list member.
+(autoload 'hyper-describe-variable "hyper-apropos" "\
+Hypertext drop-in replacement for `describe-variable'.
+See also `hyper-apropos' and `hyper-describe-function'." t nil)
-If VARIABLE has a `variable-interactive' property, that is used as if
-it were the arg to `interactive' (which see) to interactively read the value.
+(autoload 'hyper-where-is "hyper-apropos" "\
+Print message listing key sequences that invoke specified command." t nil)
-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.
+(autoload 'hyper-describe-function "hyper-apropos" "\
+Hypertext replacement for `describe-function'. Unlike `describe-function'
+in that the symbol under the cursor is the default if it is a function.
+See also `hyper-apropos' and `hyper-describe-variable'." t nil)
-If given a prefix (or a COMMENT argument), also prompt for a comment." t nil)
+(autoload 'hyper-apropos-read-variable-symbol "hyper-apropos" "\
+Hypertext drop-in replacement for `describe-variable'.
+See also `hyper-apropos' and `hyper-describe-function'." nil nil)
-(autoload 'customize "cus-edit" "\
-Select a customization buffer which you can use to set user options.
-User options are structured into \"groups\".
-The default group is `Emacs'." t nil)
+(define-obsolete-function-alias 'hypropos-read-variable-symbol 'hyper-apropos-read-variable-symbol)
-(defalias 'customize-group 'customize)
+(define-obsolete-function-alias 'hypropos-get-doc 'hyper-apropos-get-doc)
-(autoload 'customize-other-window "cus-edit" "\
-Customize SYMBOL, which must be a customization group." t nil)
+(autoload 'hyper-set-variable "hyper-apropos" nil t nil)
-(defalias 'customize-group-other-window 'customize-other-window)
+(autoload 'hyper-apropos-set-variable "hyper-apropos" "\
+Interactively set the variable on the current line." t nil)
-(defalias 'customize-option 'customize-variable)
+(define-obsolete-function-alias 'hypropos-set-variable 'hyper-apropos-set-variable)
-(autoload 'customize-variable "cus-edit" "\
-Customize SYMBOL, which must be a user option variable." t nil)
+(autoload 'hyper-apropos-popup-menu "hyper-apropos" nil t nil)
-(autoload 'customize-changed-options "cus-edit" "\
-Customize all user option variables whose default values changed recently.
-This means, in other words, variables defined with a `:version' keyword." t nil)
+(define-obsolete-function-alias 'hypropos-popup-menu 'hyper-apropos-popup-menu)
-(defalias 'customize-variable-other-window 'customize-option-other-window)
+;;;***
+\f
+;;;### (autoloads (Info-elisp-ref Info-emacs-key Info-goto-emacs-key-command-node Info-goto-emacs-command-node Info-emacs-command Info-search Info-visit-file Info-goto-node Info-batch-rebuild-dir Info-query info) "info" "lisp/info.el")
-(autoload 'customize-option-other-window "cus-edit" "\
-Customize SYMBOL, which must be a user option variable.
-Show the buffer in another window, but don't select it." t nil)
+(defvar Info-directory-list nil "\
+List of directories to search for Info documentation files.
-(autoload 'customize-face "cus-edit" "\
-Customize SYMBOL, which should be a face name or nil.
-If SYMBOL is nil, customize all faces." t nil)
+The first directory in this list, the \"dir\" file there will become
+the (dir)Top node of the Info documentation tree.
-(autoload 'customize-face-other-window "cus-edit" "\
-Show customization buffer for FACE in other window." t nil)
+Note: DO NOT use the `customize' interface to change the value of this
+variable. Its value is created dynamically on each startup, depending
+on XEmacs packages installed on the system. If you want to change the
+search path, make the needed modifications on the variable's value
+from .emacs. For instance:
-(autoload 'customize-customized "cus-edit" "\
-Customize all user options set since the last save in this session." t nil)
+ (setq Info-directory-list (cons \"~/info\" Info-directory-list))")
-(autoload 'customize-saved "cus-edit" "\
-Customize all already saved user options." t nil)
+(autoload 'info "info" "\
+Enter Info, the documentation browser.
+Optional argument FILE specifies the file to examine;
+the default is the top-level directory of Info.
-(autoload 'customize-apropos "cus-edit" "\
-Customize all user options matching REGEXP.
-If ALL is `options', include only options.
-If ALL is `faces', include only faces.
-If ALL is `groups', include only groups.
-If ALL is t (interactively, with prefix arg), include options which are not
-user-settable, as well as faces and groups." t nil)
+In interactive use, a prefix argument directs this command
+to read a file name from the minibuffer." t nil)
-(autoload 'customize-apropos-options "cus-edit" "\
-Customize all user options matching REGEXP.
-With prefix arg, include options which are not user-settable." t nil)
+(autoload 'Info-query "info" "\
+Enter Info, the documentation browser. Prompt for name of Info file." t nil)
-(autoload 'customize-apropos-faces "cus-edit" "\
-Customize all user faces matching REGEXP." t nil)
+(autoload 'Info-batch-rebuild-dir "info" "\
+(Re)build info `dir' files in the directories remaining on the command line.
+Use this from the command line, with `-batch';
+it won't work in an interactive Emacs.
+Each file is processed even if an error occurred previously.
+For example, invoke \"xemacs -batch -f Info-batch-rebuild-dir /usr/local/info\"" nil nil)
-(autoload 'customize-apropos-groups "cus-edit" "\
-Customize all user groups matching REGEXP." t nil)
+(autoload 'Info-goto-node "info" "\
+Go to info node named NAME. Give just NODENAME or (FILENAME)NODENAME.
+Actually, the following interpretations of NAME are tried in order:
+ (FILENAME)NODENAME
+ (FILENAME) (using Top node)
+ NODENAME (in current file)
+ TAGNAME (see below)
+ FILENAME (using Top node)
+where TAGNAME is a string that appears in quotes: \"TAGNAME\", in an
+annotation for any node of any file. (See `a' and `x' commands.)" t nil)
-(autoload 'custom-buffer-create "cus-edit" "\
-Create a buffer containing OPTIONS.
-Optional NAME is the name of the buffer.
-OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where
-SYMBOL is a customization option, and WIDGET is a widget for editing
-that option." nil nil)
+(autoload 'Info-visit-file "info" "\
+Directly visit an info file." t nil)
-(autoload 'custom-buffer-create-other-window "cus-edit" "\
-Create a buffer containing OPTIONS.
-Optional NAME is the name of the buffer.
-OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where
-SYMBOL is a customization option, and WIDGET is a widget for editing
-that option." nil nil)
+(autoload 'Info-search "info" "\
+Search for REGEXP, starting from point, and select node it's found in." t nil)
-(autoload 'customize-browse "cus-edit" "\
-Create a tree browser for the customize hierarchy." t nil)
+(autoload 'Info-emacs-command "info" "\
+Look up an Emacs command in the Emacs manual in the Info system.
+This command is designed to be used whether you are already in Info or not." t nil)
-(defcustom custom-file "~/.emacs" "File used for storing customization information.\nIf you change this from the default \"~/.emacs\" you need to\nexplicitly load that file for the settings to take effect." :type 'file :group 'customize)
+(autoload 'Info-goto-emacs-command-node "info" "\
+Look up an Emacs command in the Emacs manual in the Info system.
+This command is designed to be used whether you are already in Info or not." t nil)
-(autoload 'customize-save-customized "cus-edit" "\
-Save all user options which have been set in this session." t nil)
+(autoload 'Info-goto-emacs-key-command-node "info" "\
+Look up an Emacs key sequence in the Emacs manual in the Info system.
+This command is designed to be used whether you are already in Info or not." t nil)
-(autoload 'custom-save-all "cus-edit" "\
-Save all customizations in `custom-file'." nil nil)
+(autoload 'Info-emacs-key "info" "\
+Look up an Emacs key sequence in the Emacs manual in the Info system.
+This command is designed to be used whether you are already in Info or not." t nil)
-(autoload 'custom-menu-create "cus-edit" "\
-Create menu for customization group SYMBOL.
-The menu is in a format applicable to `easy-menu-define'." nil nil)
+(autoload 'Info-elisp-ref "info" "\
+Look up an Emacs Lisp function in the Elisp manual in the Info system.
+This command is designed to be used whether you are already in Info or not." t nil)
-(autoload 'customize-menu-create "cus-edit" "\
-Return a customize 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 format is suitable for use with `easy-menu-define'." nil nil)
+;;;***
+\f
+;;;### (autoloads nil "itimer-autosave" "lisp/itimer-autosave.el")
;;;***
\f
-;;;### (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")
+;;;### (autoloads nil "loaddefs" "lisp/loaddefs.el")
-(autoload 'custom-declare-face "cus-face" "\
-Like `defface', but FACE is evaluated as a normal argument." nil nil)
+;;;***
+\f
+;;;### (autoloads nil "loadhist" "lisp/loadhist.el")
-(autoload 'custom-set-face-update-spec "cus-face" "\
-Customize the FACE for display types matching DISPLAY, merging
- in the new items from PLIST" 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 [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.
+;;;***
+\f
+;;;### (autoloads (mswindows-reset-device-font-menus) "msw-font-menu" "lisp/msw-font-menu.el")
-See `defface' for the format of SPEC." nil nil)
+(autoload 'mswindows-reset-device-font-menus "msw-font-menu" "\
+Generates the `Font', `Size', and `Weight' submenus for the Options menu.
+This is run the first time that a font-menu is needed for each device.
+If you don't like the lazy invocation of this function, you can add it to
+`create-device-hook' and that will make the font menus respond more quickly
+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)
-(autoload 'custom-theme-set-faces "cus-face" "\
-Initialize faces according to settings specified by args.
-Records the settings as belonging to THEME.
+(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)))
-See `custom-set-faces' for a description of the arguments ARGS." nil nil)
+;;;***
+\f
+;;;### (autoloads (mwheel-install) "mwheel" "lisp/mwheel.el")
-(autoload 'custom-theme-face-value "cus-face" "\
-Return spec of FACE in THEME if the THEME modifies the
-FACE. Nil otherwise." nil nil)
+(autoload 'mwheel-install "mwheel" "\
+Enable mouse wheel support." nil nil)
-(autoload 'custom-theme-reset-faces "cus-face" nil nil nil)
+;;;***
+\f
+;;;### (autoloads (package-admin-add-binary-package package-admin-add-single-file-package) "package-admin" "lisp/package-admin.el")
-(autoload 'custom-reset-faces "cus-face" "\
-Reset the value of the face to values previously defined.
-Assosiate this setting with the 'user' theme.
+(autoload 'package-admin-add-single-file-package "package-admin" "\
+Install a single file Lisp package into XEmacs package hierarchy.
+`file' should be the full path to the lisp file to install.
+`destdir' should be a simple directory name.
+The optional `pkg-dir' can be used to override the default package hierarchy
+\(car (last late-packages))." t nil)
-ARGS is defined as for `custom-theme-reset-faces'" nil nil)
+(autoload 'package-admin-add-binary-package "package-admin" "\
+Install a pre-bytecompiled XEmacs package into package hierarchy." t nil)
;;;***
\f
-;;;### (autoloads (disassemble) "disass" "lisp/disass.el")
+;;;### (autoloads (package-get-custom package-get-package-provider package-get package-get-dependencies package-get-all package-get-update-all package-get-delete-package package-get-save-base package-get-update-base-from-buffer package-get-update-base package-get-update-base-entry package-get-require-base package-get-download-menu) "package-get" "lisp/package-get.el")
-(autoload 'disassemble "disass" "\
-Print disassembled code for OBJECT in (optional) BUFFER.
-OBJECT can be a symbol defined as a function, or a function itself
-\(a lambda expression or a compiled-function object).
-If OBJECT is not already compiled, we compile it, but do not
-redefine OBJECT if it is a symbol." t nil)
+(defvar package-get-base nil "\
+List of packages that are installed at this site.
+For each element in the alist, car is the package name and the cdr is
+a plist containing information about the package. Typical fields
+kept in the plist are:
-;;;***
-\f
-;;;### (autoloads (standard-display-european standard-display-underline standard-display-graphic standard-display-g1 standard-display-ascii standard-display-default standard-display-8bit make-display-table describe-current-display-table) "disp-table" "lisp/disp-table.el")
+version - version of this package
+provides - list of symbols provided
+requires - list of symbols that are required.
+ These in turn are provided by other packages.
+filename - name of the file.
+size - size of the file (aka the bundled package)
+md5sum - computed md5 checksum
+description - What this package is for.
+type - Whether this is a 'binary (default) or 'single file package
-(autoload 'describe-current-display-table "disp-table" "\
-Describe the display table in use in the selected window and buffer." t nil)
+More fields may be added as needed. An example:
-(autoload 'make-display-table "disp-table" "\
-Return a new, empty display table." nil nil)
+'(
+ (name
+ (version \"<version 2>\"
+ file \"filename\"
+ description \"what this package is about.\"
+ provides (<list>)
+ requires (<list>)
+ size <integer-bytes>
+ md5sum \"<checksum\"
+ type single
+ )
+ (version \"<version 1>\"
+ file \"filename\"
+ description \"what this package is about.\"
+ provides (<list>)
+ requires (<list>)
+ size <integer-bytes>
+ md5sum \"<checksum\"
+ type single
+ )
+ ...
+ ))
-(autoload 'standard-display-8bit "disp-table" "\
-Display characters in the range L to H literally." nil nil)
+For version information, it is assumed things are listed in most
+recent to least recent -- in other words, the version names don't have to
+be lexically ordered. It is debatable if it makes sense to have more than
+one version of a package available.")
-(autoload 'standard-display-default "disp-table" "\
-Display characters in the range L to H using the default notation." nil nil)
+(defcustom package-get-download-sites '(("xemacs.org" "ftp.xemacs.org" "pub/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") ("unicamp.br (Brazil)" "ftp.unicamp.br" "pub/xemacs/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") ("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") ("sun.ac.za (South Africa)" "ftp.sun.ac.za" "xemacs/packages") ("isu.net.sa (Saudi Arabia)" "ftp.isu.net.sa" "pub/mirrors/ftp.xemacs.org/packages") ("aarnet.edu.au (Australia)" "mirror.aarnet.edu.au" "pub/xemacs/packages")) "*List of remote sites available for downloading packages.\nList format is '(site-description site-name directory-on-site).\nSITE-DESCRIPTION is a textual description of the site. SITE-NAME\nis the internet address of the download site. DIRECTORY-ON-SITE\nis the directory on the site in which packages may be found.\nThis variable is used to initialize `package-get-remote', the\nvariable actually used to specify package download sites." :tag "Package download sites" :type '(repeat (list (string :tag "Name") host-name directory)) :group 'package-get)
-(autoload 'standard-display-ascii "disp-table" "\
-Display character C using printable string S." nil nil)
+(autoload 'package-get-download-menu "package-get" "\
+Build the `Add Download Site' menu." nil nil)
-(autoload 'standard-display-g1 "disp-table" "\
-Display character C as character SC in the g1 character set.
-This function assumes that your terminal uses the SO/SI characters;
-it is meaningless for an X frame." nil nil)
+(autoload 'package-get-require-base "package-get" "\
+Require that a package-get database has been loaded.
+If the optional FORCE-CURRENT argument or the value of
+`package-get-always-update' is Non-nil, try to update the database
+from a location in `package-get-remote'. Otherwise a local copy is used
+if available and remote access is never done.
-(autoload 'standard-display-graphic "disp-table" "\
-Display character C as character GC in graphics character set.
-This function assumes VT100-compatible escapes; it is meaningless for an
-X frame." nil nil)
+Please use FORCE-CURRENT only when the user is explictly dealing with packages
+and remote access is likely in the near future." nil nil)
-(autoload 'standard-display-underline "disp-table" "\
-Display character C as character UC plus underlining." nil nil)
+(autoload 'package-get-update-base-entry "package-get" "\
+Update an entry in `package-get-base'." nil nil)
-(autoload 'standard-display-european "disp-table" "\
-Toggle display of European characters encoded with ISO 8859.
-When enabled, characters in the range of 160 to 255 display not
-as octal escapes, but as accented characters.
-With prefix argument, enable European character display iff arg is positive." t nil)
+(autoload 'package-get-update-base "package-get" "\
+Update the package-get database file with entries from DB-FILE.
+Unless FORCE-CURRENT is non-nil never try to update the database." t nil)
-;;;***
-\f
-;;;### (autoloads nil "easymenu" "lisp/easymenu.el")
+(autoload 'package-get-update-base-from-buffer "package-get" "\
+Update the package-get database with entries from BUFFER.
+BUFFER defaults to the current buffer. This command can be
+used interactively, for example from a mail or news buffer." t nil)
-;;;***
-\f
-;;;### (autoloads (pop-tag-mark tags-apropos list-tags tags-query-replace tags-search tags-loop-continue next-file tag-complete-symbol find-tag-other-window find-tag visit-tags-table) "etags" "lisp/etags.el")
+(autoload 'package-get-save-base "package-get" "\
+Write the package-get database to FILE.
-(autoload 'visit-tags-table "etags" "\
-Tell tags commands to use tags table file FILE when all else fails.
-FILE should be the name of a file created with the `etags' program.
-A directory name is ok too; it means file TAGS in that directory." t nil)
+Note: This database will be unsigned of course." t nil)
-(autoload 'find-tag "etags" "\
-*Find tag whose name contains TAGNAME.
- Selects the buffer that the tag is contained in
-and puts point at its definition.
- If TAGNAME is a null string, the expression in the buffer
-around or before point is used as the tag name.
- If called interactively with a numeric argument, searches for the next tag
-in the tag table that matches the tagname used in the previous find-tag.
- If second arg OTHER-WINDOW is non-nil, uses another window to display
-the tag.
+(autoload 'package-get-delete-package "package-get" "\
+Delete an installation of PACKAGE below directory PKG-TOPDIR.
+PACKAGE is a symbol, not a string.
+This is just an interactive wrapper for `package-admin-delete-binary-package'." t nil)
-This version of this function supports multiple active tags tables,
-and completion.
+(autoload 'package-get-update-all "package-get" "\
+Fetch and install the latest versions of all currently installed packages." t nil)
-Variables of note:
+(autoload 'package-get-all "package-get" "\
+Fetch PACKAGE with VERSION and all other required packages.
+Uses `package-get-base' to determine just what is required and what
+package provides that functionality. If VERSION is nil, retrieves
+latest version. Optional argument FETCHED-PACKAGES is used to keep
+track of packages already fetched. Optional argument INSTALL-DIR,
+if non-nil, specifies the package directory where fetched packages
+should be installed.
- tag-table-alist controls which tables apply to which buffers
- tags-file-name a default tags table
- tags-build-completion-table controls completion behavior
- buffer-tag-table another way of specifying a buffer-local table
- make-tags-files-invisible whether tags tables should be very hidden
- tag-mark-stack-max how many tags-based hops to remember" t nil)
+Returns nil upon error." t nil)
-(autoload 'find-tag-other-window "etags" "\
-*Find tag whose name contains TAGNAME.
- Selects the buffer that the tag is contained in in another window
-and puts point at its definition.
- If TAGNAME is a null string, the expression in the buffer
-around or before point is used as the tag name.
- If second arg NEXT is non-nil (interactively, with prefix arg),
-searches for the next tag in the tag table
-that matches the tagname used in the previous find-tag.
+(autoload 'package-get-dependencies "package-get" "\
+Compute dependencies for PACKAGES.
+Uses `package-get-base' to determine just what is required and what
+package provides that functionality. Returns the list of packages
+required by PACKAGES." nil nil)
-This version of this function supports multiple active tags tables,
-and completion.
+(autoload 'package-get "package-get" "\
+Fetch PACKAGE from remote site.
+Optional arguments VERSION indicates which version to retrieve, nil
+means most recent version. CONFLICT indicates what happens if the
+package is already installed. Valid values for CONFLICT are:
+'always always retrieve the package even if it is already installed
+'never do not retrieve the package if it is installed.
+INSTALL-DIR, if non-nil, specifies the package directory where
+fetched packages should be installed.
-Variables of note:
+The value of `package-get-base' is used to determine what files should
+be retrieved. The value of `package-get-remote' is used to determine
+where a package should be retrieved from. The sites are tried in
+order so one is better off listing easily reached sites first.
- tag-table-alist controls which tables apply to which buffers
- tags-file-name a default tags table
- tags-build-completion-table controls completion behavior
- buffer-tag-table another way of specifying a buffer-local table
- make-tags-files-invisible whether tags tables should be very hidden
- tag-mark-stack-max how many tags-based hops to remember" t nil)
+Once the package is retrieved, its md5 checksum is computed. If that
+sum does not match that stored in `package-get-base' for this version
+of the package, an error is signalled.
-(autoload 'tag-complete-symbol "etags" "\
-The function used to do tags-completion (using 'tag-completion-predicate)." t nil)
+Returns `t' upon success, the symbol `error' if the package was
+successfully installed but errors occurred during initialization, or
+`nil' upon error." t nil)
-(autoload 'next-file "etags" "\
-Select next file among files in current tag table(s).
+(autoload 'package-get-package-provider "package-get" "\
+Search for a package that provides SYM and return the name and
+ version. Searches in `package-get-base' for SYM. If SYM is a
+ consp, then it must match a corresponding (provide (SYM VERSION)) from
+ the package.
-A first argument of t (prefix arg, if interactive) initializes to the
-beginning of the list of files in the (first) tags table. If the argument
-is neither nil nor t, it is evalled to initialize the list of files.
+If FORCE-CURRENT is non-nil make sure the database is up to date. This might
+lead to Emacs accessing remote sites." t nil)
-Non-nil second argument NOVISIT means use a temporary buffer
-to save time and avoid uninteresting warnings.
+(autoload 'package-get-custom "package-get" "\
+Fetch and install the latest versions of all customized packages." t nil)
-Value is nil if the file was already visited;
-if the file was newly read in, the value is the filename." t nil)
+;;;***
+\f
+;;;### (autoloads (pui-list-packages pui-add-install-directory package-ui-add-site) "package-ui" "lisp/package-ui.el")
-(autoload 'tags-loop-continue "etags" "\
-Continue last \\[tags-search] or \\[tags-query-replace] command.
-Used noninteractively with non-nil argument to begin such a command (the
-argument is passed to `next-file', which see).
-Two variables control the processing we do on each file:
-the value of `tags-loop-scan' is a form to be executed on each file
-to see if it is interesting (it returns non-nil if so)
-and `tags-loop-operate' is a form to execute to operate on an interesting file
-If the latter returns non-nil, we exit; otherwise we scan the next file." t nil)
-
-(autoload 'tags-search "etags" "\
-Search through all files listed in tags table for match for REGEXP.
-Stops when a match is found.
-To continue searching for next match, use command \\[tags-loop-continue].
+(autoload 'package-ui-add-site "package-ui" "\
+Add site to package-get-remote and possibly offer to update package list." nil nil)
-See documentation of variable `tag-table-alist'." t nil)
+(autoload 'pui-add-install-directory "package-ui" "\
+Add a new package binary directory to the head of `package-get-remote'.
+Note that no provision is made for saving any changes made by this function.
+It exists mainly as a convenience for one-time package installations from
+disk." t nil)
-(autoload 'tags-query-replace "etags" "\
-Query-replace-regexp FROM with TO through all files listed in tags table.
-Third arg DELIMITED (prefix arg) means replace only word-delimited matches.
-If you exit (\\[keyboard-quit] or ESC), you can resume the query-replace
-with the command \\[tags-loop-continue].
+(autoload 'pui-list-packages "package-ui" "\
+List all packages and package information.
+The package name, version, and description are displayed. From the displayed
+buffer, the user can see which packages are installed, which are not, and
+which are out-of-date (a newer version is available). The user can then
+select packages for installation via the keyboard or mouse." t nil)
-See documentation of variable `tag-table-alist'." t nil)
+(defalias 'list-packages 'pui-list-packages)
-(autoload 'list-tags "etags" "\
-Display list of tags in FILE." t nil)
+;;;***
+\f
+;;;### (autoloads (picture-mode) "picture" "lisp/picture.el")
-(autoload 'tags-apropos "etags" "\
-Display list of all tags in tag table REGEXP matches." t nil)
-(define-key esc-map "*" 'pop-tag-mark)
+(autoload 'picture-mode "picture" "\
+Switch to Picture mode, in which a quarter-plane screen model is used.
+Printing characters replace instead of inserting themselves with motion
+afterwards settable by these commands:
+ C-c < Move left after insertion.
+ C-c > Move right after insertion.
+ C-c ^ Move up after insertion.
+ C-c . Move down after insertion.
+ C-c ` Move northwest (nw) after insertion.
+ C-c ' Move northeast (ne) after insertion.
+ C-c / Move southwest (sw) after insertion.
+ C-c \\ Move southeast (se) after insertion.
+The current direction is displayed in the modeline. The initial
+direction is right. Whitespace is inserted and tabs are changed to
+spaces when required by movement. You can move around in the buffer
+with these commands:
+ \\[picture-move-down] Move vertically to SAME column in previous line.
+ \\[picture-move-up] Move vertically to SAME column in next line.
+ \\[picture-end-of-line] Move to column following last non-whitespace character.
+ \\[picture-forward-column] Move right inserting spaces if required.
+ \\[picture-backward-column] Move left changing tabs to spaces if required.
+ C-c C-f Move in direction of current picture motion.
+ C-c C-b Move in opposite direction of current picture motion.
+ Return Move to beginning of next line.
+You can edit tabular text with these commands:
+ M-Tab Move to column beneath (or at) next interesting character.
+ `Indents' relative to a previous line.
+ Tab Move to next stop in tab stop list.
+ C-c Tab Set tab stops according to context of this line.
+ With ARG resets tab stops to default (global) value.
+ See also documentation of variable picture-tab-chars
+ which defines \"interesting character\". You can manually
+ change the tab stop list with command \\[edit-tab-stops].
+You can manipulate text with these commands:
+ C-d Clear (replace) ARG columns after point without moving.
+ C-c C-d Delete char at point - the command normally assigned to C-d.
+ \\[picture-backward-clear-column] Clear (replace) ARG columns before point, moving back over them.
+ \\[picture-clear-line] Clear ARG lines, advancing over them. The cleared
+ text is saved in the kill ring.
+ \\[picture-open-line] Open blank line(s) beneath current line.
+You can manipulate rectangles with these commands:
+ C-c C-k Clear (or kill) a rectangle and save it.
+ C-c C-w Like C-c C-k except rectangle is saved in named register.
+ C-c C-y Overlay (or insert) currently saved rectangle at point.
+ C-c C-x Like C-c C-y except rectangle is taken from named register.
+ \\[copy-rectangle-to-register] Copies a rectangle to a register.
+ \\[advertised-undo] Can undo effects of rectangle overlay commands
+ commands if invoked soon enough.
+You can return to the previous mode with:
+ C-c C-c Which also strips trailing whitespace from every line.
+ Stripping is suppressed by supplying an argument.
-(autoload 'pop-tag-mark "etags" "\
-Go to last tag position.
-`find-tag' maintains a mark-stack seperate from the \\[set-mark-command] mark-stack.
-This function pops (and moves to) the tag at the top of this stack." t nil)
+Entry to this mode calls the value of picture-mode-hook if non-nil.
-;;;***
-\f
-;;;### (autoloads (finder-by-keyword) "finder" "lisp/finder.el")
+Note that Picture mode commands will work outside of Picture mode, but
+they are not defaultly assigned to keys." t nil)
-(autoload 'finder-by-keyword "finder" "\
-Find packages matching a given keyword." t nil)
+(defalias 'edit-picture 'picture-mode)
;;;***
\f
-;;;### (autoloads (font-lock-set-defaults-1 font-lock-fontify-buffer turn-off-font-lock turn-on-font-lock font-lock-mode) "font-lock" "lisp/font-lock.el")
+;;;### (autoloads (clear-rectangle string-rectangle open-rectangle insert-rectangle yank-rectangle kill-rectangle extract-rectangle delete-extract-rectangle delete-rectangle) "rect" "lisp/rect.el")
-(defcustom font-lock-auto-fontify t "*Whether font-lock should automatically fontify files as they're loaded.\nThis will only happen if font-lock has fontifying keywords for the major\nmode of the file. You can get finer-grained control over auto-fontification\nby using this variable in combination with `font-lock-mode-enable-list' or\n`font-lock-mode-disable-list'." :type 'boolean :group 'font-lock)
+(autoload 'delete-rectangle "rect" "\
+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.
-(defcustom font-lock-mode-enable-list nil "*List of modes to auto-fontify, if `font-lock-auto-fontify' is nil." :type '(repeat (symbol :tag "Mode")) :group 'font-lock)
+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)
-(defcustom font-lock-mode-disable-list nil "*List of modes not to auto-fontify, if `font-lock-auto-fontify' is t." :type '(repeat (symbol :tag "Mode")) :group 'font-lock)
+(autoload 'delete-extract-rectangle "rect" "\
+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.
-(defcustom font-lock-use-colors '(color) "*Specification for when Font Lock will set up color defaults.\nNormally this should be '(color), meaning that Font Lock will set up\ncolor defaults that are only used on color displays. Set this to nil\nif you don't want Font Lock to set up color defaults at all. This\nshould be one of\n\n-- a list of valid tags, meaning that the color defaults will be used\n when all of the tags apply. (e.g. '(color x))\n-- a list whose first element is 'or and whose remaining elements are\n lists of valid tags, meaning that the defaults will be used when\n any of the tag lists apply.\n-- nil, meaning that the defaults should not be set up at all.\n\n(If you specify face values in your init file, they will override any\nthat Font Lock specifies, regardless of whether you specify the face\nvalues before or after loading Font Lock.)\n\nSee also `font-lock-use-fonts'. If you want more control over the faces\nused for fontification, see the documentation of `font-lock-mode' for\nhow to do it." :type 'sexp :group 'font-lock)
+With an optional FILL argument, also fill lines where nothing has to be
+deleted." nil nil)
-(defcustom font-lock-use-fonts '(or (mono) (grayscale)) "*Specification for when Font Lock will set up non-color defaults.\n\nNormally this should be '(or (mono) (grayscale)), meaning that Font\nLock will set up non-color defaults that are only used on either mono\nor grayscale displays. Set this to nil if you don't want Font Lock to\nset up non-color defaults at all. This should be one of\n\n-- a list of valid tags, meaning that the non-color defaults will be used\n when all of the tags apply. (e.g. '(grayscale x))\n-- a list whose first element is 'or and whose remaining elements are\n lists of valid tags, meaning that the defaults will be used when\n any of the tag lists apply.\n-- nil, meaning that the defaults should not be set up at all.\n\n(If you specify face values in your init file, they will override any\nthat Font Lock specifies, regardless of whether you specify the face\nvalues before or after loading Font Lock.)\n\nSee also `font-lock-use-colors'. If you want more control over the faces\nused for fontification, see the documentation of `font-lock-mode' for\nhow to do it." :type 'sexp :group 'font-lock)
+(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)
-(defcustom font-lock-maximum-decoration t "*If non-nil, the maximum decoration level for fontifying.\nIf nil, use the minimum decoration (equivalent to level 0).\nIf t, use the maximum decoration available.\nIf a number, use that level of decoration (or if not available the maximum).\nIf a list, each element should be a cons pair of the form (MAJOR-MODE . LEVEL),\nwhere MAJOR-MODE is a symbol or t (meaning the default). For example:\n ((c++-mode . 2) (c-mode . t) (t . 1))\nmeans use level 2 decoration for buffers in `c++-mode', the maximum decoration\navailable for buffers in `c-mode', and level 1 decoration otherwise." :type '(choice (const :tag "default" nil) (const :tag "maximum" t) (integer :tag "level" 1) (repeat :menu-tag "mode specific" :tag "mode specific" :value ((t . t)) (cons :tag "Instance" (radio :tag "Mode" (const :tag "all" t) (symbol :tag "name")) (radio :tag "Decoration" (const :tag "default" nil) (const :tag "maximum" t) (integer :tag "level" 1))))) :group 'font-lock)
+(defvar killed-rectangle nil "\
+Rectangle for `yank-rectangle' to insert.")
-(define-obsolete-variable-alias 'font-lock-use-maximal-decoration 'font-lock-maximum-decoration)
+(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.
-(defcustom font-lock-maximum-size (* 250 1024) "*If non-nil, the maximum size for buffers for fontifying.\nOnly buffers less than this can be fontified when Font Lock mode is turned on.\nIf nil, means size is irrelevant.\nIf a list, each element should be a cons pair of the form (MAJOR-MODE . SIZE),\nwhere MAJOR-MODE is a symbol or t (meaning the default). For example:\n ((c++-mode . 256000) (c-mode . 256000) (rmail-mode . 1048576))\nmeans that the maximum size is 250K for buffers in `c++-mode' or `c-mode', one\nmegabyte for buffers in `rmail-mode', and size is irrelevant otherwise." :type '(choice (const :tag "none" nil) (integer :tag "size") (repeat :menu-tag "mode specific" :tag "mode specific" :value ((t)) (cons :tag "Instance" (radio :tag "Mode" (const :tag "all" t) (symbol :tag "name")) (radio :tag "Size" (const :tag "none" nil) (integer :tag "size"))))) :group 'font-lock)
+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)
-(defvar font-lock-keywords nil "\
-A list of the keywords to highlight.
-Each element should be of the form:
+(autoload 'yank-rectangle "rect" "\
+Yank the last killed rectangle with upper left corner at point." t nil)
- MATCHER
- (MATCHER . MATCH)
- (MATCHER . FACENAME)
- (MATCHER . HIGHLIGHT)
- (MATCHER HIGHLIGHT ...)
- (eval . FORM)
+(autoload 'insert-rectangle "rect" "\
+Insert text of RECTANGLE with upper left corner at point.
+RECTANGLE's first line is inserted at point, its second
+line is inserted at a point vertically under point, etc.
+RECTANGLE should be a list of strings.
+After this command, the mark is at the upper left corner
+and point is at the lower right corner." nil nil)
-where HIGHLIGHT should be either MATCH-HIGHLIGHT or MATCH-ANCHORED.
+(autoload 'open-rectangle "rect" "\
+Blank out the region-rectangle, shifting text right.
-FORM is an expression, whose value should be a keyword element,
-evaluated when the keyword is (first) used in a buffer. This feature
-can be used to provide a keyword that can only be generated when Font
-Lock mode is actually turned on.
+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)
-For highlighting single items, typically only MATCH-HIGHLIGHT is required.
-However, if an item or (typically) items is to be highlighted following the
-instance of another item (the anchor) then MATCH-ANCHORED may be required.
+(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.
-MATCH-HIGHLIGHT should be of the form:
+If `pending-delete-mode' is active the string replace the region.
+Otherwise this command does not delete or overwrite any existing text.
- (MATCH FACENAME OVERRIDE LAXMATCH)
+When called from a program, the rectangle's corners are START and END." t nil)
-Where MATCHER can be either the regexp to search for, a variable
-containing the regexp to search for, or the function to call to make
-the search (called with one argument, the limit of the search). MATCH
-is the subexpression of MATCHER to be highlighted. FACENAME is either
-a symbol naming a face, or an expression whose value is the face name
-to use. If you want FACENAME to be a symbol that evaluates to a face,
-use a form like \"(progn sym)\".
+(autoload 'clear-rectangle "rect" "\
+Blank out the region-rectangle.
+The text previously in the region is overwritten with blanks.
-OVERRIDE and LAXMATCH are flags. If OVERRIDE is t, existing fontification may
-be overwritten. If `keep', only parts not already fontified are highlighted.
-If `prepend' or `append', existing fontification is merged with the new, in
-which the new or existing fontification, respectively, takes precedence.
-If LAXMATCH is non-nil, no error is signalled if there is no MATCH in MATCHER.
+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)
-For example, an element of the form highlights (if not already highlighted):
+;;;***
+\f
+;;;### (autoloads (list-load-path-shadows) "shadow" "lisp/shadow.el")
- \"\\\\\\=<foo\\\\\\=>\" Discrete occurrences of \"foo\" in the value of the
- variable `font-lock-keyword-face'.
- (\"fu\\\\(bar\\\\)\" . 1) Substring \"bar\" within all occurrences of \"fubar\" in
- the value of `font-lock-keyword-face'.
- (\"fubar\" . fubar-face) Occurrences of \"fubar\" in the value of `fubar-face'.
- (\"foo\\\\|bar\" 0 foo-bar-face t)
- Occurrences of either \"foo\" or \"bar\" in the value
- of `foo-bar-face', even if already highlighted.
+(autoload 'list-load-path-shadows "shadow" "\
+Display a list of Emacs Lisp files that shadow other files.
-MATCH-ANCHORED should be of the form:
+This function lists potential load-path problems. Directories in the
+`load-path' variable are searched, in order, for Emacs Lisp
+files. When a previously encountered file name is found again, a
+message is displayed indicating that the later file is \"hidden\" by
+the earlier.
- (MATCHER PRE-MATCH-FORM POST-MATCH-FORM MATCH-HIGHLIGHT ...)
+For example, suppose `load-path' is set to
-Where MATCHER is as for MATCH-HIGHLIGHT with one exception; see below.
-PRE-MATCH-FORM and POST-MATCH-FORM are evaluated before the first, and after
-the last, instance MATCH-ANCHORED's MATCHER is used. Therefore they can be
-used to initialize before, and cleanup after, MATCHER is used. Typically,
-PRE-MATCH-FORM is used to move to some position relative to the original
-MATCHER, before starting with MATCH-ANCHORED's MATCHER. POST-MATCH-FORM might
-be used to move, before resuming with MATCH-ANCHORED's parent's MATCHER.
+\(\"/usr/gnu/emacs/site-lisp\" \"/usr/gnu/emacs/share/emacs/19.30/lisp\")
-For example, an element of the form highlights (if not already highlighted):
+and that each of these directories contains a file called XXX.el. Then
+XXX.el in the site-lisp directory is referred to by all of:
+\(require 'XXX), (autoload .... \"XXX\"), (load-library \"XXX\") etc.
- (\"\\\\\\=<anchor\\\\\\=>\" (0 anchor-face) (\"\\\\\\=<item\\\\\\=>\" nil nil (0 item-face)))
+The first XXX.el file prevents emacs from seeing the second (unless
+the second is loaded explicitly via load-file).
- Discrete occurrences of \"anchor\" in the value of `anchor-face', and subsequent
- discrete occurrences of \"item\" (on the same line) in the value of `item-face'.
- (Here PRE-MATCH-FORM and POST-MATCH-FORM are nil. Therefore \"item\" is
- initially searched for starting from the end of the match of \"anchor\", and
- searching for subsequent instance of \"anchor\" resumes from where searching
- for \"item\" concluded.)
+When not intended, such shadowings can be the source of subtle
+problems. For example, the above situation may have arisen because the
+XXX package was not distributed with versions of emacs prior to
+19.30. An emacs maintainer downloaded XXX from elsewhere and installed
+it. Later, XXX was updated and included in the emacs distribution.
+Unless the emacs maintainer checks for this, the new version of XXX
+will be hidden behind the old (which may no longer work with the new
+emacs version).
-The above-mentioned exception is as follows. The limit of the MATCHER search
-defaults to the end of the line after PRE-MATCH-FORM is evaluated.
-However, if PRE-MATCH-FORM returns a position greater than the position after
-PRE-MATCH-FORM is evaluated, that position is used as the limit of the search.
-It is generally a bad idea to return a position greater than the end of the
-line, i.e., cause the MATCHER search to span lines.
+This function performs these checks and flags all possible
+shadowings. Because a .el file may exist without a corresponding .elc
+\(or vice-versa), these suffixes are essentially ignored. A file
+XXX.elc in an early directory (that does not contain XXX.el) is
+considered to shadow a later file XXX.el, and vice-versa.
-Note that the MATCH-ANCHORED feature is experimental; in the future, we may
-replace it with other ways of providing this functionality.
-
-These regular expressions should not match text which spans lines. While
-\\[font-lock-fontify-buffer] handles multi-line patterns correctly, updating
-when you edit the buffer does not, since it considers text one line at a time.
-
-Be very careful composing regexps for this list;
-the wrong pattern can dramatically slow things down!")
+When run interactively, the shadowings (if any) are displayed in a
+buffer called `*Shadows*'. Shadowings are located by calling the
+\(non-interactive) companion function, `find-emacs-lisp-shadows'." t nil)
-(make-variable-buffer-local 'font-lock-keywords)
+;;;***
+\f
+;;;### (autoloads (load-default-sounds load-sound-file) "sound" "lisp/sound.el")
-(defcustom font-lock-mode nil "Non nil means `font-lock-mode' is on" :group 'font-lock :type 'boolean :initialize 'custom-initialize-default :require 'font-lock :set (function (lambda (var val) (font-lock-mode (or val 0)))))
+(or sound-alist (setq sound-alist '((ready nil) (warp nil))))
-(defvar font-lock-mode-hook nil "\
-Function or functions to run on entry to font-lock-mode.")
+(autoload 'load-sound-file "sound" "\
+Read in an audio-file and add it to the sound-alist.
-(autoload 'font-lock-mode "font-lock" "\
-Toggle Font Lock Mode.
-With arg, turn font-lock mode on if and only if arg is positive.
+You can only play sound files if you are running on display 0 of the
+console of a machine with native sound support or running a NetAudio
+server and XEmacs has the necessary sound support compiled in.
-When Font Lock mode is enabled, text is fontified as you type it:
+The sound file must be in the Sun/NeXT U-LAW format, except on Linux,
+where .wav files are also supported by the sound card drivers." t nil)
- - Comments are displayed in `font-lock-comment-face';
- - Strings are displayed in `font-lock-string-face';
- - Documentation strings (in Lisp-like languages) are displayed in
- `font-lock-doc-string-face';
- - Language keywords (\"reserved words\") are displayed in
- `font-lock-keyword-face';
- - Function names in their defining form are displayed in
- `font-lock-function-name-face';
- - Variable names in their defining form are displayed in
- `font-lock-variable-name-face';
- - Type names are displayed in `font-lock-type-face';
- - References appearing in help files and the like are displayed
- in `font-lock-reference-face';
- - Preprocessor declarations are displayed in
- `font-lock-preprocessor-face';
+(autoload 'load-default-sounds "sound" "\
+Load and install some sound files as beep-types, using
+`load-sound-file'. This only works if you're on display 0 of the
+console of a machine with native sound support or running a NetAudio
+server and XEmacs has the necessary sound support compiled in." t nil)
- and
+;;;***
+\f
+;;;### (autoloads (ask-user-about-supersession-threat ask-user-about-lock) "userlock" "lisp/userlock.el")
- - Certain other expressions are displayed in other faces according
- to the value of the variable `font-lock-keywords'.
+(autoload 'ask-user-about-lock "userlock" "\
+Ask user what to do when he wants to edit FILE but it is locked by USER.
+This function has a choice of three things to do:
+ do (signal 'file-locked (list FILE USER))
+ to refrain from editing the file
+ return t (grab the lock on the file)
+ return nil (edit the file even though it is locked).
+You can rewrite it to use any criterion you like to choose which one to do." nil nil)
-Where modes support different levels of fontification, you can use the variable
-`font-lock-maximum-decoration' to specify which level you generally prefer.
-When you turn Font Lock mode on/off the buffer is fontified/defontified, though
-fontification occurs only if the buffer is less than `font-lock-maximum-size'.
-To fontify a buffer without turning on Font Lock mode, and regardless of buffer
-size, you can use \\[font-lock-fontify-buffer].
+(autoload 'ask-user-about-supersession-threat "userlock" "\
+Ask a user who is about to modify an obsolete buffer what to do.
+This function has two choices: it can return, in which case the modification
+of the buffer will proceed, or it can (signal 'file-supersession (file)),
+in which case the proposed buffer modification will not be made.
-See the variable `font-lock-keywords' for customization." t nil)
+You can rewrite this to use any criterion you like to choose which one to do.
+The buffer in question is current when this function is called." nil nil)
-(autoload 'turn-on-font-lock "font-lock" "\
-Unconditionally turn on Font Lock mode." nil nil)
+;;;***
+\f
+;;;### (autoloads (toggle-truncate-lines auto-view-mode view-major-mode view-mode view-minor-mode view-buffer-other-window view-file-other-window view-buffer view-file) "view-less" "lisp/view-less.el")
-(autoload 'turn-off-font-lock "font-lock" "\
-Unconditionally turn off Font Lock mode." nil nil)
+(defvar view-minor-mode-map (let ((map (make-keymap))) (set-keymap-name map 'view-minor-mode-map) (suppress-keymap map) (define-key map "-" 'negative-argument) (define-key map " " 'scroll-up) (define-key map "f" 'scroll-up) (define-key map "b" 'scroll-down) (define-key map 'backspace 'scroll-down) (define-key map 'delete 'scroll-down) (define-key map "\r" 'view-scroll-lines-up) (define-key map "\n" 'view-scroll-lines-up) (define-key map "e" 'view-scroll-lines-up) (define-key map "j" 'view-scroll-lines-up) (define-key map "y" 'view-scroll-lines-down) (define-key map "k" 'view-scroll-lines-down) (define-key map "d" 'view-scroll-some-lines-up) (define-key map "u" 'view-scroll-some-lines-down) (define-key map "r" 'recenter) (define-key map "t" 'toggle-truncate-lines) (define-key map "N" 'view-buffer) (define-key map "E" 'view-file) (define-key map "P" 'view-buffer) (define-key map "!" 'shell-command) (define-key map "|" 'shell-command-on-region) (define-key map "=" 'what-line) (define-key map "?" 'view-search-backward) (define-key map "h" 'view-mode-describe) (define-key map "s" 'view-repeat-search) (define-key map "n" 'view-repeat-search) (define-key map "/" 'view-search-forward) (define-key map "\\" 'view-search-backward) (define-key map "g" 'view-goto-line) (define-key map "G" 'view-last-windowful) (define-key map "%" 'view-goto-percent) (define-key map "p" 'view-goto-percent) (define-key map "m" 'point-to-register) (define-key map "'" 'register-to-point) (define-key map "C" 'view-cleanup-backspaces) (define-key map "\ 3\ 3" 'view-quit) (define-key map "\18\11" 'view-quit-toggle-ro) (define-key map "q" 'view-quit) map))
-(autoload 'font-lock-fontify-buffer "font-lock" "\
-Fontify the current buffer the way `font-lock-mode' would.
-See `font-lock-mode' for details.
+(defvar view-mode-map (let ((map (copy-keymap view-minor-mode-map))) (set-keymap-name map 'view-mode-map) map))
-This can take a while for large buffers." t nil)
+(autoload 'view-file "view-less" "\
+Find FILE, enter view mode. With prefix arg OTHER-P, use other window." t nil)
-(autoload 'font-lock-set-defaults-1 "font-lock" nil nil nil)
+(autoload 'view-buffer "view-less" "\
+Switch to BUF, enter view mode. With prefix arg use other window." t nil)
-(add-minor-mode 'font-lock-mode " Font")
+(autoload 'view-file-other-window "view-less" "\
+Find FILE in other window, and enter view mode." t nil)
-;;;***
-\f
-;;;### (autoloads (font-menu-weight-constructor font-menu-size-constructor font-menu-family-constructor reset-device-font-menus) "font-menu" "lisp/font-menu.el")
+(autoload 'view-buffer-other-window "view-less" "\
+Switch to BUFFER in another window, and enter view mode." t nil)
-(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)
+(autoload 'view-minor-mode "view-less" "\
+Minor mode for viewing text, with bindings like `less'.
+Commands are:
+\\<view-minor-mode-map>
+0..9 prefix args
+- prefix minus
+\\[scroll-up] page forward
+\\[scroll-down] page back
+\\[view-scroll-lines-up] scroll prefix-arg lines forward, default 1.
+\\[view-scroll-lines-down] scroll prefix-arg lines backward, default 1.
+\\[view-scroll-some-lines-down] scroll prefix-arg lines backward, default 10.
+\\[view-scroll-some-lines-up] scroll prefix-arg lines forward, default 10.
+\\[what-line] print line number
+\\[view-mode-describe] print this help message
+\\[view-search-forward] regexp search, uses previous string if you just hit RET
+\\[view-search-backward] as above but searches backward
+\\[view-repeat-search] repeat last search
+\\[view-goto-line] goto line prefix-arg, default 1
+\\[view-last-windowful] goto line prefix-arg, default last line
+\\[view-goto-percent] goto a position by percentage
+\\[toggle-truncate-lines] toggle truncate-lines
+\\[view-file] view another file
+\\[view-buffer] view another buffer
+\\[view-cleanup-backspaces] cleanup backspace constructions
+\\[shell-command] execute a shell command
+\\[shell-command-on-region] execute a shell command with the region as input
+\\[view-quit] exit view-mode, and bury the current buffer.
-(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)
+If invoked with the optional (prefix) arg non-nil, view-mode cleans up
+backspace constructions.
-(fset 'install-font-menus 'reset-device-font-menus)
+More precisely:
+\\{view-minor-mode-map}" t nil)
-(autoload 'reset-device-font-menus "font-menu" "\
-Generates the `Font', `Size', and `Weight' submenus for the Options menu.
-This is run the first time that a font-menu is needed for each device.
-If you don't like the lazy invocation of this function, you can add it to
-`create-device-hook' and that will make the font menus respond more quickly
-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)
+(autoload 'view-mode "view-less" "\
+View the current buffer using view-minor-mode. This exists to be 99.9%
+compatible with the implementations of `view-mode' in view.el and older
+versions of view-less.el." t nil)
-(autoload 'font-menu-family-constructor "font-menu" nil nil nil)
+(autoload 'view-major-mode "view-less" "\
+View the current buffer using view-mode, as a major mode.
+This function has a nonstandard name because `view-mode' is wrongly
+named but is like this for compatibility reasons." t nil)
-(autoload 'font-menu-size-constructor "font-menu" nil nil nil)
+(autoload 'auto-view-mode "view-less" "\
+If the file of the current buffer is not writable, call view-mode.
+This is meant to be added to `find-file-hooks'." nil nil)
-(autoload 'font-menu-weight-constructor "font-menu" nil nil nil)
+(autoload 'toggle-truncate-lines "view-less" "\
+Toggles the values of truncate-lines.
+Positive prefix arg sets, negative disables." t nil)
;;;***
\f
-;;;### (autoloads (x-font-build-cache font-default-size-for-device font-default-encoding-for-device font-default-registry-for-device font-default-family-for-device font-default-object-for-device font-default-font-for-device font-create-object) "font" "lisp/font.el")
+;;;### (autoloads (widget-minor-mode widget-browse-other-window widget-browse widget-browse-at) "wid-browse" "lisp/wid-browse.el")
-(autoload 'font-create-object "font" nil nil nil)
+(autoload 'widget-browse-at "wid-browse" "\
+Browse the widget under point." t nil)
-(autoload 'font-default-font-for-device "font" nil nil nil)
+(autoload 'widget-browse "wid-browse" "\
+Create a widget browser for WIDGET." t nil)
-(autoload 'font-default-object-for-device "font" nil nil nil)
+(autoload 'widget-browse-other-window "wid-browse" "\
+Show widget browser for WIDGET in other window." t nil)
-(autoload 'font-default-family-for-device "font" nil nil nil)
+(autoload 'widget-minor-mode "wid-browse" "\
+Togle minor mode for traversing widgets.
+With arg, turn widget mode on if and only if arg is positive." t nil)
-(autoload 'font-default-registry-for-device "font" nil nil nil)
+;;;***
+\f
+;;;### (autoloads (widget-delete widget-create widget-prompt-value) "wid-edit" "lisp/wid-edit.el")
-(autoload 'font-default-encoding-for-device "font" nil nil nil)
+(autoload 'widget-prompt-value "wid-edit" "\
+Prompt for a value matching WIDGET, using PROMPT.
+The current value is assumed to be VALUE, unless UNBOUND is non-nil." nil nil)
-(autoload 'font-default-size-for-device "font" nil nil nil)
+(autoload 'widget-create "wid-edit" "\
+Create widget of TYPE.
+The optional ARGS are additional keyword arguments." nil nil)
-(autoload 'x-font-build-cache "font" nil nil nil)
+(autoload 'widget-delete "wid-edit" "\
+Delete WIDGET." nil nil)
;;;***
\f
-;;;### (autoloads (gnuserv-start gnuserv-running-p) "gnuserv" "lisp/gnuserv.el")
+;;;### (autoloads (x-reset-device-font-menus) "x-font-menu" "lisp/x-font-menu.el")
-(defcustom gnuserv-frame nil "*The frame to be used to display all edited files.\nIf nil, then a new frame is created for each file edited.\nIf t, then the currently selected frame will be used.\nIf a function, then this will be called with a symbol `x' or `tty' as the\nonly argument, and its return value will be interpreted as above." :tag "Gnuserv Frame" :type '(radio (const :tag "Create new frame each time" nil) (const :tag "Use selected frame" t) (function-item :tag "Use main Emacs frame" gnuserv-main-frame-function) (function-item :tag "Use visible frame, otherwise create new" gnuserv-visible-frame-function) (function-item :tag "Create special Gnuserv frame and use it" gnuserv-special-frame-function) (function :tag "Other")) :group 'gnuserv :group 'frames)
+(autoload 'x-reset-device-font-menus "x-font-menu" "\
+Generates the `Font', `Size', and `Weight' submenus for the Options menu.
+This is run the first time that a font-menu is needed for each device.
+If you don't like the lazy invocation of this function, you can add it to
+`create-device-hook' and that will make the font menus respond more quickly
+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)
-(autoload 'gnuserv-running-p "gnuserv" "\
-Return non-nil if a gnuserv process is running from this XEmacs session." nil nil)
+(defun* x-font-menu-font-data (face dcache) (let* ((case-fold-search t) (domain (if font-menu-this-frame-only-p (selected-frame) (selected-device))) (name (font-instance-name (face-font-instance face domain))) (truename (font-instance-truename (face-font-instance face domain (if (featurep 'mule) 'ascii)))) family size weight entry slant) (when (string-match x-font-regexp-foundry-and-family name) (setq family (capitalize (match-string 1 name))) (setq entry (vassoc family (aref dcache 0)))) (when (and (null entry) (string-match x-font-regexp-foundry-and-family truename)) (setq family (capitalize (match-string 1 truename))) (setq entry (vassoc family (aref dcache 0)))) (when (null entry) (return-from x-font-menu-font-data (make-vector 5 nil))) (when (string-match x-font-regexp name) (setq weight (capitalize (match-string 1 name))) (setq size (string-to-int (match-string 6 name)))) (when (string-match x-font-regexp truename) (when (not (member weight (aref entry 1))) (setq weight (capitalize (match-string 1 truename)))) (when (not (member size (aref entry 2))) (setq size (string-to-int (match-string 6 truename)))) (setq slant (capitalize (match-string 2 truename)))) (vector entry family size weight slant)))
-(autoload 'gnuserv-start "gnuserv" "\
-Allow this Emacs process to be a server for client processes.
-This starts a gnuserv communications subprocess through which
-client \"editors\" (gnuclient and gnudoit) can send editing commands to
-this Emacs job. See the gnuserv(1) manual page for more details.
+;;;***
+\f
+;;;### (autoloads (x-win-init-sun) "x-win-sun" "lisp/x-win-sun.el")
-Prefix arg means just kill any existing server communications subprocess." t nil)
+(autoload 'x-win-init-sun "x-win-sun" nil nil nil)
;;;***
\f
-;;;### (autoloads nil "help-macro" "lisp/help-macro.el")
+;;;### (autoloads (x-win-init-xfree86) "x-win-xfree86" "lisp/x-win-xfree86.el")
-(defcustom three-step-help t "*Non-nil means give more info about Help command in three steps.\nThe three steps are simple prompt, prompt with all options,\nand window listing and describing the options.\nA value of nil means skip the middle step, so that\n\\[help-command] \\[help-command] gives the window that lists the options." :type 'boolean :group 'help-appearance)
+(autoload 'x-win-init-xfree86 "x-win-xfree86" nil nil nil)
;;;***
\f
-;;;### (autoloads (hyper-apropos-popup-menu hyper-apropos-set-variable hyper-set-variable hyper-apropos-read-variable-symbol hyper-describe-function hyper-where-is hyper-describe-variable hyper-describe-face hyper-describe-key-briefly hyper-describe-key hyper-apropos) "hyper-apropos" "lisp/hyper-apropos.el")
+;;;### (autoloads nil "abbrev" "lisp\\abbrev.el")
-(autoload 'hyper-apropos "hyper-apropos" "\
-Display lists of functions and variables matching REGEXP
-in buffer \"*Hyper Apropos*\". If optional prefix arg is given, then the
-value of `hyper-apropos-programming-apropos' is toggled for this search.
-See also `hyper-apropos-mode'." t nil)
+;;;***
+\f
+;;;### (autoloads (about-xemacs) "about" "lisp\\about.el")
-(autoload 'hyper-describe-key "hyper-apropos" nil t nil)
+(autoload 'about-xemacs "about" "\
+Describe the True Editor and its minions." t nil)
-(autoload 'hyper-describe-key-briefly "hyper-apropos" nil t nil)
+;;;***
+\f
+;;;### (autoloads (set-modified-alist modify-alist remove-alist set-alist del-alist put-alist vassoc) "alist" "lisp\\alist.el")
-(autoload 'hyper-describe-face "hyper-apropos" "\
-Describe face..
-See also `hyper-apropos' and `hyper-describe-function'." t nil)
+(autoload 'vassoc "alist" "\
+Search VALIST for a vector whose first element is equal to KEY.
+See also `assoc'." nil nil)
-(autoload 'hyper-describe-variable "hyper-apropos" "\
-Hypertext drop-in replacement for `describe-variable'.
-See also `hyper-apropos' and `hyper-describe-function'." t nil)
+(autoload 'put-alist "alist" "\
+Modify ALIST to set VALUE to ITEM.
+If there is a pair whose car is ITEM, replace its cdr by VALUE.
+If there is not such pair, create new pair (ITEM . VALUE) and
+return new alist whose car is the new pair and cdr is ALIST.
+[tomo's ELIS like function]" nil nil)
-(autoload 'hyper-where-is "hyper-apropos" "\
-Print message listing key sequences that invoke specified command." t nil)
+(autoload 'del-alist "alist" "\
+If there is a pair whose key is ITEM, delete it from ALIST.
+[tomo's ELIS emulating function]" nil nil)
-(autoload 'hyper-describe-function "hyper-apropos" "\
-Hypertext replacement for `describe-function'. Unlike `describe-function'
-in that the symbol under the cursor is the default if it is a function.
-See also `hyper-apropos' and `hyper-describe-variable'." t nil)
+(autoload 'set-alist "alist" "\
+Modify a alist indicated by SYMBOL to set VALUE to ITEM." nil nil)
-(autoload 'hyper-apropos-read-variable-symbol "hyper-apropos" "\
-Hypertext drop-in replacement for `describe-variable'.
-See also `hyper-apropos' and `hyper-describe-function'." nil nil)
+(autoload 'remove-alist "alist" "\
+Remove ITEM from the alist indicated by SYMBOL." nil nil)
-(define-obsolete-function-alias 'hypropos-read-variable-symbol 'hyper-apropos-read-variable-symbol)
+(autoload 'modify-alist "alist" "\
+Modify alist DEFAULT into alist MODIFIER." nil nil)
-(define-obsolete-function-alias 'hypropos-get-doc 'hyper-apropos-get-doc)
+(autoload 'set-modified-alist "alist" "\
+Modify a value of a symbol SYM into alist MODIFIER.
+The symbol SYM should be alist. If it is not bound,
+its value regard as nil." nil nil)
-(autoload 'hyper-set-variable "hyper-apropos" nil t nil)
+;;;***
+\f
+;;;### (autoloads (apropos-documentation apropos-value apropos apropos-command) "apropos" "lisp\\apropos.el")
-(autoload 'hyper-apropos-set-variable "hyper-apropos" "\
-Interactively set the variable on the current line." t nil)
+(fset 'command-apropos 'apropos-command)
-(define-obsolete-function-alias 'hypropos-set-variable 'hyper-apropos-set-variable)
+(autoload 'apropos-command "apropos" "\
+Shows commands (interactively callable functions) that match REGEXP.
+With optional prefix ARG or if `apropos-do-all' is non-nil, also show
+variables." t nil)
-(autoload 'hyper-apropos-popup-menu "hyper-apropos" nil t nil)
+(autoload 'apropos "apropos" "\
+Show all bound symbols whose names match REGEXP.
+With optional prefix ARG or if `apropos-do-all' is non-nil, also show unbound
+symbols and key bindings, which is a little more time-consuming.
+Returns list of symbols and documentation found." t nil)
-(define-obsolete-function-alias 'hypropos-popup-menu 'hyper-apropos-popup-menu)
+(autoload 'apropos-value "apropos" "\
+Show all symbols whose value's printed image matches REGEXP.
+With optional prefix ARG or if `apropos-do-all' is non-nil, also looks
+at the function and at the names and values of properties.
+Returns list of symbols and values found." t nil)
+
+(autoload 'apropos-documentation "apropos" "\
+Show symbols whose documentation contain matches for REGEXP.
+With optional prefix ARG or if `apropos-do-all' is non-nil, also use
+documentation that is not stored in the documentation file and show key
+bindings.
+Returns list of symbols and documentation found." t nil)
;;;***
\f
-;;;### (autoloads (Info-elisp-ref Info-emacs-key Info-goto-emacs-key-command-node Info-goto-emacs-command-node Info-emacs-command Info-search Info-visit-file Info-goto-node Info-batch-rebuild-dir Info-query info) "info" "lisp/info.el")
+;;;### (autoloads nil "buff-menu" "lisp\\buff-menu.el")
-(defvar Info-directory-list nil "\
-List of directories to search for Info documentation files.
+(defvar list-buffers-directory nil)
-The first directory in this list, the \"dir\" file there will become
-the (dir)Top node of the Info documentation tree. If you wish to
-modify the info search path, use `M-x customize-variable,
-Info-directory-list' to do so.")
+(make-variable-buffer-local 'list-buffers-directory)
-(autoload 'info "info" "\
-Enter Info, the documentation browser.
-Optional argument FILE specifies the file to examine;
-the default is the top-level directory of Info.
+;;;***
+\f
+;;;### (autoloads (compiler-macroexpand define-compiler-macro ignore-file-errors ignore-errors assert check-type typep deftype cl-struct-setf-expander defstruct define-modify-macro callf2 callf letf* letf rotatef shiftf remf cl-do-pop psetf setf get-setf-method defsetf define-setf-method declare the locally multiple-value-setq multiple-value-bind lexical-let* lexical-let symbol-macrolet macrolet labels flet progv psetq do-all-symbols do-symbols dotimes dolist do* do loop return-from return block etypecase typecase ecase case load-time-value eval-when destructuring-bind function* defmacro* defun* cl-compile-time-init) "cl-macs" "lisp\\cl-macs.el")
-In interactive use, a prefix argument directs this command
-to read a file name from the minibuffer." t nil)
+(autoload 'cl-compile-time-init "cl-macs" nil nil nil)
-(autoload 'Info-query "info" "\
-Enter Info, the documentation browser. Prompt for name of Info file." t nil)
+(autoload 'defun* "cl-macs" "\
+(defun* NAME ARGLIST [DOCSTRING] BODY...): define NAME as a function.
+Like normal `defun', except ARGLIST allows full Common Lisp conventions,
+and BODY is implicitly surrounded by (block NAME ...)." nil 'macro)
-(autoload 'Info-batch-rebuild-dir "info" "\
-(Re)build info `dir' files in the directories remaining on the command line.
-Use this from the command line, with `-batch';
-it won't work in an interactive Emacs.
-Each file is processed even if an error occurred previously.
-For example, invoke \"xemacs -batch -f Info-batch-rebuild-dir /usr/local/info\"" nil nil)
+(autoload 'defmacro* "cl-macs" "\
+(defmacro* NAME ARGLIST [DOCSTRING] BODY...): define NAME as a macro.
+Like normal `defmacro', except ARGLIST allows full Common Lisp conventions,
+and BODY is implicitly surrounded by (block NAME ...)." nil 'macro)
-(autoload 'Info-goto-node "info" "\
-Go to info node named NAME. Give just NODENAME or (FILENAME)NODENAME.
-Actually, the following interpretations of NAME are tried in order:
- (FILENAME)NODENAME
- (FILENAME) (using Top node)
- NODENAME (in current file)
- TAGNAME (see below)
- FILENAME (using Top node)
-where TAGNAME is a string that appears in quotes: \"TAGNAME\", in an
-annotation for any node of any file. (See `a' and `x' commands.)" t nil)
+(autoload 'function* "cl-macs" "\
+(function* SYMBOL-OR-LAMBDA): introduce a function.
+Like normal `function', except that if argument is a lambda form, its
+ARGLIST allows full Common Lisp conventions." nil 'macro)
-(autoload 'Info-visit-file "info" "\
-Directly visit an info file." t nil)
+(autoload 'destructuring-bind "cl-macs" nil nil 'macro)
-(autoload 'Info-search "info" "\
-Search for REGEXP, starting from point, and select node it's found in." t nil)
+(autoload 'eval-when "cl-macs" "\
+(eval-when (WHEN...) BODY...): control when BODY is evaluated.
+If `compile' is in WHEN, BODY is evaluated when compiled at top-level.
+If `load' is in WHEN, BODY is evaluated when loaded after top-level compile.
+If `eval' is in WHEN, BODY is evaluated when interpreted or at non-top-level." nil 'macro)
-(autoload 'Info-emacs-command "info" "\
-Look up an Emacs command in the Emacs manual in the Info system.
-This command is designed to be used whether you are already in Info or not." t nil)
+(autoload 'load-time-value "cl-macs" "\
+Like `progn', but evaluates the body at load time.
+The result of the body appears to the compiler as a quoted constant." nil 'macro)
-(autoload 'Info-goto-emacs-command-node "info" "\
-Look up an Emacs command in the Emacs manual in the Info system.
-This command is designed to be used whether you are already in Info or not." t nil)
+(autoload 'case "cl-macs" "\
+(case EXPR CLAUSES...): evals EXPR, chooses from CLAUSES on that value.
+Each clause looks like (KEYLIST BODY...). EXPR is evaluated and compared
+against each key in each KEYLIST; the corresponding BODY is evaluated.
+If no clause succeeds, case returns nil. A single atom may be used in
+place of a KEYLIST of one atom. A KEYLIST of `t' or `otherwise' is
+allowed only in the final clause, and matches if no other keys match.
+Key values are compared by `eql'." nil 'macro)
-(autoload 'Info-goto-emacs-key-command-node "info" "\
-Look up an Emacs key sequence in the Emacs manual in the Info system.
-This command is designed to be used whether you are already in Info or not." t nil)
+(autoload 'ecase "cl-macs" "\
+(ecase EXPR CLAUSES...): like `case', but error if no case fits.
+`otherwise'-clauses are not allowed." nil 'macro)
-(autoload 'Info-emacs-key "info" "\
-Look up an Emacs key sequence in the Emacs manual in the Info system.
-This command is designed to be used whether you are already in Info or not." t nil)
+(autoload 'typecase "cl-macs" "\
+(typecase EXPR CLAUSES...): evals EXPR, chooses from CLAUSES on that value.
+Each clause looks like (TYPE BODY...). EXPR is evaluated and, if it
+satisfies TYPE, the corresponding BODY is evaluated. If no clause succeeds,
+typecase returns nil. A TYPE of `t' or `otherwise' is allowed only in the
+final clause, and matches if no other keys match." nil 'macro)
-(autoload 'Info-elisp-ref "info" "\
-Look up an Emacs Lisp function in the Elisp manual in the Info system.
-This command is designed to be used whether you are already in Info or not." t nil)
+(autoload 'etypecase "cl-macs" "\
+(etypecase EXPR CLAUSES...): like `typecase', but error if no case fits.
+`otherwise'-clauses are not allowed." nil 'macro)
-;;;***
-\f
-;;;### (autoloads nil "itimer-autosave" "lisp/itimer-autosave.el")
+(autoload 'block "cl-macs" "\
+(block NAME BODY...): define a lexically-scoped block named NAME.
+NAME may be any symbol. Code inside the BODY forms can call `return-from'
+to jump prematurely out of the block. This differs from `catch' and `throw'
+in two respects: First, the NAME is an unevaluated symbol rather than a
+quoted symbol or other form; and second, NAME is lexically rather than
+dynamically scoped: Only references to it within BODY will work. These
+references may appear inside macro expansions, but not inside functions
+called from BODY." nil 'macro)
-;;;***
-\f
-;;;### (autoloads nil "loaddefs" "lisp/loaddefs.el")
+(autoload 'return "cl-macs" "\
+(return [RESULT]): return from the block named nil.
+This is equivalent to `(return-from nil RESULT)'." nil 'macro)
-;;;***
-\f
-;;;### (autoloads nil "loadhist" "lisp/loadhist.el")
+(autoload 'return-from "cl-macs" "\
+(return-from NAME [RESULT]): return from the block named NAME.
+This jumps out to the innermost enclosing `(block NAME ...)' form,
+returning RESULT from that form (or nil if RESULT is omitted).
+This is compatible with Common Lisp, but note that `defun' and
+`defmacro' do not create implicit blocks as they do in Common Lisp." nil 'macro)
-;;;***
-\f
-;;;### (autoloads (mswindows-reset-device-font-menus) "msw-font-menu" "lisp/msw-font-menu.el")
+(autoload 'loop "cl-macs" "\
+(loop CLAUSE...): The Common Lisp `loop' macro.
+Valid clauses are:
+ for VAR from/upfrom/downfrom NUM to/upto/downto/above/below NUM by NUM,
+ for VAR in LIST by FUNC, for VAR on LIST by FUNC, for VAR = INIT then EXPR,
+ for VAR across ARRAY, repeat NUM, with VAR = INIT, while COND, until COND,
+ always COND, never COND, thereis COND, collect EXPR into VAR,
+ append EXPR into VAR, nconc EXPR into VAR, sum EXPR into VAR,
+ count EXPR into VAR, maximize EXPR into VAR, minimize EXPR into VAR,
+ if COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...],
+ unless COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...],
+ do EXPRS..., initially EXPRS..., finally EXPRS..., return EXPR,
+ finally return EXPR, named NAME." nil 'macro)
-(autoload 'mswindows-reset-device-font-menus "msw-font-menu" "\
-Generates the `Font', `Size', and `Weight' submenus for the Options menu.
-This is run the first time that a font-menu is needed for each device.
-If you don't like the lazy invocation of this function, you can add it to
-`create-device-hook' and that will make the font menus respond more quickly
-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)
+(autoload 'do "cl-macs" "\
+The Common Lisp `do' loop.
+Format is: (do ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)" nil 'macro)
-(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)))
+(autoload 'do* "cl-macs" "\
+The Common Lisp `do*' loop.
+Format is: (do* ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)" nil 'macro)
-;;;***
-\f
-;;;### (autoloads (mwheel-install) "mwheel" "lisp/mwheel.el")
+(autoload 'dolist "cl-macs" "\
+(dolist (VAR LIST [RESULT]) BODY...): loop over a list.
+Evaluate BODY with VAR bound to each `car' from LIST, in turn.
+Then evaluate RESULT to get return value, default nil." nil 'macro)
-(autoload 'mwheel-install "mwheel" "\
-Enable mouse wheel support." nil nil)
+(autoload 'dotimes "cl-macs" "\
+(dotimes (VAR COUNT [RESULT]) BODY...): loop a certain number of times.
+Evaluate BODY with VAR bound to successive integers from 0, inclusive,
+to COUNT, exclusive. Then evaluate RESULT to get return value, default
+nil." nil 'macro)
-;;;***
-\f
-;;;### (autoloads (package-admin-add-binary-package package-admin-add-single-file-package) "package-admin" "lisp/package-admin.el")
+(autoload 'do-symbols "cl-macs" "\
+(dosymbols (VAR [OBARRAY [RESULT]]) BODY...): loop over all symbols.
+Evaluate BODY with VAR bound to each interned symbol, or to each symbol
+from OBARRAY." nil 'macro)
-(autoload 'package-admin-add-single-file-package "package-admin" "\
-Install a single file Lisp package into XEmacs package hierarchy.
-`file' should be the full path to the lisp file to install.
-`destdir' should be a simple directory name.
-The optional `pkg-dir' can be used to override the default package hierarchy
-\(car (last late-packages))." t nil)
+(autoload 'do-all-symbols "cl-macs" nil nil 'macro)
-(autoload 'package-admin-add-binary-package "package-admin" "\
-Install a pre-bytecompiled XEmacs package into package hierarchy." t nil)
+(autoload 'psetq "cl-macs" "\
+(psetq SYM VAL SYM VAL ...): set SYMs to the values VALs in parallel.
+This is like `setq', except that all VAL forms are evaluated (in order)
+before assigning any symbols SYM to the corresponding values." nil 'macro)
-;;;***
-\f
-;;;### (autoloads (package-get-custom package-get-package-provider package-get package-get-dependencies package-get-all package-get-update-all package-get-delete-package package-get-save-base package-get-update-base-from-buffer package-get-update-base package-get-update-base-entry package-get-require-base package-get-download-menu) "package-get" "lisp/package-get.el")
+(autoload 'progv "cl-macs" "\
+(progv SYMBOLS VALUES BODY...): bind SYMBOLS to VALUES dynamically in BODY.
+The forms SYMBOLS and VALUES are evaluated, and must evaluate to lists.
+Each SYMBOL in the first list is bound to the corresponding VALUE in the
+second list (or made unbound if VALUES is shorter than SYMBOLS); then the
+BODY forms are executed and their result is returned. This is much like
+a `let' form, except that the list of symbols can be computed at run-time." nil 'macro)
-(defvar package-get-base nil "\
-List of packages that are installed at this site.
-For each element in the alist, car is the package name and the cdr is
-a plist containing information about the package. Typical fields
-kept in the plist are:
+(autoload 'flet "cl-macs" "\
+(flet ((FUNC ARGLIST BODY...) ...) FORM...): make temporary function defns.
+This is an analogue of `let' that operates on the function cell of FUNC
+rather than its value cell. The FORMs are evaluated with the specified
+function definitions in place, then the definitions are undone (the FUNCs
+go back to their previous definitions, or lack thereof)." nil 'macro)
-version - version of this package
-provides - list of symbols provided
-requires - list of symbols that are required.
- These in turn are provided by other packages.
-filename - name of the file.
-size - size of the file (aka the bundled package)
-md5sum - computed md5 checksum
-description - What this package is for.
-type - Whether this is a 'binary (default) or 'single file package
+(autoload 'labels "cl-macs" "\
+(labels ((FUNC ARGLIST BODY...) ...) FORM...): make temporary func bindings.
+This is like `flet', except the bindings are lexical instead of dynamic.
+Unlike `flet', this macro is fully compliant with the Common Lisp standard." nil 'macro)
-More fields may be added as needed. An example:
+(autoload 'macrolet "cl-macs" "\
+(macrolet ((NAME ARGLIST BODY...) ...) FORM...): make temporary macro defns.
+This is like `flet', but for macros instead of functions." nil 'macro)
-'(
- (name
- (version \"<version 2>\"
- file \"filename\"
- description \"what this package is about.\"
- provides (<list>)
- requires (<list>)
- size <integer-bytes>
- md5sum \"<checksum\"
- type single
- )
- (version \"<version 1>\"
- file \"filename\"
- description \"what this package is about.\"
- provides (<list>)
- requires (<list>)
- size <integer-bytes>
- md5sum \"<checksum\"
- type single
- )
- ...
- ))
+(autoload 'symbol-macrolet "cl-macs" "\
+(symbol-macrolet ((NAME EXPANSION) ...) FORM...): make symbol macro defns.
+Within the body FORMs, references to the variable NAME will be replaced
+by EXPANSION, and (setq NAME ...) will act like (setf EXPANSION ...)." nil 'macro)
-For version information, it is assumed things are listed in most
-recent to least recent -- in other words, the version names don't have to
-be lexically ordered. It is debatable if it makes sense to have more than
-one version of a package available.")
+(autoload 'lexical-let "cl-macs" "\
+(lexical-let BINDINGS BODY...): like `let', but lexically scoped.
+The main visible difference is that lambdas inside BODY will create
+lexical closures as in Common Lisp." nil 'macro)
-(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 'lexical-let* "cl-macs" "\
+(lexical-let* BINDINGS BODY...): like `let*', but lexically scoped.
+The main visible difference is that lambdas inside BODY will create
+lexical closures as in Common Lisp." nil 'macro)
-(autoload 'package-get-download-menu "package-get" "\
-Build the `Add Download Site' menu." nil nil)
+(autoload 'multiple-value-bind "cl-macs" "\
+(multiple-value-bind (SYM SYM...) FORM BODY): collect multiple return values.
+FORM must return a list; the BODY is then executed with the first N elements
+of this list bound (`let'-style) to each of the symbols SYM in turn. This
+is analogous to the Common Lisp `multiple-value-bind' macro, using lists to
+simulate true multiple return values. For compatibility, (values A B C) is
+a synonym for (list A B C)." nil 'macro)
-(autoload 'package-get-require-base "package-get" "\
-Require that a package-get database has been loaded.
-If the optional FORCE-CURRENT argument or the value of
-`package-get-always-update' is Non-nil, try to update the database
-from a location in `package-get-remote'. Otherwise a local copy is used
-if available and remote access is never done.
+(autoload 'multiple-value-setq "cl-macs" "\
+(multiple-value-setq (SYM SYM...) FORM): collect multiple return values.
+FORM must return a list; the first N elements of this list are stored in
+each of the symbols SYM in turn. This is analogous to the Common Lisp
+`multiple-value-setq' macro, using lists to simulate true multiple return
+values. For compatibility, (values A B C) is a synonym for (list A B C)." nil 'macro)
-Please use FORCE-CURRENT only when the user is explictly dealing with packages
-and remote access is likely in the near future." nil nil)
+(autoload 'locally "cl-macs" nil nil 'macro)
-(autoload 'package-get-update-base-entry "package-get" "\
-Update an entry in `package-get-base'." nil nil)
+(autoload 'the "cl-macs" nil nil 'macro)
-(autoload 'package-get-update-base "package-get" "\
-Update the package-get database file with entries from DB-FILE.
-Unless FORCE-CURRENT is non-nil never try to update the database." t nil)
+(autoload 'declare "cl-macs" nil nil 'macro)
-(autoload 'package-get-update-base-from-buffer "package-get" "\
-Update the package-get database with entries from BUFFER.
-BUFFER defaults to the current buffer. This command can be
-used interactively, for example from a mail or news buffer." t nil)
+(autoload 'define-setf-method "cl-macs" "\
+(define-setf-method NAME ARGLIST BODY...): define a `setf' method.
+This method shows how to handle `setf's to places of the form (NAME ARGS...).
+The argument forms ARGS are bound according to ARGLIST, as if NAME were
+going to be expanded as a macro, then the BODY forms are executed and must
+return a list of five elements: a temporary-variables list, a value-forms
+list, a store-variables list (of length one), a store-form, and an access-
+form. See `defsetf' for a simpler way to define most setf-methods." nil 'macro)
-(autoload 'package-get-save-base "package-get" "\
-Write the package-get database to FILE.
+(autoload 'defsetf "cl-macs" "\
+(defsetf NAME FUNC): define a `setf' method.
+This macro is an easy-to-use substitute for `define-setf-method' that works
+well for simple place forms. In the simple `defsetf' form, `setf's of
+the form (setf (NAME ARGS...) VAL) are transformed to function or macro
+calls of the form (FUNC ARGS... VAL). Example: (defsetf aref aset).
+Alternate form: (defsetf NAME ARGLIST (STORE) BODY...).
+Here, the above `setf' call is expanded by binding the argument forms ARGS
+according to ARGLIST, binding the value form VAL to STORE, then executing
+BODY, which must return a Lisp form that does the necessary `setf' operation.
+Actually, ARGLIST and STORE may be bound to temporary variables which are
+introduced automatically to preserve proper execution order of the arguments.
+Example: (defsetf nth (n x) (v) (list 'setcar (list 'nthcdr n x) v))." nil 'macro)
-Note: This database will be unsigned of course." t nil)
+(autoload 'get-setf-method "cl-macs" "\
+Return a list of five values describing the setf-method for PLACE.
+PLACE may be any Lisp form which can appear as the PLACE argument to
+a macro like `setf' or `incf'." nil nil)
-(autoload 'package-get-delete-package "package-get" "\
-Delete an installation of PACKAGE below directory PKG-TOPDIR.
-PACKAGE is a symbol, not a string.
-This is just an interactive wrapper for `package-admin-delete-binary-package'." t nil)
+(autoload 'setf "cl-macs" "\
+(setf PLACE VAL PLACE VAL ...): set each PLACE to the value of its VAL.
+This is a generalized version of `setq'; the PLACEs may be symbolic
+references such as (car x) or (aref x i), as well as plain symbols.
+For example, (setf (cadar x) y) is equivalent to (setcar (cdar x) y).
+The return value is the last VAL in the list." nil 'macro)
-(autoload 'package-get-update-all "package-get" "\
-Fetch and install the latest versions of all currently installed packages." t nil)
+(autoload 'psetf "cl-macs" "\
+(psetf PLACE VAL PLACE VAL ...): set PLACEs to the values VALs in parallel.
+This is like `setf', except that all VAL forms are evaluated (in order)
+before assigning any PLACEs to the corresponding values." nil 'macro)
-(autoload 'package-get-all "package-get" "\
-Fetch PACKAGE with VERSION and all other required packages.
-Uses `package-get-base' to determine just what is required and what
-package provides that functionality. If VERSION is nil, retrieves
-latest version. Optional argument FETCHED-PACKAGES is used to keep
-track of packages already fetched. Optional argument INSTALL-DIR,
-if non-nil, specifies the package directory where fetched packages
-should be installed.
+(autoload 'cl-do-pop "cl-macs" nil nil nil)
-Returns nil upon error." t nil)
+(autoload 'remf "cl-macs" "\
+(remf PLACE TAG): remove TAG from property list PLACE.
+PLACE may be a symbol, or any generalized variable allowed by `setf'.
+The form returns true if TAG was found and removed, nil otherwise." nil 'macro)
+
+(autoload 'shiftf "cl-macs" "\
+(shiftf PLACE PLACE... VAL): shift left among PLACEs.
+Example: (shiftf A B C) sets A to B, B to C, and returns the old A.
+Each PLACE may be a symbol, or any generalized variable allowed by `setf'." nil 'macro)
+
+(autoload 'rotatef "cl-macs" "\
+(rotatef PLACE...): rotate left among PLACEs.
+Example: (rotatef A B C) sets A to B, B to C, and C to A. It returns nil.
+Each PLACE may be a symbol, or any generalized variable allowed by `setf'." nil 'macro)
+
+(autoload 'letf "cl-macs" "\
+(letf ((PLACE VALUE) ...) BODY...): temporarily bind to PLACEs.
+This is the analogue of `let', but with generalized variables (in the
+sense of `setf') for the PLACEs. Each PLACE is set to the corresponding
+VALUE, then the BODY forms are executed. On exit, either normally or
+because of a `throw' or error, the PLACEs are set back to their original
+values. Note that this macro is *not* available in Common Lisp.
+As a special case, if `(PLACE)' is used instead of `(PLACE VALUE)',
+the PLACE is not modified before executing BODY." nil 'macro)
+
+(autoload 'letf* "cl-macs" "\
+(letf* ((PLACE VALUE) ...) BODY...): temporarily bind to PLACEs.
+This is the analogue of `let*', but with generalized variables (in the
+sense of `setf') for the PLACEs. Each PLACE is set to the corresponding
+VALUE, then the BODY forms are executed. On exit, either normally or
+because of a `throw' or error, the PLACEs are set back to their original
+values. Note that this macro is *not* available in Common Lisp.
+As a special case, if `(PLACE)' is used instead of `(PLACE VALUE)',
+the PLACE is not modified before executing BODY." nil 'macro)
+
+(autoload 'callf "cl-macs" "\
+(callf FUNC PLACE ARGS...): set PLACE to (FUNC PLACE ARGS...).
+FUNC should be an unquoted function name. PLACE may be a symbol,
+or any generalized variable allowed by `setf'." nil 'macro)
+
+(autoload 'callf2 "cl-macs" "\
+(callf2 FUNC ARG1 PLACE ARGS...): set PLACE to (FUNC ARG1 PLACE ARGS...).
+Like `callf', but PLACE is the second argument of FUNC, not the first." nil 'macro)
+
+(autoload 'define-modify-macro "cl-macs" "\
+(define-modify-macro NAME ARGLIST FUNC): define a `setf'-like modify macro.
+If NAME is called, it combines its PLACE argument with the other arguments
+from ARGLIST using FUNC: (define-modify-macro incf (&optional (n 1)) +)" nil 'macro)
+
+(autoload 'defstruct "cl-macs" "\
+(defstruct (NAME OPTIONS...) (SLOT SLOT-OPTS...)...): define a struct type.
+This macro defines a new Lisp data type called NAME, which contains data
+stored in SLOTs. This defines a `make-NAME' constructor, a `copy-NAME'
+copier, a `NAME-p' predicate, and setf-able `NAME-SLOT' accessors." nil 'macro)
+
+(autoload 'cl-struct-setf-expander "cl-macs" nil nil nil)
+
+(autoload 'deftype "cl-macs" "\
+(deftype NAME ARGLIST BODY...): define NAME as a new data type.
+The type name can then be used in `typecase', `check-type', etc." nil 'macro)
+
+(autoload 'typep "cl-macs" "\
+Check that OBJECT is of type TYPE.
+TYPE is a Common Lisp-style type specifier." nil nil)
+
+(autoload 'check-type "cl-macs" "\
+Verify that FORM is of type TYPE; signal an error if not.
+STRING is an optional description of the desired type." nil 'macro)
+
+(autoload 'assert "cl-macs" "\
+Verify that FORM returns non-nil; signal an error if not.
+Second arg SHOW-ARGS means to include arguments of FORM in message.
+Other args STRING and ARGS... are arguments to be passed to `error'.
+They are not evaluated unless the assertion fails. If STRING is
+omitted, a default message listing FORM itself is used." nil 'macro)
+
+(autoload 'ignore-errors "cl-macs" "\
+Execute FORMS; if an error occurs, return nil.
+Otherwise, return result of last FORM." nil 'macro)
+
+(autoload 'ignore-file-errors "cl-macs" "\
+Execute FORMS; if an error of type `file-error' occurs, return nil.
+Otherwise, return result of last FORM." nil 'macro)
+
+(autoload 'define-compiler-macro "cl-macs" "\
+(define-compiler-macro FUNC ARGLIST BODY...): Define a compiler-only macro.
+This is like `defmacro', but macro expansion occurs only if the call to
+FUNC is compiled (i.e., not interpreted). Compiler macros should be used
+for optimizing the way calls to FUNC are compiled; the form returned by
+BODY should do the same thing as a call to the normal function called
+FUNC, though possibly more efficiently. Note that, like regular macros,
+compiler macros are expanded repeatedly until no further expansions are
+possible. Unlike regular macros, BODY can decide to \"punt\" and leave the
+original function call alone by declaring an initial `&whole foo' parameter
+and then returning foo." nil 'macro)
+
+(autoload 'compiler-macroexpand "cl-macs" nil nil nil)
-(autoload 'package-get-dependencies "package-get" "\
-Compute dependencies for PACKAGES.
-Uses `package-get-base' to determine just what is required and what
-package provides that functionality. Returns the list of packages
-required by PACKAGES." nil nil)
+;;;***
+\f
+;;;### (autoloads (batch-remove-old-elc) "cleantree" "lisp\\cleantree.el")
-(autoload 'package-get "package-get" "\
-Fetch PACKAGE from remote site.
-Optional arguments VERSION indicates which version to retrieve, nil
-means most recent version. CONFLICT indicates what happens if the
-package is already installed. Valid values for CONFLICT are:
-'always always retrieve the package even if it is already installed
-'never do not retrieve the package if it is installed.
-INSTALL-DIR, if non-nil, specifies the package directory where
-fetched packages should be installed.
+(autoload 'batch-remove-old-elc "cleantree" nil nil nil)
-The value of `package-get-base' is used to determine what files should
-be retrieved. The value of `package-get-remote' is used to determine
-where a package should be retrieved from. The sites are tried in
-order so one is better off listing easily reached sites first.
+;;;***
+\f
+;;;### (autoloads (config-value config-value-hash-table) "config" "lisp\\config.el")
-Once the package is retrieved, its md5 checksum is computed. If that
-sum does not match that stored in `package-get-base' for this version
-of the package, an error is signalled.
+(autoload 'config-value-hash-table "config" "\
+Return hash table of configuration parameters and their values." nil nil)
-Returns `t' upon success, the symbol `error' if the package was
-successfully installed but errors occurred during initialization, or
-`nil' upon error." t nil)
+(autoload 'config-value "config" "\
+Return the value of the configuration parameter CONFIG_SYMBOL." nil nil)
-(autoload 'package-get-package-provider "package-get" "\
-Search for a package that provides SYM and return the name and
- version. Searches in `package-get-base' for SYM. If SYM is a
- consp, then it must match a corresponding (provide (SYM VERSION)) from
- the package.
+;;;***
+\f
+;;;### (autoloads (Custom-make-dependencies) "cus-dep" "lisp\\cus-dep.el")
-If FORCE-CURRENT is non-nil make sure the database is up to date. This might
-lead to Emacs accessing remote sites." t nil)
+(autoload 'Custom-make-dependencies "cus-dep" "\
+Extract custom dependencies from .el files in SUBDIRS.
+SUBDIRS is a list of directories. If it is nil, the command-line
+arguments are used. If it is a string, only that directory is
+processed. This function is especially useful in batch mode.
-(autoload 'package-get-custom "package-get" "\
-Fetch and install the latest versions of all customized packages." t nil)
+Batch usage: xemacs -batch -l cus-dep.el -f Custom-make-dependencies DIRS" t nil)
;;;***
\f
-;;;### (autoloads (pui-list-packages pui-add-install-directory package-ui-add-site) "package-ui" "lisp/package-ui.el")
+;;;### (autoloads (customize-menu-create custom-menu-create custom-save-all customize-save-customized customize-browse custom-buffer-create-other-window custom-buffer-create customize-apropos-groups customize-apropos-faces customize-apropos-options customize-apropos customize-saved customize-customized customize-face-other-window customize-face customize-option-other-window customize-changed-options customize-variable customize-other-window customize customize-save-variable customize-set-variable customize-set-value) "cus-edit" "lisp\\cus-edit.el")
-(autoload 'package-ui-add-site "package-ui" "\
-Add site to package-get-remote and possibly offer to update package list." nil nil)
+(autoload 'customize-set-value "cus-edit" "\
+Set VARIABLE to VALUE. VALUE is a Lisp object.
-(autoload 'pui-add-install-directory "package-ui" "\
-Add a new package binary directory to the head of `package-get-remote'.
-Note that no provision is made for saving any changes made by this function.
-It exists mainly as a convenience for one-time package installations from
-disk." t nil)
+If VARIABLE has a `variable-interactive' property, that is used as if
+it were the arg to `interactive' (which see) to interactively read the value.
-(autoload 'pui-list-packages "package-ui" "\
-List all packages and package information.
-The package name, version, and description are displayed. From the displayed
-buffer, the user can see which packages are installed, which are not, and
-which are out-of-date (a newer version is available). The user can then
-select packages for installation via the keyboard or mouse." t nil)
+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.
-(defalias 'list-packages 'pui-list-packages)
+If given a prefix (or a COMMENT argument), also prompt for a comment." t nil)
-;;;***
-\f
-;;;### (autoloads (picture-mode) "picture" "lisp/picture.el")
+(autoload 'customize-set-variable "cus-edit" "\
+Set the default for VARIABLE to VALUE. VALUE is a Lisp object.
-(autoload 'picture-mode "picture" "\
-Switch to Picture mode, in which a quarter-plane screen model is used.
-Printing characters replace instead of inserting themselves with motion
-afterwards settable by these commands:
- C-c < Move left after insertion.
- C-c > Move right after insertion.
- C-c ^ Move up after insertion.
- C-c . Move down after insertion.
- C-c ` Move northwest (nw) after insertion.
- C-c ' Move northeast (ne) after insertion.
- C-c / Move southwest (sw) after insertion.
- C-c \\ Move southeast (se) after insertion.
-The current direction is displayed in the modeline. The initial
-direction is right. Whitespace is inserted and tabs are changed to
-spaces when required by movement. You can move around in the buffer
-with these commands:
- \\[picture-move-down] Move vertically to SAME column in previous line.
- \\[picture-move-up] Move vertically to SAME column in next line.
- \\[picture-end-of-line] Move to column following last non-whitespace character.
- \\[picture-forward-column] Move right inserting spaces if required.
- \\[picture-backward-column] Move left changing tabs to spaces if required.
- C-c C-f Move in direction of current picture motion.
- C-c C-b Move in opposite direction of current picture motion.
- Return Move to beginning of next line.
-You can edit tabular text with these commands:
- M-Tab Move to column beneath (or at) next interesting character.
- `Indents' relative to a previous line.
- Tab Move to next stop in tab stop list.
- C-c Tab Set tab stops according to context of this line.
- With ARG resets tab stops to default (global) value.
- See also documentation of variable picture-tab-chars
- which defines \"interesting character\". You can manually
- change the tab stop list with command \\[edit-tab-stops].
-You can manipulate text with these commands:
- C-d Clear (replace) ARG columns after point without moving.
- C-c C-d Delete char at point - the command normally assigned to C-d.
- \\[picture-backward-clear-column] Clear (replace) ARG columns before point, moving back over them.
- \\[picture-clear-line] Clear ARG lines, advancing over them. The cleared
- text is saved in the kill ring.
- \\[picture-open-line] Open blank line(s) beneath current line.
-You can manipulate rectangles with these commands:
- C-c C-k Clear (or kill) a rectangle and save it.
- C-c C-w Like C-c C-k except rectangle is saved in named register.
- C-c C-y Overlay (or insert) currently saved rectangle at point.
- C-c C-x Like C-c C-y except rectangle is taken from named register.
- \\[copy-rectangle-to-register] Copies a rectangle to a register.
- \\[advertised-undo] Can undo effects of rectangle overlay commands
- commands if invoked soon enough.
-You can return to the previous mode with:
- C-c C-c Which also strips trailing whitespace from every line.
- Stripping is suppressed by supplying an argument.
+If VARIABLE has a `custom-set' property, that is used for setting
+VARIABLE, otherwise `set-default' is used.
-Entry to this mode calls the value of picture-mode-hook if non-nil.
+The `customized-value' property of the VARIABLE will be set to a list
+with a quoted VALUE as its sole list member.
-Note that Picture mode commands will work outside of Picture mode, but
-they are not defaultly assigned to keys." t nil)
+If VARIABLE has a `variable-interactive' property, that is used as if
+it were the arg to `interactive' (which see) to interactively read the value.
-(defalias 'edit-picture 'picture-mode)
+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.
-;;;***
-\f
-;;;### (autoloads (clear-rectangle string-rectangle open-rectangle insert-rectangle yank-rectangle extract-rectangle delete-extract-rectangle delete-rectangle kill-rectangle) "rect" "lisp/rect.el")
+If given a prefix (or a COMMENT argument), also prompt for a comment." t nil)
-(defvar killed-rectangle nil "\
-Rectangle for `yank-rectangle' to insert.")
+(autoload 'customize-save-variable "cus-edit" "\
+Set the default for VARIABLE to VALUE, and save it for future sessions.
+If VARIABLE has a `custom-set' property, that is used for setting
+VARIABLE, otherwise `set-default' is used.
-(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.
+The `customized-value' property of the VARIABLE will be set to a list
+with a quoted VALUE as its sole list member.
-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)
+If VARIABLE has a `variable-interactive' property, that is used as if
+it were the arg to `interactive' (which see) to interactively read the value.
-(autoload 'delete-rectangle "rect" "\
-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.
+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.
-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)
+If given a prefix (or a COMMENT argument), also prompt for a comment." t nil)
-(autoload 'delete-extract-rectangle "rect" "\
-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 'customize "cus-edit" "\
+Select a customization buffer which you can use to set user options.
+User options are structured into \"groups\".
+The default group is `Emacs'." t nil)
-With an optional FILL argument, also fill lines where nothing has to be
-deleted." nil nil)
+(defalias 'customize-group 'customize)
-(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 'customize-other-window "cus-edit" "\
+Customize SYMBOL, which must be a customization group." t nil)
-(autoload 'yank-rectangle "rect" "\
-Yank the last killed rectangle with upper left corner at point." t nil)
+(defalias 'customize-group-other-window 'customize-other-window)
-(autoload 'insert-rectangle "rect" "\
-Insert text of RECTANGLE with upper left corner at point.
-RECTANGLE's first line is inserted at point, its second
-line is inserted at a point vertically under point, etc.
-RECTANGLE should be a list of strings.
-After this command, the mark is at the upper left corner
-and point is at the lower right corner." nil nil)
+(defalias 'customize-option 'customize-variable)
-(autoload 'open-rectangle "rect" "\
-Blank out the region-rectangle, shifting text right.
+(autoload 'customize-variable "cus-edit" "\
+Customize SYMBOL, which must be a user option variable." t nil)
-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 'customize-changed-options "cus-edit" "\
+Customize all user option variables whose default values changed recently.
+This means, in other words, variables defined with a `:version' keyword." 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.
+(defalias 'customize-variable-other-window 'customize-option-other-window)
-When called from a program, the rectangle's corners are START and END." t nil)
+(autoload 'customize-option-other-window "cus-edit" "\
+Customize SYMBOL, which must be a user option variable.
+Show the buffer in another window, but don't select it." t nil)
-(autoload 'clear-rectangle "rect" "\
-Blank out the region-rectangle.
-The text previously in the region is overwritten with blanks.
+(autoload 'customize-face "cus-edit" "\
+Customize SYMBOL, which should be a face name or nil.
+If SYMBOL is nil, customize all faces." t nil)
-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)
+(autoload 'customize-face-other-window "cus-edit" "\
+Show customization buffer for FACE in other window." t nil)
-;;;***
-\f
-;;;### (autoloads (list-load-path-shadows) "shadow" "lisp/shadow.el")
+(autoload 'customize-customized "cus-edit" "\
+Customize all user options set since the last save in this session." t nil)
-(autoload 'list-load-path-shadows "shadow" "\
-Display a list of Emacs Lisp files that shadow other files.
+(autoload 'customize-saved "cus-edit" "\
+Customize all already saved user options." t nil)
-This function lists potential load-path problems. Directories in the
-`load-path' variable are searched, in order, for Emacs Lisp
-files. When a previously encountered file name is found again, a
-message is displayed indicating that the later file is \"hidden\" by
-the earlier.
+(autoload 'customize-apropos "cus-edit" "\
+Customize all user options matching REGEXP.
+If ALL is `options', include only options.
+If ALL is `faces', include only faces.
+If ALL is `groups', include only groups.
+If ALL is t (interactively, with prefix arg), include options which are not
+user-settable, as well as faces and groups." t nil)
+
+(autoload 'customize-apropos-options "cus-edit" "\
+Customize all user options matching REGEXP.
+With prefix arg, include options which are not user-settable." t nil)
+
+(autoload 'customize-apropos-faces "cus-edit" "\
+Customize all user faces matching REGEXP." t nil)
+
+(autoload 'customize-apropos-groups "cus-edit" "\
+Customize all user groups matching REGEXP." t nil)
+
+(autoload 'custom-buffer-create "cus-edit" "\
+Create a buffer containing OPTIONS.
+Optional NAME is the name of the buffer.
+OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where
+SYMBOL is a customization option, and WIDGET is a widget for editing
+that option." nil nil)
-For example, suppose `load-path' is set to
+(autoload 'custom-buffer-create-other-window "cus-edit" "\
+Create a buffer containing OPTIONS.
+Optional NAME is the name of the buffer.
+OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where
+SYMBOL is a customization option, and WIDGET is a widget for editing
+that option." nil nil)
-\(\"/usr/gnu/emacs/site-lisp\" \"/usr/gnu/emacs/share/emacs/19.30/lisp\")
+(autoload 'customize-browse "cus-edit" "\
+Create a tree browser for the customize hierarchy." t nil)
-and that each of these directories contains a file called XXX.el. Then
-XXX.el in the site-lisp directory is referred to by all of:
-\(require 'XXX), (autoload .... \"XXX\"), (load-library \"XXX\") etc.
+(defcustom custom-file "~/.emacs" "File used for storing customization information.\nIf you change this from the default \"~/.emacs\" you need to\nexplicitly load that file for the settings to take effect." :type 'file :group 'customize)
-The first XXX.el file prevents emacs from seeing the second (unless
-the second is loaded explicitly via load-file).
+(autoload 'customize-save-customized "cus-edit" "\
+Save all user options which have been set in this session." t nil)
-When not intended, such shadowings can be the source of subtle
-problems. For example, the above situation may have arisen because the
-XXX package was not distributed with versions of emacs prior to
-19.30. An emacs maintainer downloaded XXX from elsewhere and installed
-it. Later, XXX was updated and included in the emacs distribution.
-Unless the emacs maintainer checks for this, the new version of XXX
-will be hidden behind the old (which may no longer work with the new
-emacs version).
+(autoload 'custom-save-all "cus-edit" "\
+Save all customizations in `custom-file'." nil nil)
-This function performs these checks and flags all possible
-shadowings. Because a .el file may exist without a corresponding .elc
-\(or vice-versa), these suffixes are essentially ignored. A file
-XXX.elc in an early directory (that does not contain XXX.el) is
-considered to shadow a later file XXX.el, and vice-versa.
+(autoload 'custom-menu-create "cus-edit" "\
+Create menu for customization group SYMBOL.
+The menu is in a format applicable to `easy-menu-define'." nil nil)
-When run interactively, the shadowings (if any) are displayed in a
-buffer called `*Shadows*'. Shadowings are located by calling the
-\(non-interactive) companion function, `find-emacs-lisp-shadows'." t nil)
+(autoload 'customize-menu-create "cus-edit" "\
+Return a customize 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 format is suitable for use with `easy-menu-define'." nil nil)
;;;***
\f
-;;;### (autoloads (load-default-sounds load-sound-file) "sound" "lisp/sound.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")
-(or sound-alist (setq sound-alist '((ready nil) (warp nil))))
+(autoload 'custom-declare-face "cus-face" "\
+Like `defface', but FACE is evaluated as a normal argument." nil nil)
-(autoload 'load-sound-file "sound" "\
-Read in an audio-file and add it to the sound-alist.
+(autoload 'custom-set-face-update-spec "cus-face" "\
+Customize the FACE for display types matching DISPLAY, merging
+ in the new items from PLIST" nil nil)
-You can only play sound files if you are running on display 0 of the
-console of a machine with native sound support or running a NetAudio
-server and XEmacs has the necessary sound support compiled in.
+(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:
-The sound file must be in the Sun/NeXT U-LAW format, except on Linux,
-where .wav files are also supported by the sound card drivers." t nil)
+ (FACE SPEC [NOW [COMMENT]])
-(autoload 'load-default-sounds "sound" "\
-Load and install some sound files as beep-types, using
-`load-sound-file'. This only works if you're on display 0 of the
-console of a machine with native sound support or running a NetAudio
-server and XEmacs has the necessary sound support compiled in." t nil)
+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.
-;;;***
-\f
-;;;### (autoloads (ask-user-about-supersession-threat ask-user-about-lock) "userlock" "lisp/userlock.el")
+See `defface' for the format of SPEC." nil nil)
-(autoload 'ask-user-about-lock "userlock" "\
-Ask user what to do when he wants to edit FILE but it is locked by USER.
-This function has a choice of three things to do:
- do (signal 'file-locked (list FILE USER))
- to refrain from editing the file
- return t (grab the lock on the file)
- return nil (edit the file even though it is locked).
-You can rewrite it to use any criterion you like to choose which one to do." nil nil)
+(autoload 'custom-theme-set-faces "cus-face" "\
+Initialize faces according to settings specified by args.
+Records the settings as belonging to THEME.
-(autoload 'ask-user-about-supersession-threat "userlock" "\
-Ask a user who is about to modify an obsolete buffer what to do.
-This function has two choices: it can return, in which case the modification
-of the buffer will proceed, or it can (signal 'file-supersession (file)),
-in which case the proposed buffer modification will not be made.
+See `custom-set-faces' for a description of the arguments ARGS." nil nil)
-You can rewrite this to use any criterion you like to choose which one to do.
-The buffer in question is current when this function is called." 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)
-;;;***
-\f
-;;;### (autoloads (toggle-truncate-lines auto-view-mode view-major-mode view-mode view-minor-mode view-buffer-other-window view-file-other-window view-buffer view-file) "view-less" "lisp/view-less.el")
+(autoload 'custom-theme-reset-faces "cus-face" nil nil nil)
-(defvar view-minor-mode-map (let ((map (make-keymap))) (set-keymap-name map 'view-minor-mode-map) (suppress-keymap map) (define-key map "-" 'negative-argument) (define-key map " " 'scroll-up) (define-key map "f" 'scroll-up) (define-key map "b" 'scroll-down) (define-key map 'backspace 'scroll-down) (define-key map 'delete 'scroll-down) (define-key map "\r" 'view-scroll-lines-up) (define-key map "\n" 'view-scroll-lines-up) (define-key map "e" 'view-scroll-lines-up) (define-key map "j" 'view-scroll-lines-up) (define-key map "y" 'view-scroll-lines-down) (define-key map "k" 'view-scroll-lines-down) (define-key map "d" 'view-scroll-some-lines-up) (define-key map "u" 'view-scroll-some-lines-down) (define-key map "r" 'recenter) (define-key map "t" 'toggle-truncate-lines) (define-key map "N" 'view-buffer) (define-key map "E" 'view-file) (define-key map "P" 'view-buffer) (define-key map "!" 'shell-command) (define-key map "|" 'shell-command-on-region) (define-key map "=" 'what-line) (define-key map "?" 'view-search-backward) (define-key map "h" 'view-mode-describe) (define-key map "s" 'view-repeat-search) (define-key map "n" 'view-repeat-search) (define-key map "/" 'view-search-forward) (define-key map "\\" 'view-search-backward) (define-key map "g" 'view-goto-line) (define-key map "G" 'view-last-windowful) (define-key map "%" 'view-goto-percent) (define-key map "p" 'view-goto-percent) (define-key map "m" 'point-to-register) (define-key map "'" 'register-to-point) (define-key map "C" 'view-cleanup-backspaces) (define-key map "\ 3\ 3" 'view-quit) (define-key map "\18\11" 'view-quit-toggle-ro) (define-key map "q" 'view-quit) map))
+(autoload 'custom-reset-faces "cus-face" "\
+Reset the value of the face to values previously defined.
+Assosiate this setting with the 'user' theme.
-(defvar view-mode-map (let ((map (copy-keymap view-minor-mode-map))) (set-keymap-name map 'view-mode-map) map))
+ARGS is defined as for `custom-theme-reset-faces'" nil nil)
-(autoload 'view-file "view-less" "\
-Find FILE, enter view mode. With prefix arg OTHER-P, use other window." t nil)
+;;;***
+\f
+;;;### (autoloads (disassemble) "disass" "lisp\\disass.el")
-(autoload 'view-buffer "view-less" "\
-Switch to BUF, enter view mode. With prefix arg use other window." t nil)
+(autoload 'disassemble "disass" "\
+Print disassembled code for OBJECT in (optional) BUFFER.
+OBJECT can be a symbol defined as a function, or a function itself
+\(a lambda expression or a compiled-function object).
+If OBJECT is not already compiled, we compile it, but do not
+redefine OBJECT if it is a symbol." t nil)
-(autoload 'view-file-other-window "view-less" "\
-Find FILE in other window, and enter view mode." t nil)
+;;;***
+\f
+;;;### (autoloads (standard-display-european standard-display-underline standard-display-graphic standard-display-g1 standard-display-ascii standard-display-default standard-display-8bit make-display-table describe-current-display-table) "disp-table" "lisp\\disp-table.el")
-(autoload 'view-buffer-other-window "view-less" "\
-Switch to BUFFER in another window, and enter view mode." t nil)
+(autoload 'describe-current-display-table "disp-table" "\
+Describe the display table in use in the selected window and buffer." t nil)
-(autoload 'view-minor-mode "view-less" "\
-Minor mode for viewing text, with bindings like `less'.
-Commands are:
-\\<view-minor-mode-map>
-0..9 prefix args
-- prefix minus
-\\[scroll-up] page forward
-\\[scroll-down] page back
-\\[view-scroll-lines-up] scroll prefix-arg lines forward, default 1.
-\\[view-scroll-lines-down] scroll prefix-arg lines backward, default 1.
-\\[view-scroll-some-lines-down] scroll prefix-arg lines backward, default 10.
-\\[view-scroll-some-lines-up] scroll prefix-arg lines forward, default 10.
-\\[what-line] print line number
-\\[view-mode-describe] print this help message
-\\[view-search-forward] regexp search, uses previous string if you just hit RET
-\\[view-search-backward] as above but searches backward
-\\[view-repeat-search] repeat last search
-\\[view-goto-line] goto line prefix-arg, default 1
-\\[view-last-windowful] goto line prefix-arg, default last line
-\\[view-goto-percent] goto a position by percentage
-\\[toggle-truncate-lines] toggle truncate-lines
-\\[view-file] view another file
-\\[view-buffer] view another buffer
-\\[view-cleanup-backspaces] cleanup backspace constructions
-\\[shell-command] execute a shell command
-\\[shell-command-on-region] execute a shell command with the region as input
-\\[view-quit] exit view-mode, and bury the current buffer.
+(autoload 'make-display-table "disp-table" "\
+Return a new, empty display table." nil nil)
-If invoked with the optional (prefix) arg non-nil, view-mode cleans up
-backspace constructions.
+(autoload 'standard-display-8bit "disp-table" "\
+Display characters in the range L to H literally." nil nil)
-More precisely:
-\\{view-minor-mode-map}" t nil)
+(autoload 'standard-display-default "disp-table" "\
+Display characters in the range L to H using the default notation." nil nil)
-(autoload 'view-mode "view-less" "\
-View the current buffer using view-minor-mode. This exists to be 99.9%
-compatible with the implementations of `view-mode' in view.el and older
-versions of view-less.el." t nil)
+(autoload 'standard-display-ascii "disp-table" "\
+Display character C using printable string S." nil nil)
-(autoload 'view-major-mode "view-less" "\
-View the current buffer using view-mode, as a major mode.
-This function has a nonstandard name because `view-mode' is wrongly
-named but is like this for compatibility reasons." t nil)
+(autoload 'standard-display-g1 "disp-table" "\
+Display character C as character SC in the g1 character set.
+This function assumes that your terminal uses the SO/SI characters;
+it is meaningless for an X frame." nil nil)
-(autoload 'auto-view-mode "view-less" "\
-If the file of the current buffer is not writable, call view-mode.
-This is meant to be added to `find-file-hooks'." nil nil)
+(autoload 'standard-display-graphic "disp-table" "\
+Display character C as character GC in graphics character set.
+This function assumes VT100-compatible escapes; it is meaningless for an
+X frame." nil nil)
-(autoload 'toggle-truncate-lines "view-less" "\
-Toggles the values of truncate-lines.
-Positive prefix arg sets, negative disables." t nil)
+(autoload 'standard-display-underline "disp-table" "\
+Display character C as character UC plus underlining." nil nil)
+
+(autoload 'standard-display-european "disp-table" "\
+Toggle display of European characters encoded with ISO 8859.
+When enabled, characters in the range of 160 to 255 display not
+as octal escapes, but as accented characters.
+With prefix argument, enable European character display iff arg is positive." t nil)
;;;***
\f
-;;;### (autoloads (widget-minor-mode widget-browse-other-window widget-browse widget-browse-at) "wid-browse" "lisp/wid-browse.el")
-
-(autoload 'widget-browse-at "wid-browse" "\
-Browse the widget under point." t nil)
-
-(autoload 'widget-browse "wid-browse" "\
-Create a widget browser for WIDGET." t nil)
-
-(autoload 'widget-browse-other-window "wid-browse" "\
-Show widget browser for WIDGET in other window." t nil)
-
-(autoload 'widget-minor-mode "wid-browse" "\
-Togle minor mode for traversing widgets.
-With arg, turn widget mode on if and only if arg is positive." t nil)
+;;;### (autoloads nil "easymenu" "lisp\\easymenu.el")
;;;***
\f
-;;;### (autoloads (widget-delete widget-create widget-prompt-value) "wid-edit" "lisp/wid-edit.el")
-
-(autoload 'widget-prompt-value "wid-edit" "\
-Prompt for a value matching WIDGET, using PROMPT.
-The current value is assumed to be VALUE, unless UNBOUND is non-nil." nil nil)
+;;;### (autoloads (font-menu-weight-constructor font-menu-size-constructor font-menu-family-constructor reset-device-font-menus) "font-menu" "lisp\\font-menu.el")
-(autoload 'widget-create "wid-edit" "\
-Create widget of TYPE.
-The optional ARGS are additional keyword arguments." nil nil)
+(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)
-(autoload 'widget-delete "wid-edit" "\
-Delete WIDGET." nil nil)
+(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)
-;;;***
-\f
-;;;### (autoloads (x-reset-device-font-menus) "x-font-menu" "lisp/x-font-menu.el")
+(fset 'install-font-menus 'reset-device-font-menus)
-(autoload 'x-reset-device-font-menus "x-font-menu" "\
+(autoload 'reset-device-font-menus "font-menu" "\
Generates the `Font', `Size', and `Weight' submenus for the Options menu.
This is run the first time that a font-menu is needed for each device.
If you don't like the lazy invocation of this function, you can add it to
when they are selected for the first time. If you add fonts to your system,
or if you change your font path, you can call this to re-initialize the menus." nil nil)
-(defun* x-font-menu-font-data (face dcache) (let* ((case-fold-search t) (domain (if font-menu-this-frame-only-p (selected-frame) (selected-device))) (name (font-instance-name (face-font-instance face domain))) (truename (font-instance-truename (face-font-instance face domain (if (featurep 'mule) 'ascii)))) family size weight entry slant) (when (string-match x-font-regexp-foundry-and-family name) (setq family (capitalize (match-string 1 name))) (setq entry (vassoc family (aref dcache 0)))) (when (and (null entry) (string-match x-font-regexp-foundry-and-family truename)) (setq family (capitalize (match-string 1 truename))) (setq entry (vassoc family (aref dcache 0)))) (when (null entry) (return-from 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)))
+(autoload 'font-menu-family-constructor "font-menu" nil nil nil)
-;;;***
-\f
-;;;### (autoloads (x-win-init-sun) "x-win-sun" "lisp/x-win-sun.el")
+(autoload 'font-menu-size-constructor "font-menu" nil nil nil)
-(autoload 'x-win-init-sun "x-win-sun" nil nil nil)
+(autoload 'font-menu-weight-constructor "font-menu" nil nil nil)
;;;***
\f
-;;;### (autoloads (x-win-init-xfree86) "x-win-xfree86" "lisp/x-win-xfree86.el")
+;;;### (autoloads (x-font-build-cache font-default-size-for-device font-default-encoding-for-device font-default-registry-for-device font-default-family-for-device font-default-object-for-device font-default-font-for-device font-create-object) "font" "lisp\\font.el")
-(autoload 'x-win-init-xfree86 "x-win-xfree86" nil nil nil)
+(autoload 'font-create-object "font" nil nil nil)
+
+(autoload 'font-default-font-for-device "font" nil nil nil)
+
+(autoload 'font-default-object-for-device "font" nil nil nil)
+
+(autoload 'font-default-family-for-device "font" nil nil nil)
+
+(autoload 'font-default-registry-for-device "font" nil nil nil)
+
+(autoload 'font-default-encoding-for-device "font" nil nil nil)
+
+(autoload 'font-default-size-for-device "font" nil nil nil)
+
+(autoload 'x-font-build-cache "font" nil nil nil)
;;;***
-(provide 'Standard-autoloads)
+(provide 'lisp-autoloads)
(defun autoload-trim-file-name (file)
"Returns a relative pathname of FILE including the last directory."
(setq file (expand-file-name file))
- (file-relative-name file (file-name-directory
- (directory-file-name
- (file-name-directory file)))))
-
+ (replace-in-string
+ (file-relative-name file (file-name-directory
+ (directory-file-name
+ (file-name-directory file))))
+ "\\\\" "/"))
+
;;;###autoload
(defun generate-file-autoloads (file &optional funlist)
"Insert at point a loaddefs autoload section for FILE.
"Generic filename to put autoloads into.
Unless you are an XEmacs maintainer, it is probably unwise to change this.")
-(defvar autoload-target-directory "../lisp/prim/"
+(defvar autoload-target-directory "../lisp/"
"Directory to put autoload declaration file into.
Unless you know what you're doing, don't mess with this.")
data-directory)
"*File `update-file-autoloads' puts autoloads into.
A .el file can set this in its local variables section to make its
-autoloads go somewhere else.")
+autoloads go somewhere else.
+
+Note that `batch-update-directory' binds this variable to its own value,
+generally the file named `autoload-file-name' in the directory being
+updated.")
(defconst cusload-file-name "custom-load.el"
"Generic filename ot put custom loads into.
(defun update-autoloads-from-directory (dir)
"Update `generated-autoload-file' with all the current autoloads from DIR.
This runs `update-file-autoloads' on each .el file in DIR.
-Obsolete autoload entries for files that no longer exist are deleted."
+Obsolete autoload entries for files that no longer exist are deleted.
+Note that, if this function is called from `batch-update-directory',
+`generated-autoload-file' was rebound in that function."
(interactive "DUpdate autoloads for directory: ")
(setq dir (expand-file-name dir))
(let ((simple-dir (file-name-as-directory
(defvar autoload-package-name nil)
+;; #### this function is almost identical, but subtly different,
+;; from batch-update-autoloads. Steve, it's your responsibility to
+;; clean this up. The two should be merged, but I'm not sure what
+;; package-creation scripts out there might be using this. --ben
+
;;;###autoload
(defun batch-update-directory ()
- "Update the autoloads for the directory on the command line.
-Runs `update-file-autoloads' on each file in the given directory, must
-be used only with -batch and kills XEmacs on completion."
+ "Update the autoloads for the directories on the command line.
+Runs `update-file-autoloads' on each file in the given directory, and must
+be used only with -batch."
(unless noninteractive
(error "batch-update-directory is to be used only with -batch"))
(let ((defdir default-directory)
(enable-local-eval nil)) ; Don't query in batch mode.
(dolist (arg command-line-args-left)
(setq arg (expand-file-name arg defdir))
- (let ((generated-autoload-file (concat arg "/" autoload-file-name)))
+ (let ((generated-autoload-file (expand-file-name autoload-file-name
+ arg)))
(cond
((file-directory-p arg)
(message "Updating autoloads in directory %s..." arg)
)
(setq command-line-args-left nil)))
+;; #### i created the following. this one and the last should be merged into
+;; batch-update-autoloads. --ben
+
+;;;###autoload
+(defun batch-update-one-directory ()
+ "Update the autoloads for a single directory on the command line.
+Runs `update-file-autoloads' on each file in the given directory, and must
+be used only with -batch."
+ (unless noninteractive
+ (error "batch-update-directory is to be used only with -batch"))
+ (let ((defdir default-directory)
+ (enable-local-eval nil)) ; Don't query in batch mode.
+ (let ((arg (car command-line-args-left)))
+ (setq command-line-args-left (cdr command-line-args-left))
+ (setq arg (expand-file-name arg defdir))
+ (let ((generated-autoload-file (expand-file-name autoload-file-name
+ arg)))
+ (cond
+ ((file-directory-p arg)
+ (message "Updating autoloads in directory %s..." arg)
+ (update-autoloads-from-directory arg))
+ (t (error "No such file or directory: %s" arg)))
+ (fixup-autoload-buffer (concat (if autoload-package-name
+ autoload-package-name
+ (file-name-nondirectory arg))
+ "-autoloads"))
+ (save-some-buffers t))
+ ;; (message "Done")
+ )))
+
(provide 'autoload)
;;; autoload.el ends here
files-only))
buffer))
+(defun buffers-menu-omit-invisible-buffers (buf)
+ "For use as a value of `buffers-menu-omit-function'.
+Omits normally invisible buffers (those whose name begins with a space)."
+ (not (null (string-match "\\` " (buffer-name buf)))))
+
(provide 'buff-menu)
;;; buff-menu.el ends here
(set-buffer-major-mode buf))))
(push-window-configuration)
(set-buffer buf)
- (or norecord (record-buffer buf))
- (set-window-buffer (if (eq (selected-window) (minibuffer-window))
- (next-window (minibuffer-window))
- (selected-window))
- buf)
+ (set-window-buffer (last-nonminibuf-window) buf norecord)
buf))
(defun pop-to-buffer (bufname &optional not-this-window-p on-frame)
;; Bandaid
(when (featurep 'mime-setup)
;; No (defvaralias ...) so far. Thanks to "Didier Verna"
- ;; <verna@inf.enst.fr> for reporting my incorrect defvaraliasing of
+ ;; <didier@xemacs.org> for reporting my incorrect defvaraliasing of
;; `mime-editor/insert-tag'.
;; Thanks to Jens-Ulrik Holger Petersen
;; <petersen@kurims.kyoto-u.ac.jp> for suggesting the conditional
(progn
(mime-edit-insert-tag
"text"
- "plain"
+ "plain"
(concat
"\nContent-Disposition: attachment;"
" filename=\""
(goto-char (point-min))
(delete-matching-lines (build-report-delete))
(goto-char (point-min))
- (insert "> Contents of "
+ (insert "> Contents of "
build-report-make-output-file
"\n> keeping lines matching\n> \""
(build-report-keep)
(insert "> " build-report-make-output-file
" does not exist!\n\n"))
(buffer-string)))
-
+
(defun build-report-insert-installation-file (where all)
"Inserts the contents of the `build-report-installation-file'
created by the XEmacs Beta configure process."
(progn
(mime-edit-insert-tag
"text"
- "plain"
+ "plain"
(concat
"\nContent-Disposition: attachment;"
" filename=\""
(byte-compile-log
" all subforms of %s called for effect; deleted" form))
(and backwards
+ ;; Now optimize the rest of the forms. We need the return
+ ;; values. We already did the car.
+ (setcdr backwards
+ (mapcar 'byte-optimize-form (cdr backwards)))
(cons fn (nreverse backwards))))
(cons fn (mapcar 'byte-optimize-form (cdr form)))))
(setq form (byte-optimize-delay-constants-math form 1 '+))
(if (memq 0 form) (setq form (delq 0 (copy-sequence form))))
;;(setq form (byte-optimize-associative-two-args-math form))
+
(case (length (cdr form))
- ((0)
+ ((0) ; (+)
(condition-case ()
(eval form)
(error form)))
- ;; `add1' and `sub1' are a marginally fewer instructions
- ;; than `plus' and `minus', so use them when possible.
- ((2)
- (cond
- ((eq (nth 1 form) 1) `(1+ ,(nth 2 form))) ; (+ 1 x) --> (1+ x)
- ((eq (nth 2 form) 1) `(1+ ,(nth 1 form))) ; (+ x 1) --> (1+ x)
- ((eq (nth 1 form) -1) `(1- ,(nth 2 form))) ; (+ -1 x) --> (1- x)
- ((eq (nth 2 form) -1) `(1- ,(nth 1 form))) ; (+ x -1) --> (1- x)
- (t form)))
-
;; It is not safe to delete the function entirely
- ;; (actually, it would be safe if we know the sole arg
+ ;; (actually, it would be safe if we knew the sole arg
;; is not a marker).
- ;; ((null (cdr (cdr form))) (nth 1 form))
- (t form)))
+ ;; ((1)
+ ;; (nth 1 form))
+
+ ((2) ; (+ x y)
+ (byte-optimize-predicate
+ (cond
+ ;; `add1' and `sub1' are a marginally fewer instructions
+ ;; than `plus' and `minus', so use them when possible.
+ ((eq (nth 1 form) 1) `(1+ ,(nth 2 form))) ; (+ 1 x) --> (1+ x)
+ ((eq (nth 2 form) 1) `(1+ ,(nth 1 form))) ; (+ x 1) --> (1+ x)
+ ((eq (nth 1 form) -1) `(1- ,(nth 2 form))) ; (+ -1 x) --> (1- x)
+ ((eq (nth 2 form) -1) `(1- ,(nth 1 form))) ; (+ x -1) --> (1- x)
+ (t form))))
+
+ (t (byte-optimize-predicate form))))
(defun byte-optimize-minus (form)
;; Put constants at the end, except the last constant.
(setq form (byte-optimize-delay-constants-math form 2 '+))
- ;; Now only first and last element can be a number.
- (let ((last (car (reverse (nthcdr 3 form)))))
+ ;; Now only first and last element can be an integer.
+ (let ((last (last (nthcdr 3 form))))
(cond ((eq 0 last)
;; (- x y ... 0) --> (- x y ...)
(setq form (copy-sequence form))
(numberp last))
(setq form (nconc (list '- (- (nth 1 form) last) (nth 2 form))
(delq last (copy-sequence (nthcdr 3 form))))))))
- (setq form
-;;; It is not safe to delete the function entirely
-;;; (actually, it would be safe if we know the sole arg
-;;; is not a marker).
-;;; (if (eq (nth 2 form) 0)
-;;; (nth 1 form) ; (- x 0) --> x
- (byte-optimize-predicate
- (if (and (null (cdr (cdr (cdr form))))
- (eq (nth 1 form) 0)) ; (- 0 x) --> (- x)
- (cons (car form) (cdr (cdr form)))
- form))
-;;; )
- )
-
- ;; `add1' and `sub1' are a marginally fewer instructions than `plus'
- ;; and `minus', so use them when possible.
- (cond ((and (null (nthcdr 3 form))
- (eq (nth 2 form) 1))
- (list '1- (nth 1 form))) ; (- x 1) --> (1- x)
- ((and (null (nthcdr 3 form))
- (eq (nth 2 form) -1))
- (list '1+ (nth 1 form))) ; (- x -1) --> (1+ x)
- (t
- form))
- )
+
+ (case (length (cdr form))
+ ((0) ; (-)
+ (condition-case ()
+ (eval form)
+ (error form)))
+
+ ;; It is not safe to delete the function entirely
+ ;; (actually, it would be safe if we knew the sole arg
+ ;; is not a marker).
+ ;; ((1)
+ ;; (nth 1 form)
+
+ ((2) ; (+ x y)
+ (byte-optimize-predicate
+ (cond
+ ;; `add1' and `sub1' are a marginally fewer instructions than `plus'
+ ;; and `minus', so use them when possible.
+ ((eq (nth 2 form) 1) `(1- ,(nth 1 form))) ; (- x 1) --> (1- x)
+ ((eq (nth 2 form) -1) `(1+ ,(nth 1 form))) ; (- x -1) --> (1+ x)
+ ((eq (nth 1 form) 0) `(- ,(nth 2 form))) ; (- 0 x) --> (- x)
+ (t form))))
+
+ (t (byte-optimize-predicate form))))
(defun byte-optimize-multiply (form)
(setq form (byte-optimize-delay-constants-math form 1 '*))
- ;; If there is a constant in FORM, it is now the last element.
+ ;; If there is a constant integer in FORM, it is now the last element.
(cond ((null (cdr form)) 1)
;;; It is not safe to delete the function entirely
;;; (actually, it would be safe if we know the sole arg
;;; is not a marker or if it appears in other arithmetic).
;;; ((null (cdr (cdr form))) (nth 1 form))
- ((let ((last (car (reverse form))))
- (cond ((eq 0 last) (cons 'progn (cdr form)))
- ((eq 1 last) (delq 1 (copy-sequence form)))
- ((eq -1 last) (list '- (delq -1 (copy-sequence form))))
- ((and (eq 2 last)
- (memq t (mapcar 'symbolp (cdr form))))
- (prog1 (setq form (delq 2 (copy-sequence form)))
- (while (not (symbolp (car (setq form (cdr form))))))
- (setcar form (list '+ (car form) (car form)))))
- (form))))))
+ ((let ((last (last form)))
+ (byte-optimize-predicate
+ (cond ((eq 0 last) (cons 'progn (cdr form)))
+ ((eq 1 last) (delq 1 (copy-sequence form)))
+ ((eq -1 last) (list '- (delq -1 (copy-sequence form))))
+ ((and (eq 2 last)
+ (memq t (mapcar 'symbolp (cdr form))))
+ (prog1 (setq form (delq 2 (copy-sequence form)))
+ (while (not (symbolp (car (setq form (cdr form))))))
+ (setcar form (list '+ (car form) (car form)))))
+ (form)))))))
(defun byte-optimize-divide (form)
(setq form (byte-optimize-delay-constants-math form 2 '*))
- (let ((last (car (reverse (cdr (cdr form))))))
+ ;; If there is a constant integer in FORM, it is now the last element.
+ (let ((last (last (cdr (cdr form)))))
(if (numberp last)
(cond ((= (length form) 3)
(if (and (numberp (nth 1 form))
(cond
;;; ((null (cdr (cdr form)))
;;; (nth 1 form))
- ((eq (nth 1 form) 0)
- (append '(progn) (cdr (cdr form)) '(0)))
- ((eq last -1)
- (list '- (if (nthcdr 3 form)
- (butlast form)
- (nth 1 form))))
- (form))))
+ ((eq (nth 1 form) 0)
+ (append '(progn) (cdr (cdr form)) '(0)))
+ ((eq last -1)
+ (list '- (if (nthcdr 3 form)
+ (butlast form)
+ (nth 1 form))))
+ (form))))
(defun byte-optimize-logmumble (form)
(setq form (byte-optimize-delay-constants-math form 1 (car form)))
"Recompile every `.el' file in DIRECTORY that already has a `.elc' file.
Files in subdirectories of DIRECTORY are processed also."
(interactive "DByte force recompile (directory): ")
- (byte-recompile-directory directory nil t))
+ (byte-recompile-directory directory nil nil t))
;;;###autoload
(defun byte-recompile-directory (directory &optional arg norecursion force)
(error "`batch-byte-compile' is to be used only with -batch"))
(let ((error nil))
(while command-line-args-left
- (if (file-directory-p (expand-file-name (car command-line-args-left)))
- (let ((files (directory-files (car command-line-args-left)))
- source dest)
- (while files
- (if (and (string-match emacs-lisp-file-regexp (car files))
- (not (auto-save-file-name-p (car files)))
- (setq source (expand-file-name
- (car files)
- (car command-line-args-left)))
- (setq dest (byte-compile-dest-file source))
- (file-exists-p dest)
- (file-newer-than-file-p source dest))
- (if (null (batch-byte-compile-1 source))
- (setq error t)))
- (setq files (cdr files))))
- (if (null (batch-byte-compile-1 (car command-line-args-left)))
- (setq error t)))
- (setq command-line-args-left (cdr command-line-args-left)))
+ (if (null (batch-byte-compile-one-file))
+ (setq error t)))
(message "Done")
(kill-emacs (if error 1 0))))
+;;;###autoload
+(defun batch-byte-compile-one-file ()
+ "Run `byte-compile-file' on a single file remaining on the command line.
+Use this from the command line, with `-batch';
+it won't work in an interactive Emacs."
+ ;; command-line-args-left is what is left of the command line (from
+ ;; startup.el)
+ (defvar command-line-args-left) ;Avoid 'free variable' warning
+ (if (not noninteractive)
+ (error "`batch-byte-compile-one-file' is to be used only with -batch"))
+ (let (error
+ (file-to-process (car command-line-args-left)))
+ (setq command-line-args-left (cdr command-line-args-left))
+ (if (file-directory-p (expand-file-name file-to-process))
+ (let ((files (directory-files file-to-process))
+ source dest)
+ (while files
+ (if (and (string-match emacs-lisp-file-regexp (car files))
+ (not (auto-save-file-name-p (car files)))
+ (setq source (expand-file-name
+ (car files)
+ file-to-process))
+ (setq dest (byte-compile-dest-file source))
+ (file-exists-p dest)
+ (file-newer-than-file-p source dest))
+ (if (null (batch-byte-compile-1 source))
+ (setq error t)))
+ (setq files (cdr files)))
+ (null error))
+ (batch-byte-compile-1 file-to-process))))
+
(defun batch-byte-compile-1 (file)
(condition-case err
(progn (byte-compile-file file) t)
(defmacro defkeyword (x &optional doc)
(list* 'defconst x (list 'quote x) (and doc (list doc))))
-(defun keywordp (sym)
- (and (symbolp sym) (eq (aref (symbol-name sym) 0) ?\:) (set sym sym)))
+;; XEmacs change.
+;; We have built-in function.
+;;(defun keywordp (sym)
+;; (and (symbolp sym) (eq (aref (symbol-name sym) 0) ?\:) (set sym sym)))
(defun keyword-of (sym)
(or (keywordp sym) (keywordp (intern (format ":%s" sym)))))
;; XEmacs: our `get' groks DEFAULT.
(defalias 'get* 'get)
-
-(defun getf (plist property &optional default)
- "Search PLIST for property PROPERTY; return its value or DEFAULT.
-PLIST is a list of the sort returned by `symbol-plist'."
- (setplist '--cl-getf-symbol-- plist)
- (get '--cl-getf-symbol-- property default))
+(defalias 'getf 'plist-get)
(defun cl-set-getf (plist tag val)
(let ((p plist))
(while (and (cdr p) (not (eq (car (cdr p)) tag))) (setq p (cdr (cdr p))))
(and (cdr p) (progn (setcdr p (cdr (cdr (cdr p)))) t))))
-(defun cl-remprop (sym tag)
- "Remove from SYMBOL's plist the property PROP and its value."
- (let ((plist (symbol-plist sym)))
- (if (and plist (eq tag (car plist)))
- (progn (setplist sym (cdr (cdr plist))) t)
- (cl-do-remf plist tag))))
-(or (and (fboundp 'remprop) (subrp (symbol-function 'remprop)))
- (defalias 'remprop 'cl-remprop))
-
-
-
;;; Hash tables.
;; The `regular' Common Lisp hash-table stuff has been moved into C.
(run-hooks 'cl-hack-bytecomp-hook))
-;;; Symbols.
-
-(defvar *gensym-counter*)
-
-;;;###autoload
-(defun gensym (&optional arg)
- "Generate a new uninterned symbol.
-The name is made by appending a number to PREFIX, default \"G\"."
- (let ((prefix (if (stringp arg) arg "G"))
- (num (if (integerp arg) arg
- (prog1 *gensym-counter*
- (setq *gensym-counter* (1+ *gensym-counter*))))))
- (make-symbol (format "%s%d" prefix num))))
-
-;;;###autoload
-(defun gentemp (&optional arg)
- "Generate a new interned symbol with a unique name.
-The name is made by appending a number to PREFIX, default \"G\"."
- (let ((prefix (if (stringp arg) arg "G"))
- name)
- (while (intern-soft (setq name (format "%s%d" prefix *gensym-counter*)))
- (setq *gensym-counter* (1+ *gensym-counter*)))
- (intern name)))
-
-
;;; Program structure.
;;;###autoload
(define-compiler-macro get* (sym prop &optional default)
(list 'get sym prop default))
+(define-compiler-macro getf (sym prop &optional default)
+ (list 'plist-get sym prop default))
+
(define-compiler-macro typep (&whole form val type)
(if (cl-const-expr-p type)
(let ((res (cl-make-type-test val (cl-const-expr-val type))))
(defvar *gensym-counter* (* (logand (cl-random-time) 1023) 100))
+(defun gensym (&optional arg)
+ "Generate a new uninterned symbol.
+The name is made by appending a number to PREFIX, default \"G\"."
+ (let ((prefix (if (stringp arg) arg "G"))
+ (num (if (integerp arg) arg
+ (prog1 *gensym-counter*
+ (setq *gensym-counter* (1+ *gensym-counter*))))))
+ (make-symbol (format "%s%d" prefix num))))
+
+(defun gentemp (&optional arg)
+ "Generate a new interned symbol with a unique name.
+The name is made by appending a number to PREFIX, default \"G\"."
+ (let ((prefix (if (stringp arg) arg "G"))
+ name)
+ (while (intern-soft (setq name (format "%s%d" prefix *gensym-counter*)))
+ (setq *gensym-counter* (1+ *gensym-counter*)))
+ (intern name)))
;;; Numbers.
(interactive "zkeyboard-coding-system: ")
(get-coding-system coding-system) ; correctness check
(setq keyboard-coding-system coding-system)
+ (if (eq (device-type) 'tty)
+ (set-console-tty-input-coding-system
+ (device-console) keyboard-coding-system))
(redraw-modeline t))
(defsubst terminal-coding-system ()
(setq terminal-coding-system coding-system)
; #### should this affect all current tty consoles ?
(if (eq (device-type) 'tty)
- (set-console-tty-coding-system (device-console) terminal-coding-system))
+ (set-console-tty-output-coding-system
+ (device-console) terminal-coding-system))
(redraw-modeline t))
(defun set-pathname-coding-system (coding-system)
(custom-add-loads 'menu '("menubar-items"))
(custom-add-loads 'minibuffer '("simple" "minibuf"))
(custom-add-loads 'log-message '("simple"))
-(custom-add-loads 'environment '("frame" "keydefs" "minibuf" "modeline" "window-xemacs" "menubar" "gutter-items" "x-init" "toolbar-items" "cus-edit" "gnuserv" "sound"))
+(custom-add-loads 'environment '("frame" "keydefs" "minibuf" "modeline" "window-xemacs" "menubar" "gutter" "toolbar-items" "cus-edit" "gnuserv" "sound" "x-init"))
(custom-add-loads 'sound '("sound"))
(custom-add-loads 'pui '("package-ui"))
(custom-add-loads 'terminals '("gnuserv"))
(custom-add-loads 'custom-browse '("cus-edit"))
(custom-add-loads 'abbrev '("abbrev" "files"))
(custom-add-loads 'programming '("cus-edit"))
+(custom-add-loads 'printing '("printer"))
(custom-add-loads 'toolbar '("toolbar-items"))
(custom-add-loads 'dired '("files"))
(custom-add-loads 'dnd-debug '("dragdrop"))
(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 'gutter '("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" "gutter-items" "auto-show"))
-(custom-add-loads 'faces '("faces" "cus-edit" "font-lock" "font" "hyper-apropos" "info" "wid-edit"))
+(custom-add-loads 'display '("toolbar" "scrollbar" "auto-show"))
+(custom-add-loads 'faces '("faces" "font" "cus-edit" "font-lock" "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 'hyper-apropos '("hyper-apropos"))
-(custom-add-loads 'wp '("cus-edit"))
+(custom-add-loads 'wp '("printer" "cus-edit"))
(custom-add-loads 'vc '("files"))
(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" "cus-edit" "dragdrop"))
+(custom-add-loads 'editing '("simple" "abbrev" "fill" "mouse" "dragdrop" "cus-edit"))
(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" "font-menu"))
+(custom-add-loads 'x '("x-faces"))
(custom-add-loads 'buffers-tab '("gutter-items"))
;;; custom-load.el ends here
match one of the ITEM. The following REQ are defined:
`type' (the value of `window-system')
- Should be one of `x' or `tty'.
+ Should be one of `x', `mswindows', or `tty'.
`class' (the frame's color support)
Should be one of `color', `grayscale', or `mono'.
;; This file is dumped with XEmacs (when dialog boxes are compiled in).
+;; Dialog boxes are non-modal at the C level, but made modal at the
+;; Lisp level via hacks in functions such as yes-or-no-p-dialog-box
+;; below. Perhaps there should be truly modal dialog boxes
+;; implemented at the C level for safety. All code using dialog boxes
+;; should be careful to assume that the environment, for example the
+;; current buffer, might be completely different after returning from
+;; yes-or-no-p-dialog-box, but such code is difficult to write and test.
+
;;; Code:
(defun yes-or-no-p-dialog-box (prompt)
- "Ask user a \"y or n\" question with a popup dialog box.
-Returns t if answer is \"yes\".
+ "Ask user a yes-or-no question with a popup dialog box.
+Return t if the answer is \"yes\".
Takes one argument, which is the string to display to ask the question."
- (let ((echo-keystrokes 0)
- event)
+ (save-selected-frame
(popup-dialog-box
- ;; "Non-violent language please!" says Robin.
- (cons prompt '(["Yes" yes t] ["No" no t] nil ["Cancel" abort t])))
-; (cons prompt '(["Yes" yes t] ["No" no t] nil ["Abort" abort t])))
- (catch 'ynp-done
- (while t
- (setq event (next-command-event event))
- (cond ((and (misc-user-event-p event) (eq (event-object event) 'yes))
- (throw 'ynp-done t))
- ((and (misc-user-event-p event) (eq (event-object event) 'no))
- (throw 'ynp-done nil))
- ((and (misc-user-event-p event)
- (or (eq (event-object event) 'abort)
- (eq (event-object event) 'menu-no-selection-hook)))
- (signal 'quit nil))
- ((button-release-event-p event) ;; don't beep twice
- nil)
- (t
- (beep)
- (message "please answer the dialog box")))))))
+ (list prompt ["Yes" yes t] ["No" no t] nil ["Cancel" cancel t]))
+ (let (event)
+ (catch 'ynp-done
+ (while t
+ (setq event (next-command-event event))
+ (when (misc-user-event-p event)
+ (message "%s" (event-object event))
+ (case (event-object event)
+ ((yes) (throw 'ynp-done t))
+ ((no) (throw 'ynp-done nil))
+ ((cancel menu-no-selection-hook) (signal 'quit nil))))
+ (unless (button-release-event-p event) ; don't beep twice
+ (beep)
+ (message "please answer the dialog box")))))))
(defun yes-or-no-p-maybe-dialog-box (prompt)
"Ask user a yes-or-no question. Return t if answer is yes.
(yes-or-no-p-dialog-box prompt)
(y-or-n-p-minibuf prompt)))
-(if (fboundp 'popup-dialog-box)
- (progn
- (fset 'yes-or-no-p 'yes-or-no-p-maybe-dialog-box)
- (fset 'y-or-n-p 'y-or-n-p-maybe-dialog-box)))
+(when (fboundp 'popup-dialog-box)
+ (fset 'yes-or-no-p 'yes-or-no-p-maybe-dialog-box)
+ (fset 'y-or-n-p 'y-or-n-p-maybe-dialog-box))
;; this is call-compatible with the horribly-named FSF Emacs function
;; `x-popup-dialog'. I refuse to use that name.
nil)
(let ((str (apply 'format fmt args)))
(if (device-on-window-system-p)
- (get-dialog-box-response nil (list str (cons "OK" t)))
+ (get-dialog-box-response nil (list str (cons "%_OK" t)))
(display-message 'message str))
str)))
(apply 'message-box fmt args)
(apply 'message fmt args)))
+(defun make-dialog-box (&optional spec props parent)
+ "Create a frame suitable for use as a general dialog box.
+The frame is made a child of PARENT (defaults to the selected frame),
+and has additional properties PROPS, as well as `dialog-frame-plist'.
+SPEC is a string or glyph to be placed in the gutter. If INVISIBLE is
+non-nil then the frame is initially unmapped.
+Normally the created frame has no modelines, menubars, scrollbars,
+minibuffer or toolbars and is entirely covered by its gutter."
+ (or parent (setq parent (selected-frame)))
+ (let* ((ftop (frame-property parent 'top))
+ (fleft (frame-property parent 'left))
+ (fwidth (frame-pixel-width parent))
+ (fheight (frame-pixel-height parent))
+ (fonth (font-height (face-font 'default)))
+ (fontw (font-width (face-font 'default)))
+ (props (append props dialog-frame-plist))
+ (dfheight (plist-get props 'height))
+ (dfwidth (plist-get props 'width))
+ (unmapped (plist-get props 'initially-unmapped))
+ (gutter-spec spec)
+ (name (or (plist-get props 'name) "XEmacs"))
+ (frame nil))
+ (plist-remprop props 'initially-unmapped)
+ ;; allow the user to just provide a glyph
+ (when (glyphp spec)
+ (setq gutter-spec (copy-sequence "\n"))
+ (set-extent-begin-glyph (make-extent 0 1 gutter-spec) spec))
+ ;; under FVWM at least, if I don't specify the initial position,
+ ;; it ends up always at (0, 0). xwininfo doesn't tell me
+ ;; that there are any program-specified position hints, so
+ ;; it must be an FVWM bug. So just be smashing and position
+ ;; in the center of the selected frame.
+ (setq frame (make-frame
+ (append props
+ `(popup ,parent initially-unmapped t
+ menubar-visible-p nil
+ has-modeline-p nil
+ default-toolbar-visible-p nil
+ top-gutter-visible-p t
+ top-gutter-height ,(* dfheight fonth)
+ top-gutter ,gutter-spec
+ minibuffer none
+ name ,name
+ modeline-shadow-thickness 0
+ vertical-scrollbar-visible-p nil
+ horizontal-scrollbar-visible-p nil
+ unsplittable t
+ left ,(+ fleft (- (/ fwidth 2)
+ (/ (* dfwidth fontw)
+ 2)))
+ top ,(+ ftop (- (/ fheight 2)
+ (/ (* dfheight fonth)
+ 2)))))))
+ (set-face-foreground 'modeline [default foreground] frame)
+ (set-face-background 'modeline [default background] frame)
+ (unless unmapped (make-frame-visible frame))
+ frame))
+
+
;;; dialog.el ends here
"itimer" ; for vars auto-save-timeout and
; auto-gc-threshold
"itimer-autosave"
+ "printer"
(when-feature toolbar "toolbar")
(when-feature scrollbar "scrollbar")
(when-feature menubar "menubar")
;; Moved to sunpro-load.el - the default only for Sun.
;;(pureload "mime-setup")
;;; mule-load.el ends here
+ (when-feature (and gutter window-system) "gutter")
(when-feature window-system "gui")
(when-feature window-system "mode-motion")
(when-feature window-system "mouse")
- (when-feature window-system "select")
+ "select"
(when-feature dragdrop-api "dragdrop")
;; preload the X code, for faster startup.
(when-feature (and (not infodock)
(or x mswindows) menubar) "menubar-items")
(when-feature (and infodock (or x mswindows) menubar) "id-menus")
- (when-feature (and gutter menubar window-system) "gutter-items")
+ (when-feature (and gutter window-system) "gutter-items")
(when-feature x "x-faces")
(when-feature x "x-iso8859-1")
(when-feature x "x-mouse")
(when (file-readable-p parent-tag-file)
(push parent-tag-file result)))
;; tag-table-alist
- (let ((key (or buffer-file-name
- (concat default-directory (buffer-name))))
- expression)
+ (let* ((key (or buffer-file-name
+ (concat default-directory (buffer-name))))
+ (key (if (eq system-type 'windows-nt)
+ (replace-in-string key "\\\\" "/")
+ key))
+ expression)
(dolist (item tag-table-alist)
(setq expression (car item))
;; If the car of the alist item is a string, apply it as a regexp
(t
(setq tag-table-currently-matching-exact t)))
;; \_ in the tagname is used to indicate a symbol boundary.
- (setq exact-tagname (concat "\\_" tagname "\\_"))
+ (setq exact-tagname (format "\C-?\\_%s\\_\C-a\\|\\_%s\\_" tagname tagname))
(while (string-match "\\\\_" exact-tagname)
(aset exact-tagname (1- (match-end 0)) ?b))
(save-excursion
;; tag searches?
(while (re-search-forward tag-target nil t)
(and (save-match-data
- (looking-at "[^\n\C-?]*\C-?"))
+ (save-excursion
+ (goto-char (match-beginning 0))
+ (looking-at "[^\n\C-?]*\C-?")))
;; If we're looking for inexact matches, skip
;; exact matches since we've visited them
;; already.
(if next "more " "")
(if exact "matching" "containing")
tagname))
+ (beginning-of-line)
(search-forward "\C-?")
(setq file (expand-file-name (file-of-tag)
;; In XEmacs, this needs to be
(cons buf startpos))))
;;;###autoload
+(defun find-tag-at-point (tagname &optional other-window)
+ "*Find tag whose name contains TAGNAME.
+Identical to `find-tag' but does not prompt for tag when called interactively;
+instead, uses tag around or before point."
+ (interactive (if current-prefix-arg
+ '(nil nil)
+ (list (find-tag-default) nil)))
+ (find-tag tagname other-window))
+
+;;;###autoload
(defun find-tag (tagname &optional other-window)
"*Find tag whose name contains TAGNAME.
Selects the buffer that the tag is contained in
'(find-tag find-tag-other-window tags-loop-continue))))
(push-tag-mark))
(if other-window
- (pop-to-buffer tag-buf)
+ (pop-to-buffer tag-buf t)
(switch-to-buffer tag-buf))
(widen)
(push-mark)
;;;###autoload
(defun find-tag-other-window (tagname &optional next)
- "*Find tag whose name contains TAGNAME.
+ "*Find tag whose name contains TAGNAME, in another window.
Selects the buffer that the tag is contained in in another window
and puts point at its definition.
If TAGNAME is a null string, the expression in the buffer
nil 'append))
)
-;; New function with 20.1, suggested by Per Abrahamsen, coded by Kyle Jones.
+;; New function with 20.1, suggested by Per Abrahamsen, coded by Kyle
+;; Jones and Hrvoje Niksic.
(defun set-face-stipple (face pixmap &optional frame)
"Change the stipple pixmap of FACE to PIXMAP.
This is an Emacs compatibility function; consider using
set-face-background-pixmap instead.
PIXMAP should be a string, the name of a file of pixmap data.
-The directories listed in the `x-bitmap-file-path' variable are searched.
+The directories listed in the variables `x-bitmap-file-path' and
+`mswindows-bitmap-file-path' under X and MS Windows respectively
+are searched.
Alternatively, PIXMAP may be a list of the form (WIDTH HEIGHT
DATA) where WIDTH and HEIGHT are the size in pixels, and DATA is
in that frame; otherwise change each frame."
(while (not (find-face face))
(setq face (signal 'wrong-type-argument (list 'facep face))))
- (locate-file pixmap x-bitmap-file-path '(".xbm" ""))
- (while (cond ((stringp pixmap)
- (unless (file-readable-p pixmap)
- (setq pixmap `[xbm :file ,pixmap]))
- nil)
- ((and (consp pixmap) (= (length pixmap) 3))
- (setq pixmap `[xbm :data ,pixmap])
- nil)
- (t t))
- (setq pixmap (signal 'wrong-type-argument
- (list 'stipple-pixmap-p pixmap))))
- (while (and frame (not (framep frame)))
- (setq frame (signal 'wrong-type-argument (list 'framep frame))))
- (set-face-background-pixmap face pixmap frame))
+ (let ((bitmap-path (ecase (console-type)
+ (x x-bitmap-file-path)
+ (mswindows mswindows-bitmap-file-path)))
+ instantiator)
+ (while
+ (null
+ (setq instantiator
+ (cond ((stringp pixmap)
+ (let ((file (if (file-name-absolute-p pixmap)
+ pixmap
+ (locate-file pixmap bitmap-path
+ '(".xbm" "")))))
+ (and file
+ `[xbm :file ,file])))
+ ((and (listp pixmap) (= (length pixmap) 3))
+ `[xbm :data ,pixmap])
+ (t nil))))
+ ;; We're signaling a continuable error; let's make sure the
+ ;; function `stipple-pixmap-p' at least exists.
+ (flet ((stipple-pixmap-p (pixmap)
+ (or (stringp pixmap)
+ (and (listp pixmap) (= (length pixmap) 3)))))
+ (setq pixmap (signal 'wrong-type-argument
+ (list 'stipple-pixmap-p pixmap)))))
+ (while (and frame (not (framep frame)))
+ (setq frame (signal 'wrong-type-argument (list 'framep frame))))
+ (set-face-background-pixmap face instantiator frame)))
\f
;; Create the remaining standard faces now. This way, packages that we dump
(setq buf (current-buffer))))
(t
(kill-buffer buf)
- (signal (car data) (cdr data))))))
+ (signal (car data) (cdr data))))
+ ))
buf)))
\f
;; FSF has `insert-file-literally' and `find-file-literally' here.
("\\.lex\\'" . c-mode)
("\\.m\\'" . objc-mode)
("\\.oak\\'" . scheme-mode)
- ("\\.s?html?\\'" . html-mode)
+ ("\\.[sj]?html?\\'" . html-mode)
+ ("\\.jsp\\'" . html-mode)
+ ("\\.xml\\'" . xml-mode)
("\\.htm?l?3\\'" . html3-mode)
("\\.\\(?:sgml?\\|dtd\\)\\'" . sgml-mode)
("\\.c?ps\\'" . postscript-mode)
(buffer-local-variables)))
nil nil (buffer-name)))
t
- (if (and current-prefix-arg (featurep 'mule))
+ (if (and current-prefix-arg (featurep 'file-coding))
(read-coding-system "Coding system: "))))
(and (eq (current-buffer) mouse-grabbed-buffer)
(error "Can't write minibuffer window"))
(recursive-edit)
;; Return nil to ask about BUF again.
nil)
- "display the current buffer"))))
+ "%_Display Buffer"))))
(abbrevs-done
(and save-abbrevs abbrevs-changed
(progn
(lambda (d)
(mapcar
(lambda (f)
- (when (not (member f processed))
+ (when (and (not (member f processed)) (file-readable-p f))
(let (summary keystart keywords)
(setq processed (cons f processed))
(if (not finder-compile-keywords-quiet)
font-lock-preprocessor-face
font-lock-warning-face))
-;; #### There should be an emulation for the old font-lock-use-*
-;; settings!
-
(defface font-lock-comment-face
'((((class color) (background dark)) (:foreground "gray80"))
+ ;; blue4 is hardly different from black on windows.
+ (((class color) (background light) (type mswindows)) (:foreground "blue"))
(((class color) (background light)) (:foreground "blue4"))
(((class grayscale) (background light))
(:foreground "DimGray" :bold t :italic t))
(defface font-lock-keyword-face
'((((class color) (background dark)) (:foreground "cyan"))
+ ;; red4 is hardly different from black on windows.
+ (((class color) (background light) (type mswindows)) (:foreground "red"))
(((class color) (background light)) (:foreground "red4"))
(((class grayscale) (background light)) (:foreground "LightGray" :bold t))
(((class grayscale) (background dark)) (:foreground "DimGray" :bold t))
(defface font-lock-function-name-face
'((((class color) (background dark)) (:foreground "aquamarine"))
+ ;; brown4 is hardly different from black on windows.
+ ;; I changed it to red because IMO it's pointless and ugly to
+ ;; use a million slightly different colors for niggly syntactic
+ ;; differences. --ben
+ (((class color) (background light) (type mswindows)) (:foreground "red"))
(((class color) (background light)) (:foreground "brown4"))
(t (:bold t :underline t)))
"Font Lock mode face used to highlight function names."
((or (null maximum-size) (<= (buffer-size) maximum-size))
(font-lock-fontify-buffer))
(font-lock-verbose
- (lmessage 'command "Fontifying %s... buffer too big."
- (buffer-name)))))
+ (lprogress-display 'font-lock
+ "Fontifying %s... buffer too big." 'abort
+ (buffer-name)))))
(font-lock-fontified
(setq font-lock-fontified nil)
(remove-hook 'before-revert-hook 'font-lock-revert-setup t)
(condition-case nil
(save-excursion
(font-lock-fontify-region (point-min) (point-max)))
- (quit
+ (t
(setq aborted t)))
(or was-on ; turn it off if it was off.
(font-lock-mode 0)))
(set (make-local-variable 'font-lock-fontified) t)
(when (and aborted font-lock-verbose)
- (lmessage 'command "Fontifying %s... aborted." (buffer-name))))
+ (lprogress-display 'font-lock "Fontifying %s... aborted." 'abort (buffer-name))))
(run-hooks 'font-lock-after-fontify-buffer-hook))
(defun font-lock-default-unfontify-buffer ()
(defun font-lock-default-unfontify-region (beg end &optional maybe-loudly)
(when (and maybe-loudly font-lock-verbose
(>= (- end beg) font-lock-message-threshold))
- (lmessage 'progress "Fontifying %s..." (buffer-name)))
+ (lprogress-display 'font-lock "Fontifying %s..." 0 (buffer-name)))
(let ((modified (buffer-modified-p))
(buffer-undo-list t) (inhibit-read-only t)
buffer-file-name buffer-file-truename)
nil
(when (and font-lock-verbose
(>= (- end start) font-lock-message-threshold))
- (lmessage 'progress "Fontifying %s... (syntactically...)"
- (buffer-name)))
+ (lprogress-display 'font-lock "Fontifying %s... (syntactically)" 5
+ (buffer-name)))
(font-lock-unfontify-region start end loudly)
(goto-char start)
(if (> end (point-max)) (setq end (point-max)))
START should be at the beginning of a line."
(let ((loudly (and font-lock-verbose
(>= (- end start) font-lock-message-threshold))))
- (let ((case-fold-search font-lock-keywords-case-fold-search)
- (keywords (cdr (if (eq (car-safe font-lock-keywords) t)
- font-lock-keywords
- (font-lock-compile-keywords))))
- (bufname (buffer-name)) (count 0)
- keyword matcher highlights)
+ (let* ((case-fold-search font-lock-keywords-case-fold-search)
+ (keywords (cdr (if (eq (car-safe font-lock-keywords) t)
+ font-lock-keywords
+ (font-lock-compile-keywords))))
+ (bufname (buffer-name))
+ (progress 5) (old-progress 5)
+ (iter 0)
+ (nkeywords (length keywords))
+ keyword matcher highlights)
;;
;; Fontify each item in `font-lock-keywords' from `start' to `end'.
+ ;; In order to measure progress accurately we need to know how
+ ;; many keywords we have and how big the region is. Then progress
+ ;; is ((pos - start)/ (end - start) * nkeywords
+ ;; + iteration / nkeywords) * 100
(while keywords
- (when loudly (lmessage 'progress "Fontifying %s... (regexps..%s)"
- bufname
- (make-string (setq count (1+ count)) ?.)))
;;
;; Find an occurrence of `matcher' from `start' to `end'.
(setq keyword (car keywords) matcher (car keyword))
(if (stringp matcher)
(re-search-forward matcher end t)
(funcall matcher end)))
+ ;; calculate progress
+ (setq progress
+ (+ (/ (* (- (point) start) 95) (* (- end start) nkeywords))
+ (/ (* iter 95) nkeywords) 5))
+ (when (and loudly (> progress old-progress))
+ (lprogress-display 'font-lock "Fontifying %s... (regexps)"
+ progress bufname))
+ (setq old-progress progress)
;; Apply each highlight to this instance of `matcher', which may be
;; specific highlights or more keywords anchored to `matcher'.
(setq highlights (cdr keyword))
(and end (goto-char end)))
(font-lock-fontify-anchored-keywords (car highlights) end))
(setq highlights (cdr highlights))))
+ (setq iter (1+ iter))
(setq keywords (cdr keywords))))
- (if loudly (lmessage 'progress "Fontifying %s... done." (buffer-name)))))
+ (if loudly (lprogress-display 'font-lock "Fontifying %s... " 100 (buffer-name)))))
\f
;; Various functions.
(lazy-lock-after-fontify-buffer))))
;; If the buffer is about to be reverted, it won't be fontified afterward.
-(defun font-lock-revert-setup ()
- (setq font-lock-fontified nil))
+;(defun font-lock-revert-setup ()
+; (setq font-lock-fontified nil))
;; If the buffer has just been reverted, normally that turns off
;; Font Lock mode. So turn the mode back on if necessary.
;; sb 1999-03-03 -- The above comment no longer appears to be operative as
;; the first call to normal-mode *will* restore the font-lock state and
;; this call forces a second font-locking to occur when reverting a buffer,
-;; which is wasteful at best.
-;(defalias 'font-lock-revert-cleanup 'turn-on-font-lock)
-(defun font-lock-revert-cleanup ())
+;; which is wasteful at best.
+;;(defun font-lock-revert-cleanup ())
+
+;; <andy@xemacs.org> 12-10-99. This still does not work right, I think
+;; after change functions will still get us. The simplest thing to do
+;; is unconditionally turn-off font-lock before revert (and thus nuke
+;; all hooks) and then turn it on again afterwards. This also happens
+;; to be much faster because fontifying from scratch is better than
+;; trying to do incremental changes for the whole buffer.
+
+(defalias 'font-lock-revert-cleanup 'turn-on-font-lock)
+(defalias 'font-lock-revert-setup 'turn-off-font-lock)
\f
;; Various functions.
'("\\<\\(false\\|null\\|true\\)\\>" (1 font-lock-keyword-face))
;; Class names:
- (list (concat "\\<class\\>\\s *" java-font-lock-identifier-regexp)
- 1 'font-lock-function-name-face)
+ (list (concat "\\<\\(class\\|interface\\)\\>\\s *"
+ java-font-lock-identifier-regexp)
+ 2 'font-lock-function-name-face)
;; Package declarations:
(list (concat "\\<\\(package\\|import\\)\\>\\s *"
(list
- ;; Java doc tags
+ ;; Javadoc tags
'("@\\(author\\|exception\\|throws\\|deprecated\\|param\\|return\\|see\\|since\\|version\\)\\s "
0 font-lock-keyword-face t)
1 'font-lock-variable-name-face t)
;; Doc tag - Exception types
- (list (concat "@exception\\s +"
+ (list (concat "@\\(exception\\|throws\\)\\s +"
java-font-lock-identifier-regexp)
- '(1 (if (equal (char-after (match-end 0)) ?.)
+ '(2 (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)
- (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 - Cross-references, usually to methods
'("@see\\s +\\(\\S *[^][ \t\n\r\f(){},.;:]\\)"
1 font-lock-function-name-face t)
+ ;; Doc tag - docRoot (1.3)
+ '("\\({ *@docRoot *}\\)"
+ 0 font-lock-keyword-face t)
+ ;; Doc tag - beaninfo, unofficial but widely used, even by Sun
+ '("\\(@beaninfo\\)"
+ 0 font-lock-keyword-face t)
;; Doc tag - Links
- '("{@link\\s +\\([^}]*\\)}"
+ '("{ *@link\\s +\\([^}]+\\)}"
0 font-lock-keyword-face t)
;; Doc tag - Links
- '("{@link\\s +\\(\\S +\\s +\\S +\\)}"
+ '("{ *@link\\s +\\(\\(\\S +\\)\\|\\(\\S +\\s +\\S +\\)\\) *}"
1 font-lock-function-name-face t)
)))
((x) . 10))) t)
"Scale factor used in defining font sizes.")
-(defun vassoc (key valist)
- "Search VALIST for a vector whose first element is equal to KEY.
-See also `assoc'."
- ;; by Stig@hackvan.com
- (let (el)
- (catch 'done
- (while (setq el (pop valist))
- (and (equal key (aref el 0))
- (throw 'done el))))))
-
;; only call XListFonts (and parse) once per device.
;; ( (device . [parsed-list-fonts family-menu size-menu weight-menu]) ...)
(defvar device-fonts-cache nil)
(message "Getting list of fonts from server... done.")))
(defun font-menu-split-long-menu (menu)
- "Split MENU according to `font-menu-max-items'."
+ "Split MENU according to `font-menu-max-items' and add accelerator specs."
(let ((len (length menu)))
(if (or (null font-menu-max-items)
(null (featurep 'lisp-float-type))
(<= len font-menu-max-items))
- menu
+ (submenu-generate-accelerator-spec menu)
;; Submenu is max 2 entries longer than menu, never shorter, number of
;; entries in submenus differ by at most one (with longer submenus first)
(let* ((outer (floor (sqrt len)))
(setq result
(cons (cons (if (stringp font-menu-submenu-name-format)
(format font-menu-submenu-name-format
- (aref (car sub) 0) (aref to 0))
+ (menu-item-strip-accelerator-spec
+ (aref (car sub) 0))
+ (menu-item-strip-accelerator-spec
+ (aref to 0)))
(funcall font-menu-submenu-name-format
- (aref (car sub) 0) (aref to 0)))
- sub)
+ (menu-item-strip-accelerator-spec
+ (aref (car sub) 0))
+ (menu-item-strip-accelerator-spec
+ (aref to 0))))
+ (submenu-generate-accelerator-spec sub))
result)
rest (1+ rest))
(if (= rest outer) (setq inner (1+ inner)))))
- result))))
+ (submenu-generate-accelerator-spec result)))))
;;;###autoload
(defun font-menu-family-constructor (ignored)
(font-menu-split-long-menu
(mapcar
(lambda (item)
- (setq f (aref item 0)
+ (setq f (menu-item-strip-accelerator-spec (aref item 0))
entry (vassoc f (aref dcache 0)))
(if (and (or (member weight (aref entry 1))
;; mswindows often allows any weight
(select-toggle-menu-item item)
(deselect-toggle-menu-item item))
item)
- (aref dcache 2)))))
+ (submenu-generate-accelerator-spec (aref dcache 2))))))
;;;###autoload
(defun font-menu-weight-constructor (ignored)
(select-toggle-menu-item item)
(deselect-toggle-menu-item item))
item)
- (aref dcache 3)))))
+ (submenu-generate-accelerator-spec (aref dcache 3))))))
\f
;;; Changing font sizes
(font-data (font-menu-font-data 'default dcache))
(from-family (aref font-data 1))
(from-size (aref font-data 2))
- (from-weight (aref font-data 3))
+ (from-weight (aref font-data 3))
(from-slant (aref font-data 4))
- (face-list-to-change (delq 'default (face-list)))
- new-default-face-font
- new-props)
+ (face-list-to-change (delq 'default (face-list)))
+ new-default-face-font)
(unless from-family
(signal 'error '("couldn't parse font name for default face")))
(when weight
(and font-menu-this-frame-only-p (selected-frame)))
;; OK Let Customize do it.
(custom-set-face-update-spec 'default
- (list (list 'type (device-type)))
- (list :family family
- :size (concat
- (int-to-string
- (/ (or size from-size)
- (specifier-instance font-menu-size-scaling
- (selected-device))))
- "pt")))
+ (list (list 'type (device-type)))
+ (list :family family
+ :size (concat
+ (int-to-string
+ (/ (or size from-size)
+ (specifier-instance font-menu-size-scaling
+ (selected-device))))
+ "pt")))
(message "Font %s" (face-font-name 'default)))))
Emacs uses this to avoid overriding explicit moves and resizings from
the user during startup."
(setq plist (canonicalize-lax-plist (copy-sequence plist)))
- (mapcar #'(lambda (propname)
- (if (lax-plist-member plist propname)
+ (mapcar #'(lambda (property)
+ (if (lax-plist-member plist property)
(progn
(setq frame-initial-geometry-arguments
- (cons propname
- (cons (lax-plist-get plist propname)
+ (cons property
+ (cons (lax-plist-get plist property)
frame-initial-geometry-arguments)))
- (setq plist (lax-plist-remprop plist propname)))))
+ (setq plist (lax-plist-remprop plist property)))))
'(height width top left user-size user-position))
plist)
;;; gutter-items.el --- Gutter content for XEmacs.
;; Copyright (C) 1999 Free Software Foundation, Inc.
-;; Copyright (C) 1999 Andy Piper.
+;; Copyright (C) 1999, 2000 Andy Piper.
;; Maintainer: XEmacs Development Team
;; Keywords: frames, extensions, internal, dumped
;; Boston, MA 02111-1307, USA.
;; Some of this is taken from the buffer-menu stuff in menubar-items.el
-;; and the custom specs in toolbar.el.
-(defgroup gutter nil
- "Input from the gutters."
- :group 'environment)
+;;; The Buffers tab
+
+(defgroup buffers-tab nil
+ "Customization of `Buffers' tab."
+ :group 'gutter)
(defvar gutter-buffers-tab nil
"A tab widget in the gutter for displaying buffers.
Do not set this. Use `glyph-image-instance' and
`set-image-instance-property' to change the properties of the tab.")
-(defcustom gutter-visible-p
- (specifier-instance default-gutter-visible-p)
- "Whether the default gutter is globally visible. This option can be
-customized through the options menu."
- :group 'display
+(defcustom gutter-buffers-tab-visible-p
+ (gutter-element-visible-p default-gutter-visible-p 'buffers-tab)
+ "Whether the buffers tab is globally visible.
+This option should be set through the options menu."
+ :group 'buffers-tab
:type 'boolean
:set #'(lambda (var val)
- (set-specifier default-gutter-visible-p val)
- (setq gutter-visible-p val)
- (when gutter-buffers-tab (update-tab-in-gutter))))
-
-(defcustom default-gutter-position
- (default-gutter-position)
- "The location of the default gutter. It can be 'top, 'bottom, 'left or
-'right. This option can be customized through the options menu."
- :group 'display
- :type '(choice (const :tag "top" 'top)
- (const :tag "bottom" 'bottom)
- (const :tag "left" 'left)
- (const :tag "right" 'right))
- :set #'(lambda (var val)
- (set-default-gutter-position val)
- (setq default-gutter-position val)
- (when gutter-buffers-tab (update-tab-in-gutter))))
-
-;;; The Buffers tab
-
-(defgroup buffers-tab nil
- "Customization of `Buffers' tab."
- :group 'gutter)
+ (set-gutter-element-visible-p default-gutter-visible-p
+ 'buffers-tab val)
+ (setq gutter-buffers-tab-visible-p val)))
(defvar gutter-buffers-tab-orientation 'top
"Where the buffers tab currently is. Do not set this.")
function)
:group 'buffers-tab)
+(defcustom buffers-tab-sort-function nil
+ "*If non-nil, a function specifying the buffers to select from the
+buffers tab. This is passed the buffer list and returns the list in the
+order desired for the tab widget. The default value `nil' leaves the
+list in `buffer-list' order (usual most-recently-selected-first)."
+
+ :type '(choice (const :tag "None" nil)
+ function)
+ :group 'buffers-tab)
+
(make-face 'buffers-tab "Face for displaying the buffers tab.")
(set-face-parent 'buffers-tab 'default)
(defun buffers-tab-switch-to-buffer (buffer)
"For use as a value for `buffers-tab-switch-to-buffer-function'."
(unless (eq (window-buffer) buffer)
+ ;; this used to add the norecord flag to both calls below.
+ ;; this is bogus because it is a pervasive assumption in XEmacs
+ ;; that the current buffer is at the front of the buffers list.
+ ;; for example, select an item and then do M-C-l
+ ;; (switch-to-other-buffer). Things get way confused.
+ ;;
+ ;; Andy, if you want to maintain the current look, you must
+ ;; *uncouple* the gutter order and buffers order.
(if (> (length (windows-of-buffer buffer)) 0)
(select-window (car (windows-of-buffer buffer)))
- (switch-to-buffer buffer t))))
+ (switch-to-buffer buffer))))
(defun select-buffers-tab-buffers-by-mode (buf1 buf2)
"For use as a value of `buffers-tab-selection-function'.
(buffer-name buffer))))
(defsubst build-buffers-tab-internal (buffers)
- (let (line)
+ (let ((selected t))
(mapcar
#'(lambda (buffer)
- (setq line (funcall buffers-tab-format-buffer-line-function
- buffer))
- (vector line (list buffers-tab-switch-to-buffer-function
- (buffer-name buffer))))
+ (prog1
+ (vector
+ (funcall buffers-tab-format-buffer-line-function
+ buffer)
+ (list buffers-tab-switch-to-buffer-function
+ (buffer-name buffer))
+ :selected selected)
+ (when selected (setq selected nil))))
buffers)))
-(defun buffers-tab-items (&optional in-deletion frame)
+;;; #### SJT I'd really like this function to have just two hooks: (1) the
+;;; buffer filter list and (2) a sort function list. Both should be lists
+;;; of functions. Each filter takes two arguments: a buffer and a model
+;;; buffer. (The model buffer argument allows selecting according to the
+;;; mode or directory of that buffer.) The filter returns t if the buffer
+;;; should be listed and nil otherwise. Effectively the filter amounts to
+;;; the conjuction of the filter list. (Optionally the filter could take a
+;;; frame instead of a buffer or generalize to a locale as in a specifier?)
+;;; The filtering is done this way to preserve the ordering imposed by
+;;; `buffer-list'. In addition, the in-deletion argument will be used the
+;;; same way as in the current design.
+;;; The list is checked for length and pruned according to least-recently-
+;;; selected. (Optionally there could be some kind of sort function here,
+;;; too.)
+;;; Finally the list is sorted to gutter display order, and the tab data
+;;; structure is created and returned.
+;;; #### Docstring isn't very well expressed.
+(defun buffers-tab-items (&optional in-deletion frame force-selection)
"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
(save-match-data
(let* ((buffers (delete-if buffers-tab-omit-function (buffer-list frame)))
(first-buf (car buffers)))
+ ;; maybe force the selected window
+ (when (and force-selection
+ (not in-deletion)
+ (not (eq first-buf (window-buffer (selected-window frame)))))
+ (setq buffers (cons (window-buffer (selected-window frame))
+ (delq first-buf 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
+ ;; select buffers in group (default is by mode)
(when buffers-tab-selection-function
(delete-if-not #'(lambda (buf)
(funcall buffers-tab-selection-function
first-buf buf)) buffers))
+ ;; maybe shorten list of 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))
+ ;; sort buffers in group (default is most-recently-selected)
+ (when buffers-tab-sort-function
+ (setq buffers (funcall buffers-tab-sort-function buffers)))
+ ;; convert list of buffers to list of structures used by tab widget
(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."
(setq gutter-buffers-tab-orientation (default-gutter-position))
- (let ((gutter-string ""))
+ (let ((gutter-string (copy-sequence "\n")))
(unless gutter-buffers-tab-extent
- (setq gutter-buffers-tab-extent (make-extent 0 0 gutter-string)))
+ (setq gutter-buffers-tab-extent (make-extent 0 1 gutter-string)))
(set-extent-begin-glyph
gutter-buffers-tab-extent
(setq gutter-buffers-tab
(make-glyph
(vector 'tab-control :descriptor "Buffers" :face buffers-tab-face
:orientation gutter-buffers-tab-orientation
- :properties (list :items (buffers-tab-items))))))
- ;; This looks better than a 3d border
- (mapcar '(lambda (x)
- (when (valid-image-instantiator-format-p 'tab-control x)
- (set-specifier default-gutter-border-width 0 'global x)
- (set-specifier top-gutter nil 'global x)
- (set-specifier bottom-gutter nil 'global x)
- (set-specifier left-gutter nil 'global x)
- (set-specifier right-gutter nil 'global x)
- (set-specifier left-gutter-width 0 'global x)
- (set-specifier right-gutter-width 0 'global x)
- (cond ((eq gutter-buffers-tab-orientation 'top)
- (set-specifier top-gutter gutter-string 'global x))
- ((eq gutter-buffers-tab-orientation 'bottom)
- (set-specifier bottom-gutter gutter-string 'global x))
- ((eq gutter-buffers-tab-orientation 'left)
- (set-specifier left-gutter gutter-string 'global x)
- (set-specifier left-gutter-width
- (glyph-width gutter-buffers-tab)
- 'global x))
- ((eq gutter-buffers-tab-orientation 'right)
- (set-specifier right-gutter gutter-string 'global x)
- (set-specifier right-gutter-width
- (glyph-width gutter-buffers-tab)
- 'global x))
- )))
- (console-type-list))))
-
-(defun update-tab-in-gutter (&optional frame-or-buffer)
+ (if (or (eq gutter-buffers-tab-orientation 'top)
+ (eq gutter-buffers-tab-orientation 'bottom))
+ :pixel-width :pixel-height)
+ (if (or (eq gutter-buffers-tab-orientation 'top)
+ (eq gutter-buffers-tab-orientation 'bottom))
+ '(gutter-pixel-width) '(gutter-pixel-height))
+ :properties (list :items (buffers-tab-items nil nil t))))))
+
+ ;; Nuke all existing tabs
+ (remove-gutter-element top-gutter 'buffers-tab)
+ (remove-gutter-element bottom-gutter 'buffers-tab)
+ (remove-gutter-element left-gutter 'buffers-tab)
+ (remove-gutter-element right-gutter 'buffers-tab)
+ ;; Put tabs into all devices that will be able to display them
+ (mapcar
+ #'(lambda (x)
+ (when (valid-image-instantiator-format-p 'tab-control x)
+ (cond ((eq gutter-buffers-tab-orientation 'top)
+ ;; This looks better than a 3d border
+ (set-specifier top-gutter-border-width 0 'global x)
+ (set-gutter-element top-gutter 'buffers-tab
+ gutter-string 'global x))
+ ((eq gutter-buffers-tab-orientation 'bottom)
+ (set-specifier bottom-gutter-border-width 0 'global x)
+ (set-gutter-element bottom-gutter 'buffers-tab
+ gutter-string 'global x))
+ ((eq gutter-buffers-tab-orientation 'left)
+ (set-specifier left-gutter-border-width 0 'global x)
+ (set-gutter-element left-gutter 'buffers-tab
+ gutter-string 'global x)
+ (set-specifier left-gutter-width
+ (glyph-width gutter-buffers-tab)
+ 'global x))
+ ((eq gutter-buffers-tab-orientation 'right)
+ (set-specifier right-gutter-border-width 0 'global x)
+ (set-gutter-element right-gutter 'buffers-tab
+ gutter-string 'global x)
+ (set-specifier right-gutter-width
+ (glyph-width gutter-buffers-tab)
+ 'global x))
+ )))
+ (console-type-list))))
+
+(defun update-tab-in-gutter (&optional frame-or-buffer force-selection)
"Update the tab control in the gutter area."
(let ((locale (if (framep frame-or-buffer) frame-or-buffer)))
- (when (specifier-instance default-gutter-visible-p locale)
- (unless (and gutter-buffers-tab
- (eq (default-gutter-position)
- gutter-buffers-tab-orientation))
- (add-tab-to-gutter))
- (when (valid-image-instantiator-format-p 'tab-control locale)
- (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)))))))
+ ;; dedicated frames don't get tabs
+ (unless (and (framep locale)
+ (window-dedicated-p (frame-selected-window locale)))
+ (when (specifier-instance default-gutter-visible-p locale)
+ (unless (and gutter-buffers-tab
+ (eq (default-gutter-position)
+ gutter-buffers-tab-orientation))
+ (add-tab-to-gutter))
+ (when (valid-image-instantiator-format-p 'tab-control locale)
+ (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 force-selection))))))))
(defun remove-buffer-from-gutter-tab ()
"Remove the current buffer from the tab control in the gutter area."
(get-buffer-create "*scratch*")))))
(set-image-instance-property inst :items buffers))))
+;; A myriad of different update hooks all doing slightly different things
(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)
+(add-hook 'create-frame-hook
+ #'(lambda (frame)
+ (when gutter-buffers-tab (update-tab-in-gutter frame t))))
+(add-hook 'buffer-list-changed-hook 'update-tab-in-gutter)
+(add-hook 'default-gutter-position-changed-hook
+ #'(lambda ()
+ (when gutter-buffers-tab (update-tab-in-gutter))))
+(add-hook 'gutter-element-visibility-changed-hook
+ #'(lambda (prop visible-p)
+ (when (and (eq prop 'buffers-tab) visible-p)
+ (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.")
+(defcustom progress-display-use-echo-area nil
+ "*Whether progress gauge display should display in the echo area.
+If NIL then progress gauges will be displayed with whatever native widgets
+are available on the current console. If non-NIL then progress display will be
+textual and displayed in the echo area."
+ :type 'boolean
+ :group 'gutter)
(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))
+(defvar progress-display-popup-period 0.5
+ "The time that the progress gauge should remain up after completion")
;; private variables
-(defvar progress-gauge-glyph
- (make-glyph
- (vector 'progress-gauge
- :pixel-height (- progress-glyph-height 8)
- :pixel-width 50
- :descriptor "Progress")))
-
(defvar progress-text-glyph
(make-glyph [string :data ""]))
-(defvar progress-layout-glyph
+(defvar progress-layout-glyph nil)
+(defvar progress-gauge-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)))))))))
+ `[progress-gauge
+ :pixel-height (- progress-glyph-height 8)
+ :pixel-width 250
+ :descriptor "Progress"]))
+
+(defun set-progress-display-style (style)
+ "Control the appearance of the progress gauge.
+If STYLE is 'large, the default, then the progress-display text is
+displayed above the gauge itself. If STYLE is 'small then the gauge
+and text are arranged side-by-side."
+ (cond
+ ((eq style 'small)
+ (setq progress-glyph-height 24)
+ (setq progress-layout-glyph
+ (make-glyph
+ `[layout
+ :orientation horizontal
+ :items (,progress-gauge-glyph
+ [button
+ :pixel-height (- progress-glyph-height 8)
+ ;; 'quit is special and acts "asynchronously".
+ :descriptor "Stop" :callback 'quit]
+ ,progress-text-glyph)])))
+ (t
+ (setq progress-glyph-height 32)
+ (setq progress-layout-glyph
+ (make-glyph
+ `[layout
+ :orientation vertical :justify left
+ :items (,progress-text-glyph
+ [layout
+ :pixel-height (eval progress-glyph-height)
+ :orientation horizontal
+ :items (,progress-gauge-glyph
+ [button
+ :pixel-height (- progress-glyph-height 8)
+ :descriptor " Stop "
+ ;; 'quit is special and acts "asynchronously".
+ :callback 'quit])])])))))
+
+(defcustom progress-display-style 'large
+ "*Control the appearance of the progress gauge.
+If 'large, the default, then the progress-display text is displayed
+above the gauge itself. If 'small then the gauge and text are arranged
+side-by-side."
+ :group 'gutter
+ :type '(choice (const :tag "large" large)
+ (const :tag "small" small))
+ :set #'(lambda (var val)
+ (set-progress-display-style val)))
+
+(defvar progress-stack nil
+ "An alist of label/string pairs representing active progress gauges.
+The first element in the list is currently displayed in the gutter area.
+Do not modify this directly--use the `progress-display' or
+`display-progress-display'/`clear-progress-display' functions.")
(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)
+ `[layout :orientation vertical :justify left
+ :items (,progress-text-glyph
+ [layout
+ :pixel-height progress-glyph-height
+ :orientation horizontal])]))
(defun progress-displayed-p (&optional return-string frame)
"Return a non-nil value if a progress gauge is presently displayed in the
;;; 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,
+(defun clear-progress-display (&optional label frame no-restore)
+ "Remove any progress gauge with LABEL from the progress gauge-stack,
erasing it from the gutter area if it's currently displayed there.
If a message remains at the head of the progress-stack and NO-RESTORE
is nil, it will be displayed. The string which remains in the gutter
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 (or (not (valid-image-instantiator-format-p 'progress-gauge frame))
+ progress-display-use-echo-area)
+ (clear-message label frame nil no-restore)
+ (or frame (setq frame (selected-frame)))
+ (remove-progress-display label frame)
+ (let ((inhibit-read-only t)
+ (zmacs-region-stays zmacs-region-stays)) ; preserve from change
+ (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-display oldmsg nil frame)
+ oldmsg)
+ ;; nothing to display so get rid of the gauge
+ (set-specifier bottom-gutter-border-width 0 frame)
+ (set-gutter-element-visible-p bottom-gutter-visible-p
+ 'progress nil frame)))))
+
+(defun progress-display-clear-when-idle (&optional label)
+ (add-one-shot-hook 'pre-idle-hook
+ `(lambda ()
+ (clear-progress-display ',label))))
+
+(defun remove-progress-display (&optional label frame)
;; If label is nil, we want to remove all matching progress gauges.
(while (and progress-stack
(or (null label) ; null label means clear whole stack
(setcdr s (cdr (cdr s))))
(setq s (cdr s)))))))
-(defun append-progress (label message &optional value frame)
+(defun progress-display-dispatch-non-command-events ()
+ ;; don't allow errors to hose things
+ (condition-case t
+ ;; (sit-for 0) is too agressive and cause more display than we
+ ;; want.
+ (dispatch-non-command-events)
+ nil))
+
+(defun append-progress-display (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))
(if (eq label (car top))
(progn
(setcdr top message)
- (if (eq tmsg message)
+ (if (equal 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))))
+ (glyph-image-instance progress-gauge-glyph
+ (frame-selected-window frame))
+ :value value)
+ (raw-append-progress-display message value frame))
+ (redisplay-gutter-area))
(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)
+ (raw-append-progress-display message value frame))
+ (progress-display-dispatch-non-command-events)
+ ;; either get command events or sit waiting for them
+ (when (eq value 100)
+; (sit-for progress-display-popup-period nil)
+ (clear-progress-display label))))
+
+(defun abort-progress-display (label message &optional frame)
+ (if (or (not (valid-image-instantiator-format-p 'progress-gauge frame))
+ progress-display-use-echo-area)
+ (display-message label (concat message "aborted.") frame)
+ (or frame (setq frame (selected-frame)))
+ ;; Add a new entry to the message-stack, or modify an existing one
+ (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*"))
+ (let* ((gutter-string (copy-sequence "\n"))
+ (ext (make-extent 0 1 gutter-string)))
+ ;; do some funky display here.
+ (set-extent-begin-glyph ext progress-abort-glyph)
;; fixup the gutter specifiers
- (set-specifier bottom-gutter progress-extent-text frame)
+ (set-gutter-element bottom-gutter 'progress gutter-string frame)
(set-specifier bottom-gutter-border-width 2 frame)
(set-image-instance-property
- (glyph-image-instance progress-text-glyph) :data message)
+ (glyph-image-instance progress-text-glyph
+ (frame-selected-window frame)) :data message)
(set-specifier bottom-gutter-height 'autodetect frame)
- (set-specifier bottom-gutter-visible-p t frame)
+ (set-gutter-element-visible-p bottom-gutter-visible-p
+ 'progress t frame)
;; we have to do this so redisplay is up-to-date and so
;; redisplay-gutter-area performs optimally.
(redisplay-gutter-area)
- (sit-for 0.5 nil)
- (clear-progress label)
- (set-extent-begin-glyph progress-extent bglyph)
+ (sit-for progress-display-popup-period nil)
+ (clear-progress-display label frame)
+ (set-extent-begin-glyph ext progress-layout-glyph)
+ (set-gutter-element bottom-gutter 'progress gutter-string frame)
)))))
-(defun raw-append-progress (message &optional value frame)
+(defun raw-append-progress-display (message &optional value frame)
(unless (equal message "")
- (let ((inhibit-read-only t)
+ (let* ((inhibit-read-only t)
(zmacs-region-stays zmacs-region-stays)
- (val (or value 0))) ; preserve from change
+ (val (or value 0))
+ (gutter-string (copy-sequence "\n"))
+ (ext (make-extent 0 1 gutter-string)))
(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))
+ ;; do some funky display here.
+ (set-extent-begin-glyph ext progress-layout-glyph)
+ ;; fixup the gutter specifiers
+ (set-gutter-element bottom-gutter 'progress gutter-string frame)
+ (set-specifier bottom-gutter-border-width 2 frame)
+ (set-image-instance-property
+ (glyph-image-instance progress-gauge-glyph
+ (frame-selected-window frame))
+ :value val)
+ (set-image-instance-property
+ (glyph-image-instance progress-text-glyph (frame-selected-window frame))
+ :data message)
+ (if (and (eq (specifier-instance bottom-gutter-height frame)
+ 'autodetect)
+ (gutter-element-visible-p bottom-gutter-visible-p
+ 'progress frame))
+ ;; if the gauge is already visible then just draw the gutter
+ ;; checking for user events
(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)
+ (redisplay-gutter-area)
+ (progress-display-dispatch-non-command-events))
+ ;; otherwise make the gutter visible and redraw the frame
+ (set-specifier bottom-gutter-height 'autodetect frame)
+ (set-gutter-element-visible-p bottom-gutter-visible-p
+ 'progress t frame)
+ ;; we have to do this so redisplay is up-to-date and so
+ ;; redisplay-gutter-area performs optimally. This may also
+ ;; make sure the frame geometry looks ok.
+ (progress-display-dispatch-non-command-events)
+ (redisplay-frame frame)
+ ))))
+
+(defun display-progress-display (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
+the string to display. Use `clear-progress-display' 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)
+ (cond ((eq value 'abort)
+ (abort-progress-display label message frame))
+ ((or (not (valid-image-instantiator-format-p 'progress-gauge frame))
+ progress-display-use-echo-area)
+ (display-message label
+ (concat message (if (eq value 100) "done."
+ (make-string (/ value 5) ?.)))
+ frame))
+ (t
+ (append-progress-display label message value frame))))
+
+(defun current-progress-display (&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)
+(defun current-progress-display-label (&optional frame)
(car (car progress-stack)))
-(defun progress (fmt &optional value &rest args)
+(defun progress-display (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)
+ (save-excursion
+ (if (and (null fmt) (null args))
+ (prog1 nil
+ (clear-progress-display nil))
+ (let ((str (apply 'format fmt args)))
+ (display-progress-display 'progress str value)
+ str))))
+
+(defun lprogress-display (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)))
+ ;; #### sometimes the buffer gets changed temporarily. I don't know
+ ;; why this is, so protect against it.
+ (save-excursion
+ (if (and (null fmt) (null args))
+ (prog1 nil
+ (clear-progress-display label nil))
+ (let ((str (apply 'format fmt args)))
+ (display-progress-display label str value)
+ str))))
+
+;;
+;; Simple search dialog
+;;
+(defvar search-dialog-direction t)
+(defvar search-dialog-text
+ (make-glyph
+ [edit-field :width 15 :descriptor "" :active t :face default]))
+
+(defun search-dialog-callback (parent image-instance event)
+ (save-selected-frame
+ (select-frame parent)
+ (funcall (if search-dialog-direction
+ 'search-forward 'search-backward)
+ (image-instance-property
+ (glyph-image-instance search-dialog-text
+ (frame-selected-window
+ (event-channel event))) :text))
+ (isearch-highlight (match-beginning 0) (match-end 0))))
+
+(defun make-search-dialog ()
+ "Popup a search dialog box."
+ (interactive)
+ (let* ((parent (selected-frame)))
+ (set-buffer-dedicated-frame
+ (get-buffer-create "Dialog")
+ (make-dialog-box
+ (make-glyph
+ `[layout
+ :orientation horizontal :justify left
+ :height 10 :width 40
+ :border [string :data "Search"]
+ :items
+ ([layout :orientation vertical :justify left
+ :items
+ ([string :data "Search for:"]
+ [button :descriptor "Match case"
+ :style toggle
+ :selected (not case-fold-search)
+ :callback (setq case-fold-search
+ (not case-fold-search))]
+ [button :descriptor "Forwards"
+ :style radio
+ :selected search-dialog-direction
+ :callback (setq search-dialog-direction t)]
+ [button :descriptor "Backwards"
+ :style radio
+ :selected (not search-dialog-direction)
+ :callback (setq search-dialog-direction nil)]
+ )]
+ [layout :orientation vertical :justify left
+ :items
+ (search-dialog-text
+ [button :width 10 :descriptor "Find Next"
+ :callback-ex
+ (lambda (image-instance event)
+ (search-dialog-callback ,parent
+ image-instance event))]
+ [button :width 10 :descriptor "Cancel"
+ :callback-ex
+ (lambda (image-instance event)
+ (isearch-dehighlight)
+ (delete-frame
+ (event-channel event)))])])])
+ '(height 10 width 40)))))
(provide 'gutter-items)
;;; gutter-items.el ends here.
(stringp Installation-string))
(with-displaying-help-buffer
(lambda ()
- (princ Installation-string))
+ (princ
+ (if (fboundp 'decode-coding-string)
+ (decode-coding-string Installation-string 'automatic-conversion)
+ Installation-string)))
"Installation")
(error "No Installation information available.")))
;; 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, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;; contain none or when it has become older than info files in the same
;; directory.
-;; Modified 1998-09-23 by Didier Verna <verna@inf.enst.fr>
+;; Modified 1998-09-23 by Didier Verna <didier@xemacs.org>
;;
;; Use the new macro `with-search-caps-disable-folding'
`always' auto-generate a directory listing ignoring existing
`dir' and `localdir' files
`if-missing', the default, auto-generates a directory listing
- if no `dir' or `localdir' file is present. Otherwise the
+ if no `dir' or `localdir' file is present. Otherwise the
contents of any of these files is used instead.
`if-outdated' auto-generates a directory listing if the `dir'
- and `localdir' are either inexistent or outdated (touched
+ and `localdir' are either inexistent or outdated (touched
less recently than an info file in the same directory)."
:type '(choice (const :tag "never" never)
(const :tag "always" always)
(const :tag "if-outdated" if-outdated))
:group 'info)
-(defcustom Info-save-auto-generated-dir nil
+(defcustom Info-save-auto-generated-dir 'never
"*Whether an auto-generated info directory listing should be saved.
Possible values are:
-nil or `never', the default, auto-generated info directory
+nil or `never', the default, auto-generated info directory
information will never be saved.
`always', auto-generated info directory information will be saved to
a `dir' file in the same directory overwriting it if it exists
`conservative', auto-generated info directory information will be saved
- to a `dir' file in the same directory but the user is asked before
+ to a `dir' file in the same directory but the user is asked before
overwriting any existing file."
:type '(choice (const :tag "never" never)
(const :tag "always" always)
:group 'info-faces)
;; Is this right for NT? .zip, with -c for to stdout, right?
-(defvar Info-suffix-list '( ("" . nil)
+(defvar Info-suffix-list '( ("" . nil)
(".info" . nil)
(".info.bz2" . "bzip2 -dc %s")
(".info.gz" . "gzip -dc %s")
looking at that node, which is (dir)Top.
\1f
File: dir Node: Top This is the top of the INFO tree
- This (the Directory node) gives a menu of major topics.
+ This (the Directory node) gives a menu of major topics.
* Menu: The list of major topics begins on the next line.
(Info-find-file-node nil nodename no-going-back tryfile line))
;; Convert filename to lower case if not found as specified.
;; Expand it, look harder...
- ((let (temp temp-downcase found
+ ((let (temp temp-downcase found
(fname (substitute-in-file-name filename)))
(let ((dirs (cond
((string-match "^\\./" fname) ; If specified name starts with `./'
;; Try downcasing, appending a suffix, or both.
(setq found (Info-suffixed-file temp temp-downcase))
(setq dirs (cdr dirs)))
- (if found
+ (if found
(progn (setq filename (expand-file-name found))
t))))
(Info-find-file-node filename nodename no-going-back tryfile line))
(if (string-match "localdir" file)
"localdir"
"info dir"))))
- (if (not buf)
+ (if (not buf)
(insert-file-contents file))
(if (string-match "localdir" (buffer-name))
(setq lbuffers (cons (current-buffer) lbuffers))
Info-dir-file-attributes)))))))
(or (cdr dirs) (setq Info-dir-contents-directory (car dirs)))
(setq dirs (cdr dirs))))
-
+
;; ensure that the localdir files are inserted last, and reverse
;; the list of them so that when they get pushed in, they appear
;; in the same order they got specified in the path, from top to
;; bottom.
(nconc buffers (reverse lbuffers))
-
+
(or buffers
(error "Can't find the Info directory node"))
;; Distinguish the dir file that comes with Emacs from all the
(setq end (point))
(setq nodes (cons (list nodename other beg end) nodes))))))
(setq others (cdr others))))
-
+
;; Add to the main menu a menu item for each other node.
(re-search-forward "^\\* Menu:" nil t)
(forward-line 1)
(if (not (find-buffer-visiting file))
(if (not (file-exists-p file))
(if (or (eq Info-auto-generate-directory 'always)
- (eq Info-auto-generate-directory 'if-missing))
+ (eq Info-auto-generate-directory 'if-missing))
(Info-build-dir-anew (file-name-directory file)))
(if (or (eq Info-auto-generate-directory 'always)
(and (eq Info-auto-generate-directory 'if-outdated)
f-mod-time
newer)
(setq Info-dir-newer-info-files nil)
- (mapcar
+ (mapcar
#'(lambda (f)
(prog2
(setq f-mod-time (nth 5 (file-attributes f)))
(> (car (cdr f-mod-time)) (car (cdr dir-mod-time))))))
(if (and (file-readable-p f)
newer)
- (setq Info-dir-newer-info-files
+ (setq Info-dir-newer-info-files
(cons f Info-dir-newer-info-files)))))
(directory-files (file-name-directory file)
'fullname
(match-string 1)
(downcase (or (match-string 3)
(match-string 1)))))
- (setq entry
- (cons (nreverse
- (cdr
- (nreverse
- (split-string
- (buffer-substring
+ (setq entry
+ (cons (nreverse
+ (cdr
+ (nreverse
+ (split-string
+ (buffer-substring
(re-search-forward "[ \t]*" nil t)
(or (and (re-search-forward "^[^ \t]" nil t)
(goto-char (match-beginning 0)))
(if (> len description-col)
(setq description-col len)))
entries)
- (setq description-col (+ 5 description-col))
+ (setq description-col (+ 5 description-col))
(mapcar #'(lambda (e)
(setq e (cdr e)) ; Drop filename
(insert "* " (car e) ":" (car (cdr e)))
(defun Info-build-dir-anew (directory)
"Build info directory information for DIRECTORY.
-The generated directory listing may be saved to a `dir' according
+The generated directory listing may be saved to a `dir' according
to the value of `Info-save-auto-generated-dir'"
(save-excursion
(let* ((dirfile (expand-file-name "dir" directory))
(eq Info-save-auto-generated-dir 'never)
(and (not (file-writable-p dirfile))
(message "File not writable %s. Using temporary." dirfile))))
- (info-files
+ (info-files
(directory-files directory
'fullname
".*\\.info\\(.gz\\|.Z\\|-z\\|.zip\\)?$"
(erase-buffer)
(insert Info-dir-prologue
"Info files in " directory ":\n\n")
- (Info-dump-dir-entries
- (mapcar
+ (Info-dump-dir-entries
+ (mapcar
#'(lambda (f)
(or (Info-extract-dir-entry-from f)
(list 'dummy
- (progn
- (string-match "\\(.*\\)\\.info\\(.gz\\|.Z\\|-z\\|.zip\\)?$"
+ (progn
+ (string-match "\\(.*\\)\\.info\\(.gz\\|.Z\\|-z\\|.zip\\)?$"
(file-name-nondirectory f))
(capitalize (match-string 1 (file-name-nondirectory f))))
":"
(defun Info-rebuild-dir (file)
"Build info directory information in the directory of dir FILE.
-Description of info files are merged from the info files in the
+Description of info files are merged from the info files in the
directory and the contents of FILE with the description in info files
-taking precedence over descriptions in FILE.
-The generated directory listing may be saved to a `dir' according to
+taking precedence over descriptions in FILE.
+The generated directory listing may be saved to a `dir' according to
the value of `Info-save-auto-generated-dir' "
(save-excursion
(save-restriction
file-dir-entry
mark next-section
not-first-section
- (to-temp
+ (to-temp
(or (null Info-save-auto-generated-dir)
(eq Info-save-auto-generated-dir 'never)
(and (eq Info-save-auto-generated-dir 'always)
(and (eq Info-save-auto-generated-dir 'conservative)
(or (and (not (file-writable-p file))
(message "File not writable %s. Using temporary." file))
- (not (y-or-n-p
- (message "%s is outdated. Overwrite ? "
+ (not (y-or-n-p
+ (message "%s is outdated. Overwrite ? "
file))))))))
(set-buffer (find-file-noselect file t))
(setq buffer-read-only nil)
(if file-dir-entry
(setq dir-section-contents (cons file-dir-entry
dir-section-contents))
- (setq dir-section-contents
+ (setq dir-section-contents
(cons (list 'dummy
(capitalize (file-name-sans-extension
(file-name-nondirectory file)))
":"
- (list Info-no-description-string))
+ (list Info-no-description-string))
dir-section-contents))))))
Info-dir-newer-info-files)
(delete-region (point-min) (point-max))
(save-buffer)
(message "Rebuilding %s...done" file))))))
-;;;###autoload
+;;;###autoload
(defun Info-batch-rebuild-dir ()
"(Re)build info `dir' files in the directories remaining on the command line.
Use this from the command line, with `-batch';
(car command-line-args-left))
(setq dir (expand-file-name "dir" (car command-line-args-left)))
(setq localdir (expand-file-name "localdir" (car command-line-args-left)))
- (cond
+ (cond
((file-exists-p dir)
(Info-rebuild-dir dir))
((file-exists-p localdir)
(forward-line 1)
(if (re-search-backward "Node: *\\([^,\n]*\\) *[,\n\t]"
beg t)
- (setq compl
+ (setq compl
(cons (list (buffer-substring (match-beginning 1)
(match-end 1)))
compl))))))))
(Info-history-add ofile onode opoint)))))
\f
;; Extract the value of the node-pointer named NAME.
-;; If there is none, use ERRORNAME in the error message;
+;; If there is none, use ERRORNAME in the error message;
;; if ERRORNAME is nil, just return nil.
(defun Info-extract-pointer (name &optional errorname)
(save-excursion
;; there is a problem here in that if several menu items have the same
;; name you can only go to the node of the first with this command.
(Info-goto-node (Info-extract-menu-item menu-item) nil t))
-
+
(defun Info-extract-menu-item (menu-item &optional noerror)
(save-excursion
(goto-char (point-min))
"Look up an Emacs Lisp function in the Elisp manual in the Info system.
This command is designed to be used whether you are already in Info or not."
(interactive (let ((fn (function-at-point))
- (enable-recursive-minibuffers t)
+ (enable-recursive-minibuffers t)
val)
(setq val (completing-read
(format "Look up Emacs Lisp function%s: "
Used to construct the menubar submenu and popup menu."
(or event (setq event (point)))
(let ((case-fold-search t)
- (xref-regexp (concat "\\*"
+ (xref-regexp (concat "\\*"
(regexp-quote Info-footnote-tag)
"[ \n\t]*\\([^:]*\\):"))
up-p prev-p next-p menu xrefs subnodes in)
;;; keydefs.el --- Define standard keybindings.
;; Copyright (C) 1992-4, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 2000 Ben Wing.
;; Maintainer: XEmacs Development Team
;; Keywords: internal, dumped
(define-key global-map "\C-e" 'end-of-line)
(define-key global-map "\C-f" 'forward-char-command)
(define-key global-map "\C-d" 'delete-char)
-(define-key global-map 'delete 'backward-or-forward-delete-char)
-(define-key global-map '(meta delete) 'backward-or-forward-kill-word)
-(define-key global-map [(control x) (delete)] 'backward-or-forward-kill-sentence)
;; FSFmacs files.el
(define-key global-map '(control meta -) 'negative-argument)
(define-key global-map "\C-k" 'kill-line)
+(define-key global-map '(control K) 'historical-kill-line)
(define-key global-map "\C-w" 'kill-region)
(define-key global-map "\M-w" 'kill-ring-save)
(define-key global-map "\M-\C-w" 'append-next-kill)
(define-key global-map "\M-\)" 'move-past-close-and-reindent)
(define-key global-map "\M-\t" 'lisp-complete-symbol)
-(define-key global-map '(control meta backspace) 'backward-kill-sexp)
-(define-key global-map '(control meta delete) 'backward-or-forward-kill-sexp)
-
\f
(define-key global-map "\C-x/" 'point-to-register)
(define-key global-map "\C-xj" 'jump-to-register)
;; movement by units
(define-key global-map 'left 'backward-char-command)
-(define-key global-map 'up 'previous-line)
(define-key global-map 'right 'forward-char-command)
+(define-key global-map 'up 'previous-line)
(define-key global-map 'down 'next-line)
-
-;; movement by pages
-(define-key global-map 'prior 'scroll-down-command)
-(define-key global-map 'next 'scroll-up-command)
-
-;; movement to the limits
-(define-key global-map 'home 'beginning-of-line)
-(define-key global-map 'end 'end-of-line)
-
-;;; Miscellaneous key bindings
-(define-key global-map 'again 'repeat-complex-command)
-(define-key global-map 'insert 'overwrite-mode)
-
-;;; These aren't bound to kbd macros like "\C-b" so that they have the
-;; expected behavior even in, for example, vi-mode.
-
-;; We use here symbolic names, assuming that the corresponding keys will
-;; generate these keysyms. This is not true on Suns, but x-win-sun.el
-;; fixes that. If it turns out that the semantics of these keys should
-;; differ from server to server, this should be moved into server-specific
-;; files, but these appear to be the standard Motif and PC bindings.
-
-;; potential R6isms
(define-key global-map 'kp-left 'backward-char-command)
-(define-key global-map 'kp-up 'previous-line)
(define-key global-map 'kp-right 'forward-char-command)
+(define-key global-map 'kp-up 'previous-line)
(define-key global-map 'kp-down 'next-line)
-
-;; movement by larger blocks
-(define-key global-map '(control left) 'backward-word)
-(define-key global-map '(control up) #'(lambda ()
- (interactive "_")
- (forward-line -6)))
-(define-key global-map '(control right) 'forward-word)
-(define-key global-map '(control down) #'(lambda ()
- (interactive "_")
- (forward-line 6)))
-
-;; context-sensitive movement
-(define-key global-map '(meta left) 'backward-sexp)
-(define-key global-map '(meta right) 'forward-sexp)
-(define-key global-map '(meta up) 'backward-paragraph)
-(define-key global-map '(meta down) 'forward-paragraph)
-
;; movement by pages
+(define-key global-map 'prior 'scroll-down-command)
+(define-key global-map 'next 'scroll-up-command)
(define-key global-map '(control prior) 'scroll-right)
(define-key global-map '(control next) 'scroll-left)
-;; potential R6isms
(define-key global-map 'kp-prior 'scroll-down-command)
(define-key global-map 'kp-next 'scroll-up-command)
(define-key global-map '(control kp-prior) 'scroll-right)
(define-key global-map '(control kp-next) 'scroll-left)
-
;; movement to the limits
+(define-key global-map 'home 'beginning-of-line)
+(define-key global-map 'end 'end-of-line)
(define-key global-map '(control home) 'beginning-of-buffer)
(define-key global-map '(control end) 'end-of-buffer)
-(define-key global-map 'begin 'beginning-of-line)
-(define-key global-map '(control begin) 'beginning-of-buffer)
-;; potential R6isms
(define-key global-map 'kp-home 'beginning-of-line)
-(define-key global-map '(control kp-home) 'beginning-of-buffer)
(define-key global-map 'kp-end 'end-of-line)
+(define-key global-map '(control kp-home) 'beginning-of-buffer)
(define-key global-map '(control kp-end) 'end-of-buffer)
+;; on which systems do these exist?
+(define-key global-map 'begin 'beginning-of-line)
+(define-key global-map '(control begin) 'beginning-of-buffer)
+
+;; movement by larger blocks
+(define-key global-map '(control left) 'backward-word)
+(define-key global-map '(control right) 'forward-word)
+(define-key global-map '(control up) 'backward-block-of-lines)
+(define-key global-map '(control down) 'forward-block-of-lines)
+(define-key global-map '(control kp-left) 'backward-word)
+(define-key global-map '(control kp-right) 'forward-word)
+(define-key global-map '(control kp-up) 'backward-block-of-lines)
+(define-key global-map '(control kp-down) 'forward-block-of-lines)
+
+;; context-sensitive movement
+;; (meta control left/right) should be reserved for bindings that
+;; switch between buffers/web pages/etc.
+(define-key global-map '(meta left) 'backward-sexp)
+(define-key global-map '(meta right) 'forward-sexp)
+(define-key global-map '(meta up) 'backward-sentence)
+(define-key global-map '(meta down) 'forward-sentence)
+(define-key global-map '(meta control up) 'backward-paragraph)
+(define-key global-map '(meta control down) 'forward-paragraph)
+(define-key global-map '(meta control home) 'beginning-of-defun)
+(define-key global-map '(meta control end) 'end-of-defun)
+(define-key global-map '(meta control prior) 'backward-page)
+(define-key global-map '(meta control next) 'forward-page)
+(define-key global-map '(meta kp-left) 'backward-sexp)
+(define-key global-map '(meta kp-right) 'forward-sexp)
+(define-key global-map '(meta kp-up) 'backward-sentence)
+(define-key global-map '(meta kp-down) 'forward-sentence)
+(define-key global-map '(meta control kp-up) 'backward-paragraph)
+(define-key global-map '(meta control kp-down) 'forward-paragraph)
+(define-key global-map '(meta control kp-home) 'beginning-of-defun)
+(define-key global-map '(meta control kp-end) 'end-of-defun)
+(define-key global-map '(meta control kp-prior) 'backward-page)
+(define-key global-map '(meta control kp-next) 'forward-page)
+
;; movement between windows
(define-key global-map '(control tab) 'other-window)
(define-key global-map '(control shift tab) 'backward-other-window)
(define-key global-map '(meta prior) 'scroll-other-window-down)
(define-key global-map '(meta home) 'beginning-of-buffer-other-window)
(define-key global-map '(meta end) 'end-of-buffer-other-window)
-;; potential R6isms
(define-key global-map '(meta kp-next) 'scroll-other-window)
(define-key global-map '(meta kp-prior) 'scroll-other-window-down)
(define-key global-map '(meta kp-home) 'beginning-of-buffer-other-window)
(define-key global-map '(meta kp-end) 'end-of-buffer-other-window)
-;; potential R6isms
-(define-key global-map 'redo 'repeat-complex-command)
+;; the infamous delete key
+(define-key global-map 'delete 'backward-or-forward-delete-char)
+(define-key global-map '(meta delete) 'backward-or-forward-kill-word)
+(define-key global-map [(control x) (delete)]
+ 'backward-or-forward-kill-sentence)
+(define-key global-map 'kp-delete 'backward-or-forward-delete-char)
+(define-key global-map '(meta kp-delete) 'backward-or-forward-kill-word)
+(define-key global-map [(control x) (kp-delete)]
+ 'backward-or-forward-kill-sentence)
+
+;; don't try this one at home, kids.
+(define-key global-map '(control meta delete) 'backward-or-forward-kill-sexp)
+(define-key global-map '(control meta kp-delete) 'backward-or-forward-kill-sexp)
+;; or this one, either, on Linux.
+(define-key global-map '(control meta backspace) 'backward-kill-sexp)
+
+
+;;; Miscellaneous key bindings
+(define-key global-map 'insert 'overwrite-mode)
(define-key global-map 'kp-insert 'overwrite-mode)
-(define-key global-map 'kp-delete 'backward-delete-char-untabify)
+(define-key global-map 'again 'repeat-complex-command)
+(define-key global-map 'redo 'repeat-complex-command)
(define-key global-map 'kp-enter [return]) ; do whatever RET does now
(define-key global-map 'kp-tab [tab])
;; Author: Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch>
;; Maintainer: Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch>
;; Created: Jan 1998
-;; Version: $Revision: 1.7.2.6 $
+;; Version: $Revision: 1.7.2.7 $
;; Keywords: help comm
;; This file is part of XEmacs
;;; Code:
+(eval-when '(load)
+ (if (not (fboundp 'ldap-open))
+ (error "No LDAP support compiled in this XEmacs")))
+
(defgroup ldap nil
"Lightweight Directory Access Protocol"
:group 'comm)
(integer :tag "(number of records)")))))
:group 'ldap)
+(defcustom ldap-verbose nil
+ "*If non-nil, LDAP operations echo progress messages."
+ :type 'boolean
+ :group 'ldap)
+
(defcustom ldap-ignore-attribute-codings nil
"*If non-nil, do not perform any encoding/decoding on LDAP attribute values."
:type 'boolean
(cons name (mapcar decoder values))
attr)))
+(defun ldap-search (arg1 &rest args)
+ "Perform an LDAP search."
+ (apply (if (ldapp arg1)
+ 'ldap-search-basic
+ 'ldap-search-entries) arg1 args))
+
+(make-obsolete 'ldap-search
+ "Use `ldap-search-entries' instead or
+`ldap-search-basic' for the low-level search API.")
-(defun ldap-search (filter &optional host attributes attrsonly withdn)
+(defun ldap-search-entries (filter &optional host attributes attrsonly withdn)
"Perform an LDAP search.
FILTER is the search filter in RFC1558 syntax, i.e., something that
looks like \"(cn=John Smith)\".
(let ((host-plist (cdr (assoc host ldap-host-parameters-alist)))
ldap
result)
- (message "Opening LDAP connection to %s..." host)
+ (if ldap-verbose
+ (message "Opening LDAP connection to %s..." host))
(setq ldap (ldap-open host host-plist))
- (message "Searching with LDAP on %s..." host)
- (setq result (ldap-search-internal ldap filter
- (plist-get host-plist 'base)
- (plist-get host-plist 'scope)
- attributes attrsonly withdn))
+ (if ldap-verbose
+ (message "Searching with LDAP on %s..." host))
+ (setq result (ldap-search ldap filter
+ (plist-get host-plist 'base)
+ (plist-get host-plist 'scope)
+ attributes attrsonly withdn
+ ldap-verbose))
(ldap-close ldap)
(if ldap-ignore-attribute-codings
result
(mapcar 'ldap-decode-attribute record)))
result))))
+(defun ldap-add-entries (entries &optional host binddn passwd)
+ "Add entries to an LDAP directory.
+ENTRIES is a list of entry specifications of
+the form (DN (ATTR . VALUE) (ATTR . VALUE) ...) where
+DN is the distinguished name of an entry to add, the following
+are cons cells containing attribute/value string pairs.
+HOST is the LDAP host, defaulting to `ldap-default-host'
+BINDDN is the DN to bind as to the server
+PASSWD is the corresponding password"
+ (or host
+ (setq host ldap-default-host)
+ (error "No LDAP host specified"))
+ (let ((host-plist (cdr (assoc host ldap-host-parameters-alist)))
+ ldap
+ (i 1))
+ (if (or binddn passwd)
+ (setq host-plist (copy-seq host-plist)))
+ (if binddn
+ (setq host-plist (plist-put host-plist 'binddn binddn)))
+ (if passwd
+ (setq host-plist (plist-put host-plist 'passwd passwd)))
+ (if ldap-verbose
+ (message "Opening LDAP connection to %s..." host))
+ (setq ldap (ldap-open host host-plist))
+ (if ldap-verbose
+ (message "Adding LDAP entries..."))
+ (mapcar (function
+ (lambda (thisentry)
+ (ldap-add ldap (car thisentry) (cdr thisentry))
+ (if ldap-verbose
+ (message "%d added" i))
+ (setq i (1+ i))))
+ entries)
+ (ldap-close ldap)))
+
+
+(defun ldap-modify-entries (entry-mods &optional host binddn passwd)
+ "Modify entries of an LDAP directory.
+ENTRY_MODS is a list of entry modifications of the form
+ (DN MOD-SPEC1 MOD-SPEC2 ...) where DN is the distinguished name of
+the entry to modify, the following are modification specifications.
+A modification specification is itself a list of the form
+(MOD-OP ATTR VALUE1 VALUE2 ...) MOD-OP and ATTR are mandatory,
+VALUEs are optional depending on MOD-OP.
+MOD-OP is the type of modification, one of the symbols `add', `delete'
+or `replace'. ATTR is the LDAP attribute type to modify.
+HOST is the LDAP host, defaulting to `ldap-default-host'
+BINDDN is the DN to bind as to the server
+PASSWD is the corresponding password"
+ (or host
+ (setq host ldap-default-host)
+ (error "No LDAP host specified"))
+ (let ((host-plist (cdr (assoc host ldap-host-parameters-alist)))
+ ldap
+ (i 1))
+ (if (or binddn passwd)
+ (setq host-plist (copy-seq host-plist)))
+ (if binddn
+ (setq host-plist (plist-put host-plist 'binddn binddn)))
+ (if passwd
+ (setq host-plist (plist-put host-plist 'passwd passwd)))
+ (if ldap-verbose
+ (message "Opening LDAP connection to %s..." host))
+ (setq ldap (ldap-open host host-plist))
+ (if ldap-verbose
+ (message "Modifying LDAP entries..."))
+ (mapcar (function
+ (lambda (thisentry)
+ (ldap-modify ldap (car thisentry) (cdr thisentry))
+ (if ldap-verbose
+ (message "%d modified" i))
+ (setq i (1+ i))))
+ entry-mods)
+ (ldap-close ldap)))
+
+
+(defun ldap-delete-entries (dn &optional host binddn passwd)
+ "Delete an entry from an LDAP directory.
+DN is the distinguished name of an entry to delete or
+a list of those.
+HOST is the LDAP host, defaulting to `ldap-default-host'
+BINDDN is the DN to bind as to the server
+PASSWD is the corresponding password."
+ (or host
+ (setq host ldap-default-host)
+ (error "No LDAP host specified"))
+ (let ((host-plist (cdr (assoc host ldap-host-parameters-alist)))
+ ldap)
+ (if (or binddn passwd)
+ (setq host-plist (copy-seq host-plist)))
+ (if binddn
+ (setq host-plist (plist-put host-plist 'binddn binddn)))
+ (if passwd
+ (setq host-plist (plist-put host-plist 'passwd passwd)))
+ (if ldap-verbose
+ (message "Opening LDAP connection to %s..." host))
+ (setq ldap (ldap-open host host-plist))
+ (if (consp dn)
+ (let ((i 1))
+ (if ldap-verbose
+ (message "Deleting LDAP entries..."))
+ (mapcar (function
+ (lambda (thisdn)
+ (ldap-delete ldap thisdn)
+ (if ldap-verbose
+ (message "%d deleted" i))
+ (setq i (1+ i))))
+ dn))
+ (if ldap-verbose
+ (message "Deleting LDAP entry..."))
+ (ldap-delete ldap dn))
+ (ldap-close ldap)))
+
+
(provide 'ldap)
;;; ldap.el ends here
;;; lisp-mode.el --- Lisp mode, and its idiosyncratic commands.
;; Copyright (C) 1985, 1996, 1997 Free Software Foundation, Inc.
-;; Copyright (C) 1995 Tinker Systems
+;; Copyright (C) 1995 Tinker Systems.
;; Maintainer: FSF
;; Keywords: lisp, languages, dumped
;; The base major mode for editing Lisp code (used also for Emacs Lisp).
;; This mode is documented in the Emacs manual
-;; July/05/97 slb Converted to use easymenu.
-
;;; Code:
(defgroup lisp nil
(defvar lisp-mode-abbrev-table nil)
;; XEmacs change
-(defvar lisp-interaction-mode-popup-menu nil)
-(defvar lisp-interaction-mode-popup-menu-1
+(defvar lisp-interaction-mode-popup-menu
(purecopy '("Lisp-Interaction"
- ["Evaluate Last S-expression" eval-last-sexp]
- ["Evaluate Entire Buffer" eval-current-buffer]
- ["Evaluate Region" eval-region
+ ["Evaluate Last %_S-expression" eval-last-sexp]
+ ["Evaluate %_Whole Buffer" eval-current-buffer]
+ ["Evaluate Re%_gion" eval-region
:active (region-exists-p)]
"---"
- ["Evaluate This Defun" eval-defun]
- ;; FSF says "Instrument Function for Debugging"
- ["Debug This Defun" edebug-defun]
+ ["%_Evaluate This Defun" eval-defun]
+ ["%_Instrument This Defun for Debugging" edebug-defun]
"---"
- ["Trace a Function" trace-function-background]
- ["Untrace All Functions" untrace-all
+ ["Find %_Function Source..." find-function
+ :active (fboundp 'find-function)]
+ ["Find %_Variable Source..." find-variable
+ :active (fboundp 'find-variable)]
+ ["%_Trace Function..." trace-function-background]
+ ["%_Untrace All Functions" untrace-all
:active (fboundp 'untrace-all)]
"---"
- ["Comment Out Region" comment-region
- :active (region-exists-p)]
- ["Indent Region" indent-region
+ ["%_Comment Out Region" comment-region
:active (region-exists-p)]
- ["Indent Line" lisp-indent-line]
"---"
- ["Debug On Error" (setq debug-on-error (not debug-on-error))
- :style toggle :selected debug-on-error]
- ["Debug On Quit" (setq debug-on-quit (not debug-on-quit))
- :style toggle :selected debug-on-quit]
- ["Debug on Signal" (setq debug-on-signal (not debug-on-signal))
- :style toggle :selected debug-on-signal]
+ ["Indent %_Line or Region"
+ (if (region-exists-p)
+ (call-interactively 'indent-region)
+ (call-interactively 'lisp-indent-line))]
+ ["Indent B%_alanced Expression" indent-sexp]
+ ["Indent %_Defun"
+ (progn
+ (beginning-of-defun)
+ (indent-sexp))]
+ "---"
+ "Look for debug-on-error under Options->General"
)))
-(defvar emacs-lisp-mode-popup-menu nil)
-(defvar emacs-lisp-mode-popup-menu-1
+(defvar emacs-lisp-mode-popup-menu
(purecopy
(nconc
'("Emacs-Lisp"
- ["Byte-compile This File" emacs-lisp-byte-compile]
- ["Byte-compile/load This" emacs-lisp-byte-compile-and-load]
- ["Byte-recompile Directory..." byte-recompile-directory]
+ ["%_Byte-Compile This File" emacs-lisp-byte-compile]
+ ["B%_yte-Compile/Load This File" emacs-lisp-byte-compile-and-load]
+ ["Byte-%_Recompile Directory..." byte-recompile-directory]
"---")
- (cdr lisp-interaction-mode-popup-menu-1))))
+ (cdr lisp-interaction-mode-popup-menu))))
;Don't have a menubar entry in Lisp Interaction mode. Otherwise, the
;*scratch* buffer has a Lisp menubar item! Very confusing.
-;(defvar lisp-interaction-mode-menubar-menu
-; (purecopy (cons "Lisp" (cdr lisp-interaction-mode-popup-menu))))
+;Jan Vroonhof really wants this, so it's back. --ben
+(defvar lisp-interaction-mode-menubar-menu
+ (purecopy (cons "%_Lisp" (cdr lisp-interaction-mode-popup-menu))))
-(defvar emacs-lisp-mode-menubar-menu nil)
-(defvar emacs-lisp-mode-menubar-menu-1
- (purecopy (cons "Lisp" (cdr emacs-lisp-mode-popup-menu-1))))
+(defvar emacs-lisp-mode-menubar-menu
+ (purecopy (cons "%_Lisp" (cdr emacs-lisp-mode-popup-menu))))
(if (not emacs-lisp-mode-syntax-table)
(let ((i 0))
(set-syntax-table emacs-lisp-mode-syntax-table)
;; XEmacs changes
(setq major-mode 'emacs-lisp-mode
- ;; mode-popup-menu emacs-lisp-mode-popup-menu
+ mode-popup-menu emacs-lisp-mode-popup-menu
mode-name "Emacs-Lisp")
- ;; (if (and (featurep 'menubar)
- ;; current-menubar)
- ;; (progn
+ (if (and (featurep 'menubar)
+ current-menubar)
+ (progn
;; make a local copy of the menubar, so our modes don't
;; change the global menubar
- ;; (set-buffer-menubar current-menubar)
- ;; (add-submenu nil emacs-lisp-mode-menubar-menu)))
- (unless emacs-lisp-mode-popup-menu
- (easy-menu-define emacs-lisp-mode-popup-menu emacs-lisp-mode-map ""
- emacs-lisp-mode-popup-menu-1))
- (easy-menu-add emacs-lisp-mode-popup-menu)
+ (set-buffer-menubar current-menubar)
+ (add-submenu nil emacs-lisp-mode-menubar-menu)))
(lisp-mode-variables nil)
(run-hooks 'emacs-lisp-mode-hook))
(use-local-map lisp-interaction-mode-map)
(setq major-mode 'lisp-interaction-mode)
(setq mode-name "Lisp Interaction")
- ;; XEmacs change
- ;; (setq mode-popup-menu lisp-interaction-mode-popup-menu)
- (unless lisp-interaction-mode-popup-menu
- (easy-menu-define lisp-interaction-mode-popup-menu
- lisp-interaction-mode-map
- ""
- lisp-interaction-mode-popup-menu-1))
- (easy-menu-add lisp-interaction-mode-popup-menu)
-
+ (setq mode-popup-menu lisp-interaction-mode-popup-menu)
+ (if (and (featurep 'menubar)
+ current-menubar)
+ (progn
+ ;; make a local copy of the menubar, so our modes don't
+ ;; change the global menubar
+ (set-buffer-menubar current-menubar)
+ (add-submenu nil lisp-interaction-mode-menubar-menu)))
(set-syntax-table emacs-lisp-mode-syntax-table)
(lisp-mode-variables nil)
(run-hooks 'lisp-interaction-mode-hook))
(put 'let 'lisp-indent-function 1)
(put 'let* 'lisp-indent-function 1)
(put 'let-specifier 'lisp-indent-function 1)
+(put 'flet 'lisp-indent-function 1)
(put 'while 'lisp-indent-function 1)
(put 'if 'lisp-indent-function 2)
(put 'catch 'lisp-indent-function 1)
;;; list-mode.el --- Major mode for buffers containing lists of items
;; Copyright (C) 1992-4, 1997 Free Software Foundation, Inc.
-;; Copyright (C) 1996 Ben Wing.
+;; Copyright (C) 1996, 2000 Ben Wing.
;; Maintainer: XEmacs Development Team
;; Keywords: extensions, dumped
(dolist (key '(kp-left left (control ?b)))
(define-key map key 'previous-list-mode-item))))
+;; #### We make list-mode-hook, as well as completion-setup-hook and
+;; minibuffer-setup-hook, permanent-local so that it's possible to create
+;; buffers in these modes and then set up some buffer-specific
+;; customizations without resorting to awful kludges. (The problem here
+;; is that when you switch a buffer into a mode, reset-buffer is usually
+;; called, which destroys all buffer-local settings that you carefully
+;; tried to set up when you created the buffer. Therefore, the only way
+;; to set these variables is to use the setup hooks -- but if they are
+;; not declared permanent local, then any local hook functions that you
+;; put on them (which is exactly what you want to do) also get removed,
+;; so you would have to resort to putting a global hook function on the
+;; setup hook, and then making sure it gets removed later. I actually
+;; added some support for doing this with one-shot hooks, but this is
+;; clearly not the correct way to do things, and it fails in some cases,
+;; particularly when the buffer gets put into the mode more than once,
+;; which typically happens with completion buffers, for example.) In
+;; fact, all setup hooks should be made permanent local, but I didn't
+;; feel like making a global change like this quite yet. The proper way
+;; to do it would be to declare new def-style forms, such as defhook and
+;; define-local-setup-hook, which are used to initialize hooks in place
+;; of the current generic defvars. --ben
+
+(put 'list-mode-hook 'permanent-local t)
+(defvar list-mode-hook nil
+ "Normal hook run when entering List mode.")
+
(defun list-mode ()
"Major mode for buffer containing lists of items."
(interactive)
(use-local-map list-mode-map)
(setq mode-name "List")
(setq major-mode 'list-mode)
- (make-local-hook 'post-command-hook)
- (add-hook 'post-command-hook 'set-list-mode-extent nil t)
- (make-local-hook 'pre-command-hook)
- (add-hook 'pre-command-hook 'list-mode-extent-pre-hook nil t)
- (make-local-variable 'next-line-add-newlines)
- (setq next-line-add-newlines nil)
+ (add-local-hook 'post-command-hook 'set-list-mode-extent)
+ (add-local-hook 'pre-command-hook 'list-mode-extent-pre-hook)
+ (set (make-local-variable 'next-line-add-newlines) nil)
(setq list-mode-extent nil)
;; It is visually disconcerting to have the text cursor disappear within list
;; buffers, especially when moving from window to window, so leave it
If the variable in not t or nil, the string is taken as a regexp to match for end
of highlight")
+;; see comment at list-mode-hook.
+(put 'completion-setup-hook 'permanent-local t)
(defvar completion-setup-hook nil
- "Normal hook run at the end of setting up the text of a completion buffer.")
+ "Normal hook run at the end of setting up the text of a completion buffer.
+When run, the completion buffer is the current buffer.")
; Unnecessary FSFmacs crock. We frob the extents directly in
; display-completion-list, so no "heuristics" like this are necessary.
:window-width
If non-nil, width to use in displaying the list, instead of the
actual window's width.
+ :window-height
+ If non-nil, use no more than this many lines, and extend line width as
+ necessary.
:help-string (default is the value of `completion-default-help-string')
Form to evaluate to get a string to insert at the beginning of
the completion list buffer. This is evaluated when that buffer
:reference-buffer
(:help-string completion-default-help-string)
(:completion-string "Possible completions are:")
- :window-width)
+ :window-width
+ :window-height)
()
(let ((old-buffer (current-buffer))
(bufferp (bufferp standard-output)))
(selected-frame)))
80))))
(let ((count 0)
- (max-width 0))
+ (max-width 0)
+ old-max-width)
;; Find longest completion
(let ((tail completions))
(while tail
tail (cdr tail)))))
(setq max-width (+ 2 max-width)) ; at least two chars between cols
+ (setq old-max-width max-width)
(let ((rows (let ((cols (min (/ win-width max-width) count)))
(if (<= cols 1)
count
(if (/= (% count cols) 0) ; want ceiling...
(1+ (/ count cols))
(/ count cols)))))))
- (if (stringp cl-completion-string)
- (princ (gettext cl-completion-string)))
+ (when
+ (and cl-window-height
+ (> rows cl-window-height))
+ (setq max-width old-max-width)
+ (setq rows cl-window-height))
+ (when (and (stringp cl-completion-string)
+ (> (length cl-completion-string) 0))
+ (princ (gettext cl-completion-string))
+ (terpri))
(let ((tail completions)
(r 0)
(regexp-string
"[ \t]"
completion-highlight-first-word-only)))
(while (< r rows)
- (terpri)
+ (and (> r 0) (terpri))
(let ((indent 0)
(column 0)
(tail2 tail))
;; (put-text-property beg (point) 'list-mode-item t)
;; (goto-char end)))))
))
- (run-hooks 'completion-setup-hook)))
+ (save-excursion
+ (set-buffer standard-output)
+ (run-hooks 'completion-setup-hook))))
(defvar completion-display-completion-list-function 'display-completion-list
"Function to set up the list of completions in the completion buffer.
;; making it more likely you will get a unique match.
(setq completion-ignored-extensions
(mapcar 'purecopy
- '(".o" ".elc" "~" ".bin" ".lbin" ".fasl"
- ".dvi" ".toc" ".log" ".aux" ".a" ".ln"
- ".lof" ".blg" ".bbl" ".glo" ".idx" ".lot" ".fmt"
- ".diff" ".oi" ".class")))
+ ;; this is way way way bogus.
+ ;; completely wtf?
+ ;; the only things that should be here are those that are
+ ;; (a) universally recognizable, and
+ ;; (b) obvious backup files, or
+ ;; (c) obvious binary files that are generated on a
+ ;; PER-SOURCE-FILE basis, so that they will actually
+ ;; cause annoyance. This includes .exe files, e.g.
+; '(".o" ".elc" "~" ".bin" ".lbin" ".fasl"
+; ".dvi" ".toc" ;".log"
+; ".aux" ".a" ".ln"
+; ".lof" ".blg" ".bbl" ".glo" ".idx" ".lot" ".fmt"
+; ".diff" ".oi" ".class")))
+ '(".o" ".obj" ".elc" "~"
+ ".bin" ".lbin" ;; #### these are doubtful, esp. the latter.
+ ".dvi";; possibly doubtful, too.
+ ".class")))
\f
;; This needs to be redone better. -slb
(defvar Installation-string nil
"Description of XEmacs installation.")
-(let ((gc-cons-threshold 30000))
+;(start-profiling)
+
+(let ((gc-cons-threshold
+ ;; setting it low makes loadup incredibly fucking slow.
+ ;; no need to do it when not dumping.
+ (if (and purify-flag
+ (not (memq 'quick-build internal-error-checking)))
+ 30000 3000000)))
;; This is awfully damn early to be getting an error, right?
(call-with-condition-handler 'really-early-error-handler
(prog1 (buffer-substring)
(kill-buffer (current-buffer)))))
- (setq load-path (split-path (getenv "EMACSBOOTSTRAPLOADPATH")))
- (setq module-load-path (split-path (getenv "EMACSBOOTSTRAPMODULEPATH")))
+ (let ((build-root (expand-file-name ".." invocation-directory)))
+ (setq load-path (list (expand-file-name "lisp" build-root)))
+ (setq module-load-path (list (expand-file-name "modules" build-root))))
;; message not defined yet ...
(external-debugging-output (format "\nUsing load-path %s" load-path))
(if full-path
(prog1
(load full-path)
- (garbage-collect))
+ ;; but garbage collection really slows down loading.
+ (unless (memq 'quick-build internal-error-checking)
+ (garbage-collect)))
(external-debugging-output (format "\nLoad file %s: not found\n"
file))
;; Uncomment in case of trouble
;; is generated. For VMS, you must edit ../../vms/makedoc.com.
;; For other systems, you must edit ../../src/Makefile.in.in.
(when (load "site-load" t)
- (garbage-collect))
+ (garbage-collect)
+)
;;FSFmacs randomness
;;(if (fboundp 'x-popup-menu)
) ;; frequent garbage collection
+;(stop-profiling)
+
+;; yuck! need to insert the function def here, and rewrite the dolist
+;; loop below.
+
+;(defun loadup-profile-results (&optional info stream)
+; "Print profiling info INFO to STREAM in a pretty format.
+;If INFO is omitted, the current profiling info is retrieved using
+; `get-profiling-info'.
+;If STREAM is omitted, either a *Profiling Results* buffer or standard
+; output are used, depending on whether the function was called
+; interactively or not."
+; (interactive)
+; (setq info (if info
+; (copy-alist info)
+; (get-profiling-info)))
+; (when (and (not stream)
+; (interactive-p))
+; (pop-to-buffer (get-buffer-create "*Profiling Results*"))
+; (erase-buffer))
+; (let ((standard-output (or stream (if (interactive-p)
+; (current-buffer)
+; standard-output)))
+; ;; Calculate the longest function
+; (maxfunlen (apply #'max
+; (length "Function Name")
+; (mapcar
+; (lambda (el)
+; ;; Functions longer than 50 characters (usually
+; ;; anonymous functions) don't qualify
+; (let ((l (length (format "%s" (car el)))))
+; (if (< l 50)
+; l 0)))
+; info))))
+; (princ (format "%-*s Ticks %%/Total Call Count\n"
+; maxfunlen "Function Name"))
+; (princ (make-string maxfunlen ?=))
+; (princ " ===== ======= ==========\n")
+; (let ((sum (float (apply #'+ (mapcar #'cdr info)))))
+; (let (entry
+; (entry-list (nreverse (sort info #'cdr-less-than-cdr))))
+; (while entry-list
+; (setq entry (car entry-list))
+; (princ (format "%-*s %-5d %-6.3f %s\n"
+; maxfunlen (car entry) (cdr entry)
+; (* 100 (/ (cdr entry) sum))
+; (or (gethash (car entry) call-count-profile-table)
+; "")))
+; (setq entry-list (cdr entry-list))))
+; (princ (make-string maxfunlen ?-))
+; (princ "---------------------------------\n")
+; (princ (format "%-*s %-5d %-6.2f\n" maxfunlen "Total" sum 100.0))
+; (princ (format "\n\nOne tick = %g ms\n"
+; (/ default-profiling-interval 1000.0)))
+; (and (boundp 'internal-error-checking)
+; internal-error-checking
+; (princ "
+;WARNING: Error checking is turned on in this XEmacs. This might make
+; the measurements very unreliable.\n"))))
+; (when (and (not stream)
+; (interactive-p))
+; (goto-char (point-min))))
+
+;(loadup-profile-results nil 'external-debugging-output)
+
;; Dump into the name `xemacs' (only)
(when (member "dump" command-line-args)
(message "Dumping under the name xemacs")
(setq command-line-args (cdr command-line-args)))
;; Then process the list of Lisp files.
-(setq load-path (split-path (getenv "EMACSBOOTSTRAPLOADPATH")))
+(let ((build-root (expand-file-name ".." invocation-directory)))
+ (setq load-path (list (expand-file-name "lisp" build-root))))
(load "very-early-lisp" nil t)
(load "packages.el")
(load "setup-paths.el")
(load "dump-paths.el")
-
-(setq
- load-path
- (nconc load-path (split-path (getenv "EMACSBOOTSTRAPLOADPATH"))))
+(require 'custom)
+(load "process")
(let (preloaded-file-list)
(load (expand-file-name "../lisp/dumped-lisp.el"))
;; (objects (capitalize (or (nth 1 help) "objects")))
;; (action (capitalize (or (nth 2 help) "act on")))
)
- (setq map `(("Yes" . act) ("No" . skip)
+ (setq map `(("%_Yes" . act) ("%_No" . skip)
; bogus crap. --ben
; ((, (if help
; (capitalize
; ((, (capitalize
; (or (and help (nth 5 help)) "Quit")))
; . exit)
- ("Yes All" . automatic)
- ("No All" . exit)
- ("Cancel" . quit)
+ ("Yes %_All" . automatic)
+ ("No A%_ll" . exit)
+ ("%_Cancel" . quit)
,@(mapcar #'(lambda (elt)
(cons (capitalize (nth 2 elt))
(vector (nth 1 elt))))
(lambda (elt)
(format "%c to %s"
(nth 0 elt)
- (nth 2 elt))))
+ (normalize-menu-item-name
+ (nth 2 elt)))))
action-alist
";\n")
(if action-alist ";\n")
;; Copyright (C) 1991-1995, 1997-1998 Free Software Foundation, Inc.
;; Copyright (C) 1995 Tinker Systems and INS Engineering Corp.
;; Copyright (C) 1995 Sun Microsystems.
-;; Copyright (C) 1995, 1996 Ben Wing.
-;; Copyright (C) 1997 MORIOKA Tomohiko
+;; Copyright (C) 1995, 1996, 2000 Ben Wing.
+;; Copyright (C) 1997 MORIOKA Tomohiko.
;; Maintainer: XEmacs Development Team
;; Keywords: frames, extensions, internal, dumped
;; Free Software Foundation, 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
+;;; Authorship:
+
+;; Created c. 1991 for Lucid Emacs. Originally called x-menubar.el.
+;; Contained four menus -- File, Edit, Buffers, Help.
+;; Dynamic menu changes possible only through activate-menubar-hook.
+;; Also contained menu manipulation funs, e.g. find-menu-item, add-menu.
+;; Options menu added for 19.9 by Jamie Zawinski, late 1993.
+;; Major reorganization c. 1994 by Ben Wing; added many items and moved
+;; some items to two new menus, Apps and Tools. (for 19.10?)
+;; Generic menubar functions moved to new file, menubar.el, by Ben Wing,
+;; 1995, for 19.12; also, creation of current buffers menu options,
+;; and buffers menu changed from purely most-recent to sorted alphabetical,
+;; by mode. Also added mode-popup-menu support.
+;; New API (add-submenu, add-menu-button) and menu filter support added
+;; late summer 1995 by Stig, for 19.13. Also popup-menubar-menu.
+;; Renamed to menubar-items.el c. 1998, with MS Win support.
+;; Options menu rewritten to use custom c. 1999 by ? (Jan Vroonhof?).
+;; Major reorganization Mar. 2000 by Ben Wing; added many items and changed
+;; top-level menus to File, Edit, View, Cmds, Tools, Options, Buffers.
+;; Accelerator spec functionality added Mar. 2000 by Ben Wing.
+
;;; Commentary:
;; This file is dumped with XEmacs (when window system and menubar support is
(defvar current-language-environment)
(defvar tutorial-supported-languages))
+(defun menu-truncate-list (list n)
+ (if (<= (length list) n)
+ list
+ (butlast list (- (length list) n))))
+
+(defun submenu-generate-accelerator-spec (list &optional omit-chars-list)
+ "Add auto-generated accelerator specifications to a submenu.
+This can be used to add accelerators to the return value of a menu filter
+function. It correctly ignores unselectable items. It will destructively
+modify the list passed to it. If an item already has an auto-generated
+accelerator spec, this will be removed before the new one is added, making
+this function idempotent.
+
+If OMIT-CHARS-LIST is given, it should be a list of lowercase characters,
+which will not be used as accelerators."
+ (let ((n 0))
+ (dolist (item list list)
+ (cond
+ ((vectorp item)
+ (setq n (1+ n))
+ (aset item 0
+ (concat
+ (menu-item-generate-accelerator-spec n omit-chars-list)
+ (menu-item-strip-accelerator-spec (aref item 0)))))
+ ((consp item)
+ (setq n (1+ n))
+ (setcar item
+ (concat
+ (menu-item-generate-accelerator-spec n omit-chars-list)
+ (menu-item-strip-accelerator-spec (car item)))))))))
+
+(defun menu-item-strip-accelerator-spec (item)
+ "Strip an auto-generated accelerator spec off of ITEM.
+ITEM should be a string. This removes specs added by
+`menu-item-generate-accelerator-spec' and `submenu-generate-accelerator-spec'."
+ (if (string-match "%_. " item)
+ (substring item 4)
+ item))
+
+(defun menu-item-generate-accelerator-spec (n &optional omit-chars-list)
+ "Return an accelerator specification for use with auto-generated menus.
+This should be concat'd onto the beginning of each menu line. The spec
+allows the Nth line to be selected by the number N. '0' is used for the
+10th line, and 'a' through 'z' are used for the following 26 lines.
+
+If OMIT-CHARS-LIST is given, it should be a list of lowercase characters,
+which will not be used as accelerators."
+ (cond ((< n 10) (concat "%_" (int-to-string n) " "))
+ ((= n 10) "%_0 ")
+ ((<= n 36)
+ (setq n (- n 10))
+ (let ((m 0))
+ (while (> n 0)
+ (setq m (1+ m))
+ (while (memq (int-to-char (+ m (- (char-to-int ?a) 1)))
+ omit-chars-list)
+ (setq m (1+ m)))
+ (setq n (1- n)))
+ (if (<= m 26)
+ (concat
+ "%_"
+ (char-to-string (int-to-char (+ m (- (char-to-int ?a) 1))))
+ " ")
+ "")))
+ (t "")))
+
(defconst default-menubar
(purecopy-menubar
;; note backquote.
`(
- ("File"
- ["Open..." find-file]
- ["Open in Other Window..." find-file-other-window]
- ["Open in New Frame..." find-file-other-frame]
- ["Insert File..." insert-file]
- ["View File..." view-file]
+ ("%_File"
+ ["%_Open..." find-file]
+ ["Open in Other %_Window..." find-file-other-window]
+ ["Open in New %_Frame..." find-file-other-frame]
+ ["%_Hex Edit File..." hexl-find-file
+ :active (fboundp 'hexl-find-file)]
+ ["%_Insert File..." insert-file]
+ ["%_View File..." view-file]
"------"
- ["Save" save-buffer
+ ["%_Save" save-buffer
:active (buffer-modified-p)
:suffix (if put-buffer-names-in-file-menu (buffer-name) "")]
- ["Save As..." write-file]
- ["Save Some Buffers" save-some-buffers]
+ ["Save %_As..." write-file]
+ ["Save So%_me Buffers" save-some-buffers]
"-----"
- ["Print Buffer" lpr-buffer
- :active (fboundp 'lpr-buffer)
+ ["%_Print Buffer" generic-print-buffer
+ :active (or (valid-specifier-tag-p 'msprinter)
+ (and (not (eq system-type 'windows-nt))
+ (fboundp 'lpr-buffer)))
:suffix (if put-buffer-names-in-file-menu (buffer-name) "")]
- ["Pretty-Print Buffer" ps-print-buffer-with-faces
+ ["Prett%_y-Print Buffer" ps-print-buffer-with-faces
:active (fboundp 'ps-print-buffer-with-faces)
:suffix (if put-buffer-names-in-file-menu (buffer-name) "")]
"-----"
- ["New Frame" make-frame]
- ["Frame on Other Display..." make-frame-on-display]
- ["Delete Frame" delete-frame
- :active (not (eq (next-frame (selected-frame) 'nomini 'window-system)
- (selected-frame)))]
- "-----"
- ["Split Window" split-window-vertically]
- ["Un-Split (Keep This)" delete-other-windows
- :active (not (one-window-p t))]
- ["Un-Split (Keep Others)" delete-window
- :active (not (one-window-p t))]
- "-----"
- ["Revert Buffer" revert-buffer
+ ["%_Revert Buffer" revert-buffer
:active (or buffer-file-name revert-buffer-function)
:suffix (if put-buffer-names-in-file-menu (buffer-name) "")]
- ["Delete Buffer" kill-this-buffer
- :active t
- :suffix (if put-buffer-names-in-file-menu (buffer-name) "")]
+ ["Re%_cover File..." recover-file]
+ ["Recover S%_ession..." recover-session]
"-----"
- ["Exit XEmacs" save-buffers-kill-emacs]
+ ["E%_xit XEmacs" save-buffers-kill-emacs]
)
- ("Edit"
- ["Undo" advertised-undo
+ ("%_Edit"
+ ["%_Undo" advertised-undo
:active (and (not (eq buffer-undo-list t))
(or buffer-undo-list pending-undo-list))
:suffix (if (or (eq last-command 'undo)
(eq last-command 'advertised-undo))
"More" "")]
- ["Redo" redo
+ ["%_Redo" redo
:included (fboundp 'redo)
:active (not (or (eq buffer-undo-list t)
(eq last-buffer-undo-list nil)
(or (eq buffer-undo-list pending-undo-list)
(eq (cdr buffer-undo-list) pending-undo-list))))
:suffix (if (eq last-command 'redo) "More" "")]
- ["Cut" kill-primary-selection
+ "----"
+ ["Cu%_t" kill-primary-selection
:active (selection-owner-p)]
- ["Copy" copy-primary-selection
+ ["%_Copy" copy-primary-selection
:active (selection-owner-p)]
- ["Paste" yank-clipboard-selection
+ ["%_Paste" yank-clipboard-selection
:active (selection-exists-p 'CLIPBOARD)]
- ["Clear" delete-primary-selection
+ ["%_Delete" delete-primary-selection
:active (selection-owner-p)]
"----"
- ["Search..." isearch-forward]
- ["Search Backward..." isearch-backward]
- ["Replace..." query-replace]
- "----"
- ["Search (Regexp)..." isearch-forward-regexp]
- ["Search Backward (Regexp)..." isearch-backward-regexp]
- ["Replace (Regexp)..." query-replace-regexp]
+ ["Select %_All" mark-whole-buffer]
+ ["Select %_Page" mark-page]
"----"
- ["Goto Line..." goto-line]
- ["What Line" what-line]
- ("Bookmarks"
- :filter bookmark-menu-filter)
- "----"
- ["Start Macro Recording" start-kbd-macro
- :active (not defining-kbd-macro)]
- ["End Macro Recording" end-kbd-macro
- :active defining-kbd-macro]
- ["Execute Last Macro" call-last-kbd-macro
- :active last-kbd-macro]
+ ["%_Search..." make-search-dialog]
+ ["%_1 Replace..." query-replace]
"----"
- ["Show Message Log" show-message-log]
- )
-
- ,@(when (featurep 'mule)
- '(("Mule"
- ("Describe language support")
- ("Set language environment")
+ ["%_2 Search (Regexp)..." isearch-forward-regexp]
+ ["%_3 Search Backward (Regexp)..." isearch-backward-regexp]
+ ["%_4 Replace (Regexp)..." query-replace-regexp]
+
+ ,@(when (featurep 'mule)
+ '("----"
+ ("%_Multilingual (\"Mule\")"
+ ("%_Describe Language Support")
+ ("%_Set Language Environment")
"--"
- ["Toggle input method" toggle-input-method]
- ["Select input method" set-input-method]
- ["Describe input method" describe-input-method]
+ ["T%_oggle Input Method" toggle-input-method]
+ ["Select %_Input Method" set-input-method]
+ ["D%_escribe Input Method" describe-input-method]
"--"
- ["Describe current coding systems"
+ ["Describe Current %_Coding Systems"
describe-current-coding-system]
- ["Set coding system of buffer file"
+ ["Set Coding System of %_Buffer File..."
set-buffer-file-coding-system]
;; not implemented yet
- ["Set coding system of terminal"
+ ["Set Coding System of %_Terminal..."
set-terminal-coding-system :active nil]
;; not implemented yet
- ["Set coding system of keyboard"
+ ["Set Coding System of %_Keyboard..."
set-keyboard-coding-system :active nil]
- ["Set coding system of process"
+ ["Set Coding System of %_Process..."
set-buffer-process-coding-system
:active (get-buffer-process (current-buffer))]
"--"
- ["Show character table" view-charset-by-menu]
+ ["Show Cha%_racter Table" view-charset-by-menu]
;; not implemented yet
- ["Show diagnosis for MULE" mule-diag :active nil]
- ["Show many languages" view-hello-file])))
-
- ("Apps"
- ["Read Mail (VM)..." vm
- :active (fboundp 'vm)]
- ["Read Mail (MH)..." (mh-rmail t)
- :active (fboundp 'mh-rmail)]
- ["Send mail..." compose-mail
- :active (fboundp 'compose-mail)]
- ["Usenet News" gnus
- :active (fboundp 'gnus)]
- ["Browse the Web" w3
- :active (fboundp 'w3)]
+ ["Show Dia%_gnosis for MULE" mule-diag :active nil]
+ ["Show \"%_hello\" in Many Languages" view-hello-file]))
+ )
+ )
+
+ ("%_View"
+ ["%_New Frame" make-frame]
+ ["Frame on Other Displa%_y..." make-frame-on-display]
+ ["%_Delete Frame" delete-frame
+ :active (not (eq (next-frame (selected-frame) 'nomini 'window-system)
+ (selected-frame)))]
+ "-----"
+ ["%_Split Window" split-window-vertically]
+ ["S%_plit Window (Side by Side)" split-window-horizontally]
+ ["%_Un-Split (Keep This)" delete-other-windows
+ :active (not (one-window-p t))]
+ ["Un-Split (Keep %_Others)" delete-window
+ :active (not (one-window-p t))]
+ "----"
+ ("N%_arrow"
+ ["%_Narrow to Region" narrow-to-region :active (region-exists-p)]
+ ["Narrow to %_Page" narrow-to-page]
+ ["Narrow to %_Defun" narrow-to-defun]
+ "----"
+ ["%_Widen" widen :active (or (/= (point-min) 1)
+ (/= (point-max) (1+ (buffer-size))))]
+ )
+ "----"
+ ["Show Message %_Log" show-message-log]
"----"
- ["Spell-Check Buffer" ispell-buffer
- :active (fboundp 'ispell-buffer)]
- ["Toggle VI emulation" toggle-viper-mode
- :active (fboundp 'toggle-viper-mode)]
+ ["%_Goto Line..." goto-line]
+ ["%_What Line" what-line]
+ ("%_Bookmarks"
+ :filter bookmark-menu-filter)
+ "----"
+ ["%_Jump to Previous Mark" (set-mark-command t)
+ :active (mark t)]
+ )
+
+ ("C%_mds"
+ ["Repeat %_Last Complex Command..." repeat-complex-command]
+ ["E%_valuate Lisp Expression..." eval-expression]
+ ["Execute %_Named Command..." execute-extended-command]
+ "----"
+ ["Start %_Macro Recording" start-kbd-macro
+ :included (not defining-kbd-macro)]
+ ["End %_Macro Recording" end-kbd-macro
+ :included defining-kbd-macro]
+ ["E%_xecute Last Macro" call-last-kbd-macro
+ :active last-kbd-macro]
+ ("%_Other Macro"
+ ["%_Append to Last Macro" (start-kbd-macro t)
+ :active (and (not defining-kbd-macro) last-kbd-macro)]
+ ["%_Query User During Macro" kbd-macro-query
+ :active defining-kbd-macro]
+ ["Enter %_Recursive Edit During Macro" (kbd-macro-query t)
+ :active defining-kbd-macro]
+ "---"
+ ["E%_xecute Last Macro on Region Lines"
+ :active (and last-kbd-macro (region-exists-p))]
+ "---"
+ ["%_Name Last Macro..." name-last-kbd-macro
+ :active last-kbd-macro]
+ ["Assign Last Macro to %_Key..." assign-last-kbd-macro-to-key
+ :active (and last-kbd-macro
+ (fboundp 'assign-last-kbd-macro-to-key))]
+ "---"
+ ["%_Edit Macro..." edit-kbd-macro]
+ ["Edit %_Last Macro" edit-last-kbd-macro
+ :active last-kbd-macro]
+ "---"
+ ["%_Insert Named Macro into Buffer..." insert-kbd-macro]
+ ["Read Macro from Re%_gion" read-kbd-macro
+ :active (region-exists-p)]
+ )
+ "----"
+ ("%_Abbrev"
+ ["D%_ynamic Abbrev Expand" dabbrev-expand]
+ ["Dynamic Abbrev %_Complete" dabbrev-completion]
+ ["Dynamic Abbrev Complete in %_All Buffers" (dabbrev-completion 16)]
+ "----"
+ "----"
+ ["%_Define Global Abbrev for " add-global-abbrev
+ :suffix (abbrev-string-to-be-defined nil)
+ :active abbrev-mode]
+ ["Define %_Mode-Specific Abbrev for " add-mode-abbrev
+ :suffix (abbrev-string-to-be-defined nil)
+ :active abbrev-mode]
+ ["Define Global Ex%_pansion for " inverse-add-global-abbrev
+ :suffix (inverse-abbrev-string-to-be-defined 1)
+ :active abbrev-mode]
+ ["Define Mode-Specific Expa%_nsion for " inverse-add-mode-abbrev
+ :suffix (inverse-abbrev-string-to-be-defined 1)
+ :active abbrev-mode]
+ "---"
+ ["E%_xpand Abbrev" expand-abbrev]
+ ["Expand Abbrevs in Re%_gion" expand-region-abbrevs
+ :active (region-exists-p)]
+ ["%_Unexpand Last Abbrev" unexpand-abbrev
+ :active (and (stringp last-abbrev-text)
+ (> last-abbrev-location 0))]
+ "---"
+ ["%_Kill All Abbrevs" kill-all-abbrevs]
+ ["%_Insert All Abbrevs into Buffer" insert-abbrevs]
+ ["%_List Abbrevs" list-abbrevs]
+ "---"
+ ["%_Edit Abbrevs" edit-abbrevs]
+ ["%_Redefine Abbrevs from Buffer" edit-abbrevs-redefine
+ :active (eq major-mode 'edit-abbrevs-mode)]
+ "---"
+ ["%_Save Abbrevs As..." write-abbrev-file]
+ ["L%_oad Abbrevs..." read-abbrev-file]
+ )
+ ("%_Register"
+ ["%_Copy to Register..." copy-to-register :active (region-exists-p)]
+ ["%_Paste Register..." insert-register]
+ "---"
+ ["%_Save Point to Register" point-to-register]
+ ["%_Jump to Register" register-to-point]
+ )
+ ("R%_ectangles"
+ ["%_Kill Rectangle" kill-rectangle]
+ ["%_Yank Rectangle" yank-rectangle]
+ ["Rectangle %_to Register" copy-rectangle-to-register]
+ ["Rectangle %_from Register" insert-register]
+ ["%_Clear Rectangle" clear-rectangle]
+ ["%_Open Rectangle" open-rectangle]
+ ["%_Prefix Rectangle..." string-rectangle]
+ ["Rectangle %_Mousing"
+ (customize-set-variable 'mouse-track-rectangle-p
+ (not mouse-track-rectangle-p))
+ :style toggle :selected mouse-track-rectangle-p]
+ )
+ ("%_Sort"
+ ["%_Lines" sort-lines :active (region-exists-p)]
+ ["%_Paragraphs" sort-paragraphs :active (region-exists-p)]
+ ["P%_ages" sort-pages :active (region-exists-p)]
+ ["%_Columns" sort-columns :active (region-exists-p)]
+ ["%_Regexp..." sort-regexp-fields :active (region-exists-p)]
+ )
+ ("%_Center"
+ ["%_Line" center-line]
+ ["%_Paragraph" center-paragraph]
+ ["%_Region" center-region :active (region-exists-p)]
+ )
+ ("%_Indent"
+ ["%_As Previous Line" indent-relative]
+ ["%_To Column..." indent-to-column]
+ "---"
+ ["%_Region" indent-region :active (region-exists-p)]
+ ["%_Balanced Expression" indent-sexp]
+ ["%_C Expression" indent-c-exp]
+ )
+ ("S%_pell-Check"
+ ["%_Buffer" ispell-buffer
+ :active (fboundp 'ispell-buffer)]
+ "---"
+ ["%_Word" ispell-word]
+ ["%_Complete Word" ispell-complete-word]
+ ["%_Region" ispell-region]
+ )
+ )
+
+ ("%_Tools"
+ ("%_Internet"
+ ["Read Mail %_1 (VM)..." vm
+ :active (fboundp 'vm)]
+ ["Read Mail %_2 (MH)..." (mh-rmail t)
+ :active (fboundp 'mh-rmail)]
+ ["Send %_Mail..." compose-mail
+ :active (fboundp 'compose-mail)]
+ ["Usenet %_News" gnus
+ :active (fboundp 'gnus)]
+ ["Browse the %_Web" w3
+ :active (fboundp 'w3)])
+ "---"
+ ("%_Grep"
+ :filter
+ (lambda (menu)
+ (if (or (not (boundp 'grep-history)) (null grep-history))
+ menu
+ (let ((items
+ (submenu-generate-accelerator-spec
+ (mapcar #'(lambda (string)
+ (vector string
+ (list 'grep string)))
+ (menu-truncate-list grep-history 10)))))
+ (append menu '("---") items))))
+ ["%_Grep..." grep :active (fboundp 'grep)]
+ ["%_Kill Grep" kill-compilation
+ :active (and (fboundp 'kill-compilation)
+ (fboundp 'compilation-find-buffer)
+ (let ((buffer (condition-case nil
+ (compilation-find-buffer)
+ (error nil))))
+ (and buffer (get-buffer-process buffer))))]
+ "---"
+ ["Grep %_All Files in Current Directory..."
+ (progn
+ (require 'compile)
+ (let ((grep-command
+ (cons (concat grep-command " *")
+ (length grep-command))))
+ (call-interactively 'grep)))
+ :active (fboundp 'grep)]
+ ["Grep %_C and C Header Files in Current Directory..."
+ (progn
+ (require 'compile)
+ (let ((grep-command
+ (cons (concat grep-command " *.[chCH]"
+ ; i wanted to also use *.cc and *.hh.
+ ; see long comment below under Perl.
+ )
+ (length grep-command))))
+ (call-interactively 'grep)))
+ :active (fboundp 'grep)]
+ ["Grep C Hea%_der Files in Current Directory..."
+ (progn
+ (require 'compile)
+ (let ((grep-command
+ (cons (concat grep-command " *.[hH]"
+ ; i wanted to also use *.hh.
+ ; see long comment below under Perl.
+ )
+ (length grep-command))))
+ (call-interactively 'grep)))
+ :active (fboundp 'grep)]
+ ["Grep %_E-Lisp Files in Current Directory..."
+ (progn
+ (require 'compile)
+ (let ((grep-command
+ (cons (concat grep-command " *.el")
+ (length grep-command))))
+ (call-interactively 'grep)))
+ :active (fboundp 'grep)]
+ ["Grep %_Perl Files in Current Directory..."
+ (progn
+ (require 'compile)
+ (let ((grep-command
+ (cons (concat grep-command " *.pl"
+ ; i wanted to use this:
+ ; " *.pl *.pm *.am"
+ ; but grep complains if it can't
+ ; match anything in a glob, and
+ ; that screws other things up.
+ ; perhaps we need to first scan
+ ; each separate glob in the directory
+ ; to see if there are any files in
+ ; that glob, and if not, omit it.
+ )
+ (length grep-command))))
+ (call-interactively 'grep)))
+ :active (fboundp 'grep)]
+ ["Grep %_HTML Files in Current Directory..."
+ (progn
+ (require 'compile)
+ (let ((grep-command
+ (cons (concat grep-command " *.*htm*")
+ (length grep-command))))
+ (call-interactively 'grep)))
+ :active (fboundp 'grep)]
+ "---"
+ ["%_Next Match" next-error
+ :active (and (fboundp 'compilation-errors-exist-p)
+ (compilation-errors-exist-p))]
+ ["Pre%_vious Match" previous-error
+ :active (and (fboundp 'compilation-errors-exist-p)
+ (compilation-errors-exist-p))]
+ ["%_First Match" first-error
+ :active (and (fboundp 'compilation-errors-exist-p)
+ (compilation-errors-exist-p))]
+ ["G%_oto Match" compile-goto-error
+ :active (and (fboundp 'compilation-errors-exist-p)
+ (compilation-errors-exist-p))]
+ "---"
+ ["%_Set Grep Command..."
+ (progn
+ (require 'compile)
+ (customize-set-variable
+ 'grep-command
+ (read-shell-command "Default Grep Command: " grep-command)))
+ :active (fboundp 'grep)
+ ]
+ )
+ ("%_Compile"
+ :filter
+ (lambda (menu)
+ (if (or (not (boundp 'compile-history)) (null compile-history))
+ menu
+ (let ((items
+ (submenu-generate-accelerator-spec
+ (mapcar #'(lambda (string)
+ (vector string
+ (list 'compile string)))
+ (menu-truncate-list compile-history 10)))))
+ (append menu '("---") items))))
+ ["%_Compile..." compile :active (fboundp 'compile)]
+ ["%_Repeat Compilation" recompile :active (fboundp 'recompile)]
+ ["%_Kill Compilation" kill-compilation
+ :active (and (fboundp 'kill-compilation)
+ (fboundp 'compilation-find-buffer)
+ (let ((buffer (condition-case nil
+ (compilation-find-buffer)
+ (error nil))))
+ (and buffer (get-buffer-process buffer))))]
+ "---"
+ ["%_Next Error" next-error
+ :active (and (fboundp 'compilation-errors-exist-p)
+ (compilation-errors-exist-p))]
+ ["Pre%_vious Error" previous-error
+ :active (and (fboundp 'compilation-errors-exist-p)
+ (compilation-errors-exist-p))]
+ ["%_First Error" first-error
+ :active (and (fboundp 'compilation-errors-exist-p)
+ (compilation-errors-exist-p))]
+ ["G%_oto Error" compile-goto-error
+ :active (and (fboundp 'compilation-errors-exist-p)
+ (compilation-errors-exist-p))]
+ )
+ ("%_Debug"
+ ["%_GDB..." gdb
+ :active (fboundp 'gdb)]
+ ["%_DBX..." dbx
+ :active (fboundp 'dbx)])
+ ("%_Shell"
+ ["%_Shell" shell
+ :active (fboundp 'shell)]
+ ["S%_hell Command..." shell-command
+ :active (fboundp 'shell-command)]
+ ["Shell Command on %_Region..." shell-command-on-region
+ :active (and (fboundp 'shell-command-on-region) (region-exists-p))])
+
+ ("%_Tags"
+ ["%_Find Tag..." find-tag]
+ ["Find %_Other Window..." find-tag-other-window]
+ ["%_Next Tag..." (find-tag nil)]
+ ["N%_ext Other Window..." (find-tag-other-window nil)]
+ ["Next %_File" next-file]
+ "-----"
+ ["Tags %_Search..." tags-search]
+ ["Tags %_Replace..." tags-query-replace]
+ ["%_Continue Search/Replace" tags-loop-continue]
+ "-----"
+ ["%_Pop stack" pop-tag-mark]
+ ["%_Apropos..." tags-apropos]
+ "-----"
+ ["%_Set Tags Table File..." visit-tags-table]
+ )
+
"----"
- ("Calendar"
- ["3-Month Calendar" calendar
+
+ ("Ca%_lendar"
+ ["%_3-Month Calendar" calendar
:active (fboundp 'calendar)]
- ["Diary" diary
+ ["%_Diary" diary
:active (fboundp 'diary)]
- ["Holidays" holidays
+ ["%_Holidays" holidays
:active (fboundp 'holidays)]
;; we're all pagans at heart ...
- ["Phases of the Moon" phases-of-moon
+ ["%_Phases of the Moon" phases-of-moon
:active (fboundp 'phases-of-moon)]
- ["Sunrise/Sunset" sunrise-sunset
+ ["%_Sunrise/Sunset" sunrise-sunset
:active (fboundp 'sunrise-sunset)])
- ("Games"
- ["Mine Game" xmine
+ ("Ga%_mes"
+ ["%_Mine Game" xmine
:active (fboundp 'xmine)]
- ["Tetris" tetris
+ ["%_Tetris" tetris
:active (fboundp 'tetris)]
- ["Sokoban" sokoban
+ ["%_Sokoban" sokoban
:active (fboundp 'sokoban)]
- ["Quote from Zippy" yow
+ ["Quote from %_Zippy" yow
:active (fboundp 'yow)]
- ["Psychoanalyst" doctor
+ ["%_Psychoanalyst" doctor
:active (fboundp 'doctor)]
- ["Psychoanalyze Zippy!" psychoanalyze-pinhead
+ ["Ps%_ychoanalyze Zippy!" psychoanalyze-pinhead
:active (fboundp 'psychoanalyze-pinhead)]
- ["Random Flames" flame
+ ["%_Random Flames" flame
:active (fboundp 'flame)]
- ["Dunnet (Adventure)" dunnet
+ ["%_Dunnet (Adventure)" dunnet
:active (fboundp 'dunnet)]
- ["Towers of Hanoi" hanoi
+ ["Towers of %_Hanoi" hanoi
:active (fboundp 'hanoi)]
- ["Game of Life" life
+ ["Game of %_Life" life
:active (fboundp 'life)]
- ["Multiplication Puzzle" mpuz
- :active (fboundp 'mpuz)]))
-
- ("Options"
- ("Customize"
- ("Emacs" :filter (lambda (&rest junk)
- (cdr (custom-menu-create 'emacs))))
- ["Group..." customize-group]
- ["Variable..." customize-variable]
- ["Face..." customize-face]
- ["Saved..." customize-saved]
- ["Set..." customize-customized]
- ["Apropos..." customize-apropos]
- ["Browse..." customize-browse])
-
- ("Manage Packages"
- ("Add Download Site"
+ ["M%_ultiplication Puzzle" mpuz
+ :active (fboundp 'mpuz)])
+
+ "----"
+ )
+
+ ("%_Options"
+ ("%_Advanced (Customize)"
+ ("%_Emacs" :filter (lambda (&rest junk)
+ (cdr (custom-menu-create 'emacs))))
+ ["%_Group..." customize-group]
+ ["%_Variable..." customize-variable]
+ ["%_Face..." customize-face]
+ ["%_Saved..." customize-saved]
+ ["Se%_t..." customize-customized]
+ ["%_Apropos..." customize-apropos]
+ ["%_Browse..." customize-browse])
+ ("Manage %_Packages"
+ ("%_Add Download Site"
:filter (lambda (&rest junk)
- (package-get-download-menu)))
- ["Update Package Index" package-get-update-base]
- ["List & Install" pui-list-packages]
- ["Update Installed Packages" package-get-update-all]
+ (submenu-generate-accelerator-spec
+ (package-get-download-menu))))
+ ["%_Update Package Index" package-get-update-base]
+ ["%_List and Install" pui-list-packages]
+ ["U%_pdate Installed Packages" package-get-update-all]
;; hack-o-matic, we can't force a load of package-base here
;; since it triggers dialog box interactions which we can't
;; deal with while using a menu
- ("Using Custom"
+ ("Using %_Custom"
:filter (lambda (&rest junk)
(if package-get-base
- (cdr (custom-menu-create 'packages))
- '(["Please load Package Index" (lamda (&rest junk) ()) nil]))))
+ (submenu-generate-accelerator-spec
+ (cdr (custom-menu-create 'packages)))
+ '(["Please load Package Index"
+ (lamda (&rest junk) ()) nil]))))
- ["Help" (Info-goto-node "(xemacs)Packages")])
-
+ ["%_Help" (Info-goto-node "(xemacs)Packages")])
"---"
-
- ("Editing Options"
- ["Overstrike"
+ ("%_Keyboard and Mouse"
+ ["%_Abbrev Mode"
+ (customize-set-variable 'abbrev-mode
+ (not (default-value 'abbrev-mode)))
+ :style toggle
+ :selected (default-value 'abbrev-mode)]
+ ["%_Delete Key Deletes Selection"
+ (customize-set-variable 'pending-delete-mode (not pending-delete-mode))
+ :style toggle
+ :selected (and (boundp 'pending-delete-mode) pending-delete-mode)
+ :active (boundp 'pending-delete-mode)]
+ ["%_Yank/Kill Interact With Clipboard"
+ (if (eq interprogram-cut-function 'own-clipboard)
+ (progn
+ (customize-set-variable 'interprogram-cut-function nil)
+ (customize-set-variable 'interprogram-paste-function nil))
+ (customize-set-variable 'interprogram-cut-function 'own-clipboard)
+ (customize-set-variable 'interprogram-paste-function 'get-clipboard))
+ :style toggle
+ :selected (eq interprogram-cut-function 'own-clipboard)]
+ ["%_Overstrike"
(progn
(setq overwrite-mode (if overwrite-mode nil 'overwrite-mode-textual))
(customize-set-variable 'overwrite-mode overwrite-mode))
:style toggle :selected overwrite-mode]
- ["Case Sensitive Search"
+ ("`%_kill-line' Behavior..."
+ ["Kill %_Whole Line"
+ (customize-set-variable 'kill-whole-line 'always)
+ :style radio :selected (eq kill-whole-line 'always)]
+ ["Kill to %_End of Line"
+ (customize-set-variable 'kill-whole-line nil)
+ :style radio :selected (eq kill-whole-line nil)]
+ ["Kill Whole Line at %_Beg, Otherwise to End"
+ (customize-set-variable 'kill-whole-line t)
+ :style radio :selected (eq kill-whole-line t)])
+ ["Size for %_Block-Movement Commands..."
+ (customize-set-variable 'block-movement-size
+ (read-number "Block Movement Size: "
+ t block-movement-size))]
+ ["%_VI Emulation"
+ (progn
+ (toggle-viper-mode)
+ (customize-set-variable 'viper-mode viper-mode))
+ :style toggle :selected (and (boundp 'viper-mode) viper-mode)
+ :active (fboundp 'toggle-viper-mode)]
+ ["Active Re%_gions"
+ (customize-set-variable 'zmacs-regions (not zmacs-regions))
+ :style toggle :selected zmacs-regions]
+ "----"
+ ["%_Set Key..." global-set-key]
+ ["%_Unset Key..." global-unset-key]
+ "---"
+ ["%_Case Sensitive Search"
(customize-set-variable 'case-fold-search
(setq case-fold-search (not case-fold-search)))
:style toggle :selected (not case-fold-search)]
- ["Case Matching Replace"
+ ["Case Matching %_Replace"
(customize-set-variable 'case-replace (not case-replace))
:style toggle :selected case-replace]
- ["Auto Delete Selection"
- (customize-set-variable 'pending-delete-mode (not pending-delete-mode))
- :style toggle
- :selected (and (boundp 'pending-delete-mode) pending-delete-mode)
- :active (boundp 'pending-delete-mode)]
- ["Active Regions"
- (customize-set-variable 'zmacs-regions (not zmacs-regions))
- :style toggle :selected zmacs-regions]
- ["Mouse Paste At Text Cursor"
- (customize-set-variable 'mouse-yank-at-point (not mouse-yank-at-point))
- :style toggle :selected mouse-yank-at-point]
- ("Newline at end of file..."
- ["Don't require"
+ "---"
+ ("%_Newline at End of File..."
+ ["%_Don't Require"
(customize-set-variable 'require-final-newline nil)
:style radio :selected (not require-final-newline)]
- ["Require"
+ ["%_Require"
(customize-set-variable 'require-final-newline t)
:style radio :selected (eq require-final-newline t)]
- ["Ask"
+ ["%_Ask"
(customize-set-variable 'require-final-newline 'ask)
:style radio :selected (and require-final-newline
(not (eq require-final-newline t)))])
- ["Add Newline When Moving Past End"
+ ["Add Newline When Moving Past %_End"
(customize-set-variable 'next-line-add-newlines
(not next-line-add-newlines))
:style toggle :selected next-line-add-newlines]
+ "---"
+ ["%_Mouse Paste at Text Cursor"
+ (customize-set-variable 'mouse-yank-at-point (not mouse-yank-at-point))
+ :style toggle :selected mouse-yank-at-point]
+ ["A%_void Text..."
+ (customize-set-variable 'mouse-avoidance-mode
+ (if mouse-avoidance-mode nil 'banish))
+ :style toggle
+ :selected (and (boundp 'mouse-avoidance-mode) mouse-avoidance-mode)
+ :active (and (boundp 'mouse-avoidance-mode)
+ (device-on-window-system-p))]
+ ["%_Strokes Mode"
+ (customize-set-variable 'strokes-mode (not strokes-mode))
+ :style toggle
+ :selected (and (boundp 'strokes-mode) strokes-mode)
+ :active (and (boundp 'strokes-mode)
+ (device-on-window-system-p))]
)
- ("General Options"
- ["Teach Extended Commands"
+ ("%_General"
+ ["This Buffer %_Read Only" (toggle-read-only)
+ :style toggle :selected buffer-read-only]
+ ["%_Teach Extended Commands"
(customize-set-variable 'teach-extended-commands-p
(not teach-extended-commands-p))
:style toggle :selected teach-extended-commands-p]
- ["Debug On Error"
+ ["Debug on %_Error"
(customize-set-variable 'debug-on-error (not debug-on-error))
:style toggle :selected debug-on-error]
- ["Debug On Quit"
+ ["Debug on %_Quit"
(customize-set-variable 'debug-on-quit (not debug-on-quit))
:style toggle :selected debug-on-quit]
+ ["Debug on %_Signal"
+ (customize-set-variable 'debug-on-signal (not debug-on-signal))
+ :style toggle :selected debug-on-signal]
)
- ("Printing Options"
- ["Command-Line Switches for `lpr'/`lp'..."
+
+ ("%_Printing"
+ ["Set Printer %_Name for Generic Print Support..."
+ (customize-set-variable
+ 'printer-name
+ (read-string "Set printer name: " printer-name))]
+ "---"
+ ["Command-Line %_Switches for `lpr'/`lp'..."
;; better to directly open a customization buffer, since the value
;; must be a list of strings, which is somewhat complex to prompt for.
(customize-variable 'lpr-switches)
(boundp 'lpr-switches)]
- ("Pretty-Print Paper Size"
- ["Letter"
+ ("%_Pretty-Print Paper Size"
+ ["%_Letter"
(customize-set-variable 'ps-paper-type 'letter)
:style radio
:selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'letter))
:active (boundp 'ps-paper-type)]
- ["Letter-small"
+ ["Lette%_r-Small"
(customize-set-variable 'ps-paper-type 'letter-small)
:style radio
:selected (and (boundp 'ps-paper-type)
(eq ps-paper-type 'letter-small))
:active (boundp 'ps-paper-type)]
- ["Legal"
+ ["Le%_gal"
(customize-set-variable 'ps-paper-type 'legal)
:style radio
:selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'legal))
:active (boundp 'ps-paper-type)]
- ["Statement"
+ ["%_Statement"
(customize-set-variable 'ps-paper-type 'statement)
:style radio
:selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'statement))
:active (boundp 'ps-paper-type)]
- ["Executive"
+ ["%_Executive"
(customize-set-variable 'ps-paper-type 'executive)
:style radio
:selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'executive))
:active (boundp 'ps-paper-type)]
- ["Tabloid"
+ ["%_Tabloid"
(customize-set-variable 'ps-paper-type 'tabloid)
:style radio
:selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'tabloid))
:active (boundp 'ps-paper-type)]
- ["Ledger"
+ ["Le%_dger"
(customize-set-variable 'ps-paper-type 'ledger)
:style radio
:selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'ledger))
:active (boundp 'ps-paper-type)]
- ["A3"
+ ["A%_3"
(customize-set-variable 'ps-paper-type 'a3)
:style radio
:selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a3))
:active (boundp 'ps-paper-type)]
- ["A4"
+ ["%_A4"
(customize-set-variable 'ps-paper-type 'a4)
:style radio
:selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a4))
:active (boundp 'ps-paper-type)]
- ["A4small"
+ ["A4s%_mall"
(customize-set-variable 'ps-paper-type 'a4small)
:style radio
:selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a4small))
:active (boundp 'ps-paper-type)]
- ["B4"
+ ["B%_4"
(customize-set-variable 'ps-paper-type 'b4)
:style radio
:selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'b4))
:active (boundp 'ps-paper-type)]
- ["B5"
+ ["%_B5"
(customize-set-variable 'ps-paper-type 'b5)
:style radio
:selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'b5))
:active (boundp 'ps-paper-type)]
)
- ["Color Printing"
+ ["%_Color Printing"
(cond (ps-print-color-p
(customize-set-variable 'ps-print-color-p nil)
;; I'm wondering whether all this muck is useful.
:style toggle
:selected (and (boundp 'ps-print-color-p) ps-print-color-p)
:active (boundp 'ps-print-color-p)])
- ("\"Other Window\" Location"
- ["Always in Same Frame"
+ ("%_Internet"
+ ("%_Compose Mail With"
+ ["Default Emacs Mailer"
+ (customize-set-variable 'mail-user-agent 'sendmail-user-agent)
+ :style radio
+ :selected (eq mail-user-agent 'sendmail-user-agent)]
+ ["MH"
+ (customize-set-variable 'mail-user-agent 'mh-e-user-agent)
+ :style radio
+ :selected (eq mail-user-agent 'mh-e-user-agent)
+ :active (get 'mh-e-user-agent 'composefunc)]
+ ["GNUS"
+ (customize-set-variable 'mail-user-agent 'message-user-agent)
+ :style radio
+ :selected (eq mail-user-agent 'message-user-agent)
+ :active (get 'message-user-agent 'composefunc)]
+ )
+ ["Set My %_Email Address..."
(customize-set-variable
- 'get-frame-for-buffer-default-instance-limit nil)
- :style radio
- :selected (null get-frame-for-buffer-default-instance-limit)]
- ["Other Frame (2 Frames Max)"
- (customize-set-variable 'get-frame-for-buffer-default-instance-limit 2)
- :style radio
- :selected (eq 2 get-frame-for-buffer-default-instance-limit)]
- ["Other Frame (3 Frames Max)"
- (customize-set-variable 'get-frame-for-buffer-default-instance-limit 3)
- :style radio
- :selected (eq 3 get-frame-for-buffer-default-instance-limit)]
- ["Other Frame (4 Frames Max)"
- (customize-set-variable 'get-frame-for-buffer-default-instance-limit 4)
- :style radio
- :selected (eq 4 get-frame-for-buffer-default-instance-limit)]
- ["Other Frame (5 Frames Max)"
- (customize-set-variable 'get-frame-for-buffer-default-instance-limit 5)
- :style radio
- :selected (eq 5 get-frame-for-buffer-default-instance-limit)]
- ["Always Create New Frame"
- (customize-set-variable 'get-frame-for-buffer-default-instance-limit 0)
- :style radio
- :selected (eq 0 get-frame-for-buffer-default-instance-limit)]
- "-----"
- ["Temp Buffers Always in Same Frame"
- (customize-set-variable 'temp-buffer-show-function
- 'show-temp-buffer-in-current-frame)
- :style radio
- :selected (eq temp-buffer-show-function
- 'show-temp-buffer-in-current-frame)]
- ["Temp Buffers Like Other Buffers"
- (customize-set-variable 'temp-buffer-show-function nil)
- :style radio
- :selected (null temp-buffer-show-function)]
- "-----"
- ["Make current frame gnuserv target"
- (customize-set-variable 'gnuserv-frame (if (eq gnuserv-frame t) nil t))
- :style toggle
- :selected (and (boundp 'gnuserv-frame) (eq gnuserv-frame t))
- :active (boundp 'gnuserv-frame)]
- )
- "-----"
- ("Syntax Highlighting"
- ["In This Buffer"
- (progn ;; becomes buffer local
- (font-lock-mode)
- (customize-set-variable 'font-lock-mode font-lock-mode))
- :style toggle
- :selected (and (boundp 'font-lock-mode) font-lock-mode)
- :active (boundp 'font-lock-mode)]
- ["Automatic"
- (customize-set-variable 'font-lock-auto-fontify
- (not font-lock-auto-fontify))
- :style toggle
- :selected (and (boundp 'font-lock-auto-fontify) font-lock-auto-fontify)
- :active (fboundp 'font-lock-mode)]
- "-----"
- ["Fonts"
- (progn
- (require 'font-lock)
- (font-lock-use-default-fonts)
- (customize-set-variable 'font-lock-use-fonts t)
- (customize-set-variable 'font-lock-use-colors nil)
- (font-lock-mode 1))
- :style radio
- :selected (and (boundp 'font-lock-use-fonts) font-lock-use-fonts)
- :active (fboundp 'font-lock-mode)]
- ["Colors"
- (progn
- (require 'font-lock)
- (font-lock-use-default-colors)
- (customize-set-variable 'font-lock-use-colors t)
- (customize-set-variable 'font-lock-use-fonts nil)
- (font-lock-mode 1))
- :style radio
- :selected (and (boundp 'font-lock-use-colors) font-lock-use-colors)
- :active (boundp 'font-lock-mode)]
- "-----"
- ["Least"
- (progn
- (require 'font-lock)
- (if (or (and (not (integerp font-lock-maximum-decoration))
- (not (eq t font-lock-maximum-decoration)))
- (and (integerp font-lock-maximum-decoration)
- (<= font-lock-maximum-decoration 0)))
- nil
- (customize-set-variable 'font-lock-maximum-decoration nil)
- (font-lock-recompute-variables)))
- :style radio
- :active (fboundp 'font-lock-mode)
- :selected (and (boundp 'font-lock-maximium-decoration)
- (or (and (not (integerp font-lock-maximum-decoration))
- (not (eq t font-lock-maximum-decoration)))
- (and (integerp font-lock-maximum-decoration)
- (<= font-lock-maximum-decoration 0))))]
- ["More"
- (progn
- (require 'font-lock)
- (if (and (integerp font-lock-maximum-decoration)
- (= 1 font-lock-maximum-decoration))
- nil
- (customize-set-variable 'font-lock-maximum-decoration 1)
- (font-lock-recompute-variables)))
- :style radio
- :active (fboundp 'font-lock-mode)
- :selected (and (boundp 'font-lock-maximium-decoration)
- (integerp font-lock-maximum-decoration)
- (= 1 font-lock-maximum-decoration))]
- ["Even More"
+ 'user-mail-address
+ (read-string "Set email address: " user-mail-address))]
+ ["Set %_Machine Email Name..."
+ (customize-set-variable
+ 'mail-host-address
+ (read-string "Set machine email name: " mail-host-address))]
+ ["Set %_SMTP Server..."
(progn
- (require 'font-lock)
- (if (and (integerp font-lock-maximum-decoration)
- (= 2 font-lock-maximum-decoration))
- nil
- (customize-set-variable 'font-lock-maximum-decoration 2)
- (font-lock-recompute-variables)))
- :style radio
- :active (fboundp 'font-lock-mode)
- :selected (and (boundp 'font-lock-maximum-decoration)
- (integerp font-lock-maximum-decoration)
- (= 2 font-lock-maximum-decoration))]
- ["Most"
+ (require 'smtpmail)
+ (customize-set-variable
+ 'smtpmail-smtp-server
+ (read-string "Set SMTP server: " smtpmail-smtp-server)))
+ :active (and (boundp 'send-mail-function)
+ (eq send-mail-function 'smtpmail-send-it))]
+ ["SMTP %_Debug Info"
(progn
- (require 'font-lock)
- (if (or (eq font-lock-maximum-decoration t)
- (and (integerp font-lock-maximum-decoration)
- (>= font-lock-maximum-decoration 3)))
- nil
- (customize-set-variable 'font-lock-maximum-decoration t)
- (font-lock-recompute-variables)))
- :style radio
- :active (fboundp 'font-lock-mode)
- :selected (and (boundp 'font-lock-maximum-decoration)
- (or (eq font-lock-maximum-decoration t)
- (and (integerp font-lock-maximum-decoration)
- (>= font-lock-maximum-decoration 3))))]
- "-----"
- ["Lazy"
- (progn ;; becomes buffer local
- (lazy-shot-mode)
- (customize-set-variable 'lazy-shot-mode lazy-shot-mode)
- ;; this shouldn't be necessary so there has to
- ;; be a redisplay bug lurking somewhere (or
- ;; possibly another event handler bug)
- (redraw-modeline))
- :active (and (boundp 'font-lock-mode) (boundp 'lazy-shot-mode)
- font-lock-mode)
+ (require 'smtpmail)
+ (customize-set-variable 'smtpmail-debug-info
+ (not smtpmail-debug-info)))
:style toggle
- :selected (and (boundp 'lazy-shot-mode) lazy-shot-mode)]
- ["Caching"
- (progn ;; becomes buffer local
- (fast-lock-mode)
- (customize-set-variable 'fast-lock-mode fast-lock-mode)
- ;; this shouldn't be necessary so there has to
- ;; be a redisplay bug lurking somewhere (or
- ;; possibly another event handler bug)
- (redraw-modeline))
- :active (and (boundp 'font-lock-mode) (boundp 'fast-lock-mode)
- font-lock-mode)
- :style toggle
- :selected (and (boundp 'fast-lock-mode) fast-lock-mode)]
- )
- ("Paren Highlighting"
- ["None"
- (customize-set-variable 'paren-mode nil)
- :style radio
- :selected (and (boundp 'paren-mode) (not paren-mode))
- :active (boundp 'paren-mode)]
- ["Blinking Paren"
- (customize-set-variable 'paren-mode 'blink-paren)
- :style radio
- :selected (and (boundp 'paren-mode) (eq paren-mode 'blink-paren))
- :active (boundp 'paren-mode)]
- ["Steady Paren"
- (customize-set-variable 'paren-mode 'paren)
- :style radio
- :selected (and (boundp 'paren-mode) (eq paren-mode 'paren))
- :active (boundp 'paren-mode)]
- ["Expression"
- (customize-set-variable 'paren-mode 'sexp)
- :style radio
- :selected (and (boundp 'paren-mode) (eq paren-mode 'sexp))
- :active (boundp 'paren-mode)]
-;; ["Nested Shading"
-;; (customize-set-variable 'paren-mode 'nested)
-;; :style radio
-;; :selected (and (boundp 'paren-mode) (eq paren-mode 'nested))
-;; :active (boundp 'paren-mode)]
- )
+ :selected (and (boundp 'smtpmail-debug-info) smtpmail-debug-info)
+ :active (and (boundp 'send-mail-function)
+ (eq send-mail-function 'smtpmail-send-it))]
+ "---"
+ ("%_Open URLs With"
+ ["%_Emacs-W3"
+ (customize-set-variable 'browse-url-browser-function 'browse-url-w3)
+ :style radio
+ :selected (and (boundp 'browse-url-browser-function)
+ (eq browse-url-browser-function 'browse-url-w3))
+ :active (and (boundp 'browse-url-browser-function)
+ (fboundp 'browse-url-w3)
+ (fboundp 'w3-fetch))]
+ ["%_Netscape"
+ (customize-set-variable 'browse-url-browser-function
+ 'browse-url-netscape)
+ :style radio
+ :selected (and (boundp 'browse-url-browser-function)
+ (eq browse-url-browser-function 'browse-url-netscape))
+ :active (and (boundp 'browse-url-browser-function)
+ (fboundp 'browse-url-netscape))]
+ ["%_Mosaic"
+ (customize-set-variable 'browse-url-browser-function
+ 'browse-url-mosaic)
+ :style radio
+ :selected (and (boundp 'browse-url-browser-function)
+ (eq browse-url-browser-function 'browse-url-mosaic))
+ :active (and (boundp 'browse-url-browser-function)
+ (fboundp 'browse-url-mosaic))]
+ ["Mosaic (%_CCI)"
+ (customize-set-variable 'browse-url-browser-function 'browse-url-cci)
+ :style radio
+ :selected (and (boundp 'browse-url-browser-function)
+ (eq browse-url-browser-function 'browse-url-cci))
+ :active (and (boundp 'browse-url-browser-function)
+ (fboundp 'browse-url-cci))]
+ ["%_IXI Mosaic"
+ (customize-set-variable 'browse-url-browser-function
+ 'browse-url-iximosaic)
+ :style radio
+ :selected (and (boundp 'browse-url-browser-function)
+ (eq browse-url-browser-function 'browse-url-iximosaic))
+ :active (and (boundp 'browse-url-browser-function)
+ (fboundp 'browse-url-iximosaic))]
+ ["%_Lynx (xterm)"
+ (customize-set-variable 'browse-url-browser-function
+ 'browse-url-lynx-xterm)
+ :style radio
+ :selected (and (boundp 'browse-url-browser-function)
+ (eq browse-url-browser-function 'browse-url-lynx-xterm))
+ :active (and (boundp 'browse-url-browser-function)
+ (fboundp 'browse-url-lynx-xterm))]
+ ["L%_ynx (xemacs)"
+ (customize-set-variable 'browse-url-browser-function
+ 'browse-url-lynx-emacs)
+ :style radio
+ :selected (and (boundp 'browse-url-browser-function)
+ (eq browse-url-browser-function 'browse-url-lynx-emacs))
+ :active (and (boundp 'browse-url-browser-function)
+ (fboundp 'browse-url-lynx-emacs))]
+ ["%_Grail"
+ (customize-set-variable 'browse-url-browser-function
+ 'browse-url-grail)
+ :style radio
+ :selected (and (boundp 'browse-url-browser-function)
+ (eq browse-url-browser-function 'browse-url-grail))
+ :active (and (boundp 'browse-url-browser-function)
+ (fboundp 'browse-url-grail))]
+ ["%_Kfm"
+ (customize-set-variable 'browse-url-browser-function
+ 'browse-url-kfm)
+ :style radio
+ :selected (and (boundp 'browse-url-browser-function)
+ (eq browse-url-browser-function 'browse-url-kfm))
+ :active (and (boundp 'browse-url-browser-function)
+ (fboundp 'browse-url-kfm))]
+ ))
+
+
"-----"
- ("Frame Appearance"
- ["Frame-Local Font Menu"
- (customize-set-variable 'font-menu-this-frame-only-p
- (not font-menu-this-frame-only-p))
- :style toggle
- :selected (and (boundp 'font-menu-this-frame-only-p)
- font-menu-this-frame-only-p)]
+ ("Display"
,@(if (featurep 'scrollbar)
- '(["Scrollbars"
+ '(["%_Scrollbars"
(customize-set-variable 'scrollbars-visible-p
(not scrollbars-visible-p))
:style toggle
;; off through the Options menu. I would have uncommented this
;; source, but the code for saving options would not save the
;; modeline 3D-ness. Grrr. --hniksic
-;; ["3D Modeline"
-;; (progn
-;; (if (zerop (specifier-instance modeline-shadow-thickness))
-;; (set-specifier modeline-shadow-thickness 2)
-;; (set-specifier modeline-shadow-thickness 0))
-;; (redraw-modeline t))
-;; :style toggle
-;; :selected (let ((thickness
-;; (specifier-instance modeline-shadow-thickness)))
-;; (and (integerp thickness)
-;; (> thickness 0)))]
- ["Truncate Lines"
- (progn ;; becomes buffer-local
+ ;; ["%_3D Modeline"
+ ;; (progn
+ ;; (if (zerop (specifier-instance modeline-shadow-thickness))
+ ;; (set-specifier modeline-shadow-thickness 2)
+ ;; (set-specifier modeline-shadow-thickness 0))
+ ;; (redraw-modeline t))
+ ;; :style toggle
+ ;; :selected (let ((thickness
+ ;; (specifier-instance modeline-shadow-thickness)))
+ ;; (and (integerp thickness)
+ ;; (> thickness 0)))]
+ ["%_Truncate Lines"
+ (progn;; becomes buffer-local
(setq truncate-lines (not truncate-lines))
(customize-set-variable 'truncate-lines truncate-lines))
:style toggle
:selected truncate-lines]
- ["Blinking Cursor"
+ ["%_Blinking Cursor"
(customize-set-variable 'blink-cursor-mode (not blink-cursor-mode))
:style toggle
:selected (and (boundp 'blink-cursor-mode) blink-cursor-mode)
:active (boundp 'blink-cursor-mode)]
"-----"
- ["Block cursor"
+ ["Bl%_ock Cursor"
(progn
(customize-set-variable 'bar-cursor nil)
(force-cursor-redisplay))
:style radio
:selected (null bar-cursor)]
- ["Bar cursor (1 pixel)"
+ ["Bar Cursor (%_1 Pixel)"
(progn
(customize-set-variable 'bar-cursor t)
(force-cursor-redisplay))
:style radio
:selected (eq bar-cursor t)]
- ["Bar cursor (2 pixels)"
+ ["Bar Cursor (%_2 Pixels)"
(progn
(customize-set-variable 'bar-cursor 2)
(force-cursor-redisplay))
:style radio
:selected (and bar-cursor (not (eq bar-cursor t)))]
"------"
- ["Line Numbers"
+ ["%_Line Numbers"
(progn
(customize-set-variable 'line-number-mode (not line-number-mode))
(redraw-modeline))
:style toggle :selected line-number-mode]
- ["Column Numbers"
+ ["%_Column Numbers"
(progn
(customize-set-variable 'column-number-mode
(not column-number-mode))
(redraw-modeline))
:style toggle :selected column-number-mode]
- )
- ("Menubar Appearance"
- ["Buffers Menu Length..."
+
+ ("\"Other %_Window\" Location"
+ ["%_Always in Same Frame"
+ (customize-set-variable
+ 'get-frame-for-buffer-default-instance-limit nil)
+ :style radio
+ :selected (null get-frame-for-buffer-default-instance-limit)]
+ ["Other Frame (%_2 Frames Max)"
+ (customize-set-variable 'get-frame-for-buffer-default-instance-limit 2)
+ :style radio
+ :selected (eq 2 get-frame-for-buffer-default-instance-limit)]
+ ["Other Frame (%_3 Frames Max)"
+ (customize-set-variable 'get-frame-for-buffer-default-instance-limit 3)
+ :style radio
+ :selected (eq 3 get-frame-for-buffer-default-instance-limit)]
+ ["Other Frame (%_4 Frames Max)"
+ (customize-set-variable 'get-frame-for-buffer-default-instance-limit 4)
+ :style radio
+ :selected (eq 4 get-frame-for-buffer-default-instance-limit)]
+ ["Other Frame (%_5 Frames Max)"
+ (customize-set-variable 'get-frame-for-buffer-default-instance-limit 5)
+ :style radio
+ :selected (eq 5 get-frame-for-buffer-default-instance-limit)]
+ ["Always Create %_New Frame"
+ (customize-set-variable 'get-frame-for-buffer-default-instance-limit 0)
+ :style radio
+ :selected (eq 0 get-frame-for-buffer-default-instance-limit)]
+ "-----"
+ ["%_Temp Buffers Always in Same Frame"
+ (customize-set-variable 'temp-buffer-show-function
+ 'show-temp-buffer-in-current-frame)
+ :style radio
+ :selected (eq temp-buffer-show-function
+ 'show-temp-buffer-in-current-frame)]
+ ["Temp Buffers %_Like Other Buffers"
+ (customize-set-variable 'temp-buffer-show-function nil)
+ :style radio
+ :selected (null temp-buffer-show-function)]
+ "-----"
+ ["%_Make Current Frame Gnuserv Target"
+ (customize-set-variable 'gnuserv-frame (if (eq gnuserv-frame t) nil t))
+ :style toggle
+ :selected (and (boundp 'gnuserv-frame) (eq gnuserv-frame t))
+ :active (boundp 'gnuserv-frame)]
+ )
+ )
+ ("%_Menubars"
+ ["%_Frame-Local Font Menu"
+ (customize-set-variable 'font-menu-this-frame-only-p
+ (not font-menu-this-frame-only-p))
+ :style toggle
+ :selected (and (boundp 'font-menu-this-frame-only-p)
+ font-menu-this-frame-only-p)]
+ ["%_Alt/Meta Selects Menu Items"
+ (if (eq menu-accelerator-enabled 'menu-force)
+ (customize-set-variable 'menu-accelerator-enabled nil)
+ (customize-set-variable 'menu-accelerator-enabled 'menu-force))
+ :style toggle
+ :selected (eq menu-accelerator-enabled 'menu-force)]
+ "----"
+ ["Buffers Menu %_Length..."
(customize-set-variable
'buffers-menu-max-size
;; would it be better to open a customization buffer ?
(read-number
"Enter number of buffers to display (or 0 for unlimited): ")))
(if (eq val 0) nil val)))]
- ["Multi-Operation Buffers Sub-Menus"
+ ["%_Multi-Operation Buffers Sub-Menus"
(customize-set-variable 'complex-buffers-menu-p
(not complex-buffers-menu-p))
:style toggle
:selected complex-buffers-menu-p]
- ("Buffers Menu Sorting"
- ["Most Recently Used"
+ ["S%_ubmenus for Buffer Groups"
+ (customize-set-variable 'buffers-menu-submenus-for-groups-p
+ (not buffers-menu-submenus-for-groups-p))
+ :style toggle
+ :selected buffers-menu-submenus-for-groups-p]
+ ["%_Verbose Buffer Menu Entries"
+ (if (eq buffers-menu-format-buffer-line-function
+ 'slow-format-buffers-menu-line)
+ (customize-set-variable 'buffers-menu-format-buffer-line-function
+ 'format-buffers-menu-line)
+ (customize-set-variable 'buffers-menu-format-buffer-line-function
+ 'slow-format-buffers-menu-line))
+ :style toggle
+ :selected (eq buffers-menu-format-buffer-line-function
+ 'slow-format-buffers-menu-line)]
+ ("Buffers Menu %_Sorting"
+ ["%_Most Recently Used"
(progn
(customize-set-variable 'buffers-menu-sort-function nil)
(customize-set-variable 'buffers-menu-grouping-function nil))
:style radio
:selected (null buffers-menu-sort-function)]
- ["Alphabetically"
+ ["%_Alphabetically"
(progn
(customize-set-variable 'buffers-menu-sort-function
'sort-buffers-menu-alphabetically)
:style radio
:selected (eq 'sort-buffers-menu-alphabetically
buffers-menu-sort-function)]
- ["By Major Mode, Then Alphabetically"
+ ["%_By Major Mode, Then Alphabetically"
(progn
(customize-set-variable
'buffers-menu-sort-function
:style radio
:selected (eq 'sort-buffers-menu-by-mode-then-alphabetically
buffers-menu-sort-function)])
- ["Submenus for Buffer Groups"
- (customize-set-variable 'buffers-menu-submenus-for-groups-p
- (not buffers-menu-submenus-for-groups-p))
- :style toggle
- :selected buffers-menu-submenus-for-groups-p]
"---"
- ["Ignore Scaled Fonts"
+ ["%_Ignore Scaled Fonts"
(customize-set-variable 'font-menu-ignore-scaled-fonts
(not font-menu-ignore-scaled-fonts))
:style toggle
font-menu-ignore-scaled-fonts)]
)
,@(if (featurep 'toolbar)
- '(("Toolbar Appearance"
- ["Visible"
+ '(("%_Toolbars"
+ ["%_Visible"
(customize-set-variable 'toolbar-visible-p
(not toolbar-visible-p))
:style toggle
:selected toolbar-visible-p]
- ["Captioned"
+ ["%_Captioned"
(customize-set-variable 'toolbar-captioned-p
(not toolbar-captioned-p))
:style toggle
:selected toolbar-captioned-p]
- ("Default Location"
- ["Top"
+ ("%_Default Location"
+ ["%_Top"
(customize-set-variable 'default-toolbar-position 'top)
:style radio
:selected (eq default-toolbar-position 'top)]
- ["Bottom"
+ ["%_Bottom"
(customize-set-variable 'default-toolbar-position 'bottom)
:style radio
:selected (eq default-toolbar-position 'bottom)]
- ["Left"
+ ["%_Left"
(customize-set-variable 'default-toolbar-position 'left)
:style radio
:selected (eq default-toolbar-position 'left)]
- ["Right"
+ ["%_Right"
(customize-set-variable 'default-toolbar-position 'right)
:style radio
:selected (eq default-toolbar-position 'right)]
)
)))
,@(if (featurep 'gutter)
- '(("Gutter Appearance"
- ["Visible"
- (customize-set-variable 'gutter-visible-p
- (not gutter-visible-p))
+ '(("G%_utters"
+ ["Buffers Tab %_Visible"
+ (customize-set-variable 'gutter-buffers-tab-visible-p
+ (not gutter-buffers-tab-visible-p))
:style toggle
- :selected gutter-visible-p]
- ("Default Location"
- ["Top"
+ :selected gutter-buffers-tab-visible-p]
+ ("%_Default Location"
+ ["%_Top"
(customize-set-variable 'default-gutter-position 'top)
:style radio
:selected (eq default-gutter-position 'top)]
- ["Bottom"
+ ["%_Bottom"
(customize-set-variable 'default-gutter-position 'bottom)
:style radio
:selected (eq default-gutter-position 'bottom)]
- ["Left"
+ ["%_Left"
(customize-set-variable 'default-gutter-position 'left)
:style radio
:selected (eq default-gutter-position 'left)]
- ["Right"
+ ["%_Right"
(customize-set-variable 'default-gutter-position 'right)
:style radio
:selected (eq default-gutter-position 'right)]
)
)))
- ("Mouse"
- ["Avoid Text..."
- (customize-set-variable 'mouse-avoidance-mode
- (if mouse-avoidance-mode nil 'banish))
+ "-----"
+ ("S%_yntax Highlighting"
+ ["%_In This Buffer"
+ (progn;; becomes buffer local
+ (font-lock-mode)
+ (customize-set-variable 'font-lock-mode font-lock-mode))
:style toggle
- :selected (and (boundp 'mouse-avoidance-mode) mouse-avoidance-mode)
- :active (and (boundp 'mouse-avoidance-mode)
- (device-on-window-system-p))]
- ["strokes-mode"
- (customize-set-variable 'strokes-mode (not strokes-mode))
+ :selected (and (boundp 'font-lock-mode) font-lock-mode)
+ :active (boundp 'font-lock-mode)]
+ ["%_Automatic"
+ (customize-set-variable 'font-lock-auto-fontify
+ (not font-lock-auto-fontify))
:style toggle
- :selected (and (boundp 'strokes-mode) strokes-mode)
- :active (and (boundp 'strokes-mode)
- (device-on-window-system-p))]
- )
- ("Open URLs With"
- ["Emacs-W3"
- (customize-set-variable 'browse-url-browser-function 'browse-url-w3)
+ :selected (and (boundp 'font-lock-auto-fontify) font-lock-auto-fontify)
+ :active (fboundp 'font-lock-mode)]
+ "-----"
+ ["%_Fonts"
+ (progn
+ (require 'font-lock)
+ (font-lock-use-default-fonts)
+ (customize-set-variable 'font-lock-use-fonts t)
+ (customize-set-variable 'font-lock-use-colors nil)
+ (font-lock-mode 1))
:style radio
- :selected (and (boundp 'browse-url-browser-function)
- (eq browse-url-browser-function 'browse-url-w3))
- :active (and (boundp 'browse-url-browser-function)
- (fboundp 'browse-url-w3)
- (fboundp 'w3-fetch))]
- ["Netscape"
- (customize-set-variable 'browse-url-browser-function
- 'browse-url-netscape)
+ :selected (and (boundp 'font-lock-use-fonts) font-lock-use-fonts)
+ :active (fboundp 'font-lock-mode)]
+ ["%_Colors"
+ (progn
+ (require 'font-lock)
+ (font-lock-use-default-colors)
+ (customize-set-variable 'font-lock-use-colors t)
+ (customize-set-variable 'font-lock-use-fonts nil)
+ (font-lock-mode 1))
:style radio
- :selected (and (boundp 'browse-url-browser-function)
- (eq browse-url-browser-function 'browse-url-netscape))
- :active (and (boundp 'browse-url-browser-function)
- (fboundp 'browse-url-netscape))]
- ["Mosaic"
- (customize-set-variable 'browse-url-browser-function
- 'browse-url-mosaic)
+ :selected (and (boundp 'font-lock-use-colors) font-lock-use-colors)
+ :active (boundp 'font-lock-mode)]
+ "-----"
+ ["%_Least"
+ (progn
+ (require 'font-lock)
+ (if (or (and (not (integerp font-lock-maximum-decoration))
+ (not (eq t font-lock-maximum-decoration)))
+ (and (integerp font-lock-maximum-decoration)
+ (<= font-lock-maximum-decoration 0)))
+ nil
+ (customize-set-variable 'font-lock-maximum-decoration nil)
+ (font-lock-recompute-variables)))
:style radio
- :selected (and (boundp 'browse-url-browser-function)
- (eq browse-url-browser-function 'browse-url-mosaic))
- :active (and (boundp 'browse-url-browser-function)
- (fboundp 'browse-url-mosaic))]
- ["Mosaic (CCI)"
- (customize-set-variable 'browse-url-browser-function 'browse-url-cci)
+ :active (fboundp 'font-lock-mode)
+ :selected (and (boundp 'font-lock-maximium-decoration)
+ (or (and (not (integerp font-lock-maximum-decoration))
+ (not (eq t font-lock-maximum-decoration)))
+ (and (integerp font-lock-maximum-decoration)
+ (<= font-lock-maximum-decoration 0))))]
+ ["M%_ore"
+ (progn
+ (require 'font-lock)
+ (if (and (integerp font-lock-maximum-decoration)
+ (= 1 font-lock-maximum-decoration))
+ nil
+ (customize-set-variable 'font-lock-maximum-decoration 1)
+ (font-lock-recompute-variables)))
:style radio
- :selected (and (boundp 'browse-url-browser-function)
- (eq browse-url-browser-function 'browse-url-cci))
- :active (and (boundp 'browse-url-browser-function)
- (fboundp 'browse-url-cci))]
- ["IXI Mosaic"
- (customize-set-variable 'browse-url-browser-function
- 'browse-url-iximosaic)
+ :active (fboundp 'font-lock-mode)
+ :selected (and (boundp 'font-lock-maximium-decoration)
+ (integerp font-lock-maximum-decoration)
+ (= 1 font-lock-maximum-decoration))]
+ ["%_Even More"
+ (progn
+ (require 'font-lock)
+ (if (and (integerp font-lock-maximum-decoration)
+ (= 2 font-lock-maximum-decoration))
+ nil
+ (customize-set-variable 'font-lock-maximum-decoration 2)
+ (font-lock-recompute-variables)))
:style radio
- :selected (and (boundp 'browse-url-browser-function)
- (eq browse-url-browser-function 'browse-url-iximosaic))
- :active (and (boundp 'browse-url-browser-function)
- (fboundp 'browse-url-iximosaic))]
- ["Lynx (xterm)"
- (customize-set-variable 'browse-url-browser-function
- 'browse-url-lynx-xterm)
+ :active (fboundp 'font-lock-mode)
+ :selected (and (boundp 'font-lock-maximum-decoration)
+ (integerp font-lock-maximum-decoration)
+ (= 2 font-lock-maximum-decoration))]
+ ["%_Most"
+ (progn
+ (require 'font-lock)
+ (if (or (eq font-lock-maximum-decoration t)
+ (and (integerp font-lock-maximum-decoration)
+ (>= font-lock-maximum-decoration 3)))
+ nil
+ (customize-set-variable 'font-lock-maximum-decoration t)
+ (font-lock-recompute-variables)))
:style radio
- :selected (and (boundp 'browse-url-browser-function)
- (eq browse-url-browser-function 'browse-url-lynx-xterm))
- :active (and (boundp 'browse-url-browser-function)
- (fboundp 'browse-url-lynx-xterm))]
- ["Lynx (xemacs)"
- (customize-set-variable 'browse-url-browser-function
- 'browse-url-lynx-emacs)
+ :active (fboundp 'font-lock-mode)
+ :selected (and (boundp 'font-lock-maximum-decoration)
+ (or (eq font-lock-maximum-decoration t)
+ (and (integerp font-lock-maximum-decoration)
+ (>= font-lock-maximum-decoration 3))))]
+ "-----"
+ ["La%_zy"
+ (progn;; becomes buffer local
+ (lazy-shot-mode)
+ (customize-set-variable 'lazy-shot-mode lazy-shot-mode)
+ ;; this shouldn't be necessary so there has to
+ ;; be a redisplay bug lurking somewhere (or
+ ;; possibly another event handler bug)
+ (redraw-modeline))
+ :active (and (boundp 'font-lock-mode) (boundp 'lazy-shot-mode)
+ font-lock-mode)
+ :style toggle
+ :selected (and (boundp 'lazy-shot-mode) lazy-shot-mode)]
+ ["Cac%_hing"
+ (progn;; becomes buffer local
+ (fast-lock-mode)
+ (customize-set-variable 'fast-lock-mode fast-lock-mode)
+ ;; this shouldn't be necessary so there has to
+ ;; be a redisplay bug lurking somewhere (or
+ ;; possibly another event handler bug)
+ (redraw-modeline))
+ :active (and (boundp 'font-lock-mode) (boundp 'fast-lock-mode)
+ font-lock-mode)
+ :style toggle
+ :selected (and (boundp 'fast-lock-mode) fast-lock-mode)]
+ )
+ ("Pa%_ren Highlighting"
+ ["%_None"
+ (customize-set-variable 'paren-mode nil)
:style radio
- :selected (and (boundp 'browse-url-browser-function)
- (eq browse-url-browser-function 'browse-url-lynx-emacs))
- :active (and (boundp 'browse-url-browser-function)
- (fboundp 'browse-url-lynx-emacs))]
- ["Grail"
- (customize-set-variable 'browse-url-browser-function
- 'browse-url-grail)
+ :selected (and (boundp 'paren-mode) (not paren-mode))
+ :active (boundp 'paren-mode)]
+ ["%_Blinking Paren"
+ (customize-set-variable 'paren-mode 'blink-paren)
:style radio
- :selected (and (boundp 'browse-url-browser-function)
- (eq browse-url-browser-function 'browse-url-grail))
- :active (and (boundp 'browse-url-browser-function)
- (fboundp 'browse-url-grail))]
- ["Kfm"
- (customize-set-variable 'browse-url-browser-function
- 'browse-url-kfm)
+ :selected (and (boundp 'paren-mode) (eq paren-mode 'blink-paren))
+ :active (boundp 'paren-mode)]
+ ["%_Steady Paren"
+ (customize-set-variable 'paren-mode 'paren)
+ :style radio
+ :selected (and (boundp 'paren-mode) (eq paren-mode 'paren))
+ :active (boundp 'paren-mode)]
+ ["%_Expression"
+ (customize-set-variable 'paren-mode 'sexp)
:style radio
- :selected (and (boundp 'browse-url-browser-function)
- (eq browse-url-browser-function 'browse-url-kfm))
- :active (and (boundp 'browse-url-browser-function)
- (fboundp 'browse-url-kfm))]
+ :selected (and (boundp 'paren-mode) (eq paren-mode 'sexp))
+ :active (boundp 'paren-mode)]
+ ;; ["Nes%_ted Shading"
+ ;; (customize-set-variable 'paren-mode 'nested)
+ ;; :style radio
+ ;; :selected (and (boundp 'paren-mode) (eq paren-mode 'nested))
+ ;; :active (boundp 'paren-mode)]
)
"-----"
- ["Edit Faces..." (customize-face nil)]
- ("Font" :filter font-menu-family-constructor)
- ("Size" :filter font-menu-size-constructor)
-; ("Weight" :filter font-menu-weight-constructor)
+ ["Edit Fa%_ces..." (customize-face nil)]
+ ("Fo%_nt" :filter font-menu-family-constructor)
+ ("Si%_ze" :filter font-menu-size-constructor)
+ ;; ("Weig%_ht" :filter font-menu-weight-constructor)
"-----"
- ["Save Options" customize-save-customized]
+ ["%_Edit Init (.emacs) File"
+ ;; #### there should be something that holds the name that the init
+ ;; file should be created as, when it's not present.
+ (progn (find-file (or user-init-file "~/.emacs"))
+ (emacs-lisp-mode))]
+ ["%_Save Options to .emacs File" customize-save-customized]
)
- ("Buffers"
+ ("%_Buffers"
:filter buffers-menu-filter
- ["Read Only" (toggle-read-only)
- :style toggle :selected buffer-read-only]
- ["List All Buffers" list-buffers]
- "--"
+ ["Go To %_Previous Buffer" switch-to-other-buffer]
+ ["Go To %_Buffer..." switch-to-buffer]
+ "----"
+ ["%_List All Buffers" list-buffers]
+ ["%_Delete Buffer" kill-this-buffer
+ :suffix (if put-buffer-names-in-file-menu (buffer-name) "")]
+ "----"
)
- ("Tools"
- ["Grep..." grep
- :active (fboundp 'grep)]
- ["Compile..." compile
- :active (fboundp 'compile)]
- ["Shell" shell
- :active (fboundp 'shell)]
- ["Shell Command..." shell-command
- :active (fboundp 'shell-command)]
- ["Shell Command on Region..." shell-command-on-region
- :active (and (fboundp 'shell-command-on-region) (region-exists-p))]
- ["Debug (GDB)..." gdb
- :active (fboundp 'gdb)]
- ["Debug (DBX)..." dbx
- :active (fboundp 'dbx)]
- "-----"
- ("Tags"
- ["Find Tag..." find-tag]
- ["Find Other Window..." find-tag-other-window]
- ["Next Tag..." (find-tag nil)]
- ["Next Other Window..." (find-tag-other-window nil)]
- ["Next File" next-file]
- "-----"
- ["Tags Search..." tags-search]
- ["Tags Replace..." tags-query-replace]
- ["Continue Search/Replace" tags-loop-continue]
- "-----"
- ["Pop stack" pop-tag-mark]
- ["Apropos..." tags-apropos]
- "-----"
- ["Set Tags Table File..." visit-tags-table]
- ))
-
- nil ; the partition: menus after this are flushright
+ nil ; the partition: menus after this are flushright
- ("Help"
- ["About XEmacs..." about-xemacs]
- ("Basics"
- ["Installation" describe-installation
- :active (boundp 'Installation-string)]
- ;; Tutorials.
- ,(if (featurep 'mule)
- ;; Mule tutorials.
- (let ((lang language-info-alist)
- submenu tut)
- (while lang
- (and (setq tut (assq 'tutorial (car lang)))
- (not (string= (caar lang) "ASCII"))
- (setq
- submenu
- (cons
- `[,(caar lang) (help-with-tutorial nil ,(cdr tut))]
- submenu)))
- (setq lang (cdr lang)))
- (append `("Tutorials"
- :filter tutorials-menu-filter
- ["Default" help-with-tutorial t
- ,(concat "(" current-language-environment ")")])
- submenu))
- ;; Non mule tutorials.
- (let ((lang tutorial-supported-languages)
- submenu)
- (while lang
- (setq submenu
- (cons
- `[,(caar lang)
- (help-with-tutorial ,(format "TUTORIAL.%s"
- (cadr (car lang))))]
- submenu))
- (setq lang (cdr lang)))
- (append '("Tutorials"
- ["English" help-with-tutorial])
- submenu)))
- ["News" view-emacs-news]
- ["Packages" finder-by-keyword]
- ["Splash" xemacs-splash-buffer])
+ ("%_Help"
+ ["%_About XEmacs..." about-xemacs]
"-----"
- ("XEmacs FAQ"
- ["FAQ (local)" xemacs-local-faq]
- ["FAQ via WWW" xemacs-www-faq (boundp 'browse-url-browser-function)]
- ["Home Page" xemacs-www-page (boundp 'browse-url-browser-function)])
- ("Samples"
- ["Sample .emacs" (find-file (locate-data-file "sample.emacs")) (locate-data-file "sample.emacs")]
- ["Sample .Xdefaults" (find-file (locate-data-file "sample.Xdefaults")) (locate-data-file "sample.Xdefaults")]
- ["Sample enriched" (find-file (locate-data-file "enriched.doc")) (locate-data-file "enriched.doc")])
+ ["XEmacs %_News" view-emacs-news]
+ ["%_Obtaining XEmacs" describe-distribution]
"-----"
- ("Lookup in Info"
- ["Key Binding..." Info-goto-emacs-key-command-node]
- ["Command..." Info-goto-emacs-command-node]
- ["Function..." Info-elisp-ref]
- ["Topic..." Info-query])
- ("Manuals"
- ["Info" info]
- ["Unix Manual..." manual-entry])
- ("Commands & Keys"
- ["Mode" describe-mode]
- ["Apropos..." hyper-apropos]
- ["Apropos Docs..." apropos-documentation]
+ ("%_Info (Online Docs)"
+ ["%_Info Contents" info]
+ ["Lookup %_Key Binding..." Info-goto-emacs-key-command-node]
+ ["Lookup %_Command..." Info-goto-emacs-command-node]
+ ["Lookup %_Function..." Info-elisp-ref]
+ ["Lookup %_Topic..." Info-query])
+ ("XEmacs %_FAQ"
+ ["%_FAQ (local)" xemacs-local-faq]
+ ["FAQ via %_WWW" xemacs-www-faq
+ :active (boundp 'browse-url-browser-function)]
+ ["%_Home Page" xemacs-www-page
+ :active (boundp 'browse-url-browser-function)])
+ ("%_Tutorials"
+ :filter tutorials-menu-filter)
+ ("%_Samples"
+ ["Sample .%_emacs"
+ (find-file (locate-data-file "sample.emacs"))
+ :active (locate-data-file "sample.emacs")]
+ ["Sample .%_Xdefaults"
+ (find-file (locate-data-file "sample.Xdefaults"))
+ :active (locate-data-file "sample.Xdefaults")]
+ ["Sample e%_nriched"
+ (find-file (locate-data-file "enriched.doc"))
+ :active (locate-data-file "enriched.doc")])
+ ("%_Commands & Keys"
+ ["%_Mode" describe-mode]
+ ["%_Apropos..." hyper-apropos]
+ ["Apropos %_Docs..." apropos-documentation]
"-----"
- ["Key..." describe-key]
- ["Bindings" describe-bindings]
- ["Mouse Bindings" describe-pointer]
- ["Recent Keys" view-lossage]
+ ["%_Key..." describe-key]
+ ["%_Bindings" describe-bindings]
+ ["%_Mouse Bindings" describe-pointer]
+ ["%_Recent Keys" view-lossage]
"-----"
- ["Function..." describe-function]
- ["Variable..." describe-variable]
- ["Locate Command..." where-is])
+ ["%_Function..." describe-function]
+ ["%_Variable..." describe-variable]
+ ["%_Locate Command..." where-is])
"-----"
- ["Recent Messages" view-lossage]
- ("Misc"
- ["No Warranty" describe-no-warranty]
- ["XEmacs License" describe-copying]
- ["The Latest Version" describe-distribution])
- ["Send Bug Report..." report-emacs-bug
+ ["%_Recent Messages" view-lossage]
+ ("%_Misc"
+ ["%_Current Installation Info" describe-installation
+ :active (boundp 'Installation-string)]
+ ["%_No Warranty" describe-no-warranty]
+ ["XEmacs %_License" describe-copying]
+ ["Find %_Packages" finder-by-keyword]
+ ["View %_Splash Screen" xemacs-splash-buffer]
+ ["%_Unix Manual..." manual-entry])
+ ["Send %_Bug Report..." report-emacs-bug
:active (fboundp 'report-emacs-bug)]))))
\f
(defun maybe-add-init-button ()
"Don't call this.
Adds `Load .emacs' button to menubar when starting up with -q."
- ;; by Stig@hackvan.com
- (cond
- (load-user-init-file-p nil)
- ((file-exists-p (expand-file-name ".emacs" "~"))
- (add-menu-button nil
- ["Load .emacs"
- (progn (delete-menu-item '("Load .emacs"))
- (load-user-init-file))
- ]
- "Help"))
- (t nil)))
+ (when (and (not load-user-init-file-p)
+ (file-exists-p (expand-file-name ".emacs" "~")))
+ (add-menu-button
+ nil
+ ["%_Load .emacs"
+ (progn
+ (mapc #'(lambda (buf)
+ (with-current-buffer buf
+ (delete-menu-item '("Load .emacs"))))
+ (buffer-list))
+ (load-user-init-file))
+ ]
+ "Help")))
(add-hook 'before-init-hook 'maybe-add-init-button)
bookmark-alist
t)))
`(,(if definedp
- '("Jump to Bookmark"
+ '("%_Jump to Bookmark"
:filter (lambda (&rest junk)
(mapcar #'(lambda (bmk)
`[,bmk (bookmark-jump ',bmk)])
(bookmark-all-names))))
- ["Jump to Bookmark" nil nil])
- ["Set bookmark" bookmark-set
+ ["%_Jump to Bookmark" nil nil])
+ ["Set %_Bookmark" bookmark-set
:active (fboundp 'bookmark-set)]
"---"
- ["Insert contents" bookmark-menu-insert
+ ["Insert %_Contents" bookmark-menu-insert
:active (fboundp 'bookmark-menu-insert)]
- ["Insert location" bookmark-menu-locate
+ ["Insert L%_ocation" bookmark-menu-locate
:active (fboundp 'bookmark-menu-locate)]
"---"
- ["Rename bookmark" bookmark-menu-rename
+ ["%_Rename Bookmark" bookmark-menu-rename
:active (fboundp 'bookmark-menu-rename)]
,(if definedp
- '("Delete Bookmark"
+ '("%_Delete Bookmark"
:filter (lambda (&rest junk)
(mapcar #'(lambda (bmk)
`[,bmk (bookmark-delete ',bmk)])
(bookmark-all-names))))
- ["Delete Bookmark" nil nil])
- ["Edit Bookmark List" bookmark-bmenu-list ,definedp]
+ ["%_Delete Bookmark" nil nil])
+ ["%_Edit Bookmark List" bookmark-bmenu-list ,definedp]
"---"
- ["Save bookmarks" bookmark-save ,definedp]
- ["Save bookmarks as..." bookmark-write ,definedp]
- ["Load a bookmark file" bookmark-load
+ ["%_Save Bookmarks" bookmark-save ,definedp]
+ ["Save Bookmarks %_As..." bookmark-write ,definedp]
+ ["%_Load a Bookmark File" bookmark-load
:active (fboundp 'bookmark-load)])))
;;; The Buffers menu
"Customization of `Buffers' menu."
:group 'menu)
+(defvar buffers-menu-omit-chars-list '(?b ?p ?l))
+
(defcustom buffers-menu-max-size 25
"*Maximum number of entries which may appear on the \"Buffers\" menu.
If this is 10, then only the ten most-recently-selected buffers will be
:group 'buffers-menu)
(defcustom buffers-menu-format-buffer-line-function 'format-buffers-menu-line
- "*The function to call to return a string to represent a buffer in the
-buffers menu. 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."
+ "*The function to call to return a string to represent a buffer in
+the buffers menu. The function is passed a buffer and a number
+(starting with 1) indicating which buffer line in the menu is being
+processed and should return a string containing an accelerator
+spec. (Check out `menu-item-generate-accelerator-spec' as a convenient
+way of generating the accelerator specs.) The default value
+`format-buffers-menu-line' just returns the name of the buffer and
+uses the number as the accelerator. Also check out
+`slow-format-buffers-menu-line' which returns a whole bunch of info
+about a buffer.
+
+Note: Gross Compatibility Hack: Older versions of this function prototype
+only expected one argument, not two. We deal gracefully with such
+functions by simply calling them with one argument and leaving out the
+line number. However, this may go away at any time, so make sure to
+update all of your functions of this type."
:type 'function
:group 'buffers-menu)
function)
:group 'buffers-menu)
-(defun buffers-menu-omit-invisible-buffers (buf)
- "For use as a value of `buffers-menu-omit-function'.
-Omits normally invisible buffers (those whose name begins with a space)."
- (not (null (string-match "\\` " (buffer-name buf)))))
-
(defun sort-buffers-menu-alphabetically (buf1 buf2)
"For use as a value of `buffers-menu-sort-function'.
Sorts the buffers in alphabetical order by name, but puts buffers beginning
(string-lessp nam1 nam2)))))
;; this version is too slow on some machines.
-(defun slow-format-buffers-menu-line (buffer)
+;; (vintage 1990, that is)
+(defun slow-format-buffers-menu-line (buffer n)
"For use as a value of `buffers-menu-format-buffer-line-function'.
This returns a string containing a bunch of info about the buffer."
- (format "%s%s %-19s %6s %-15s %s"
- (if (buffer-modified-p buffer) "*" " ")
- (if (symbol-value-in-buffer 'buffer-read-only buffer) "%" " ")
- (buffer-name buffer)
- (buffer-size buffer)
- (symbol-value-in-buffer 'mode-name buffer)
- (or (buffer-file-name buffer) "")))
-
-(defun format-buffers-menu-line (buffer)
+ (concat (menu-item-generate-accelerator-spec n buffers-menu-omit-chars-list)
+ (format "%s%s %-19s %6s %-15s %s"
+ (if (buffer-modified-p buffer) "*" " ")
+ (if (symbol-value-in-buffer 'buffer-read-only buffer)
+ "%" " ")
+ (buffer-name buffer)
+ (buffer-size buffer)
+ (symbol-value-in-buffer 'mode-name buffer)
+ (or (buffer-file-name buffer) ""))))
+
+(defun format-buffers-menu-line (buffer n)
"For use as a value of `buffers-menu-format-buffer-line-function'.
This just returns the buffer's name."
- (buffer-name buffer))
+ (concat (menu-item-generate-accelerator-spec n buffers-menu-omit-chars-list)
+ (buffer-name buffer)))
(defun group-buffers-menu-by-mode-then-alphabetically (buf1 buf2)
"For use as a value of `buffers-menu-grouping-function'.
(buffer-name (current-buffer)))))))
(defsubst build-buffers-menu-internal (buffers)
- (let (name line)
+ (let (name line (n 0))
(mapcar
#'(lambda (buffer)
(if (eq buffer t)
"---"
- (setq line (funcall buffers-menu-format-buffer-line-function
- buffer))
+ (setq n (1+ n))
+ (setq line
+ ; #### a truly Kyle-friendly hack.
+ (let ((fn buffers-menu-format-buffer-line-function))
+ (if (= (function-max-args fn) 1)
+ (funcall fn buffer)
+ (funcall fn buffer n))))
(if complex-buffers-menu-p
(delq nil
(list line
- (vector "Switch to Buffer"
+ (vector "S%_witch to Buffer"
(list buffers-menu-switch-to-buffer-function
(setq name (buffer-name buffer)))
t)
(if (eq buffers-menu-switch-to-buffer-function
'switch-to-buffer)
- (vector "Switch to Buffer, Other Frame"
+ (vector "Switch to Buffer, Other %_Frame"
(list 'switch-to-buffer-other-frame
(setq name (buffer-name buffer)))
t)
nil)
(if (and (buffer-modified-p buffer)
(buffer-file-name buffer))
- (vector "Save Buffer"
+ (vector "%_Save Buffer"
(list 'buffer-menu-save-buffer name) t)
- ["Save Buffer" nil nil]
+ ["%_Save Buffer" nil nil]
)
- (vector "Save As..."
+ (vector "Save %_As..."
(list 'buffer-menu-write-file name) t)
- (vector "Delete Buffer" (list 'kill-buffer name)
+ (vector "%_Delete Buffer" (list 'kill-buffer name)
t)))
;; #### We don't want buffer names to be translated,
;; #### so we put the buffer name in the suffix.
(defun language-environment-menu-filter (menu)
"This is the menu filter for the \"Language Environment\" submenu."
- (mapcar (lambda (env-sym)
- `[ ,(capitalize (symbol-name env-sym))
- (set-language-environment ',env-sym)])
- language-environment-list))
+ (let ((n 0))
+ (mapcar (lambda (env-sym)
+ (setq n (1+ n))
+ `[ ,(concat (menu-item-generate-accelerator-spec n)
+ (capitalize (symbol-name env-sym)))
+ (set-language-environment ',env-sym)])
+ language-environment-list)))
\f
;;; The Options menu
\f
;;; The Help menu
-(if (featurep 'mule)
- (defun tutorials-menu-filter (menu-items)
- ;; If there's a tutorial for the current language environment, make it
- ;; appear first as the default one. Otherwise, use the english one.
- (let* ((menu menu-items)
- (item (pop menu-items)))
- (aset
- item 3
- (concat "("
- (if (assoc
- 'tutorial
- (assoc current-language-environment language-info-alist))
- current-language-environment
- "English")
- ")"))
- menu)))
+(defun tutorials-menu-filter (menu-items)
+ (append
+ (if (featurep 'mule)
+ (if (assq 'tutorial
+ (assoc current-language-environment language-info-alist))
+ `([,(concat "%_Default (" current-language-environment ")")
+ help-with-tutorial]))
+ '(["%_English" help-with-tutorial]))
+ (submenu-generate-accelerator-spec
+ (if (featurep 'mule)
+ ;; Mule tutorials.
+ (mapcan #'(lambda (lang)
+ (let ((tut (assq 'tutorial lang)))
+ (and tut
+ (not (string= (car lang) "ASCII"))
+ ;; skip current language, since we already
+ ;; included it first
+ (not (string= (car lang)
+ current-language-environment))
+ `([,(car lang)
+ (help-with-tutorial nil ,(cdr tut))]))))
+ language-info-alist))
+ ;; Non mule tutorials.
+ (mapcar #'(lambda (lang)
+ `[,(car lang)
+ (help-with-tutorial ,(format "TUTORIAL.%s"
+ (cadr lang)))])
+ tutorial-supported-languages))))
\f
(set-menubar default-menubar)
(defconst default-popup-menu
'("XEmacs Commands"
- ["Undo" advertised-undo
+ ["%_Undo" advertised-undo
:active (and (not (eq buffer-undo-list t))
(or buffer-undo-list pending-undo-list))
:suffix (if (or (eq last-command 'undo)
(eq last-command 'advertised-undo))
"More" "")]
- ["Cut" kill-primary-selection
+ ["Cu%_t" kill-primary-selection
:active (selection-owner-p)]
- ["Copy" copy-primary-selection
+ ["%_Copy" copy-primary-selection
:active (selection-owner-p)]
- ["Paste" yank-clipboard-selection
+ ["%_Paste" yank-clipboard-selection
:active (selection-exists-p 'CLIPBOARD)]
- ["Clear" delete-primary-selection
+ ["%_Delete" delete-primary-selection
:active (selection-owner-p)]
"-----"
- ["Select Block" mark-paragraph]
- ["Split Window" split-window-vertically]
- ["Unsplit Window" delete-other-windows]
+ ["Select %_Block" mark-paragraph]
+ ["Sp%_lit Window" split-window-vertically]
+ ["U%_nsplit Window" delete-other-windows]
))
(defvar global-popup-menu nil
(error "Pointer must be in a normal window"))
(select-window window)
(if current-menubar
- (setq bmenu (assoc "Buffers" current-menubar)))
+ (setq bmenu (assoc "%_Buffers" current-menubar)))
(if (null bmenu)
- (setq bmenu (assoc "Buffers" default-menubar)))
+ (setq bmenu (assoc "%_Buffers" default-menubar)))
(if (null bmenu)
(error "Can't find the Buffers menu"))
(popup-menu bmenu)))
(defun popup-menubar-menu (event)
- "Pop up a copy of menu that also appears in the menubar"
- ;; by Stig@hackvan.com
+ "Pop up a copy of menu that also appears in the menubar."
(interactive "e")
(let ((window (and (event-over-text-area-p event) (event-window event)))
popup-menubar)
(error "Pointer must be in a normal window"))
(select-window window)
(and current-menubar (run-hooks 'activate-menubar-hook))
- ;; ##### Instead of having to copy this just to safely get rid of
+ ;; #### Instead of having to copy this just to safely get rid of
;; any nil what we should really do is fix up the internal menubar
;; code to just ignore nil if generating a popup menu
(setq popup-menubar (delete nil (copy-sequence (or current-menubar
default-menubar))))
- (popup-menu (cons "Menubar Menu" popup-menubar))
+ (popup-menu (cons "%_Menubar Menu" popup-menubar))
))
(global-set-key 'button3 'popup-mode-menu)
;; This file is dumped with XEmacs (when menubar support is compiled in).
-;; Some stuff in FSF menu-bar.el is in x-menubar.el
+;; Some stuff in FSF menu-bar.el is in menubar-items.el
;;; Code:
menuitem)))
(setq plistp (or (>= L 5)
(and (> L 2) (keywordp (aref menuitem 2)))))
- (or (stringp (aref menuitem 0))
- (signal 'error
- (list
- "first element of a button must be a string (the label)"
- menuitem)))
- (or plistp
- (< L 4)
- (null (aref menuitem 3))
- (stringp (aref menuitem 3))
- (signal 'error
- (list
- "fourth element of a button must be a string (the label suffix)"
- menuitem)))
(if plistp
(let ((i 2)
selp
;;; minibuf.el --- Minibuffer functions for XEmacs
;; Copyright (C) 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
-;; Copyright (C) 1995 Tinker Systems
-;; Copyright (C) 1995, 1996 Ben Wing
+;; Copyright (C) 1995 Tinker Systems.
+;; Copyright (C) 1995, 1996, 2000 Ben Wing.
;; Author: Richard Mlynarik
;; Created: 2-Oct-92
;(defvar minibuffer-setup-hook nil
; "Normal hook run just after entry to minibuffer.")
+;; see comment at list-mode-hook.
+(put 'minibuffer-setup-hook 'permanent-local t)
+
(defvar minibuffer-exit-hook nil
"Normal hook run just after exit from minibuffer.")
+(put 'minibuffer-exit-hook 'permanent-local t)
(defvar minibuffer-help-form nil
"Value that `help-form' takes on inside the minibuffer.")
;; Used by minibuffer-do-completion
-(defvar last-exact-completion)
+(defvar last-exact-completion nil)
(defun temp-minibuffer-message (m)
(let ((savemax (point-max)))
Prompts with PROMPT. By default, return DEFAULT-VALUE.
A user variable is one whose documentation starts with a `*' character."
(intern (completing-read prompt obarray 'user-variable-p t nil
- 'variable-history default-value)))
+ 'variable-history
+ (if (symbolp default-value)
+ (symbol-name default-value)
+ default-value))))
(defun read-buffer (prompt &optional default require-match)
"Read the name of a buffer and return as a string.
;; this calls read-file-name-2
(mouse-read-file-name-1 history prompt dir default must-match
initial-contents completer)
- (let ((rfhookfun
- (lambda ()
- ;; #### SCREAM! Create a `file-system-ignore-case'
- ;; function, so this kind of stuff is generalized!
- (and (eq system-type 'windows-nt)
- (set (make-local-variable 'completion-ignore-case) t))
- (set
- (make-local-variable
- 'completion-display-completion-list-function)
- #'(lambda (completions)
- (display-completion-list
- completions
- :user-data (not (eq completer 'read-file-name-internal))
- :activate-callback
- 'read-file-name-activate-callback)))
- ;; kludge!
- (remove-hook 'minibuffer-setup-hook rfhookfun)
- )))
- (unwind-protect
- (progn
- (add-hook 'minibuffer-setup-hook rfhookfun)
- (read-file-name-2 history prompt dir default must-match
- initial-contents completer))
- (remove-hook 'minibuffer-setup-hook rfhookfun)))))
+ (add-one-shot-hook
+ 'minibuffer-setup-hook
+ (lambda ()
+ ;; #### SCREAM! Create a `file-system-ignore-case'
+ ;; function, so this kind of stuff is generalized!
+ (and (eq system-type 'windows-nt)
+ (set (make-local-variable 'completion-ignore-case) t))
+ (set
+ (make-local-variable
+ 'completion-display-completion-list-function)
+ #'(lambda (completions)
+ (display-completion-list
+ completions
+ :user-data (not (eq completer 'read-file-name-internal))
+ :activate-callback
+ 'read-file-name-activate-callback)))))
+ (read-file-name-2 history prompt dir default must-match
+ initial-contents completer)))
(defun read-file-name (prompt
&optional dir default must-match initial-contents
result)
(t file))))
+(defun mouse-rfn-setup-vars (prompt)
+ ;; a specifier would be nice.
+ (set (make-local-variable 'frame-title-format)
+ (capitalize-string-as-title
+ ;; Delete ": " off the end. There must be an easier way!
+ (let ((end-pos (length prompt)))
+ (if (and (> end-pos 0) (eq (aref prompt (1- end-pos)) ? ))
+ (setq end-pos (1- end-pos)))
+ (if (and (> end-pos 0) (eq (aref prompt (1- end-pos)) ?:))
+ (setq end-pos (1- end-pos)))
+ (substring prompt 0 end-pos))))
+ ;; ensure that killing the frame works right,
+ ;; instead of leaving us in the minibuffer.
+ (add-local-hook 'delete-frame-hook
+ #'(lambda (frame)
+ (abort-recursive-edit))))
+
(defun mouse-file-display-completion-list (window dir minibuf user-data)
(let ((standard-output (window-buffer window)))
(condition-case nil
(display-completion-list
(directory-files dir nil nil nil t)
- :window-width (* 2 (window-width window))
+ :window-width (window-width window)
+ :window-height (window-text-area-height window)
+ :completion-string ""
:activate-callback
'mouse-read-file-name-activate-callback
:user-data user-data
:reference-buffer minibuf
:help-string "")
- (t nil))))
+ (t nil))
+ ))
(defun mouse-directory-display-completion-list (window dir minibuf user-data)
(let ((standard-output (window-buffer window)))
(display-completion-list
(delete "." (directory-files dir nil nil nil 1))
:window-width (window-width window)
+ :window-height (window-text-area-height window)
+ :completion-string ""
:activate-callback
'mouse-read-file-name-activate-callback
:user-data user-data
:reference-buffer minibuf
:help-string "")
- (t nil))))
+ (t nil))
+ ))
(defun mouse-read-file-name-activate-callback (event extent user-data)
(let* ((file (extent-string extent))
(minibuf (symbol-value-in-buffer 'completion-reference-buffer
(extent-object extent)))
- (in-dir (buffer-substring nil nil minibuf))
+ (ministring (buffer-substring nil nil minibuf))
+ (in-dir (file-name-directory ministring))
(full (expand-file-name file in-dir))
(filebuf (nth 0 user-data))
- (dirbuff (nth 1 user-data))
+ (dirbuf (nth 1 user-data))
(filewin (nth 2 user-data))
(dirwin (nth 3 user-data)))
(if (file-regular-p full)
(insert-string (file-name-as-directory
(abbreviate-file-name full t)) minibuf)
(reset-buffer filebuf)
- (if (not dirbuff)
+ (if (not dirbuf)
(mouse-directory-display-completion-list filewin full minibuf
user-data)
(mouse-file-display-completion-list filewin full minibuf user-data)
- (reset-buffer dirbuff)
+ (reset-buffer dirbuf)
(mouse-directory-display-completion-list dirwin full minibuf
user-data)))))
-;; this is rather cheesified but gets the job done.
+;; our cheesy but god-awful time consuming file dialog box implementation.
+;; this will be replaced with use of the native file dialog box (when
+;; available).
(defun mouse-read-file-name-1 (history prompt dir default
- must-match initial-contents
- completer)
+ must-match initial-contents
+ completer)
+ ;; file-p is t if we're reading files, nil if directories.
(let* ((file-p (eq 'read-file-name-internal completer))
(filebuf (get-buffer-create "*Completions*"))
- (dirbuff (and file-p (generate-new-buffer " *mouse-read-file*")))
- (butbuff (generate-new-buffer " *mouse-read-file*"))
+ (dirbuf (and file-p (generate-new-buffer " *mouse-read-file*")))
+ (butbuf (generate-new-buffer " *mouse-read-file*"))
(frame (make-dialog-frame))
filewin dirwin
user-data)
(unwind-protect
(progn
(reset-buffer filebuf)
- (select-frame frame)
+
+ ;; set up the frame.
+ (focus-frame frame)
(let ((window-min-height 1))
;; #### should be 2 not 3, but that causes
;; "window too small to split" errors for some
(setq filewin (frame-rightmost-window frame)
dirwin (frame-leftmost-window frame))
(set-window-buffer filewin filebuf)
- (set-window-buffer dirwin dirbuff))
+ (set-window-buffer dirwin dirbuf))
(setq filewin (frame-highest-window frame))
(set-window-buffer filewin filebuf))
- (setq user-data (list filebuf dirbuff filewin dirwin))
- (set-window-buffer (frame-lowest-window frame) butbuff)
- (set-buffer butbuff)
+ (setq user-data (list filebuf dirbuf filewin dirwin))
+ (set-window-buffer (frame-lowest-window frame) butbuf)
+
+ ;; set up completion buffers.
+ (let ((rfcshookfun
+ ;; kludge!
+ ;; #### I really need to flesh out the object
+ ;; hierarchy better to avoid these kludges.
+ ;; (?? I wrote this comment above some time ago,
+ ;; and I don't understand what I'm referring to
+ ;; any more. --ben
+ (lambda ()
+ (mouse-rfn-setup-vars prompt)
+ (when (featurep 'scrollbar)
+ (set-specifier scrollbar-width 0 (current-buffer)))
+ (setq truncate-lines t))))
+
+ (set-buffer filebuf)
+ (add-local-hook 'completion-setup-hook rfcshookfun)
+ (when file-p
+ (set-buffer dirbuf)
+ (add-local-hook 'completion-setup-hook rfcshookfun)))
+
+ ;; set up minibuffer.
+ (add-one-shot-hook
+ 'minibuffer-setup-hook
+ (lambda ()
+ (if (not file-p)
+ (mouse-directory-display-completion-list
+ filewin dir (current-buffer) user-data)
+ (mouse-file-display-completion-list
+ filewin dir (current-buffer) user-data)
+ (mouse-directory-display-completion-list
+ dirwin dir (current-buffer) user-data))
+ (set
+ (make-local-variable
+ 'completion-display-completion-list-function)
+ (lambda (completions)
+ (display-completion-list
+ completions
+ :help-string ""
+ :window-width (window-width filewin)
+ :window-height (window-text-area-height filewin)
+ :completion-string ""
+ :activate-callback
+ 'mouse-read-file-name-activate-callback
+ :user-data user-data)))
+ (mouse-rfn-setup-vars prompt)
+ (save-selected-window
+ ;; kludge to ensure the frame title is correct.
+ ;; the minibuffer leaves the frame title the way
+ ;; it was before (i.e. of the selected window before
+ ;; the dialog box was opened), so to get it correct
+ ;; we have to be tricky.
+ (select-window filewin)
+ (redisplay-frame nil t)
+ ;; #### another kludge. sometimes the focus ends up
+ ;; back in the main window, not the dialog box. it
+ ;; occurs randomly and it's not possible to reliably
+ ;; reproduce. We try to fix it by draining non-user
+ ;; events and then setting the focus back on the frame.
+ (sit-for 0 t)
+ (focus-frame frame))))
+
+ ;; set up button buffer.
+ (set-buffer butbuf)
+ (mouse-rfn-setup-vars prompt)
(when dir
(setq default-directory dir))
(when (featurep 'scrollbar)
- (set-specifier scrollbar-width 0 butbuff))
+ (set-specifier scrollbar-width 0 butbuf))
(insert " ")
(insert-gui-button (make-gui-button "OK"
(lambda (foo)
(insert-gui-button (make-gui-button "Cancel"
(lambda (foo)
(abort-recursive-edit))))
- (let ((rfhookfun
- (lambda ()
- (if (not file-p)
- (mouse-directory-display-completion-list
- filewin dir (current-buffer) user-data)
- (mouse-file-display-completion-list filewin dir
- (current-buffer)
- user-data)
- (mouse-directory-display-completion-list dirwin dir
- (current-buffer)
- user-data))
- (set
- (make-local-variable
- 'completion-display-completion-list-function)
- #'(lambda (completions)
- (display-completion-list
- completions
- :help-string ""
- :activate-callback
- 'mouse-read-file-name-activate-callback
- :user-data user-data)))
- ;; kludge!
- (remove-hook 'minibuffer-setup-hook rfhookfun)
- ))
- (rfcshookfun
- ;; kludge!
- ;; #### I really need to flesh out the object
- ;; hierarchy better to avoid these kludges.
- (lambda ()
- (save-excursion
- (set-buffer standard-output)
- (setq truncate-lines t)))))
- (unwind-protect
- (progn
- (add-hook 'minibuffer-setup-hook rfhookfun)
- (add-hook 'completion-setup-hook rfcshookfun)
- (read-file-name-2 history prompt dir default
- must-match initial-contents
- completer))
- (remove-hook 'minibuffer-setup-hook rfhookfun)
- (remove-hook 'completion-setup-hook rfcshookfun))))
+
+ ;; now start reading filename.
+ (read-file-name-2 history prompt dir default
+ must-match initial-contents
+ completer))
+
+ ;; always clean up.
+ ;; get rid of our hook that calls abort-recursive-edit -- not a good
+ ;; idea here.
+ (kill-local-variable 'delete-frame-hook)
(delete-frame frame)
(kill-buffer filebuf)
- (kill-buffer butbuff)
- (and dirbuff (kill-buffer dirbuff)))))
+ (kill-buffer butbuf)
+ (and dirbuf (kill-buffer dirbuf)))))
(defun read-face (prompt &optional must-match)
"Read the name of a face from the minibuffer and return it as a symbol."
(set-glyph-image modeline-pointer-glyph "fleur" 'global 'x))
(t
(set-glyph-image modeline-pointer-glyph "sb_v_double_arrow"
- 'global 'x)))))
+ 'global 'x))))
+ (when (featurep 'mswindows)
+ (cond ((eq val t)
+ (set-glyph-image modeline-pointer-glyph
+ [mswindows-resource :resource-type cursor
+ :resource-id "SizeAll"]
+ 'global 'mswindows))
+ ((eq val 'scrollbar)
+ (set-glyph-image modeline-pointer-glyph
+ [mswindows-resource :resource-type cursor
+ :resource-id "Normal"]
+ 'global 'mswindows))
+ (t
+ (set-glyph-image modeline-pointer-glyph
+ [mswindows-resource :resource-type cursor
+ :resource-id "SizeNS"]
+ 'global 'mswindows)))))
:group 'modeline)
(defun mouse-drag-modeline (event)
; this used to be "XEmacs:"
(cons modeline-buffer-id-right-extent (purecopy " %17b")))
"Modeline control for identifying the buffer being displayed.
-Its default value is \"XEmacs: %17b\" (NOT!). Major modes that edit things
-other than ordinary files may change this (e.g. Info, Dired,...)")
+Its default value is
+
+ (list (cons modeline-buffer-id-left-extent (purecopy \"XEmacs%N:\"))
+ (cons modeline-buffer-id-right-extent (purecopy \" %17b\")))
+
+Major modes that edit things other than ordinary files may change this
+(e.g. Info, Dired,...).")
(make-variable-buffer-local 'modeline-buffer-identification)
;; These are for the sake of minor mode menu. #### All of this is
;; This file does the magic to parse mswindows font names, and make sure that
;; the default and modeline attributes of new frames are specified enough.
-;;; Force creation of the default face font so that if it fails we get an
-;;; error now instead of a crash at frame creation.
(defun mswindows-init-device-faces (device)
- (unless (face-font-instance 'default device)
- (error "Can't find a suitable default font")))
-
+ (let ((color-default (device-system-metric device 'color-default))
+ (color-3d-face (device-system-metric device 'color-3d-face)))
+ ; Force creation of the default face font so that if it fails we get
+ ; an error now instead of a crash at frame creation.
+ (unless (face-font-instance 'default device)
+ (error "Can't find a suitable default font"))
+
+ (if (car color-default)
+ (set-face-foreground 'default (car color-default)) device)
+ (if (cdr color-default)
+ (set-face-background 'default (cdr color-default)) device)
+ (if (car color-3d-face)
+ (set-face-foreground 'gui-element (car color-3d-face)) device)
+ (if (cdr color-3d-face)
+ (set-face-background 'gui-element (cdr color-3d-face)) device)
+ (set-face-font 'gui-element "MS Sans Serif:Regular:8" device)))
(defun mswindows-init-frame-faces (frame)
)
;; Initialization code for MS Windows glyphs.
;; This file is dumped with XEmacs (when MS Windows support is
-;; compiled in).
+;; compiled in). Make sure this is the first of msw-*.el files
+;; dumped.
;;; Code:
+(defun msgdi-device-p (&optional device)
+ "Return non-nil if DEVICE is a GDI device, that is 'mswindows or 'msprinter.
+MS GDI devices are mutuially WYSIWIG-compatible, so that many common glyph,
+color and font properties apply to them equally.
+
+This function is also a predicate for 'msgdi device tag, matching this
+device class."
+ (memq (device-type device) '(mswindows msprinter)))
+
(progn
+
+ (define-specifier-tag 'msgdi (function msgdi-device-p))
+
(set-console-type-image-conversion-list
'mswindows
`(("\\.bmp\\'" [bmp :file nil] 2)
;; strings are not allowed so they will be ignored.
("" [nothing])))
+ (set-console-type-image-conversion-list
+ 'msprinter (console-type-image-conversion-list 'mswindows))
+
(set-face-font 'border-glyph "WingDings:Regular:11::Symbol"
- 'global 'mswindows)
- (set-glyph-image continuation-glyph "\xC3" 'global 'mswindows)
- (set-glyph-image truncation-glyph "\xF0" 'global 'mswindows)
- (set-glyph-image hscroll-glyph "\xEF" 'global 'mswindows)
+ 'global 'msgdi)
+ (set-glyph-image continuation-glyph "\xC3" 'global 'msgdi)
+ (set-glyph-image truncation-glyph "\xF0" 'global 'msgdi)
+ (set-glyph-image hscroll-glyph "\xEF" 'global 'msgdi)
(set-glyph-image octal-escape-glyph "\\")
(set-glyph-image control-arrow-glyph "^")
(if emacs-beta-version
"xemacs-beta.xpm"
"xemacs.xpm"))
- 'global 'mswindows))
+ 'global 'msgdi))
(t
(set-glyph-image xemacs-logo
"XEmacs <insert spiffy graphic logo here>"
- 'global 'mswindows)))
+ 'global 'msgdi)))
)
;;; msw-glyphs.el ends here
(if (featurep 'infodock)
(require 'id-x-toolbar)
(init-x-toolbar)))
+ (if (featurep 'gutter) (init-gutter))
(add-hook 'zmacs-deactivate-region-hook
(lambda ()
(if (console-on-window-system-p)
(activate-region-as-selection))))
;; Old-style mswindows bindings. The new-style mswindows bindings
;; (namely Ctrl-X, Ctrl-C and Ctrl-V) are already spoken for by XEmacs.
- (define-key global-map '(shift delete) 'kill-primary-selection)
- (define-key global-map '(control delete) 'delete-primary-selection)
- (define-key global-map '(shift insert) 'yank-clipboard-selection)
- (define-key global-map '(control insert) 'copy-primary-selection)
+ (global-set-key '(shift delete) 'kill-primary-selection)
+ (global-set-key '(control delete) 'delete-primary-selection)
+ (global-set-key '(shift insert) 'yank-clipboard-selection)
+ (global-set-key '(control insert) 'copy-primary-selection)
+
+ (global-set-key '(meta f4) 'save-buffers-kill-emacs)
;; Random stuff
- (define-key global-map 'menu 'popup-mode-menu)
+ (global-set-key 'menu 'popup-mode-menu)
(setq mswindows-post-win-initted t)))
;;;### (autoloads (ccl-execute-with-args check-ccl-program define-ccl-program declare-ccl-program ccl-dump ccl-compile ccl-program-p) "mule-ccl" "mule/mule-ccl.el")
(autoload 'ccl-program-p "mule-ccl" "\
-T if OBJECT is a valid CCL compiled code." nil nil)
+Return t if OBJECT is a valid CCL compiled code." nil nil)
(autoload 'ccl-compile "mule-ccl" "\
Return a compiled code of CCL-PROGRAM as a vector of integer." nil nil)
;; Copyright (C) 1992 Free Software Foundation, Inc.
;; Copyright (C) 1995 Amdahl Corporation.
;; Copyright (C) 1996 Sun Microsystems.
-;; Copyright (C) 1999 Electrotechnical Laboratory, JAPAN.
-;; Licensed to the Free Software Foundation.
+;; Copyright (C) 1999,2000 MORIOKA Tomohiko
;; Author: Unknown
;; Keywords: i18n, mule, internal
(defalias 'charset-plist 'object-plist)
(defalias 'set-charset-plist 'setplist)
+;; Setup auto-fill-chars for charsets that should invoke auto-filling.
+;; SPACE and NEWLIE are already set.
+(let ((l '(katakana-jisx0201
+ japanese-jisx0208 japanese-jisx0212
+ chinese-gb2312 chinese-big5-1 chinese-big5-2)))
+ (while l
+ (put-char-table (car l) t auto-fill-chars)
+ (setq l (cdr l))))
+
;;; @ Coded character set
;;;
(define-key mule-keymap "r" 'toggle-display-direction) ; XEmacs
(define-key mule-keymap "l" 'set-language-environment)
-(define-key help-map "\C-L" 'describe-language-support)
(define-key help-map "L" 'describe-language-environment)
(define-key help-map "\C-\\" 'describe-input-method)
(define-key help-map "I" 'describe-input-method)
-(define-key help-map "C" 'describe-coding-system)
(define-key help-map "h" 'view-hello-file)
;; Menu for XEmacs were moved to menubar-items.el.
;; that they could reset the terminal coding system.
;; (unless (and (eq window-system 'pc) coding-system)
;; (setq default-terminal-coding-system coding-system))
- (setq terminal-coding-system coding-system)
+ (set-terminal-coding-system coding-system)
;;(setq default-keyboard-coding-system coding-system)
- (setq keyboard-coding-system coding-system)
+ (set-keyboard-coding-system coding-system)
;;(setq default-process-coding-system (cons coding-system coding-system))
;; Refer to coding-system-for-read and coding-system-for-write
;; so that C-x RET c works.
(eval-after-load
"menubar-items.elc"
`(add-menu-button
- '("Mule" "Describe Language Support")
+ '("%_Edit" "%_Multilingual (\"Mule\")"
+ "%_Describe Language Support")
(vector ,lang-env
'(describe-language-environment ,lang-env)
t))))
(eval-after-load
"menubar-items.elc"
`(add-menu-button
- '("Mule" "Set Language Environment")
+ '("%_Edit" "%_Multilingual (\"Mule\")"
+ "%_Set Language Environment")
(vector ,lang-env
'(set-language-environment ,lang-env)
t))))
-
+
(while alist
(set-language-info lang-env (car (car alist)) (cdr (car alist)))
(setq alist (cdr alist)))))
;;; multicast.el --- lisp frontend for multicast connections in XEmacs
-;; Copyright (C) 1997-1998 Didier Verna.
+;; Copyright (C) 1997-2000 Didier Verna.
-;; Author: Didier Verna <verna@inf.enst.fr>
-;; Maintainer: Didier Verna <verna@inf.enst.fr>
-;; Created: Thu Dec 4 16:37:39 1997
+;; Author: Didier Verna <didier@xemacs.org>
+;; Maintainer: Didier Verna <didier@xemacs.org>
+;; Created: Thu Dec 4 16:37:39 1997
;; Last Revision: Mon Jan 19 19:10:50 1998
;; Current Version: 0.4
;; Keywords: dumped comm processes
-;; This file is part of XEmacs.
+;; 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 of the License, or
-;; (at your option) any later version.
+;; (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.
+;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, write to the Free Software
ttl is the time-to-live (15 for site, 63 for region and 127 for world).
WARNING: it is *strongly* recommended to avoid using groups beginning with
- 224 or 239. Such groups are considered 'admin' groups, and may
+ 224 or 239. Such groups are considered 'admin' groups, and may
behave in a surprising way ..."
(let (dest port ttl)
;; We check only the general form of the multicast address.
(error "invalid ttl specification."))
(open-multicast-group-internal name buffer dest port ttl)
))
-
+
;;; multicast.el ends here
;; vm - a mail reader
;; [] Always install
;; [] Needs updating
-;; [] Required by other [packages]
+;; [] Required by other [packages]
;;
;; Where `[]' indicates a toggle box
;;
;; - "Required by other" means some other packages are going to force
;; this to be installed. Clicking on [packages] gives a list
;; of packages that require this.
-;;
+;;
;; The `package-get-base' should be installed in a file in
;; `data-directory'. The `package-get-here' should be installed in
;; site-lisp. Both are then read at run time.
:prefix "package-get"
:group 'package-tools)
-;;;###autoload
+;;;###autoload
(defvar package-get-base nil
"List of packages that are installed at this site.
For each element in the alist, car is the package name and the cdr is
This variable is used to initialize `package-get-remote', the
variable actually used to specify package download sites."
:tag "Package download sites"
- :type '(repeat (list hostname directory))
+ :type '(repeat (list (string :tag "Name") host-name directory))
:group 'package-get)
(defcustom package-get-remove-copy t
`(if (member (quote ,(cdr site))
package-get-remote)
(setq package-get-remote
- (delete (quote ,(cdr site)) package-get-remote))
+ (delete (quote ,(cdr site))
+ package-get-remote))
(package-ui-add-site (quote ,(cdr site))))
:style 'toggle
:selected `(member (quote ,(cdr site))
(setq location package-get-user-index-filename))
(when (y-or-n-p (concat "Update package index in " location "? "))
(write-file location))))))
-
+
;;;###autoload
(defun package-get-update-base (&optional db-file force-current)
a symbol instead of a string if PACKAGE-SYMBOL is non-nil.
The return value is suitable for direct passing to `interactive'."
(package-get-require-base t)
- (let ( (table (mapcar '(lambda (item)
- (let ( (name (symbol-name (car item))) )
- (cons name name)
- ))
- package-get-base))
- package package-symbol default-version version)
+ (let ((table (mapcar #'(lambda (item)
+ (let ((name (symbol-name (car item))))
+ (cons name name)))
+ package-get-base))
+ package package-symbol default-version version)
(save-window-excursion
(setq package (completing-read "Package: " table nil t))
(setq package-symbol (intern package))
(if get-version
(progn
- (setq default-version
- (package-get-info-prop
+ (setq default-version
+ (package-get-info-prop
(package-get-info-version
(package-get-info-find-package package-get-base
package-symbol) nil)
)
(if package-symbol
(list package-symbol)
- (list package)))
- )))
+ (list package))))))
;;;###autoload
(defun package-get-delete-package (package &optional pkg-topdir)
INSTALL-DIR, if non-nil, specifies the package directory where
fetched packages should be installed.
-The value of `package-get-base' is used to determine what files should
+The value of `package-get-base' is used to determine what files should
be retrieved. The value of `package-get-remote' is used to determine
where a package should be retrieved from. The sites are tried in
order so one is better off listing easily reached sites first.
current-dir-entry current-filename))
;; Get it
(setq full-package-filename dest-filename)
- (message "Retrieving package `%s' ..."
+ (message "Retrieving package `%s' ..."
current-filename)
(sit-for 0)
(copy-file (package-get-remote-filename current-dir-entry
To access fields returned from this, use
`package-get-info-version' to return information about particular a
-version. Use `package-get-info-find-prop' to find particular property
+version. Use `package-get-info-find-prop' to find particular property
from a version returned by `package-get-info-version'."
(interactive "xPackage list: \nsPackage Name: ")
(if which
(defun package-get-info-version (package version)
"In PACKAGE, return the plist associated with a particular VERSION of the
package. PACKAGE is typically as returned by
- `package-get-info-find-package'. If VERSION is nil, then return the
+ `package-get-info-find-package'. If VERSION is nil, then return the
first (aka most recent) version. Use `package-get-info-find-prop'
to retrieve a particular property from the value returned by this."
(interactive (package-get-interactive-package-query t t))
(defun package-get-installedp (package version)
"Determine if PACKAGE with VERSION has already been installed.
-I'm not sure if I want to do this by searching directories or checking
+I'm not sure if I want to do this by searching directories or checking
some built in variables. For now, use packages-package-list."
;; Use packages-package-list which contains name and version
(equal (plist-get
(defun package-get-package-provider (sym &optional force-current)
"Search for a package that provides SYM and return the name and
version. Searches in `package-get-base' for SYM. If SYM is a
- consp, then it must match a corresponding (provide (SYM VERSION)) from
+ consp, then it must match a corresponding (provide (SYM VERSION)) from
the package.
If FORCE-CURRENT is non-nil make sure the database is up to date. This might
(defun package-get-ever-installed-p (pkg &optional notused)
(string-match "-package$" (symbol-name pkg))
- (custom-initialize-set
- pkg
- (if (package-get-info-find-package
- packages-package-list
+ (custom-initialize-set
+ pkg
+ (if (package-get-info-find-package
+ packages-package-list
(intern (substring (symbol-name pkg) 0 (match-beginning 0))))
t)))
(defun pui-directory-exists (dir)
"Check to see if DIR exists in `package-get-remote'."
(let (found)
- (mapcar '(lambda (item)
- (if (and (null (car item))
- (string-equal (file-name-as-directory (car (cdr item)))
- (file-name-as-directory dir)))
- (setq found t))
- ) package-get-remote)
+ (mapcar #'(lambda (item)
+ (if (and (null (car item))
+ (string-equal (file-name-as-directory (car (cdr item)))
+ (file-name-as-directory dir)))
+ (setq found t)))
+ package-get-remote)
found
))
(save-window-excursion
(with-output-to-temp-buffer tmpbuf
(display-completion-list (sort
- (mapcar '(lambda (pkg)
- (symbol-name pkg)
- )
- pui-deleted-packages)
- 'string<)
+ (mapcar #'symbol-name pui-deleted-packages)
+ #'string<)
:activate-callback nil
:help-string "Packages selected for removal:\n"
:completion-string t
;; errors occur, which would normally be caused by display-buffer).
(save-window-excursion
(with-output-to-temp-buffer tmpbuf
- (display-completion-list (sort
- (mapcar '(lambda (pkg)
- (symbol-name pkg)
- )
- pui-selected-packages)
- 'string<)
- :activate-callback nil
- :help-string "Packages selected for installation:\n"
- :completion-string t
- ))
+ (display-completion-list
+ (sort (mapcar #'symbol-name pui-selected-packages) #'string<)
+ :activate-callback nil
+ :help-string "Packages selected for installation:\n"
+ :completion-string t
+ ))
(setq tmpbuf (get-buffer-create tmpbuf))
(display-buffer tmpbuf)
(setq do-install (y-or-n-p "Install these packages? "))
"))
(insert sep-string)
(setq start (point))
- (mapcar '(lambda (pkg)
- (let (pkg-sym info version desc
- b e extent current-vers disp)
- (setq pkg-sym (car pkg)
- info (package-get-info-version (cdr pkg) nil))
- (setq version (package-get-info-prop info 'version)
- desc (package-get-info-prop info 'description))
-
- (setq disp (pui-package-symbol-char pkg-sym
- version))
- (setq b (point))
- (if pui-list-verbose
- (progn
- (setq current-vers (package-get-key pkg-sym :version))
- (cond
- ( (not current-vers)
- (setq current-vers "-----") )
- ( (stringp current-vers)
- (setq current-vers
- (format "%.2f"
- (string-to-number current-vers))) )
- ( (numberp current-vers)
- (setq current-vers (format "%.2f" current-vers)) )
- )
- (insert
- (format "%s %-15s %-5.2f %-5s %s\n"
- (car disp) pkg-sym
- (if (stringp version)
- (string-to-number version)
- version)
- current-vers desc))
-;; (insert
-;; (format "\t\t %-12s %s\n"
-;; (package-get-info-prop info 'author-version)
-;; (package-get-info-prop info 'date)
-;; ))
- )
- (insert (format "%s %-15s %-5s %s\n"
- (car disp)
- pkg-sym version desc)))
- (save-excursion
- (setq e (progn
- (forward-line -1)
- (end-of-line)
- (point)))
- )
- (setq extent (make-extent b e))
- (if (car (cdr disp))
- (set-extent-face extent (get-face (car (cdr disp))))
- (set-extent-face extent (get-face 'default)))
- (set-extent-property extent 'highlight t)
- (set-extent-property extent 'pui t)
- (set-extent-property extent 'pui-package pkg-sym)
- (set-extent-property extent 'pui-info info)
- (set-extent-property extent 'help-echo 'pui-help-echo)
- (set-extent-property extent 'keymap pui-package-keymap)
- )) (sort (copy-sequence package-get-base)
- '(lambda (a b)
- (string< (symbol-name (car a))
- (symbol-name (car b)))
- )))
+ (mapcar
+ #'(lambda (pkg)
+ (let (pkg-sym info version desc
+ b e extent current-vers disp)
+ (setq pkg-sym (car pkg)
+ info (package-get-info-version (cdr pkg) nil))
+ (setq version (package-get-info-prop info 'version)
+ desc (package-get-info-prop info 'description))
+
+ (setq disp (pui-package-symbol-char pkg-sym
+ version))
+ (setq b (point))
+ (if pui-list-verbose
+ (progn
+ (setq current-vers (package-get-key pkg-sym :version))
+ (cond
+ ( (not current-vers)
+ (setq current-vers "-----") )
+ ( (stringp current-vers)
+ (setq current-vers
+ (format "%.2f"
+ (string-to-number current-vers))) )
+ ( (numberp current-vers)
+ (setq current-vers (format "%.2f" current-vers)) )
+ )
+ (insert
+ (format "%s %-15s %-5.2f %-5s %s\n"
+ (car disp) pkg-sym
+ (if (stringp version)
+ (string-to-number version)
+ version)
+ current-vers desc))
+ ;; (insert
+ ;; (format "\t\t %-12s %s\n"
+ ;; (package-get-info-prop info 'author-version)
+ ;; (package-get-info-prop info 'date)))
+ )
+ (insert (format "%s %-15s %-5s %s\n"
+ (car disp)
+ pkg-sym version desc)))
+ (save-excursion
+ (setq e (progn
+ (forward-line -1)
+ (end-of-line)
+ (point))))
+ (setq extent (make-extent b e))
+ (if (car (cdr disp))
+ (set-extent-face extent (get-face (car (cdr disp))))
+ (set-extent-face extent (get-face 'default)))
+ (set-extent-property extent 'highlight t)
+ (set-extent-property extent 'pui t)
+ (set-extent-property extent 'pui-package pkg-sym)
+ (set-extent-property extent 'pui-info info)
+ (set-extent-property extent 'help-echo 'pui-help-echo)
+ (set-extent-property extent 'keymap pui-package-keymap)
+ ))
+ (sort (copy-sequence package-get-base)
+ #'(lambda (a b)
+ (string< (symbol-name (car a))
+ (symbol-name (car b))))))
(insert sep-string)
(insert (documentation 'list-packages-mode))
(set-buffer-modified-p nil)
(add-submenu '() pui-menu)
(setq mode-popup-menu pui-menu))
(clear-message)
-; (message (substitute-command-keys "Press `\\[pui-help]' for help."))
+ ;; (message (substitute-command-keys "Press `\\[pui-help]' for help."))
))
;;;###autoload
;;; process.el --- commands for subprocesses; split out of simple.el
;; Copyright (C) 1985-7, 1993,4, 1997 Free Software Foundation, Inc.
-;; Copyright (C) 1995 Ben Wing.
+;; Copyright (C) 1995, 2000 Ben Wing.
;; Author: Ben Wing
;; Maintainer: XEmacs Development Team
;;; Synched up with: FSF 19.30.
+;;; Authorship:
+
+;; Created 1995 by Ben Wing during Mule work -- some commands split out
+;; of simple.el and wrappers of *-internal functions created so they could
+;; be redefined in a Mule world.
+;; Lisp definition of call-process-internal added Mar. 2000 by Ben Wing.
+
;;; Commentary:
;; This file is dumped with XEmacs.
(start-process name buffer shell-file-name shell-command-switch
(mapconcat #'identity args " ")))
+(defun call-process-internal (program &optional infile buffer display &rest args)
+ "Call PROGRAM synchronously in separate process, with coding-system specified.
+Arguments are
+ (PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS).
+The program's input comes from file INFILE (nil means `/dev/null').
+Insert output in BUFFER before point; t means current buffer;
+ nil for BUFFER means discard it; 0 means discard and don't wait.
+BUFFER can also have the form (REAL-BUFFER STDERR-FILE); in that case,
+REAL-BUFFER says what to do with standard output, as above,
+while STDERR-FILE says what to do with standard error in the child.
+STDERR-FILE may be nil (discard standard error output),
+t (mix it with ordinary output), or a file name string.
+
+Fourth arg DISPLAY non-nil means redisplay buffer as output is inserted.
+Remaining arguments are strings passed as command arguments to PROGRAM.
+
+If BUFFER is 0, `call-process' returns immediately with value nil.
+Otherwise it waits for PROGRAM to terminate and returns a numeric exit status
+ or a signal description string.
+If you quit, the process is killed with SIGINT, or SIGKILL if you
+ quit again."
+ ;; #### remove windows-nt check when this is ready for prime time.
+ (if (or (noninteractive) (not (eq 'windows-nt system-type)))
+ (apply 'old-call-process-internal program infile buffer display args)
+ (let (proc inbuf errbuf discard)
+ (unwind-protect
+ (progn
+ (when infile
+ (setq infile (expand-file-name infile))
+ (setq inbuf (generate-new-buffer "*call-process*"))
+ (with-current-buffer inbuf
+ (insert-file-contents-internal infile nil nil nil nil
+ coding-system-for-read)))
+ (let ((stderr (if (consp buffer) (second buffer) t)))
+ (if (consp buffer) (setq buffer (car buffer)))
+ (setq buffer
+ (cond ((null buffer) nil)
+ ((eq buffer t) (current-buffer))
+ ;; use integerp for compatibility with existing
+ ;; call-process rmsism.
+ ((integerp buffer) (setq discard t) nil)
+ (t (get-buffer-create buffer))))
+ (when (and stderr (not (eq t stderr)))
+ (setq stderr (expand-file-name stderr))
+ (setq errbuf (generate-new-buffer "*call-process*")))
+ (setq proc
+ (apply 'start-process-internal "*call-process*"
+ buffer
+ ;#### not implemented until my new process
+ ;changes go in.
+ ;(if (eq t stderr) buffer (list buffer errbuf))
+ program args))
+ (if buffer
+ (set-marker (process-mark proc) (point buffer) buffer))
+ (unwind-protect
+ (progn
+ (catch 'call-process-done
+ (when (not discard)
+ (set-process-sentinel
+ proc
+ #'(lambda (proc status)
+ (cond ((eq 'exit (process-status proc))
+ (set-process-sentinel proc nil)
+ (throw 'call-process-done
+ (process-exit-status proc)))
+ ((eq 'signal (process-status proc))
+ (set-process-sentinel proc nil)
+ (throw 'call-process-done status))))))
+ (when inbuf
+ (process-send-region proc 1
+ (1+ (buffer-size inbuf)) inbuf))
+ (process-send-eof proc)
+ (when discard
+ ;; we're trying really really hard to emulate
+ ;; the old call-process.
+ (if errbuf
+ (set-process-sentinel
+ proc
+ `(lambda (proc status)
+ (write-region-internal
+ 1 (1+ (buffer-size))
+ ,stderr
+ nil 'major-rms-kludge-city nil
+ coding-system-for-write))))
+ (setq errbuf nil)
+ (setq proc nil)
+ (throw 'call-process-done nil))
+ (while t
+ (accept-process-output proc)
+ (if display (sit-for 0))))
+ (when errbuf
+ (with-current-buffer errbuf
+ (write-region-internal 1 (1+ (buffer-size)) stderr
+ nil 'major-rms-kludge-city nil
+ coding-system-for-write))))
+ (if proc (set-process-sentinel proc nil)))))
+ (if inbuf (kill-buffer inbuf))
+ (if errbuf (kill-buffer errbuf))
+ (condition-case nil
+ (if (and proc (process-live-p proc)) (kill-process proc))
+ (error nil))))))
+
(defun call-process (program &optional infile buffer displayp &rest args)
"Call PROGRAM synchronously in separate process.
The program's input comes from file INFILE (nil means `/dev/null').
;;; rect.el --- rectangle functions for XEmacs.
-;; Copyright (C) 1985, 1993, 1994, 1999 Free Software Foundation, Inc.
+;; Copyright (C) 1985-2000 Free Software Foundation, Inc.
-;; Maintainer: Didier Verna <verna@inf.enst.fr>
+;; Maintainer: Didier Verna <didier@xemacs.org>
;; Keywords: internal
;; This file is part of XEmacs.
;; in the XEmacs Reference Manual.
;; #### NOTE: this file has been almost completely rewritten by Didier Verna
-;; <verna@inf.enst.fr>, Jul 99. The purpose of this rewrite is to be less
+;; <didier@xemacs.org>, Jul 99. The purpose of this rewrite is to be less
;; intrusive and fill lines with whitespaces only when needed. A few functions
;; are untouched though, as noted above their definition.
(forward-line 1)))
))
+
+(defun delete-rectangle-line (startcol endcol fill)
+ (let ((pt (point-at-eol)))
+ (when (= (move-to-column startcol (or fill 'coerce)) startcol)
+ (if (and (not fill) (<= pt endcol))
+ (delete-region (point) pt)
+ ;; else
+ (setq pt (point))
+ (move-to-column endcol t)
+ (delete-region pt (point))))
+ ))
+
+;;;###autoload
+(defun delete-rectangle (start end &optional fill)
+ "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.
+
+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")
+ (apply-on-rectangle 'delete-rectangle-line start end fill))
+
+
;; I love ascii art ;-)
(defconst spaces-strings '[""
" "
" "
" "])
-
;; This function is untouched --dv
(defun spaces-string (n)
(if (<= n 8) (aref spaces-strings n)
n (- n 8)))
(concat val (aref spaces-strings n)))))
-;;;###autoload
-(defvar killed-rectangle nil
- "Rectangle for `yank-rectangle' to insert.")
-
-;;;###autoload
-(defun kill-rectangle (start end &optional fill)
- "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."
- (interactive "*r\nP")
- (when buffer-read-only
- (setq killed-rectangle (extract-rectangle start end))
- (barf-if-buffer-read-only))
- (setq killed-rectangle (delete-extract-rectangle start end fill)))
-
-;;;###autoload
-(defun delete-rectangle (start end &optional fill)
- "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.
-
-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")
- (apply-on-rectangle 'delete-rectangle-line start end fill))
-
-(defun delete-rectangle-line (startcol endcol fill)
- (let ((pt (point-at-eol)))
- (when (= (move-to-column startcol (or fill 'coerce)) startcol)
- (if (and (not fill) (<= pt endcol))
- (delete-region (point) pt)
- ;; else
- (setq pt (point))
- (move-to-column endcol t)
- (delete-region pt (point))))
- ))
-
-;;;###autoload
-(defun delete-extract-rectangle (start end &optional fill)
- "Delete the contents of the rectangle with corners at START and END, and
-return it as a list of strings, one for each line of the rectangle.
-
-With an optional FILL argument, also fill lines where nothing has to be
-deleted."
- (let ((lines (list nil)))
- (apply-on-rectangle 'delete-extract-rectangle-line start end lines fill)
- (nreverse (cdr lines))))
(defun delete-extract-rectangle-line (startcol endcol lines fill)
(let ((pt (point-at-eol)))
))
;;;###autoload
-(defun extract-rectangle (start end)
- "Return the contents of the rectangle with corners at START and END,
-as a list of strings, one for each line of the rectangle."
+(defun delete-extract-rectangle (start end &optional fill)
+ "Delete the contents of the rectangle with corners at START and END, and
+return it as a list of strings, one for each line of the rectangle.
+
+With an optional FILL argument, also fill lines where nothing has to be
+deleted."
(let ((lines (list nil)))
- (apply-on-rectangle 'extract-rectangle-line start end lines)
+ (apply-on-rectangle 'delete-extract-rectangle-line start end lines fill)
(nreverse (cdr lines))))
+
;; #### NOTE: this is actually the only function that needs to do complicated
;; stuff like what's happening in `operate-on-rectangle', because the buffer
;; might be read-only. --dv
(spaces-string endextra))))
(setcdr lines (cons line (cdr lines)))))
+;;;###autoload
+(defun extract-rectangle (start end)
+ "Return the contents of the rectangle with corners at START and END,
+as a list of strings, one for each line of the rectangle."
+ (let ((lines (list nil)))
+ (apply-on-rectangle 'extract-rectangle-line start end lines)
+ (nreverse (cdr lines))))
+
+
+;;;###autoload
+(defvar killed-rectangle nil
+ "Rectangle for `yank-rectangle' to insert.")
+
+;;;###autoload
+(defun kill-rectangle (start end &optional fill)
+ "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."
+ (interactive "*r\nP")
+ (when buffer-read-only
+ (setq killed-rectangle (extract-rectangle start end))
+ (barf-if-buffer-read-only))
+ (setq killed-rectangle (delete-extract-rectangle start end fill)))
+
;; This function is untouched --dv
;;;###autoload
(defun yank-rectangle ()
(interactive "*")
(insert-rectangle killed-rectangle))
+
;; This function is untouched --dv
;;;###autoload
(defun insert-rectangle (rectangle)
(insert (car lines))
(setq lines (cdr lines)))))
+
+(defun open-rectangle-line (startcol endcol fill)
+ (let (spaces)
+ (when (= (move-to-column startcol (or fill 'coerce)) startcol)
+ (unless (and (not fill)
+ (= (point) (point-at-eol)))
+ (indent-to endcol)))
+ ))
+
;;;###autoload
(defun open-rectangle (start end &optional fill)
"Blank out the region-rectangle, shifting text right.
(apply-on-rectangle 'open-rectangle-line start end fill)
(goto-char start))
-(defun open-rectangle-line (startcol endcol fill)
- (let (spaces)
- (when (= (move-to-column startcol (or fill 'coerce)) startcol)
- (unless (and (not fill)
- (= (point) (point-at-eol)))
- (indent-to endcol)))
- ))
+
+(defun string-rectangle-line (startcol endcol string delete)
+ (move-to-column startcol t)
+ (if delete
+ (delete-rectangle-line startcol endcol nil))
+ (insert string))
;;;###autoload
(defun string-rectangle (start end string)
"Insert STRING on each line of the region-rectangle, shifting text right.
-The left edge of the rectangle specifies the column for insertion. This
-command does not delete or overwrite any existing text.
+The left edge of the rectangle specifies the column for insertion.
+
+If `pending-delete-mode' is active the string replace the region.
+Otherwise 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))
+ (apply-on-rectangle 'string-rectangle-line start end string
+ (and (boundp 'pending-delete-mode) pending-delete-mode)))
-(defun string-rectangle-line (startcol endcol string)
- (move-to-column startcol t)
- (insert string))
-
-;;;###autoload
-(defun clear-rectangle (start end &optional fill)
- "Blank out the region-rectangle.
-The text previously in the region is overwritten with blanks.
+(defun replace-rectangle (start end string)
+ "Like `string-rectangle', but unconditionally replace the original region,
+as if `pending-delete-mode' were active."
+ (interactive "*r\nsString rectangle: ")
+ (apply-on-rectangle 'string-rectangle-line start end string t))
-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")
- (apply-on-rectangle 'clear-rectangle-line start end fill))
(defun clear-rectangle-line (startcol endcol fill)
(let ((pt (point-at-eol))
(indent-to (+ (current-column) spaces))))
))
+;;;###autoload
+(defun clear-rectangle (start end &optional fill)
+ "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."
+ (interactive "*r\nP")
+ (apply-on-rectangle 'clear-rectangle-line start end fill))
+
+
(provide 'rect)
;;; rect.el ends here
This will do nothing under anything other than X.")
(defun get-selection-no-error (&optional type data-type)
- "Return the value of a Windows selection.
+ "Return the value of a window-system selection.
The argument TYPE (default `PRIMARY') says which selection,
and the argument DATA-TYPE (default `STRING', or `COMPOUND_TEXT' under Mule)
says how to convert the data. Returns NIL if there is no selection"
(condition-case err (get-selection type data-type) (t nil)))
(defun get-selection (&optional type data-type)
- "Return the value of a Windows selection.
+ "Return the value of a window-system selection.
The argument TYPE (default `PRIMARY') says which selection,
and the argument DATA-TYPE (default `STRING', or `COMPOUND_TEXT' under Mule)
says how to convert the data. If there is no selection an error is signalled."
text))
;; FSFmacs calls this `x-set-selection', and reverses the
-;; arguments (duh ...). This order is more logical.
-(defun own-selection (data &optional type)
- "Make an Windows selection of type TYPE and value DATA.
+;; first two arguments (duh ...). This order is more logical.
+(defun own-selection (data &optional type append)
+ "Make a window-system selection of type TYPE and value DATA.
The argument TYPE (default `PRIMARY') says which selection,
and DATA specifies the contents. DATA may be a string,
a symbol, an integer (or a cons of two integers or list of two integers).
+If APPEND is non-nil, append the data to the existing selection data.
The selection may also be a cons of two markers pointing to the same buffer,
or an overlay. In these cases, the selection is considered to be the text
(interactive (if (not current-prefix-arg)
(list (read-string "Store text for pasting: "))
(list (substring (region-beginning) (region-end)))))
- ;FSFmacs huh?? It says:
- ;; "This is for temporary compatibility with pre-release Emacs 19."
- ;(if (stringp type)
- ; (setq type (intern type)))
- (or (valid-simple-selection-p data)
- (and (vectorp data)
- (let ((valid t)
- (i (1- (length data))))
- (while (>= i 0)
- (or (valid-simple-selection-p (aref data i))
- (setq valid nil))
- (setq i (1- i)))
- valid))
- (signal 'error (list "invalid selection" data)))
- (or type (setq type 'PRIMARY))
- (if (null data)
- (disown-selection-internal type)
- (own-selection-internal type data)
- (when (and (eq type 'PRIMARY)
- selection-sets-clipboard)
- (own-selection-internal 'CLIPBOARD data)))
- (cond ((eq type 'PRIMARY)
- (setq primary-selection-extent
- (select-make-extent-for-selection
- data primary-selection-extent)))
- ((eq type 'SECONDARY)
- (setq secondary-selection-extent
- (select-make-extent-for-selection
- data secondary-selection-extent))))
- (setq zmacs-region-stays t)
+ ;; calling own-selection-internal will mess this up, so preserve it.
+ (let ((zmacs-region-stays zmacs-region-stays))
+ ;FSFmacs huh?? It says:
+ ;; "This is for temporary compatibility with pre-release Emacs 19."
+ ;(if (stringp type)
+ ; (setq type (intern type)))
+ (or (valid-simple-selection-p data)
+ (and (vectorp data)
+ (let ((valid t)
+ (i (1- (length data))))
+ (while (>= i 0)
+ (or (valid-simple-selection-p (aref data i))
+ (setq valid nil))
+ (setq i (1- i)))
+ valid))
+ (signal 'error (list "invalid selection" data)))
+ (or type (setq type 'PRIMARY))
+ (flet ((own-selection-1
+ (type data append)
+ (when append
+ (unless (stringp data)
+ ;; kludge!
+ (setq data (select-convert-to-text type 'STRING data))
+ (if (stringp data)
+ (setq data (concat (get-selection type) data)))))
+ (own-selection-internal type data)))
+ (if (null data)
+ (disown-selection-internal type)
+ (own-selection-1 type data append)
+ (when (and (eq type 'PRIMARY)
+ selection-sets-clipboard)
+ (own-selection-internal 'CLIPBOARD data append))))
+ (cond ((eq type 'PRIMARY)
+ (setq primary-selection-extent
+ (select-make-extent-for-selection
+ data primary-selection-extent)))
+ ((eq type 'SECONDARY)
+ (setq secondary-selection-extent
+ (select-make-extent-for-selection
+ data secondary-selection-extent)))))
+ ;; zmacs-region-stays is for commands, not low-level functions.
+ ;; when behaving as the latter, we better not set it, or we will
+ ;; cause unwanted sticky-region behavior in kill-region and friends.
+ (if (interactive-p)
+ (setq zmacs-region-stays t))
data)
(defun dehilight-selection (selection)
(setq lost-selection-hooks 'dehilight-selection)
-(defun own-clipboard (string)
- "Paste the given string to the window system Clipboard."
+(defun own-clipboard (string &optional append)
+ "Paste the given string to the window system Clipboard.
+If APPEND is non-nil, append the string to the existing contents."
(own-selection string 'CLIPBOARD))
(defun disown-selection (&optional secondary-p)
;; Copyright (C) 1985-7, 1993-5, 1997 Free Software Foundation, Inc.
;; Copyright (C) 1995 Tinker Systems and INS Engineering Corp.
+;; Copyright (C) 2000 Ben Wing.
;; Maintainer: XEmacs Development Team
;; Keywords: lisp, extensions, internal, dumped
(skip-chars-forward " \t"))
(defcustom kill-whole-line nil
- "*If non-nil, `kill-line' with no arg at beg of line kills the whole line."
- :type 'boolean
+ "*Control when and whether `kill-line' removes entire lines.
+Note: This only applies when `kill-line' is called interactively;
+otherwise, it behaves \"historically\".
+
+If `always', `kill-line' with no arg always kills the whole line,
+wherever point is in the line. (If you want to just kill to the end
+of the line, use \\[historical-kill-line].)
+
+If not `always' but non-nil, `kill-line' with no arg kills the whole
+line if point is at the beginning, and otherwise behaves historically.
+
+If nil, `kill-line' behaves historically."
+ :type '(radio (const :tag "Kill to end of line" nil)
+ (const :tag "Kill whole line" always)
+ (const
+ :tag "Kill whole line at beginning, otherwise end of line" t))
:group 'killing)
+(defun historical-kill-line (&optional arg)
+ "Same as `kill-line' but ignores value of `kill-whole-line'."
+ (interactive "*P")
+ (let ((kill-whole-line nil))
+ (if (interactive-p)
+ (call-interactively 'kill-line)
+ (kill-line arg))))
+
(defun kill-line (&optional arg)
- "Kill the rest of the current line; if no nonblanks there, kill thru newline.
+ "Kill the rest of the current line, or the entire line.
+If no nonblanks there, kill thru newline.
+If called interactively, may kill the entire line; see `kill-whole-line'.
+when given no argument at the beginning of a line.
With prefix argument, kill that many lines from point.
Negative arguments kill lines backward.
When calling from a program, nil means \"no arg\",
-a number counts as a prefix arg.
-
-If `kill-whole-line' is non-nil, then kill the whole line
-when given no argument at the beginning of a line."
+a number counts as a prefix arg."
(interactive "*P")
- (kill-region (point)
+ (kill-region (if (and (interactive-p)
+ (not arg)
+ (eq kill-whole-line 'always))
+ (save-excursion
+ (beginning-of-line)
+ (point))
+ (point))
;; Don't shift point before doing the delete; that way,
;; undo will record the right position of point.
;; FSF
(forward-line (prefix-numeric-value arg))
(if (eobp)
(signal 'end-of-buffer nil))
- (if (or (looking-at "[ \t]*$") (and kill-whole-line (bolp)))
+ (if (or (looking-at "[ \t]*$")
+ (and (interactive-p)
+ (or (eq kill-whole-line 'always)
+ (and kill-whole-line (bolp)))))
(forward-line 1)
(end-of-line)))
(point))))
;;; the cut buffers. I'm afraid to change interface of `kill-hooks',
;;; so I add it. (1997-11-03 by MORIOKA Tomohiko)
-(defvar interprogram-cut-function nil
+(defcustom interprogram-cut-function 'own-clipboard
"Function to call to make a killed region available to other programs.
Most window systems provide some sort of facility for cutting and
The first argument, TEXT, is a string containing
the text which should be made available.
The second, PUSH, if non-nil means this is a \"new\" kill;
-nil means appending to an \"old\" kill.")
+nil means appending to an \"old\" kill."
+ :type '(radio (function-item :tag "Send to Clipboard"
+ :format "%t\n"
+ own-clipboard)
+ (const :tag "None" nil)
+ (function :tag "Other"))
+ :group 'killing)
-(defvar interprogram-paste-function nil
+(defcustom interprogram-paste-function 'get-clipboard
"Function to call to get text cut from other programs.
Most window systems provide some sort of facility for cutting and
most recent string, the function should return nil. If it is
difficult to tell whether Emacs or some other program provided the
current string, it is probably good enough to return nil if the string
-is equal (according to `string=') to the last text Emacs provided.")
+is equal (according to `string=') to the last text Emacs provided."
+ :type '(radio (function-item :tag "Get from Clipboard"
+ :format "%t\n"
+ get-clipboard)
+ (const :tag "None" nil)
+ (function :tag "Other"))
+ :group 'killing)
\f
;;;; The kill ring data structure.
; (set-marker (mark-marker) nil)))
(defvar mark-ring nil
- "The list of former marks of the current buffer, most recent first.")
+ "The list of former marks of the current buffer, most recent first.
+This variable is automatically buffer-local.")
(make-variable-buffer-local 'mark-ring)
(put 'mark-ring 'permanent-local t)
+(defvar dont-record-current-mark nil
+ "If set to t, the current mark value should not be recorded on the mark ring.
+This is set by commands that manipulate the mark incidentally, to avoid
+cluttering the mark ring unnecessarily. Under most circumstances, you do
+not need to set this directly; it is automatically reset each time
+`push-mark' is called, according to `mark-ring-unrecorded-commands'. This
+variable is automatically buffer-local.")
+(make-variable-buffer-local 'dont-record-current-mark)
+(put 'dont-record-current-mark 'permanent-local t)
+
+;; a conspiracy between push-mark and handle-pre-motion-command
+(defvar in-shifted-motion-command nil)
+
+(defcustom mark-ring-unrecorded-commands '(shifted-motion-commands
+ yank
+ mark-beginning-of-buffer
+ mark-bob
+ mark-defun
+ mark-end-of-buffer
+ mark-end-of-line
+ mark-end-of-sentence
+ mark-eob
+ mark-marker
+ mark-page
+ mark-paragraph
+ mark-sexp
+ mark-whole-buffer
+ mark-word)
+ "*List of commands whose marks should not be recorded on the mark stack.
+Many commands set the mark as part of their action. Normally, all such
+marks get recorded onto the mark stack. However, this tends to clutter up
+the mark stack unnecessarily. You can control this by putting a command
+onto this list. Then, any marks set by the function will not be recorded.
+
+The special value `shifted-motion-commands' causes marks set as a result
+of selection using any shifted motion commands to not be recorded.
+
+The value `yank' affects all yank-like commands, as well as just `yank'."
+ :type '(repeat (choice (const :tag "shifted motion commands"
+ 'shifted-motion-commands)
+ (const :tag "functions that select text"
+ :inline t
+ '(mark-beginning-of-buffer
+ mark-bob
+ mark-defun
+ mark-end-of-buffer
+ mark-end-of-line
+ mark-end-of-sentence
+ mark-eob
+ mark-marker
+ mark-page
+ mark-paragraph
+ mark-sexp
+ mark-whole-buffer
+ mark-word))
+ (const :tag "functions that paste text"
+ 'yank)
+ function))
+ :group 'killing)
+
(defcustom mark-ring-max 16
"*Maximum size of mark ring. Start discarding off end if gets this big."
:type 'integer
With argument, jump to mark, and pop a new position for mark off the ring
\(does not affect global mark ring\).
+The mark ring is a per-buffer stack of marks, most recent first. Its
+maximum length is controlled by `mark-ring-max'. Generally, when new
+marks are set, the current mark is pushed onto the stack. You can pop
+marks off the stack using \\[universal-argument] \\[set-mark-command]. The term \"ring\" is used because when
+you pop a mark off the stack, the current mark value is pushed onto the
+far end of the stack. If this is confusing, just think of the mark ring
+as a stack.
+
Novice Emacs Lisp programmers often try to use the mark for the wrong
purposes. See the documentation of `set-mark' for more information."
(interactive "P")
(push-mark nil nil t)
(if (null (mark t))
(error "No mark set in this buffer")
+ (if dont-record-current-mark (pop-mark))
(goto-char (mark t))
(pop-mark))))
Novice Emacs Lisp programmers often try to use the mark for the wrong
purposes. See the documentation of `set-mark' for more information."
(setq buffer (decode-buffer buffer)) ; XEmacs
- (if (null (mark t buffer)) ; XEmacs
+ (if (or dont-record-current-mark (null (mark t buffer))) ; XEmacs
nil
;; The save-excursion / set-buffer is necessary because mark-ring
;; is a buffer local variable
(set-mark (or location (point buffer)) buffer)
; (set-marker (mark-marker) (or location (point)) (current-buffer)) ; FSF
;; Now push the mark on the global mark ring.
- (if (or (null global-mark-ring)
- (not (eq (marker-buffer (car global-mark-ring)) buffer)))
+ (if (and (not dont-record-current-mark)
+ (or (null global-mark-ring)
+ (not (eq (marker-buffer (car global-mark-ring)) buffer))))
;; The last global mark pushed wasn't in this same buffer.
(progn
(setq global-mark-ring (cons (copy-marker (mark-marker t buffer))
(move-marker (car (nthcdr global-mark-ring-max global-mark-ring))
nil buffer)
(setcdr (nthcdr (1- global-mark-ring-max) global-mark-ring) nil)))))
- (or nomsg executing-kbd-macro (> (minibuffer-depth) 0)
+ (setq dont-record-current-mark
+ (not (not (or (and in-shifted-motion-command
+ (memq 'shifted-motion-commands
+ mark-ring-unrecorded-commands))
+ (memq this-command mark-ring-unrecorded-commands)))))
+ (or dont-record-current-mark nomsg executing-kbd-macro
+ (> (minibuffer-depth) 0)
(display-message 'command "Mark set"))
(if activate-region
(progn
:type 'boolean
:group 'editing-basics)
+(defcustom shifted-motion-keys-select-region t
+ "*If non-nil, shifted motion keys select text, like in MS Windows.
+See also `unshifted-motion-keys-deselect-region'."
+ :type 'boolean
+ :group 'editing-basics)
+
+(defcustom unshifted-motion-keys-deselect-region t
+ "*If non-nil, unshifted motion keys deselect a shifted-motion region.
+This only occurs after a region has been selected using shifted motion keys
+(not when using the traditional set-mark-then-move method), and has no effect
+if `shifted-motion-keys-select-region' is nil."
+ :type 'boolean
+ :group 'editing-basics)
+
+(defun handle-pre-motion-command-current-command-is-motion ()
+ (and (key-press-event-p last-input-event)
+ (memq (event-key last-input-event)
+ '(left right up down home end prior next
+ kp-left kp-right kp-up kp-down
+ kp-home kp-end kp-prior kp-next))))
+
+(defun handle-pre-motion-command ()
+ (if
+ (and
+ (handle-pre-motion-command-current-command-is-motion)
+ zmacs-regions
+ shifted-motion-keys-select-region
+ (not (region-active-p))
+ (memq 'shift (event-modifiers last-input-event)))
+ (let ((in-shifted-motion-command t))
+ (push-mark nil nil t))))
+
+(defun handle-post-motion-command ()
+ (if
+ (and
+ (handle-pre-motion-command-current-command-is-motion)
+ zmacs-regions
+ (region-active-p))
+ (cond ((memq 'shift (event-modifiers last-input-event))
+ (if shifted-motion-keys-select-region
+ (putf this-command-properties 'shifted-motion-command t))
+ (setq zmacs-region-stays t))
+ ((and (getf last-command-properties 'shifted-motion-command)
+ unshifted-motion-keys-deselect-region)
+ (setq zmacs-region-stays nil))
+ (t
+ (setq zmacs-region-stays t)))))
+
(defun forward-char-command (&optional arg buffer)
"Move point right ARG characters (left if ARG negative) in BUFFER.
On attempt to pass end of buffer, stop and signal `end-of-buffer'.
If you are thinking of using this in a Lisp program, consider
using `forward-line' instead. It is usually easier to use
and more reliable (no dependence on goal column, etc.)."
- (interactive "_p") ; XEmacs
+ (interactive "_p")
(if (and next-line-add-newlines (= arg 1))
(let ((opoint (point)))
(end-of-line)
If you are thinking of using this in a Lisp program, consider using
`forward-line' with a negative argument instead. It is usually easier
to use and more reliable (no dependence on goal column, etc.)."
- (interactive "_p") ; XEmacs
+ (interactive "_p")
(if (interactive-p)
(condition-case nil
(line-move (- arg))
(line-move (- arg)))
nil)
+(defcustom block-movement-size 6
+ "*Number of lines that \"block movement\" commands (\\[forward-block-of-lines], \\[backward-block-of-lines]) move by."
+ :type 'integer
+ :group 'editing-basics)
+
+(defun backward-block-of-lines ()
+ "Move backward by one \"block\" of lines.
+The number of lines that make up a block is controlled by
+`block-movement-size', which defaults to 6."
+ (interactive "_")
+ (forward-line (- block-movement-size)))
+
+(defun forward-block-of-lines ()
+ "Move forward by one \"block\" of lines.
+The number of lines that make up a block is controlled by
+`block-movement-size', which defaults to 6."
+ (interactive "_")
+ (forward-line block-movement-size))
+
(defcustom track-eol nil
"*Non-nil means vertical motion starting at end of line keeps to ends of lines.
This means moving to the end of each line moved onto.
element))
\f
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; mail composition code ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
(defcustom mail-user-agent 'sendmail-user-agent
"*Your preference for a mail composition package.
Various Emacs Lisp packages (e.g. reporter) require you to compose an
'switch-to-buffer-other-frame yank-action send-actions))
\f
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; set variable ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
(defun set-variable (var val)
"Set VARIABLE to VALUE. VALUE is a Lisp object.
When using this interactively, supply a Lisp expression for VALUE.
(if (and (boundp var) (specifierp (symbol-value var)))
(set-specifier (symbol-value var) val)
(set var val)))
-\f
-;; XEmacs
-(defun activate-region ()
- "Activate the region, if `zmacs-regions' is true.
-Setting `zmacs-regions' to true causes LISPM-style active regions to be used.
-This function has no effect if `zmacs-regions' is false."
- (interactive)
- (and zmacs-regions (zmacs-activate-region)))
-;; XEmacs
-(defsubst region-exists-p ()
- "Return t if the region exists.
-If active regions are in use (i.e. `zmacs-regions' is true), this means that
- the region is active. Otherwise, this means that the user has pushed
- a mark in this buffer at some point in the past.
-The functions `region-beginning' and `region-end' can be used to find the
- limits of the region."
- (not (null (mark))))
-
-;; XEmacs
-(defun region-active-p ()
- "Return non-nil if the region is active.
-If `zmacs-regions' is true, this is equivalent to `region-exists-p'.
-Otherwise, this function always returns false."
- (and zmacs-regions zmacs-region-extent))
+\f
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; case changing code ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; A bunch of stuff was moved elsewhere:
;; completion-list-mode-map
(downcase-region (region-beginning) (region-end))
(downcase-word arg)))
+;; #### not localized
+(defvar uncapitalized-title-words
+ '("the" "a" "an" "in" "of" "for" "to" "and" "but" "at" "on" "as" "by"))
+
+(defvar uncapitalized-title-word-regexp
+ (concat "[ \t]*\\(" (mapconcat #'identity uncapitalized-title-words "\\|")
+ "\\)\\>"))
+
+(defun capitalize-string-as-title (string)
+ "Capitalize the words in the string, except for small words (as in titles).
+The words not capitalized are specified in `uncapitalized-title-words'."
+ (let ((buffer (get-buffer-create " *capitalize-string-as-title*")))
+ (unwind-protect
+ (progn
+ (insert-string string buffer)
+ (capitalize-region-as-title 1 (point-max buffer) buffer)
+ (buffer-string buffer))
+ (kill-buffer buffer))))
+
+(defun capitalize-region-as-title (b e &optional buffer)
+ "Capitalize the words in the region, except for small words (as in titles).
+The words not capitalized are specified in `uncapitalized-title-words'."
+ (interactive "r")
+ (save-excursion
+ (and buffer
+ (set-buffer buffer))
+ (save-restriction
+ (narrow-to-region b e)
+ (goto-char (point-min))
+ (let ((first t))
+ (while (< (point) (point-max))
+ (if (or first
+ (not (looking-at uncapitalized-title-word-regexp)))
+ (capitalize-word 1)
+ (forward-word 1))
+ (setq first nil))))))
+
+\f
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; zmacs active region code ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
;; Most of the zmacs code is now in elisp. The only thing left in C
;; are the variables zmacs-regions, zmacs-region-active-p and
;; zmacs-region-stays plus the function zmacs_update_region which
;; simply calls the lisp level zmacs-update-region. It must remain
;; for convenience, since it is called by core C code.
+;; XEmacs
+(defun activate-region ()
+ "Activate the region, if `zmacs-regions' is true.
+Setting `zmacs-regions' to true causes LISPM-style active regions to be used.
+This function has no effect if `zmacs-regions' is false."
+ (interactive)
+ (and zmacs-regions (zmacs-activate-region)))
+
+;; XEmacs
+(defsubst region-exists-p ()
+ "Return t if the region exists.
+If active regions are in use (i.e. `zmacs-regions' is true), this means that
+ the region is active. Otherwise, this means that the user has pushed
+ a mark in this buffer at some point in the past.
+The functions `region-beginning' and `region-end' can be used to find the
+ limits of the region."
+ (not (null (mark))))
+
+;; XEmacs
+(defun region-active-p ()
+ "Return non-nil if the region is active.
+If `zmacs-regions' is true, this is equivalent to `region-exists-p'.
+Otherwise, this function always returns false."
+ (and zmacs-regions zmacs-region-extent))
+
(defvar zmacs-activate-region-hook nil
"Function or functions called when the region becomes active;
see the variable `zmacs-regions'.")
(mark-marker t))))
(run-hooks 'zmacs-update-region-hook)))
-;;;;;;
-;;;;;; echo area stuff
-;;;;;;
+\f
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; message logging code ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; #### Should this be moved to a separate file, for clarity?
;;; -hniksic
(display-message label str)
str)))
-
-;;;;;;
-;;;;;; warning stuff
-;;;;;;
+\f
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; warning code ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defcustom log-warning-minimum-level 'info
"Minimum level of warnings that should be logged.
(set-window-start (display-buffer buffer) warning-marker))
(set-marker warning-marker (point-max buffer) buffer)))
+\f
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; misc junk ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
(defun emacs-name ()
"Return the printable name of this instance of Emacs."
(cond ((featurep 'infodock) "InfoDock")
((featurep 'xemacs) "XEmacs")
(t "Emacs")))
-
+
;;; simple.el ends here
how-to-add))))
value)
+(defun modify-specifier-instances (specifier func &optional args force default
+ locale tag-set)
+ "Modify all specifications that match LOCALE and TAG-SET by FUNC.
+
+For each specification that exists for SPECIFIER, in locale LOCALE
+that matches TAG-SET, call the function FUNC with the instance as its
+first argument and with optional arguments ARGS. The result is then
+used as the new value of the instantiator.
+
+If there is no specification in the domain LOCALE matching TAG-SET and
+FORCE is non-nil, an explicit one is created from the matching
+specifier instance if that exists or DEFAULT otherwise. If LOCALE is
+not a domain (i.e. a buffer), DEFAULT is always used. FUNC is then
+applied like above and the resulting specification is added."
+
+ (let ((spec-list (specifier-spec-list specifier locale tag-set)))
+ (cond
+ (spec-list
+ ;; Destructively edit the spec-list
+ (mapc #'(lambda (spec)
+ (mapc #'(lambda (inst-pair)
+ (setcdr inst-pair
+ (apply func (cdr inst-pair) args)))
+ (cdr spec)))
+ spec-list)
+ (add-spec-list-to-specifier specifier spec-list))
+ (force
+ (set-specifier specifier
+ (apply func
+ (or (and (valid-specifier-domain-p locale)
+ (specifier-instance specifier))
+ default) args)
+ locale tag-set)))))
+
(defmacro let-specifier (specifier-list &rest body)
"Add specifier specs, evaluate forms in BODY and restore the specifiers.
\(let-specifier SPECIFIER-LIST BODY...)
;; 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.
(defun load-user-init-file ()
"This function actually reads the init file, .emacs."
- (if (not user-init-file)
- (setq user-init-file (find-user-init-file)))
- (load user-init-file t t t)
+ (if (or user-init-file
+ (setq user-init-file (find-user-init-file)))
+ (load user-init-file t t t))
(unless inhibit-default-init
(let ((inhibit-startup-message nil))
;; Users are supposed to be told their rights.
(file-count 0)
(line nil)
(end-of-options nil)
- first-file-buffer file-p arg tem)
+ file-p arg tem)
(while command-line-args-left
(setq arg (pop command-line-args-left))
(cond
(incf file-count)
(setq arg (expand-file-name arg dir))
(cond
- ((= file-count 1) (setq first-file-buffer
- (progn (find-file arg) (current-buffer))))
+ ((= file-count 1)
+ (find-file arg))
(noninteractive (find-file arg))
(t (find-file-other-window arg)))
(when line
;; Copyright (C) 1985, 1986, 1992, 1994-5, 1997 Free Software Foundation, Inc.
;; Copyright (C) 1995 Tinker Systems and INS Engineering Corp.
;; Copyright (C) 1995 Sun Microsystems.
+;; Copyright (C) 2000 Ben Wing.
;; Maintainer: XEmacs Development Team
;; Keywords: extensions, dumped
This function does nothing if HOOK is already local in the current
buffer.
-Do not use `make-local-variable' to make a hook variable buffer-local."
+Do not use `make-local-variable' to make a hook variable buffer-local.
+
+See also `add-local-hook' and `remove-local-hook'."
(if (local-variable-p hook (current-buffer)) ; XEmacs
nil
(or (boundp hook) (set hook nil))
HOOK should be a symbol, and FUNCTION may be any valid function. If
HOOK is void, it is first set to nil. If HOOK's value is a single
-function, it is changed to a list of functions."
+function, it is changed to a list of functions.
+
+You can remove this hook yourself using `remove-hook'.
+
+See also `add-local-hook' and `add-one-shot-hook'."
(or (boundp hook) (set hook nil))
(or (default-boundp hook) (set-default hook nil))
;; If the hook value is a single function, turn it into a list.
(null (symbol-value hook)) ;value is nil, or
(null function)) ;function is nil, then
nil ;Do nothing.
- (if (or local
- ;; Detect the case where make-local-variable was used on a hook
- ;; and do what we used to do.
- (and (local-variable-p hook (current-buffer))
- (not (memq t (symbol-value hook)))))
- (let ((hook-value (symbol-value hook)))
- (if (and (consp hook-value) (not (functionp hook-value)))
- (if (member function hook-value)
- (setq hook-value (delete function (copy-sequence hook-value))))
- (if (equal hook-value function)
- (setq hook-value nil)))
- (set hook hook-value))
- (let ((hook-value (default-value hook)))
- (if (and (consp hook-value) (not (functionp hook-value)))
- (if (member function hook-value)
- (setq hook-value (delete function (copy-sequence hook-value))))
- (if (equal hook-value function)
- (setq hook-value nil)))
- (set-default hook hook-value)))))
+ (flet ((hook-remove
+ (function hook-value)
+ (flet ((hook-test
+ (fn hel)
+ (or (equal fn hel)
+ (and (symbolp hel)
+ (equal fn
+ (get hel 'one-shot-hook-fun))))))
+ (if (and (consp hook-value)
+ (not (functionp hook-value)))
+ (if (member* function hook-value :test 'hook-test)
+ (setq hook-value
+ (delete* function (copy-sequence hook-value)
+ :test 'hook-test)))
+ (if (equal hook-value function)
+ (setq hook-value nil)))
+ hook-value)))
+ (if (or local
+ ;; Detect the case where make-local-variable was used on a hook
+ ;; and do what we used to do.
+ (and (local-variable-p hook (current-buffer))
+ (not (memq t (symbol-value hook)))))
+ (set hook (hook-remove function (symbol-value hook)))
+ (set-default hook (hook-remove function (default-value hook)))))))
+
+;; XEmacs addition
+;; #### we need a coherent scheme for indicating compatibility info,
+;; so that it can be programmatically retrieved.
+(defun add-local-hook (hook function &optional append)
+ "Add to the local value of HOOK the function FUNCTION.
+This modifies only the buffer-local value for the hook (which is
+automatically make buffer-local, if necessary), not its default value.
+FUNCTION is not added if already present.
+FUNCTION is added (if necessary) at the beginning of the hook list
+unless the optional argument APPEND is non-nil, in which case
+FUNCTION is added at the end.
+
+HOOK should be a symbol, and FUNCTION may be any valid function. If
+HOOK is void, it is first set to nil. If HOOK's value is a single
+function, it is changed to a list of functions.
+
+You can remove this hook yourself using `remove-local-hook'.
+
+See also `add-hook' and `make-local-hook'."
+ (make-local-hook hook)
+ (add-hook hook function append t))
+
+;; XEmacs addition
+(defun remove-local-hook (hook function)
+ "Remove from the local value of HOOK the function FUNCTION.
+This modifies only the buffer-local value for the hook, not its default
+value. (Nothing happens if the hook is not buffer-local.)
+HOOK should be a symbol, and FUNCTION may be any valid function. If
+FUNCTION isn't the value of HOOK, or, if FUNCTION doesn't appear in the
+list of hooks to run in HOOK, then nothing is done. See `add-hook'.
+
+See also `add-local-hook' and `make-local-hook'."
+ (if (local-variable-p hook (current-buffer))
+ (remove-hook hook function t)))
+
+(defun add-one-shot-hook (hook function &optional append local)
+ "Add to the value of HOOK the one-shot function FUNCTION.
+FUNCTION will automatically be removed from the hook the first time
+after it runs (whether to completion or to an error).
+FUNCTION is not added if already present.
+FUNCTION is added (if necessary) at the beginning of the hook list
+unless the optional argument APPEND is non-nil, in which case
+FUNCTION is added at the end.
+
+HOOK should be a symbol, and FUNCTION may be any valid function. If
+HOOK is void, it is first set to nil. If HOOK's value is a single
+function, it is changed to a list of functions.
+
+You can remove this hook yourself using `remove-hook'.
+
+See also `add-hook', `add-local-hook', and `add-local-one-shot-hook'."
+ (let ((sym (gensym)))
+ (fset sym `(lambda (&rest args)
+ (unwind-protect
+ (apply ',function args)
+ (remove-hook ',hook ',sym ',local))))
+ (put sym 'one-shot-hook-fun function)
+ (add-hook hook sym append local)))
+
+(defun add-local-one-shot-hook (hook function &optional append)
+ "Add to the local value of HOOK the one-shot function FUNCTION.
+FUNCTION will automatically be removed from the hook the first time
+after it runs (whether to completion or to an error).
+FUNCTION is not added if already present.
+FUNCTION is added (if necessary) at the beginning of the hook list
+unless the optional argument APPEND is non-nil, in which case
+FUNCTION is added at the end.
+
+The optional fourth argument, LOCAL, if non-nil, says to modify
+the hook's buffer-local value rather than its default value.
+This makes no difference if the hook is not buffer-local.
+To make a hook variable buffer-local, always use
+`make-local-hook', not `make-local-variable'.
+
+HOOK should be a symbol, and FUNCTION may be any valid function. If
+HOOK is void, it is first set to nil. If HOOK's value is a single
+function, it is changed to a list of functions.
+
+You can remove this hook yourself using `remove-local-hook'.
+
+See also `add-hook', `add-local-hook', and `add-local-one-shot-hook'."
+ (make-local-hook hook)
+ (add-one-shot-hook hook function append t))
(defun add-to-list (list-var element)
"Add to the value of LIST-VAR the element ELEMENT if it isn't there yet.
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,
"Collect output to `standard-output' while evaluating FORMS and return
it as a string."
;; by "William G. Dubuque" <wgd@zurich.ai.mit.edu> w/ mods from Stig
- `(with-current-buffer (get-buffer-create " *string-output*")
+ `(with-current-buffer (get-buffer-create
+ (generate-new-buffer-name " *string-output*"))
(setq buffer-read-only nil)
(buffer-disable-undo (current-buffer))
(erase-buffer)
"With the contents of the current buffer being STR, run BODY.
Returns the new contents of the buffer, as modified by BODY.
The original current buffer is restored afterwards."
- `(let ((tempbuf (get-buffer-create " *string-as-buffer-contents*")))
- (with-current-buffer tempbuf
- (unwind-protect
- (progn
- (buffer-disable-undo (current-buffer))
- (erase-buffer)
- (insert ,str)
- ,@body
- (buffer-string))
- (erase-buffer tempbuf)))))
+ `(with-temp-buffer
+ (insert ,str)
+ ,@body
+ (buffer-string)))
(defun insert-face (string face)
"Insert STRING and highlight with FACE. Return the extent created."
(t
(error "Non-funcallable object: %s" function))))
+(defun function-allows-args (function n)
+ "Return whether FUNCTION can be called with N arguments."
+ (and (<= (function-min-args function) n)
+ (or (null (function-max-args function))
+ (<= n (function-max-args function)))))
+
;; This function used to be an alias to `buffer-substring', except
;; that FSF Emacs 20.4 added a BUFFER argument in an incompatible way.
;; The new FSF's semantics makes more sense, but we try to support
"The location of the default toolbar. It can be 'top, 'bottom, 'left or
'right. This option can be customized through the options menu."
:group 'display
- :type '(choice (const :tag "top" 'top)
- (const :tag "bottom" 'bottom)
- (const :tag "left" 'left)
- (const :tag "right" 'right))
+ :type '(choice (const :tag "top" top)
+ (const :tag "bottom" bottom)
+ (const :tag "left" left)
+ (const :tag "right" right))
:set #'(lambda (var val)
(set-default-toolbar-position val)
(setq default-toolbar-position val))
;; (the idea here is that you can bootstrap if your .ELC files
;; are missing or badly out-of-date)
-;; Currently this code gets the list of files to check passed to it from
-;; src/Makefile. This must be fixed. -slb
-
;;; Code:
(defvar processed nil)
; ;; -batch gets filtered out.
; (nthcdr 3 command-line-args))))
-(setq load-path (split-path (getenv "EMACSBOOTSTRAPLOADPATH")))
+(let ((build-root (expand-file-name ".." invocation-directory)))
+ (setq load-path (list (expand-file-name "lisp" build-root))))
(load "very-early-lisp" nil t)
;; (print (prin1-to-string update-elc-files-to-compile))
-(let (preloaded-file-list site-load-packages)
+(let (preloaded-file-list site-load-packages need-to-dump dumped-exe)
(load (expand-file-name "../lisp/dumped-lisp.el"))
+ (setq dumped-exe
+ (cond ((file-exists-p "../src/xemacs.exe") "../src/xemacs.exe")
+ ((file-exists-p "../src/xemacs") "../src/xemacs")
+ (t nil)))
+
;; Path setup
(let ((package-preloaded-file-list
(packages-collect-package-dumped-lisps late-package-load-path)))
(setq preloaded-file-list
(append package-preloaded-file-list
preloaded-file-list
+ '("bytecomp")
packages-hardcoded-lisp)))
(load (concat default-directory "../site-packages") t t)
(while preloaded-file-list
(let ((arg (car preloaded-file-list)))
;; (print (prin1-to-string arg))
+
+ ;; now check if .el or .elc is newer than the dumped exe.
+ ;; if so, need to redump.
+ (let ((frob
+ (if (string-match "\\.elc?\\'" arg)
+ (substring arg 0 (match-beginning 0))
+ arg)))
+ (if (and dumped-exe
+ (or (and (file-exists-p (concat frob ".el"))
+ (file-newer-than-file-p (concat frob ".el")
+ dumped-exe))
+ (and (file-exists-p (concat frob ".elc"))
+ (file-newer-than-file-p (concat frob ".elc")
+ dumped-exe))))
+ (setq need-to-dump t)))
+
(if (null (member (file-name-nondirectory arg)
packages-unbytecompiled-lisp))
(progn
(file-newer-than-file-p (concat arg ".el")
(concat arg ".elc")))
(setq processed (cons (concat arg ".el") processed)))))
- (setq preloaded-file-list (cdr preloaded-file-list)))))
+ (setq preloaded-file-list (cdr preloaded-file-list))))
+
+ (if need-to-dump
+ (condition-case nil
+ (write-region-internal "foo" nil "../src/NEEDTODUMP")
+ (file-error nil)))
+
+ )
(setq update-elc-files-to-compile (append update-elc-files-to-compile
processed))
update-elc-files-to-compile))
(load "loadup-el.el"))
(condition-case nil
- (delete-file "./NOBYTECOMPILE")
+ (delete-file "../src/NOBYTECOMPILE")
(file-error nil)))
(kill-emacs)
minibuf all-frames device)
wins))
-
;;; window.el ends here
-;;; winnt.el --- Lisp routines for Windows NT.
+;;; winnt.el --- Lisp routines for MS Windows.
;; Copyright (C) 1994 Free Software Foundation, Inc.
(init-x-toolbar))
(if (and (featurep 'infodock) (featurep 'toolbar))
(require 'id-x-toolbar))
- (if (featurep 'mule)
- (init-mule-x-win))
+ (if (featurep 'gutter) (init-gutter))
+ (if (featurep 'mule) (init-mule-x-win))
;; these are only ever called if zmacs-regions is true.
(add-hook 'zmacs-deactivate-region-hook
(lambda ()
+2000-05-01 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.33 is released.
+
+2000-04-19 Martin Buchholz <martin@xemacs.org>
+
+ * lwlib.c (lw_destroy_everything): Always use full ANSI prototypes.
+ * lwlib.c (lw_destroy_all_pop_ups): Always use full ANSI prototypes.
+
+2000-04-12 Andy Piper <andy@xemacs.org>
+
+ * lwlib-Xaw.c (xaw_update_one_widget): no-op for text widgets.
+ (xaw_update_one_value): Get strings safely.
+ (xaw_create_text_field): add some extra properties.
+
+2000-04-05 Andy Piper <andy@xemacs.org>
+
+ * lwlib-Xaw.c (lw_xaw_widget_p): include asciiTextWidgetClass as
+ an athena widget.
+
+2000-04-05 Andy Piper <andy@xemacs.org>
+
+ * xlwradio.c (RadioSetValues): resize if position information has
+ changed.
+
+ * lwlib-Xm.c (xm_create_text_field): text fields should be enabled
+ even if there is no callback.
+ * lwlib-Xaw.c (xaw_create_text_field): ditto.
+
+2000-04-03 Andy Piper <andy@xemacs.org>
+
+ * lwlib.c (merge_widget_value_args): only merge when the two args
+ are actually different.
+
+2000-03-21 Didier Verna <didier@xemacs.org>
+
+ * config.h.in: move INCLUDE_GLUE_1 and INCLUDE_GLUE_2 to
+ src/config.h.in.
+ * config.h.in (ATHENA_INCLUDE): use the `SMART_INCLUDE' macro.
+
+2000-03-20 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.32 is released.
+
+2000-03-14 Ben Wing <ben@xemacs.org>
+
+ * xlwmenu.c (massage_resource_name): Handle %_ and %%.
+
+2000-02-20 Gunnar Evermann <ge204@eng.cam.ac.uk>
+
+ * xlwscrollbar.c (get_gc): Always check for XmUNSPECIFIED_PIXMAP
+ even if we are only 'compatible' with the Motif resources.
+ (XmUNSPECIFIED_PIXMAP): Define unconditionally.
+
+2000-02-23 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.31 is released.
+
+2000-02-22 Andy Piper <andy@xemacs.org>
+
+ * lwlib-Xm.c (xm_update_one_widget): set widget args last in case
+ anything messes with them in the meantime.
+ * lwlib-Xlw.c (xlw_update_one_widget): ditto.
+ * lwlib-Xaw.c (xaw_update_one_widget): ditto.
+
+2000-02-21 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.30 is released.
+
+2000-02-21 Andy Piper <andy@xemacs.org>
+
+ * lwlib.c (merge_widget_value_args): don't delete the args before
+ copying, lw_copy_widget_value_args will do this for us if
+ necessary.
+ (lw_add_widget_value_arg): Allow existing args to be replaced.
+ (free_widget_value_args): Set args to 0 rather than 0xdeadbeef,
+ reference couting works better that way.
+ (lw_copy_widget_value_args): Do the right thing.
+
+ * lwlib-Xm.c (xm_create_progress): Make sensitive as this looks
+ much better.
+ * lwlib-Xaw.c (xaw_create_progress): ditto.
+
+2000-02-12 Jan Vroonhof <vroonhof@math.ethz.ch>
+
+ * xlwmenu.h (XmUNSPECIFIED_PIXMAP): Define this if we are using Motif
+ compatible resource names.
+
+ * xlwmenu.c (make_shadow_gcs): Always check for XmUNSPECIFIED_PIXMAP
+ even if we are only 'compatible' with the Motif resources.
+
+2000-02-15 Andy Piper <andy@xemacs.org>
+
+ * xlwgauge.c (GaugeExpose): remove shadows.
+
+2000-02-16 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.29 is released.
+
+2000-02-09 Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
+
+ * config.h.in (ATHENA_INCLUDE): Workaround bugs in both xlc and
+ old gccs.
+
2000-02-07 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.28 is released.
1999-12-12 Daniel Pittman <daniel@danann.net>
- * lwlib-Xaw.c:
+ * lwlib-Xaw.c:
* xlwcheckbox.c:
* xlwgauge.h:
* xlwgaugeP.h:
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,
+ (GaugeConvert): This is a XtConvertSelectionProc,
so 5th parameter must be of type XtPointer, not XPointer.
- (GaugeGetValue): This is a XtTimerCallbackProc,
+ (GaugeGetValue): This is a XtTimerCallbackProc,
so 2nd parameter must be of type XtIntervalId *, not XtIntervalId.
-
+
1999-09-01 Martin Buchholz <martin@xemacs.org>
* 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.
* XEmacs 21.2.18 is released
-1999-07-05 Didier Verna <verna@inf.enst.fr>
+1999-07-05 Didier Verna <didier@xemacs.org>
* lwlib-Xm.c (xm_update_one_widget): add missing #ifdefs around
call to xm_update_label.
/* The path to the Athena widgets - the usual value is `X11/Xaw' */
#undef ATHENA_H_PATH
-
-/* For use in #include statements.
- You can't use macros directly within the <> of a #include statement.
- The multiply nested macros are necessary to make old gcc's happy. */
-#define INCLUDE_GLUE_2(dirname,basename) <##dirname##/##basename##>
-#define INCLUDE_GLUE_1(dirname,basename) INCLUDE_GLUE_2(dirname,basename)
-#define ATHENA_INCLUDE(header_file) INCLUDE_GLUE_1(ATHENA_H_PATH,header_file)
-
+#ifdef ATHENA_H_PATH
+# define ATHENA_INCLUDE(file) SMART_INCLUDE (ATHENA_H_PATH,file)
+#else
+# define ATHENA_INCLUDE(file) <file>
+#endif
#endif /* _LWLIB_CONFIG_H_ */
|| XtIsSubclass (widget, labelWidgetClass)
|| XtIsSubclass (widget, toggleWidgetClass)
|| XtIsSubclass (widget, gaugeWidgetClass)
-#if 0
- || XtIsSubclass (widget, textWidgetClass)
+#ifndef NEED_MOTIF
+ || XtIsSubclass (widget, asciiTextWidgetClass)
#endif
#endif
);
xaw_update_one_widget (widget_instance *instance, Widget widget,
widget_value *val, Boolean deep_p)
{
- if (val->args && val->args->nargs)
- XtSetValues (widget, val->args->args, val->args->nargs);
-
if (0)
;
#ifdef LWLIB_SCROLLBARS_ATHENA
xaw_update_scrollbar (instance, widget, val);
}
#endif
+#ifdef LWLIB_WIDGETS_ATHENA
+#ifndef NEED_MOTIF
+ else if (XtIsSubclass (widget, asciiTextWidgetClass))
+ {
+ }
+#endif
+#endif
#ifdef LWLIB_DIALOGS_ATHENA
else if (XtIsSubclass (widget, dialogWidgetClass))
{
#endif /* LWLIB_WIDGETS_ATHENA */
}
#endif /* LWLIB_DIALOGS_ATHENA */
+ /* Lastly update our global arg values. */
+ if (val->args && val->args->nargs)
+ XtSetValues (widget, val->args->args, val->args->nargs);
}
void
#ifndef NEED_MOTIF
else if (XtIsSubclass (widget, asciiTextWidgetClass))
{
- Arg al [1];
+ Arg al [2];
+ String buf = 0;
+ XtSetArg (al [0], XtNstring, &buf);
+ XtGetValues (widget, al, 2);
+
if (val->value)
- free (val->value);
- XtSetArg (al [0], XtNstring, &val->value);
- XtGetValues (widget, al, 1);
+ {
+ free (val->value);
+ val->value = 0;
+ }
+ /* I don't think this causes a leak. */
+ if (buf)
+ val->value = strdup (buf);
val->edited = True;
}
#endif
static Boolean actions_initted = False;
static Widget
-make_dialog (CONST char* name, Widget parent, Boolean pop_up_p,
- CONST char* shell_title, CONST char* icon_name,
+make_dialog (const char* name, Widget parent, Boolean pop_up_p,
+ const char* shell_title, const char* icon_name,
Boolean text_input_slot,
Boolean radio_box, Boolean list,
int left_buttons, int right_buttons)
Widget parent = instance->parent;
Widget widget;
Boolean pop_up_p = instance->pop_up_p;
- CONST char *shell_name = 0;
- CONST char *icon_name = 0;
+ const char *shell_name = 0;
+ const char *icon_name = 0;
Boolean text_input_slot = False;
Boolean radio_box = False;
Boolean list = False;
int ac = 0;
Widget scale = 0;
widget_value* val = instance->info->val;
-
+#if 0 /* This looks too awful, although more correct. */
if (!val->call_data)
{
XtSetArg (al [ac], XtNsensitive, False); ac++;
{
XtSetArg (al [ac], XtNsensitive, val->enabled); ac++;
}
+#else
+ XtSetArg (al [ac], XtNsensitive, True); ac++;
+#endif
+
XtSetArg (al [ac], XtNmappedWhenManaged, FALSE); ac++;
XtSetArg (al [ac], XtNorientation, XtorientHorizontal); ac++;
XtSetArg (al [ac], XtNhighlightThickness, (Dimension)0);ac++;
}
#ifndef NEED_MOTIF
+#define TEXT_BUFFER_SIZE 128
static Widget
xaw_create_text_field (widget_instance *instance)
{
Widget text = 0;
widget_value* val = instance->info->val;
- XtSetArg (al [ac], XtNsensitive, val->enabled && val->call_data); ac++;
+ XtSetArg (al [ac], XtNsensitive, val->enabled); 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++;
+ XtSetArg (al [ac], XtNuseStringInPlace, False); ac++;
+#if 0
+ XtSetArg (al [ac], XtNlength, TEXT_BUFFER_SIZE); ac++;
+#endif
+ if (val->value)
+ {
+ XtSetArg (al [ac], XtNstring, val->value); 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);
+
+ /* add the callback */
+ if (val->call_data)
+ XtAddCallback (text, XtNgetValue, xaw_generic_callback, (XtPointer)instance);
+
XtManageChild (text);
return text;
}
#endif
+
#endif /* LWLIB_WIDGETS_ATHENA */
widget_creation_entry
widget_value* val, Boolean deep_p)
{
WidgetClass class = XtClass (widget);
- /* Update up global arg values. */
- if (val->args && val->args->nargs)
- XtSetValues (widget, val->args->args, val->args->nargs);
if (0)
;
xlw_update_tab_control (instance, widget, val);
}
#endif
+ /* Lastly update our global arg values. */
+ if (val->args && val->args->nargs)
+ XtSetValues (widget, val->args->args, val->args->nargs);
}
void
/* Common to all widget types */
XtSetArg (al [ac], XmNsensitive, val->enabled); ac++;
XtSetArg (al [ac], XmNuserData, val->call_data); ac++;
- lw_add_value_args_to_args (val, al, &ac);
-
XtSetValues (widget, al, ac);
#if defined (LWLIB_DIALOGS_MOTIF) || defined (LWLIB_MENUBARS_MOTIF) || defined (LWLIB_WIDGETS_MOTIF)
xm_update_scrollbar (instance, widget, val);
}
#endif
+ /* Lastly update our global arg values. */
+ if (val->args && val->args->nargs)
+ XtSetValues (widget, val->args->args, val->args->nargs);
}
\f/* getting the value back */
static Widget
make_dialog (char* name, Widget parent, Boolean pop_up_p,
- CONST char* shell_title, CONST char* icon_name,
+ const char* shell_title, const char* icon_name,
Boolean text_input_slot, Boolean radio_box, Boolean list,
int left_buttons, int right_buttons)
{
Widget parent = instance->parent;
Widget widget;
Boolean pop_up_p = instance->pop_up_p;
- CONST char* shell_name = 0;
- CONST char* icon_name = 0;
+ const char* shell_name = 0;
+ const char* icon_name = 0;
Boolean text_input_slot = False;
Boolean radio_box = False;
Boolean list = False;
int ac = 0;
Widget scale = 0;
widget_value* val = instance->info->val;
-
+#if 0 /* This looks too awful, although more correct. */
if (!val->call_data)
{
XtSetArg (al [ac], XmNsensitive, False); ac++;
{
XtSetArg (al [ac], XmNsensitive, val->enabled); ac++;
}
+#else
+ XtSetArg (al [ac], XmNsensitive, True); ac++;
+#endif
XtSetArg (al [ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++;
XtSetArg (al [ac], XmNuserData, val->call_data); ac++;
XtSetArg (al [ac], XmNmappedWhenManaged, FALSE); ac++;
Widget text = 0;
widget_value* val = instance->info->val;
- XtSetArg (al [ac], XmNsensitive, val->enabled && val->call_data); ac++;
+ 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++;
typedef struct _widget_creation_entry
{
- CONST char* type;
+ const char* type;
widget_creation_function function;
} widget_creation_entry;
\f
/* utility functions for widget_instance and widget_info */
static char *
-safe_strdup (CONST char *s)
+safe_strdup (const char *s)
{
char *result;
if (! s) return 0;
lw_copy_widget_value_args (old, new);
changed = True;
}
- else if (new->args && old->args)
+ else if (new->args && old->args && new->args != old->args)
{
/* #### Do something more sensible here than just copying the
new values (like actually merging the values). */
- free_widget_value_args (old);
lw_copy_widget_value_args (new, old);
changed = True;
}
}
static widget_info *
-allocate_widget_info (CONST char *type, CONST char *name,
+allocate_widget_info (const char *type, const char *name,
LWLIB_ID id, widget_value *val,
lw_callback pre_activate_cb, lw_callback selection_cb,
lw_callback post_activate_cb)
\f
/* utility function for widget_value */
static Boolean
-safe_strcmp (CONST char *s1, CONST char *s2)
+safe_strcmp (const char *s1, const char *s2)
{
if (!!s1 ^ !!s2) return True;
return (s1 && s2) ? strcmp (s1, s2) : s1 ? False : !!s2;
\f
/* modifying the widgets */
static Widget
-name_to_widget (widget_instance *instance, CONST char *name)
+name_to_widget (widget_instance *instance, const char *name)
{
Widget widget = NULL;
static widget_creation_function
-find_in_table (CONST char *type, widget_creation_entry *table)
+find_in_table (const char *type, widget_creation_entry *table)
{
widget_creation_entry *cur;
for (cur = table; cur->type; cur++)
}
static Boolean
-dialog_spec_p (CONST char *name)
+dialog_spec_p (const char *name)
{
/* return True if name matches [EILPQeilpq][1-9][Bb] or
[EILPQeilpq][1-9][Bb][Rr][1-9] */
}
void
-lw_register_widget (CONST char *type, CONST char *name,
+lw_register_widget (const char *type, const char *name,
LWLIB_ID id, widget_value *val,
lw_callback pre_activate_cb, lw_callback selection_cb,
lw_callback post_activate_cb)
}
Widget
-lw_create_widget (CONST char *type, CONST char *name,
+lw_create_widget (const char *type, const char *name,
LWLIB_ID id, widget_value *val,
Widget parent, Boolean pop_up_p, lw_callback pre_activate_cb,
lw_callback selection_cb, lw_callback post_activate_cb)
}
void
-lw_destroy_everything ()
+lw_destroy_everything (void)
{
while (all_widget_info)
lw_destroy_all_widgets (all_widget_info->id);
}
void
-lw_destroy_all_pop_ups ()
+lw_destroy_all_pop_ups (void)
{
widget_info *info;
widget_info *next;
void lw_add_widget_value_arg (widget_value* wv, String name, XtArgVal value)
{
+ int i = 0;
if (!wv->args)
{
wv->args = (widget_args *) malloc (sizeof (widget_args));
if (wv->args->nargs > 10)
return;
- XtSetArg (wv->args->args [wv->args->nargs], name, value); wv->args->nargs++;
+ /* If the arg is already there then we must replace it. */
+ for (i = 0; i < wv->args->nargs; i++)
+ {
+ if (!strcmp (wv->args->args[i].name, name))
+ {
+ XtSetArg (wv->args->args [i], name, value);
+ break;
+ }
+ }
+ if (i >= wv->args->nargs)
+ {
+ XtSetArg (wv->args->args [wv->args->nargs], name, value); wv->args->nargs++;
+ }
}
static void free_widget_value_args (widget_value* wv)
#endif
free (wv->args->args);
free (wv->args);
- wv->args = (widget_args*)0xDEADBEEF;
+ wv->args = 0;
}
}
}
void lw_copy_widget_value_args (widget_value* val, widget_value* copy)
{
- if (!val->args)
+ if (val == copy || val->args == copy->args)
+ return;
+
+ if (copy->args)
{
- if (copy->args)
- free_widget_value_args (copy);
- copy->args = 0;
+ free_widget_value_args (copy);
}
- else
+
+ if (val->args)
{
copy->args = val->args;
copy->args->ref_count++;
#ifndef INCLUDED_lwlib_h_
#define INCLUDED_lwlib_h_
-#undef CONST
-
#include <X11/Intrinsic.h>
-/* To eliminate use of `const' in the lwlib sources, define CONST_IS_LOSING. */
-#ifdef CONST_IS_LOSING
-# define CONST
-#else
-# define CONST const
-#endif
-
#if defined (LWLIB_MENUBARS_LUCID) || defined (LWLIB_MENUBARS_MOTIF) || defined (LWLIB_MENUBARS_ATHENA)
#define NEED_MENUBARS
#endif
#include "xlwtabs.h"
#endif
-void lw_register_widget (CONST char* type, CONST char* name, LWLIB_ID id,
+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,
lw_callback post_activate_cb);
Widget lw_get_widget (LWLIB_ID id, Widget parent, Boolean pop_up_p);
Widget lw_make_widget (LWLIB_ID id, Widget parent, Boolean pop_up_p);
-Widget lw_create_widget (CONST char* type, CONST char* name, LWLIB_ID id,
+Widget lw_create_widget (const char* type, const char* name, LWLIB_ID id,
widget_value* val, Widget parent, Boolean pop_up_p,
lw_callback pre_activate_cb,
lw_callback selection_cb,
if( gw->gauge.nlabels > 1 )
{
char label[20], *s = label ;
- int len, w,h =0 ;
+ int xlen, wd,h =0 ;
if( gw->gauge.orientation == XtorientHorizontal )
y = gw->gauge.lmargin + gw->label.font->max_bounds.ascent - 1 ;
s = gw->gauge.labels[i] ;
if( s != NULL ) {
x = e0 + i*(e1-e0-1)/(gw->gauge.nlabels-1) ;
- len = strlen(s) ;
+ xlen = strlen(s) ;
if( gw->gauge.orientation == XtorientHorizontal ) {
- w = XTextWidth(gw->label.font, s, len) ;
- XDrawString(dpy,win,gc, x-w/2,y, s,len) ;
+ wd = XTextWidth(gw->label.font, s, xlen) ;
+ XDrawString(dpy,win,gc, x-wd/2,y, s,xlen) ;
}
else {
- XDrawString(dpy,win,gc, y,x+h, s,len) ;
+ XDrawString(dpy,win,gc, y,x+h, s,xlen) ;
}
}
}
}
static void
-massage_resource_name (CONST char *in, char *out)
+massage_resource_name (const char *in, char *out)
{
/* Turn a random string into something suitable for using as a resource.
For example:
Boolean firstp = True;
while (*in)
{
- char ch = massaged_resource_char[(unsigned char) *in++];
- if (ch)
+ if (*in == '%' && *(in + 1) == '_')
+ in += 2;
+ else
{
- int int_ch = (int) (unsigned char) ch;
- *out++ = firstp ? tolower (int_ch) : toupper (int_ch);
- firstp = False;
- while ((ch = massaged_resource_char[(unsigned char) *in++]) != '\0')
- *out++ = ch;
- if (!*(in-1)) /* Overshot the NULL byte? */
- break;
+ char ch;
+
+ if (*in == '%' && *(in + 1) == '%')
+ in++;
+ ch = massaged_resource_char[(unsigned char) *in++];
+ if (ch)
+ {
+ int int_ch = (int) (unsigned char) ch;
+ *out++ = firstp ? tolower (int_ch) : toupper (int_ch);
+ firstp = False;
+ while ((ch = massaged_resource_char[(unsigned char) *in++])
+ != '\0')
+ *out++ = ch;
+ if (!*(in-1)) /* Overshot the NULL byte? */
+ break;
+ }
}
}
*out = 0;
* not inserted if value is a zero length string.
*/
static char*
-parameterize_string (CONST char *string, CONST char *value)
+parameterize_string (const char *string, const char *value)
{
char *percent;
char *result;
static struct _shadow_names
{
- CONST char * name;
+ const char * name;
shadow_type type;
} shadow_names[] =
{
xgcv.foreground = mw->menu.top_shadow_color;
xgcv.background = mw->core.background_pixel;
/* xgcv.stipple = mw->menu.top_shadow_pixmap; gtb */
-#ifdef NEED_MOTIF
if (mw->menu.top_shadow_pixmap &&
mw->menu.top_shadow_pixmap != XmUNSPECIFIED_PIXMAP)
xgcv.stipple = mw->menu.top_shadow_pixmap;
else
xgcv.stipple = 0;
-#else
- xgcv.stipple = mw->menu.top_shadow_pixmap;
-#endif /* NEED_MOTIF */
pm = (xgcv.stipple ? GCStipple|GCFillStyle : 0);
mw->menu.shadow_top_gc =
XtGetGC((Widget)mw, GCForeground|GCBackground|pm, &xgcv);
xgcv.foreground = mw->menu.bottom_shadow_color;
/* xgcv.stipple = mw->menu.bottom_shadow_pixmap; gtb */
-#ifdef NEED_MOTIF
if (mw->menu.bottom_shadow_pixmap &&
mw->menu.bottom_shadow_pixmap != XmUNSPECIFIED_PIXMAP)
xgcv.stipple = mw->menu.bottom_shadow_pixmap;
else
xgcv.stipple = 0;
-#else
- xgcv.stipple = mw->menu.bottom_shadow_pixmap;
-#endif /* NEED_MOTIF */
pm = (xgcv.stipple ? GCStipple|GCFillStyle : 0);
mw->menu.shadow_bottom_gc =
XtGetGC ((Widget)mw, GCForeground|GCBackground|pm, &xgcv);
# define XmCTopShadowPixmap "TopShadowPixmap"
# define XmNbottomShadowPixmap "bottomShadowPixmap"
# define XmCBottomShadowPixmap "BottomShadowPixmap"
+# define XmUNSPECIFIED_PIXMAP 2
# define XmRHorizontalDimension "HorizontalDimension"
# define XmNspacing "spacing"
# define XmCSpacing "Spacing"
switch( rw->label.justify ) {
case XtJustifyLeft:
- rw->label.label_x += bs(rw) + rw->label.internal_width ;
+ rw->label.label_x += (bs(rw) + rw->label.internal_width) ;
break ;
case XtJustifyRight:
break ;
case XtJustifyCenter:
default:
- rw->label.label_x += (bs(rw) + rw->label.internal_width)/2 ;
+ rw->label.label_x += (bs(rw) + rw->label.internal_width)/2;
break ;
}
}
{
RadioSize(newrw, &newrw->core.width, &newrw->core.height) ;
}
-
+
+ /* The label set values routine can resize the widget. We need to
+ * recalculate if this is true.
+ */
+ if (newrw->label.label_x != oldrw->label.label_x)
+ {
+ RadioResize (new);
+ }
return FALSE ;
}
}
/*-------------------------- GC and Pixel allocation --------------------*/
-#ifdef NEED_MOTIF
#ifndef XmUNSPECIFIED_PIXMAP
#define XmUNSPECIFIED_PIXMAP 2
#endif
-#endif /* NEED_MOTIF */
static GC
get_gc (XlwScrollBarWidget w, Pixel fg, Pixel bg, Pixmap pm)
values.stipple = pm;
/* mask = GCForeground | GCBackground |
(pm == None ? 0 : GCStipple | GCFillStyle); gtb */
-#ifdef NEED_MOTIF
if (pm != None && pm != 0 && pm != XmUNSPECIFIED_PIXMAP)
values.stipple = pm;
else
values.stipple = None;
-#else
- values.stipple = pm;
-#endif /* NEED_MOTIF */
mask = GCForeground | GCBackground |
(values.stipple == None ? 0 : GCStipple | GCFillStyle);
+2000-05-01 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.33 is released.
+
+2000-04-11 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * xemacs-faq.texi (Q2.1.24): Removed wrong header.
+
+2000-04-01 Oscar Figueiredo <oscar@xemacs.org>
+
+ * lispref/ldap.texi: Documentation of the add/modify/delete and
+ internationalization APIs
+
+ * lispref/lispref.texi: Updated LDAP-related menus
+
+2000-03-20 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.32 is released.
+
+2000-03-15 SL Baur <steve@musashimaru.m17n.org>
+
+ * lispref/postgresql.texi (Unimplemented libpq Functions): Update
+ documentation to reflect the latest code.
+
+2000-03-07 SL Baur <steve@musashimaru.m17n.org>
+
+ * lispref/postgresql.texi (PostgreSQL Support): New File.
+
+ * lispref/ldap.texi: Insert PostgreSQL/libpq chapter.
+ * lispref/lispref.texi (Top): Ditto.
+ * lispref/internationalization.texi: Ditto.
+
+2000-03-07 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * lispref/glyphs.texi (Image Specifiers): Remove parenthesis.
+
+2000-03-06 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * xemacs-faq.texi: Put node before section.
+
+2000-03-05 Jonathan Harris <jhar@tardis.ed.ac.uk>
+
+ * xemacs-faq.texi (Macintosh port): Made texinfmt-friendly.
+
+2000-03-01 Sandra Wambold <wambold@xemacs.org>
+
+ * xemacs-faq.texi: Added 6.4.1. XEmacs won't start on Windows
+
+2000-01-25 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * xemacs/xemacs.texi: Detailed menu update.
+
+2000-01-28 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * xemacs/help.texi: Synch with FSF 20.5. Update.
+
+2000-02-21 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * lispref/minibuf.texi: Add default argument documentation.
+
+2000-02-27 Martin Buchholz <martin@xemacs.org>
+
+ * internals/internals.texi (lrecords): Update docs for new lisp
+ object representation.
+
+2000-02-25 Martin Buchholz <martin@xemacs.org>
+
+ * internals/internals.texi (Techniques for XEmacs Developers):
+ Document INLINE_HEADER and how to create macros and inline functions.
+ Cleanup entire section.
+
+2000-02-17 Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>
+
+ * man/lispref/gutter.texi: New file describing gutter API.
+
+ * man/lispref/lispref.texi, man/lispref/scrollbars.texi,
+
+ * man/lispref/toolbar.texi: Fixup links to new node Gutter.
+
+2000-02-17 Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>
+
+ * man/lispref/frames.texi, man/xemacs/custom.texi,
+ man/xemacs/frame.texi, man/xemacs/glossary.texi: Mention menubars,
+ toolbars, and gutters as optional components of frames, with
+ pointers to descriptions.
+
+2000-02-17 Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>
+
+ * man/lispref/mule.texi: Substantial reorganization and
+ revision for style of descriptions of character sets,
+ encodings, and coding systems. Addition of a complete table
+ of coding systems as of XEmacs 21.2.19.
+
+2000-02-23 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.31 is released.
+
+2000-02-21 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.30 is released.
+
+2000-02-21 Jonathan Harris <jhar@tardis.ed.ac.uk>
+
+ * internals/internals.texi: Made texinfmt-friendly.
+
+2000-01-20 Mark Thomas <mthomas@jprc.com>
+
+ * lispref/backups.texi (Numbered Backups):
+ * xemacs/files.texi (Backup Deletion):
+ Change trim-versions-without-asking to delete-old-versions.
+
+2000-02-19 Martin Buchholz <martin@xemacs.org>
+
+ * internals/internals.texi (Conversion to and from External Data):
+ Document TO_EXTERNAL_FORMAT and friends.
+ Doc bug fixes.
+
+2000-02-16 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.29 is released.
+
+2000-02-16 Martin Buchholz <martin@xemacs.org>
+
+ * internals/internals.texi: Integrate Olivier's portable dumping docs.
+
+2000-02-09 Martin Buchholz <martin@xemacs.org>
+
+ * lispref/symbols.texi (Object Plists):
+ Document `object-plist'.
+ Document `remprop'.
+ Rework all plist frobbing docs for accuracy.
+
2000-02-07 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.28 is released.
2000-01-25 Yoshiki Hayashi <yoshiki@xemacs.org>
* xemacs-faq.texi: Untabify.
-
+
2000-01-22 Martin Buchholz <martin@xemacs.org>
* internals/internals.texi (General Coding Rules): Document why we
2000-01-21 Yoshiki Hayashi <yoshiki@xemacs.org>
* xemacs-faq.texi: Change ' -- ' to '---'.
-
+
2000-01-19 Yoshiki Hayashi <yoshiki@xemacs.org>
* lispref/faces.texi (Face Properties): Document
1999-12-18 Martin Buchholz <martin@xemacs.org>
- * lispref/functions.texi (Mapping Functions):
+ * lispref/functions.texi (Mapping Functions):
Warn about mapping functions modifying their sequences.
1999-12-15 Sandra Wambold <wambold@xemacs.org>
1999-12-07 Gunnar Evermann <ge204@eng.cam.ac.uk>
* xemacs/startup.texi (Startup Paths): fix typo: EMACSPACKAGEPATH
- instead of PACKAGEPATH
+ instead of PACKAGEPATH
From Marcus Harnisch <harnisch@mikrom.de>
1999-12-07 Martin Buchholz <martin@xemacs.org>
1999-11-29 Martin Buchholz <martin@xemacs.org>
- * info.texi (Top):
+ * info.texi (Top):
Remove @ifnottex, which gives old makeinfos indigestion.
- * texinfo.texi (Top):
+ * 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-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.
* packages.texi: Reword a sentence, fixing @item Decide where to
install ...
-1999-07-19 Didier Verna <verna@inf.enst.fr>
+1999-07-19 Didier Verna <didier@xemacs.org>
* custom.texi (Wishlist): removed the Custom Comments wishlist
entry. They are implemented.
@example
(declaim (inline foo bar))
(eval-when (compile load eval) (proclaim '(inline foo bar)))
-(proclaim-inline foo bar) ; XEmacs only
-(defsubst foo (...) ...) ; instead of defun; Emacs 19 only
+(proclaim-inline foo bar) ; XEmacs only
+(defsubst foo (...) ...) ; instead of defun; Emacs 19 only
@end example
@strong{Please note:} This declaration remains in effect after the
missing from Emacs Lisp.
@menu
-* Property Lists:: `remprop', `getf', `remf'
+* Property Lists:: `getf', `remf'
* Creating Symbols:: `gensym', `gentemp'
@end menu
@noindent
These functions augment the standard Emacs Lisp functions @code{get}
-and @code{put} for operating on properties attached to symbols.
+and @code{put} for operating on properties attached to objects.
There are also functions for working with property lists as
-first-class data structures not attached to particular symbols.
-
-@defun remprop symbol property
-This function removes the entry for @var{property} from the property
-list of @var{symbol}. It returns a true value if the property was
-indeed found and removed, or @code{nil} if there was no such property.
-(This function was probably omitted from Emacs originally because,
-since @code{get} did not allow a @var{default}, it was very difficult
-to distinguish between a missing property and a property whose value
-was @code{nil}; thus, setting a property to @code{nil} was close
-enough to @code{remprop} for most purposes.)
-@end defun
+first-class data structures not attached to particular objects.
@defun getf place property &optional default
This function scans the list @var{place} as if it were a property
just as well to use a regular quote:
@example
-(loop for x in y by #'cddr collect (mapcar #'plusp x)) ; Common Lisp
-(loop for x in y by 'cddr collect (mapcar 'plusp x)) ; Emacs Lisp
+(loop for x in y by #'cddr collect (mapcar #'plusp x)) ; Common Lisp
+(loop for x in y by 'cddr collect (mapcar 'plusp x)) ; Emacs Lisp
@end example
When @code{#'} introduces a @code{lambda} form, it is best to
@example
@cartouche
-int emodules_load (CONST char *module,
- CONST char *modname,
- CONST char *modver)
+int emodules_load (const char *module,
+ const char *modname,
+ const char *modver)
@end cartouche
@end example
@author Martin Buchholz
@author Hrvoje Niksic
@author Matthias Neubauer
+@author Olivier Galibert
@page
@vskip 0pt plus 1fill
* Rules When Writing New C Code::
* A Summary of the Various XEmacs Modules::
* Allocation of Objects in XEmacs Lisp::
+* Dumping::
* Events and the Event Loop::
* Evaluation; Stack Frames; Bindings::
* Symbols and Variables::
* Menus::
* Subprocesses::
* Interface to X Windows::
-* Index:: Index including concepts, functions, variables,
- and other terms.
+* Index::
- --- The Detailed Node Listing ---
+@detailmenu
-Here are other nodes that are inferiors of those already listed,
-mentioned here so you can get to them in one step:
+--- The Detailed Node Listing ---
A History of Emacs
* Through Version 18:: Unification prevails.
* Lucid Emacs:: One version 19 Emacs.
* GNU Emacs 19:: The other version 19 Emacs.
+* GNU Emacs 20:: The other version 20 Emacs.
* XEmacs:: The continuation of Lucid Emacs.
Rules When Writing New C Code
* General Coding Rules::
* Writing Lisp Primitives::
* Adding Global Lisp Variables::
+* Coding for Mule::
* Techniques for XEmacs Developers::
+Coding for Mule
+
+* Character-Related Data Types::
+* Working With Character and Byte Positions::
+* Conversion to and from External Data::
+* General Guidelines for Writing Mule-Aware Code::
+* An Example of Mule-Aware Code::
+
A Summary of the Various XEmacs Modules
* Low-Level Modules::
* Allocation from Frob Blocks::
* lrecords::
* Low-level allocation::
-* Pure Space::
* Cons::
* Vector::
* Bit Vector::
* String::
* Compiled Function::
+Garbage Collection - Step by Step
+
+* Invocation::
+* garbage_collect_1::
+* mark_object::
+* gc_sweep::
+* sweep_lcrecords_1::
+* compact_string_chars::
+* sweep_strings::
+* sweep_bit_vectors_1::
+
+Dumping
+
+* Overview::
+* Data descriptions::
+* Dumping phase::
+* Reloading phase::
+
+Dumping phase
+
+* Object inventory::
+* Address allocation::
+* The header::
+* Data dumping::
+* Pointers dumping::
+
Events and the Event Loop
* Introduction to Events::
* Character Sets::
* Encodings::
* Internal Mule Encodings::
+* CCL::
Encodings
* Internal String Encoding::
* Internal Character Encoding::
-The Lisp Reader and Compiler
-
Lstreams
+* Creating an Lstream:: Creating an lstream object.
+* Lstream Types:: Different sorts of things that are streamed.
+* Lstream Functions:: Functions for working with lstreams.
+* Lstream Methods:: Creating new lstream types.
+
Consoles; Devices; Frames; Windows
* Introduction to Consoles; Devices; Frames; Windows::
* Point::
* Window Hierarchy::
+* The Window Object::
The Redisplay Mechanism
* Critical Redisplay Sections::
* Line Start Cache::
+* Redisplay Piece by Piece::
Extents
* Extent Ordering:: How extents are ordered internally.
* Format of the Extent Info:: The extent information in a buffer or string.
* Zero-Length Extents:: A weird special case.
-* Mathematics of Extent Ordering:: A rigorous foundation.
+* Mathematics of Extent Ordering:: A rigorous foundation.
* Extent Fragments:: Cached information useful for redisplay.
-Faces
-
-Glyphs
-
-Specifiers
-
-Menus
-
-Subprocesses
-
-Interface to X Windows
-
+@end detailmenu
@end menu
@node A History of Emacs, XEmacs From the Outside, Top, Top
* XEmacs:: The continuation of Lucid Emacs.
@end menu
-@node Through Version 18
+@node Through Version 18, Lucid Emacs, A History of Emacs, A History of Emacs
@section Through Version 18
@cindex Gosling, James
@cindex Great Usenet Renaming
version 18.59 released October 31, 1992.
@end itemize
-@node Lucid Emacs
+@node Lucid Emacs, GNU Emacs 19, Through Version 18, A History of Emacs
@section Lucid Emacs
@cindex Lucid Emacs
@cindex Lucid Inc.
version 20.4 released February 28, 1998.
@end itemize
-@node GNU Emacs 19
+@node GNU Emacs 19, GNU Emacs 20, Lucid Emacs, A History of Emacs
@section GNU Emacs 19
@cindex GNU Emacs 19
@cindex FSF Emacs
working on and using GNU Emacs for a long time (back as far as version
16 or 17).
-@node GNU Emacs 20
+@node GNU Emacs 20, XEmacs, GNU Emacs 19, A History of Emacs
@section GNU Emacs 20
@cindex GNU Emacs 20
@cindex FSF Emacs
version 20.3 released August 19, 1998.
@end itemize
-@node XEmacs
+@node XEmacs, , GNU Emacs 20, A History of Emacs
@section XEmacs
@cindex XEmacs
Unfortunately, there is no perfect language. Static typing allows a
compiler to catch programmer errors and produce more efficient code, but
-makes programming more tedious and less fun. For the forseeable future,
+makes programming more tedious and less fun. For the foreseeable future,
an Ideal Editing and Programming Environment (and that is what XEmacs
aspires to) will be programmable in multiple languages: high level ones
like Lisp for user customization and prototyping, and lower level ones
[ 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 ]
[ 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 ]
- <---> ^ <------------------------------------------------------>
- tag | a pointer to a structure, or an integer
- |
- mark bit
-@end example
-
-The tag describes the type of the Lisp object. For integers and chars,
-the lower 28 bits contain the value of the integer or char; for all
-others, the lower 28 bits contain a pointer. The mark bit is used
-during garbage-collection, and is always 0 when garbage collection is
-not happening. (The way that garbage collection works, basically, is that it
-loops over all places where Lisp objects could exist---this includes
-all global variables in C that contain Lisp objects [including
-@code{Vobarray}, the C equivalent of @code{obarray}; through this, all
-Lisp variables will get marked], plus various other places---and
-recursively scans through the Lisp objects, marking each object it finds
-by setting the mark bit. Then it goes through the lists of all objects
-allocated, freeing the ones that are not marked and turning off the mark
-bit of the ones that are marked.)
+ <---------------------------------------------------------> <->
+ a pointer to a structure, or an integer tag
+@end example
+
+A tag of 00 is used for all pointer object types, a tag of 10 is used
+for characters, and the other two tags 01 and 11 are joined together to
+form the integer object type. This representation gives us 31 bit
+integers and 30 bit characters, while pointers are represented directly
+without any bit masking or shifting. This representation, though,
+assumes that pointers to structs are always aligned to multiples of 4,
+so the lower 2 bits are always zero.
Lisp objects use the typedef @code{Lisp_Object}, but the actual C type
used for the Lisp object can vary. It can be either a simple type
machine word to represent the object (some compilers will use more
general and less efficient code for unions and structs even if they can
fit in a machine word). The union type, however, has the advantage of
-stricter type checking (if you accidentally pass an integer where a Lisp
-object is desired, you get a compile error), and it makes it easier to
-decode Lisp objects when debugging. The choice of which type to use is
-determined by the preprocessor constant @code{USE_UNION_TYPE} which is
-defined via the @code{--use-union-type} option to @code{configure}.
-
-@cindex record type
-
-Note that there are only eight types that the tag can represent, but
-many more actual types than this. This is handled by having one of the
-tag types specify a meta-type called a @dfn{record}; for all such
-objects, the first four bytes of the pointed-to structure indicate what
-the actual type is.
-
-Note also that having 28 bits for pointers and integers restricts a lot
-of things to 256 megabytes of memory. (Basically, enough pointers and
-indices and whatnot get stuffed into Lisp objects that the total amount
-of memory used by XEmacs can't grow above 256 megabytes. In older
-versions of XEmacs and GNU Emacs, the tag was 5 bits wide, allowing for
-32 types, which was more than the actual number of types that existed at
-the time, and no ``record'' type was necessary. However, this limited
-the editor to 64 megabytes total, which some users who edited large
-files might conceivably exceed.)
-
-Also, note that there is an implicit assumption here that all pointers
-are low enough that the top bits are all zero and can just be chopped
-off. On standard machines that allocate memory from the bottom up (and
-give each process its own address space), this works fine. Some
-machines, however, put the data space somewhere else in memory
-(e.g. beginning at 0x80000000). Those machines cope by defining
-@code{DATA_SEG_BITS} in the corresponding @file{m/} or @file{s/} file to
-the proper mask. Then, pointers retrieved from Lisp objects are
-automatically OR'ed with this value prior to being used.
-
-A corollary of the previous paragraph is that @strong{(pointers to)
-stack-allocated structures cannot be put into Lisp objects}. The stack
-is generally located near the top of memory; if you put such a pointer
-into a Lisp object, it will get its top bits chopped off, and you will
-lose.
-
-Actually, there's an alternative representation of a @code{Lisp_Object},
-invented by Kyle Jones, that is used when the
-@code{--use-minimal-tagbits} option to @code{configure} is used. In
-this case the 2 lower bits are used for the tag bits. This
-representation assumes that pointers to structs are always aligned to
-multiples of 4, so the lower 2 bits are always zero.
-
-@example
- [ 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 ]
- [ 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 ]
-
- <---------------------------------------------------------> <->
- a pointer to a structure, or an integer tag
-@end example
-
-A tag of 00 is used for all pointer object types, a tag of 10 is used
-for characters, and the other two tags 01 and 11 are joined together to
-form the integer object type. The markbit is moved to part of the
-structure being pointed at (integers and chars do not need to be marked,
-since no memory is allocated). This representation has these
-advantages:
-
-@enumerate
-@item
-31 bits can be used for Lisp Integers.
-@item
-@emph{Any} pointer can be represented directly, and no bit masking
-operations are necessary.
-@end enumerate
-
-The disadvantages are:
-
-@enumerate
-@item
-An extra level of indirection is needed when accessing the object types
-that were not record types. So checking whether a Lisp object is a cons
-cell becomes a slower operation.
-@item
-Mark bits can no longer be stored directly in Lisp objects, so another
-place for them must be found. This means that a cons cell requires more
-memory than merely room for 2 lisp objects, leading to extra memory use.
-@end enumerate
-
-Various macros are used to construct Lisp objects and extract the
-components. Macros of the form @code{XINT()}, @code{XCHAR()},
-@code{XSTRING()}, @code{XSYMBOL()}, etc. mask out the pointer/integer
-field and cast it to the appropriate type. All of the macros that
-construct pointers will @code{OR} with @code{DATA_SEG_BITS} if
-necessary. @code{XINT()} needs to be a bit tricky so that negative
-numbers are properly sign-extended: Usually it does this by shifting the
-number four bits to the left and then four bits to the right. This
-assumes that the right-shift operator does an arithmetic shift (i.e. it
-leaves the most-significant bit as-is rather than shifting in a zero, so
-that it mimics a divide-by-two even for negative numbers). Not all
-machines/compilers do this, and on the ones that don't, a more
-complicated definition is selected by defining
-@code{EXPLICIT_SIGN_EXTEND}.
-
-Note that when @code{ERROR_CHECK_TYPECHECK} is defined, the extractor
+stricter type checking. If you accidentally pass an integer where a Lisp
+object is desired, you get a compile error. The choice of which type
+to use is determined by the preprocessor constant @code{USE_UNION_TYPE}
+which is defined via the @code{--use-union-type} option to
+@code{configure}.
+
+Various macros are used to convert between Lisp_Objects and the
+corresponding C type. Macros of the form @code{XINT()}, @code{XCHAR()},
+@code{XSTRING()}, @code{XSYMBOL()}, do any required bit shifting and/or
+masking and cast it to the appropriate type. @code{XINT()} needs to be
+a bit tricky so that negative numbers are properly sign-extended. Since
+integers are stored left-shifted, if the right-shift operator does an
+arithmetic shift (i.e. it leaves the most-significant bit as-is rather
+than shifting in a zero, so that it mimics a divide-by-two even for
+negative numbers) the shift to remove the tag bit is enough. This is
+the case on all the systems we support.
+
+Note that when @code{ERROR_CHECK_TYPECHECK} is defined, the converter
macros become more complicated---they check the tag bits and/or the
type field in the first four bytes of a record type to ensure that the
object is really of the correct type. This is great for catching places
There are similar @code{XSET@var{TYPE}()} macros that construct a Lisp
object. These macros are of the form @code{XSET@var{TYPE}
-(@var{lvalue}, @var{result})},
-i.e. they have to be a statement rather than just used in an expression.
-The reason for this is that standard C doesn't let you ``construct'' a
-structure (but GCC does). Granted, this sometimes isn't too convenient;
-for the case of integers, at least, you can use the function
-@code{make_int()}, which constructs and @emph{returns} an integer
-Lisp object. Note that the @code{XSET@var{TYPE}()} macros are also
-affected by @code{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 the structure.
+(@var{lvalue}, @var{result})}, i.e. they have to be a statement rather
+than just used in an expression. The reason for this is that standard C
+doesn't let you ``construct'' a structure (but GCC does). Granted, this
+sometimes isn't too convenient; for the case of integers, at least, you
+can use the function @code{make_int()}, which constructs and
+@emph{returns} an integer Lisp object. Note that the
+@code{XSET@var{TYPE}()} macros are also affected by
+@code{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
+the structure.
The C programmer is responsible for @strong{guaranteeing} that a
-Lisp_Object is is the correct type before using the @code{X@var{TYPE}}
+Lisp_Object is the correct type before using the @code{X@var{TYPE}}
macros. This is especially important in the case of lists. Use
@code{XCAR} and @code{XCDR} if a Lisp_Object is certainly a cons cell,
else use @code{Fcar()} and @code{Fcdr()}. Trust other C code, but not
Lisp code. On the other hand, if XEmacs has an internal logic error,
-it's better to crash immediately, so sprinkle ``unreachable''
-@code{abort()}s liberally about the source code.
+it's better to crash immediately, so sprinkle @code{assert()}s and
+``unreachable'' @code{abort()}s liberally about the source code. Where
+performance is an issue, use @code{type_checking_assert},
+@code{bufpos_checking_assert}, and @code{gc_checking_assert}, which do
+nothing unless the corresponding configure error checking flag was
+specified.
@node Rules When Writing New C Code, A Summary of the Various XEmacs Modules, How Lisp Objects Are Represented in C, Top
@chapter Rules When Writing New C Code
* Techniques for XEmacs Developers::
@end menu
-@node General Coding Rules
+@node General Coding Rules, Writing Lisp Primitives, Rules When Writing New C Code, Rules When Writing New C Code
@section General Coding Rules
The C code is actually written in a dialect of C called @dfn{Clean C},
@file{s/} and @file{m/} files work out correctly.
When including header files, always use angle brackets, not double
-quotes, except when the file to be included is in the same directory as
-the including file. If either file is a generated file, then that is
-not likely to be the case. In order to understand why we have this
-rule, imagine what happens when you do a build in the source directory
-using @samp{./configure} and another build in another directory using
-@samp{../work/configure}. There will be two different @file{config.h}
-files. Which one will be used if you @samp{#include "config.h"}?
+quotes, except when the file to be included is always in the same
+directory as the including file. If either file is a generated file,
+then that is not likely to be the case. In order to understand why we
+have this rule, imagine what happens when you do a build in the source
+directory using @samp{./configure} and another build in another
+directory using @samp{../work/configure}. There will be two different
+@file{config.h} files. Which one will be used if you @samp{#include
+"config.h"}?
@strong{All global and static variables that are to be modifiable must
be declared uninitialized.} This means that you may not use the
segment is re-mapped so that it becomes part of the (unmodifiable) code
segment in the dumped executable. This allows this memory to be shared
among multiple running XEmacs processes. XEmacs is careful to place as
-much constant data as possible into initialized variables (in
-particular, into what's called the @dfn{pure space}---see below) during
-the @file{temacs} phase.
+much constant data as possible into initialized variables during the
+@file{temacs} phase.
@cindex copy-on-write
@strong{Please note:} This kludge only works on a few systems nowadays,
macro style is:
@example
-#define FOO(var, value) do @{ \
+#define FOO(var, value) do @{ \
Lisp_Object FOO_value = (value); \
... /* compute using FOO_value */ \
(var) = bar; \
@code{LIST_LOOP_DELETE_IF} delete elements from a lisp list satisfying some
predicate.
-@node Writing Lisp Primitives
+@node Writing Lisp Primitives, Adding Global Lisp Variables, General Coding Rules, Rules When Writing New C Code
@section Writing Lisp Primitives
Lisp primitives are Lisp functions implemented in C. The details of
@file{lisp.h} contains the definitions for important macros and
functions.
-@node Adding Global Lisp Variables
+@node Adding Global Lisp Variables, Coding for Mule, Writing Lisp Primitives, Rules When Writing New C Code
@section Adding Global Lisp Variables
Global variables whose names begin with @samp{Q} are constants whose
Lisp object, and you will be the one who's unhappy when you can't figure
out how your variable got overwritten.
-@node Coding for Mule
+@node Coding for Mule, Techniques for XEmacs Developers, Adding Global Lisp Variables, Rules When Writing New C Code
@section Coding for Mule
@cindex Coding for Mule
* An Example of Mule-Aware Code::
@end menu
-@node Character-Related Data Types
+@node Character-Related Data Types, Working With Character and Byte Positions, Coding for Mule, Coding for Mule
@subsection Character-Related Data Types
First, let's review the basic character-related datatypes used by
The data representing the text in a buffer or string is logically a set
of @code{Bufbyte}s.
-XEmacs does not work with character formats all the time; when reading
-characters from the outside, it decodes them to an internal format, and
-likewise encodes them when writing. @code{Bufbyte} (in fact
+XEmacs does not work with the same character formats all the time; when
+reading characters from the outside, it decodes them to an internal
+format, and likewise encodes them when writing. @code{Bufbyte} (in fact
@code{unsigned char}) is the basic unit of XEmacs internal buffers and
-strings format.
+strings format. A @code{Bufbyte *} is the type that points at text
+encoded in the variable-width internal encoding.
One character can correspond to one or more @code{Bufbyte}s. In the
-current implementation, an ASCII character is represented by the same
-@code{Bufbyte}, and extended characters are represented by a sequence of
-@code{Bufbyte}s.
+current Mule implementation, an ASCII character is represented by the
+same @code{Bufbyte}, and other characters are represented by a sequence
+of two or more @code{Bufbyte}s.
-Without Mule support, a @code{Bufbyte} is equivalent to an
-@code{Emchar}.
+Without Mule support, there are exactly 256 characters, implicitly
+Latin-1, and each character is represented using one @code{Bufbyte}, and
+there is a one-to-one correspondence between @code{Bufbyte}s and
+@code{Emchar}s.
@item Bufpos
@itemx Charcount
A @code{Charcount} represents a number (count) of characters.
Logically, subtracting two @code{Bufpos} values yields a
@code{Charcount} value. Although all of these are @code{typedef}ed to
-@code{int}, we use them in preference to @code{int} to make it clear
-what sort of position is being used.
+@code{EMACS_INT}, we use them in preference to @code{EMACS_INT} to make
+it clear what sort of position is being used.
@code{Bufpos} and @code{Charcount} values are the only ones that are
ever visible to Lisp.
@cindex Bytind
@cindex Bytecount
A @code{Bytind} represents a byte position in a buffer or string. A
-@code{Bytecount} represents the distance between two positions in bytes.
+@code{Bytecount} represents the distance between two positions, in bytes.
The relationship between @code{Bytind} and @code{Bytecount} is the same
as the relationship between @code{Bufpos} and @code{Charcount}.
and Extcounts are not all that frequent in XEmacs code.
@end table
-@node Working With Character and Byte Positions
+@node Working With Character and Byte Positions, Conversion to and from External Data, Character-Related Data Types, Coding for Mule
@subsection Working With Character and Byte Positions
Now that we have defined the basic character-related types, we can look
@table @code
@item MAX_EMCHAR_LEN
@cindex MAX_EMCHAR_LEN
-This preprocessor constant is the maximum number of buffer bytes per
-Emacs character, i.e. the byte length of an @code{Emchar}. It is useful
-when allocating temporary strings to keep a known number of characters.
-For instance:
+This preprocessor constant is the maximum number of buffer bytes to
+represent an Emacs character in the variable width internal encoding.
+It is useful when allocating temporary strings to keep a known number of
+characters. For instance:
@example
@group
@end example
@end table
-@node Conversion to and from External Data
+@node Conversion to and from External Data, General Guidelines for Writing Mule-Aware Code, Working With Character and Byte Positions, Coding for Mule
@subsection Conversion to and from External Data
When an external function, such as a C library function, returns a
The interface to conversion between the internal and external
representations of text are the numerous conversion macros defined in
-@file{buffer.h}. Before looking at them, we'll look at the external
-formats supported by these macros.
-
-Currently meaningful formats are @code{FORMAT_BINARY},
-@code{FORMAT_FILENAME}, @code{FORMAT_OS}, and @code{FORMAT_CTEXT}. Here
-is a description of these.
+@file{buffer.h}. There used to be a fixed set of external formats
+supported by these macros, but now any coding system can be used with
+these macros. The coding system alias mechanism is used to create the
+following logical coding systems, which replace the fixed external
+formats. The (dontusethis-set-symbol-value-handler) mechanism was
+enhanced to make this possible (more work on that is needed - like
+remove the @code{dontusethis-} prefix).
@table @code
-@item FORMAT_BINARY
-Binary format. This is the simplest format and is what we use in the
-absence of a more appropriate format. This converts according to the
-@code{binary} coding system:
+@item Qbinary
+This is the simplest format and is what we use in the absence of a more
+appropriate format. This converts according to the @code{binary} coding
+system:
@enumerate a
@item
-On input, bytes 0--255 are converted into characters 0--255.
+On input, bytes 0--255 are converted into (implicitly Latin-1)
+characters 0--255. A non-Mule xemacs doesn't really know about
+different character sets and the fonts to display them, so the bytes can
+be treated as text in different 1-byte encodings by simply setting the
+appropriate fonts. So in a sense, non-Mule xemacs is a multi-lingual
+editor if, for example, different fonts are used to display text in
+different buffers, faces, or windows. The specifier mechanism gives the
+user complete control over this kind of behavior.
@item
On output, characters 0--255 are converted into bytes 0--255 and other
-characters are converted into `X'.
+characters are converted into `~'.
@end enumerate
-@item FORMAT_FILENAME
-Format used for filenames. In the original Mule, this is user-definable
-with the @code{pathname-coding-system} variable. For the moment, we
-just use the @code{binary} coding system.
+@item Qfile_name
+Format used for filenames. This is user-definable via either the
+@code{file-name-coding-system} or @code{pathname-coding-system} (now
+obsolete) variables.
-@item FORMAT_OS
+@item Qnative
Format used for the external Unix environment---@code{argv[]}, stuff
from @code{getenv()}, stuff from the @file{/etc/passwd} file, etc.
+Currently this is the same as Qfile_name. The two should be
+distinguished for clarity and possible future separation.
-Perhaps should be the same as FORMAT_FILENAME.
-
-@item FORMAT_CTEXT
-Compound--text format. This is the standard X format used for data
+@item Qctext
+Compound--text format. This is the standard X11 format used for data
stored in properties, selections, and the like. This is an 8-bit
-no-lock-shift ISO2022 coding system.
+no-lock-shift ISO2022 coding system. This is a real coding system,
+unlike Qfile_name, which is user-definable.
@end table
-The macros to convert between these formats and the internal format, and
-vice versa, follow.
+There are two fundamental macros to convert between external and
+internal format.
+
+@code{TO_INTERNAL_FORMAT} converts external data to internal format, and
+@code{TO_EXTERNAL_FORMAT} converts the other way around. The arguments
+each of these receives are a source type, a source, a sink type, a sink,
+and a coding system (or a symbol naming a coding system).
+
+A typical call looks like
+@example
+TO_EXTERNAL_FORMAT (LISP_STRING, str, C_STRING_MALLOC, ptr, Qfile_name);
+@end example
+
+which means that the contents of the lisp string @code{str} are written
+to a malloc'ed memory area which will be pointed to by @code{ptr}, after
+the function returns. The conversion will be done using the
+@code{file-name} coding system, which will be controlled by the user
+indirectly by setting or binding the variable
+@code{file-name-coding-system}.
+
+Some sources and sinks require two C variables to specify. We use some
+preprocessor magic to allow different source and sink types, and even
+different numbers of arguments to specify different types of sources and
+sinks.
+
+So we can have a call that looks like
+@example
+TO_INTERNAL_FORMAT (DATA, (ptr, len),
+ MALLOC, (ptr, len),
+ coding_system);
+@end example
+
+The parenthesized argument pairs are required to make the preprocessor
+magic work.
+
+Here are the different source and sink types:
@table @code
-@item GET_CHARPTR_INT_DATA_ALLOCA
-@itemx GET_CHARPTR_EXT_DATA_ALLOCA
-These two are the most basic conversion macros.
-@code{GET_CHARPTR_INT_DATA_ALLOCA} converts external data to internal
-format, and @code{GET_CHARPTR_EXT_DATA_ALLOCA} converts the other way
-around. The arguments each of these receives are @var{ptr} (pointer to
-the text in external format), @var{len} (length of texts in bytes),
-@var{fmt} (format of the external text), @var{ptr_out} (lvalue to which
-new text should be copied), and @var{len_out} (lvalue which will be
-assigned the length of the internal text in bytes). The resulting text
-is stored to a stack-allocated buffer. If the text doesn't need
-changing, these macros will do nothing, except for setting
-@var{len_out}.
-
-The macros above take many arguments which makes them unwieldy. For
-this reason, a number of convenience macros are defined with obvious
-functionality, but accepting less arguments. The general rule is that
-macros with @samp{INT} in their name convert text to internal Emacs
-representation, whereas the @samp{EXT} macros convert to external
-representation.
-
-@item GET_C_CHARPTR_INT_DATA_ALLOCA
-@itemx GET_C_CHARPTR_EXT_DATA_ALLOCA
-As their names imply, these macros work on C char pointers, which are
-zero-terminated, and thus do not need @var{len} or @var{len_out}
-parameters.
-
-@item GET_STRING_EXT_DATA_ALLOCA
-@itemx GET_C_STRING_EXT_DATA_ALLOCA
-These two macros convert a Lisp string into an external representation.
-The difference between them is that @code{GET_STRING_EXT_DATA_ALLOCA}
-stores its output to a generic string, providing @var{len_out}, the
-length of the resulting external string. On the other hand,
-@code{GET_C_STRING_EXT_DATA_ALLOCA} assumes that the caller will be
-satisfied with output string being zero-terminated.
-
-Note that for Lisp strings only one conversion direction makes sense.
-
-@item GET_C_CHARPTR_EXT_BINARY_DATA_ALLOCA
-@itemx GET_CHARPTR_EXT_BINARY_DATA_ALLOCA
-@itemx GET_STRING_BINARY_DATA_ALLOCA
-@itemx GET_C_STRING_BINARY_DATA_ALLOCA
-@itemx GET_C_CHARPTR_EXT_FILENAME_DATA_ALLOCA
-@itemx ...
-These macros convert internal text to a specific external
-representation, with the external format being encoded into the name of
-the macro. Note that the @code{GET_STRING_...} and
-@code{GET_C_STRING...} macros lack the @samp{EXT} tag, because they
-only make sense in that direction.
-
-@item GET_C_CHARPTR_INT_BINARY_DATA_ALLOCA
-@itemx GET_CHARPTR_INT_BINARY_DATA_ALLOCA
-@itemx GET_C_CHARPTR_INT_FILENAME_DATA_ALLOCA
-@itemx ...
-These macros convert external text of a specific format to its internal
-representation, with the external format being incoded into the name of
-the macro.
+@item @code{DATA, (ptr, len),}
+input data is a fixed buffer of size @var{len} at address @var{ptr}
+@item @code{ALLOCA, (ptr, len),}
+output data is placed in an alloca()ed buffer of size @var{len} pointed to by @var{ptr}
+@item @code{MALLOC, (ptr, len),}
+output data is in a malloc()ed buffer of size @var{len} pointed to by @var{ptr}
+@item @code{C_STRING_ALLOCA, ptr,}
+equivalent to @code{ALLOCA (ptr, len_ignored)} on output.
+@item @code{C_STRING_MALLOC, ptr,}
+equivalent to @code{MALLOC (ptr, len_ignored)} on output
+@item @code{C_STRING, ptr,}
+equivalent to @code{DATA, (ptr, strlen (ptr) + 1)} on input
+@item @code{LISP_STRING, string,}
+input or output is a Lisp_Object of type string
+@item @code{LISP_BUFFER, buffer,}
+output is written to @code{(point)} in lisp buffer @var{buffer}
+@item @code{LISP_LSTREAM, lstream,}
+input or output is a Lisp_Object of type lstream
+@item @code{LISP_OPAQUE, object,}
+input or output is a Lisp_Object of type opaque
@end table
-@node General Guidelines for Writing Mule-Aware Code
+Often, the data is being converted to a '\0'-byte-terminated string,
+which is the format required by many external system C APIs. For these
+purposes, a source type of @code{C_STRING} or a sink type of
+@code{C_STRING_ALLOCA} or @code{C_STRING_MALLOC} is appropriate.
+Otherwise, we should try to keep XEmacs '\0'-byte-clean, which means
+using (ptr, len) pairs.
+
+The sinks to be specified must be lvalues, unless they are the lisp
+object types @code{LISP_LSTREAM} or @code{LISP_BUFFER}.
+
+For the sink types @code{ALLOCA} and @code{C_STRING_ALLOCA}, the
+resulting text is stored in a stack-allocated buffer, which is
+automatically freed on returning from the function. However, the sink
+types @code{MALLOC} and @code{C_STRING_MALLOC} return @code{xmalloc()}ed
+memory. The caller is responsible for freeing this memory using
+@code{xfree()}.
+
+Note that it doesn't make sense for @code{LISP_STRING} to be a source
+for @code{TO_INTERNAL_FORMAT} or a sink for @code{TO_EXTERNAL_FORMAT}.
+You'll get an assertion failure if you try.
+
+
+@node General Guidelines for Writing Mule-Aware Code, An Example of Mule-Aware Code, Conversion to and from External Data, Coding for Mule
@subsection General Guidelines for Writing Mule-Aware Code
This section contains some general guidance on how to write Mule-aware
buffers literally.
This means that when a system function, such as @code{readdir}, returns
-a string, you need to convert it using one of the conversion macros
+a string, you may need to convert it using one of the conversion macros
described in the previous chapter, before passing it further to Lisp.
-In the case of @code{readdir}, you would use the
-@code{GET_C_CHARPTR_INT_FILENAME_DATA_ALLOCA} macro.
+
+Actually, most of the basic system functions that accept '\0'-terminated
+string arguments, like @code{stat()} and @code{open()}, have been
+@strong{encapsulated} so that they are they @code{always} do internal to
+external conversion themselves. This means you must pass internally
+encoded data, typically the @code{XSTRING_DATA} of a Lisp_String to
+these functions. This is actually a design bug, since it unexpectedly
+changes the semantics of the system functions. A better design would be
+to provide separate versions of these system functions that accepted
+Lisp_Objects which were lisp strings in place of their current
+@code{char *} arguments.
+
+@example
+int stat_lisp (Lisp_Object path, struct stat *buf); /* Implement me */
+@end example
Also note that many internal functions, such as @code{make_string},
accept Bufbytes, which removes the need for them to convert the data
passed around in internal format.
@end table
-@node An Example of Mule-Aware Code
+@node An Example of Mule-Aware Code, , General Guidelines for Writing Mule-Aware Code, Coding for Mule
@subsection An Example of Mule-Aware Code
-As an example of Mule-aware code, we shall will analyze the
-@code{string} function, which conses up a Lisp string from the character
-arguments it receives. Here is the definition, pasted from
-@code{alloc.c}:
+As an example of Mule-aware code, we will analyze the @code{string}
+function, which conses up a Lisp string from the character arguments it
+receives. Here is the definition, pasted from @code{alloc.c}:
@example
@group
understood this section of the manual and studied the examples, you can
proceed writing new Mule-aware code.
-@node Techniques for XEmacs Developers
+@node Techniques for XEmacs Developers, , Coding for Mule, Rules When Writing New C Code
@section Techniques for XEmacs Developers
+To make a purified XEmacs, do: @code{make puremacs}.
To make a quantified XEmacs, do: @code{make quantmacs}.
-You simply can't dump Quantified and Purified images. Run the image
-like so: @code{quantmacs -batch -l loadup.el run-temacs @var{xemacs-args...}}.
+You simply can't dump Quantified and Purified images (unless using the
+portable dumper). Purify gets confused when xemacs frees memory in one
+process that was allocated in a @emph{different} process on a different
+machine!. Run it like so:
+@example
+temacs -batch -l loadup.el run-temacs @var{xemacs-args...}
+@end example
Before you go through the trouble, are you compiling with all
-debugging and error-checking off? If not try that first. Be warned
+debugging and error-checking off? If not, try that first. Be warned
that while Quantify is directly responsible for quite a few
optimizations which have been made to XEmacs, doing a run which
generates results which can be acted upon is not necessarily a trivial
calls in elisp are especially expensive. Iterating over a long list is
going to be 30 times faster implemented in C than in Elisp.
+Heavily used small code fragments need to be fast. The traditional way
+to implement such code fragments in C is with macros. But macros in C
+are known to be broken.
+
+Macro arguments that are repeatedly evaluated may suffer from repeated
+side effects or suboptimal performance.
+
+Variable names used in macros may collide with caller's variables,
+causing (at least) unwanted compiler warnings.
+
+In order to solve these problems, and maintain statement semantics, one
+should use the @code{do @{ ... @} while (0)} trick while trying to
+reference macro arguments exactly once using local variables.
+
+Let's take a look at this poor macro definition:
+
+@example
+#define MARK_OBJECT(obj) \
+ if (!marked_p (obj)) mark_object (obj), did_mark = 1
+@end example
+
+This macro evaluates its argument twice, and also fails if used like this:
+@example
+ if (flag) MARK_OBJECT (obj); else do_something();
+@end example
+
+A much better definition is
+
+@example
+#define MARK_OBJECT(obj) do @{ \
+ Lisp_Object mo_obj = (obj); \
+ if (!marked_p (mo_obj)) \
+ @{ \
+ mark_object (mo_obj); \
+ did_mark = 1; \
+ @} \
+@} while (0)
+@end example
+
+Notice the elimination of double evaluation by using the local variable
+with the obscure name. Writing safe and efficient macros requires great
+care. The one problem with macros that cannot be portably worked around
+is, since a C block has no value, a macro used as an expression rather
+than a statement cannot use the techniques just described to avoid
+multiple evaluation.
+
+In most cases where a macro has function semantics, an inline function
+is a better implementation technique. Modern compiler optimizers tend
+to inline functions even if they have no @code{inline} keyword, and
+configure magic ensures that the @code{inline} keyword can be safely
+used as an additional compiler hint. Inline functions used in a single
+.c files are easy. The function must already be defined to be
+@code{static}. Just add another @code{inline} keyword to the
+definition.
+
+@example
+inline static int
+heavily_used_small_function (int arg)
+@{
+ ...
+@}
+@end example
+
+Inline functions in header files are trickier, because we would like to
+make the following optimization if the function is @emph{not} inlined
+(for example, because we're compiling for debugging). We would like the
+function to be defined externally exactly once, and each calling
+translation unit would create an external reference to the function,
+instead of including a definition of the inline function in the object
+code of every translation unit that uses it. This optimization is
+currently only available for gcc. But you don't have to worry about the
+trickiness; just define your inline functions in header files using this
+pattern:
+
+@example
+INLINE_HEADER int
+i_used_to_be_a_crufty_macro_but_look_at_me_now (int arg);
+INLINE_HEADER int
+i_used_to_be_a_crufty_macro_but_look_at_me_now (int arg)
+@{
+ ...
+@}
+@end example
+
+The declaration right before the definition is to prevent warnings when
+compiling with @code{gcc -Wmissing-declarations}. I consider issuing
+this warning for inline functions a gcc bug, but the gcc maintainers disagree.
+
+Every header which contains inline functions, either directly by using
+@code{INLINE_HEADER} or indirectly by using @code{DECLARE_LRECORD} must
+be added to @file{inline.c}'s includes to make the optimization
+described above work. (Optimization note: if all INLINE_HEADER
+functions are in fact inlined in all translation units, then the linker
+can just discard @code{inline.o}, since it contains only unreferenced code).
+
To get started debugging XEmacs, take a look at the @file{.gdbinit} and
-@file{.dbxrc} files in the @file{src} directory.
-@xref{Q2.1.15 - How to Debug an XEmacs problem with a debugger,,,
-xemacs-faq, XEmacs FAQ}.
+@file{.dbxrc} files in the @file{src} directory. See the section in the
+XEmacs FAQ on How to Debug an XEmacs problem with a debugger.
After making source code changes, run @code{make check} to ensure that
-you haven't introduced any regressions. If you're feeling ambitious,
-you can try to improve the test suite in @file{tests/automated}.
+you haven't introduced any regressions. If you want to make xemacs more
+reliable, please improve the test suite in @file{tests/automated}.
+
+Did you make sure you didn't introduce any new compiler warnings?
+
+Before submitting a patch, please try compiling at least once with
+
+@example
+configure --with-mule --with-union-type --error-checking=all
+@end example
Here are things to know when you create a new source file:
Generated header files should be included using the @code{#include <...>} syntax,
not the @code{#include "..."} syntax. The generated headers are:
-@file{config.h puresize-adjust.h sheap-adjust.h paths.h Emacs.ad.h}
+@file{config.h sheap-adjust.h paths.h Emacs.ad.h}
The basic rule is that you should assume builds using @code{--srcdir}
and the @code{#include <...>} syntax needs to be used when the
@code{"lisp.h"}. It is the responsibility of the @file{.c} files that
use it to do so.
-@item
-If the header uses @code{INLINE}, either directly or through
-@code{DECLARE_LRECORD}, then it must be added to @file{inline.c}'s
-includes.
-
-@item
-Try compiling at least once with
+@end itemize
-@example
-gcc --with-mule --with-union-type --error-checking=all
-@end example
+Here is a checklist of things to do when creating a new lisp object type
+named @var{foo}:
+@enumerate
@item
-Did I mention that you should run the test suite?
-@example
-make check
-@end example
-@end itemize
-
+create @var{foo}.h
+@item
+create @var{foo}.c
+@item
+add definitions of @code{syms_of_@var{foo}}, etc. to @file{@var{foo}.c}
+@item
+add declarations of @code{syms_of_@var{foo}}, etc. to @file{symsinit.h}
+@item
+add calls to @code{syms_of_@var{foo}}, etc. to @file{emacs.c}
+@item
+add definitions of macros like @code{CHECK_@var{FOO}} and
+@code{@var{FOO}P} to @file{@var{foo}.h}
+@item
+add the new type index to @code{enum lrecord_type}
+@item
+add a DEFINE_LRECORD_IMPLEMENTATION call to @file{@var{foo}.c}
+@item
+add an INIT_LRECORD_IMPLEMENTATION call to @code{syms_of_@var{foo}.c}
+@end enumerate
@node A Summary of the Various XEmacs Modules, Allocation of Objects in XEmacs Lisp, Rules When Writing New C Code, Top
@chapter A Summary of the Various XEmacs Modules
* Modules for Internationalization::
@end menu
-@node Low-Level Modules
+@node Low-Level Modules, Basic Lisp Modules, A Summary of the Various XEmacs Modules, A Summary of the Various XEmacs Modules
@section Low-Level Modules
@example
-@node Basic Lisp Modules
+@node Basic Lisp Modules, Modules for Standard Editing Operations, Low-Level Modules, A Summary of the Various XEmacs Modules
@section Basic Lisp Modules
@example
@example
alloc.c
-pure.c
-puresize.h
@end example
The large module @file{alloc.c} implements all of the basic allocation and
subtypes in the subsystem; this provides a great deal of robustness to
the XEmacs code.
-@cindex pure space
-@file{pure.c} contains the declaration of the @dfn{purespace} array.
-Pure space is a hack used to place some constant Lisp data into the code
-segment of the XEmacs executable, even though the data needs to be
-initialized through function calls. (See above in section VIII for more
-info about this.) During startup, certain sorts of data is
-automatically copied into pure space, and other data is copied manually
-in some of the basic Lisp files by calling the function @code{purecopy},
-which copies the object if possible (this only works in temacs, of
-course) and returns the new object. In particular, while temacs is
-executing, the Lisp reader automatically copies all compiled-function
-objects that it reads into pure space. Since compiled-function objects
-are large, are never modified, and typically comprise the majority of
-the contents of a compiled-Lisp file, this works well. While XEmacs is
-running, any attempt to modify an object that resides in pure space
-causes an error. Objects in pure space are never garbage collected --
-almost all of the time, they're intended to be permanent, and in any
-case you can't write into pure space to set the mark bits.
-
-@file{puresize.h} contains the declaration of the size of the pure space
-array. This depends on the optional features that are compiled in, any
-extra purespace requested by the user at compile time, and certain other
-factors (e.g. 64-bit machines need more pure space because their Lisp
-objects are larger). The smallest size that suffices should be used, so
-that there's no wasted space. If there's not enough pure space, you
-will get an error during the build process, specifying how much more
-pure space is needed.
-
-
@example
eval.c
-@node Modules for Standard Editing Operations
+@node Modules for Standard Editing Operations, Editor-Level Control Flow Modules, Basic Lisp Modules, A Summary of the Various XEmacs Modules
@section Modules for Standard Editing Operations
@example
-@node Editor-Level Control Flow Modules
+@node Editor-Level Control Flow Modules, Modules for the Basic Displayable Lisp Objects, Modules for Standard Editing Operations, A Summary of the Various XEmacs Modules
@section Editor-Level Control Flow Modules
@example
-@node Modules for the Basic Displayable Lisp Objects
+@node Modules for the Basic Displayable Lisp Objects, Modules for other Display-Related Lisp Objects, Editor-Level Control Flow Modules, A Summary of the Various XEmacs Modules
@section Modules for the Basic Displayable Lisp Objects
@example
-@node Modules for other Display-Related Lisp Objects
+@node Modules for other Display-Related Lisp Objects, Modules for the Redisplay Mechanism, Modules for the Basic Displayable Lisp Objects, A Summary of the Various XEmacs Modules
@section Modules for other Display-Related Lisp Objects
@example
-@node Modules for the Redisplay Mechanism
+@node Modules for the Redisplay Mechanism, Modules for Interfacing with the File System, Modules for other Display-Related Lisp Objects, A Summary of the Various XEmacs Modules
@section Modules for the Redisplay Mechanism
@example
-@node Modules for Interfacing with the File System
+@node Modules for Interfacing with the File System, Modules for Other Aspects of the Lisp Interpreter and Object System, Modules for the Redisplay Mechanism, A Summary of the Various XEmacs Modules
@section Modules for Interfacing with the File System
@example
-@node Modules for Other Aspects of the Lisp Interpreter and Object System
+@node Modules for Other Aspects of the Lisp Interpreter and Object System, Modules for Interfacing with the Operating System, Modules for Interfacing with the File System, A Summary of the Various XEmacs Modules
@section Modules for Other Aspects of the Lisp Interpreter and Object System
@example
-@node Modules for Interfacing with the Operating System
+@node Modules for Interfacing with the Operating System, Modules for Interfacing with X Windows, Modules for Other Aspects of the Lisp Interpreter and Object System, A Summary of the Various XEmacs Modules
@section Modules for Interfacing with the Operating System
@example
-@node Modules for Interfacing with X Windows
+@node Modules for Interfacing with X Windows, Modules for Internationalization, Modules for Interfacing with the Operating System, A Summary of the Various XEmacs Modules
@section Modules for Interfacing with X Windows
@example
-@node Modules for Internationalization
+@node Modules for Internationalization, , Modules for Interfacing with X Windows, A Summary of the Various XEmacs Modules
@section Modules for Internationalization
@example
-@node Allocation of Objects in XEmacs Lisp, Events and the Event Loop, A Summary of the Various XEmacs Modules, Top
+@node Allocation of Objects in XEmacs Lisp, Dumping, A Summary of the Various XEmacs Modules, Top
@chapter Allocation of Objects in XEmacs Lisp
@menu
* Allocation from Frob Blocks::
* lrecords::
* Low-level allocation::
-* Pure Space::
* Cons::
* Vector::
* Bit Vector::
* Compiled Function::
@end menu
-@node Introduction to Allocation
+@node Introduction to Allocation, Garbage Collection, Allocation of Objects in XEmacs Lisp, Allocation of Objects in XEmacs Lisp
@section Introduction to Allocation
Emacs Lisp, like all Lisps, has garbage collection. This means that
have no corresponding Lisp primitives. Every Lisp object, though,
has at least one C primitive for creating it.
- Recall from section (VII) that a Lisp object, as stored in a 32-bit
-or 64-bit word, has a mark bit, a few tag bits, and a ``value'' that
-occupies the remainder of the bits. We can separate the different
-Lisp object types into four broad categories:
+ Recall from section (VII) that a Lisp object, as stored in a 32-bit or
+64-bit word, has a few tag bits, and a ``value'' that occupies the
+remainder of the bits. We can separate the different Lisp object types
+into three broad categories:
@itemize @bullet
@item
@code{GCPRO}ed.
@end itemize
- In the remaining three categories, the value is a pointer to a
-structure.
-
-@itemize @bullet
-@item
-@cindex frob block
-(b) Those for whom the tag directly specifies the type. Recall that
-there are only three tag bits; this means that at most five types can be
-specified this way. The most commonly-used types are stored in this
-format; this includes conses, strings, vectors, and sometimes symbols.
-With the exception of vectors, objects in this category are allocated in
-@dfn{frob blocks}, i.e. large blocks of memory that are subdivided into
-individual objects. This saves a lot on malloc overhead, since there
-are typically quite a lot of these objects around, and the objects are
-small. (A cons, for example, occupies 8 bytes on 32-bit machines---4
-bytes for each of the two objects it contains.) Vectors are individually
-@code{malloc()}ed since they are of variable size. (It would be
-possible, and desirable, to allocate vectors of certain small sizes out
-of frob blocks, but it isn't currently done.) Strings are handled
-specially: Each string is allocated in two parts, a fixed size structure
-containing a length and a data pointer, and the actual data of the
-string. The former structure is allocated in frob blocks as usual, and
-the latter data is stored in @dfn{string chars blocks} and is relocated
-during garbage collection to eliminate holes.
-@end itemize
-
In the remaining two categories, the type is stored in the object
itself. The tag for all such objects is the generic @dfn{lrecord}
-(Lisp_Record) tag. The first four bytes (or eight, for 64-bit machines)
-of the object's structure are a pointer to a structure that describes
-the object's type, which includes method pointers and a pointer to a
-string naming the type. Note that it's possible to save some space by
-using a one- or two-byte tag, rather than a four- or eight-byte pointer
-to store the type, but it's not clear it's worth making the change.
+(Lisp_Type_Record) tag. The first bytes of the object's structure are an
+integer (actually a char) characterising the object's type and some
+flags, in particular the mark bit used for garbage collection. A
+structure describing the type is accessible thru the
+lrecord_implementation_table indexed with said integer. This structure
+includes the method pointers and a pointer to a string naming the type.
@itemize @bullet
@item
-(c) Those lrecords that are allocated in frob blocks (see above). This
+(b) Those lrecords that are allocated in frob blocks (see above). This
includes the objects that are most common and relatively small, and
-includes floats, compiled functions, symbols (when not in category (b)),
+includes conses, strings, subrs, floats, compiled functions, symbols,
extents, events, and markers. With the cleanup of frob blocks done in
19.12, it's not terribly hard to add more objects to this category, but
-it's a bit trickier than adding an object type to type (d) (esp. if the
+it's a bit trickier than adding an object type to type (c) (esp. if the
object needs a finalization method), and is not likely to save much
space unless the object is small and there are many of them. (In fact,
if there are very few of them, it might actually waste space.)
@item
-(d) Those lrecords that are individually @code{malloc()}ed. These are
+(c) Those lrecords that are individually @code{malloc()}ed. These are
called @dfn{lcrecords}. All other types are in this category. Adding a
new type to this category is comparatively easy, and all types added
since 19.8 (when the current allocation scheme was devised, by Richard
@end itemize
Note that bit vectors are a bit of a special case. They are
-simple lrecords as in category (c), but are individually @code{malloc()}ed
+simple lrecords as in category (b), but are individually @code{malloc()}ed
like vectors. You can basically view them as exactly like vectors
except that their type is stored in lrecord fashion rather than
in directly-tagged fashion.
- Note that FSF Emacs redesigned their object system in 19.29 to follow
-a similar scheme. However, given RMS's expressed dislike for data
-abstraction, the FSF scheme is not nearly as clean or as easy to
-extend. (FSF calls items of type (c) @code{Lisp_Misc} and items of type
-(d) @code{Lisp_Vectorlike}, with separate tags for each, although
-@code{Lisp_Vectorlike} is also used for vectors.)
-@node Garbage Collection
+@node Garbage Collection, GCPROing, Introduction to Allocation, Allocation of Objects in XEmacs Lisp
@section Garbage Collection
@cindex garbage collection
all vectors (which are chained in one big list), and all
lcrecords (which are likewise chained).
- Note that, when an object is marked, the mark has to occur
-inside of the object's structure, rather than in the 32-bit
-@code{Lisp_Object} holding the object's pointer; i.e. you can't just
-set the pointer's mark bit. This is because there may be many
-pointers to the same object. This means that the method of
-marking an object can differ depending on the type. The
-different marking methods are approximately as follows:
-
-@enumerate
-@item
-For conses, the mark bit of the car is set.
-@item
-For strings, the mark bit of the string's plist is set.
-@item
-For symbols when not lrecords, the mark bit of the
-symbol's plist is set.
-@item
-For vectors, the length is negated after adding 1.
-@item
-For lrecords, the pointer to the structure describing
-the type is changed (see below).
-@item
-Integers and characters do not need to be marked, since
-no allocation occurs for them.
-@end enumerate
-
- The details of this are in the @code{mark_object()} function.
+ Garbage collection can be invoked explicitly by calling
+@code{garbage-collect} but is also called automatically by @code{eval},
+once a certain amount of memory has been allocated since the last
+garbage collection (according to @code{gc-cons-threshold}).
- Note that any code that operates during garbage collection has
-to be especially careful because of the fact that some objects
-may be marked and as such may not look like they normally do.
-In particular:
-@itemize @bullet
-Some object pointers may have their mark bit set. This will make
-@code{FOOBARP()} predicates fail. Use @code{GC_FOOBARP()} to deal with
-this.
-@item
-Even if you clear the mark bit, @code{FOOBARP()} will still fail
-for lrecords because the implementation pointer has been
-changed (see below). @code{GC_FOOBARP()} will correctly deal with
-this.
-@item
-Vectors have their size field munged, so anything that
-looks at this field will fail.
-@item
-Note that @code{XFOOBAR()} macros @emph{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.
-@end itemize
-
- Finally, note that garbage collection can be invoked explicitly
-by calling @code{garbage-collect} but is also called automatically
-by @code{eval}, once a certain amount of memory has been allocated
-since the last garbage collection (according to @code{gc-cons-threshold}).
-
-@node GCPROing
+@node GCPROing, Garbage Collection - Step by Step, Garbage Collection, Allocation of Objects in XEmacs Lisp
@section @code{GCPRO}ing
@code{GCPRO}ing is one of the ugliest and trickiest parts of Emacs
@enumerate
@item
-All objects that have been @code{staticpro()}d. This is used for
-any global C variables that hold Lisp objects. A call to
-@code{staticpro()} happens implicitly as a result of any symbols
-declared with @code{defsymbol()} and any variables declared with
-@code{DEFVAR_FOO()}. You need to explicitly call @code{staticpro()}
-(in the @code{vars_of_foo()} method of a module) for other global
-C variables holding Lisp objects. (This typically includes
-internal lists and such things.)
+All objects that have been @code{staticpro()}d or
+@code{staticpro_nodump()}ed. This is used for any global C variables
+that hold Lisp objects. A call to @code{staticpro()} happens implicitly
+as a result of any symbols declared with @code{defsymbol()} and any
+variables declared with @code{DEFVAR_FOO()}. You need to explicitly
+call @code{staticpro()} (in the @code{vars_of_foo()} method of a module)
+for other global C variables holding Lisp objects. (This typically
+includes internal lists and such things.). Use
+@code{staticpro_nodump()} only in the rare cases when you do not want
+the pointed variable to be saved at dump time but rather recompute it at
+startup.
Note that @code{obarray} is one of the @code{staticpro()}d things.
Therefore, all functions and variables get marked through this.
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
+@node Garbage Collection - Step by Step, Integers and Characters, GCPROing, Allocation of Objects in XEmacs Lisp
@section Garbage Collection - Step by Step
@cindex garbage collection step by step
* sweep_bit_vectors_1::
@end menu
-@node Invocation
+@node Invocation, garbage_collect_1, Garbage Collection - Step by Step, Garbage Collection - Step by Step
@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
+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:
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
+about the freed memory), or can occur @emph{implicitly} in four different
situations:
@enumerate
@item
@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
+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
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
+through another function. Since calls to these two functions are hidden
+in various other functions, many calls to @code{garbage_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, mark_object, Invocation, Garbage Collection - Step by Step
@subsection @code{garbage_collect_1}
@cindex @code{garbage_collect_1}
place.
@enumerate
@item
-There are several cases in which the garbage collector is left immediately:
+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
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
+saved. The variables @code{pre_gc_cursor} 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}.
+@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.
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}).
+(@code{cleanup_specifiers}).
@item
Now the mark phase begins and marks all accessible elements. In order to
start from
@item
all constant symbols and static variables that are registered via
@code{staticpro}@ in the array @code{staticvec}.
-@xref{Adding Global Lisp Variables}.
+@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
+@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
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
+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
+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
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
+(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
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.
+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
+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
+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
+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}
@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},
+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
+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
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
+other weak objects, both finishing functions are redone as long as
yet unmarked objects get freshly marked.
@item
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
+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
@item
The function @code{prune_specifiers} checks all listed specifiers held
-in @code{Vall_speficiers} and removes the ones from the lists that are
+in @code{Vall_specifiers} 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
+@code{Vall_syntax_tables}. The function @code{prune_syntax_tables} walks
through it and unlinks the tables that are unmarked.
@item
@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
+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
+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
@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.
+and exit.
@end enumerate
-@node mark_object
+@node mark_object, gc_sweep, garbage_collect_1, Garbage Collection - Step by Step
@subsection @code{mark_object}
@cindex @code{mark_object}
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.
+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
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
+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
+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
+@node gc_sweep, sweep_lcrecords_1, mark_object, Garbage Collection - Step by Step
@subsection @code{gc_sweep}
@cindex @code{gc_sweep}
-The job of this function is to free all unmarked records from memory. As
+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}.
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
+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,
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
+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}
+therefore treated differently by the function @code{sweep_bit_vectors_1}
described later.
At first, we need some brief information about how
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
+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
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
+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
+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
+@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
+@node sweep_lcrecords_1, compact_string_chars, gc_sweep, Garbage Collection - Step by Step
@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}.
+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
+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
+
+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,
+date by calling @code{tick_lcrecord_stats} with the right arguments,
-@node compact_string_chars
+@node compact_string_chars, sweep_strings, sweep_lcrecords_1, Garbage Collection - Step by Step
@subsection @code{compact_string_chars}
@cindex @code{compact_string_chars}
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.
+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
@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
+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.
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
+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
i.e. @code{to_block}, and all remaining blocks (we know that they just
carry garbage) are explicitly @code{xfree}d.
-@node sweep_strings
+@node sweep_strings, sweep_bit_vectors_1, compact_string_chars, Garbage Collection - Step by Step
@subsection @code{sweep_strings}
@cindex @code{sweep_strings}
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
+@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
therefore it was @code{malloc}ed separately, we know also @code{xfree}
it explicitly.
-@node sweep_bit_vectors_1
+@node sweep_bit_vectors_1, , sweep_strings, Garbage Collection - Step by Step
@subsection @code{sweep_bit_vectors_1}
@cindex @code{sweep_bit_vectors_1}
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
+all unmarked bit vectors are unlinked by calling @code{xfree} and all of
them become unmarked.
-In addition, the bookkeeping information used for garbage
+In addition, the bookkeeping information used for garbage
collector's output purposes is updated.
-@node Integers and Characters
+@node Integers and Characters, Allocation from Frob Blocks, Garbage Collection - Step by Step, Allocation of Objects in XEmacs Lisp
@section Integers and Characters
Integer and character Lisp objects are created from integers using the
are too big; i.e. you won't get the value you expected but the tag bits
will at least be correct.
-@node Allocation from Frob Blocks
+@node Allocation from Frob Blocks, lrecords, Integers and Characters, Allocation of Objects in XEmacs Lisp
@section Allocation from Frob Blocks
The uninitialized memory required by a @code{Lisp_Object} of a particular type
none. (There are actually two versions of these macros, one of which is
more defensive but less efficient and is used for error-checking.)
-@node lrecords
+@node lrecords, Low-level allocation, Allocation from Frob Blocks, Allocation of Objects in XEmacs Lisp
@section lrecords
[see @file{lrecord.h}]
All lrecords have at the beginning of their structure a @code{struct
-lrecord_header}. This just contains a pointer to a @code{struct
+lrecord_header}. This just contains a type number and some flags,
+including the mark bit. All builtin type numbers are defined as
+constants in @code{enum lrecord_type}, to allow the compiler to generate
+more efficient code for @code{@var{type}P}. The type number, thru the
+@code{lrecord_implementation_table}, gives access to a @code{struct
lrecord_implementation}, which is a structure containing method pointers
and such. There is one of these for each type, and it is a global,
constant, statically-declared structure that is declared in the
-@code{DEFINE_LRECORD_IMPLEMENTATION()} macro. (This macro actually
-declares an array of two @code{struct lrecord_implementation}
-structures. The first one contains all the standard method pointers,
-and is used in all normal circumstances. During garbage collection,
-however, the lrecord is @dfn{marked} by bumping its implementation
-pointer by one, so that it points to the second structure in the array.
-This structure contains a special indication in it that it's a
-@dfn{marked-object} structure: the finalize method is the special
-function @code{this_marks_a_marked_record()}, and all other methods are
-null pointers. At the end of garbage collection, all lrecords will
-either be reclaimed or unmarked by decrementing their implementation
-pointers, so this second structure pointer will never remain past
-garbage collection.
-
- Simple lrecords (of type (c) above) just have a @code{struct
+@code{DEFINE_LRECORD_IMPLEMENTATION()} macro.
+
+ Simple lrecords (of type (b) above) just have a @code{struct
lrecord_header} at their beginning. lcrecords, however, actually have a
@code{struct lcrecord_header}. This, in turn, has a @code{struct
lrecord_header} at its beginning, so sanity is preserved; but it also
Whenever you create an lrecord, you need to call either
@code{DEFINE_LRECORD_IMPLEMENTATION()} or
@code{DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION()}. This needs to be
-specified in a C file, at the top level. What this actually does is
-define and initialize the implementation structure for the lrecord. (And
-possibly declares a function @code{error_check_foo()} that implements
-the @code{XFOO()} macro when error-checking is enabled.) The arguments
-to the macros are the actual type name (this is used to construct the C
-variable name of the lrecord implementation structure and related
-structures using the @samp{##} macro concatenation operator), a string
-that names the type on the Lisp level (this may not be the same as the C
-type name; typically, the C type name has underscores, while the Lisp
-string has dashes), various method pointers, and the name of the C
-structure that contains the object. The methods are used to encapsulate
-type-specific information about the object, such as how to print it or
-mark it for garbage collection, so that it's easy to add new object
-types without having to add a specific case for each new type in a bunch
-of different places.
+specified in a @file{.c} file, at the top level. What this actually
+does is define and initialize the implementation structure for the
+lrecord. (And possibly declares a function @code{error_check_foo()} that
+implements the @code{XFOO()} macro when error-checking is enabled.) The
+arguments to the macros are the actual type name (this is used to
+construct the C variable name of the lrecord implementation structure
+and related structures using the @samp{##} macro concatenation
+operator), a string that names the type on the Lisp level (this may not
+be the same as the C type name; typically, the C type name has
+underscores, while the Lisp string has dashes), various method pointers,
+and the name of the C structure that contains the object. The methods
+are used to encapsulate type-specific information about the object, such
+as how to print it or mark it for garbage collection, so that it's easy
+to add new object types without having to add a specific case for each
+new type in a bunch of different places.
The difference between @code{DEFINE_LRECORD_IMPLEMENTATION()} and
@code{DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION()} is that the former is
For the purpose of keeping allocation statistics, the allocation
engine keeps a list of all the different types that exist. Note that,
since @code{DEFINE_LRECORD_IMPLEMENTATION()} is a macro that is
-specified at top-level, there is no way for it to add to the list of all
-existing types. What happens instead is that each implementation
-structure contains in it a dynamically assigned number that is
-particular to that type. (Or rather, it contains a pointer to another
-structure that contains this number. This evasiveness is done so that
-the implementation structure can be declared const.) In the sweep stage
-of garbage collection, each lrecord is examined to see if its
-implementation structure has its dynamically-assigned number set. If
-not, it must be a new type, and it is added to the list of known types
-and a new number assigned. The number is used to index into an array
-holding the number of objects of each type and the total memory
-allocated for objects of that type. The statistics in this array are
-also computed during the sweep stage. These statistics are returned by
-the call to @code{garbage-collect} and are printed out at the end of the
-loadup phase.
+specified at top-level, there is no way for it to initialize the global
+data structures containing type information, like
+@code{lrecord_implementations_table}. For this reason a call to
+@code{INIT_LRECORD_IMPLEMENTATION} must be added to the same source file
+containing @code{DEFINE_LRECORD_IMPLEMENTATION}, but instead of to the
+top level, to one of the init functions, typically
+@code{syms_of_@var{foo}.c}. @code{INIT_LRECORD_IMPLEMENTATION} must be
+called before an object of this type is used.
+
+The type number is also used to index into an array holding the number
+of objects of each type and the total memory allocated for objects of
+that type. The statistics in this array are computed during the sweep
+stage. These statistics are returned by the call to
+@code{garbage-collect}.
Note that for every type defined with a @code{DEFINE_LRECORD_*()}
macro, there needs to be a @code{DECLARE_LRECORD_IMPLEMENTATION()}
For an example, see the methods for window configurations and opaques.
@end enumerate
-@node Low-level allocation
+@node Low-level allocation, Cons, lrecords, Allocation of Objects in XEmacs Lisp
@section Low-level allocation
Memory that you want to allocate directly should be allocated using
(On some systems, the memory warnings are not functional.)
Allocated memory that is going to be used to make a Lisp object
-is created using @code{allocate_lisp_storage()}. This calls @code{xmalloc()}
-but also verifies that the pointer to the memory can fit into
-a Lisp word (remember that some bits are taken away for a type
-tag and a mark bit). If not, an error is issued through @code{memory_full()}.
-@code{allocate_lisp_storage()} is called by @code{alloc_lcrecord()},
-@code{ALLOCATE_FIXED_TYPE()}, and the vector and bit-vector creation
-routines. These routines also call @code{INCREMENT_CONS_COUNTER()} at the
-appropriate times; this keeps statistics on how much memory is
-allocated, so that garbage-collection can be invoked when the
-threshold is reached.
-
-@node Pure Space
-@section Pure Space
-
- Not yet documented.
-
-@node Cons
+is created using @code{allocate_lisp_storage()}. This just calls
+@code{xmalloc()}. It used to verify that the pointer to the memory can
+fit into a Lisp word, before the current Lisp object representation was
+introduced. @code{allocate_lisp_storage()} is called by
+@code{alloc_lcrecord()}, @code{ALLOCATE_FIXED_TYPE()}, and the vector
+and bit-vector creation routines. These routines also call
+@code{INCREMENT_CONS_COUNTER()} at the appropriate times; this keeps
+statistics on how much memory is allocated, so that garbage-collection
+can be invoked when the threshold is reached.
+
+@node Cons, Vector, Low-level allocation, Allocation of Objects in XEmacs Lisp
@section Cons
Conses are allocated in standard frob blocks. The only thing to
If you mess this up, you will get BADLY BURNED, and it has happened
before.
-@node Vector
+@node Vector, Bit Vector, Cons, Allocation of Objects in XEmacs Lisp
@section Vector
As mentioned above, each vector is @code{malloc()}ed individually, and
is actually @code{malloc()}ed with the right size, however, and access
to any element through the @code{contents} array works fine.
-@node Bit Vector
+@node Bit Vector, Symbol, Vector, Allocation of Objects in XEmacs Lisp
@section Bit Vector
Bit vectors work exactly like vectors, except for more complicated
tag field in bit vector Lisp words is ``lrecord'' rather than
``vector''.)
-@node Symbol
+@node Symbol, Marker, Bit Vector, Allocation of Objects in XEmacs Lisp
@section Symbol
- Symbols are also allocated in frob blocks. Note that the code
-exists for symbols to be either lrecords (category (c) above)
-or simple types (category (b) above), and are lrecords by
-default (I think), although there is no good reason for this.
-
- Note that symbols in the awful horrible obarray structure are
-chained through their @code{next} field.
+ Symbols are also allocated in frob blocks. Symbols in the awful
+horrible obarray structure are chained through their @code{next} field.
Remember that @code{intern} looks up a symbol in an obarray, creating
one if necessary.
-@node Marker
+@node Marker, String, Symbol, Allocation of Objects in XEmacs Lisp
@section Marker
Markers are allocated in frob blocks, as usual. They are kept
markers from a buffer.) Markers are removed from a buffer in
the finalize stage, in @code{ADDITIONAL_FREE_marker()}.
-@node String
+@node String, Compiled Function, Marker, Allocation of Objects in XEmacs Lisp
@section String
As mentioned above, strings are a special case. A string is logically
The string compactor recognizes this special 0xFFFFFFFF marker and
handles it correctly.
-@node Compiled Function
+@node Compiled Function, , String, Allocation of Objects in XEmacs Lisp
@section Compiled Function
Not yet documented.
-@node Events and the Event Loop, Evaluation; Stack Frames; Bindings, Allocation of Objects in XEmacs Lisp, Top
+
+@node Dumping, Events and the Event Loop, Allocation of Objects in XEmacs Lisp, Top
+@chapter Dumping
+
+@section What is dumping and its justification
+
+The C code of XEmacs is just a Lisp engine with a lot of built-in
+primitives useful for writing an editor. The editor itself is written
+mostly in Lisp, and represents around 100K lines of code. Loading and
+executing the initialization of all this code takes a bit a time (five
+to ten times the usual startup time of current xemacs) and requires
+having all the lisp source files around. Having to reload them each
+time the editor is started would not be acceptable.
+
+The traditional solution to this problem is called dumping: the build
+process first creates the lisp engine under the name @file{temacs}, then
+runs it until it has finished loading and initializing all the lisp
+code, and eventually creates a new executable called @file{xemacs}
+including both the object code in @file{temacs} and all the contents of
+the memory after the initialization.
+
+This solution, while working, has a huge problem: the creation of the
+new executable from the actual contents of memory is an extremely
+system-specific process, quite error-prone, and which interferes with a
+lot of system libraries (like malloc). It is even getting worse
+nowadays with libraries using constructors which are automatically
+called when the program is started (even before main()) which tend to
+crash when they are called multiple times, once before dumping and once
+after (IRIX 6.x libz.so pulls in some C++ image libraries thru
+dependencies which have this problem). Writing the dumper is also one
+of the most difficult parts of porting XEmacs to a new operating system.
+Basically, `dumping' is an operation that is just not officially
+supported on many operating systems.
+
+The aim of the portable dumper is to solve the same problem as the
+system-specific dumper, that is to be able to reload quickly, using only
+a small number of files, the fully initialized lisp part of the editor,
+without any system-specific hacks.
+
+@menu
+* Overview::
+* Data descriptions::
+* Dumping phase::
+* Reloading phase::
+* Remaining issues::
+@end menu
+
+@node Overview, Data descriptions, Dumping, Dumping
+@section Overview
+
+The portable dumping system has to:
+
+@enumerate
+@item
+At dump time, write all initialized, non-quickly-rebuildable data to a
+file [Note: currently named @file{xemacs.dmp}, but the name will
+change], along with all informations needed for the reloading.
+
+@item
+When starting xemacs, reload the dump file, relocate it to its new
+starting address if needed, and reinitialize all pointers to this
+data. Also, rebuild all the quickly rebuildable data.
+@end enumerate
+
+@node Data descriptions, Dumping phase, Overview, Dumping
+@section Data descriptions
+
+The more complex task of the dumper is to be able to write lisp objects
+(lrecords) and C structs to disk and reload them at a different address,
+updating all the pointers they include in the process. This is done by
+using external data descriptions that give information about the layout
+of the structures in memory.
+
+The specification of these descriptions is in lrecord.h. A description
+of an lrecord is an array of struct lrecord_description. Each of these
+structs include a type, an offset in the structure and some optional
+parameters depending on the type. For instance, here is the string
+description:
+
+@example
+static const struct lrecord_description string_description[] = @{
+ @{ 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) @},
+ @{ XD_END @}
+@};
+@end example
+
+The first line indicates a member of type Bytecount, which is used by
+the next, indirect directive. The second means "there is a pointer to
+some opaque data in the field @code{data}". The length of said data is
+given by the expression @code{XD_INDIRECT(0, 1)}, which means "the value
+in the 0th line of the description (welcome to C) plus one". The third
+line means "there is a Lisp_Object member @code{plist} in the Lisp_String
+structure". @code{XD_END} then ends the description.
+
+This gives us all the information we need to move around what is pointed
+to by a structure (C or lrecord) and, by transitivity, everything that
+it points to. The only missing information for dumping is the size of
+the structure. For lrecords, this is part of the
+lrecord_implementation, so we don't need to duplicate it. For C
+structures we use a struct struct_description, which includes a size
+field and a pointer to an associated array of lrecord_description.
+
+@node Dumping phase, Reloading phase, Data descriptions, Dumping
+@section Dumping phase
+
+Dumping is done by calling the function pdump() (in alloc.c) which is
+invoked from Fdump_emacs (in emacs.c). This function performs a number
+of tasks.
+
+@menu
+* Object inventory::
+* Address allocation::
+* The header::
+* Data dumping::
+* Pointers dumping::
+@end menu
+
+@node Object inventory, Address allocation, Dumping phase, Dumping phase
+@subsection Object inventory
+
+The first task is to build the list of the objects to dump. This
+includes:
+
+@itemize @bullet
+@item lisp objects
+@item C structures
+@end itemize
+
+We end up with one @code{pdump_entry_list_elmt} per object group (arrays
+of C structs are kept together) which includes a pointer to the first
+object of the group, the per-object size and the count of objects in the
+group, along with some other information which is initialized later.
+
+These entries are linked together in @code{pdump_entry_list} structures
+and can be enumerated thru either:
+
+@enumerate
+@item
+the @code{pdump_object_table}, an array of @code{pdump_entry_list}, one
+per lrecord type, indexed by type number.
+
+@item
+the @code{pdump_opaque_data_list}, used for the opaque data which does
+not include pointers, and hence does not need descriptions.
+
+@item
+the @code{pdump_struct_table}, which is a vector of
+@code{struct_description}/@code{pdump_entry_list} pairs, used for
+non-opaque C structures.
+@end enumerate
+
+This uses a marking strategy similar to the garbage collector. Some
+differences though:
+
+@enumerate
+@item
+We do not use the mark bit (which does not exist for C structures
+anyway), we use a big hash table instead.
+
+@item
+We do not use the mark function of lrecords but instead rely on the
+external descriptions. This happens essentially because we need to
+follow pointers to C structures and opaque data in addition to
+Lisp_Object members.
+@end enumerate
+
+This is done by @code{pdump_register_object}, which handles Lisp_Object
+variables, and pdump_register_struct which handles C structures, which
+both delegate the description management to pdump_register_sub.
+
+The hash table doubles as a map object to pdump_entry_list_elmt (i.e.
+allows us to look up a pdump_entry_list_elmt with the object it points
+to). Entries are added with @code{pdump_add_entry()} and looked up with
+@code{pdump_get_entry()}. There is no need for entry removal. The hash
+value is computed quite basically from the object pointer by
+@code{pdump_make_hash()}.
+
+The roots for the marking are:
+
+@enumerate
+@item
+the @code{staticpro}'ed variables (there is a special @code{staticpro_nodump()}
+call for protected variables we do not want to dump).
+
+@item
+the @code{pdump_wire}'d variables (@code{staticpro} is equivalent to
+@code{staticpro_nodump()} + @code{pdump_wire()}).
+
+@item
+the @code{dumpstruct}'ed variables, which points to C structures.
+@end enumerate
+
+This does not include the GCPRO'ed variables, the specbinds, the
+catchtags, the backlist, the redisplay or the profiling info, since we
+do not want to rebuild the actual chain of lisp calls which end up to
+the dump-emacs call, only the global variables.
+
+Weak lists and weak hash tables are dumped as if they were their
+non-weak equivalent (without changing their type, of course). This has
+not yet been a problem.
+
+@node Address allocation, The header, Object inventory, Dumping phase
+@subsection Address allocation
+
+
+The next step is to allocate the offsets of each of the objects in the
+final dump file. This is done by @code{pdump_allocate_offset()} which
+is called indirectly by @code{pdump_scan_by_alignment()}.
+
+The strategy to deal with alignment problems uses these facts:
+
+@enumerate
+@item
+real world alignment requirements are powers of two.
+
+@item
+the C compiler is required to adjust the size of a struct so that you
+can have an array of them next to each other. This means you can have a
+upper bound of the alignment requirements of a given structure by
+looking at which power of two its size is a multiple.
+
+@item
+the non-variant part of variable size lrecords has an alignment
+requirement of 4.
+@end enumerate
+
+Hence, for each lrecord type, C struct type or opaque data block the
+alignment requirement is computed as a power of two, with a minimum of
+2^2 for lrecords. @code{pdump_scan_by_alignment()} then scans all the
+@code{pdump_entry_list_elmt}'s, the ones with the highest requirements
+first. This ensures the best packing.
+
+The maximum alignment requirement we take into account is 2^8.
+
+@code{pdump_allocate_offset()} only has to do a linear allocation,
+starting at offset 256 (this leaves room for the header and keep the
+alignments happy).
+
+@node The header, Data dumping, Address allocation, Dumping phase
+@subsection The header
+
+The next step creates the file and writes a header with a signature and
+some random informations in it (number of staticpro, number of assigned
+lrecord types, etc...). The reloc_address field, which indicates at
+which address the file should be loaded if we want to avoid post-reload
+relocation, is set to 0. It then seeks to offset 256 (base offset for
+the objects).
+
+@node Data dumping, Pointers dumping, The header, Dumping phase
+@subsection Data dumping
+
+The data is dumped in the same order as the addresses were allocated by
+@code{pdump_dump_data()}, called from @code{pdump_scan_by_alignment()}.
+This function copies the data to a temporary buffer, relocates all
+pointers in the object to the addresses allocated in step Address
+Allocation, and writes it to the file. Using the same order means that,
+if we are careful with lrecords whose size is not a multiple of 4, we
+are ensured that the object is always written at the offset in the file
+allocated in step Address Allocation.
+
+@node Pointers dumping, , Data dumping, Dumping phase
+@subsection Pointers dumping
+
+A bunch of tables needed to reassign properly the global pointers are
+then written. They are:
+
+@enumerate
+@item
+the staticpro array
+@item
+the dumpstruct array
+@item
+the lrecord_implementation_table array
+@item
+a vector of all the offsets to the objects in the file that include a
+description (for faster relocation at reload time)
+@item
+the pdump_wired and pdump_wired_list arrays
+@end enumerate
+
+For each of the arrays we write both the pointer to the variables and
+the relocated offset of the object they point to. Since these variables
+are global, the pointers are still valid when restarting the program and
+are used to regenerate the global pointers.
+
+The @code{pdump_wired_list} array is a special case. The variables it
+points to are the head of weak linked lists of lisp objects of the same
+type. Not all objects of this list are dumped so the relocated pointer
+we associate with them points to the first dumped object of the list, or
+Qnil if none is available. This is also the reason why they are not
+used as roots for the purpose of object enumeration.
+
+This is the end of the dumping part.
+
+@node Reloading phase, Remaining issues, Dumping phase, Dumping
+@section Reloading phase
+
+@subsection File loading
+
+The file is mmap'ed in memory (which ensures a PAGESIZE alignment, at
+least 4096), or if mmap is unavailable or fails, a 256-bytes aligned
+malloc is done and the file is loaded.
+
+Some variables are reinitialized from the values found in the header.
+
+The difference between the actual loading address and the reloc_address
+is computed and will be used for all the relocations.
+
+
+@subsection Putting back the staticvec
+
+The staticvec array is memcpy'd from the file and the variables it
+points to are reset to the relocated objects addresses.
+
+
+@subsection Putting back the dumpstructed variables
+
+The variables pointed to by dumpstruct in the dump phase are reset to
+the right relocated object addresses.
+
+
+@subsection lrecord_implementations_table
+
+The lrecord_implementations_table is reset to its dump time state and
+the right lrecord_type_index values are put in.
+
+
+@subsection Object relocation
+
+All the objects are relocated using their description and their offset
+by @code{pdump_reloc_one}. This step is unnecessary if the
+reloc_address is equal to the file loading address.
+
+
+@subsection Putting back the pdump_wire and pdump_wire_list variables
+
+Same as Putting back the dumpstructed variables.
+
+
+@subsection Reorganize the hash tables
+
+Since some of the hash values in the lisp hash tables are
+address-dependent, their layout is now wrong. So we go through each of
+them and have them resorted by calling @code{pdump_reorganize_hash_table}.
+
+@node Remaining issues, , Reloading phase, Dumping
+@section Remaining issues
+
+The build process will have to start a post-dump xemacs, ask it the
+loading address (which will, hopefully, be always the same between
+different xemacs invocations) and relocate the file to the new address.
+This way the object relocation phase will not have to be done, which
+means no writes in the objects and that, because of the use of mmap, the
+dumped data will be shared between all the xemacs running on the
+computer.
+
+Some executable signature will be necessary to ensure that a given dump
+file is really associated with a given executable, or random crashes
+will occur. Maybe a random number set at compile or configure time thru
+a define. This will also allow for having differently-compiled xemacsen
+on the same system (mule and no-mule comes to mind).
+
+The DOC file contents should probably end up in the dump file.
+
+
+@node Events and the Event Loop, Evaluation; Stack Frames; Bindings, Dumping, Top
@chapter Events and the Event Loop
@menu
* Dispatching Events; The Command Builder::
@end menu
-@node Introduction to Events
+@node Introduction to Events, Main Loop, Events and the Event Loop, Events and the Event Loop
@section Introduction to Events
An event is an object that encapsulates information about an
Emacs events are documented in @file{events.h}; I'll discuss them
later.
-@node Main Loop
+@node Main Loop, Specifics of the Event Gathering Mechanism, Introduction to Events, Events and the Event Loop
@section Main Loop
The @dfn{command loop} is the top-level loop that the editor is always
invoking @code{top_level_1()}, just like when it invokes
@code{command_loop_2()}.
-@node Specifics of the Event Gathering Mechanism
+@node Specifics of the Event Gathering Mechanism, Specifics About the Emacs Event, Main Loop, Events and the Event Loop
@section Specifics of the Event Gathering Mechanism
Here is an approximate diagram of the collection processes
using `dispatch-event'
@end example
-@node Specifics About the Emacs Event
+@node Specifics About the Emacs Event, The Event Stream Callback Routines, Specifics of the Event Gathering Mechanism, Events and the Event Loop
@section Specifics About the Emacs Event
-@node The Event Stream Callback Routines
+@node The Event Stream Callback Routines, Other Event Loop Functions, Specifics About the Emacs Event, Events and the Event Loop
@section The Event Stream Callback Routines
-@node Other Event Loop Functions
+@node Other Event Loop Functions, Converting Events, The Event Stream Callback Routines, Events and the Event Loop
@section Other Event Loop Functions
@code{detect_input_pending()} and @code{input-pending-p} look for
the right kind of input method support, it is possible for (read-char)
to return a Kanji character.
-@node Converting Events
+@node Converting Events, Dispatching Events; The Command Builder, Other Event Loop Functions, Events and the Event Loop
@section Converting Events
@code{character_to_event()}, @code{event_to_character()},
between character representation and the split-up event representation
(keysym plus mod keys).
-@node Dispatching Events; The Command Builder
+@node Dispatching Events; The Command Builder, , Converting Events, Events and the Event Loop
@section Dispatching Events; The Command Builder
Not yet documented.
* Catch and Throw::
@end menu
-@node Evaluation
+@node Evaluation, Dynamic Binding; The specbinding Stack; Unwind-Protects, Evaluation; Stack Frames; Bindings, Evaluation; Stack Frames; Bindings
@section Evaluation
@code{Feval()} evaluates the form (a Lisp object) that is passed to
are converted into an internal form for faster execution.
When a compiled function is executed for the first time by
-@code{funcall_compiled_function()}, or when it is @code{Fpurecopy()}ed
-during the dump phase of building XEmacs, the byte-code instructions are
-converted from a @code{Lisp_String} (which is inefficient to access,
-especially in the presence of MULE) into a @code{Lisp_Opaque} object
-containing an array of unsigned char, which can be directly executed by
-the byte-code interpreter. At this time the byte code is also analyzed
-for validity and transformed into a more optimized form, so that
+@code{funcall_compiled_function()}, or during the dump phase of building
+XEmacs, the byte-code instructions are converted from a
+@code{Lisp_String} (which is inefficient to access, especially in the
+presence of MULE) into a @code{Lisp_Opaque} object containing an array
+of unsigned char, which can be directly executed by the byte-code
+interpreter. At this time the byte code is also analyzed for validity
+and transformed into a more optimized form, so that
@code{execute_optimized_program()} can really fly.
Here are some of the optimizations performed by the internal byte-code
@code{nil}, or @code{keywordp}) symbols, so that the byte interpreter
doesn't have to.
@item
-The maxiumum number of variable bindings in the byte-code is
+The maximum number of variable bindings in the byte-code is
pre-computed, so that space on the @code{specpdl} stack can be
pre-reserved once for the whole function execution.
@item
an array). @code{apply1()} uses @code{Fapply()} while the others use
@code{Ffuncall()} to do the real work.
-@node Dynamic Binding; The specbinding Stack; Unwind-Protects
+@node Dynamic Binding; The specbinding Stack; Unwind-Protects, Simple Special Forms, Evaluation, Evaluation; Stack Frames; Bindings
@section Dynamic Binding; The specbinding Stack; Unwind-Protects
@example
the symbol's value).
@end enumerate
-@node Simple Special Forms
+@node Simple Special Forms, Catch and Throw, Dynamic Binding; The specbinding Stack; Unwind-Protects, Evaluation; Stack Frames; Bindings
@section Simple Special Forms
@code{or}, @code{and}, @code{if}, @code{cond}, @code{progn},
@code{let} and @code{let*}) using @code{specbind()} to create bindings
and @code{unbind_to()} to undo the bindings when finished.
-Note that, with the exeption of @code{Fprogn}, these functions are
+Note that, with the exception of @code{Fprogn}, these functions are
typically called in real life only in interpreted code, since the byte
compiler knows how to convert calls to these functions directly into
byte code.
-@node Catch and Throw
+@node Catch and Throw, , Simple Special Forms, Evaluation; Stack Frames; Bindings
@section Catch and Throw
@example
* Symbol Values::
@end menu
-@node Introduction to Symbols
+@node Introduction to Symbols, Obarrays, Symbols and Variables, Symbols and Variables
@section Introduction to Symbols
A symbol is basically just an object with four fields: a name (a
additional values with particular names, and once again the namespace is
independent of the function and variable namespaces.
-@node Obarrays
+@node Obarrays, Symbol Values, Introduction to Symbols, Symbols and Variables
@section Obarrays
The identity of symbols with their names is accomplished through a
into any obarray.) Finally, @code{mapatoms} maps over all of the symbols
in an obarray.
-@node Symbol Values
+@node Symbol Values, , Obarrays, Symbols and Variables
@section Symbol Values
The value field of a symbol normally contains a Lisp object. However,
* The Buffer Object:: The Lisp object corresponding to a buffer.
@end menu
-@node Introduction to Buffers
+@node Introduction to Buffers, The Text in a Buffer, Buffers and Textual Representation, Buffers and Textual Representation
@section Introduction to Buffers
A buffer is logically just a Lisp object that holds some text.
window. (This latter distinction is explained in detail in the section
on windows.)
-@node The Text in a Buffer
+@node The Text in a Buffer, Buffer Lists, Introduction to Buffers, Buffers and Textual Representation
@section The Text in a Buffer
The text in a buffer consists of a sequence of zero or more
number of possible alternative representations (e.g. EUC-encoded text,
etc.).
-@node Buffer Lists
+@node Buffer Lists, Markers and Extents, The Text in a Buffer, Buffers and Textual Representation
@section Buffer Lists
Recall earlier that buffers are @dfn{permanent} objects, i.e. that
a unique name from this by appending a number, and then creates the
buffer. This is basically like the symbol operation @code{gensym}.
-@node Markers and Extents
+@node Markers and Extents, Bufbytes and Emchars, Buffer Lists, Buffers and Textual Representation
@section Markers and Extents
Among the things associated with a buffer are things that are
(which could happen as a result of text being deleted) or the buffer is
deleted, and primitives do exist to enumerate the extents in a buffer.
-@node Bufbytes and Emchars
+@node Bufbytes and Emchars, The Buffer Object, Markers and Extents, Buffers and Textual Representation
@section Bufbytes and Emchars
Not yet documented.
-@node The Buffer Object
+@node The Buffer Object, , Bufbytes and Emchars, Buffers and Textual Representation
@section The Buffer Object
Buffers contain fields not directly accessible by the Lisp programmer.
* CCL::
@end menu
-@node Character Sets
+@node Character Sets, Encodings, MULE Character Sets and Encodings, MULE Character Sets and Encodings
@section Character Sets
A character set (or @dfn{charset}) is an ordered set of characters. A
This is a bit ad-hoc but gets the job done.
-@node Encodings
+@node Encodings, Internal Mule Encodings, Character Sets, MULE Character Sets and Encodings
@section Encodings
An @dfn{encoding} is a way of numerically representing characters from
* JIS7::
@end menu
-@node Japanese EUC (Extended Unix Code)
+@node Japanese EUC (Extended Unix Code), JIS7, Encodings, Encodings
@subsection Japanese EUC (Extended Unix Code)
This encompasses the character sets Printing-ASCII, Japanese-JISX0201,
@end example
-@node JIS7
+@node JIS7, , Japanese EUC (Extended Unix Code), Encodings
@subsection JIS7
This encompasses the character sets Printing-ASCII,
Initially, Printing-ASCII is invoked.
-@node Internal Mule Encodings
+@node Internal Mule Encodings, CCL, Encodings, MULE Character Sets and Encodings
@section Internal Mule Encodings
In XEmacs/Mule, each character set is assigned a unique number, called a
* Internal Character Encoding::
@end menu
-@node Internal String Encoding
+@node Internal String Encoding, Internal Character Encoding, Internal Mule Encodings, Internal Mule Encodings
@subsection Internal String Encoding
ASCII characters are encoded using their position code directly. Other
Shift-JIS and Big5 (not yet described) satisfy only (2). (All
non-modal encodings must satisfy (2), in order to be unambiguous.)
-@node Internal Character Encoding
+@node Internal Character Encoding, , Internal String Encoding, Internal Mule Encodings
@subsection Internal Character Encoding
One 19-bit word represents a single character. The word is
Note that character codes 0 - 255 are the same as the ``binary encoding''
described above.
-@node CCL
+@node CCL, , Internal Mule Encodings, MULE Character Sets and Encodings
@section CCL
@example
* Lstream Methods:: Creating new lstream types.
@end menu
-@node Creating an Lstream
+@node Creating an Lstream, Lstream Types, Lstreams, Lstreams
@section Creating an Lstream
Lstreams come in different types, depending on what is being interfaced
Open for writing, but never writes partial MULE characters.
@end table
-@node Lstream Types
+@node Lstream Types, Lstream Functions, Creating an Lstream, Lstreams
@section Lstream Types
@table @asis
@item encoding
@end table
-@node Lstream Functions
+@node Lstream Functions, Lstream Methods, Lstream Types, Lstreams
@section Lstream Functions
-@deftypefun {Lstream *} Lstream_new (Lstream_implementation *@var{imp}, CONST char *@var{mode})
+@deftypefun {Lstream *} Lstream_new (Lstream_implementation *@var{imp}, const char *@var{mode})
Allocate and return a new Lstream. This function is not really meant to
be called directly; rather, each stream type should provide its own
stream creation function, which creates the stream and does any other
Rewind the stream to the beginning.
@end deftypefun
-@node Lstream Methods
+@node Lstream Methods, , Lstream Functions, Lstreams
@section Lstream Methods
@deftypefn {Lstream Method} ssize_t reader (Lstream *@var{stream}, unsigned char *@var{data}, size_t @var{size})
This function can be @code{NULL} if the stream is output-only.
@end deftypefn
-@deftypefn {Lstream Method} ssize_t writer (Lstream *@var{stream}, CONST unsigned char *@var{data}, size_t @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
* The Window Object::
@end menu
-@node Introduction to Consoles; Devices; Frames; Windows
+@node Introduction to Consoles; Devices; Frames; Windows, Point, Consoles; Devices; Frames; Windows, Consoles; Devices; Frames; Windows
@section Introduction to Consoles; Devices; Frames; Windows
A window-system window that you see on the screen is called a
@dfn{selected display}, @dfn{selected frame}, and @dfn{selected window}.
Each of these objects is distinguished in various ways, such as being the
default object for various functions that act on objects of that type.
-Note that every containing object rememembers the ``selected'' object
+Note that every containing object remembers the ``selected'' object
among the objects that it contains: e.g. not only is there a selected
window, but every frame remembers the last window in it that was
selected, and changing the selected frame causes the remembered window
within it to become the selected window. Similar relationships apply
for consoles to devices and devices to frames.
-@node Point
+@node Point, Window Hierarchy, Introduction to Consoles; Devices; Frames; Windows, Consoles; Devices; Frames; Windows
@section Point
Recall that every buffer has a current insertion position, called
buffer's point instead. This is related to why @code{save-window-excursion}
does not save the selected window's value of @code{point}.
-@node Window Hierarchy
+@node Window Hierarchy, The Window Object, Point, Consoles; Devices; Frames; Windows
@section Window Hierarchy
@cindex window hierarchy
@cindex hierarchy of windows
artifact that should be fixed.)
@end enumerate
-@node The Window Object
+@node The Window Object, , Window Hierarchy, Consoles; Devices; Frames; Windows
@section The Window Object
Windows have the following accessible fields:
* Redisplay Piece by Piece::
@end menu
-@node Critical Redisplay Sections
+@node Critical Redisplay Sections, Line Start Cache, The Redisplay Mechanism, The Redisplay Mechanism
@section Critical Redisplay Sections
@cindex critical redisplay sections
#### If a frame-size change does occur we should probably
actually be preempting redisplay.
-@node Line Start Cache
+@node Line Start Cache, Redisplay Piece by Piece, Critical Redisplay Sections, The Redisplay Mechanism
@section Line Start Cache
@cindex line start cache
In case you're wondering, the Second Golden Rule of Redisplay is not
applicable.
-@node Redisplay Piece by Piece
+@node Redisplay Piece by Piece, , Line Start Cache, The Redisplay Mechanism
@section Redisplay Piece by Piece
@cindex Redisplay Piece by Piece
@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
+Steps 1 and 2 are device-independent and relatively complex. Step 3 is
mostly device-dependent.
Determining the desired display
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
+The @code{display_line} structures are tightly 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
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.
+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
* Extent Ordering:: How extents are ordered internally.
* Format of the Extent Info:: The extent information in a buffer or string.
* Zero-Length Extents:: A weird special case.
-* Mathematics of Extent Ordering:: A rigorous foundation.
+* Mathematics of Extent Ordering:: A rigorous foundation.
* Extent Fragments:: Cached information useful for redisplay.
@end menu
-@node Introduction to Extents
+@node Introduction to Extents, Extent Ordering, Extents, Extents
@section Introduction to Extents
Extents are regions over a buffer, with a start and an end position
however, and just ended up complexifying and buggifying all the
rest of the code.)
-@node Extent Ordering
+@node Extent Ordering, Format of the Extent Info, Introduction to Extents, Extents
@section Extent Ordering
Extents are compared using memory indices. There are two orderings
all occurrences of ``display order'' and ``e-order'', ``less than'' and
``greater than'', and ``extent start'' and ``extent end''.
-@node Format of the Extent Info
+@node Format of the Extent Info, Zero-Length Extents, Extent Ordering, Extents
@section Format of the Extent Info
An extent-info structure consists of a list of the buffer or string's
array, except for the fact that positions are integers (this should be
generalized to handle integers and linked list equally well).
-@node Zero-Length Extents
+@node Zero-Length Extents, Mathematics of Extent Ordering, Format of the Extent Info, Extents
@section Zero-Length Extents
Extents can be zero-length, and will end up that way if their endpoints
exactly like markers and that open-closed, non-detachable zero-length
extents behave like the ``point-type'' marker in Mule.
-@node Mathematics of Extent Ordering
+@node Mathematics of Extent Ordering, Extent Fragments, Zero-Length Extents, Extents
@section Mathematics of Extent Ordering
@cindex extent mathematics
@cindex mathematics of extents
@math{S}, including @math{F}. Otherwise, @math{F2} includes @math{I}
and thus is in @math{S}, and thus @math{F2 >= F}.
-@node Extent Fragments
+@node Extent Fragments, , Mathematics of Extent Ordering, Extents
@section Extent Fragments
@cindex extent fragment
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 -
+to create image-instances for every displayable occurrence 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
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
+Unfortunately this also has hairy properties such as making the lwlib
code quite complex. And of course lwlib has to know at some level what
the widget is and how to set its properties.
or @code{nil} if it is using pipes.
@end table
-@node Interface to X Windows, Index, Subprocesses, Top
+@node Interface to X Windows, Index , Subprocesses, Top
@chapter Interface to X Windows
Not yet documented.
@c That's all
@bye
-
(@pxref{Backup Names}) is responsible for determining which backup
versions to delete, but does not delete them itself.
-@defopt trim-versions-without-asking
+@defopt delete-old-versions
If this variable is non-@code{nil}, then saving a file deletes excess
backup versions silently. Otherwise, it asks the user whether to delete
them.
@cindex frame
A @var{frame} is a rectangle on the screen that contains one or more
-XEmacs windows. A frame initially contains a single main window (plus
-perhaps a minibuffer window), which you can subdivide vertically or
-horizontally into smaller windows.
+XEmacs windows (@pxref{Windows}). A frame initially contains a single
+main window (plus perhaps an echo area), which you can subdivide
+vertically or horizontally into smaller windows. Each window is
+associated with a modeline (@pxref{Modeline Format}), and optionally two
+scrollbars (@pxref{Scrollbars}). By default the vertical scrollbar is
+on, the horizontal scrollbar is off.
+
+ The frame may also contain menubars (@pxref{Menubar}), toolbars
+(@pxref{Toolbar Intro}), and gutters (@pxref{Gutter Intro}). By default
+there is one of each at the top of the frame, with menubar topmost,
+toolbar next, and gutter lowest, immediately above the windows.
+(Warning: the gutter is a new, experimental, and unstable feature of
+XEmacs version 21.2.)
@cindex terminal frame
@cindex X window frame
@table @code
@item nothing
-(Don't display anything; no keywords are valid for this. Can only be
-instanced as @code{nothing}.)
+Don't display anything; no keywords are valid for this. Can only be
+instanced as @code{nothing}.
@item string
-(Display this image as a text string. Can only be instanced
+Display this image as a text string. Can only be instanced
as @code{text}, although support for instancing as @code{mono-pixmap}
-should be added.)
+should be added.
@item formatted-string
-(Display this image as a text string with replaceable fields,
-similar to a modeline format string; not currently implemented.)
+Display this image as a text string with replaceable fields,
+similar to a modeline format string; not currently implemented.
@item xbm
-(An X bitmap; only if X support was compiled into this XEmacs. Can be
+An X bitmap; only if X support was compiled into this XEmacs. Can be
instanced as @code{mono-pixmap}, @code{color-pixmap}, or
-@code{pointer}.)
+@code{pointer}.
@item xpm
-(An XPM pixmap; only if XPM support was compiled into this XEmacs. Can
+An XPM pixmap; only if XPM support was compiled into this XEmacs. Can
be instanced as @code{color-pixmap}, @code{mono-pixmap}, or
@code{pointer}. XPM is an add-on library for X that was designed to
rectify the shortcomings of the XBM format. Most implementations of X
include the XPM library as a standard part. If your vendor does not, it
is highly recommended that you download it and install it. You can get
-it from the standard XEmacs FTP site, among other places.)
+it from the standard XEmacs FTP site, among other places.
@item xface
-(An X-Face bitmap, used to encode people's faces in e-mail messages;
+An X-Face bitmap, used to encode people's faces in e-mail messages;
only if X-Face support was compiled into this XEmacs. Can be instanced
-as @code{mono-pixmap}, @code{color-pixmap}, or @code{pointer}.)
+as @code{mono-pixmap}, @code{color-pixmap}, or @code{pointer}.
@item gif
-(A GIF87 or GIF89 image; only if GIF support was compiled into this
+A GIF87 or GIF89 image; only if GIF support was compiled into this
XEmacs. Can be instanced as @code{color-pixmap}. Note that XEmacs
includes GIF decoding functions as a standard part of it, so if you have
X support, you will normally have GIF support, unless you explicitly
-disable it at configure time.)
+disable it at configure time.
@item jpeg
-(A JPEG-format image; only if JPEG support was compiled into this
+A JPEG-format image; only if JPEG support was compiled into this
XEmacs. Can be instanced as @code{color-pixmap}. If you have the JPEG
libraries present on your system when XEmacs is built, XEmacs will
automatically detect this and use them, unless you explicitly disable it
-at configure time.)
+at configure time.
@item png
-(A PNG/GIF24 image; only if PNG support was compiled into this XEmacs.
-Can be instanced as @code{color-pixmap}.)
+A PNG/GIF24 image; only if PNG support was compiled into this XEmacs.
+Can be instanced as @code{color-pixmap}.
@item tiff
-(A TIFF-format image; only if TIFF support was compiled into this XEmacs.
-Not currently implemented.)
+A TIFF-format image; only if TIFF support was compiled into this XEmacs.
@item cursor-font
-(One of the standard cursor-font names, such as @samp{watch} or
+One of the standard cursor-font names, such as @samp{watch} or
@samp{right_ptr} under X. Under X, this is, more specifically, any of
the standard cursor names from appendix B of the Xlib manual [also known
as the file @file{<X11/cursorfont.h>}] minus the @samp{XC_} prefix. On
other window systems, the valid names will be specific to the type of
-window system. Can only be instanced as @code{pointer}.)
+window system. Can only be instanced as @code{pointer}.
@item font
-(A glyph from a font; i.e. the name of a font, and glyph index into it
+A glyph from a font; i.e. the name of a font, and glyph index into it
of the form @samp{@var{font} fontname index [[mask-font] mask-index]}.
Only if X support was compiled into this XEmacs. Currently can only be
-instanced as @code{pointer}, although this should probably be fixed.)
+instanced as @code{pointer}, although this should probably be fixed.
@item subwindow
-(An embedded X window; not currently implemented.)
+An embedded X window; not currently implemented.
@item autodetect
-(XEmacs tries to guess what format the data is in. If X support exists,
+XEmacs tries to guess what format the data is in. If X support exists,
the data string will be checked to see if it names a filename. If so,
and this filename contains XBM or XPM data, the appropriate sort of
pixmap or pointer will be created. [This includes picking up any
is one of the allowable image-instance types and the string names a
valid cursor-font name, the image will be created as a pointer.
Otherwise, the image will be displayed as text. If no X support exists,
-the image will always be displayed as text.)
+the image will always be displayed as text.
@end table
The valid keywords are:
@table @code
@item :data
-(Inline data. For most formats above, this should be a string. For
+Inline data. For most formats above, this should be a string. For
XBM images, this should be a list of three elements: width, height, and
a string of bit data. This keyword is not valid for instantiator
-format @code{nothing}.)
+format @code{nothing}.
@item :file
-(Data is contained in a file. The value is the name of this file. If
+Data is contained in a file. The value is the name of this file. If
both @code{:data} and @code{:file} are specified, the image is created
from what is specified in @code{:data} and the string in @code{:file}
becomes the value of the @code{image-instance-file-name} function when
applied to the resulting image-instance. This keyword is not valid for
instantiator formats @code{nothing}, @code{string},
@code{formatted-string}, @code{cursor-font}, @code{font}, and
-@code{autodetect}.)
+@code{autodetect}.
@item :foreground
@itemx :background
-(For @code{xbm}, @code{xface}, @code{cursor-font}, and @code{font}.
+For @code{xbm}, @code{xface}, @code{cursor-font}, and @code{font}.
These keywords allow you to explicitly specify foreground and background
colors. The argument should be anything acceptable to
@code{make-color-instance}. This will cause what would be a
@code{mono-pixmap} to instead be colorized as a two-color color-pixmap,
and specifies the foreground and/or background colors for a pointer
-instead of black and white.)
+instead of black and white.
@item :mask-data
-(For @code{xbm} and @code{xface}. This specifies a mask to be used with the
+For @code{xbm} and @code{xface}. This specifies a mask to be used with the
bitmap. The format is a list of width, height, and bits, like for
-@code{:data}.)
+@code{:data}.
@item :mask-file
-(For @code{xbm} and @code{xface}. This specifies a file containing the
+For @code{xbm} and @code{xface}. This specifies a file containing the
mask data. If neither a mask file nor inline mask data is given for an
XBM image, and the XBM image comes from a file, XEmacs will look for a
mask file with the same name as the image file but with @samp{Mask} or
@samp{msk} appended. For example, if you specify the XBM file
@file{left_ptr} [usually located in @file{/usr/include/X11/bitmaps}],
the associated mask file @file{left_ptrmsk} will automatically be picked
-up.)
+up.
@item :hotspot-x
@itemx :hotspot-y
-(For @code{xbm} and @code{xface}. These keywords specify a hotspot if
+For @code{xbm} and @code{xface}. These keywords specify a hotspot if
the image is instantiated as a @code{pointer}. Note that if the XBM
image file specifies a hotspot, it will automatically be picked up if no
-explicit hotspot is given.)
+explicit hotspot is given.
@item :color-symbols
-(Only for @code{xpm}. This specifies an alist that maps strings that
+Only for @code{xpm}. This specifies an alist that maps strings that
specify symbolic color names to the actual color to be used for that
symbolic color (in the form of a string or a color-specifier object).
If this is not specified, the contents of @code{xpm-color-symbols} are
-used to generate the alist.)
+used to generate the alist.
@end table
If instead of a vector, the instantiator is a string, it will be
@c Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
@c See the file lispref.texi for copying conditions.
@setfilename ../../info/internationalization.info
-@node Internationalization, MULE, LDAP Support, top
+@node Internationalization, MULE, PostgreSQL Support, top
@chapter Internationalization
@menu
@c Copyright (C) 1998 Free Software Foundation, Inc.
@c See the file lispref.texi for copying conditions.
@setfilename ../../info/ldap.info
-@node LDAP Support, Internationalization, ToolTalk Support, top
+@node LDAP Support, PostgreSQL Support, ToolTalk Support, top
@chapter LDAP Support
@cindex LDAP
successfully built and tested with
@itemize @bullet
-@item OpenLDAP 1.0.3 (@url{http://www.openldap.org/})
+@item OpenLDAP 1.2 (@url{http://www.openldap.org/})
@item University of Michigan's LDAP 3.3 (@url{http://www.umich.edu/~dirsvcs/ldap/})
@item LDAP SDK 1.0 from Netscape Corp. (@url{http://developer.netscape.com/})
@end itemize
Other libraries conforming to RFC 1823 will probably work also but may
require some minor tweaking at C level.
-The standard XEmacs configure script autodetects an installed LDAP
+The standard XEmacs configure script auto-detects an installed LDAP
library provided the library itself and the corresponding header files
can be found in the library and include paths. A successful detection
will be signalled in the final output of the configure script.
higher-level layer which provides more convenient primitives to
effectively use LDAP.
-As of XEmacs 21.0, only interfaces to basic LDAP search functions are
-provided, broader support is planned in future versions.
+The low-level API should be used directly for very specific purposes
+(such as multiple operations on a connection) only. The higher-level
+functions provide a more convenient way to access LDAP directories
+hiding the subtleties of handling the connection, translating arguments
+and ensuring compliance with LDAP internationalization rules and formats
+(currently partly implemented only).
@menu
* LDAP Variables:: Lisp variables related to LDAP
* The High-Level LDAP API:: High-level LDAP lisp functions
* The Low-Level LDAP API:: Low-level LDAP lisp primitives
+* LDAP Internationalization:: I18n variables and functions
@end menu
@defvar ldap-default-base
Default base for LDAP searches.
This is a string using the syntax of RFC 1779.
-For instance, "o¬ME, cÿ" limits the search to the
+For instance, "o=ACME, c=US" limits the search to the
Acme organization in the United States.
@end defvar
@table @code
@item binddn
The distinguished name of the user to bind as. This may look like
-@samp{cÿ, o¬me, cnÿnny Bugs}, see RFC 1779 for details.
+@samp{cn=Babs Jensen,o=ACME,c=US}, see RFC 1779 for details.
@item passwd
The password to use for authentication.
@item auth
@end table
@end defvar
+@defvar ldap-verbose
+If non-@code{nil}, LDAP operations will echo progress messages. Defaults to @code{nil}.
+@end defvar
@node The High-Level LDAP API, The Low-Level LDAP API, LDAP Variables, XEmacs LDAP API
@comment node-name, next, previous, up
@subsection The High-Level LDAP API
-As of this writing the high-level Lisp LDAP API only provides for LDAP
-searches. Further support is planned in the future.
-
-The @code{ldap-search} function provides the most convenient interface
-to 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
-@pxref{The Low-Level LDAP API}
-
-@defun ldap-search filter &optional host attributes attrsonly
+The following functions provide the most convenient interface to perform
+LDAP operations. All of them open a connection to a host, perform an
+operation (add/search/modify/delete) on one or several entries and
+cleanly close the connection thus insulating the user from all the
+details of the low-level interface such as LDAP Lisp objects @pxref{The
+Low-Level LDAP API}.
+
+Note that @code{ldap-search} which used to be the name of the high-level
+search function in XEmacs 21.1 is now obsolete. For consistency in the
+naming as well as backward compatibility, that function now acts as a
+wrapper that calls either @code{ldap-search-basic} (low-level search
+function) or @code{ldap-search-entries} (high-level search function)
+according to the actual parameters. A direct call to one of these two
+functions is preferred since it is faster and unambiguous.
+
+@defun ldap-search-entries filter &optional host attributes attrsonly withdn
Perform an LDAP search.
@var{filter} is the search filter @pxref{Syntax of Search Filters}
-@var{host} is the LDAP host on which to perform the search
+@var{host} is the LDAP host on which to perform the search.
@var{attributes} is the specific attributes to retrieve, @code{nil} means
-retrieve all
+retrieve all.
@var{attrsonly} if non-@code{nil} retrieves the attributes only without
their associated values.
+If @var{withdn} is non-@code{nil} each entry in the result will be prepended with
+its distinguished name DN.
Additional search parameters can be specified through
@code{ldap-host-parameters-alist}.
+The function returns a list of matching entries. Each entry is itself
+an alist of attribute/value pairs optionally preceded by the DN of the
+entry according to the value of @var{withdn}.
+@end defun
+
+@defun ldap-add-entries entries &optional host binddn passwd
+Add entries to an LDAP directory. @var{entries} is a list of entry
+specifications of the form @code{(DN (ATTR . VALUE) (ATTR . VALUE) ...)}
+where @var{dn} the distinguished name of an entry to add, the following
+are cons cells containing attribute/value string pairs. @var{host} is
+the LDAP host, defaulting to `ldap-default-host' @var{binddn} is the DN
+to bind as to the server @var{passwd} is the corresponding password.
+@end defun
+
+@defun ldap-modify-entries entry-mods &optional host binddn passwd
+Modify entries of an LDAP directory.
+@var{entry_mods} is a list of entry modifications of the form
+@code{(DN MOD-SPEC1 MOD-SPEC2 ...)} where @var{dn} is the distinguished name of
+the entry to modify, the following are modification specifications.
+A modification specification is itself a list of the form
+@code{(MOD-OP ATTR VALUE1 VALUE2 ...)} @var{mod-op} and @var{attr} are mandatory,
+@var{values} are optional depending on @var{mod-op}.
+@var{mod-op} is the type of modification, one of the symbols @code{add}, @code{delete}
+or @code{replace}. @var{attr} is the LDAP attribute type to modify.
+@var{host} is the LDAP host, defaulting to @code{ldap-default-host}
+@var{binddn} is the DN to bind as to the server
+@var{passwd} is the corresponding password"
@end defun
-@node The Low-Level LDAP API, , The High-Level LDAP API, XEmacs LDAP API
+@defun ldap-delete-entries dn &optional host binddn passwd
+Delete an entry from an LDAP directory.
+@var{dn} is the distinguished name of an entry to delete or
+a list of those.
+@var{host} is the LDAP host, defaulting to @code{ldap-default-host}
+@var{binddn} is the DN to bind as to the server
+@var{passwd} is the corresponding password.
+@end defun
+
+
+@node The Low-Level LDAP API, LDAP Internationalization, The High-Level LDAP API, XEmacs LDAP API
@comment node-name, next, previous, up
@subsection The Low-Level LDAP API
+The low-level API should be used directly for very specific purposes
+(such as multiple operations on a connection) only. The higher-level
+functions provide a more convenient way to access LDAP directories
+hiding the subtleties of handling the connection, translating arguments
+and ensuring compliance with LDAP internationalization rules and formats
+(currently partly implemented only). See @pxref{The High-Level LDAP API}
+
+Note that the former functions @code{ldap-*-internal} functions have been
+renamed in XEmacs 21.2
+
@menu
* The LDAP Lisp Object::
* Opening and Closing a LDAP Connection::
-* Searching on a LDAP Server (Low-level)::
+* Low-level Operations on a LDAP Server::
@end menu
@node The LDAP Lisp Object, Opening and Closing a LDAP Connection, The Low-Level LDAP API, The Low-Level LDAP API
@end defun
-@node Opening and Closing a LDAP Connection, Searching on a LDAP Server (Low-level), The LDAP Lisp Object, The Low-Level LDAP API
+@node Opening and Closing a LDAP Connection, Low-level Operations on a LDAP Server, The LDAP Lisp Object, The Low-Level LDAP API
@comment node-name, next, previous, up
@subsubsection Opening and Closing a LDAP Connection
@code{krbv41} and @code{krbv42}.
@item binddn
The distinguished name of the user to bind as. This may look like
-@samp{cÿ, o¬me, cnÿnny Bugs}, see RFC 1779 for details.
+@samp{c=com, o=Acme, cn=Babs Jensen}, see RFC 1779 for details.
@item passwd
The password to use for authentication.
@item deref
@end defun
-@node Searching on a LDAP Server (Low-level), , Opening and Closing a LDAP Connection, The Low-Level LDAP API
+@node Low-level Operations on a LDAP Server, , Opening and Closing a LDAP Connection, The Low-Level LDAP API
@comment node-name, next, previous, up
-@subsubsection Searching on a LDAP Server (Low-level)
+@subsubsection Low-level Operations on a LDAP Server
-@code{ldap-search-internal} is the low-level primitive to perform a
+@code{ldap-search-basic} is the low-level primitive to perform a
search on a LDAP server. It works directly on an open LDAP connection
thus requiring a preliminary call to @code{ldap-open}. Multiple
searches can be made on the same connection, then the session must be
closed with @code{ldap-close}.
-
-@defun ldap-search-internal ldap filter base scope attrs attrsonly
+@defun ldap-search-basic ldap filter base scope attrs attrsonly
Perform a search on an open connection @var{ldap} created with @code{ldap-open}.
@var{filter} is a filter string for the search @pxref{Syntax of Search Filters}
@var{base} is the distinguished name at which to start the search.
for each matching entry. If @code{nil} all available attributes are returned.
If @code{attrsonly} is non-@code{nil} then only the attributes are retrieved, not
their associated values
-The function returns a list of matching entries. Each entry being itself
-an alist of attribute/values.
+If @code{withdn} is non-@code{nil} then each entry in the result is prepended with
+its distinguished name DN
+If @code{verbose} is non-@code{nil} then progress messages are echoed
+The function returns a list of matching entries. Each entry is itself
+an alist of attribute/value pairs optionally preceded by the DN of the
+entry according to the value of @code{withdn}.
+@end defun
+
+@defun ldap-add ldap dn entry
+Add @var{entry} to a LDAP directory which a connection @var{ldap} has
+been opened to with @code{ldap-open}.
+@var{dn} is the distinguished name of the entry to add.
+@var{entry} is an entry specification, i.e., a list of cons cells
+containing attribute/value string pairs.
+@end defun
+
+@defun ldap-modify ldap dn mods
+Modify an entry in an LDAP directory.
+@var{ldap} is an LDAP connection object created with @code{ldap-open}.
+@var{dn} is the distinguished name of the entry to modify.
+@var{mods} is a list of modifications to apply.
+A modification is a list of the form @code{(MOD-OP ATTR VALUE1 VALUE2 ...)}
+@var{mod-op} and @var{attr} are mandatory, @var{values} are optional depending on @var{mod-op}.
+@var{mod-op} is the type of modification, one of the symbols @code{add}, @code{delete}
+or @code{replace}. @var{attr} is the LDAP attribute type to modify
+@end defun
+
+@defun ldap-delete ldap dn
+Delete an entry to an LDAP directory.
+@var{ldap} is an LDAP connection object created with @code{ldap-open}.
+@var{dn} is the distinguished name of the entry to delete
+@end defun
+
+
+
+@node LDAP Internationalization, , The Low-Level LDAP API, XEmacs LDAP API
+@comment node-name, next, previous, up
+@subsection LDAP Internationalization
+
+The XEmacs LDAP API provides basic internationalization features based
+on the LDAP v3 specification (essentially RFC2252 on "LDAP v3 Attribute
+Syntax Definitions"). Unfortunately since there is currently no free
+LDAP v3 server software, this part has not received much testing and
+should be considered experimental. The framework is in place though.
+
+@defun ldap-decode-attribute attr
+Decode the attribute/value pair @var{attr} according to LDAP rules.
+The attribute name is looked up in @code{ldap-attribute-syntaxes-alist}
+and the corresponding decoder is then retrieved from
+@code{ldap-attribute-syntax-decoders}' and applied on the value(s).
+@end defun
+
+@menu
+* LDAP Internationalization Variables::
+* Encoder/Decoder Functions::
+@end menu
+
+@node LDAP Internationalization Variables, Encoder/Decoder Functions, LDAP Internationalization, LDAP Internationalization
+@comment node-name, next, previous, up
+@subsubsection LDAP Internationalization Variables
+
+@defvar ldap-ignore-attribute-codings
+If non-@code{nil}, no encoding/decoding will be performed LDAP attribute values
+@end defvar
+
+@defvar ldap-coding-system
+Coding system of LDAP string values.
+LDAP v3 specifies the coding system of strings to be UTF-8.
+You need an XEmacs with Mule support for this.
+@end defvar
+
+@defvar ldap-default-attribute-decoder
+Decoder function to use for attributes whose syntax is unknown. Such a
+function receives an encoded attribute value as a string and should
+return the decoded value as a string
+@end defvar
+
+@defvar ldap-attribute-syntax-encoders
+A vector of functions used to encode LDAP attribute values.
+The sequence of functions corresponds to the sequence of LDAP attribute syntax
+object identifiers of the form 1.3.6.1.4.1.1466.1115.121.1.* as defined in
+RFC2252 section 4.3.2. As of this writing, only a few encoder functions
+are available.
+@end defvar
+
+@defvar ldap-attribute-syntax-decoders
+A vector of functions used to decode LDAP attribute values.
+The sequence of functions corresponds to the sequence of LDAP attribute syntax
+object identifiers of the form 1.3.6.1.4.1.1466.1115.121.1.* as defined in
+RFC2252 section 4.3.2. As of this writing, only a few decoder functions
+are available.
+@end defvar
+
+@defvar ldap-attribute-syntaxes-alist
+A map of LDAP attribute names to their type object id minor number.
+This table is built from RFC2252 Section 5 and RFC2256 Section 5
+@end defvar
+
+@node Encoder/Decoder Functions, , LDAP Internationalization Variables, LDAP Internationalization
+@comment node-name, next, previous, up
+@subsubsection Encoder/Decoder Functions
+
+@defun ldap-encode-boolean bool
+A function that encodes an elisp boolean @var{bool} into a LDAP
+boolean string representation
+@end defun
+
+@defun ldap-decode-boolean str
+A function that decodes a LDAP boolean string representation
+@var{str} into an elisp boolean
+@end defun
+
+@defun ldap-decode-string str
+Decode a string @var{str} according to `ldap-coding-system'
@end defun
+@defun ldap-encode-string str
+Encode a string @var{str} according to `ldap-coding-system'
+@end defun
+
+@defun ldap-decode-address str
+Decode an address @var{str} according to `ldap-coding-system' and
+replacing $ signs with newlines as specified by LDAP encoding rules for
+addresses
+@end defun
+@defun ldap-encode-address str
+Encode an address @var{str} according to `ldap-coding-system' and
+replacing newlines with $ signs as specified by LDAP encoding rules for
+addresses
+@end defun
matches records of class @code{Person} containing a @code{mail}
attribute and corresponding to people whose last name is @code{Smith} or
whose first name is @code{John}.
-
-
-
* Menus:: Defining pull-down and pop-up menus.
* Dialog Boxes:: Creating dialog boxes.
* Toolbar:: Controlling the toolbar.
+* Gutter:: Controlling the gutter.
* Scrollbars:: Controlling the scrollbars.
* Drag and Drop:: Generic API to inter-application communication
via specific protocols.
* ToolTalk Support:: Interfacing with the ToolTalk message service.
* LDAP Support:: Interfacing with the Lightweight Directory
Access Protocol.
+* PostgreSQL Support:: Interfacing to the PostgreSQL libpq library.
* Internationalization:: How Emacs supports different languages and
cultural conventions.
* MULE:: Specifics of the Asian-language support.
* Specifying the Toolbar:: Setting a toolbar.
* Other Toolbar Variables:: Controlling the size of toolbars.
+Gutter
+
Scrollbars
Major and Minor Modes
* LDAP Variables:: Lisp variables related to LDAP
* The High-Level LDAP API:: High-level LDAP lisp functions
* The Low-Level LDAP API:: Low-level LDAP lisp primitives
+* LDAP Internationalization:: I18n variables and functions
The Low-Level LDAP API
* The LDAP Lisp Object::
* Opening and Closing a LDAP Connection::
-* Searching on a LDAP Server (Low-level)::
+* Low-level Operations on a LDAP Server::
+
+LDAP Internationalization
+
+* LDAP Internationalization Variables::
+* Encoder/Decoder Functions::
Internationalization
@include menus.texi
@include dialog.texi
@include toolbar.texi
+@include gutter.texi
@include scrollbars.texi
@include dragndrop.texi
@include modes.texi
@include x-windows.texi
@include tooltalk.texi
@include ldap.texi
+@include postgresql.texi
@include internationalization.texi
@include mule.texi
default value, @var{initial-contents} may be preferred.
@end defun
-@defun read-string prompt &optional initial history
+@defun read-string prompt &optional initial history default-value
This function reads a string from the minibuffer and returns it. The
arguments @var{prompt} and @var{initial} are used as in
@code{read-from-minibuffer}. The keymap used is
@code{minibuffer-local-map}.
The optional argument @var{history}, if non-nil, specifies a history
-list and optionally the initial position in the list.
+list and optionally the initial position in the list. The optional
+argument @var{default} specifies a default value to return if the user
+enters null input; it should be a string.
This function is a simplified interface to the
@code{read-from-minibuffer} function:
@smallexample
@group
-(read-string @var{prompt} @var{initial})
+(read-string @var{prompt} @var{initial} @var{history} @var{default})
@equiv{}
-(read-from-minibuffer @var{prompt} @var{initial} nil nil nil)
+(read-from-minibuffer @var{prompt} @var{initial} nil nil
+ @var{history} nil @var{default})))
@end group
@end smallexample
@end defun
This section describes functions for reading Lisp objects with the
minibuffer.
-@defun read-minibuffer prompt &optional initial
+@defun read-expression prompt &optional initial history default-value
This function reads a Lisp object using the minibuffer, and returns it
without evaluating it. The arguments @var{prompt} and @var{initial} are
used as in @code{read-from-minibuffer}.
+The optional argument @var{history}, if non-nil, specifies a history
+list and optionally the initial position in the list. The optional
+argument @var{default-value} specifies a default value to return if the
+user enters null input; it should be a string.
+
This is a simplified interface to the
@code{read-from-minibuffer} function:
@smallexample
@group
-(read-minibuffer @var{prompt} @var{initial})
+(read-expression @var{prompt} @var{initial} @var{history} @var{default-value})
@equiv{}
-(read-from-minibuffer @var{prompt} @var{initial} nil t)
+(read-from-minibuffer @var{prompt} @var{initial} nil t
+ @var{history} nil @var{default-value})
@end group
@end smallexample
@smallexample
@group
-(read-minibuffer
+(read-expression
"Enter an expression: " (format "%s" '(testing)))
;; @r{Here is how the minibuffer is displayed:}
default, or can edit the input.
@end defun
-@defun eval-minibuffer prompt &optional initial
+@defun read-minibuffer prompt &optional initial history default-value
+
+This is a FSF Emacs compatible function. Use @code{read-expression}
+instead.
+@end defun
+
+@defun eval-minibuffer prompt &optional initial history default-value
This function reads a Lisp expression using the minibuffer, evaluates
it, then returns the result. The arguments @var{prompt} and
@var{initial} are used as in @code{read-from-minibuffer}.
+The optional argument @var{history}, if non-nil, specifies a history
+list and optionally the initial position in the list. The optional
+argument @var{default-value} specifies a default value to return if the
+user enters null input; it should be a string.
+
This function simply evaluates the result of a call to
-@code{read-minibuffer}:
+@code{read-expression}:
@smallexample
@group
(eval-minibuffer @var{prompt} @var{initial})
@equiv{}
-(eval (read-minibuffer @var{prompt} @var{initial}))
+(eval (read-expression @var{prompt} @var{initial}))
@end group
@end smallexample
@end defun
-@defun edit-and-eval-command prompt form
+@defun edit-and-eval-command prompt command &optional history
This function reads a Lisp expression in the minibuffer, and then
evaluates it. The difference between this command and
-@code{eval-minibuffer} is that here the initial @var{form} is not
+@code{eval-minibuffer} is that here the initial @var{command} is not
optional and it is treated as a Lisp object to be converted to printed
representation rather than as a string of text. It is printed with
@code{prin1}, so if it is a string, double-quote characters (@samp{"})
is included in @var{collection}.
The function @code{completing-read} works by calling
-@code{read-minibuffer}. It uses @code{minibuffer-local-completion-map}
+@code{read-expression}. It uses @code{minibuffer-local-completion-map}
as the keymap if @var{require-match} is @code{nil}, and uses
@code{minibuffer-local-must-match-map} if @var{require-match} is
non-@code{nil}. @xref{Completion Commands}.
@samp{*Completions*}.
@end deffn
-@defun display-completion-list completions
+@defun display-completion-list completions &rest cl-keys
This function displays @var{completions} to the stream in
@code{standard-output}, usually a buffer. (@xref{Read and Print}, for more
information about streams.) The argument @var{completions} is normally
@end example
@end defun
-@defun read-command prompt
+@defun read-command prompt &optinal default-value
This function reads the name of a command and returns it as a Lisp
symbol. The argument @var{prompt} is used as in
@code{read-from-minibuffer}. Recall that a command is anything for
which @code{commandp} returns @code{t}, and a command name is a symbol
for which @code{commandp} returns @code{t}. @xref{Interactive Call}.
+The argument @var{default-value} specifies what to return if the user
+enters null input. It can be a symbol or a string; if it is a string,
+@code{read-command} interns it before returning it. If @var{default} is
+@code{nil}, that means no default has been specified; then if the user
+enters null input, the return value is @code{nil}.
+
@example
(read-command "Command name? ")
@end example
@end defun
-@defun read-variable prompt
+@defun read-variable prompt &optional default-value
This function reads the name of a user variable and returns it as a
symbol.
+The argument @var{default-value} specifies what to return if the user
+enters null input. It can be a symbol or a string; if it is a string,
+@code{read-variable} interns it before returning it. If @var{default}
+is @code{nil}, that means no default has been specified; then if the
+user enters null input, the return value is @code{nil}.
+
@example
@group
(read-variable "Variable name? ")
file name. It provides special features including automatic insertion
of the default directory.
-@defun read-file-name prompt &optional directory default existing initial
+@defun read-file-name prompt &optional directory default existing initial history
This function reads a file name in the minibuffer, prompting with
@var{prompt} and providing completion. If @var{default} is
non-@code{nil}, then the function returns @var{default} if the user just
@node MULE, Tips, Internationalization, top
@chapter MULE
-@dfn{MULE} is the name originally given to the version of GNU Emacs
+ @dfn{MULE} is the name originally given to the version of GNU Emacs
extended for multi-lingual (and in particular Asian-language) support.
-``MULE'' is short for ``MUlti-Lingual Emacs''. It was originally called
-Nemacs (``Nihon Emacs'' where ``Nihon'' is the Japanese word for
-``Japan''), when it only provided support for Japanese. XEmacs
-refers to its multi-lingual support as @dfn{MULE support} since it
-is based on @dfn{MULE}.
+``MULE'' is short for ``MUlti-Lingual Emacs''. It is an extension and
+complete rewrite of Nemacs (``Nihon Emacs'' where ``Nihon'' is the
+Japanese word for ``Japan''), which only provided support for Japanese.
+XEmacs refers to its multi-lingual support as @dfn{MULE support} since
+it is based on @dfn{MULE}.
@menu
* Internationalization Terminology::
* Charsets:: Sets of related characters.
* MULE Characters:: Working with characters in XEmacs/MULE.
* Composite Characters:: Making new characters by overstriking other ones.
-* ISO 2022:: An international standard for charsets and encodings.
* Coding Systems:: Ways of representing a string of chars using integers.
* CCL:: A special language for writing fast converters.
* Category Tables:: Subdividing charsets into groups.
@end menu
-@node Internationalization Terminology
+@node Internationalization Terminology, Charsets, , MULE
@section Internationalization Terminology
- In internationalization terminology, a string of text is divided up
+ In internationalization terminology, a string of text is divided up
into @dfn{characters}, which are the printable units that make up the
text. A single character is (for example) a capital @samp{A}, the
-number @samp{2}, a Katakana character, a Kanji ideograph (an
-@dfn{ideograph} is a ``picture'' character, such as is used in Japanese
-Kanji, Chinese Hanzi, and Korean Hangul; typically there are thousands
-of such ideographs in each language), etc. The basic property of a
-character is its shape. Note that the same character may be drawn by
-two different people (or in two different fonts) in slightly different
-ways, although the basic shape will be the same.
+number @samp{2}, a Katakana character, a Hangul character, a Kanji
+ideograph (an @dfn{ideograph} is a ``picture'' character, such as is
+used in Japanese Kanji, Chinese Hanzi, and Korean Hanja; typically there
+are thousands of such ideographs in each language), etc. The basic
+property of a character is that it is the smallest unit of text with
+semantic significance in text processing.
+
+ Human beings normally process text visually, so to a first approximation
+a character may be identified with its shape. Note that the same
+character may be drawn by two different people (or in two different
+fonts) in slightly different ways, although the "basic shape" will be the
+same. But consider the works of Scott Kim; human beings can recognize
+hugely variant shapes as the "same" character. Sometimes, especially
+where characters are extremely complicated to write, completely
+different shapes may be defined as the "same" character in national
+standards. The Taiwanese variant of Hanzi is generally the most
+complicated; over the centuries, the Japanese, Koreans, and the People's
+Republic of China have adopted simplifications of the shape, but the
+line of descent from the original shape is recorded, and the meanings
+and pronunciation of different forms of the same character are
+considered to be identical within each language. (Of course, it may
+take a specialist to recognize the related form; the point is that the
+relations are standardized, despite the differing shapes.)
In some cases, the differences will be significant enough that it is
actually possible to identify two or more distinct shapes that both
Note that @dfn{character} and @dfn{glyph} are used differently
here than elsewhere in XEmacs.
- A @dfn{character set} is simply a set of related characters. ASCII,
+ A @dfn{character set} is essentially a set of related characters. ASCII,
for example, is a set of 94 characters (or 128, if you count
non-printing characters). Other character sets are ISO8859-1 (ASCII
plus various accented characters and other international symbols),
-JISX0201 (ASCII, more or less, plus half-width Katakana), JISX0208
-(Japanese Kanji), JISX0212 (a second set of less-used Japanese Kanji),
+JIS X 0201 (ASCII, more or less, plus half-width Katakana), JIS X 0208
+(Japanese Kanji), JIS X 0212 (a second set of less-used Japanese Kanji),
GB2312 (Mainland Chinese Hanzi), etc.
- Every character set has one or more @dfn{orderings}, which can be
-viewed as a way of assigning a number (or set of numbers) to each
-character in the set. For most character sets, there is a standard
-ordering, and in fact all of the character sets mentioned above define a
-particular ordering. ASCII, for example, places letters in their
-``natural'' order, puts uppercase letters before lowercase letters,
-numbers before letters, etc. Note that for many of the Asian character
-sets, there is no natural ordering of the characters. The actual
-orderings are based on one or more salient characteristic, of which
-there are many to choose from---e.g. number of strokes, common
-radicals, phonetic ordering, etc.
-
- The set of numbers assigned to any particular character are called
-the character's @dfn{position codes}. The number of position codes
-required to index a particular character in a character set is called
-the @dfn{dimension} of the character set. ASCII, being a relatively
-small character set, is of dimension one, and each character in the
-set is indexed using a single position code, in the range 0 through
-127 (if non-printing characters are included) or 33 through 126
-(if only the printing characters are considered). JISX0208, i.e.
-Japanese Kanji, has thousands of characters, and is of dimension two --
-every character is indexed by two position codes, each in the range
-33 through 126. (Note that the choice of the range here is somewhat
-arbitrary. Although a character set such as JISX0208 defines an
-@emph{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 through 95, etc. The reason for the actual range
-chosen is so that the position codes match up with the actual values
-used in the common encodings.)
+ The definition of a character set will implicitly or explicitly give
+it an @dfn{ordering}, a way of assigning a number to each character in
+the set. For many character sets, there is a natural ordering, for
+example the ``ABC'' ordering of the Roman letters. But it is not clear
+whether digits should come before or after the letters, and in fact
+different European languages treat the ordering of accented characters
+differently. It is useful to use the natural order where available, of
+course. The number assigned to any particular character is called the
+character's @dfn{code point}. (Within a given character set, each
+character has a unique code point. Thus the word "set" is ill-chosen;
+different orderings of the same characters are different character sets.
+Identifying characters is simple enough for alphabetic character sets,
+but the difference in ordering can cause great headaches when the same
+thousands of characters are used by different cultures as in the Hanzi.)
+
+ A code point may be broken into a number of @dfn{position codes}. The
+number of position codes required to index a particular character in a
+character set is called the @dfn{dimension} of the character set. For
+practical purposes, a position code may be thought of as a byte-sized
+index. The printing characters of ASCII, being a relatively small
+character set, is of dimension one, and each character in the set is
+indexed using a single position code, in the range 1 through 94. Use of
+this unusual range, rather than the familiar 33 through 126, is an
+intentional abstraction; to understand the programming issues you must
+break the equation between character sets and encodings.
+
+ JIS X 0208, i.e. Japanese Kanji, has thousands of characters, and is
+of dimension two -- every character is indexed by two position codes,
+each in the range 1 through 94. (This number ``94'' is not a
+coincidence; we shall see that the JIS position codes were chosen so
+that JIS kanji could be encoded without using codes that in ASCII are
+associated with device control functions.) Note that the choice of the
+range here is somewhat arbitrary. You could just as easily index the
+printing characters in ASCII using numbers in the range 0 through 93, 2
+through 95, 3 through 96, etc. In fact, the standardized
+@emph{encoding} for the ASCII @emph{character set} uses the range 33
+through 126.
An @dfn{encoding} is a way of numerically representing characters from
one or more character sets into a stream of like-sized numerical values
called @dfn{words}; typically these are 8-bit, 16-bit, or 32-bit
quantities. If an encoding encompasses only one character set, then the
position codes for the characters in that character set could be used
-directly. (This is the case with ASCII, and as a result, most people do
-not understand the difference between a character set and an encoding.)
-This is not possible, however, if more than one character set is to be
-used in the encoding. For example, printed Japanese text typically
-requires characters from multiple character sets---ASCII, JISX0208, and
-JISX0212, to be specific. Each of these is indexed using one or more
-position codes in the range 33 through 126, so the position codes could
-not be used directly or there would be no way to tell which character
-was meant. Different Japanese encodings handle this differently---JIS
-uses special escape characters to denote different character sets; EUC
-sets the high bit of the position codes for JISX0208 and JISX0212, and
-puts a special extra byte before each JISX0212 character; etc. (JIS,
-EUC, and most of the other encodings you will encounter are 7-bit or
-8-bit encodings. There is one common 16-bit encoding, which is Unicode;
-this strives to represent all the world's characters in a single large
-character set. 32-bit encodings are generally used internally in
-programs to simplify the code that manipulates them; however, they are
-not much used externally because they are not very space-efficient.)
+directly. (This is the case with the trivial cipher used by children,
+assigning 1 to `A', 2 to `B', and so on.) However, even with ASCII,
+other considerations intrude. For example, why are the upper- and
+lowercase alphabets separated by 8 characters? Why do the digits start
+with `0' being assigned the code 48? In both cases because semantically
+interesting operations (case conversion and numerical value extraction)
+become convenient masking operations. Other artificial aspects (the
+control characters being assigned to codes 0--31 and 127) are historical
+accidents. (The use of 127 for @samp{DEL} is an artifact of the "punch
+once" nature of paper tape, for example.)
+
+ Naive use of the position code is not possible, however, if more than
+one character set is to be used in the encoding. For example, printed
+Japanese text typically requires characters from multiple character sets
+-- ASCII, JIS X 0208, and JIS X 0212, to be specific. Each of these is
+indexed using one or more position codes in the range 1 through 94, so
+the position codes could not be used directly or there would be no way
+to tell which character was meant. Different Japanese encodings handle
+this differently -- JIS uses special escape characters to denote
+different character sets; EUC sets the high bit of the position codes
+for JIS X 0208 and JIS X 0212, and puts a special extra byte before each
+JIS X 0212 character; etc. (JIS, EUC, and most of the other encodings
+you will encounter in files are 7-bit or 8-bit encodings. There is one
+common 16-bit encoding, which is Unicode; this strives to represent all
+the world's characters in a single large character set. 32-bit
+encodings are often used internally in programs, such as XEmacs with
+MULE support, to simplify the code that manipulates them; however, they
+are not used externally because they are not very space-efficient.)
+
+ A general method of handling text using multiple character sets
+(whether for multilingual text, or simply text in an extremely
+complicated single language like Japanese) is defined in the
+international standard ISO 2022. ISO 2022 will be discussed in more
+detail later (@pxref{ISO 2022}), but for now suffice it to say that text
+needs control functions (at least spacing), and if escape sequences are
+to be used, an escape sequence introducer. It was decided to make all
+text streams compatible with ASCII in the sense that the codes 0--31
+(and 128-159) would always be control codes, never graphic characters,
+and where defined by the character set the @samp{SPC} character would be
+assigned code 32, and @samp{DEL} would be assigned 127. Thus there are
+94 code points remaining if 7 bits are used. This is the reason that
+most character sets are defined using position codes in the range 1
+through 94. Then ISO 2022 compatible encodings are produced by shifting
+the position codes 1 to 94 into character codes 33 to 126, or (if 8 bit
+codes are available) into character codes 161 to 254.
Encodings are classified as either @dfn{modal} or @dfn{non-modal}. In
-a @dfn{modal encoding}, there are multiple states that the encoding can be in,
-and the interpretation of the values in the stream depends on the
+a @dfn{modal encoding}, there are multiple states that the encoding can
+be in, and the interpretation of the values in the stream depends on the
current global state of the encoding. Special values in the encoding,
called @dfn{escape sequences}, are used to change the global state.
JIS, for example, is a modal encoding. The bytes @samp{ESC $ B}
indicate that, from then on, bytes are to be interpreted as position
-codes for JISX0208, rather than as ASCII. This effect is cancelled
+codes for JIS X 0208, rather than as ASCII. This effect is cancelled
using the bytes @samp{ESC ( B}, which mean ``switch from whatever the
-current state is to ASCII''. To switch to JISX0212, the escape sequence
-@samp{ESC $ ( D}. (Note that here, as is common, the escape sequences do
-in fact begin with @samp{ESC}. This is not necessarily the case,
-however.)
+current state is to ASCII''. To switch to JIS X 0212, the escape
+sequence @samp{ESC $ ( D}. (Note that here, as is common, the escape
+sequences do in fact begin with @samp{ESC}. This is not necessarily the
+case, however. Some encodings use control characters called "locking
+shifts" (effect persists until cancelled) to switch character sets.)
-A @dfn{non-modal encoding} has no global state that extends past the
+ A @dfn{non-modal encoding} has no global state that extends past the
character currently being interpreted. EUC, for example, is a
-non-modal encoding. Characters in JISX0208 are encoded by setting
-the high bit of the position codes, and characters in JISX0212 are
+non-modal encoding. Characters in JIS X 0208 are encoded by setting
+the high bit of the position codes, and characters in JIS X 0212 are
encoded by doing the same but also prefixing the character with the
byte 0x8F.
if it is not being processed in a sequential manner. In the non-modal
EUC encoding, for example, the byte 0x41 always refers to the letter
@samp{A}; whereas in JIS, it could either be the letter @samp{A}, or
-one of the two position codes in a JISX0208 character, or one of the
-two position codes in a JISX0212 character. Determining exactly which
+one of the two position codes in a JIS X 0208 character, or one of the
+two position codes in a JIS X 0212 character. Determining exactly which
one is meant could be difficult and time-consuming if the previous
-bytes in the string have not already been processed.
+bytes in the string have not already been processed, or impossible if
+they are drawn from an external stream that cannot be rewound.
Non-modal encodings are further divided into @dfn{fixed-width} and
@dfn{variable-width} formats. A fixed-width encoding always uses
an encoding with a larger word size. The advantages of fixed-width
encodings should be obvious. The advantages of variable-width
encodings are that they are generally more space-efficient and allow
-for compatibility with existing 8-bit encodings such as ASCII.
-
- Note that the bytes in an 8-bit encoding are often referred to
-as @dfn{octets} rather than simply as bytes. This terminology
-dates back to the days before 8-bit bytes were universal, when
-some computers had 9-bit bytes, others had 10-bit bytes, etc.
-
-@node Charsets
+for compatibility with existing 8-bit encodings such as ASCII. (For
+example, in Unicode ASCII characters are simply promoted to a 16-bit
+representation. That means that every ASCII character contains a
+@samp{NUL} byte; evidently all of the standard string manipulation
+functions will lose badly in a fixed-width Unicode environment.)
+
+ The bytes in an 8-bit encoding are often referred to as @dfn{octets}
+rather than simply as bytes. This terminology dates back to the days
+before 8-bit bytes were universal, when some computers had 9-bit bytes,
+others had 10-bit bytes, etc.
+
+@node Charsets, MULE Characters, Internationalization Terminology, MULE
@section Charsets
A @dfn{charset} in MULE is an object that encapsulates a
* Predefined Charsets:: Predefined charset objects.
@end menu
-@node Charset Properties
+@node Charset Properties, Basic Charset Functions, , Charsets
@subsection Charset Properties
Charsets have the following properties:
then passed through the CCL program, with the resulting values used
to index the font.
-This is used, for example, in the Big5 character set (used in Taiwan).
+ This is used, for example, in the Big5 character set (used in Taiwan).
This character set is not ISO-2022-compliant, and its size (94x157) does
not fit within the maximum 96x96 size of ISO-2022-compliant character
sets. As a result, XEmacs/MULE splits it (in a rather complex fashion,
from a Big5 font.
@end table
-Most of the above properties can only be changed when the charset
-is created. @xref{Charset Property Functions}.
+ Most of the above properties can only be set when the charset is
+initialized, and cannot be changed later.
+@xref{Charset Property Functions}.
-@node Basic Charset Functions
+@node Basic Charset Functions, Charset Property Functions, Charset Properties, Charsets
@subsection Basic Charset Functions
@defun find-charset charset-or-name
@defun make-charset name doc-string props
This function defines a new character set. This function is for use
-with Mule support. @var{name} is a symbol, the name by which the
+with MULE support. @var{name} is a symbol, the name by which the
character set is normally referred. @var{doc-string} is a string
describing the character set. @var{props} is a property list,
describing the specific nature of the character set. The recognized
displayed in the opposite direction.
@end defun
-@node Charset Property Functions
+@node Charset Property Functions, Predefined Charsets, Basic Charset Functions, Charsets
@subsection Charset Property Functions
-All of these functions accept either a charset name or charset object.
+ All of these functions accept either a charset name or charset object.
@defun charset-property charset prop
This function returns property @var{prop} of @var{charset}.
@xref{Charset Properties}.
@end defun
-Convenience functions are also provided for retrieving individual
+ Convenience functions are also provided for retrieving individual
properties of a charset.
@defun charset-name charset
position codes of characters in @var{charset} into font indices.
@end defun
-The only property of a charset that can currently be set after
+ The only property of a charset that can currently be set after
the charset has been created is the CCL program.
@defun set-charset-ccl-program charset ccl-program
@var{ccl-program}.
@end defun
-@node Predefined Charsets
+@node Predefined Charsets, , Charset Property Functions, Charsets
@subsection Predefined Charsets
-The following charsets are predefined in the C code.
+ The following charsets are predefined in the C code.
@example
Name Type Fi Gr Dir Registry
composite 96x96 0 l2r ---
@end example
-The following charsets are predefined in the Lisp code.
+ The following charsets are predefined in the Lisp code.
@example
Name Type Fi Gr Dir Registry
For all of the above charsets, the dimension and number of columns are
the same.
-Note that ASCII, Control-1, and Composite are handled specially.
+ Note that ASCII, Control-1, and Composite are handled specially.
This is why some of the fields are blank; and some of the filled-in
fields (e.g. the type) are not really accurate.
-@node MULE Characters
+@node MULE Characters, Composite Characters, Charsets, MULE
@section MULE Characters
@defun make-char charset arg1 &optional arg2
This function returns a list of the charsets in @var{string}.
@end defun
-@node Composite Characters
+@node Composite Characters, Coding Systems, MULE Characters, MULE
@section Composite Characters
-Composite characters are not yet completely implemented.
+ Composite characters are not yet completely implemented.
@defun make-composite-char string
This function converts a string into a single composite character. The
left as-is. @var{buffer} defaults to the current buffer if omitted.
@end defun
-@node ISO 2022
-@section ISO 2022
-
-This section briefly describes the ISO 2022 encoding standard. For more
-thorough understanding, please refer to the original document of ISO
-2022.
+@node Coding Systems, CCL, Composite Characters, MULE
+@section Coding Systems
-Character sets (@dfn{charsets}) are classified into the following four
-categories, according to the number of characters of charset:
-94-charset, 96-charset, 94x94-charset, and 96x96-charset.
+ A coding system is an object that defines how text containing multiple
+character sets is encoded into a stream of (typically 8-bit) bytes. The
+coding system is used to decode the stream into a series of characters
+(which may be from multiple charsets) when the text is read from a file
+or process, and is used to encode the text back into the same format
+when it is written out to a file or process.
-@need 1000
-@table @asis
-@item 94-charset
- ASCII(B), left(J) and right(I) half of JISX0201, ...
-@item 96-charset
- Latin-1(A), Latin-2(B), Latin-3(C), ...
-@item 94x94-charset
- GB2312(A), JISX0208(B), KSC5601(C), ...
-@item 96x96-charset
- none for the moment
-@end table
+ For example, many ISO-2022-compliant coding systems (such as Compound
+Text, which is used for inter-client data under the X Window System) use
+escape sequences to switch between different charsets -- Japanese Kanji,
+for example, is invoked with @samp{ESC $ ( B}; ASCII is invoked with
+@samp{ESC ( B}; and Cyrillic is invoked with @samp{ESC - L}. See
+@code{make-coding-system} for more information.
-The character in parentheses after the name of each charset
-is the @dfn{final character} @var{F}, which can be regarded as
-the identifier of the charset. ECMA allocates @var{F} to each
-charset. @var{F} is in the range of 0x30..0x7F, but 0x30..0x3F
-are only for private use.
+ Coding systems are normally identified using a symbol, and the symbol is
+accepted in place of the actual coding system object whenever a coding
+system is called for. (This is similar to how faces and charsets work.)
-Note: @dfn{ECMA} = European Computer Manufacturers Association
+@defun coding-system-p object
+This function returns non-@code{nil} if @var{object} is a coding system.
+@end defun
-There are four @dfn{registers of charsets}, called G0 thru G3.
-You can designate (or assign) any charset to one of these
-registers.
+@menu
+* Coding System Types:: Classifying coding systems.
+* ISO 2022:: An international standard for
+ charsets and encodings.
+* EOL Conversion:: Dealing with different ways of denoting
+ the end of a line.
+* Coding System Properties:: Properties of a coding system.
+* Basic Coding System Functions:: Working with coding systems.
+* Coding System Property Functions:: Retrieving a coding system's properties.
+* Encoding and Decoding Text:: Encoding and decoding text.
+* Detection of Textual Encoding:: Determining how text is encoded.
+* Big5 and Shift-JIS Functions:: Special functions for these non-standard
+ encodings.
+* Predefined Coding Systems:: Coding systems implemented by MULE.
+@end menu
-The code space contained within one octet (of size 256) is divided into
-4 areas: C0, GL, C1, and GR. GL and GR are the areas into which a
-register of charset can be invoked into.
+@node Coding System Types, ISO 2022, , Coding Systems
+@subsection Coding System Types
-@example
-@group
- C0: 0x00 - 0x1F
- GL: 0x20 - 0x7F
- C1: 0x80 - 0x9F
- GR: 0xA0 - 0xFF
-@end group
-@end example
+ The coding system type determines the basic algorithm XEmacs will use to
+decode or encode a data stream. Character encodings will be converted
+to the MULE encoding, escape sequences processed, and newline sequences
+converted to XEmacs's internal representation. There are three basic
+classes of coding system type: no-conversion, ISO-2022, and special.
+
+ No conversion allows you to look at the file's internal representation.
+Since XEmacs is basically a text editor, "no conversion" does convert
+newline conventions by default. (Use the 'binary coding-system if this
+is not desired.)
+
+ ISO 2022 (@pxref{ISO 2022}) is the basic international standard regulating
+use of "coded character sets for the exchange of data", ie, text
+streams. ISO 2022 contains functions that make it possible to encode
+text streams to comply with restrictions of the Internet mail system and
+de facto restrictions of most file systems (eg, use of the separator
+character in file names). Coding systems which are not ISO 2022
+conformant can be difficult to handle. Perhaps more important, they are
+not adaptable to multilingual information interchange, with the obvious
+exception of ISO 10646 (Unicode). (Unicode is partially supported by
+XEmacs with the addition of the Lisp package ucs-conv.)
+
+ The special class of coding systems includes automatic detection, CCL (a
+"little language" embedded as an interpreter, useful for translating
+between variants of a single character set), non-ISO-2022-conformant
+encodings like Unicode, Shift JIS, and Big5, and MULE internal coding.
+(NB: this list is based on XEmacs 21.2. Terminology may vary slightly
+for other versions of XEmacs and for GNU Emacs 20.)
-Usually, in the initial state, G0 is invoked into GL, and G1
-is invoked into GR.
+@table @code
+@item no-conversion
+No conversion, for binary files, and a few special cases of non-ISO-2022
+coding systems where conversion is done by hook functions (usually
+implemented in CCL). On output, graphic characters that are not in
+ASCII or Latin-1 will be replaced by a @samp{?}. (For a
+no-conversion-encoded buffer, these characters will only be present if
+you explicitly insert them.)
+@item iso2022
+Any ISO-2022-compliant encoding. Among others, this includes JIS (the
+Japanese encoding commonly used for e-mail), national variants of EUC
+(the standard Unix encoding for Japanese and other languages), and
+Compound Text (an encoding used in X11). You can specify more specific
+information about the conversion with the @var{flags} argument.
+@item ucs-4
+ISO 10646 UCS-4 encoding. A 31-bit fixed-width superset of Unicode.
+@item utf-8
+ISO 10646 UTF-8 encoding. A ``file system safe'' transformation format
+that can be used with both UCS-4 and Unicode.
+@item undecided
+Automatic conversion. XEmacs attempts to detect the coding system used
+in the file.
+@item shift-jis
+Shift-JIS (a Japanese encoding commonly used in PC operating systems).
+@item big5
+Big5 (the encoding commonly used for Taiwanese).
+@item ccl
+The conversion is performed using a user-written pseudo-code program.
+CCL (Code Conversion Language) is the name of this pseudo-code. For
+example, CCL is used to map KOI8-R characters (an encoding for Russian
+Cyrillic) to ISO8859-5 (the form used internally by MULE).
+@item internal
+Write out or read in the raw contents of the memory representing the
+buffer's text. This is primarily useful for debugging purposes, and is
+only enabled when XEmacs has been compiled with @code{DEBUG_XEMACS} set
+(the @samp{--debug} configure option). @strong{Warning}: Reading in a
+file using @code{internal} conversion can result in an internal
+inconsistency in the memory representing a buffer's text, which will
+produce unpredictable results and may cause XEmacs to crash. Under
+normal circumstances you should never use @code{internal} conversion.
+@end table
-ISO 2022 distinguishes 7-bit environments and 8-bit environments. In
-7-bit environments, only C0 and GL are used.
+@node ISO 2022, EOL Conversion, Coding System Types, Coding Systems
+@section ISO 2022
-Charset designation is done by escape sequences of the form:
+ This section briefly describes the ISO 2022 encoding standard. A more
+thorough treatment is available in the original document of ISO
+2022 as well as various national standards (such as JIS X 0202).
+
+ Character sets (@dfn{charsets}) are classified into the following four
+categories, according to the number of characters in the charset:
+94-charset, 96-charset, 94x94-charset, and 96x96-charset. This means
+that although an ISO 2022 coding system may have variable width
+characters, each charset used is fixed-width (in contrast to the MULE
+character set and UTF-8, for example).
+
+ ISO 2022 provides for switching between character sets via escape
+sequences. This switching is somewhat complicated, because ISO 2022
+provides for both legacy applications like Internet mail that accept
+only 7 significant bits in some contexts (RFC 822 headers, for example),
+and more modern "8-bit clean" applications. It also provides for
+compact and transparent representation of languages like Japanese which
+mix ASCII and a national script (even outside of computer programs).
+
+ First, ISO 2022 codified prevailing practice by dividing the code space
+into "control" and "graphic" regions. The code points 0x00-0x1F and
+0x80-0x9F are reserved for "control characters", while "graphic
+characters" must be assigned to code points in the regions 0x20-0x7F and
+0xA0-0xFF. The positions 0x20 and 0x7F are special, and under some
+circumstances must be assigned the graphic character "ASCII SPACE" and
+the control character "ASCII DEL" respectively.
+
+ The various regions are given the name C0 (0x00-0x1F), GL (0x20-0x7F),
+C1 (0x80-0x9F), and GR (0xA0-0xFF). GL and GR stand for "graphic left"
+and "graphic right", respectively, because of the standard method of
+displaying graphic character sets in tables with the high byte indexing
+columns and the low byte indexing rows. I don't find it very intuitive,
+but these are called "registers".
+
+ An ISO 2022-conformant encoding for a graphic character set must use a
+fixed number of bytes per character, and the values must fit into a
+single register; that is, each byte must range over either 0x20-0x7F, or
+0xA0-0xFF. It is not allowed to extend the range of the repertoire of a
+character set by using both ranges at the same. This is why a standard
+character set such as ISO 8859-1 is actually considered by ISO 2022 to
+be an aggregation of two character sets, ASCII and LATIN-1, and why it
+is technically incorrect to refer to ISO 8859-1 as "Latin 1". Also, a
+single character's bytes must all be drawn from the same register; this
+is why Shift JIS (for Japanese) and Big 5 (for Chinese) are not ISO
+2022-compatible encodings.
+
+ The reason for this restriction becomes clear when you attempt to define
+an efficient, robust encoding for a language like Japanese. Like ISO
+8859, Japanese encodings are aggregations of several character sets. In
+practice, the vast majority of characters are drawn from the "JIS Roman"
+character set (a derivative of ASCII; it won't hurt to think of it as
+ASCII) and the JIS X 0208 standard "basic Japanese" character set
+including not only ideographic characters ("kanji") but syllabic
+Japanese characters ("kana"), a wide variety of symbols, and many
+alphabetic characters (Roman, Greek, and Cyrillic) as well. Although
+JIS X 0208 includes the whole Roman alphabet, as a 2-byte code it is not
+suited to programming; thus the inclusion of ASCII in the standard
+Japanese encodings.
+
+ For normal Japanese text such as in newspapers, a broad repertoire of
+approximately 3000 characters is used. Evidently this won't fit into
+one byte; two must be used. But much of the text processed by Japanese
+computers is computer source code, nearly all of which is ASCII. A not
+insignificant portion of ordinary text is English (as such or as
+borrowed Japanese vocabulary) or other languages which can represented
+at least approximately in ASCII, as well. It seems reasonable then to
+represent ASCII in one byte, and JIS X 0208 in two. And this is exactly
+what the Extended Unix Code for Japanese (EUC-JP) does. ASCII is
+invoked to the GL register, and JIS X 0208 is invoked to the GR
+register. Thus, each byte can be tested for its character set by
+looking at the high bit; if set, it is Japanese, if clear, it is ASCII.
+Furthermore, since control characters like newline can never be part of
+a graphic character, even in the case of corruption in transmission the
+stream will be resynchronized at every line break, on the order of 60-80
+bytes. This coding system requires no escape sequences or special
+control codes to represent 99.9% of all Japanese text.
+
+ Note carefully the distinction between the character sets (ASCII and JIS
+X 0208), the encoding (EUC-JP), and the coding system (ISO 2022). The
+JIS X 0208 character set is used in three different encodings for
+Japanese, but in ISO-2022-JP it is invoked into GL (so the high bit is
+always clear), in EUC-JP it is invoked into GR (setting the high bit in
+the process), and in Shift JIS the high bit may be set or reset, and the
+significant bits are shifted within the 16-bit character so that the two
+main character sets can coexist with a third (the "halfwidth katakana"
+of JIS X 0201). As the name implies, the ISO-2022-JP encoding is also a
+version of the ISO-2022 coding system.
+
+ In order to systematically treat subsidiary character sets (like the
+"halfwidth katakana" already mentioned, and the "supplementary kanji" of
+JIS X 0212), four further registers are defined: G0, G1, G2, and G3.
+Unlike GL and GR, they are not logically distinguished by internal
+format. Instead, the process of "invocation" mentioned earlier is
+broken into two steps: first, a character set is @dfn{designated} to one
+of the registers G0-G3 by use of an @dfn{escape sequence} of the form:
@example
ESC [@var{I}] @var{I} @var{F}
@end example
-where @var{I} is an intermediate character in the range 0x20 - 0x2F, and
-@var{F} is the final character identifying this charset.
+where @var{I} is an intermediate character or characters in the range
+0x20 - 0x3F, and @var{F}, from the range 0x30-0x7Fm is the final
+character identifying this charset. (Final characters in the range
+0x30-0x3F are reserved for private use and will never have a publically
+registered meaning.)
+
+ Then that register is @dfn{invoked} to either GL or GR, either
+automatically (designations to G0 normally involve invocation to GL as
+well), or by use of shifting (affecting only the following character in
+the data stream) or locking (effective until the next designation or
+locking) control sequences. An encoding conformant to ISO 2022 is
+typically defined by designating the initial contents of the G0-G3
+registers, specifying an 7 or 8 bit environment, and specifying whether
+further designations will be recognized.
-The meaning of intermediate characters are:
+ Some examples of character sets and the registered final characters
+@var{F} used to designate them:
+
+@need 1000
+@table @asis
+@item 94-charset
+ ASCII (B), left (J) and right (I) half of JIS X 0201, ...
+@item 96-charset
+ Latin-1 (A), Latin-2 (B), Latin-3 (C), ...
+@item 94x94-charset
+ GB2312 (A), JIS X 0208 (B), KSC5601 (C), ...
+@item 96x96-charset
+ none for the moment
+@end table
+
+ The meanings of the various characters in these sequences, where not
+specified by the ISO 2022 standard (such as the ESC character), are
+assigned by @dfn{ECMA}, the European Computer Manufacturers Association.
+
+ The meaning of intermediate characters are:
@example
@group
) [0x29]: designate to G1 a 94-charset whose final byte is @var{F}.
* [0x2A]: designate to G2 a 94-charset whose final byte is @var{F}.
+ [0x2B]: designate to G3 a 94-charset whose final byte is @var{F}.
+ , [0x2C]: designate to G0 a 96-charset whose final byte is @var{F}.
- [0x2D]: designate to G1 a 96-charset whose final byte is @var{F}.
. [0x2E]: designate to G2 a 96-charset whose final byte is @var{F}.
/ [0x2F]: designate to G3 a 96-charset whose final byte is @var{F}.
@end group
@end example
-The following rule is not allowed in ISO 2022 but can be used in Mule.
+ The comma may be used in files read and written only by MULE, as a MULE
+extension, but this is illegal in ISO 2022. (The reason is that in ISO
+2022 G0 must be a 94-member character set, with 0x20 assigned the value
+SPACE, and 0x7F assigned the value DEL.)
-@example
- , [0x2C]: designate to G0 a 96-charset whose final byte is @var{F}.
-@end example
-
-Here are examples of designations:
+ Here are examples of designations:
@example
@group
@end group
@end example
-To use a charset designated to G2 or G3, and to use a charset designated
+(The short forms used to designate GB2312 and JIS X 0208 are for
+backwards compatibility; the long forms are preferred.)
+
+ To use a charset designated to G2 or G3, and to use a charset designated
to G1 in a 7-bit environment, you must explicitly invoke G1, G2, or G3
into GL. There are two types of invocation, Locking Shift (forever) and
Single Shift (one character only).
-Locking Shift is done as follows:
+ Locking Shift is done as follows:
@example
LS0 or SI (0x0F): invoke G0 into GL
LS3R: invoke G3 into GR
@end example
-Single Shift is done as follows:
+ Single Shift is done as follows:
@example
@group
@end group
@end example
+ The shift functions (such as LS1R and SS3) are represented by control
+characters (from C1) in 8 bit environments and by escape sequences in 7
+bit environments.
+
(#### Ben says: I think the above is slightly incorrect. It appears that
SS2 invokes G2 into GR and SS3 invokes G3 into GR, whereas ESC N and
ESC O behave as indicated. The above definitions will not parse
EUC-encoded text correctly, and it looks like the code in mule-coding.c
has similar problems.)
-You may realize that there are a lot of ISO-2022-compliant ways of
-encoding multilingual text. Now, in the world, there exist many coding
-systems such as X11's Compound Text, Japanese JUNET code, and so-called
-EUC (Extended UNIX Code); all of these are variants of ISO 2022.
+ Evidently there are a lot of ISO-2022-compliant ways of encoding
+multilingual text. Now, in the world, there exist many coding systems
+such as X11's Compound Text, Japanese JUNET code, and so-called EUC
+(Extended UNIX Code); all of these are variants of ISO 2022.
-In Mule, we characterize ISO 2022 by the following attributes:
+ In MULE, we characterize a version of ISO 2022 by the following
+attributes:
@enumerate
@item
-Initial designation to G0 thru G3.
+The character sets initially designated to G0 thru G3.
@item
-Allow designation of short form for Japanese and Chinese.
+Whether short form designations are allowed for Japanese and Chinese.
@item
-Should we designate ASCII to G0 before control characters?
+Whether ASCII should be designated to G0 before control characters.
@item
-Should we designate ASCII to G0 at the end of line?
+Whether ASCII should be designated to G0 at the end of line.
@item
7-bit environment or 8-bit environment.
@item
-Use Locking Shift or not.
+Whether Locking Shifts are used or not.
@item
-Use ASCII or JIS0201-1976-Roman.
+Whether to use ASCII or the variant JIS X 0201-1976-Roman.
@item
-Use JISX0208-1983 or JISX0208-1976.
+Whether to use JIS X 0208-1983 or the older version JIS X 0208-1976.
@end enumerate
(The last two are only for Japanese.)
-By specifying these attributes, you can create any variant
+ By specifying these attributes, you can create any variant
of ISO 2022.
-Here are several examples:
+ Here are several examples:
@example
@group
-junet -- Coding system used in JUNET.
+ISO-2022-JP -- Coding system used in Japanese email (RFC 1463 #### check).
1. G0 <- ASCII, G1..3 <- never used
2. Yes.
3. Yes.
5. 7-bit environment
6. No.
7. Use ASCII
- 8. Use JISX0208-1983
+ 8. Use JIS X 0208-1983
@end group
@group
-ctext -- Compound Text
- 1. G0 <- ASCII, G1 <- Latin-1, G2,3 <- never used
+ctext -- X11 Compound Text
+ 1. G0 <- ASCII, G1 <- Latin-1, G2,3 <- never used.
2. No.
3. No.
4. Yes.
- 5. 8-bit environment
+ 5. 8-bit environment.
6. No.
- 7. Use ASCII
- 8. Use JISX0208-1983
+ 7. Use ASCII.
+ 8. Use JIS X 0208-1983.
@end group
@group
-euc-china -- Chinese EUC. Although many people call this
-as "GB encoding", the name may cause misunderstanding.
- 1. G0 <- ASCII, G1 <- GB2312, G2,3 <- never used
+euc-china -- Chinese EUC. Often called the "GB encoding", but that is
+technically incorrect.
+ 1. G0 <- ASCII, G1 <- GB 2312, G2,3 <- never used.
2. No.
3. Yes.
4. Yes.
- 5. 8-bit environment
+ 5. 8-bit environment.
6. No.
- 7. Use ASCII
- 8. Use JISX0208-1983
+ 7. Use ASCII.
+ 8. Use JIS X 0208-1983.
@end group
@group
-korean-mail -- Coding system used in Korean network.
- 1. G0 <- ASCII, G1 <- KSC5601, G2,3 <- never used
+ISO-2022-KR -- Coding system used in Korean email.
+ 1. G0 <- ASCII, G1 <- KSC 5601, G2,3 <- never used.
2. No.
3. Yes.
4. Yes.
- 5. 7-bit environment
+ 5. 7-bit environment.
6. Yes.
- 7. No.
- 8. No.
+ 7. Use ASCII.
+ 8. Use JIS X 0208-1983.
@end group
@end example
-Mule creates all these coding systems by default.
-
-@node Coding Systems
-@section Coding Systems
-
-A coding system is an object that defines how text containing multiple
-character sets is encoded into a stream of (typically 8-bit) bytes. The
-coding system is used to decode the stream into a series of characters
-(which may be from multiple charsets) when the text is read from a file
-or process, and is used to encode the text back into the same format
-when it is written out to a file or process.
-
-For example, many ISO-2022-compliant coding systems (such as Compound
-Text, which is used for inter-client data under the X Window System) use
-escape sequences to switch between different charsets---Japanese Kanji,
-for example, is invoked with @samp{ESC $ ( B}; ASCII is invoked with
-@samp{ESC ( B}; and Cyrillic is invoked with @samp{ESC - L}. See
-@code{make-coding-system} for more information.
-
-Coding systems are normally identified using a symbol, and the symbol is
-accepted in place of the actual coding system object whenever a coding
-system is called for. (This is similar to how faces and charsets work.)
-
-@defun coding-system-p object
-This function returns non-@code{nil} if @var{object} is a coding system.
-@end defun
+MULE creates all of these coding systems by default.
-@menu
-* Coding System Types:: Classifying coding systems.
-* EOL Conversion:: Dealing with different ways of denoting
- the end of a line.
-* Coding System Properties:: Properties of a coding system.
-* Basic Coding System Functions:: Working with coding systems.
-* Coding System Property Functions:: Retrieving a coding system's properties.
-* Encoding and Decoding Text:: Encoding and decoding text.
-* Detection of Textual Encoding:: Determining how text is encoded.
-* Big5 and Shift-JIS Functions:: Special functions for these non-standard
- encodings.
-@end menu
-
-@node Coding System Types
-@subsection Coding System Types
-
-@table @code
-@item nil
-@itemx autodetect
-Automatic conversion. XEmacs attempts to detect the coding system used
-in the file.
-@item no-conversion
-No conversion. Use this for binary files and such. On output, graphic
-characters that are not in ASCII or Latin-1 will be replaced by a
-@samp{?}. (For a no-conversion-encoded buffer, these characters will
-only be present if you explicitly insert them.)
-@item shift-jis
-Shift-JIS (a Japanese encoding commonly used in PC operating systems).
-@item iso2022
-Any ISO-2022-compliant encoding. Among other things, this includes JIS
-(the Japanese encoding commonly used for e-mail), national variants of
-EUC (the standard Unix encoding for Japanese and other languages), and
-Compound Text (an encoding used in X11). You can specify more specific
-information about the conversion with the @var{flags} argument.
-@item big5
-Big5 (the encoding commonly used for Taiwanese).
-@item ccl
-The conversion is performed using a user-written pseudo-code program.
-CCL (Code Conversion Language) is the name of this pseudo-code.
-@item internal
-Write out or read in the raw contents of the memory representing the
-buffer's text. This is primarily useful for debugging purposes, and is
-only enabled when XEmacs has been compiled with @code{DEBUG_XEMACS} set
-(the @samp{--debug} configure option). @strong{Warning}: Reading in a
-file using @code{internal} conversion can result in an internal
-inconsistency in the memory representing a buffer's text, which will
-produce unpredictable results and may cause XEmacs to crash. Under
-normal circumstances you should never use @code{internal} conversion.
-@end table
-
-@node EOL Conversion
+@node EOL Conversion, Coding System Properties, ISO 2022, Coding Systems
@subsection EOL Conversion
@table @code
internally, and @code{coding-system-property} will return @code{nil}.)
@end table
-@node Coding System Properties
+@node Coding System Properties, Basic Coding System Functions, EOL Conversion, Coding Systems
@subsection Coding System Properties
@table @code
End-of-line conversion to be used. It should be one of the types
listed in @ref{EOL Conversion}.
+@item eol-lf
+The coding system which is the same as this one, except that it uses the
+Unix line-breaking convention.
+
+@item eol-crlf
+The coding system which is the same as this one, except that it uses the
+DOS line-breaking convention.
+
+@item eol-cr
+The coding system which is the same as this one, except that it uses the
+Macintosh line-breaking convention.
+
@item post-read-conversion
Function called after a file has been read in, to perform the decoding.
Called with two arguments, @var{beg} and @var{end}, denoting a region of
the current buffer to be encoded.
@end table
-The following additional properties are recognized if @var{type} is
+ The following additional properties are recognized if @var{type} is
@code{iso2022}:
@table @code
specification is the same as for @code{input-charset-conversion}.
@end table
-The following additional properties are recognized (and required) if
+ The following additional properties are recognized (and required) if
@var{type} is @code{ccl}:
@table @code
CCL program used for encoding (converting to external format).
@end table
-@node Basic Coding System Functions
+ The following properties are used internally: @var{eol-cr},
+@var{eol-crlf}, @var{eol-lf}, and @var{base}.
+
+@node Basic Coding System Functions, Coding System Property Functions, Coding System Properties, Coding Systems
@subsection Basic Coding System Functions
@defun find-coding-system coding-system-or-name
This function retrieves the coding system of the given name.
-If @var{coding-system-or-name} is a coding-system object, it is simply
+ If @var{coding-system-or-name} is a coding-system object, it is simply
returned. Otherwise, @var{coding-system-or-name} should be a symbol.
If there is no such coding system, @code{nil} is returned. Otherwise
the associated coding system object is returned.
This function returns the name of the given coding system.
@end defun
+@defun coding-system-base coding-system
+Returns the base coding system (undecided EOL convention)
+coding system.
+@end defun
+
@defun make-coding-system name type &optional doc-string props
This function registers symbol @var{name} as a coding system.
@var{coding-system} with eol type @var{eol-type}.
@end defun
-@node Coding System Property Functions
+@node Coding System Property Functions, Encoding and Decoding Text, Basic Coding System Functions, Coding Systems
@subsection Coding System Property Functions
@defun coding-system-doc-string coding-system
This function returns the @var{prop} property of @var{coding-system}.
@end defun
-@node Encoding and Decoding Text
+@node Encoding and Decoding Text, Detection of Textual Encoding, Coding System Property Functions, Coding Systems
@subsection Encoding and Decoding Text
@defun decode-coding-region start end coding-system &optional buffer
defaults to the current buffer if unspecified.
@end defun
-@node Detection of Textual Encoding
+@node Detection of Textual Encoding, Big5 and Shift-JIS Functions, Encoding and Decoding Text, Coding Systems
@subsection Detection of Textual Encoding
@defun coding-category-list
defaults to the current buffer.
@end defun
-@node Big5 and Shift-JIS Functions
+@node Big5 and Shift-JIS Functions, Predefined Coding Systems, Detection of Textual Encoding, Coding Systems
@subsection Big5 and Shift-JIS Functions
-These are special functions for working with the non-standard
+ These are special functions for working with the non-standard
Shift-JIS and Big5 encodings.
@defun decode-shift-jis-char code
-This function decodes a JISX0208 character of Shift-JIS coding-system.
+This function decodes a JIS X 0208 character of Shift-JIS coding-system.
@var{code} is the character code in Shift-JIS as a cons of type bytes.
The corresponding character is returned.
@end defun
@defun encode-shift-jis-char ch
-This function encodes a JISX0208 character @var{ch} to SHIFT-JIS
+This function encodes a JIS X 0208 character @var{ch} to SHIFT-JIS
coding-system. The corresponding character code in SHIFT-JIS is
returned as a cons of two bytes.
@end defun
coding-system. The corresponding character code in Big5 is returned.
@end defun
+@node Predefined Coding Systems, , Big5 and Shift-JIS Functions, Coding Systems
+@subsection Coding Systems Implemented
+
+ MULE initializes most of the commonly used coding systems at XEmacs's
+startup. A few others are initialized only when the relevant language
+environment is selected and support libraries are loaded. (NB: The
+following list is based on XEmacs 21.2.19, the development branch at the
+time of writing. The list may be somewhat different for other
+versions. Recent versions of GNU Emacs 20 implement a few more rare
+coding systems; work is being done to port these to XEmacs.)
+
+ Unfortunately, there is not a consistent naming convention for character
+sets, and for practical purposes coding systems often take their name
+from their principal character sets (ASCII, KOI8-R, Shift JIS). Others
+take their names from the coding system (ISO-2022-JP, EUC-KR), and a few
+from their non-text usages (internal, binary). To provide for this, and
+for the fact that many coding systems have several common names, an
+aliasing system is provided. Finally, some effort has been made to use
+names that are registered as MIME charsets (this is why the name
+'shift_jis contains that un-Lisp-y underscore).
+
+ There is a systematic naming convention regarding end-of-line (EOL)
+conventions for different systems. A coding system whose name ends in
+"-unix" forces the assumptions that lines are broken by newlines (0x0A).
+A coding system whose name ends in "-mac" forces the assumptions that
+lines are broken by ASCII CRs (0x0D). A coding system whose name ends
+in "-dos" forces the assumptions that lines are broken by CRLF sequences
+(0x0D 0x0A). These subsidiary coding systems are automatically derived
+from a base coding system. Use of the base coding system implies
+autodetection of the text file convention. (The fact that the -unix,
+-mac, and -dos are derived from a base system results in them showing up
+as "aliases" in `list-coding-systems'.) These subsidiaries have a
+consistent modeline indicator as well. "-dos" coding systems have ":T"
+appended to their modeline indicator, while "-mac" coding systems have
+":t" appended (eg, "ISO8:t" for iso-2022-8-mac).
+
+ In the following table, each coding system is given with its mode line
+indicator in parentheses. Non-textual coding systems are listed first,
+followed by textual coding systems and their aliases. (The coding system
+subsidiary modeline indicators ":T" and ":t" will be omitted from the
+table of coding systems.)
+
+ ### SJT 1999-08-23 Maybe should order these by language? Definitely
+need language usage for the ISO-8859 family.
+
+ Note that although true coding system aliases have been implemented for
+XEmacs 21.2, the coding system initialization has not yet been converted
+as of 21.2.19. So coding systems described as aliases have the same
+properties as the aliased coding system, but will not be equal as Lisp
+objects.
+
+@table @code
+
+@item automatic-conversion
+@itemx undecided
+@itemx undecided-dos
+@itemx undecided-mac
+@itemx undecided-unix
+
+Modeline indicator: @code{Auto}. A type @code{undecided} coding system.
+Attempts to determine an appropriate coding system from file contents or
+the environment.
+
+@item raw-text
+@itemx no-conversion
+@itemx raw-text-dos
+@itemx raw-text-mac
+@itemx raw-text-unix
+@itemx no-conversion-dos
+@itemx no-conversion-mac
+@itemx no-conversion-unix
+
+Modeline indicator: @code{Raw}. A type @code{no-conversion} coding system,
+which converts only line-break-codes. An implementation quirk means
+that this coding system is also used for ISO8859-1.
+
+@item binary
+Modeline indicator: @code{Binary}. A type @code{no-conversion} coding
+system which does no character coding or EOL conversions. An alias for
+@code{raw-text-unix}.
+
+@item alternativnyj
+@itemx alternativnyj-dos
+@itemx alternativnyj-mac
+@itemx alternativnyj-unix
+
+Modeline indicator: @code{Cy.Alt}. A type @code{ccl} coding system used for
+Alternativnyj, an encoding of the Cyrillic alphabet.
+
+@item big5
+@itemx big5-dos
+@itemx big5-mac
+@itemx big5-unix
+
+Modeline indicator: @code{Zh/Big5}. A type @code{big5} coding system used for
+BIG5, the most common encoding of traditional Chinese as used in Taiwan.
+
+@item cn-gb-2312
+@itemx cn-gb-2312-dos
+@itemx cn-gb-2312-mac
+@itemx cn-gb-2312-unix
+
+Modeline indicator: @code{Zh-GB/EUC}. A type @code{iso2022} coding system used
+for simplified Chinese (as used in the People's Republic of China), with
+the @code{ascii} (G0), @code{chinese-gb2312} (G1), and @code{sisheng}
+(G2) character sets initially designated. Chinese EUC (Extended Unix
+Code).
+
+@item ctext-hebrew
+@itemx ctext-hebrew-dos
+@itemx ctext-hebrew-mac
+@itemx ctext-hebrew-unix
+
+Modeline indicator: @code{CText/Hbrw}. A type @code{iso2022} coding system
+with the @code{ascii} (G0) and @code{hebrew-iso8859-8} (G1) character
+sets initially designated for Hebrew.
+
+@item ctext
+@itemx ctext-dos
+@itemx ctext-mac
+@itemx ctext-unix
+
+Modeline indicator: @code{CText}. A type @code{iso2022} 8-bit coding system
+with the @code{ascii} (G0) and @code{latin-iso8859-1} (G1) character
+sets initially designated. X11 Compound Text Encoding. Often
+mistakenly recognized instead of EUC encodings; usual cause is
+inappropriate setting of @code{coding-priority-list}.
+
+@item escape-quoted
+
+Modeline indicator: @code{ESC/Quot}. A type @code{iso2022} 8-bit coding
+system with the @code{ascii} (G0) and @code{latin-iso8859-1} (G1)
+character sets initially designated and escape quoting. Unix EOL
+conversion (ie, no conversion). It is used for .ELC files.
+
+@item euc-jp
+@itemx euc-jp-dos
+@itemx euc-jp-mac
+@itemx euc-jp-unix
+
+Modeline indicator: @code{Ja/EUC}. A type @code{iso2022} 8-bit coding system
+with @code{ascii} (G0), @code{japanese-jisx0208} (G1),
+@code{katakana-jisx0201} (G2), and @code{japanese-jisx0212} (G3)
+initially designated. Japanese EUC (Extended Unix Code).
+
+@item euc-kr
+@itemx euc-kr-dos
+@itemx euc-kr-mac
+@itemx euc-kr-unix
+
+Modeline indicator: @code{ko/EUC}. A type @code{iso2022} 8-bit coding system
+with @code{ascii} (G0) and @code{korean-ksc5601} (G1) initially
+designated. Korean EUC (Extended Unix Code).
+
+@item hz-gb-2312
+Modeline indicator: @code{Zh-GB/Hz}. A type @code{no-conversion} coding
+system with Unix EOL convention (ie, no conversion) using
+post-read-decode and pre-write-encode functions to translate the Hz/ZW
+coding system used for Chinese.
+
+@item iso-2022-7bit
+@itemx iso-2022-7bit-unix
+@itemx iso-2022-7bit-dos
+@itemx iso-2022-7bit-mac
+@itemx iso-2022-7
+
+Modeline indicator: @code{ISO7}. A type @code{iso2022} 7-bit coding system
+with @code{ascii} (G0) initially designated. Other character sets must
+be explicitly designated to be used.
+
+@item iso-2022-7bit-ss2
+@itemx iso-2022-7bit-ss2-dos
+@itemx iso-2022-7bit-ss2-mac
+@itemx iso-2022-7bit-ss2-unix
+
+Modeline indicator: @code{ISO7/SS}. A type @code{iso2022} 7-bit coding system
+with @code{ascii} (G0) initially designated. Other character sets must
+be explicitly designated to be used. SS2 is used to invoke a
+96-charset, one character at a time.
+
+@item iso-2022-8
+@itemx iso-2022-8-dos
+@itemx iso-2022-8-mac
+@itemx iso-2022-8-unix
+
+Modeline indicator: @code{ISO8}. A type @code{iso2022} 8-bit coding system
+with @code{ascii} (G0) and @code{latin-iso8859-1} (G1) initially
+designated. Other character sets must be explicitly designated to be
+used. No single-shift or locking-shift.
+
+@item iso-2022-8bit-ss2
+@itemx iso-2022-8bit-ss2-dos
+@itemx iso-2022-8bit-ss2-mac
+@itemx iso-2022-8bit-ss2-unix
+
+Modeline indicator: @code{ISO8/SS}. A type @code{iso2022} 8-bit coding system
+with @code{ascii} (G0) and @code{latin-iso8859-1} (G1) initially
+designated. Other character sets must be explicitly designated to be
+used. SS2 is used to invoke a 96-charset, one character at a time.
+
+@item iso-2022-int-1
+@itemx iso-2022-int-1-dos
+@itemx iso-2022-int-1-mac
+@itemx iso-2022-int-1-unix
+
+Modeline indicator: @code{INT-1}. A type @code{iso2022} 7-bit coding system
+with @code{ascii} (G0) and @code{korean-ksc5601} (G1) initially
+designated. ISO-2022-INT-1.
+
+@item iso-2022-jp-1978-irv
+@itemx iso-2022-jp-1978-irv-dos
+@itemx iso-2022-jp-1978-irv-mac
+@itemx iso-2022-jp-1978-irv-unix
+
+Modeline indicator: @code{Ja-78/7bit}. A type @code{iso2022} 7-bit coding
+system. For compatibility with old Japanese terminals; if you need to
+know, look at the source.
+
+@item iso-2022-jp
+@itemx iso-2022-jp-2 (ISO7/SS)
+@itemx iso-2022-jp-dos
+@itemx iso-2022-jp-mac
+@itemx iso-2022-jp-unix
+@itemx iso-2022-jp-2-dos
+@itemx iso-2022-jp-2-mac
+@itemx iso-2022-jp-2-unix
+
+Modeline indicator: @code{MULE/7bit}. A type @code{iso2022} 7-bit coding
+system with @code{ascii} (G0) initially designated, and complex
+specifications to insure backward compatibility with old Japanese
+systems. Used for communication with mail and news in Japan. The "-2"
+versions also use SS2 to invoke a 96-charset one character at a time.
+
+@item iso-2022-kr
+Modeline indicator: @code{Ko/7bit} A type @code{iso2022} 7-bit coding
+system with @code{ascii} (G0) and @code{korean-ksc5601} (G1) initially
+designated. Used for e-mail in Korea.
+
+@item iso-2022-lock
+@itemx iso-2022-lock-dos
+@itemx iso-2022-lock-mac
+@itemx iso-2022-lock-unix
+
+Modeline indicator: @code{ISO7/Lock}. A type @code{iso2022} 7-bit coding
+system with @code{ascii} (G0) initially designated, using Locking-Shift
+to invoke a 96-charset.
+
+@item iso-8859-1
+@itemx iso-8859-1-dos
+@itemx iso-8859-1-mac
+@itemx iso-8859-1-unix
+
+Due to implementation, this is not a type @code{iso2022} coding system,
+but rather an alias for the @code{raw-text} coding system.
+
+@item iso-8859-2
+@itemx iso-8859-2-dos
+@itemx iso-8859-2-mac
+@itemx iso-8859-2-unix
+
+Modeline indicator: @code{MIME/Ltn-2}. A type @code{iso2022} coding
+system with @code{ascii} (G0) and @code{latin-iso8859-2} (G1) initially
+invoked.
+
+@item iso-8859-3
+@itemx iso-8859-3-dos
+@itemx iso-8859-3-mac
+@itemx iso-8859-3-unix
+
+Modeline indicator: @code{MIME/Ltn-3}. A type @code{iso2022} coding system
+with @code{ascii} (G0) and @code{latin-iso8859-3} (G1) initially
+invoked.
+
+@item iso-8859-4
+@itemx iso-8859-4-dos
+@itemx iso-8859-4-mac
+@itemx iso-8859-4-unix
+
+Modeline indicator: @code{MIME/Ltn-4}. A type @code{iso2022} coding system
+with @code{ascii} (G0) and @code{latin-iso8859-4} (G1) initially
+invoked.
+
+@item iso-8859-5
+@itemx iso-8859-5-dos
+@itemx iso-8859-5-mac
+@itemx iso-8859-5-unix
+
+Modeline indicator: @code{ISO8/Cyr}. A type @code{iso2022} coding system with
+@code{ascii} (G0) and @code{cyrillic-iso8859-5} (G1) initially invoked.
+
+@item iso-8859-7
+@itemx iso-8859-7-dos
+@itemx iso-8859-7-mac
+@itemx iso-8859-7-unix
+
+Modeline indicator: @code{Grk}. A type @code{iso2022} coding system with
+@code{ascii} (G0) and @code{greek-iso8859-7} (G1) initially invoked.
+
+@item iso-8859-8
+@itemx iso-8859-8-dos
+@itemx iso-8859-8-mac
+@itemx iso-8859-8-unix
+
+Modeline indicator: @code{MIME/Hbrw}. A type @code{iso2022} coding system with
+@code{ascii} (G0) and @code{hebrew-iso8859-8} (G1) initially invoked.
+
+@item iso-8859-9
+@itemx iso-8859-9-dos
+@itemx iso-8859-9-mac
+@itemx iso-8859-9-unix
+
+Modeline indicator: @code{MIME/Ltn-5}. A type @code{iso2022} coding system
+with @code{ascii} (G0) and @code{latin-iso8859-9} (G1) initially
+invoked.
+
+@item koi8-r
+@itemx koi8-r-dos
+@itemx koi8-r-mac
+@itemx koi8-r-unix
+
+Modeline indicator: @code{KOI8}. A type @code{ccl} coding-system used for
+KOI8-R, an encoding of the Cyrillic alphabet.
+
+@item shift_jis
+@itemx shift_jis-dos
+@itemx shift_jis-mac
+@itemx shift_jis-unix
+
+Modeline indicator: @code{Ja/SJIS}. A type @code{shift-jis} coding-system
+implementing the Shift-JIS encoding for Japanese. The underscore is to
+conform to the MIME charset implementing this encoding.
+
+@item tis-620
+@itemx tis-620-dos
+@itemx tis-620-mac
+@itemx tis-620-unix
+
+Modeline indicator: @code{TIS620}. A type @code{ccl} encoding for Thai. The
+external encoding is defined by TIS620, the internal encoding is
+peculiar to MULE, and called @code{thai-xtis}.
+
+@item viqr
+
+Modeline indicator: @code{VIQR}. A type @code{no-conversion} coding
+system with Unix EOL convention (ie, no conversion) using
+post-read-decode and pre-write-encode functions to translate the VIQR
+coding system for Vietnamese.
+
+@item viscii
+@itemx viscii-dos
+@itemx viscii-mac
+@itemx viscii-unix
+
+Modeline indicator: @code{VISCII}. A type @code{ccl} coding-system used
+for VISCII 1.1 for Vietnamese. Differs slightly from VSCII; VISCII is
+given priority by XEmacs.
+
+@item vscii
+@itemx vscii-dos
+@itemx vscii-mac
+@itemx vscii-unix
+
+Modeline indicator: @code{VSCII}. A type @code{ccl} coding-system used
+for VSCII 1.1 for Vietnamese. Differs slightly from VISCII, which is
+given priority by XEmacs. Use
+@code{(prefer-coding-system 'vietnamese-vscii)} to give priority to VSCII.
+
+@end table
+
@node CCL, Category Tables, Coding Systems, MULE
@section CCL
-CCL (Code Conversion Language) is a simple structured programming
+ CCL (Code Conversion Language) is a simple structured programming
language designed for character coding conversions. A CCL program is
compiled to CCL code (represented by a vector of integers) and executed
by the CCL interpreter embedded in Emacs. The CCL interpreter
statements and operations, especially for multiple return values and I/O
operations).
-CCL is used for code conversion during process I/O and file I/O for
+ CCL is used for code conversion during process I/O and file I/O for
non-ISO2022 coding systems. (It is the only way for a user to specify a
code conversion function.) It is also used for calculating the code
point of an X11 font from a character code. However, since CCL is
three or more arithmetic operations can be calculated faster by CCL than
by Emacs Lisp.
-@strong{Warning:} The code in @file{src/mule-ccl.c} and
+ @strong{Warning:} The code in @file{src/mule-ccl.c} and
@file{$packages/lisp/mule-base/mule-ccl.el} is the definitive
description of CCL's semantics. The previous version of this section
contained several typos and obsolete names left from earlier versions of
MULE, and many may remain. (I am not an experienced CCL programmer; the
few who know CCL well find writing English painful.)
-A CCL program transforms an input data stream into an output data
+ A CCL program transforms an input data stream into an output data
stream. The input stream, held in a buffer of constant bytes, is left
unchanged. The buffer may be filled by an external input operation,
taken from an Emacs buffer, or taken from a Lisp string. The output
output operation, inserted into an Emacs buffer, or returned as a Lisp
string.
-A CCL program is a (Lisp) list containing two or three members. The
+ A CCL program is a (Lisp) list containing two or three members. The
first member is the @dfn{buffer magnification}, which indicates the
required minimum size of the output buffer as a multiple of the input
buffer. It is followed by the @dfn{main block} which executes while
executed when the input is exhausted. Both the main block and the EOF
block are CCL blocks.
-A @dfn{CCL block} is either a CCL statement or list of CCL statements.
+ A @dfn{CCL block} is either a CCL statement or list of CCL statements.
A @dfn{CCL statement} is either a @dfn{set statement} (either an integer
or an @dfn{assignment}, which is a list of a register to receive the
assignment, an assignment operator, and an expression) or a @dfn{control
* CCL Examples:: The encoding functions for Big5 and KOI-8.
@end menu
-@node CCL Syntax, CCL Statements, CCL, CCL
+@node CCL Syntax, CCL Statements, , CCL
@comment Node, Next, Previous, Up
@subsection CCL Syntax
-The full syntax of a CCL program in BNF notation:
+ The full syntax of a CCL program in BNF notation:
@format
CCL_PROGRAM :=
@comment Node, Next, Previous, Up
@subsection CCL Statements
-The Emacs Code Conversion Language provides the following statement
+ The Emacs Code Conversion Language provides the following statement
types: @dfn{set}, @dfn{if}, @dfn{branch}, @dfn{loop}, @dfn{repeat},
@dfn{break}, @dfn{read}, @dfn{write}, @dfn{call}, and @dfn{end}.
@heading Set statement:
-The @dfn{set} statement has three variants with the syntaxes
+ The @dfn{set} statement has three variants with the syntaxes
@samp{(@var{reg} = @var{expression})},
@samp{(@var{reg} @var{assignment_operator} @var{expression})}, and
@samp{@var{integer}}. The assignment operator variation of the
@heading I/O statements:
-The @dfn{read} statement takes one or more registers as arguments. It
+ The @dfn{read} statement takes one or more registers as arguments. It
reads one byte (a C char) from the input into each register in turn.
-The @dfn{write} takes several forms. In the form @samp{(write @var{reg}
+ The @dfn{write} takes several forms. In the form @samp{(write @var{reg}
...)} it takes one or more registers as arguments and writes each in
turn to the output. The integer in a register (interpreted as an
Emchar) is encoded to multibyte form (ie, Bufbytes) and written to the
@heading Conditional statements:
-The @dfn{if} statement takes an @var{expression}, a @var{CCL block}, and
+ The @dfn{if} statement takes an @var{expression}, a @var{CCL block}, and
an optional @var{second CCL block} as arguments. If the
@var{expression} evaluates to non-zero, the first @var{CCL block} is
executed. Otherwise, if there is a @var{second CCL block}, it is
executed.
-The @dfn{read-if} variant of the @dfn{if} statement takes an
+ The @dfn{read-if} variant of the @dfn{if} statement takes an
@var{expression}, a @var{CCL block}, and an optional @var{second CCL
block} as arguments. The @var{expression} must have the form
@code{(@var{reg} @var{operator} @var{operand})} (where @var{operand} is
then conditionally executes a CCL block just as the @code{if} statement
does.
-The @dfn{branch} statement takes an @var{expression} and one or more CCL
+ The @dfn{branch} statement takes an @var{expression} and one or more CCL
blocks as arguments. The CCL blocks are treated as a zero-indexed
array, and the @code{branch} statement uses the @var{expression} as the
index of the CCL block to execute. Null CCL blocks may be used as
@code{branch} statement in the containing CCL block. Out-of-range
values for the @var{EXPRESSION} are also treated as no-ops.
-The @dfn{read-branch} variant of the @dfn{branch} statement takes an
+ The @dfn{read-branch} variant of the @dfn{branch} statement takes an
@var{register}, a @var{CCL block}, and an optional @var{second CCL
block} as arguments. The @code{read-branch} statement first reads from
the input into the @var{register}, then conditionally executes a CCL
@heading Loop control statements:
-The @dfn{loop} statement creates a block with an implied jump from the
+ The @dfn{loop} statement creates a block with an implied jump from the
end of the block back to its head. The loop is exited on a @code{break}
statement, and continued without executing the tail by a @code{repeat}
statement.
-The @dfn{break} statement, written @samp{(break)}, terminates the
+ The @dfn{break} statement, written @samp{(break)}, terminates the
current loop and continues with the next statement in the current
block.
-The @dfn{repeat} statement has three variants, @code{repeat},
+ The @dfn{repeat} statement has three variants, @code{repeat},
@code{write-repeat}, and @code{write-read-repeat}. Each continues the
current loop from its head, possibly after performing I/O.
@code{repeat} takes no arguments and does no I/O before jumping.
@heading Other control statements:
-The @dfn{call} statement, written @samp{(call @var{ccl-program-name})},
+ The @dfn{call} statement, written @samp{(call @var{ccl-program-name})},
executes a CCL program as a subroutine. It does not return a value to
the caller, but can modify the register status.
-The @dfn{end} statement, written @samp{(end)}, terminates the CCL
+ The @dfn{end} statement, written @samp{(end)}, terminates the CCL
program successfully, and returns to caller (which may be a CCL
program). It does not alter the status of the registers.
@comment Node, Next, Previous, Up
@subsection CCL Expressions
-CCL, unlike Lisp, uses infix expressions. The simplest CCL expressions
+ CCL, unlike Lisp, uses infix expressions. The simplest CCL expressions
consist of a single @var{operand}, either a register (one of @code{r0},
..., @code{r0}) or an integer. Complex expressions are lists of the
form @code{( @var{expression} @var{operator} @var{operand} )}. Unlike
C, assignments are not expressions.
-In the following table, @var{X} is the target resister for a @dfn{set}.
+ In the following table, @var{X} is the target resister for a @dfn{set}.
In subexpressions, this is implicitly @code{r7}. This means that
@code{>8}, @code{//}, @code{de-sjis}, and @code{en-sjis} cannot be used
freely in subexpressions, since they return parts of their values in
@item @tab @tab @tab r[7] = LOWER_BYTE (DE-SJIS (Y, Z))
@end multitable
-The CCL operators are as in C, with the addition of CCL_LSH8, CCL_RSH8,
+ 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_ENCODE_SJIS
and CCL_DECODE_SJIS treat their first and second bytes as the high and
low bytes of a two-byte character code. (SJIS stands for Shift JIS, an
Shift JIS. CCL_DECODE_SJIS is its inverse.) It is somewhat odd to
represent the SJIS operations in infix form.
-@node Calling CCL, CCL Examples, CCL Expressions, CCL
+@node Calling CCL, CCL Examples, CCL Expressions, CCL
@comment Node, Next, Previous, Up
@subsection Calling CCL
-CCL programs are called automatically during Emacs buffer I/O when the
+ CCL programs are called automatically during Emacs buffer I/O when the
external representation has a coding system type of @code{shift-jis},
@code{big5}, or @code{ccl}. The program is specified by the coding
system (@pxref{Coding Systems}). You can also call CCL programs from
registers and IC. Returns the resulting string.
@end defun
-To call a CCL program from another CCL program, it must first be
+ To call a CCL program from another CCL program, it must first be
registered:
@defun register-ccl-program name ccl-program
program.
@end defun
-Information about the processor time used by the CCL interpreter can be
+ Information about the processor time used by the CCL interpreter can be
obtained using these functions:
@defun ccl-elapsed-time
Resets the CCL interpreter's internal elapsed time registers.
@end defun
-@node CCL Examples, , Calling CCL, CCL
+@node CCL Examples, , Calling CCL, CCL
@comment Node, Next, Previous, Up
@subsection CCL Examples
-This section is not yet written.
+ This section is not yet written.
@node Category Tables, , CCL, MULE
@section Category Tables
@c Copyright (C) 1995 Ben Wing.
@c See the file lispref.texi for copying conditions.
@setfilename ../../info/glyphs.info
-@node Scrollbars, Drag and Drop, Toolbar, top
-@chapter scrollbars
+@node Scrollbars, Drag and Drop, Gutter, top
+@chapter Scrollbars
@cindex scrollbars
Not yet documented.
@cindex string properties
@cindex properties of strings
-Similar to symbols, extents, faces, and glyphs, you can attach
+Just as with symbols, extents, faces, and glyphs, you can attach
additional information to strings in the form of @dfn{string
properties}. These differ from text properties, which are logically
attached to particular characters in the string.
To attach a property to a string, use @code{put}. To retrieve a property
from a string, use @code{get}. You can also use @code{remprop} to remove
-a property from a string and @code{object-props} to retrieve a list of
+a property from a string and @code{object-plist} to retrieve a list of
all the properties in a string.
@node Formatting Strings
@cindex plist, symbol
A @dfn{property list} (@dfn{plist} for short) is a list of paired
-elements stored in the property list cell of a symbol. Each of the
-pairs associates a property name (usually a symbol) with a property or
-value. Property lists are generally used to record information about a
-symbol, such as its documentation as a variable, the name of the file
+elements, often stored in the property list cell of a symbol. Each of
+the pairs associates a property name (usually a symbol) with a property
+or value. Property lists are generally used to record information about
+a symbol, such as its documentation as a variable, the name of the file
where it was defined, or perhaps even the grammatical class of the
symbol (representing a word) in a language-understanding system.
- Many objects other than symbols can have property lists associated
+ Some objects which are not symbols also have property lists associated
with them, and XEmacs provides a full complement of functions for
working with property lists. @xref{Property Lists}.
@menu
* Plists and Alists:: Comparison of the advantages of property
lists and association lists.
-* Symbol Plists:: Functions to access symbols' property lists.
+* Object Plists:: Functions to access objects' property lists.
* Other Plists:: Accessing property lists stored elsewhere.
@end menu
are pushed on the front of the list and later discarded; this is not
possible with a property list.
-@node Symbol Plists
-@subsection Property List Functions for Symbols
+@node Object Plists
+@subsection Property List Functions for Objects
+
+Once upon a time, only symbols had property lists. Now, several other
+object types, including strings, extents, faces and glyphs also have
+property lists.
@defun symbol-plist symbol
This function returns the property list of @var{symbol}.
@end defun
+@defun object-plist object
+This function returns the property list of @var{object}. If
+@var{object} is a symbol, this is identical to @code{symbol-plist}.
+@end defun
+
@defun setplist symbol plist
This function sets @var{symbol}'s property list to @var{plist}.
Normally, @var{plist} should be a well-formed property list, but this is
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
-(@pxref{Abbrevs}).
+(@pxref{Abbrevs}). But generally, its use is discouraged. Use
+@code{put} instead. @code{setplist} can only be used with symbols, not
+other object types.
@end defun
-@defun get symbol property
+@defun get object property &optional default
This function finds the value of the property named @var{property} in
-@var{symbol}'s property list. If there is no such property, @code{nil}
-is returned. Thus, there is no distinction between a value of
-@code{nil} and the absence of the property.
+@var{object}'s property list. If there is no such property,
+@code{default} (which itself defaults to @code{nil}) is returned.
-The name @var{property} is compared with the existing property names
-using @code{eq}, so any object is a legitimate property.
+@var{property} is compared with the existing properties using @code{eq},
+so any object is a legitimate property.
See @code{put} for an example.
@end defun
-@defun put symbol property value
-This function puts @var{value} onto @var{symbol}'s property list under
+@defun put object property value
+This function puts @var{value} onto @var{object}'s property list under
the property name @var{property}, replacing any previous property value.
The @code{put} function returns @var{value}.
@result{} (a buzzing little bug)
(get 'fly 'verb)
@result{} transitive
-(symbol-plist 'fly)
+(object-plist 'fly)
@result{} (verb transitive noun (a buzzing little bug))
@end smallexample
@end defun
+@defun remprop object property
+This function removes the entry for @var{property} from the property
+list of @var{object}. It returns @code{t} if the property was
+indeed found and removed, or @code{nil} if there was no such property.
+(This function was probably omitted from Emacs originally because,
+since @code{get} did not allow a @var{default}, it was very difficult
+to distinguish between a missing property and a property whose value
+was @code{nil}; thus, setting a property to @code{nil} was close
+enough to @code{remprop} for most purposes.)
+@end defun
+
@node Other Plists
-@subsection Property Lists Outside Symbols
+@subsection Property Lists Not Associated with Objects
These functions are useful for manipulating property lists
that are stored in places other than symbols:
@c Copyright (C) 1995, 1996 Ben Wing.
@c See the file lispref.texi for copying conditions.
@setfilename ../../info/toolbar.info
-@node Toolbar, Scrollbars, Dialog Boxes, top
+@node Toolbar, Gutter, Dialog Boxes, top
@chapter Toolbar
@cindex toolbar
-\input texinfo.tex @c -*-texinfo-*-
+\input texinfo.tex @c -*- mode: texinfo; coding: iso-2022-8 -*-
@c %**start of header
@setfilename ../info/xemacs-faq.info
@settitle Frequently asked questions about XEmacs
@finalout
@titlepage
@title XEmacs FAQ
-@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 2000/01/27 17:11:28 $
+@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 2000/04/26 07:18:27 $
@sp 1
@author Tony Rossini <rossini@@biostat.washington.edu>
@author Ben Wing <ben@@xemacs.org>
* 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?
+Troubleshooting:
+* Q6.4.1:: XEmacs won't start on Windows. (NEW)
+
Current Events:
* Q7.0.1:: What is new in 20.2?
@c @uref{ftp://ftp.cs.cornell.edu/pub/parmet/, Emacs 18.59}.
Yes, there is a port of XEmacs 19.14, tested on MacOS 7.6.1 and MacOS
-8.5.1 by @uref{pjarvis@@ispchannel.com,Pitts Jarvis}. It's available
-at @uref{http://my.ispchannel.com/~pjarvis/xemacs.html,
-http://my.ispchannel.com/~pjarvis/xemacs.html}.
+8.5.1 by @email{pjarvis@@ispchannel.com, Pitts Jarvis}. It's available
+at @uref{http://my.ispchannel.com/~pjarvis/xemacs.html}.
@node Q1.0.12, Q1.0.13, Q1.0.11, Introduction
@unnumberedsubsec Q1.0.12: Is there a port of XEmacs to NextStep?
@node Q2.1.24, , Q2.1.23, Installation
@unnumberedsubsec Q2.1.24: XEmacs won't start without network. (NEW)
-Q2.1.23: Movemail on Linux does not work for XEmacs 19.15 and later.
If XEmacs starts when you're on the network, but fails when you're not
on the network, you may be missing a "localhost" entry in your
@end quotation
-@unnumberedsec 3.3: The Modeline
@node Q3.3.1, Q3.3.2, Q3.2.6, Customization
+@unnumberedsec 3.3: The Modeline
@unnumberedsubsec Q3.3.1: How can I make the modeline go away?
@lisp
* 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?
+Troubleshooting:
+* Q6.4.1:: XEmacs won't start on Windows. (NEW)
+
@end menu
@node Q6.0.1, Q6.0.2, MS Windows, MS Windows
@end itemize
-@node Q6.3.3, , Q6.3.2, MS Windows
+@node Q6.3.3, Q6.4.1, 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 Q6.4.1, ,Q6.3.3, MS Windows
+@unnumberedsec 6.3: Troubleshooting
+@unnumberedsubsec Q6.4.1 XEmacs won't start on Windows. (NEW)
+
+XEmacs relies on a process called "dumping" to generate a working
+executable. Under MS-Windows this process effectively fixes the memory
+addresses of information in the executable. When XEmacs starts up it tries
+to reserve these memory addresses so that the dumping process can be
+reversed - putting the information back at the correct addresses.
+Unfortunately some .dlls (For instance the soundblaster driver) occupy
+memory addresses that can conflict with those needed by the dumped XEmacs
+executable. In this instance XEmacs will fail to start without any
+explanation. Note that this is extremely machine specific.
+
+Work is being done on fixes for 21.1.* that will make more intelligent
+guesses about which memory addresses will be free and so this should
+cure the problem for most people.
+
+21.2 implements "portable dumping" which will eliminate the problem
+altogether.
@node Current Events, , MS Windows, Top
@unnumbered 7 What the Future Holds
are parsed.
* Init File:: How to write common customizations in the @file{.emacs}
file.
-* Audible Bell:: Changing how Emacs sounds the bell.
-* Faces:: Changing the fonts and colors of a region of text.
+* Audible Bell:: Changing how Emacs sounds the bell.
+* Faces:: Changing the fonts and colors of a region of text.
+* Frame Components:: Controlling the presence and positions of the
+ menubar, toolbars, and gutters.
* X Resources:: X resources controlling various aspects of the
behavior of XEmacs.
@end menu
@var{frame} argument is provided, the face is changed only in that
frame; otherwise, it is changed in all frames.
+@node Frame Components
+@section Frame Components
+
+You can control the presence and position of most frame components, such
+as the menubar, toolbars, and gutters.
+
+This section is not written yet. Try the Lisp Reference Manual:
+@ref{Menubar,,,lispref,}, @ref{Toolbar Intro,,,lispref,}, and
+@ref{Gutter Intro,,,lispref,}.
+
@node X Resources
@section X Resources
@cindex X resources
@subsection Menubar Resources
As the menubar is implemented as a widget which is not a part of XEmacs
-proper, it does not use the fac" mechanism for specifying fonts and
+proper, it does not use the face mechanism for specifying fonts and
colors: It uses whatever resources are appropriate to the type of widget
which is used to implement it.
that newly made backup is included in the count in @code{kept-new-versions}.
By default, both variables are 2.
-@vindex trim-versions-without-asking
- If @code{trim-versions-without-asking} is non-@code{nil}, excess
+@vindex delete-old-versions
+ If @code{delete-old-versions} is non-@code{nil}, excess
middle versions are deleted without notification. If it is @code{nil}, the
default, you are asked whether the excess middle versions should
really be deleted.
window}(@pxref{Echo Area}). It is used by XEmacs to exchange information
with the user. There is only one echo area per XEmacs frame.
@item
-If you are running XEmacs under the X Window System, a
+If you are running XEmacs under a graphical windowing system, a
menu bar at the top of the frame makes shortcuts to several of the
commands available (@pxref{Pull-down Menus}).
+@item
+If you are running XEmacs under a graphical windowing system, a
+toolbar at the top of the frame, just under the menu bar if it exists,
+provides ``one-touch'' shortcuts to several commands. (Not yet
+documented.)
+@item
+If you are running XEmacs under a graphical windowing system, a
+gutter at the top (under the toolbar) and/or bottom of the frame
+provides advanced GUI facilities like tab controls for rapid switching
+among related windows and progress bars for time-consuming operations
+like downloads across the Internet. Gutters are an experimental feature
+introduced in XEmacs version 21.2. (Not yet documented.)
@end itemize
You can subdivide the XEmacs frame into multiple text windows, and use
each corresponding to a top-level X window and each looking like
the screen on a TTY. Each frame contains one or more non-overlapping
Emacs windows (possibly with associated scrollbars, under X), an
-echo area, and (under X) possibly a menubar.
+echo area, and (under X) possibly a menubar, toolbar, and/or gutter.
@item Global
Global means `independent of the current environment; in effect
@node Help, Mark, M-x, Top
@chapter Help
+@kindex Help
@cindex help
@cindex self-documentation
+@findex help-command
+@kindex C-h
+@kindex F1
- Emacs provides extensive help features which revolve around a single
+ XEmacs provides extensive help features accessible through a single
character, @kbd{C-h}. @kbd{C-h} is a prefix key that is used only for
-documentation-printing commands. The characters you can type after
+documentation-printing commands. The characters that you can type after
@kbd{C-h} are called @dfn{help options}. One help option is @kbd{C-h};
-you use it to ask for help about using @kbd{C-h}.
+that is how you ask for help about using @kbd{C-h}. To cancel, type
+@kbd{C-g}. The function key @key{F1} is equivalent to @kbd{C-h}.
- @kbd{C-h C-h} prints a list of the possible help options, and then asks
-you to type the desired option. It prompts with the string:
+@kindex C-h C-h
+@findex help-for-help
+ @kbd{C-h C-h} (@code{help-for-help}) displays a list of the possible
+help options, and then asks you to type the desired option. It prompts
+with the string:
@smallexample
-A, B, C, F, I, K, L, M, N, S, T, V, W, C-c, C-d, C-n, C-w or C-h for more help:
+A B C F I K L M N P S T V W C-c C-d C-f C-i C-k C-n C-w; ? for more help:
@end smallexample
@noindent
Typing a third @kbd{C-h} displays a description of what the options mean;
Emacs still waits for you to type an option. To cancel, type @kbd{C-g}.
+ Most help buffers use a special major mode, Help mode, which lets you
+scroll conveniently with @key{SPC} and @key{DEL} or @key{BS}.
+
+@menu
+* Help Summary:: Brief list of all Help commands.
+* Key Help:: Asking what a key does in XEmacs.
+* Name Help:: Asking about a command, variable or function name.
+* Apropos:: Asking what pertains to a given topic.
+* Library Keywords:: Finding Lisp libraries by keywords (topics).
+* Help Mode:: Special features of Help mode and Help buffers.
+* Misc Help:: Other help commands.
+@end menu
+
+@iftex
+@node Help Summary, Help Summary, Help, Help
+@end iftex
+@ifinfo
+@node Help Summary, Key Help, Help, Help
+@section Help Summary
+@end ifinfo
+
Here is a summary of the defined help commands.
@table @kbd
-@item C-h a @var{string} @key{RET}
-Display a list of commands whose names contain @var{string}
-(@code{command-@*apropos}).@refill
+@item C-h a @var{regexp} @key{RET}
+Display a list of functions and variables whose names match @var{regexp}
+(@code{heper-apropos}).
+@item C-h A @var{regexp}
+Show all commands whose names contain matches for @var{regexp}
+(@code{command-apropos}).
@item C-h b
-Display a table of all key bindings currently in effect, with local bindings of
-the current major mode first, followed by all global bindings
-(@code{describe-bindings}).
+Display a table of all key bindings currently in effect, with local
+bindings of the current major mode first, followed by all global
+bindings (@code{describe-bindings}).
@item C-h c @var{key}
-Print the name of the command that @var{key} runs (@code{describe-key-@*briefly}).
-@kbd{c} is for `character'. For more extensive information on @var{key},
-use @kbd{C-h k}.
-@item C-h f @var{function} @key{RET}
+Print the name of the command that @var{key} runs
+(@code{describe-key-briefly}). Here @kbd{c} stands for `character'. For more
+extensive information on @var{key}, use @kbd{C-h k}.
+@item C-h d @var{function} @key{RET}
+@itemx C-h f @var{function} @key{RET}
Display documentation on the Lisp function named @var{function}
-(@code{describe-function}). Note that commands are Lisp functions, so
+(@code{describe-function}). Since commands are Lisp functions,
a command name may be used.
@item C-h i
Run Info, the program for browsing documentation files (@code{info}).
-The complete Emacs manual is available online in Info.
+The complete XEmacs manual is available online in Info.
@item C-h k @var{key}
-Display name and documentation of the command @var{key} runs (@code{describe-key}).
+Display the name and documentation of the command that @var{key} runs
+(@code{describe-key}).
@item C-h l
Display a description of the last 100 characters you typed
(@code{view-lossage}).
@item C-h m
Display documentation of the current major mode (@code{describe-mode}).
@item C-h n
-Display documentation of Emacs changes, most recent first
+@itemx C-h C-n
+Display documentation of XEmacs changes, most recent first
(@code{view-emacs-news}).
@item C-h p
+Find packages by topic keyword (@code{finder-by-keyword}).
+@item C-h C-p
Display a table of all mouse bindings currently in effect now, with
-local bindings of the current major mode first, followed by all global bindings
-(@code{describe-pointer}).
+local bindings of the current major mode first, followed by all global
+bindings (@code{describe-pointer}).
@item C-h s
Display current contents of the syntax table, plus an explanation of
-what they mean (@code{describe-syntax}).
+what they mean (@code{describe-syntax}). @xref{Syntax}.
@item C-h t
-Display the Emacs tutorial (@code{help-with-tutorial}).
+Enter the XEmacs interactive tutorial (@code{help-with-tutorial}).
@item C-h v @var{var} @key{RET}
Display the documentation of the Lisp variable @var{var}
-(@code{describe-@*variable}).
+(@code{describe-variable}).
@item C-h w @var{command} @key{RET}
Print which keys run the command named @var{command} (@code{where-is}).
-@item M-x apropos @var{regexp}
-Show all symbols whose names contain matches for @var{regexp}.
+@item C-h B @key{RET}
+Display info on how to deal with Beta versions of XEmacs
+(@code{describe-beta}).
+@item C-h C @var{group} @key{RET}
+Select customization buffer for @var{group} (@code{customize}).
+@item C-h F @key{RET}
+View the local copy of the XEmacs FAQ (@code{xemacs-local-faq}).
+@item C-h C-i @var{file} @key{RET}
+Read Info file @var{file} with Info browser (@code{Info-query}).
+@item C-h C-c @var{command} @key{RET}
+Look up an Emacs command @var{command} in the Emacs manual in the Info
+system (@code{Info-goto-emacs-command-node}).
+@item C-h C-f @var{function} @key{RET}
+Look up an Emacs Lisp function @var{function} in the Elisp manual in the
+Info system (@code{Info-elisp-ref}).
@end table
+@node Key Help, Name Help, Help Summary, Help
@section Documentation for a Key
@kindex C-h c
@findex describe-key-briefly
The most basic @kbd{C-h} options are @kbd{C-h c}
-(@code{describe-key-briefly}) and @kbd{C-h k}@*(@code{describe-key}).
-@kbd{C-h c @var{key}} prints the name of the command that @var{key} is
-bound to in the echo area. For example, @kbd{C-h c C-f} prints
+(@code{describe-key-briefly}) and @w{@kbd{C-h k}} (@code{describe-key}).
+@kbd{C-h c @var{key}} prints in the echo area the name of the command
+that @var{key} is bound to. For example, @kbd{C-h c C-f} prints
@samp{forward-char}. Since command names are chosen to describe what
-the command does, using this option is a good way to get a somewhat cryptic
-description of what @var{key} does.@refill
+the commands do, this is a good way to get a very brief description of
+what @var{key} does.
@kindex C-h k
@findex describe-key
selection. This information does not usually fit into the echo area, so a
window is used for the display.
+ @kbd{C-h c} and @kbd{C-h k} work for any sort of key sequences,
+including function keys and mouse events.
+
+@node Name Help, Apropos, Key Help, Help
@section Help by Command or Variable Name
@kindex C-h f
@code{describe-function} shows its arglist if the @var{function} is not
an autoload function.
- @kbd{C-h f} is also useful for Lisp functions you are planning to
-use in a Lisp program. For example, if you have just written the code
-@code{(make-vector len)} and want to make sure you are using
-@code{make-vector} properly, type @kbd{C-h f make-vector @key{RET}}. Because
-@kbd{C-h f} allows all function names, not just command names, you may find
-that some of your favorite abbreviations that work in @kbd{M-x} don't work
-in @kbd{C-h f}. An abbreviation may be unique among command names, yet fail
-to be unique when other function names are allowed.
-
-
-If you type @key{RET}, leaving the minibuffer empty, @kbd{C-h f} by
-default describes the function called by the innermost Lisp expression
-in the buffer around point, @i{provided} that that is a valid, defined Lisp
-function name. For example, if point is located following the text
+ @kbd{C-h f} is also useful for Lisp functions that you are planning to
+use in a Lisp program. For example, if you have just written the
+expression @code{(make-vector len)} and want to make sure you are using
+@code{make-vector} properly, type @kbd{C-h f make-vector @key{RET}}.
+Because @kbd{C-h f} allows all function names, not just command names,
+you may find that some of your favorite abbreviations that work in
+@kbd{M-x} don't work in @kbd{C-h f}. An abbreviation may be unique
+among command names, yet fail to be unique when other function names are
+allowed.
+
+ The function name for @kbd{C-h f} to describe has a default which is
+used if you type @key{RET} leaving the minibuffer empty. The default is
+the function called by the innermost Lisp expression in the buffer
+around point, @emph{provided} that is a valid, defined Lisp function
+name. For example, if point is located following the text
@samp{(make-vector (car x)}, the innermost list containing point is the
-one starting with @samp{(make-vector}, so the default is to describe
-the function @code{make-vector}.
+one that starts with @samp{(make-vector}, so the default is to describe the
+function @code{make-vector}.
@kbd{C-h f} is often useful just to verify that you have the right
-spelling for the function name. If @kbd{C-h f} mentions a default in the
-prompt, you have typed the name of a defined Lisp function. If that is
-what you wanted to know, just type @kbd{C-g} to cancel the @kbd{C-h f}
-command and continue editing.
+spelling for the function name. If @kbd{C-h f} mentions a name from the
+buffer as the default, that name must be defined as a Lisp function. If
+that is all you want to know, just type @kbd{C-g} to cancel the @kbd{C-h
+f} command, then go on editing.
@kindex C-h w
@findex where-is
- @kbd{C-h w @var{command} @key{RET}} (@code{where-s}) tells you what
+ @kbd{C-h w @var{command} @key{RET}} (@code{where-is}) tells you what
keys are bound to @var{command}. It prints a list of the keys in the
-echo area. Alternatively, it informs you that a command is not bound to
-any keys, which implies that you must use @kbd{M-x} to call the
-command.@refill
+echo area. Alternatively, it informs you that a command is not bound to
+any keys, which implies that you must use @kbd{M-x} to call the
+command.
@kindex C-h v
@findex describe-variable
@kbd{C-h v} (@code{describe-variable}) is like @kbd{C-h f} but
describes Lisp variables instead of Lisp functions. Its default is the
Lisp symbol around or before point, if that is the name of a known Lisp
-variable. @xref{Variables}.@refill
+variable. @xref{Variables}.
+@node Apropos, Library Keywords, Name Help, Help
@section Apropos
-@kindex C-h a
+@kindex C-h A
@findex command-apropos
-@cindex apropos
+@cindex apropos
@table @kbd
-@item C-h a
+@item C-h A
Show only symbols that are names of commands
-(@code{command-apropos}).@refill
+(@code{command-apropos}).
@item M-x apropos @var{regexp}
Show all symbols whose names comtain matches for @var{regexp}.
@end table
- It is possible to ask a question like, ``What are the commands for
-working with files?'' To do this, type @kbd{C-h a file @key{RET}},
-which displays a list of all command names that contain @samp{file},
-such as @code{copy-file}, @code{find-file}, and so on. With each
-command name a brief description of its use and information on the keys
-you can use to invoke it is displayed. For example, you would be
-informed that you can invoke @code{find-file} by typing @kbd{C-x C-f}.
-The @kbd{a} in @kbd{C-h a} stands for `Apropos'; @kbd{C-h a} runs the
-Lisp function @code{command-apropos}.@refill
-
- Because @kbd{C-h a} looks only for functions whose names contain the
+ A more sophisticated sort of question to ask is, ``What are the
+commands for working with files?'' To ask this question, type @kbd{C-h
+a file @key{RET}}, which displays a list of all command names that
+contain @samp{file}, including @code{copy-file}, @code{find-file}, and
+so on. With each command name appears a brief description of how to use
+the command, and what keys you can currently invoke it with. For
+example, it would say that you can invoke @code{find-file} by typing
+@kbd{C-x C-f}. The @kbd{A} in @kbd{C-h A} stands for `Apropos';
+@kbd{C-h A} runs the command @code{command-apropos}. This command
+normally checks only commands (interactive functions); if you specify a
+prefix argument, it checks noninteractive functions as well.
+
+ Because @kbd{C-h A} looks only for functions whose names contain the
string you specify, you must use ingenuity in choosing the string. If
you are looking for commands for killing backwards and @kbd{C-h a
-kill-backwards @key{RET}} doesn't reveal any commands, don't give up.
-Try just @kbd{kill}, or just @kbd{backwards}, or just @kbd{back}. Be
-persistent. Pretend you are playing Adventure. Also note that you can
-use a regular expression as the argument (@pxref{Regexps}).
+kill-backwards @key{RET}} doesn't reveal any, don't give up. Try just
+@kbd{kill}, or just @kbd{backwards}, or just @kbd{back}. Be persistent.
+Pretend you are playing Adventure. Also note that you can use a regular
+expression as the argument, for more flexibility (@pxref{Regexps}).
Here is a set of arguments to give to @kbd{C-h a} that covers many
-classes of Emacs commands, since there are strong conventions for naming
-standard Emacs commands. By giving you a feeling for the naming
-conventions, this set of arguments can also help you develop a
-technique for picking @code{apropos} strings.
+classes of XEmacs commands, since there are strong conventions for
+naming the standard XEmacs commands. By giving you a feel for the
+naming conventions, this set should also serve to aid you in developing
+a technique for picking @code{apropos} strings.
@quotation
char, line, word, sentence, paragraph, region, page, sexp, list, defun,
-buffer, frame, window, file, dir, register, mode,
-beginning, end, forward, backward, next, previous, up, down, search, goto,
-kill, delete, mark, insert, yank, fill, indent, case,
-change, set, what, list, find, view, describe.
+rect, buffer, frame, window, face, file, dir, register, mode, beginning,
+end, forward, backward, next, previous, up, down, search, goto, kill,
+delete, mark, insert, yank, fill, indent, case, change, set, what, list,
+find, view, describe, default.
@end quotation
@findex apropos
To list all Lisp symbols that contain a match for a regexp, not just
the ones that are defined as commands, use the command @kbd{M-x apropos}
-instead of @kbd{C-h a}.
+instead of @kbd{C-h A}. This command does not check key bindings by
+default; specify a numeric argument if you want it to check them.
+
+@findex apropos-documentation
+ The @code{apropos-documentation} command is like @code{apropos} except
+that it searches documentation strings for matches for the specified
+regular expression.
+
+@findex apropos-value
+ The @code{apropos-value} command is like @code{apropos} except that it
+searches symbols' values for matches for the specified regular
+expression. This command does not check function definitions or
+property lists by default; specify a numeric argument if you want it to
+check them.
+
+@vindex apropos-do-all
+ If the variable @code{apropos-do-all} is non-@code{nil}, the commands
+above all behave as if they had been given a prefix argument.
+
+ If you want more information about a function definition, variable or
+symbol property listed in the Apropos buffer, you can click on it with
+@kbd{Mouse-2} or move there and type @key{RET}.
+
+@node Library Keywords, Help Mode, Apropos, Help
+@section Keyword Search for Lisp Libraries
+
+@kindex C-h p
+@findex finder-by-keyword
+The @kbd{C-h p} command lets you search the standard Emacs Lisp
+libraries by topic keywords. Here is a partial list of keywords you can
+use:
+
+@display
+abbrev abbreviation handling, typing shortcuts, macros
+bib code related to the `bib' bibliography processor
+c C, C++, and Objective-C language support
+calendar calendar and time management support
+comm communications, networking, remote access to files
+data support for editing files of data
+docs support for Emacs documentation
+dumped files preloaded into Emacs
+emulations emulations of other editors
+extensions Emacs Lisp language extensions
+faces support for multiple fonts
+frames support for Emacs frames and window systems
+games games, jokes and amusements
+hardware support for interfacing with exotic hardware
+help support for on-line help systems
+hypermedia support for links between text or other media types
+i18n internationalization and alternate character-set support
+internal code for Emacs internals, build process, defaults
+languages specialized modes for editing programming languages
+lisp Lisp support, including Emacs Lisp
+local code local to your site
+maint maintenance aids for the Emacs development group
+mail modes for electronic-mail handling
+matching various sorts of searching and matching
+mouse mouse support
+mule multi-language extensions
+news support for netnews reading and posting
+oop support for object-oriented programming
+outlines support for hierarchical outlining
+processes process, subshell, compilation, and job control support
+terminals support for terminal types
+tex code related to the TeX formatter
+tools programming tools
+unix front-ends/assistants for, or emulators of, UNIX features
+vms support code for vms
+wp word processing
+@end display
+
+@node Help Mode, Misc Help, Library Keywords, Help
+@section Help Mode Commands
+
+ Help buffers provide the commands of View mode (@pxref{Misc File
+Ops}), plus a few special commands of their own.
+@table @kbd
+@item @key{SPC}
+Scroll forward.
+@item @key{DEL}
+@itemx @key{BS}
+Scroll backward.
+@c @item @key{RET}
+@c Follow a cross reference at point.
+@c @item @key{TAB}
+@c Move point forward to the next cross reference.
+@c @item S-@key{TAB}
+@c Move point back to the previous cross reference.
+@c @item Mouse-2
+@c Follow a cross reference that you click on.
+@end table
+
+ When a command name (@pxref{M-x,, Running Commands by Name}) or
+variable name (@pxref{Variables}) appears in the documentation, it
+normally appears inside paired single-quotes.
+
+@node Misc Help, , Help Mode, Help
@section Other Help Commands
@kindex C-h i
@findex info
+@cindex Info
+@cindex manuals, on-line
+@cindex on-line manuals
@kbd{C-h i} (@code{info}) runs the Info program, which is used for
-browsing through structured documentation files. The entire Emacs manual
+browsing through structured documentation files. The entire XEmacs manual
is available within Info. Eventually all the documentation of the GNU
system will be available. Type @kbd{h} after entering Info to run
a tutorial on using Info.
+ If you specify a numeric argument, @kbd{C-h i} prompts for the name of
+a documentation file. This way, you can browse a file which doesn't
+have an entry in the top-level Info menu. It is also handy when you
+need to get to the documentation quickly, and you know the exact name of
+the file.
+
+@kindex C-h C-f
+@kindex C-h C-k
+@findex Info-elisp-ref
+@findex Info-goto-emacs-command-node
+ There are two special help commands for accessing XEmacs documentation
+through Info. @kbd{C-h C-f @var{function} @key{RET}} enters Info and
+goes straight to the documentation of the XEmacs function
+@var{function}. @kbd{C-h C-k @var{key}} enters Info and goes straight
+to the documentation of the key @var{key}. These two keys run the
+commands @code{Info-elisp-ref} and
+@code{Info-goto-emacs-key-command-node}.
+
@kindex C-h l
@findex view-lossage
If something surprising happens, and you are not sure what commands you
typed, use @kbd{C-h l} (@code{view-lossage}). @kbd{C-h l} prints the last
-100 command characters you typed. If you see commands you don't
-know, use @kbd{C-h c} to find out what they do.
+100 command characters you typed in. If you see commands that you don't
+know, you can use @kbd{C-h c} to find out what they do.
@kindex C-h m
@findex describe-mode
- Emacs has several major modes. Each mode redefines a few keys and
+ XEmacs has several major modes. Each mode redefines a few keys and
makes a few other changes in how editing works. @kbd{C-h m}
(@code{describe-mode}) prints documentation on the current major mode,
which normally describes all the commands that are changed in this mode.
@kindex C-h b
@findex describe-bindings
@kbd{C-h b} (@code{describe-bindings}) and @kbd{C-h s}
-(@code{describe-syntax}) present information about the current Emacs
+(@code{describe-syntax}) present information about the current XEmacs
mode that is not covered by @kbd{C-h m}. @kbd{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 (@pxref{Key
+all the key bindings currently in effect, with the local bindings of the
+current major mode first, followed by the global bindings (@pxref{Key
Bindings}). @kbd{C-h s} displays the contents of the syntax table with
-explanations of each character's syntax (@pxref{Syntax}).@refill
+explanations of each character's syntax (@pxref{Syntax}).
+
+ You can get a similar list for a particular prefix key by typing
+@kbd{C-h} after the prefix key. (There are a few prefix keys for which
+this does not work---those that provide their own bindings for
+@kbd{C-h}. One of these is @key{ESC}, because @kbd{@key{ESC} C-h} is
+actually @kbd{C-M-h}, which marks a defun.)
+@kindex C-h F
+@findex xemacs-local-faq
@kindex C-h n
@findex view-emacs-news
@kindex C-h t
@kindex C-h C-w
@findex describe-no-warranty
The other @kbd{C-h} options display various files of useful
-information. @kbd{C-h C-w} (@code{describe-no-warranty}) displays
-details on the complete absence of warranty for XEmacs. @kbd{C-h n}
-(@code{view-emacs-news}) displays the file @file{emacs/etc/NEWS}, which
-contains documentation on Emacs changes arranged chronologically.
-@kbd{C-h t} (@code{help-with-tutorial}) displays the learn-by-doing
-Emacs tutorial. @kbd{C-h C-c} (@code{describe-copying}) displays the file
-@file{emacs/etc/COPYING}, which tells you the conditions you must obey
-in distributing copies of Emacs. @kbd{C-h C-d}
+information. @kbd{C-h C-w} (@code{describe-no-warranty}) displays the
+full details on the complete absence of warranty for XEmacs. @kbd{C-h
+n} (@code{view-emacs-news}) displays the file @file{xemacs/etc/NEWS},
+which contains documentation on XEmacs changes arranged chronologically.
+@kbd{C-h F} (@code{xemacs-local-faq}) displays local version of the
+XEmacs frequentliy-answered-questions-list. @kbd{C-h t}
+(@code{help-with-tutorial}) displays the learn-by-doing XEmacs
+tutorial. @kbd{C-h C-c} (@code{describe-copying}) displays the file
+@file{xemacs/etc/COPYING}, which tells you the conditions you must obey
+in distributing copies of XEmacs. @kbd{C-h C-d}
(@code{describe-distribution}) displays another file named
-@file{emacs/etc/DISTRIB}, which tells you how you can order a copy of
-the latest version of Emacs.@refill
+@file{xemacs/etc/DISTRIB}, which tells you how you can order a copy of
+the latest version of XEmacs.
Registers
-* RegPos:: Saving positions in registers.
-* RegText:: Saving text in registers.
-* RegRect:: Saving rectangles in registers.
+* Position: RegPos. Saving positions in registers.
+* Text: RegText. Saving text in registers.
+* Rectangle: RegRect. Saving rectangles in registers.
+* Configurations: RegConfig. Saving window configurations in registers.
+* Files: RegFiles. File names in registers.
+* Numbers: RegNumbers. Numbers in registers.
+* Bookmarks:: Bookmarks are like registers, but persistent.
Controlling the Display
+2000-05-01 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.33 is released.
+
+2000-04-27 Ben Wing <ben@xemacs.org>
+
+ * xemacs.mak: combine auto-autoloads.el and custom.el update into
+ one call to xemacs.
+
+2000-04-26 Ben Wing <ben@xemacs.org>
+
+ * xemacs.mak: put in support for QUICK_BUILD.
+
+ * config.inc.samp: put in an entry for QUICK_BUILD.
+
+2000-04-23 Ben Wing <ben@xemacs.org>
+
+ * xemacs.mak: Modified section that dumps .exe to not dump
+ when nothing has changed. It does this by relying on a flag
+ set by update-elcs.
+
+ Also in building of auto-autoloads.el, we no longer unconditionally
+ remove the old one. That was pointless and made the whole build
+ procedure a lot longer -- the autoload code is smart enough to
+ update itself automatically from an out-of-date autoload file.
+
+2000-04-04 Kirill 'Big K' Katsnelson <kkm@dtmx.com>
+
+ * xemacs.mak: Build the i utility and use it to pipe windowed
+ [xt]emacs output to the build console.
+
+2000-03-25 Didier Verna <didier@xemacs.org>
+
+ * config.h: handle the renaming of `foo_h_path' to `foo_h_file'.
+
+2000-03-22 Mike Alexander <mta@arbortext.com>
+
+ * xemacs.mak (PROGRAM_DEFINES): Define EMACS_VERSION and
+ EMACS_PROGNAME
+ (DEPEND): Don't try to create $(OUTDIR) if it already exists
+ ($(SRC)\dump-id.c): Make it
+ (DOC_SRC11): Add dumper.c if portable dumping
+ (dump-xemacs): Make portable dumping work again and create
+ dump-id.c and compile it whenever we do a portable dump.
+ (depend): Change $(SRCDIR) to $(SRC)
+
+2000-03-22 Jonathan Harris <jhar@tardis.ed.ac.uk>
+
+ * .cvsignore: New file, ignores user's config.inc and files
+ containing the user's DevStudio workspace info.
+
+ * config.h.samp: Added DEPEND option. Renamed HAVE_MSW and HAVE_X to
+ HAVE_MS_WINDOWS and HAVE_X_WINDOWS.
+
+ * README: Documented DEPEND option. Other small changes.
+
+ * Todo: Removed - was hopelessly out of date.
+
+ * config.h.samp:
+ * xemacs.mak: Added DEPEND option to control use of dependency
+ information generated by make-src-depend. Requires Perl. Defaults
+ to disabled. Renamed HAVE_MSW and HAVE_X to HAVE_MS_WINDOWS and
+ HAVE_X_WINDOWS as a side-effect.
+ Handles '&' in XEmacs codenames by replacing with 'and'.
+
+ * xemacs.dsp:
+ Correct Output_Dir so that DevStudio finds the xemacs executable
+ by default.
+
+2000-03-20 Ben Wing <ben@xemacs.org>
+
+ * README: Substantial rewrite.
+ * xemacs.mak: Pdump fix. (not working yet, though)
+
+2000-03-20 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.32 is released.
+
+2000-03-15 Mike Alexander <mta@arbortext.com>
+
+ * xemacs.mak: Fix for generation of $(XEMACS)\Installation.
+
+2000-03-14 Adrian Aichner <adrain@xemacs.org>
+
+ * xemacs.mak (LIB_SRC_TOOLS): LIB_SRC_TOOLS depend on
+ XEMACS_INCLUDES when we USE_PORTABLE_DUMPER.
+
+2000-03-13 Ben Wing <ben@xemacs.org>
+
+ * xemacs.mak (TEMACS_ENTRYPOINT):
+ Fix for portable dumper.
+
+2000-03-12 Ben Wing <ben@xemacs.org>
+
+ * xemacs.mak (*):
+ * config.inc: New.
+
+ a) Added a file called config.inc which makes it easier to set
+ build options for MS Windows. (Previously, the only way to do this
+ was through command line options to nmake.)
+
+ b) Cleaned the file up a bit.
+
+ c) Changed xemacs to be a windows application and not a console
+ application, now that runemacs.exe is no longer necessary.
+
+ d) Added support for building the tags file.
+
+ * xemacs.dsw: New.
+ * xemacs.dsp: New.
+ For compiling, editing, and debugging XEmacs using the VC++ 5.0
+ GUI. They may well work under other versions of VC++, but I don't
+ have access to them to test them.
+
+2000-03-11 Andy Piper <andy@xemacs.org>
+
+ * PROBLEMS: Doc fix from Reini Urban <rurban@x-ray.at>.
+
+2000-02-27 Mike Alexander <mta@arbortext.com>
+
+ * xemacs.rc: Include the portable dump data if INCLUDE_DUMP is defined
+
+ * xemacs.mak: Add the portable dump data to the EXE as a resource
+
+2000-03-07 Jonathan Harris <jhar@tardis.ed.ac.uk>
+
+ * xemacs.mak (TEMACS_LIBS): Add ole32.lib and uuid.lib.
+ (installation): Always regenerate installation report.
+
+2000-02-25 Craig Lanning <CraigL@DyCon.com>
+
+ * inc\sys\time.h: MinGW defines struct timeval in <winsock.h>.
+
+2000-02-24 Martin Buchholz <martin@xemacs.org>
+
+ * config.h (INLINE_HEADER): Define properly (?) for Windows.
+
+2000-02-23 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.31 is released.
+
+2000-02-22 Martin Buchholz <martin@xemacs.org>
+
+ * config.h (gc_checking_assert): New.
+
+2000-02-21 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.30 is released.
+
+2000-02-21 Jonathan Harris <jhar@tardis.ed.ac.uk>
+
+ * README: Tidy up.
+ Document need for makeinfo program or texinfo package.
+
+ * Xmd.patch: New file, previously in README.
+
+2000-02-17 Martin Buchholz <martin@xemacs.org>
+
+ * config.h: Delete unused HAVE_LINUX_VERSION_H.
+
+2000-02-16 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.29 is released.
+
+2000-02-06 Mike Alexander <mta@arbortext.com>
+
+ * xemacs.mak (install): Copy xemacs.dmp if using the portable
+ dumper.
+
2000-02-07 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.28 is released.
* xemacs.mak (SRCDIR): Make path to xemacs absolute to
facilitate building info in man subdirs. Echo all cd commands,
- not just some of them.
+ not just some of them.
(makeinfo-test): Test for availability of `texinfo' package to
build info. Recommend use of external `makeinfo' program for
1999-06-05 Norbert Koch <n.koch@delta-ii.de>
* xemacs.mak (mule): remove dependencies from mule-coding.c
-
+
1999-06-11 XEmacs Build Bot <builds@cvs.xemacs.org>
* XEmacs 21.2.16 is released
1999-05-31 Andy Piper <andy@xemacs.org>
* xemacs.mak: add select & select-x targets.
-
+
1999-05-14 XEmacs Build Bot <builds@cvs.xemacs.org>
* XEmacs 21.2.14 is released
report" did.
1999-04-29 Andy Piper <andy@xemacs.org>
-
+
* sys/file.h: conditionalise definition of X_OK.
-
+
1999-03-12 XEmacs Build Bot <builds@cvs.xemacs.org>
* XEmacs 21.2.13 is released
1998-12-13 Jonathan Harris <jhar@tardis.ed.ac.uk>
* xemacs.mak:
- Replaced PACKAGEPATH variable with PACKAGE_PREFIX.
+ Replaced PACKAGEPATH variable with PACKAGE_PREFIX.
configure-package-path is initialised to contain
subdirectories of PACKAGE_PREFIX. The install target makes
a skeleton package tree under PACKAGE_PREFIX.
1998-12-07 Martin Buchholz <martin@xemacs.org>
* xemacs.mak (TEMACS_OBJS):
- (DOC_SRC4):
+ (DOC_SRC4):
- Remove pure.c, pure.obj
1998-11-04 Adrian Aichner <adrian@xemacs.org>
* xemacs.mak: change "copy" to "xcopy" in install target
-1998-08-04 Jeff Sparkes <jsparkes@internetivity.com>
+1998-08-04 Jeff Sparkes <jsparkes@internetivity.com>
* xemacs.mak: Link in PNG, TIFF and JPEG in native build.
1998-05-20 Kirill M. Katsnelson <kkm@kis.ru>
- * xemacs.mak: Unified -nologo compiler switch handling and lib-src
+ * xemacs.mak: Unified -nologo compiler switch handling and lib-src
programs build (only make-docfile currently, adding other tools
- soon).
+ soon).
1998-05-23 Kirill M. Katsnelson <kkm@kis.ru>
1998-04-10 Kirill M. Katsnelson <kkm@kis.ru>
* config.h: Do not USE_ASSERTION when DEBUG_XEMACS is not
- defined.
+ defined.
* xemacs.mak: Added new file process-nt.c
1998-03-19 Kirill M. Katsnelson <kkm@kis.ru>
- * xemacs.mak: HAVE_FILE_CODING removed: it is no longer an option,
+ * xemacs.mak: HAVE_FILE_CODING removed: it is no longer an option,
since file I/O depends on it, and defined unconditioanlly in
src/s/windowsnt.h.
Added -nologo switch to different tools here and there.
* config.h: removed #define HAVE_UNIXOID_EVENT_LOOP
Thu December 04 1997 jhar@tardis.ed.ac.uk
-
+
* xemacs.mak: Define DEBUG_XEMACS when compiling with debug.
Tue November 29 12:29:33 1997 davidh
- Rewrote timeout code, eliminating "!NILP(rest)" bug.
- Special processing for 'Ctrl-@' keystroke.
- Support for some new keysyms.
-
+
Mon December 01 1997 jhar
* xemacs.mak:
- Add PACKAGE_PATH and EMACS_BETA_VERSION defines.
- Automatically copy changed include files from \nt to \src.
- Corrected some DOC_SRC* lists.
-
+
Tue November 18 21:45:06 1997 davidh
* xemacs.mak updated to remove dependency on startup.elc
Thu September 25 23:06:44 1997 davidh
* xemacs.mak updated to make the build as simple as typing
- nmake -f xemacs.mak. Also support for native gui included
+ nmake -f xemacs.mak. Also support for native gui included
which should mean the w32 directory is no longer required.
* config.h synced with config.h.in from 20.3-b2
Thu September 25 23:06:44 1997 davidh
* August Hill provided a patch to xemacs.mak to greatly simplify
- the build - the DOC file gets created correctly.
+ the build - the DOC file gets created correctly.
Tue September 22 23:06:44 1997 davidh
* nt/TODO created.
* nt/X11.patch created to help with the X build.
-
+
* August Hill provided:
a patch to fix the _WRETCODE undefined symbol,
a patch to fix a problem with dired
use the macro, I decided this would be easiest.
* Modified src/fileio.c to only open files in O_BINARY. This
- causes files to be opened and written without automatically
+ causes files to be opened and written without automatically
writing ^M 's to the end of each line. MULE ought to sort this
in theory, but I am less than convinced.
Thu Mar 13 00:19:25 1997 marcpa (marcpa at MARCPA)
- * At end of compilation, there are some unresolved symbols:
+ * At end of compilation, there are some unresolved symbols:
link.exe @C:\TEMP\nma00115.
sysdep.obj : error LNK2001: unresolved external symbol _vfork
@@ -150,8 +150,9 @@
typedef CARD16 BITS16;
typedef CARD8 BYTE;
-
+
+#ifndef WIN32
typedef CARD8 BOOL;
-
+#endif
* cpp.exe not used: cl.exe from VC++4.2 seems to handle everything
- properly.
-
+ properly.
Function XEmacs binding
-------- --------------
Undo C-_
- Cut C-Insert
- Copy C-Insert
- Paste Sh-Del
+ Cut Sh-Del
+ Copy C-Insert
+ Paste Sh-Insert
You can rebind keys to make XEmacs more Windows-compatible; for
example, to bind C-z to undo:
- Building and Installing XEmacs on Windows NT
+Building and Installing XEmacs on Windows 95/98/NT -*- mode:outline -*-
David Hobley
- Marc Paquette
- Jonathan Harris
+ Marc Paquette
+ Jonathan Harris
+ Ben Wing
-The port was made much easier by the groundbreaking work of Geoff Voelker
-and others who worked on the GNU Emacs port to NT. Their version is available
-from http://www.cs.washington.edu/homes/voelker/ntemacs.html
+This is a port of XEmacs to Windows 95/98/NT. If you are looking for a port
+of GNU Emacs, see http://www.cs.washington.edu/homes/voelker/ntemacs.html.
-To get it working you will need:
-1. You will need Visual C++ V4.0 or later to compile everything. Personally we
- have tested V4.0, V4.2 and V5.0.
- Note that Visual C++ assumes a couple of environment variables INCLUDE and
- LIB to be set which specify the location of the includes and libraries.
- Your PATH environment variable also needs to include the DevStudio vc\bin
- and sharedide\bin directories.
+* Required tools and sources
+============================
+
+1. You will need Visual C++ V4.0 or later to compile everything. Personally
+ we have tested V4.0, V4.2, V5.0 and v6.0.
+
+ Note that Visual C++ assumes that the environment variables INCLUDE and
+ LIB are set to specify the location of the includes and libraries.
+ Your PATH environment variable also needs to include the DevStudio
+ vc\bin and sharedide\bin directories.
+
Visual C++ V5.0 installs a batch file called vcvars32.bat in
c:\Program Files\DevStudio\VC\bin\ (or wherever you installed it) that you
can run before building to set up all of these environment variables.
-2. Grab the latest XEmacs source from ftp.xemacs.org if necessary. All Win32
- support is in the nt\ subdirectory. You'll also need the xemacs-base
- package from the binary-packages subdirectory and you'll probably also
- want at least the edit-utils, text-modes, fsf-compat, cc-mode,
- prog-modes and xemacs-devel packages.
- Unpack the packages into, say, "c:\Program Files\XEmacs\xemacs-packages".
+2. Grab the latest XEmacs source from
+
+ ftp://ftp.xemacs.org/pub/xemacs/
+
+ or one of its mirrors listed at http://www.xemacs.org/Download/index.html .
+
+ You'll also need the packages. You probably want to get the unified
+ packages bundle from
+
+ ftp://ftp.xemacs.org/pub/xemacs/packages/xemacs-sumo.tar.gz
+
+ Although we don't recommend it, you can also retrieve just the packages
+ you really need if you have an extremely slow net connection or are very
+ short on disk space. You can find the various packages in
+ ftp://ftp.xemacs.org/pub/xemacs/packages/. You will need the
+ xemacs-base package. You'll also need the texinfo package unless you
+ have a copy of makeinfo.exe on your machine. If you want to download
+ additional or updated packages from within XEmacs you'll need the efs,
+ dired and vm packages. You'll probably also want at least the
+ edit-utils, text-modes, fsf-compat, cc-mode, prog-modes and xemacs-devel
+ packages.
+
+ Unpack the packages into "x:\your\choice\XEmacs\xemacs-packages",
+ for example "c:\Program Files\XEmacs\xemacs-packages".
+
+3. At this point you can choose to build for X and/or for Win32 native GUI.
+ If you only want to build for the Win32 native GUI then skip the next
+ section.
+
+
+** Extra tools and sources required for X
+
+If you want support for X you will also need:
+
+1. An X server. MI/X is available on the Internet as trialware; it is
+ available from: http://www.microimages.com/www/html/mix/
+
+2. Source for the MIT X11R6.3 libraries, available from: ftp.x.org
+
+3. You'll need to compile the MIT libraries without multi-thread support.
+ To do this, there is an example Win32.cf and site.def provided which set
+ the relevant flags. You will also need to apply the patch in nt/X11.patch
+ in the xc/lib/X11 directory which will fix the DLL definition file.
+
+ Once compiled and installed, you will need to apply the patch in
+ nt/Xmd.patch. This is messy and better solutions would be appreciated.
-3. At this point you can select X or Win32 native GUI support.
+4. Goto step 2 under 'Optional libraries' below.
-If you want to build for native GUI:
-1. If you want XPM image and toolbar support grab the latest version of the
- xpm sources (xpm-3.4k.tar.gz at time of writing) and unpack them somewhere.
+* Optional libraries
+====================
+
+1. You really want the XPM library. Grab the latest version of the
+ xpm sources (xpm-3.4k.tar.gz at time of writing) from
+ ftp://ftp.xemacs.org/pub/xemacs/aux/ and unpack them somewhere.
Copy nt\xpm.mak from the xemacs sources to the lib subdirectory of the
xpm sources, cd to that directory and build xpm with 'nmake -f xpm.mak'.
2. You probably also want PNG image support. Grab the latest versions of zlib
- and libpng (zlib-1.1.3 and libpng-1.0.2 at time of writing), unpack them
- somewhere and read the respective READMEs for details on how to build them.
- The following build procedure works for zlib-1.1.3 and libpng-1.0.2:
+ and libpng (zlib-1.1.3 and libpng-1.0.2 at time of writing) from
+ ftp://ftp.xemacs.org/pub/xemacs/aux/, unpack them somewhere and read
+ the respective READMEs for details on how to build them. The following
+ build procedure works for zlib-1.1.3 and libpng-1.0.2:
cd to the zlib directory, type 'copy msdos\makefile.w32 Makefile' and
then type 'nmake'.
and type 'nmake -f scripts\makefile.w32'.
3. If you want TIFF support, grap the latest version of libtiff (tiff-v3.4
- at time of writing) and unpack it somewhere. Copy nt\tiff.mak from the
- xemacs sources to the contrib\winnt subdirectory of the tiff sources,
- cd to that directory and build libtiff with 'nmake -f tiff.mak'. Note:
- tiff.mak has only been verified to work under WinNT, not Win95 or 98.
- However, the lastest distribution of libtiff includes a
- contrib\win95\makefile.w95; that might work.
+ at time of writing) from ftp://ftp.xemacs.org/pub/xemacs/aux/ and unpack
+ it somewhere. Copy nt\tiff.mak from the xemacs sources to the
+ contrib\winnt subdirectory of the tiff sources, cd to that directory and
+ build libtiff with 'nmake -f tiff.mak'. Note: tiff.mak has only been
+ verified to work under WinNT, not Win95 or 98. However, the lastest
+ distribution of libtiff includes a contrib\win95\makefile.w95; that might
+ work.
4. If you want JPEG support grab the latest version of jpegsrc (jpeg-6b at
- time of writing) and read the README for details on how to build it.
-
-5. If you want X-Face support, grab compface distribution and unpack it
- somewhere. Copy nt\compface.mak from xemacs sources to the compface
- directory. cd to that directory and build libcompface with
- 'nmake -f compface.mak'.
-
-6. cd to the nt subdirectory of the xemacs distribution and build xemacs:
- `nmake install -f xemacs.mak`, but read on before hitting Enter.
-
-7. If you're building with XPM support, add this to the nmake command line:
- HAVE_XPM=1 XPM_DIR="x:\location\of\your\xpm\sources"
- and similarly for JPEG and TIFF support.
-
- If you're building with PNG support, add this to the nmake command line:
- HAVE_PNG=1 PNG_DIR="x:\location\of\your\png\sources"
- ZLIB_DIR="x:\location\of\your\zlib\sources"
-
- If you want to build with GIF support, add this to the nmake command line:
- HAVE_GIF=1
-
- If you're building with X-Face support, add this to the nmake command line:
- HAVE_XFACE=1 COMPFACE_DIR="x:\location\of\your\compface\sources"
-
-8. By default, XEmacs will expect to find its packages in the subdirectories
- "site-packages", "mule-packages" and "xemacs-packages" under the package
- prefix directory "c:\Program Files\XEmacs". If you want it to look for
- these subdirectories elsewhere, add this to the nmake command line:
- PACKAGE_PREFIX="x:\your\package\directory"
- If you change your mind and want to alter the package prefix directory
- after you've built XEmacs, delete the file .\obj\emacs.obj and rebuild with
- the new PACKAGE_PREFIX.
-
-9. By default, XEmacs will be installed in directories under the directory
- "c:\Program Files\XEmacs\XEmacs-21.0". If you want to install it elsewhere,
- add this to the nmake command line:
- INSTALL_DIR="x:\your\installation\directory"
-
-10. Now you can press Enter. nmake will build temacs, the DOC file, update the
- elc's, dump xemacs and install the relevant files in the directories under
- the installation directory. Unless you set INSTALL_DIR above, the file that
- you should run to start XEmacs will be installed as
- "c:\Program Files\XEmacs\XEmacs-21.0\i386-pc-win32\runemacs.exe". You may
- want to create a shortcut to that file from your Desktop or Start Menu.
-
-11. The build process always creates debugging and "Source Browser" information
- in the source tree for use with MS DevStudio. If you actually want to debug
- XEmacs you should run XEmacs from the source directory instead of from the
- installation directory. You should probably also build a debug version of
- XEmacs; to do this start with a clean source tree and add DEBUG_XEMACS=1 to
- the nmake command line. You probably don't want to install your debug build
- so you should tell nmake to build the 'all' target instead of the 'install'
- target.
-
- To make use of the debugging and "Source Browser" information, create a new
- "console" project in MS DevStudio and, under Project/Settings, set:
- Debug: executable name = full path of src\xemacs.exe
- Link: output file name = full path of src\temacs.exe
- Browse Info: browse info file name = full path of src\temacs.bsc
- Remember to close the Source Browser file in DevStudio before rebuilding.
-
-
-If you want support for X you will need:
-
-1. An X server. MI/X is available on the Internet for free; It is
- available from: http://www.microimages.com/www/html/freestuf/mixdlfrm.htm
-
-2. The MIT X11R6.3 libraries available from: ftp.x.org
+ time of writing) from ftp://ftp.xemacs.org/pub/xemacs/aux/ and read the
+ README for details on how to build it.
-3. You'll need to compile the MIT libraries without multi-thread support.
- To do this, there is an example Win32.cf and site.def provided which
- set the relevant flags. You will also need to apply the patch in
- nt/X11.patch in the xc/lib/X11 directory which will fix the DLL definition
- file. Once compiled and installed, you will need to apply the following
- patch to Xmd.h. This is messy and better solutions would be appreciated.
-
-4. Goto 2 under 'native GUI' above and add this to the nmake command line:
- HAVE_X=1 X11_DIR=x:\root\directory\of\your\X11\installation
-
---- Xmd.h~ Thu Jun 08 23:20:40 1995
-+++ Xmd.h Sun Mar 16 13:09:10 1997
-@@ -150,8 +150,9 @@
- typedef CARD16 BITS16;
- typedef CARD8 BYTE;
-
-+#ifndef WIN32
- typedef CARD8 BOOL;
--
-+#endif
-
-Known Problems:
-Please look at the TODO list for the current list of problems and people
-working on them.
-
-Any other problems you need clarified, please email us and we will endeavour
-to provide any assistance we can:
+5. If you want X-Face support, grab the compface distribution from
+ ftp://ftp.xemacs.org/pub/xemacs/aux/ and unpack it somewhere.
+ Copy nt\compface.mak from xemacs sources to the compface directory.
+ cd to that directory and build libcompface with 'nmake -f compface.mak'.
+
+
+* Building
+==========
+
+1. cd to the nt subdirectory of the xemacs distribution and copy the file
+ config.inc.samp to config.inc. Make any necessary modifications. This
+ file controls the options that XEmacs is built with:
+
+ -- If you're building with XPM support, modify the appropriate lines in
+ config.inc as follows:
+
+ HAVE_XPM=1
+ XPM_DIR="x:\location\of\your\xpm\sources"
+
+ and similarly for JPEG and TIFF support.
+
+ -- If you're building with PNG support, modify the appropriate lines in
+ config.inc as follows:
+
+ HAVE_PNG=1
+ PNG_DIR="x:\location\of\your\png\sources"
+ ZLIB_DIR="x:\location\of\your\zlib\sources"
+
+ -- If you're building with GIF support, modify the appropriate lines in
+ config.inc as follows:
+
+ HAVE_GIF=1
+
+ -- If you're building with X-Face support, modify the appropriate lines in
+ config.inc as follows:
+
+ HAVE_XFACE=1
+ COMPFACE_DIR="x:\location\of\your\compface\sources"
+
+ -- If you're building for X, modify the appropriate lines in config.inc
+ as follows:
+
+ HAVE_X_WINDOWS=1
+ X11_DIR=x:\root\directory\of\your\X11\installation
+
+ -- By default, XEmacs will expect to find its packages in the
+ subdirectories "site-packages", "mule-packages" and "xemacs-packages"
+ under the directory "c:\Program Files\XEmacs". If you want it to look
+ for these subdirectories elsewhere, modify the appropriate lines in
+ config.inc as follows:
+
+ PACKAGE_PREFIX="x:\your\package\directory"
+
+ Make sure that the directory pointed to by PACKAGE_PREFIX contains
+ the xemacs-packages directory into which you installed the packages.
+
+ -- XEmacs can build its info files more quickly if you have a copy of the
+ makeinfo program. If you have a copy, modify the appropriate lines in
+ config.inc as follows:
+
+ MAKEINFO="x:\location\of\makeinfo.exe"
+
+ If you don't have a copy of makeinfo then you'll need to have installed
+ the XEmacs texinfo package.
+
+2. If you want to install XEmacs when you build it, modify the appropriate
+ lines in config.inc as follows (you can also run XEmacs from its build
+ directory):
+
+ INSTALL_DIR="x:\your\installation\directory"
+
+ (By default, XEmacs will be installed in directories under the directory
+ "c:\Program Files\XEmacs\XEmacs-21.2".)
+
+2. If you want to build xemacs on the command line, use
+ `nmake install -f xemacs.mak', or just `nmake -f xemacs.mak' if you want
+ to run XEmacs from its build directory. nmake will build temacs, the DOC
+ file, update the elc's, dump xemacs and (optionally) install the relevant
+ files in the directories under the installation directory.
+
+ If you chose to install XEmacs, the file that you should run to start
+ XEmacs will be installed (by default) as
+ "c:\Program Files\XEmacs\XEmacs-21.2\i586-pc-win32\xemacs.exe".
+
+ To run from the build directory, run the file "nt\xemacs.exe" off of the
+ root of the build directory.
+
+ You may want to create a shortcut to the file from your Desktop or
+ Start Menu.
+
+3. To build using MS Developer Studio, you can use the workspace file
+ `nt/xemacs.dsw'. This was prepared for Visual C++ 5.0; if you have
+ a different version and this file doesn't work, just open up
+ `nt/xemacs.mak' from within MS Developer Studio and it will offer to
+ wrap this Makefile in a workspace file, from which you can build.
+ Assuming you want to run from the build directory (which you will
+ want to do if you are planning on doing any development work on XEmacs),
+ use the following settings in Project/Settings...:
+
+ Under the General tab:
+
+ Build command line: NMAKE /f xemacs.mak
+ Output file name: ..\src\xemacs.exe
+ Browse info file name: ..\src\temacs.bsc
+
+ Under the Debug tab:
+
+ Executable for debug session: ..\src\xemacs.exe
+
+
+ If you want to install XEmacs when it's built, change the build command
+ line to "NMAKE install /f xemacs.mak". (You will have to make the same
+ change even if you use the provided workspace nt/xemacs.dsw.)
+
+
+* Debugging under MS Developer Studio
+=====================================
+
+The build process always creates debugging and "Source Browser" information
+in the source tree for use with DevStudio. However that information is not
+very useful unless you build a debug version of XEmacs:
+
+1. Set DEBUG_XEMACS=1 and DEPEND=1 in config.inc and rebuild.
+
+2. See instructions above for obtaining a workspace file for use with
+ MS Developer Studio. Build and debug your XEmacs this way.
+
+3. To display the contents of a lisp variable, type Shift-F9 (or use the
+ menu) to bring up the QuickWatch window, type debug_print(variable) and
+ click Recalculate. The output will appear in a console window, as well
+ as in the Debug window in MS Developer Studio.
+
+4. To view Lisp variables in the "Watch" window wrap the variable in one of
+ the helper functions from the file src\console-msw.c, for example type
+ DSTRING(variable) in the "Watch" window to inspect a Lisp string.
+
+
+* Known Problems
+================
+
+Please look at the PROBLEMS file for known problems. Any other problems you
+need clarified, please email us and we will endeavour to provide any
+assistance we can:
The XEmacs NT Mailing List: xemacs-nt@xemacs.org
Subscribe address: xemacs-nt-request@xemacs.org
Marc Paquette
August Hill
Jonathan Harris
+Ben Wing
and others.
+++ /dev/null
-# List of problems with XEmacs. If anyone wants to work on these, please
-# mail me and I'll update the table below.
-
-# Core NT issues
- 1. Subprocess support is completely broken.
- 2. Networking support is completely broken. This is due to the fact that
- the model relies on the subprocess support also working.
- 4. No binary release. We know a binary release would be A Good Thing.
- However we want to make things stable before producing one so we don't
- have to field too many problems. Sorry.
- 5. Support for dired is perhaps not quite there. We need to port ls-lisp.el
- from FSF Emacs.
- 6. Currently the backup files do not get the same permissions as the file
- being edited. August Hill is looking at this one.
- 7. Verify that CRLF issues are dealt with correctly. Marc Paquette is
- looking at this.
- 8. Use the registry to store the root directory(ies) of lisp packages; that
- is the path name, not the elisp files.
-
-# X issues
- 1. Redrawing on my (davidh) system seems fairly broken - I don't know if
- this is the XEmacs redraw functionality, my X server or just something
- strange with X under NT. Has anyone else experiences with this ?
-
-# Native GUI issues
- 0. The entire event model.
- 1. Calling mouse_[enter|leave]_frame_hook
- 2. Can't change bold, italic or bold-italic face fonts
- 3. Bogus delay when setting default- or initial-frame-plist
- 4. Short timeouts don't seem to be very accurate
- 5. Scrollbar dragging. Redisplay isn't called while dragging.
- Also can't retrieve 32 bit tracking position with GetScrollInfo()
- 6. Menubar
- 7. Palette handling
- 8. Middle mouse button emulation
- 9. Drag'n'drop
- 10. Images
-
-Old Issues.
-
- 1. For some reason, HOME is a required environment variable.
-
/* Synched up with: FSF 19.30 (more or less). */
/* No code in XEmacs #includes config.h twice, but some of the code
- intended to work with other packages as well (like gmalloc.c)
+ intended to work with other packages as well (like gmalloc.c)
think they can include it as many times as they like. */
#ifndef _SRC_CONFIG_H_
#define _SRC_CONFIG_H_
#undef HAVE_UTIME_H
#undef HAVE_SYS_WAIT_H
#undef HAVE_LIBGEN_H
-#undef HAVE_LINUX_VERSION_H
#undef WORDS_BIGENDIAN
#undef TIME_WITH_SYS_TIME
/* Define HAVE_BERKELEY_DB if you want to use the BerkDB libraries */
#undef HAVE_BERKELEY_DB
/* Full #include file path for Berkeley DB's db.h */
-#undef DB_H_PATH
+#undef DB_H_FILE
#if defined (HAVE_DBM) || defined (HAVE_BERKELEY_DB)
# define HAVE_DATABASE
/* Define HAVE_NCURSES if -lncurses is present. */
#undef HAVE_NCURSES
/* Full #include file paths for ncurses' curses.h and term.h. */
-#undef CURSES_H_PATH
-#undef TERM_H_PATH
+#undef CURSES_H_FILE
+#undef TERM_H_FILE
#define LOWTAGS
#define bufpos_checking_assert(assertion)
#endif
+#ifdef ERROR_CHECK_GC
+#define gc_checking_assert(assertion) assert (assertion)
+#else
+#define gc_checking_assert(assertion)
+#endif
/* Define MEMORY_USAGE_STATS if you want extra code compiled in to
determine where XEmacs's memory is going. */
compiling-running-crashing. */
#undef NO_DOC_FILE
-#define CONST const
-
/* If not defined, use unions instead of ints. A few systems (DEC Alpha)
seem to require this, probably because something with the int
definitions isn't right with 64-bit systems.
#undef SUNPRO
/* Sun SparcStations, SGI machines, and HP9000s700s have support for playing
- different sound files as beeps. If you are on a SparcStation but do not
+ different sound files as beeps. If you are on a SparcStation but do not
have the sound option installed for some reason, then undefine
HAVE_NATIVE_SOUND. (It's usually found in /usr/demo/SOUND/ on SunOS 4
and Solaris systems; on Solaris, you may need to install the "SUNWaudmo"
uses, mbstowcs() and wcstombs(), are unusable when programs are
statically linked (as XEmacs must be) because the static version of
libc.a contains the *dynamic* versions of these functions. These
- functions don't seem to be called when XEmacs is running, so it's
+ functions don't seem to be called when XEmacs is running, so it's
enough to define stubs for them.
This appears to be fixed in SunOS 4.1.2.
/* MSVC version >= 2.x without /Za supports __inline */
#if (_MSC_VER < 900) || defined(__STDC__)
-# define INLINE static
+# define inline
#else
-# define INLINE __inline
+# define inline __inline
#endif
+#define INLINE_HEADER inline static
+
/* MSVC warnings no-no crap. When adding one to this section,
1. Think twice
2. Insert textual description of the warning.
HAVE_MULE=0
# Native MS Windows support.
-HAVE_MSW=1
+HAVE_MS_WINDOWS=1
# X Windows support.
-HAVE_X=0
+HAVE_X_WINDOWS=0
X11_DIR=
############################################################################
# Set this to enable some debug code that doesn't slow things down.
DEBUG_XEMACS=1
+# Set this to speed up building, for development purposes.
+QUICK_BUILD=0
+
# Set this to see exactly which compilation commands are being run (not
# generally recommended).
VERBOSECC=0
+# Set this to get nmake to use dependency info (requires Perl to be installed)
+DEPEND=0
+
############################################################################
# Some technical options.
char dd_buf[DIRBLKSIZ]; /* directory block */
} DIR; /* stream data from opendir() */
-DIR *opendir (CONST char *filename);
+DIR *opendir (const char *filename);
void closedir (DIR *dirp);
struct direct *readdir (DIR *dirp);
struct direct *readdirver (DIR *dirp);
#include <time.h>
+#ifdef __MINGW32__
+#include <winsock.h>
+#else
struct timeval
{
long tv_sec; /* seconds */
long tv_usec; /* microseconds */
};
+#endif
struct timezone
{
# PROP BASE Bsc_Name "xemacs.bsc"
# PROP BASE Target_Dir ""
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
+# PROP Output_Dir "..\src"
+# PROP Intermediate_Dir "obj"
# PROP Cmd_Line "NMAKE /f xemacs.mak"
# PROP Rebuild_Opt "/a"
# PROP Target_File "xemacs.exe"
# PROP BASE Bsc_Name "xemacs.bsc"
# PROP BASE Target_Dir ""
# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
+# PROP Output_Dir "..\src"
+# PROP Intermediate_Dir "obj"
# PROP Cmd_Line "NMAKE /f xemacs.mak"
# PROP Rebuild_Opt "/a"
# PROP Target_File "..\src\xemacs.exe"
# Synched up with: Not in FSF.
#
+default: all
+
XEMACS=..
LISP=$(XEMACS)\lisp
+LIB_SRC=$(XEMACS)\lib-src
MODULES=$(XEMACS)\modules
NT=$(XEMACS)\nt
OUTDIR=$(NT)\obj
+SRC=$(XEMACS)\src
+LWLIB_SRCDIR=$(XEMACS)\lwlib
+MAKEDIRSTRING=$(MAKEDIR:\=\\)
+XEMACSDIRSTRING=$(MAKEDIRSTRING:\\nt=)
+
# Define a variable for the 'del' command to use
DEL=-del
# Program name and version
-!include "..\version.sh"
+!include "$(XEMACS)\version.sh"
+
+!include "config.inc"
!if !defined(INFODOCK)
INFODOCK=0
PROGRAM_DEFINES=-DINFODOCK \
-DPATH_VERSION=\"$(INFODOCK_VERSION_STRING)\" \
-DPATH_PROGNAME=\"infodock\" \
+ -DEMACS_PROGNAME=\"infodock\" \
+ -DEMACS_VERSION=\"$(INFODOCK_VERSION_STRING)\" \
-DINFODOCK_MAJOR_VERSION=$(infodock_major_version) \
-DINFODOCK_MINOR_VERSION=$(infodock_minor_version) \
-DINFODOCK_BUILD_VERSION=$(infodock_build_version)
!endif
PROGRAM_DEFINES= \
-DPATH_VERSION=\"$(XEMACS_VERSION_STRING)\" \
- -DPATH_PROGNAME=\"xemacs\"
+ -DPATH_PROGNAME=\"xemacs\" \
+ -DEMACS_VERSION=\"$(XEMACS_VERSION_STRING)\" \
+ -DEMACS_PROGNAME=\"xemacs\"
!endif
#
! endif
!endif
PATH_PACKAGEPATH="$(PACKAGE_PATH:\=\\)"
-!if !defined(HAVE_MSW)
-HAVE_MSW=1
+!if !defined(HAVE_MS_WINDOWS)
+HAVE_MS_WINDOWS=1
!endif
-!if !defined(HAVE_X)
-HAVE_X=0
+!if !defined(HAVE_X_WINDOWS)
+HAVE_X_WINDOWS=0
!endif
!if !defined(HAVE_XPM)
HAVE_XPM=0
!if !defined(DEBUG_XEMACS)
DEBUG_XEMACS=0
!endif
+!if !defined(QUICK_BUILD)
+QUICK_BUILD=0
+!endif
!if !defined(USE_UNION_TYPE)
USE_UNION_TYPE=0
!endif
!message [[[Developer note: If you want to fix it, read Q112297 first]]] ####
CONFIG_ERROR=1
!endif
-!if !$(HAVE_MSW) && !$(HAVE_X)
-!message Please specify at least one HAVE_MSW=1 and/or HAVE_X=1
+!if !$(HAVE_MS_WINDOWS) && !$(HAVE_X_WINDOWS)
+!message Please specify at least one HAVE_MS_WINDOWS=1 and/or HAVE_X_WINDOWS=1
CONFIG_ERROR=1
!endif
-!if $(HAVE_X) && !defined(X11_DIR)
+!if $(HAVE_X_WINDOWS) && !defined(X11_DIR)
!message Please specify root directory for your X11 installation: X11_DIR=path
CONFIG_ERROR=1
!endif
-!if $(HAVE_X) && defined(X11_DIR) && !exist("$(X11_DIR)\LIB\X11.LIB")
+!if $(HAVE_X_WINDOWS) && defined(X11_DIR) && !exist("$(X11_DIR)\LIB\X11.LIB")
!message Specified X11 directory does not contain "$(X11_DIR)\LIB\X11.LIB"
CONFIG_ERROR=1
!endif
-!if $(HAVE_MSW) && $(HAVE_XPM) && !defined(XPM_DIR)
+!if $(HAVE_MS_WINDOWS) && $(HAVE_XPM) && !defined(XPM_DIR)
!message Please specify root directory for your XPM installation: XPM_DIR=path
CONFIG_ERROR=1
!endif
-!if $(HAVE_MSW) && $(HAVE_XPM) && defined(XPM_DIR) && !exist("$(XPM_DIR)\lib\Xpm.lib")
+!if $(HAVE_MS_WINDOWS) && $(HAVE_XPM) && defined(XPM_DIR) && !exist("$(XPM_DIR)\lib\Xpm.lib")
!message Specified XPM directory does not contain "$(XPM_DIR)\lib\Xpm.lib"
CONFIG_ERROR=1
!endif
-!if $(HAVE_MSW) && $(HAVE_PNG) && !defined(PNG_DIR)
+!if $(HAVE_MS_WINDOWS) && $(HAVE_PNG) && !defined(PNG_DIR)
!message Please specify root directory for your PNG installation: PNG_DIR=path
CONFIG_ERROR=1
!endif
-!if $(HAVE_MSW) && $(HAVE_PNG) && defined(PNG_DIR) && !exist("$(PNG_DIR)\libpng.lib")
+!if $(HAVE_MS_WINDOWS) && $(HAVE_PNG) && defined(PNG_DIR) && !exist("$(PNG_DIR)\libpng.lib")
!message Specified PNG directory does not contain "$(PNG_DIR)\libpng.lib"
CONFIG_ERROR=1
!endif
-!if $(HAVE_MSW) && $(HAVE_PNG) && !defined(ZLIB_DIR)
+!if $(HAVE_MS_WINDOWS) && $(HAVE_PNG) && !defined(ZLIB_DIR)
!message Please specify root directory for your ZLIB installation: ZLIB_DIR=path
CONFIG_ERROR=1
!endif
-!if $(HAVE_MSW) && $(HAVE_PNG) && defined(ZLIB_DIR) && !exist("$(ZLIB_DIR)\zlib.lib")
+!if $(HAVE_MS_WINDOWS) && $(HAVE_PNG) && defined(ZLIB_DIR) && !exist("$(ZLIB_DIR)\zlib.lib")
!message Specified ZLIB directory does not contain "$(ZLIB_DIR)\zlib.lib"
CONFIG_ERROR=1
!endif
-!if $(HAVE_MSW) && $(HAVE_TIFF) && !defined(TIFF_DIR)
+!if $(HAVE_MS_WINDOWS) && $(HAVE_TIFF) && !defined(TIFF_DIR)
!message Please specify root directory for your TIFF installation: TIFF_DIR=path
CONFIG_ERROR=1
!endif
-!if $(HAVE_MSW) && $(HAVE_TIFF) && !exist("$(TIFF_DIR)\libtiff\libtiff.lib")
+!if $(HAVE_MS_WINDOWS) && $(HAVE_TIFF) && !exist("$(TIFF_DIR)\libtiff\libtiff.lib")
!message Specified TIFF directory does not contain "$(TIFF_DIR)\libtiff\libtiff.lib"
CONFIG_ERROR=1
!endif
-!if $(HAVE_MSW) && $(HAVE_JPEG) && !defined(JPEG_DIR)
+!if $(HAVE_MS_WINDOWS) && $(HAVE_JPEG) && !defined(JPEG_DIR)
!message Please specify root directory for your JPEG installation: JPEG_DIR=path
CONFIG_ERROR=1
!endif
-!if $(HAVE_MSW) && $(HAVE_JPEG) && !exist("$(JPEG_DIR)\libjpeg.lib")
+!if $(HAVE_MS_WINDOWS) && $(HAVE_JPEG) && !exist("$(JPEG_DIR)\libjpeg.lib")
!message Specified JPEG directory does not contain "$(JPEG_DIR)\libjpeg.lib"
CONFIG_ERROR=1
!endif
-!if $(HAVE_MSW) && $(HAVE_XFACE) && !defined(COMPFACE_DIR)
+!if $(HAVE_MS_WINDOWS) && $(HAVE_XFACE) && !defined(COMPFACE_DIR)
!message Please specify root directory for your COMPFACE installation: COMPFACE_DIR=path
CONFIG_ERROR=1
!endif
-!if $(HAVE_MSW) && $(HAVE_XFACE) && !exist("$(COMPFACE_DIR)\libcompface.lib")
+!if $(HAVE_MS_WINDOWS) && $(HAVE_XFACE) && !exist("$(COMPFACE_DIR)\libcompface.lib")
!message Specified COMPFACE directory does not contain "$(COMPFACE_DIR)\libcompface.lib"
CONFIG_ERROR=1
!endif
-!if $(HAVE_MSW) && $(HAVE_TOOLBARS) && !$(HAVE_XPM)
+!if $(HAVE_MS_WINDOWS) && $(HAVE_TOOLBARS) && !$(HAVE_XPM)
!message Toolbars require XPM support
CONFIG_ERROR=1
!endif
!endif
#
+# Whether to use dependency information generated by make-src-depend
+#
+!if !defined(DEPEND)
+DEPEND=0
+!endif
+!if $(DEPEND)
+! if [if not exist $(OUTDIR)\nul mkdir "$(OUTDIR)"]
+! endif
+# generate an nmake-readable version of depend
+! if [perl -p -e "s/^\x23ifdef (.+)/!if defined($$1)/; s/^\x23e/!e/;" \
+ -e "s/([\s=^])([\w\d\.\-^]+\.[ch^])/$$1$(SRC:\=\\)\\$$2/g;" \
+ -e "s/^(.+)\.o:(.+)/$(OUTDIR:\=\\)\\$$1.obj:$$2 $(NT:\=\\)\\config.inc/;" \
+ < $(SRC)\depend > $(OUTDIR)\depend.tmp]
+! endif
+! include "$(OUTDIR)\depend.tmp"
+!else
+! if [echo WARNING: Compiling without dependency information.]
+! endif
+!endif
+
+#
# Compiler command echo control. Define VERBOSECC=1 to get verbose compilation.
#
!if !defined(VERBOSECC)
CFLAGS=-nologo -W3 $(OPT) $(C_LIBFLAG)
-!if $(HAVE_X)
+!if $(HAVE_X_WINDOWS)
X_DEFINES=-DHAVE_X_WINDOWS
X_INCLUDES=-I$(X11_DIR)\include
X_LIBS=-libpath:$(X11_DIR)\lib Xaw.lib Xmu.lib Xt.lib SM.lib ICE.lib Xext.lib X11.lib
!endif
-!if $(HAVE_MSW)
+!if $(HAVE_MS_WINDOWS)
MSW_DEFINES=-DHAVE_MS_WINDOWS -DHAVE_SCROLLBARS -DHAVE_MENUBARS
MSW_INCLUDES=
MSW_LIBS=
!if $(HAVE_MSW_C_DIRED)
MSW_DEFINES=$(MSW_DEFINES) -DHAVE_MSW_C_DIRED
-MSW_C_DIRED_SRC=$(XEMACS)\src\dired-msw.c
+MSW_C_DIRED_SRC=$(SRC)\dired-msw.c
MSW_C_DIRED_OBJ=$(OUTDIR)\dired-msw.obj
!endif
!if $(HAVE_XPM)
!endif
!if $(HAVE_GIF)
MSW_DEFINES=$(MSW_DEFINES) -DHAVE_GIF
-MSW_GIF_SRC=$(XEMACS)\src\dgif_lib.c $(XEMACS)\src\gif_io.c
+MSW_GIF_SRC=$(SRC)\dgif_lib.c $(SRC)\gif_io.c
MSW_GIF_OBJ=$(OUTDIR)\dgif_lib.obj $(OUTDIR)\gif_io.obj
!endif
!if $(HAVE_PNG)
!endif
!if $(HAVE_TOOLBARS)
MSW_DEFINES=$(MSW_DEFINES) -DHAVE_TOOLBARS
-MSW_TOOLBAR_SRC=$(XEMACS)\src\toolbar.c $(XEMACS)\src\toolbar-msw.c
+MSW_TOOLBAR_SRC=$(SRC)\toolbar.c $(SRC)\toolbar-msw.c
MSW_TOOLBAR_OBJ=$(OUTDIR)\toolbar.obj $(OUTDIR)\toolbar-msw.obj
MSW_LIBS=$(MSW_LIBS) comctl32.lib
!endif
!if $(HAVE_DIALOGS)
MSW_DEFINES=$(MSW_DEFINES) -DHAVE_DIALOGS
-MSW_DIALOG_SRC=$(XEMACS)\src\dialog.c $(XEMACS)\src\dialog-msw.c
+MSW_DIALOG_SRC=$(SRC)\dialog.c $(SRC)\dialog-msw.c
MSW_DIALOG_OBJ=$(OUTDIR)\dialog.obj $(OUTDIR)\dialog-msw.obj
!endif
!if $(HAVE_WIDGETS)
DEBUG_FLAGS=-debug:full
!endif
+!if $(QUICK_BUILD)
+QUICK_DEFINES=-DQUICK_BUILD
+!endif
+
!if $(USE_MINIMAL_TAGBITS)
TAGBITS_DEFINES=-DUSE_MINIMAL_TAGBITS
!endif
# Generic variables
-INCLUDES=$(X_INCLUDES) $(MSW_INCLUDES) -I$(XEMACS)\nt\inc -I$(XEMACS)\src -I$(XEMACS)\lwlib
+INCLUDES=$(X_INCLUDES) $(MSW_INCLUDES) -I$(NT)\inc -I$(SRC) -I$(LWLIB_SRCDIR)
DEFINES=$(X_DEFINES) $(MSW_DEFINES) $(MULE_DEFINES) \
$(TAGBITS_DEFINES) $(LRECORD_DEFINES) $(UNION_DEFINES) \
- $(DUMPER_DEFINES) $(MALLOC_DEFINES) \
+ $(DUMPER_DEFINES) $(MALLOC_DEFINES) $(QUICK_DEFINES) \
-DWIN32 -D_WIN32 -DWIN32_LEAN_AND_MEAN -DWINDOWSNT -Demacs \
-DHAVE_CONFIG_H $(PROGRAM_DEFINES) $(PATH_DEFINES)
#------------------------------------------------------------------------------
-default: $(OUTDIR)\nul all
-
$(OUTDIR)\nul:
-@mkdir $(OUTDIR)
XEMACS_INCLUDES=\
- $(XEMACS)\src\config.h \
- $(XEMACS)\src\Emacs.ad.h \
- $(XEMACS)\src\paths.h
+ $(SRC)\config.h \
+ $(SRC)\Emacs.ad.h \
+ $(SRC)\paths.h
-$(XEMACS)\src\config.h: config.h
- copy config.h $(XEMACS)\src
+$(SRC)\config.h: config.h
+ copy config.h $(SRC)
-$(XEMACS)\src\Emacs.ad.h: Emacs.ad.h
- copy Emacs.ad.h $(XEMACS)\src
+$(SRC)\Emacs.ad.h: Emacs.ad.h
+ copy Emacs.ad.h $(SRC)
-$(XEMACS)\src\paths.h: paths.h
- copy paths.h $(XEMACS)\src
+$(SRC)\paths.h: paths.h
+ copy paths.h $(SRC)
#------------------------------------------------------------------------------
# lib-src programs
-LIB_SRC = $(XEMACS)\lib-src
LIB_SRC_DEFINES = -DHAVE_CONFIG_H -DWIN32 -DWINDOWSNT
#
# Inferred rule
{$(LIB_SRC)}.c{$(LIB_SRC)}.exe :
cd $(LIB_SRC)
- $(CCV) -I. -I$(XEMACS)/src -I$(XEMACS)/nt/inc $(LIB_SRC_DEFINES) $(CFLAGS) -Fe$@ $** -link -incremental:no
+ $(CCV) -I. -I$(XEMACS)/src -I$(XEMACS)/nt/inc $(LIB_SRC_DEFINES) $(CFLAGS) -Fe$@ $** -link -incremental:no setargv.obj
cd $(NT)
# Individual dependencies
nmake -nologo -f minitar.mak ZLIB="$(ZLIB_DIR)" NT="$(NT)" LIB_SRC="$(LIB_SRC)"
LIB_SRC_TOOLS = \
- $(LIB_SRC)/make-docfile.exe \
+ $(LIB_SRC)/etags.exe \
$(LIB_SRC)/hexl.exe \
- $(LIB_SRC)/movemail.exe \
+ $(LIB_SRC)/i.exe \
+ $(LIB_SRC)/make-docfile.exe \
$(LIB_SRC)/mmencode.exe \
+ $(LIB_SRC)/movemail.exe \
$(LIB_SRC)/sorted-doc.exe \
- $(LIB_SRC)/wakeup.exe \
- $(LIB_SRC)/etags.exe
+ $(LIB_SRC)/wakeup.exe
!if $(USE_MINITAR)
LIB_SRC_TOOLS = \
$(LIB_SRC_TOOLS) \
$(LIB_SRC)/minitar.exe
!endif
+!if $(USE_PORTABLE_DUMPER)
+LIB_SRC_TOOLS = \
+ $(XEMACS_INCLUDES) \
+ $(LIB_SRC)/make-dump-id.exe \
+ $(LIB_SRC_TOOLS)
+!endif
# Shorthand target
minitar: $(LIB_SRC)/minitar.exe
# runxemacs proglet
-RUNEMACS = $(XEMACS)\src\runxemacs.exe
+RUNEMACS = $(SRC)\runxemacs.exe
$(RUNEMACS): $(LIB_SRC)\run.c $(LIB_SRC)\run.res
$(CCV) -I$(LIB_SRC) $(CFLAGS) -Fe$@ -Fo$(LIB_SRC) -Fd$(LIB_SRC)\ $** kernel32.lib user32.lib -link -incremental:no
#------------------------------------------------------------------------------
+# dump-id.c file that contains the dump id
+
+$(SRC)\dump-id.c : $(LIB_SRC)/make-dump-id.exe
+ cd $(SRC)
+ $(LIB_SRC)\make-dump-id.exe
+ cd $(NT)
+
+#------------------------------------------------------------------------------
+
# LASTFILE Library
!if !$(USE_SYSTEM_MALLOC) || !$(USE_PORTABLE_DUMPER)
LASTFILE=$(OUTDIR)\lastfile.lib
-LASTFILE_SRC=$(XEMACS)\src
+LASTFILE_SRC=$(SRC)
LASTFILE_FLAGS=$(CFLAGS) $(INCLUDES) -Fo$@ -Fd$* -c
LASTFILE_OBJS= \
$(OUTDIR)\lastfile.obj
#------------------------------------------------------------------------------
-!if $(HAVE_X)
+!if $(HAVE_X_WINDOWS)
# LWLIB Library
LWLIB=$(OUTDIR)\lwlib.lib
-LWLIB_SRC=$(XEMACS)\lwlib
LWLIB_FLAGS=$(CFLAGS) $(INCLUDES) $(DEFINES) \
-DNEED_ATHENA -DNEED_LUCID \
-D_WINDOWS -DMENUBARS_LUCID -DSCROLLBARS_LUCID -DDIALOGS_ATHENA \
$(LWLIB): $(LWLIB_OBJS)
link.exe -lib -nologo -out:$@ $(LWLIB_OBJS)
-$(OUTDIR)\lwlib-config.obj: $(LWLIB_SRC)\lwlib-config.c
+$(OUTDIR)\lwlib-config.obj: $(LWLIB_SRCDIR)\lwlib-config.c
$(CCV) $(LWLIB_FLAGS) $**
-$(OUTDIR)\lwlib-utils.obj: $(LWLIB_SRC)\lwlib-utils.c
+$(OUTDIR)\lwlib-utils.obj: $(LWLIB_SRCDIR)\lwlib-utils.c
$(CCV) $(LWLIB_FLAGS) $**
-$(OUTDIR)\lwlib-Xaw.obj: $(LWLIB_SRC)\lwlib-Xaw.c
+$(OUTDIR)\lwlib-Xaw.obj: $(LWLIB_SRCDIR)\lwlib-Xaw.c
$(CCV) $(LWLIB_FLAGS) $**
-$(OUTDIR)\lwlib-Xlw.obj: $(LWLIB_SRC)\lwlib-Xlw.c
+$(OUTDIR)\lwlib-Xlw.obj: $(LWLIB_SRCDIR)\lwlib-Xlw.c
$(CCV) $(LWLIB_FLAGS) $**
-$(OUTDIR)\lwlib.obj: $(LWLIB_SRC)\lwlib.c
+$(OUTDIR)\lwlib.obj: $(LWLIB_SRCDIR)\lwlib.c
$(CCV) $(LWLIB_FLAGS) $**
-$(OUTDIR)\xlwmenu.obj: $(LWLIB_SRC)\xlwmenu.c
+$(OUTDIR)\xlwmenu.obj: $(LWLIB_SRCDIR)\xlwmenu.c
$(CCV) $(LWLIB_FLAGS) $**
-$(OUTDIR)\xlwscrollbar.obj: $(LWLIB_SRC)\xlwscrollbar.c
+$(OUTDIR)\xlwscrollbar.obj: $(LWLIB_SRCDIR)\xlwscrollbar.c
$(CCV) $(LWLIB_FLAGS) $**
!endif
DOC=$(LIB_SRC)\DOC
DOC_SRC1=\
- $(XEMACS)\src\abbrev.c \
- $(XEMACS)\src\alloc.c \
- $(XEMACS)\src\alloca.c \
- $(XEMACS)\src\blocktype.c \
- $(XEMACS)\src\buffer.c \
- $(XEMACS)\src\bytecode.c \
- $(XEMACS)\src\callint.c \
- $(XEMACS)\src\callproc.c \
- $(XEMACS)\src\casefiddle.c \
- $(XEMACS)\src\casetab.c \
- $(XEMACS)\src\chartab.c \
- $(XEMACS)\src\cmdloop.c \
- $(XEMACS)\src\cmds.c \
- $(XEMACS)\src\console-stream.c \
- $(XEMACS)\src\console.c \
- $(XEMACS)\src\data.c \
- $(XEMACS)\src\device.c
+ $(SRC)\abbrev.c \
+ $(SRC)\alloc.c \
+ $(SRC)\alloca.c \
+ $(SRC)\blocktype.c \
+ $(SRC)\buffer.c \
+ $(SRC)\bytecode.c \
+ $(SRC)\callint.c \
+ $(SRC)\callproc.c \
+ $(SRC)\casefiddle.c \
+ $(SRC)\casetab.c \
+ $(SRC)\chartab.c \
+ $(SRC)\cmdloop.c \
+ $(SRC)\cmds.c \
+ $(SRC)\console-stream.c \
+ $(SRC)\console.c \
+ $(SRC)\data.c \
+ $(SRC)\device.c
DOC_SRC2=\
- $(XEMACS)\src\dired.c \
- $(XEMACS)\src\doc.c \
- $(XEMACS)\src\doprnt.c \
- $(XEMACS)\src\dragdrop.c \
- $(XEMACS)\src\dynarr.c \
- $(XEMACS)\src\editfns.c \
- $(XEMACS)\src\elhash.c \
- $(XEMACS)\src\emacs.c \
- $(XEMACS)\src\eval.c \
- $(XEMACS)\src\event-stream.c \
- $(XEMACS)\src\events.c \
- $(XEMACS)\src\extents.c \
- $(XEMACS)\src\faces.c \
- $(XEMACS)\src\file-coding.c \
- $(XEMACS)\src\fileio.c \
- $(XEMACS)\src\filemode.c \
- $(XEMACS)\src\floatfns.c \
- $(XEMACS)\src\fns.c
+ $(SRC)\dired.c \
+ $(SRC)\doc.c \
+ $(SRC)\doprnt.c \
+ $(SRC)\dragdrop.c \
+ $(SRC)\dynarr.c \
+ $(SRC)\editfns.c \
+ $(SRC)\elhash.c \
+ $(SRC)\emacs.c \
+ $(SRC)\eval.c \
+ $(SRC)\event-stream.c \
+ $(SRC)\events.c \
+ $(SRC)\extents.c \
+ $(SRC)\faces.c \
+ $(SRC)\file-coding.c \
+ $(SRC)\fileio.c \
+ $(SRC)\filemode.c \
+ $(SRC)\floatfns.c \
+ $(SRC)\fns.c
DOC_SRC3=\
- $(XEMACS)\src\font-lock.c \
- $(XEMACS)\src\frame.c \
- $(XEMACS)\src\general.c \
- $(XEMACS)\src\glyphs.c \
- $(XEMACS)\src\glyphs-eimage.c \
- $(XEMACS)\src\glyphs-widget.c \
- $(XEMACS)\src\gui.c \
- $(XEMACS)\src\gutter.c \
- $(XEMACS)\src\hash.c \
- $(XEMACS)\src\imgproc.c \
- $(XEMACS)\src\indent.c \
- $(XEMACS)\src\insdel.c \
- $(XEMACS)\src\intl.c \
- $(XEMACS)\src\keymap.c \
- $(XEMACS)\src\line-number.c \
- $(XEMACS)\src\lread.c \
- $(XEMACS)\src\lstream.c \
- $(XEMACS)\src\macros.c \
- $(XEMACS)\src\marker.c
+ $(SRC)\font-lock.c \
+ $(SRC)\frame.c \
+ $(SRC)\general.c \
+ $(SRC)\glyphs.c \
+ $(SRC)\glyphs-eimage.c \
+ $(SRC)\glyphs-widget.c \
+ $(SRC)\gui.c \
+ $(SRC)\gutter.c \
+ $(SRC)\hash.c \
+ $(SRC)\imgproc.c \
+ $(SRC)\indent.c \
+ $(SRC)\insdel.c \
+ $(SRC)\intl.c \
+ $(SRC)\keymap.c \
+ $(SRC)\line-number.c \
+ $(SRC)\lread.c \
+ $(SRC)\lstream.c \
+ $(SRC)\macros.c \
+ $(SRC)\marker.c
DOC_SRC4=\
- $(XEMACS)\src\md5.c \
- $(XEMACS)\src\menubar.c \
- $(XEMACS)\src\minibuf.c \
- $(XEMACS)\src\nt.c \
- $(XEMACS)\src\ntplay.c \
- $(XEMACS)\src\ntproc.c \
- $(XEMACS)\src\objects.c \
- $(XEMACS)\src\opaque.c \
- $(XEMACS)\src\print.c \
- $(XEMACS)\src\process.c \
- $(XEMACS)\src\process-nt.c \
- $(XEMACS)\src\profile.c \
- $(XEMACS)\src\rangetab.c \
- $(XEMACS)\src\realpath.c \
- $(XEMACS)\src\redisplay-output.c \
- $(XEMACS)\src\redisplay.c \
- $(XEMACS)\src\regex.c \
- $(XEMACS)\src\scrollbar.c \
- $(XEMACS)\src\search.c \
- $(XEMACS)\src\select.c \
- $(XEMACS)\src\signal.c \
- $(XEMACS)\src\sound.c
+ $(SRC)\md5.c \
+ $(SRC)\menubar.c \
+ $(SRC)\minibuf.c \
+ $(SRC)\nt.c \
+ $(SRC)\ntplay.c \
+ $(SRC)\ntproc.c \
+ $(SRC)\objects.c \
+ $(SRC)\opaque.c \
+ $(SRC)\print.c \
+ $(SRC)\process.c \
+ $(SRC)\process-nt.c \
+ $(SRC)\profile.c \
+ $(SRC)\rangetab.c \
+ $(SRC)\realpath.c \
+ $(SRC)\redisplay-output.c \
+ $(SRC)\redisplay.c \
+ $(SRC)\regex.c \
+ $(SRC)\scrollbar.c \
+ $(SRC)\search.c \
+ $(SRC)\select.c \
+ $(SRC)\signal.c \
+ $(SRC)\sound.c
DOC_SRC5=\
- $(XEMACS)\src\specifier.c \
- $(XEMACS)\src\strftime.c \
- $(XEMACS)\src\symbols.c \
- $(XEMACS)\src\syntax.c \
- $(XEMACS)\src\sysdep.c \
- $(XEMACS)\src\termcap.c \
- $(XEMACS)\src\tparam.c \
- $(XEMACS)\src\undo.c \
- $(XEMACS)\src\window.c \
- $(XEMACS)\src\widget.c
-
-!if $(HAVE_X)
+ $(SRC)\specifier.c \
+ $(SRC)\strftime.c \
+ $(SRC)\symbols.c \
+ $(SRC)\syntax.c \
+ $(SRC)\sysdep.c \
+ $(SRC)\termcap.c \
+ $(SRC)\tparam.c \
+ $(SRC)\undo.c \
+ $(SRC)\window.c \
+ $(SRC)\widget.c
+
+!if $(HAVE_X_WINDOWS)
DOC_SRC6=\
- $(XEMACS)\src\balloon_help.c \
- $(XEMACS)\src\console-x.c \
- $(XEMACS)\src\device-x.c \
- $(XEMACS)\src\dialog-x.c \
- $(XEMACS)\src\EmacsFrame.c \
- $(XEMACS)\src\EmacsManager.c \
- $(XEMACS)\src\EmacsShell-sub.c\
- $(XEMACS)\src\EmacsShell.c \
- $(XEMACS)\src\event-Xt.c \
- $(XEMACS)\src\frame-x.c \
- $(XEMACS)\src\glyphs-x.c \
- $(XEMACS)\src\gui-x.c \
- $(XEMACS)\src\menubar.c \
- $(XEMACS)\src\menubar-x.c \
- $(XEMACS)\src\objects-x.c \
- $(XEMACS)\src\redisplay-x.c \
- $(XEMACS)\src\scrollbar-x.c \
- $(XEMACS)\src\balloon-x.c \
- $(XEMACS)\src\xgccache.c \
- $(XEMACS)\src\xmu.c \
- $(XEMACS)\src\select-x.c
-!endif
-
-!if $(HAVE_MSW)
+ $(SRC)\balloon_help.c \
+ $(SRC)\console-x.c \
+ $(SRC)\device-x.c \
+ $(SRC)\dialog-x.c \
+ $(SRC)\EmacsFrame.c \
+ $(SRC)\EmacsManager.c \
+ $(SRC)\EmacsShell-sub.c\
+ $(SRC)\EmacsShell.c \
+ $(SRC)\event-Xt.c \
+ $(SRC)\frame-x.c \
+ $(SRC)\glyphs-x.c \
+ $(SRC)\gui-x.c \
+ $(SRC)\menubar.c \
+ $(SRC)\menubar-x.c \
+ $(SRC)\objects-x.c \
+ $(SRC)\redisplay-x.c \
+ $(SRC)\scrollbar-x.c \
+ $(SRC)\balloon-x.c \
+ $(SRC)\xgccache.c \
+ $(SRC)\xmu.c \
+ $(SRC)\select-x.c
+!endif
+
+!if $(HAVE_MS_WINDOWS)
DOC_SRC7=\
- $(XEMACS)\src\console-msw.c \
- $(XEMACS)\src\device-msw.c \
- $(XEMACS)\src\event-msw.c \
- $(XEMACS)\src\frame-msw.c \
- $(XEMACS)\src\glyphs-msw.c \
- $(XEMACS)\src\gui-msw.c \
- $(XEMACS)\src\menubar-msw.c \
- $(XEMACS)\src\objects-msw.c \
- $(XEMACS)\src\redisplay-msw.c \
- $(XEMACS)\src\scrollbar-msw.c \
- $(XEMACS)\src\select-msw.c \
+ $(SRC)\console-msw.c \
+ $(SRC)\device-msw.c \
+ $(SRC)\event-msw.c \
+ $(SRC)\frame-msw.c \
+ $(SRC)\glyphs-msw.c \
+ $(SRC)\gui-msw.c \
+ $(SRC)\menubar-msw.c \
+ $(SRC)\objects-msw.c \
+ $(SRC)\redisplay-msw.c \
+ $(SRC)\scrollbar-msw.c \
+ $(SRC)\select-msw.c \
$(MSW_C_DIRED_SRC) \
$(MSW_TOOLBAR_SRC) \
$(MSW_DIALOG_SRC) \
!if $(HAVE_MULE)
DOC_SRC8=\
- $(XEMACS)\src\mule.c \
- $(XEMACS)\src\mule-charset.c \
- $(XEMACS)\src\mule-ccl.c
-! if $(HAVE_X)
- DOC_SRC8=$(DOC_SRC8) $(XEMACS)\src\input-method-xlib.c
+ $(SRC)\mule.c \
+ $(SRC)\mule-charset.c \
+ $(SRC)\mule-ccl.c
+! if $(HAVE_X_WINDOWS)
+ DOC_SRC8=$(DOC_SRC8) $(SRC)\input-method-xlib.c
! endif
!endif
!if $(DEBUG_XEMACS)
DOC_SRC9=\
- $(XEMACS)\src\debug.c \
- $(XEMACS)\src\tests.c
+ $(SRC)\debug.c \
+ $(SRC)\tests.c
!endif
!if !$(USE_SYSTEM_MALLOC)
DOC_SRC10=\
- $(XEMACS)\src\free-hook.c \
- $(XEMACS)\src\gmalloc.c \
- $(XEMACS)\src\ntheap.c \
- $(XEMACS)\src\vm-limit.c
+ $(SRC)\free-hook.c \
+ $(SRC)\gmalloc.c \
+ $(SRC)\ntheap.c \
+ $(SRC)\vm-limit.c
!endif
!if !$(USE_PORTABLE_DUMPER)
DOC_SRC11=\
- $(XEMACS)\src\unexnt.c
+ $(SRC)\unexnt.c
+!else
+DOC_SRC11=\
+ $(SRC)\dumper.c
!endif
#------------------------------------------------------------------------------
!ENDIF
!if !$(USE_PORTABLE_DUMPER)
-TEMACS_ENTRYPOINT=-entry:_start
+TEMACS_ENTRYPOINT=-entry:_start
+!else
+TEMACS_ENTRYPOINT=-entry:mainCRTStartup
!endif
-TEMACS_DIR=$(XEMACS)\src
+TEMACS_DIR=$(SRC)
TEMACS=$(TEMACS_DIR)\temacs.exe
TEMACS_BROWSE=$(TEMACS_DIR)\temacs.bsc
-TEMACS_SRC=$(XEMACS)\src
+TEMACS_SRC=$(SRC)
TEMACS_LIBS=$(LASTFILE) $(LWLIB) $(X_LIBS) $(MSW_LIBS) \
oldnames.lib kernel32.lib user32.lib gdi32.lib advapi32.lib \
- shell32.lib wsock32.lib winmm.lib winspool.lib $(LIBC_LIB)
+ shell32.lib wsock32.lib winmm.lib winspool.lib ole32.lib uuid.lib $(LIBC_LIB)
TEMACS_LFLAGS=-nologo $(LIBRARIES) $(DEBUG_FLAGS) -base:0x1000000\
- -stack:0x800000 $(TEMACS_ENTRYPOINT) -subsystem:console\
+ -stack:0x800000 $(TEMACS_ENTRYPOINT) -subsystem:windows\
-pdb:$(TEMACS_DIR)\temacs.pdb -map:$(TEMACS_DIR)\temacs.map \
- -heap:0x00100000 -out:$@ -nodefaultlib
+ -heap:0x00100000 -nodefaultlib -incremental:no
TEMACS_CPP_FLAGS=-c \
$(CFLAGS) $(INCLUDES) $(DEFINES) $(DEBUG_DEFINES) \
-DEMACS_MAJOR_VERSION=$(emacs_major_version) \
-DEMACS_MINOR_VERSION=$(emacs_minor_version) \
$(EMACS_BETA_VERSION) \
- -DXEMACS_CODENAME=\"$(xemacs_codename)\" \
+ -DXEMACS_CODENAME=\"$(xemacs_codename:&=and)\" \
-DEMACS_CONFIGURATION=\"$(EMACS_CONFIGURATION)\" \
-DPATH_PACKAGEPATH=\"$(PATH_PACKAGEPATH)\"
-!if $(HAVE_X)
+!if $(HAVE_X_WINDOWS)
TEMACS_X_OBJS=\
$(OUTDIR)\balloon-x.obj \
$(OUTDIR)\balloon_help.obj \
$(OUTDIR)\select-x.obj
!endif
-!if $(HAVE_MSW)
+!if $(HAVE_MS_WINDOWS)
TEMACS_MSW_OBJS=\
$(OUTDIR)\console-msw.obj \
$(OUTDIR)\device-msw.obj \
$(OUTDIR)\mule.obj \
$(OUTDIR)\mule-charset.obj \
$(OUTDIR)\mule-ccl.obj
-! if $(HAVE_X)
+! if $(HAVE_X_WINDOWS)
TEMACS_MULE_OBJS=\
$(TEMACS_MULE_OBJS) $(OUTDIR)\input-method-xlib.obj
! endif
!if !$(USE_PORTABLE_DUMPER)
TEMACS_DUMP_OBJS=\
$(OUTDIR)\unexnt.obj
+!else
+TEMACS_DUMP_OBJS=\
+ $(OUTDIR)\dumper.obj
!endif
TEMACS_OBJS= \
$(OUTDIR)\tparam.obj \
$(OUTDIR)\undo.obj \
$(OUTDIR)\widget.obj \
- $(OUTDIR)\window.obj \
- $(OUTDIR)\xemacs.res
+ $(OUTDIR)\window.obj
# Rules
$(CCV) $(TEMACS_CPP_FLAGS) $< -Fo$@
!endif
+$(OUTDIR)\emacs.obj: $(XEMACS)\version.sh
+
$(OUTDIR)\TopLevelEmacsShell.obj: $(TEMACS_SRC)\EmacsShell-sub.c
$(CCV) $(TEMACS_CPP_FLAGS) -DDEFINE_TOP_LEVEL_EMACS_SHELL $** -Fo$@
#$(TEMACS_SRC)\paths.h: $(TEMACS_SRC)\paths.h.in
# !"cd $(TEMACS_SRC); cp paths.h.in paths.h"
-$(TEMACS): $(TEMACS_INCLUDES) $(TEMACS_OBJS)
+$(TEMACS): $(TEMACS_INCLUDES) $(TEMACS_OBJS) $(OUTDIR)\xemacs.res
!if $(DEBUG_XEMACS)
@dir /b/s $(OUTDIR)\*.sbr > bscmake.tmp
bscmake -nologo -o$(TEMACS_BROWSE) @bscmake.tmp
@$(DEL) bscmake.tmp
!endif
!if $(USE_PORTABLE_DUMPER)
- @if exist $(TEMACS_DIR)\xemacs.dmp del $(TEMACS_DIR)\xemacs.dmp
-!endif
+ @if exist $(SRC)\dump-id.c del $(SRC)\dump-id.c
+# make a new dump id file. There is probably a better way to do this, but this works
+ @if exist $(OUTDIR)\dump-id.obj del $(OUTDIR)\dump-id.obj
+ nmake -nologo -f xemacs.mak OUTDIR=$(OUTDIR) $(OUTDIR)\dump-id.obj
+ link.exe @<<
+ $(TEMACS_LFLAGS) -out:$@ $(TEMACS_OBJS) $(TEMACS_LIBS) $(OUTDIR)\dump-id.obj
+<<
+!else
link.exe @<<
- $(TEMACS_LFLAGS) $(TEMACS_OBJS) $(TEMACS_LIBS)
+ $(TEMACS_LFLAGS) -out:$@ $(TEMACS_OBJS) $(OUTDIR)\xemacs.res $(TEMACS_LIBS)
<<
+!endif
$(OUTDIR)\xemacs.res: xemacs.rc
rc -Fo$@ xemacs.rc
+
+PROGNAME=$(SRC)\xemacs.exe
+TEMACS_BATCH="$(LIB_SRC)\i" "$(TEMACS)" -batch
+XEMACS_BATCH="$(LIB_SRC)\i" "$(PROGNAME)" -vanilla -batch
+
# Section handling automated tests starts here
-SRCDIR=$(MAKEDIR)\..\src
-PROGNAME=$(SRCDIR)\xemacs.exe
blddir=$(MAKEDIR:\=\\)\\..
-temacs_loadup=$(TEMACS) -batch -l $(SRCDIR)/../lisp/loadup.el
+temacs_loadup=$(TEMACS_BATCH) -l $(LISP)/loadup.el
dump_temacs = $(temacs_loadup) dump
run_temacs = $(temacs_loadup) run-temacs
## We have automated tests!!
# .PHONY: check check-temacs
check:
- cd $(SRCDIR)
+ cd $(SRC)
$(PROGNAME) $(batch_test_emacs)
check-temacs:
- cd $(SRCDIR)
+ cd $(SRC)
set EMACSBOOTSTRAPLOADPATH=$(LISP)
set EMACSBOOTSTRAPMODULEPATH=$(MODULES)
$(run_temacs) $(batch_test_emacs)
# Section handling automated tests ends here
+# Section handling tags starts here
+
+tagslisp=lisp
+
+tags:
+ @echo If you don't have a copy of etags around, then do 'make lib-src' first.
+ @echo To make use of the tags file, put the following in your .emacs:
+ @echo (setq tag-table-alist
+ @echo '(("$(XEMACSDIRSTRING)\\" . "$(XEMACSDIRSTRING)\\")))
+ cd $(XEMACS)
+ $(DEL) TAGS
+ set PATH=lib-src;%PATH%
+# argh!!! we need two ^^'s to get one ^, but only before a backslash.
+# i have no idea why. probably some obscure nmake quoting convention.
+ etags -a -r "/[ ]*DEF\(VAR\|INE\)_[A-Z_]+[ ]*([ ]*\"\([^^\"]+\)\"/\2/" src\*.c src\*.h lwlib\*.c lwlib\*.h lib-src\*.c lib-src\*.h
+ etags -a -l none -r "/^(def\(var\|un\|alias\|const\|macro\|subst\|struct\|face\|group\|custom\|ine-\(function\|compiler-macro\|[a-z-]+alias\)\)[ ]+'?\([^ ]+\)/\3/" $(tagslisp)\*.el
+
+# Section handling tags ends here
+
# Section handling info starts here
!if !defined(MAKEINFO)
-MAKEINFO=$(PROGNAME) -vanilla -batch -l texinfmt -f batch-texinfo-format
+MAKEINFO=$(XEMACS_BATCH) -l texinfmt -f batch-texinfo-format
!endif
MANDIR = $(XEMACS)\man
@<<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)))"
+@$(XEMACS_BATCH) -eval "(condition-case nil (require (quote texinfo)) (t (kill-emacs 1)))"
@if not errorlevel 1 goto suggest_makeinfo
@echo XEmacs `info' cannot be built!
@echo Install XEmacs package `texinfo' (see README.packages).
if exist $(DOC) del $(DOC)
docfile :: $(DOC)
-$(DOC): $(LIB_SRC)\make-docfile.exe
+$(DOC): $(LIB_SRC)\make-docfile.exe $(DOC_SRC1) $(DOC_SRC2) $(DOC_SRC3) $(DOC_SRC4) $(DOC_SRC5) $(DOC_SRC6) $(DOC_SRC7) $(DOC_SRC8) $(DOC_SRC9) $(DOC_SRC10) $(DOC_SRC11)
if exist $(DOC) del $(DOC)
set EMACSBOOTSTRAPLOADPATH=$(LISP);$(PACKAGE_PATH)
set EMACSBOOTSTRAPMODULEPATH=$(MODULES)
- $(TEMACS) -batch -l $(TEMACS_DIR)\..\lisp\make-docfile.el -- -o $(DOC) -i $(XEMACS)\site-packages
+ $(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)
$(LIB_SRC)\make-docfile.exe -a $(DOC) -d $(TEMACS_SRC) $(DOC_SRC3)
update-elc:
set EMACSBOOTSTRAPLOADPATH=$(LISP);$(PACKAGE_PATH)
set EMACSBOOTSTRAPMODULEPATH=$(MODULES)
- $(TEMACS) -batch -l $(TEMACS_DIR)\..\lisp\update-elc.el
+ $(TEMACS_BATCH) -l $(TEMACS_DIR)\..\lisp\update-elc.el
+
+# This file is touched by update-elc.el when redumping is necessary.
+$(TEMACS_DIR)\NEEDTODUMP :
+ @echo >$(TEMACS_DIR)\NEEDTODUMP
# This rule dumps xemacs and then possibly spawns sub-make if PURESPACE
# requirements have changed.
-dump-xemacs: temacs
+
+$(PROGNAME) : $(TEMACS) $(TEMACS_DIR)\NEEDTODUMP
@echo >$(TEMACS_DIR)\SATISFIED
cd $(TEMACS_DIR)
set EMACSBOOTSTRAPLOADPATH=$(LISP);$(PACKAGE_PATH)
set EMACSBOOTSTRAPMODULEPATH=$(MODULES)
- -1 $(TEMACS) -batch -l $(TEMACS_DIR)\..\lisp\loadup.el dump
+ -1 $(TEMACS_BATCH) -l $(TEMACS_DIR)\..\lisp\loadup.el dump
!if $(USE_PORTABLE_DUMPER)
- copy temacs.exe xemacs.exe
+ rc -d INCLUDE_DUMP -Fo $(OUTDIR)\xemacs.res $(NT)\xemacs.rc
+ link.exe @<<
+ $(TEMACS_LFLAGS) -out:xemacs.exe $(TEMACS_OBJS) $(OUTDIR)\xemacs.res $(TEMACS_LIBS) $(OUTDIR)\dump-id.obj
+<<
+# Make the resource section read/write since almost all of it is the dump
+# data which needs to be writable. This avoids having to copy it.
+ editbin -nologo -section:.rsrc,rw xemacs.exe
+ del $(TEMACS_DIR)\xemacs.dmp
!endif
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 \
- $(LISP)/auto-autoloads.el $(LISP)/custom-load.el info
+all: installation $(OUTDIR)\nul $(LASTFILE) $(LWLIB) \
+ $(LIB_SRC_TOOLS) $(RUNEMACS) $(TEMACS) update-elc $(DOC) $(PROGNAME) \
+ update-auto-and-custom info
temacs: $(LASTFILE) $(TEMACS)
@xcopy /q $(LIB_SRC)\*.exe "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)\"
@copy $(LIB_SRC)\DOC "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)"
@copy $(CONFIG_VALUES) "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)"
- @copy $(XEMACS)\src\xemacs.exe "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)"
+ @copy $(SRC)\xemacs.exe "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)"
@copy $(RUNEMACS) "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)"
@xcopy /e /q $(XEMACS)\etc "$(INSTALL_DIR)\etc\"
@xcopy /e /q $(XEMACS)\info "$(INSTALL_DIR)\info\"
$(DEL) *.info*
depend:
- cd $(SRCDIR)
+ cd $(SRC)
perl ./make-src-depend > depend.tmp
perl -MFile::Compare -e "compare('depend.tmp', 'depend') && rename('depend.tmp', 'depend') or unlink('depend.tmp')"
-installation::
- @if exist $(XEMACS)\Installation del $(XEMACS)\Installation
-
-installation:: $(XEMACS)\Installation
+$(XEMACS)\Installation:: installation
-$(XEMACS)\Installation:
+installation::
@type > $(XEMACS)\Installation <<
!if defined(OS)
OS: $(OS)
!if $(INFODOCK)
Building InfoDock.
!endif
-!if $(HAVE_MSW)
+!if $(HAVE_MS_WINDOWS)
Compiling in support for Microsoft Windows native GUI.
!endif
-!if $(HAVE_X)
+!if $(HAVE_X_WINDOWS)
Compiling in support for X-Windows.
!endif
!if $(HAVE_MULE)
!if $(DEBUG_XEMACS)
Compiling in extra debug checks. XEmacs will be slow!
!endif
+!if $(QUICK_BUILD)
+ Disabling non-essential build actions. Use with care!
+!endif
<<NOKEEP
@echo --------------------------------------------------------------------
@type $(XEMACS)\Installation
# 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 $@
+update-auto-and-custom:
+# Don't delete this, because it forces rebuilding from scratch,
+# which is time-consuming; and the autoload code is specifically
+# written to do in-place updating.
+# @$(DEL) $(LISP)\auto-autoloads.el
+# Combine into one invocation to avoid repeated startup penalty.
+ $(XEMACS_BATCH) -l autoload -f batch-update-one-directory $(LISP) -f batch-byte-compile-one-file $(LISP)\auto-autoloads.el -l cus-dep -f Custom-make-dependencies $(LISP)
@$(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.
+#ifdef INCLUDE_DUMP
+101 DUMP "xemacs.dmp"
+#endif
+
XEmacs icon preload "xemacs.ico"
XEmacsFile icon "File.ico"
XEmacsLisp icon "Lisp.ico"
sheap-adjust.h
temacs
xemacs
+xemacs.dmp
SATISFIED
update-elc.stamp
-*.so.*
\ No newline at end of file
+*.so.*
+gmon.out
call debug_print ($1);
}
+Lisp_Type_Int=-2
+
# A bug in dbx prevents string variables from having values beginning with `-'!!
function XEmacsInit {
function ToInt { eval "$1=\$[(int) \`alloc.c\`$1]"; }
ToInt dbg_USE_UNION_TYPE
- ToInt Lisp_Type_Int
ToInt Lisp_Type_Char
- ToInt Lisp_Type_Cons
- ToInt Lisp_Type_String
- ToInt Lisp_Type_Vector
- ToInt Lisp_Type_Symbol
ToInt Lisp_Type_Record
ToInt dbg_valbits
ToInt dbg_gctypebits
fi
if test $type = $Lisp_Type_Record; then
- typeset lheader="((struct lrecord_header *) $val)"
+ lheader="((struct lrecord_header *) $val)"
+ lrecord_type=$[(enum lrecord_type) $lheader->type]
imp=$[(void*)(`alloc.c`lrecord_implementations_table[$lheader->type])]
else
+ lheader="((struct lrecord_header *) -1)"
+ lrecord_type=-1
imp="0xdeadbeef"
fi
# printvar obj val type imp
decode_object "$*"
if test $type = $Lisp_Type_Int; then echo "int"
elif test $type = $Lisp_Type_Char; then echo "char"
- elif test $type = $Lisp_Type_Symbol; then echo "symbol"
- elif test $type = $Lisp_Type_String; then echo "string"
- elif test $type = $Lisp_Type_Vector; then echo "vector"
- elif test $type = $Lisp_Type_Cons; then echo "cons"
elif test $type = null_pointer; then echo "null_pointer"
else
echo "record type with name: $[((struct lrecord_implementation *)$imp)->name]"
run -batch -l ../lisp/loadup.el dump
}
-function pstruct {
- xstruct="((struct $1 *) $val)"
- print $xstruct
- print *$xstruct
-}
-
-function lrecord_type_p {
- if eval test -z \"\$lrecord_$1\" && test $imp = $[(void*)(&lrecord_$1)]; then return 0; else return 1; fi
+function pstruct { # pstruct foo.c struct-name
+ module "$1" > /dev/null
+ type_ptr="((struct $2 *) $val)"
+ print $type_ptr
+ print *$type_ptr
}
document pobj << 'end'
else
print -f"Char: %d" $val
fi
- elif test $type = $Lisp_Type_String || lrecord_type_p string; then
- pstruct Lisp_String
- elif test $type = $Lisp_Type_Cons || lrecord_type_p cons; then
- pstruct Lisp_Cons
- elif test $type = $Lisp_Type_Symbol || lrecord_type_p symbol; then
- pstruct Lisp_Symbol
- echo "Symbol name: $[(char *)($xstruct->name->data)]"
- elif test $type = $Lisp_Type_Vector || lrecord_type_p vector; then
- pstruct Lisp_Vector
- echo "Vector of length $[$xstruct->size]"
- elif lrecord_type_p bit_vector; then
- pstruct Lisp_Bit_Vector
- elif lrecord_type_p buffer; then
- pstruct buffer
- elif lrecord_type_p char_table; then
- pstruct Lisp_Char_Table
- elif lrecord_type_p char_table_entry; then
- pstruct Lisp_Char_Table_Entry
- elif lrecord_type_p charset; then
- pstruct Lisp_Charset
- elif lrecord_type_p coding_system; then
- pstruct Lisp_Coding_System
- elif lrecord_type_p color_instance; then
- pstruct Lisp_Color_Instance
- elif lrecord_type_p command_builder; then
- pstruct command_builder
- elif lrecord_type_p compiled_function; then
- pstruct Lisp_Compiled_Function
- elif lrecord_type_p console; then
- pstruct console
- elif lrecord_type_p database; then
- pstruct Lisp_Database
- elif lrecord_type_p device; then
- pstruct device
- elif lrecord_type_p event; then
- pstruct Lisp_Event
- elif lrecord_type_p extent; then
- pstruct extent
- elif lrecord_type_p extent_auxiliary; then
- pstruct extent_auxiliary
- elif lrecord_type_p extent_info; then
- pstruct extent_info
- elif lrecord_type_p face; then
- pstruct Lisp_Face
- elif lrecord_type_p float; then
- pstruct Lisp_Float
- elif lrecord_type_p font_instance; then
- pstruct Lisp_Font_Instance
- elif lrecord_type_p frame; then
- pstruct frame
- elif lrecord_type_p glyph; then
- pstruct Lisp_Glyph
- elif lrecord_type_p hash_table; then
- pstruct Lisp_Hash_Table
- elif lrecord_type_p image_instance; then
- pstruct Lisp_Image_Instance
- elif lrecord_type_p keymap; then
- pstruct Lisp_Keymap
- elif lrecord_type_p lcrecord_list; then
- pstruct lcrecord_list
- elif lrecord_type_p lstream; then
- pstruct lstream
- elif lrecord_type_p marker; then
- pstruct Lisp_Marker
- elif lrecord_type_p opaque; then
- pstruct Lisp_Opaque
- 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
- pstruct Lisp_Process
- elif lrecord_type_p range_table; then
- pstruct Lisp_Range_Table
- elif lrecord_type_p specifier; then
- pstruct Lisp_Specifier
- elif lrecord_type_p subr; then
- pstruct Lisp_Subr
- elif lrecord_type_p symbol_value_buffer_local; then
- pstruct symbol_value_buffer_local
- elif lrecord_type_p symbol_value_forward; then
- pstruct symbol_value_forward
- elif lrecord_type_p symbol_value_lisp_magic; then
- pstruct symbol_value_lisp_magic
- elif lrecord_type_p symbol_value_varalias; then
- pstruct symbol_value_varalias
- elif lrecord_type_p toolbar_button; then
- pstruct toolbar_button
- elif lrecord_type_p tooltalk_message; then
- pstruct Lisp_Tooltalk_Message
- elif lrecord_type_p tooltalk_pattern; then
- pstruct Lisp_Tooltalk_Pattern
- elif lrecord_type_p weak_list; then
- pstruct weak_list
- elif lrecord_type_p window; then
- pstruct window
- elif lrecord_type_p window_configuration; then
- pstruct window_config
+ elif test $lrecord_type = lrecord_type_string; then
+ pstruct alloc.c Lisp_String
+ elif test $lrecord_type = lrecord_type_cons; then
+ pstruct alloc.c Lisp_Cons
+ elif test $lrecord_type = lrecord_type_symbol; then
+ pstruct symbols.c Lisp_Symbol
+ echo "Symbol name: $[(char *)($type_ptr->name->data)]"
+ elif test $lrecord_type = lrecord_type_vector; then
+ pstruct alloc.c Lisp_Vector
+ echo "Vector of length $[$type_ptr->size]"
+ elif test $lrecord_type = lrecord_type_bit_vector; then
+ pstruct fns.c Lisp_Bit_Vector
+ elif test $lrecord_type = lrecord_type_buffer; then
+ pstruct buffer.c buffer
+ elif test $lrecord_type = lrecord_type_char_table; then
+ pstruct chartab.c Lisp_Char_Table
+ elif test $lrecord_type = lrecord_type_char_table_entry; then
+ pstruct chartab.c Lisp_Char_Table_Entry
+ elif test $lrecord_type = lrecord_type_charset; then
+ pstruct mule-charset.c Lisp_Charset
+ elif test $lrecord_type = lrecord_type_coding_system; then
+ pstruct file-coding.c Lisp_Coding_System
+ elif test $lrecord_type = lrecord_type_color_instance; then
+ pstruct objects.c Lisp_Color_Instance
+ elif test $lrecord_type = lrecord_type_command_builder; then
+ pstruct event-stream.c command_builder
+ elif test $lrecord_type = lrecord_type_compiled_function; then
+ pstruct bytecode.c Lisp_Compiled_Function
+ elif test $lrecord_type = lrecord_type_console; then
+ pstruct console.c console
+ elif test $lrecord_type = lrecord_type_database; then
+ pstruct database.c Lisp_Database
+ elif test $lrecord_type = lrecord_type_device; then
+ pstruct device.c device
+ elif test $lrecord_type = lrecord_type_event; then
+ pstruct events.c Lisp_Event
+ elif test $lrecord_type = lrecord_type_extent; then
+ pstruct extents.c extent
+ elif test $lrecord_type = lrecord_type_extent_auxiliary; then
+ pstruct extents.c extent_auxiliary
+ elif test $lrecord_type = lrecord_type_extent_info; then
+ pstruct extents.c extent_info
+ elif test $lrecord_type = lrecord_type_face; then
+ pstruct faces.c Lisp_Face
+ elif test $lrecord_type = lrecord_type_float; then
+ pstruct floatfns.c Lisp_Float
+ elif test $lrecord_type = lrecord_type_font_instance; then
+ pstruct objects.c Lisp_Font_Instance
+ elif test $lrecord_type = lrecord_type_frame; then
+ pstruct frame.c frame
+ elif test $lrecord_type = lrecord_type_glyph; then
+ pstruct glyph.c Lisp_Glyph
+ elif test $lrecord_type = lrecord_type_gui_item; then
+ pstruct gui.c Lisp_Gui_Item
+ elif test $lrecord_type = lrecord_type_hash_table; then
+ pstruct elhash.c Lisp_Hash_Table
+ elif test $lrecord_type = lrecord_type_image_instance; then
+ pstruct glyphs.c Lisp_Image_Instance
+ elif test $lrecord_type = lrecord_type_keymap; then
+ pstruct keymap.c Lisp_Keymap
+ elif test $lrecord_type = lrecord_type_lcrecord_list; then
+ pstruct alloc.c lcrecord_list
+ elif test $lrecord_type = lrecord_type_ldap; then
+ pstruct ldap.c Lisp_LDAP
+ elif test $lrecord_type = lrecord_type_lstream; then
+ pstruct lstream.c lstream
+ elif test $lrecord_type = lrecord_type_marker; then
+ pstruct marker.c Lisp_Marker
+ elif test $lrecord_type = lrecord_type_opaque; then
+ pstruct opaque.c Lisp_Opaque
+ elif test $lrecord_type = lrecord_type_opaque_ptr; then
+ pstruct opaque.c Lisp_Opaque_Ptr
+ elif test $lrecord_type = lrecord_type_popup_data; then
+ pstruct gui-x.c popup_data
+ elif test $lrecord_type = lrecord_type_process; then
+ pstruct process.c Lisp_Process
+ elif test $lrecord_type = lrecord_type_range_table; then
+ pstruct rangetab.c Lisp_Range_Table
+ elif test $lrecord_type = lrecord_type_specifier; then
+ pstruct specifier.c Lisp_Specifier
+ elif test $lrecord_type = lrecord_type_subr; then
+ pstruct eval.c Lisp_Subr
+ elif test $lrecord_type = lrecord_type_symbol_value_buffer_local; then
+ pstruct symbols.c symbol_value_buffer_local
+ elif test $lrecord_type = lrecord_type_symbol_value_forward; then
+ pstruct symbols.c symbol_value_forward
+ elif test $lrecord_type = lrecord_type_symbol_value_lisp_magic; then
+ pstruct symbols.c symbol_value_lisp_magic
+ elif test $lrecord_type = lrecord_type_symbol_value_varalias; then
+ pstruct symbols.c symbol_value_varalias
+ elif test $lrecord_type = lrecord_type_timeout; then
+ pstruct event-stream.c Lisp_Timeout
+ elif test $lrecord_type = lrecord_type_toolbar_button; then
+ pstruct toolbar.c toolbar_button
+ elif test $lrecord_type = lrecord_type_tooltalk_message; then
+ pstruct tooltalk.c Lisp_Tooltalk_Message
+ elif test $lrecord_type = lrecord_type_tooltalk_pattern; then
+ pstruct tooltalk.c Lisp_Tooltalk_Pattern
+ elif test $lrecord_type = lrecord_type_weak_list; then
+ pstruct data.c weak_list
+ elif test $lrecord_type = lrecord_type_window; then
+ pstruct window.c window
+ elif test $lrecord_type = lrecord_type_window_configuration; then
+ pstruct window.c window_config
elif test "$type" = "null_pointer"; then
echo "Lisp Object is a null pointer!!"
else
fi
}
-function pproc {
- print *(`process.c`struct Lisp_Process*)$1 ;
- ldp "(`process.c`struct Lisp_Process*)$1->name" ;
- ldp "(`process.c`struct Lisp_Process*)$1->command" ;
-}
-
dbxenv suppress_startup_message 4.0
-dbxenv mt_watchpoints on
+# dbxenv mt_watchpoints on
function dp_core {
print ((struct x_frame *)(((struct frame*)(Fselected_frame(Qnil)&0x00FFFFFF))->frame_data))->widget->core
set print union off
set print pretty off
+set $Lisp_Type_Int = -2
+
define decode_object
set $obj = (unsigned long) $arg0
if $obj & 1
# It's an int
set $val = $obj >> 1
- set $type = Lisp_Type_Int
+ set $type = $Lisp_Type_Int
else
set $type = $obj & dbg_typemask
if $type == Lisp_Type_Char
end
if $type == Lisp_Type_Record
- set $lheader = (struct lrecord_header *) $val
- set $imp = lrecord_implementations_table[$lheader->type]
+ set $lheader = ((struct lrecord_header *) $val)
+ set $lrecord_type = ($lheader->type)
+ set $imp = lrecord_implementations_table[$lrecord_type]
else
+ set $lrecord_type = -1
+ set $lheader = -1
set $imp = -1
end
end
define xtype
decode_object $arg0
- if $type == Lisp_Type_Int
+ if $type == $Lisp_Type_Int
echo int\n
else
if $type == Lisp_Type_Char
echo char\n
else
- if $type == Lisp_Type_Symbol
- echo symbol\n
- else
- if $type == Lisp_Type_String
- echo string\n
- else
- if $type == Lisp_Type_Vector
- echo vector\n
- else
- if $type == Lisp_Type_Cons
- echo cons\n
- else
printf "record type: %s\n", $imp->name
- # barf
- end
- end
- end
- end
end
end
end
# GDB's command language makes you want to ...
-define pstruct
- set $xstruct = (struct $arg0 *) $val
- print $xstruct
- print *$xstruct
+define ptype
+ set $type_ptr = ($arg0 *) $val
+ print $type_ptr
+ print *$type_ptr
+end
+
+define pstructtype
+ set $type_ptr = (struct $arg0 *) $val
+ print $type_ptr
+ print *$type_ptr
end
define pobj
decode_object $arg0
- if $type == Lisp_Type_Int
+ if $type == $Lisp_Type_Int
printf "Integer: %d\n", $val
else
if $type == Lisp_Type_Char
printf "Char: %d\n", $val
end
else
- if $type == Lisp_Type_String || $imp == &lrecord_string
- pstruct Lisp_String
+ if $lrecord_type == lrecord_type_string
+ ptype Lisp_String
+ else
+ if $lrecord_type == lrecord_type_cons
+ ptype Lisp_Cons
+ else
+ if $lrecord_type == lrecord_type_symbol
+ ptype Lisp_Symbol
+ printf "Symbol name: %s\n", $type_ptr->name->data
else
- if $type == Lisp_Type_Cons || $imp == &lrecord_cons
- pstruct Lisp_Cons
+ if $lrecord_type == lrecord_type_vector
+ ptype Lisp_Vector
+ printf "Vector of length %d\n", $type_ptr->size
+ #print *($type_ptr->data) @ $type_ptr->size
else
- if $type == Lisp_Type_Symbol || $imp == &lrecord_symbol
- pstruct Lisp_Symbol
- printf "Symbol name: %s\n", $xstruct->name->data
+ if $lrecord_type == lrecord_type_bit_vector
+ ptype Lisp_Bit_Vector
else
- if $type == Lisp_Type_Vector || $imp == &lrecord_vector
- pstruct Lisp_Vector
- printf "Vector of length %d\n", $xstruct->size
- #print *($xstruct->data) @ $xstruct->size
+ if $lrecord_type == lrecord_type_buffer
+ pstructtype buffer
else
- if $imp == &lrecord_bit_vector
- pstruct Lisp_Bit_Vector
+ if $lrecord_type == lrecord_type_char_table
+ ptype Lisp_Char_Table
else
- if $imp == &lrecord_buffer
- pstruct buffer
+ if $lrecord_type == lrecord_type_char_table_entry
+ ptype Lisp_Char_Table_Entry
else
- if $imp == &lrecord_char_table
- pstruct Lisp_Char_Table
+ if $lrecord_type == lrecord_type_charset
+ ptype Lisp_Charset
else
- if $imp == &lrecord_char_table_entry
- pstruct Lisp_Char_Table_Entry
+ if $lrecord_type == lrecord_type_coding_system
+ ptype Lisp_Coding_System
else
- if $imp == &lrecord_charset
- pstruct Lisp_Charset
+ if $lrecord_type == lrecord_type_color_instance
+ ptype Lisp_Color_Instance
else
- if $imp == &lrecord_coding_system
- pstruct Lisp_Coding_System
+ if $lrecord_type == lrecord_type_command_builder
+ ptype command_builder
else
- if $imp == &lrecord_color_instance
- pstruct Lisp_Color_Instance
+ if $lrecord_type == lrecord_type_compiled_function
+ ptype Lisp_Compiled_Function
else
- if $imp == &lrecord_command_builder
- pstruct command_builder
+ if $lrecord_type == lrecord_type_console
+ pstructtype console
else
- if $imp == &lrecord_compiled_function
- pstruct Lisp_Compiled_Function
+ if $lrecord_type == lrecord_type_database
+ ptype Lisp_Database
else
- if $imp == &lrecord_console
- pstruct console
+ if $lrecord_type == lrecord_type_device
+ pstructtype device
else
- if $imp == &lrecord_database
- pstruct Lisp_Database
+ if $lrecord_type == lrecord_type_event
+ ptype Lisp_Event
else
- if $imp == &lrecord_device
- pstruct device
+ if $lrecord_type == lrecord_type_extent
+ pstructtype extent
else
- if $imp == &lrecord_event
- pstruct Lisp_Event
+ if $lrecord_type == lrecord_type_extent_auxiliary
+ pstructtype extent_auxiliary
else
- if $imp == &lrecord_extent
- pstruct extent
+ if $lrecord_type == lrecord_type_extent_info
+ pstructtype extent_info
else
- if $imp == &lrecord_extent_auxiliary
- pstruct extent_auxiliary
+ if $lrecord_type == lrecord_type_face
+ ptype Lisp_Face
else
- if $imp == &lrecord_extent_info
- pstruct extent_info
+ if $lrecord_type == lrecord_type_float
+ ptype Lisp_Float
else
- if $imp == &lrecord_face
- pstruct Lisp_Face
+ if $lrecord_type == lrecord_type_font_instance
+ ptype Lisp_Font_Instance
else
- if $imp == &lrecord_float
- pstruct Lisp_Float
+ if $lrecord_type == lrecord_type_frame
+ pstructtype frame
else
- if $imp == &lrecord_font_instance
- pstruct Lisp_Font_Instance
+ if $lrecord_type == lrecord_type_glyph
+ ptype Lisp_Glyph
else
- if $imp == &lrecord_frame
- pstruct frame
+ if $lrecord_type == lrecord_type_gui_item
+ ptype Lisp_Gui_Item
else
- if $imp == &lrecord_glyph
- pstruct Lisp_Glyph
+ if $lrecord_type == lrecord_type_hash_table
+ ptype Lisp_Hash_Table
else
- if $imp == &lrecord_hash_table
- pstruct Lisp_Hash_Table
+ if $lrecord_type == lrecord_type_image_instance
+ ptype Lisp_Image_Instance
else
- if $imp == &lrecord_image_instance
- pstruct Lisp_Image_Instance
+ if $lrecord_type == lrecord_type_keymap
+ ptype Lisp_Keymap
else
- if $imp == &lrecord_keymap
- pstruct Lisp_Keymap
+ if $lrecord_type == lrecord_type_lcrecord_list
+ pstructtype lcrecord_list
else
- if $imp == &lrecord_lcrecord_list
- pstruct lcrecord_list
+ if $lrecord_type == lrecord_type_ldap
+ ptype Lisp_LDAP
else
- if $imp == &lrecord_lstream
- pstruct lstream
+ if $lrecord_type == lrecord_type_lstream
+ pstructtype lstream
else
- if $imp == &lrecord_marker
- pstruct Lisp_Marker
+ if $lrecord_type == lrecord_type_marker
+ ptype Lisp_Marker
else
- if $imp == &lrecord_opaque
- pstruct Lisp_Opaque
+ if $lrecord_type == lrecord_type_opaque
+ ptype Lisp_Opaque
else
- if $imp == &lrecord_opaque_ptr
- pstruct Lisp_Opaque_Ptr
+ if $lrecord_type == lrecord_type_opaque_ptr
+ ptype Lisp_Opaque_Ptr
else
- if $imp == &lrecord_popup_data
- pstruct popup_data
+ if $lrecord_type == lrecord_type_popup_data
+ ptype popup_data
else
- if $imp == &lrecord_process
- pstruct Lisp_Process
+ if $lrecord_type == lrecord_type_process
+ ptype Lisp_Process
else
- if $imp == &lrecord_range_table
- pstruct Lisp_Range_Table
+ if $lrecord_type == lrecord_type_range_table
+ ptype Lisp_Range_Table
else
- if $imp == &lrecord_specifier
- pstruct Lisp_Specifier
+ if $lrecord_type == lrecord_type_specifier
+ ptype Lisp_Specifier
else
- if $imp == &lrecord_subr
- pstruct Lisp_Subr
+ if $lrecord_type == lrecord_type_subr
+ ptype Lisp_Subr
else
- if $imp == &lrecord_symbol_value_buffer_local
- pstruct symbol_value_buffer_local
+ if $lrecord_type == lrecord_type_symbol_value_buffer_local
+ pstructtype symbol_value_buffer_local
else
- if $imp == &lrecord_symbol_value_forward
- pstruct symbol_value_forward
+ if $lrecord_type == lrecord_type_symbol_value_forward
+ pstructtype symbol_value_forward
else
- if $imp == &lrecord_symbol_value_lisp_magic
- pstruct symbol_value_lisp_magic
+ if $lrecord_type == lrecord_type_symbol_value_lisp_magic
+ pstructtype symbol_value_lisp_magic
else
- if $imp == &lrecord_symbol_value_varalias
- pstruct symbol_value_varalias
+ if $lrecord_type == lrecord_type_symbol_value_varalias
+ pstructtype symbol_value_varalias
else
- if $imp == &lrecord_toolbar_button
- pstruct toolbar_button
+ if $lrecord_type == lrecord_type_timeout
+ ptype Lisp_Timeout
else
- if $imp == &lrecord_tooltalk_message
- pstruct Lisp_Tooltalk_Message
+ if $lrecord_type == lrecord_type_toolbar_button
+ pstructtype toolbar_button
else
- if $imp == &lrecord_tooltalk_pattern
- pstruct Lisp_Tooltalk_Pattern
+ if $lrecord_type == lrecord_type_tooltalk_message
+ ptype Lisp_Tooltalk_Message
else
- if $imp == &lrecord_weak_list
- pstruct weak_list
+ if $lrecord_type == lrecord_type_tooltalk_pattern
+ ptype Lisp_Tooltalk_Pattern
else
- if $imp == &lrecord_window
- pstruct window
+ if $lrecord_type == lrecord_type_weak_list
+ pstructtype weak_list
else
- if $imp == &lrecord_window_configuration
- pstruct window_config
+ if $lrecord_type == lrecord_type_window
+ pstructtype window
+ else
+ if $lrecord_type == lrecord_type_window_configuration
+ pstructtype window_config
else
echo Unknown Lisp Object type\n
print $arg0
end
end
end
+ end
+ end
# Repeat after me... gdb sux, gdb sux, gdb sux...
end
end
end
end
end
+ end
end
document pobj
(Vcharset_thai_tis620): Likewise.
(Vcharset_katakana_jisx0201): Likewise.
+2000-05-01 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.33 is released.
+
+2000-05-01 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * make-src-depend: Allow dots in header file name.
+
+2000-05-01 Yoshiki Hayashi <yoshiki@xmacs.org>
+
+ * mule-charset.h (struct charset_lookup): Add
+ next_allocated_1_byte_leading_byte and
+ next_allocated_2_byte_leading_byte.
+ * mule-charset.c: Move above two variables so that those values
+ will be dumped.
+
+2000-04-26 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * insdel.c (find_charsets_in_bufbyte_string): Add Vcharset_ascii
+ when string length is zero.
+ (find_charsets_in_emchar_string): Ditto.
+
+2000-04-29 Bjrn Torkelsson <torkel@hpc2n.umu.se>
+
+ * lisp.h: extern Qdialog and Qmenubar.
+
+ * gui-x.c: added events.h.
+ also fixed typo which made the file uncompilable.
+
+ * general.c: Added Qmenubar and Qdialog
+
+2000-04-28 Ben Wing <ben@xemacs.org>
+
+ * frame-msw.c (mswindows_init_frame_1):
+ * frame-msw.c (mswindows_mark_frame):
+ * event-msw.c (mswindows_enqueue_dispatch_event):
+ * console-msw.h:
+ * console-msw.h (struct mswindows_frame):
+ * console-msw.h (FRAME_MSWINDOWS_WIDGET_HASH_TABLE1):
+ there are now three hash tables for callbacks.
+ mswindows_enqueue_dispatch_event is no longer static.
+
+ * dialog-x.c (maybe_run_dbox_text_callback):
+ * dialog-x.c (dbox_descriptor_to_widget_value):
+ switch to new cons3 form for callbacks.
+
+ * glyphs-msw.c (mswindows_register_gui_item):
+ * glyphs-msw.c (mswindows_widget_instantiate):
+ * glyphs-msw.c (add_tree_item):
+ * glyphs-msw.c (add_tab_item):
+ new image instance parameter, so it can be passed to callback-ex.
+ respect :callback-ex as well as :callback.
+
+ * glyphs-widget.c (VALID_GUI_KEYWORDS):
+ add :callback-ex.
+
+ * glyphs.c (print_image_instance):
+ prettify, e.g. now prints widget type.
+
+ * gui-x.h:
+ certain funs have new image instance parameter.
+
+ * gui.c:
+ * gui.c (get_gui_callback):
+ * gui.c (gui_item_add_keyval_pair):
+ * gui.c (gui_item_init):
+ * gui.c (gui_add_item_keywords_to_plist):
+ * gui.c (mark_gui_item):
+ * gui.c (gui_item_hash):
+ * gui.c (gui_item_equal):
+ * gui.c (copy_gui_item):
+ * gui.c (syms_of_gui):
+ recognize callback-ex in a number of places.
+ also, fix the annoying "can't get out of yes-no dialog" bug.
+
+ * gui.h:
+ * gui.h (struct Lisp_Gui_Item):
+ recognize callback-ex in a number of places.
+
+ * menubar-x.c (menu_item_descriptor_to_widget_value_1):
+ new parameter in button_item_to_widget_value.
+
+ * glyphs-x.c (x_update_widget):
+ * glyphs-x.c (x_button_instantiate):
+ * glyphs-x.c (x_button_update):
+ * glyphs-x.c (x_progress_gauge_instantiate):
+ * glyphs-x.c (x_edit_field_instantiate):
+ * glyphs-x.c (x_combo_box_instantiate):
+ * glyphs-x.c (x_tab_control_instantiate):
+ * glyphs-x.c (x_label_instantiate):
+ new image instance parameter in various places.
+
+ * event-Xt.c:
+ * event-Xt.c (enqueue_Xt_dispatch_event):
+ this fun gets exported.
+
+ * gui-msw.c:
+ * gui-msw.c (mswindows_handle_gui_wm_command):
+ handle both :callback and :callback-ex, and generate our own
+ event because it's one of the callback-ex arguments.
+
+ * gui-x.c:
+ * gui-x.c (popup_selection_callback):
+ handle both :callback and :callback-ex, and generate our own
+ event because it's one of the callback-ex arguments.
+ * gui-x.c (button_item_to_widget_value):
+ * gui-x.c (gui_items_to_widget_values_1):
+ * gui-x.c (gui_item_children_to_widget_values):
+ * gui-x.c (gui_items_to_widget_values):
+ new image instance parameter in various places.
+
+ * fns.c (Freplace_list):
+ fix small typo in doc string.
+
+ * lisp.h:
+ declare enqueue_Xt_dispatch_event.
+
+2000-04-28 Ben Wing <ben@xemacs.org>
+
+ * buffer.c:
+ * buffer.c (Frecord_buffer):
+ * buffer.c (syms_of_buffer):
+ delete record-buffer-hook.
+
+ * fns.c:
+ * fns.c (Freplace_list):
+ * fns.c (syms_of_fns):
+ new primitive replace-list.
+
+ * frameslots.h:
+ slot for old buffer-alist.
+
+ * lisp.h:
+ exfun replace-list.
+
+ * redisplay.c:
+ * redisplay.c (redisplay_frame):
+ * redisplay.c (syms_of_redisplay):
+ * redisplay.c (vars_of_redisplay):
+ new hook buffer-list-changed-hook.
+ call it.
+
+2000-04-27 Ben Wing <ben@xemacs.org>
+
+ * extents.h: extern in_modeline_generation.
+
+ * redisplay.c (generate_formatted_string_db): set
+ in_modeline_generation.
+
+ * extents.c (extent_changed_for_redisplay): don't mark redisplay
+ flags if in modeline generation. otherwise frame-modified-tick
+ is ticked far too often.
+ Declare in_modeline_generation.
+
+2000-04-26 Ben Wing <ben@xemacs.org>
+
+ * emacs.c (vars_of_emacs): document quick-build "error-checking"
+ option.
+ (vars_of_emacs): add quick-build as an error-checking option.
+ A bit kludgy, but there doesn't seem much point in creating
+ a real var for this.
+
+ * config.h.in: put in an entry for QUICK_BUILD; remove NO_DOC_FILE.
+
+2000-04-14 IKEYAMA Tomonori <tomonori@suiyokai.org>
+
+ * redisplay.h (struct display_line): Add a new variable,
+ line_continuation.
+
+ * redisplay.c (create_text_block): Set dl->line_continuation if
+ the line continues.
+ (create_string_text_block): Ditto.
+ (regenerate_window_incrementally): Use line_continuation instead
+ of searching continuation glyph.
+ (add_margin_runes): Call add_glyph_rune.
+ (add_glyph_rune): Handle margin glyph.
+
+2000-04-20 Martin Buchholz <martin@xemacs.org>
+
+ * filelock.c (fill_in_lock_file_name):
+ ANSIfy.
+ Check for IS_ANY_SEP instead of '/'.
+ (lock_file_1):
+ Avoid generating gratuitous garbage. Call user_login_name() directly.
+ Never check errno without first seeing that system call failed.
+ (unlock_file): Add GCPRO.
+ (Flock_buffer): Fix docstring.
+ (Ffile_locked_p): Fix docstring. Add GCPRO.
+
+2000-04-19 Martin Buchholz <martin@xemacs.org>
+
+ * sysdep.c (get_pty_max_bytes):
+ Fix hangs on DEC OSF 4.0 when (process-send-string) sends
+ strings longer than 252 bytes.
+
+ * md5.c: Unconditionally include ANSI header <limits.h>
+
+ * glyphs-x.c (convert_EImage_to_XImage):
+ * lisp-union.h (union Lisp_Object):
+ Use consistently the syntax #ifdef FEATURE, not #if FEATURE.
+
+2000-04-13 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * filelock.c (current_lock_owner): Remove unused variable o, p.
+
+2000-04-17 Norbert Koch <n.koch@eai-delta.de>
+
+ * callint.c: Remove multiply defined symbol Qlet
+ (syms_of_callint): ditto.
+
+2000-04-14 Andy Piper <andy@xemacs.org>
+
+ * general.c (syms_of_general): add last-command, this-command, let
+ and funcall.
+
+ * lisp.h: declare various symbols.
+
+ * glyphs.h: declare Qwidget_callback_current_channel;
+
+ * glyphs-widget.c (syms_of_glyphs_widget): add
+ Qgui_callback_current_channel.
+ (vars_of_glyphs_widget): add Vgui_callback_current_channel.
+
+ * gui-msw.c (mswindows_handle_gui_wm_command): bind
+ widget-callback-current-channel when invoking the interactive
+ arg. Also bind last-command and next-command when invoking the
+ widget updates.
+ * gui-x.c (popup_selection_callback): ditto.
+
+ * gui.c (get_gui_callback): massage args so that we are always
+ calling eval. This allows us to add our own variable bindings
+ outside.
+
+ * glyphs-x.c (x_button_instantiate): use
+ gui_items_to_widget_values since this is GC safe.
+ (x_progress_gauge_instantiate): ditto.
+ (x_edit_field_instantiate): ditto.
+ (x_label_instantiate): ditto.
+
+ * event-Xt.c (emacs_Xt_handle_magic_event): remove old printfs.
+ (emacs_Xt_event_widget_focus_out): new function
+ (emacs_Xt_event_widget_focus_in): new function. Set the keyboard
+ focus.
+ (emacs_Xt_event_add_widget_actions): new function. add focus
+ functions as actions.
+ (init_event_Xt_late): use it.
+
+2000-04-14 Hrvoje Niksic <hniksic@iskon.hr>
+
+ * event-stream.c (Fdispatch_event): Doc fix.
+
+2000-03-29 SL Baur <steve@musashimaru.m17n.org>
+
+ * postgresql.c: Remove all references to PQsetenv*.
+
+ * postgresql.h: Remove references to PGsetenvHandler object.
+ * lrecord.h (lrecord_type): Ditto.
+
+2000-04-11 Kirill 'Big K' Katsnelson <kkm@dtmx.com>
+
+ * glyphs-msw.h (struct mswindows_image_instance_data): Added
+ real_heigh and real_width members, and accessor macros for these.
+
+ * glyphs-msw.c (init_image_instance_geometry): New function.
+ (init_image_instance_from_dibitmap): Use it.
+ (mswindows_resource_instantiate): Use it.
+ (init_image_instance_from_xbm_inline): Use it.
+ (mswindows_initialize_image_instance_mask): Use real bitmap
+ geometry.
+ (mswindows_create_resized_bitmap): Ditto.
+ (mswindows_create_resized_mask): Ditto.
+
+ * redisplay-msw.c (mswindows_output_dibitmap): Stretch real mask
+ and bitmap to their surface size.
+
+2000-04-11 Jan Vroonhof <jan@xemacs.org>
+
+ * process-unix.c (unix_send_process): Guard against process MIA
+ after Faccept_process_output.
+
+2000-04-11 Ben Wing <ben@xemacs.org>
+
+ * eval.c (unbind_to_hairy): fix brokenness introduced by
+ nanosecond speed improvements.
+
+2000-04-07 Raymond Toy <toy@rtp.ericsson.se>
+
+ * sunplay.c (init_device): To play sounds correctly, the device
+ apparently needs to be initialized at least once by XEmacs. Make
+ it so.
+
+2000-04-10 IKEYAMA Tomonori <tomonori@suiyokai.org>
+
+ * redisplay.c (add_margin_runes): Add text image glyph
+ handling.
+
+2000-04-06 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * lisp.h (DOESNT_RETURN): Don't declare as volatile when
+ gcc is newer than 2.5.
+
+2000-04-06 Colin Rafferty <colin@xemacs.org>
+
+ * lisp.h (FLEXIBLE_ARRAY_STRUCT_SIZEOF): Created.
+
+ * fns.c (size_bit_vector):
+ * alloc.c (size_vector):
+ (make_vector_internal):
+ (make_bit_vector_internal):
+ (sweep_bit_vectors_1):
+ Replace calls to offsetof with FLEXIBLE_ARRAY_STRUCT_SIZEOF macro.
+
+2000-04-06 Andy Piper <andy@xemacs.org>
+
+ * gmalloc.c (malloc): undo previous change.
+ (malloc): ditto.
+ (free): ditto.
+ (realloc): ditto.
+
+2000-04-06 IKEYAMA Tomonori <tomonori@suiyokai.org>
+
+ * line-number.c (buffer_line_number): Revert to former version.
+
+2000-04-06 Andy Piper <andy@xemacs.org>
+
+ * gmalloc.c (malloc): add error checking.
+ (malloc): ditto.
+ (free): ditto.
+ (realloc): ditto.
+
+ * dialog-x.c (dbox_descriptor_to_widget_value): add extra
+ button_item_to_widget_value arg.
+
+ * glyphs-x.c (x_button_instantiate): add extra
+ button_item_to_widget_value arg.
+ (x_progress_gauge_instantiate): ditto.
+ (x_edit_field_instantiate): ditto.
+ (x_label_instantiate): ditto.
+
+ * gui-x.c (gui_items_to_widget_values_1): add extra
+ button_item_to_widget_value arg.
+ (button_item_to_widget_value): add extra menu_item_p arg.
+
+ * gui-x.h: change signature of button_item_to_widget_value.
+
+ * menubar-x.c (menu_item_descriptor_to_widget_value_1): add extra
+ button_item_to_widget_value arg.
+
+2000-04-03 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * buffer.h (struct buffer): auto_save_modified should be long.
+
+2000-04-05 Andy Piper <andy@xemacs.org>
+
+ * glyphs-widget.c (widget_instantiate): pixwidth != pixheight
+ type.
+ (button_query_geometry): give a little more room so that athena
+ buttons fit.
+
+2000-04-05 Andy Piper <andy@xemacs.org>
+
+ * faces.c (complex_vars_of_faces): The widget face should inherit
+ the font of the gui-element face.
+
+2000-04-04 Andy Piper <andy@xemacs.org>
+
+ * glyphs-x.c (x_button_update): new function. unconditionally
+ update a button's state when the instance is dirty.
+ (image_instantiator_format_create_glyphs_x): add x_button_update.
+ (x_widget_instantiate): remove old resize cruft.
+
+2000-04-02 Andy Piper <andy@xemacs.org>
+
+ * frame.c (change_frame_size_1): The introduction of gutters means
+ that we need to allow 0 as a potential frame dimension.
+
+2000-04-02 IKEYAMA Tomonori <tomonori@suiyokai.org>
+
+ * redisplay.c (add_glyph_rune): Don't set 0 to bufpos for text
+ image glyph if allow_cursor.
+ (add_hscroll_rune): Don't allow cursor to border glyph.
+ (create_text_block): Ditto.
+
+ * redisplay-output.c (redisplay_move_cursor): Do nothing even if
+ text not in buffer.
+ (redisplay_output_layout): Call ensure_face_cachel_complete for
+ text image glyph.
+
+
+2000-03-16 IKEYAMA Tomonori <tomonori@suiyokai.org>
+
+ * redisplay.c (add_glyph_rune): Adding text image as text runes.
+
+ * redisplay-output.c (redisplay_move_cursor): NO_CURSOR if text
+ not in buffer
+
+ * redisplay-tty.c (tty_output_display_block): Delete the routine
+ for text image glyph
+ * redisplay-x.c (x_output_display_block): ditto
+ * redisplay-msw.c (mswindows_output_display_block): ditto
+
+2000-02-02 Mike Alexander <mta@arbortext.com>
+
+ Note: Some of these were committed by accident as part of other
+ patches.
+
+ * regex.c (regex_compile): Avoid compiler warnings.
+
+ * ntproc.c (sys_spawnve): Avoid compiler warnings.
+
+ * nt.h: Declare term_ntproc correctly.
+
+ * nt.c: Remove incorrect declaration of get_home_directory which
+ is declared correctly in lisp.h.
+
+ * keymap.c (get_keyelt): Avoid compiler warnings.
+ (raw_lookup_key_mapper): Avoid compiler warnings.
+
+ * gutter.c (gutter_was_visible): Add return statement to avoid warning.
+
+ * glyphs-eimage.c (png_instantiate): Avoid compiler warnings.
+
+ * filemode.c (mode_string): Avoid compiler warnings.
+
+ * file-coding.c (Fcoding_system_aliasee): Add return statement to
+ avoid warning.
+
+ * events-mod.h: Undef some things that winuser.h defines differently.
+
+ * data.c (Faset): Avoid compiler warnings.
+
+ * alloc.c (Fmake_byte_code): Avoid compiler warnings.
+
+2000-03-03 Jan Vroonhof <vroonhof@math.ethz.ch>
+
+ * sound.c (Fplay_sound_file): Wrap ESD in start/stop_interrupts.
+ Fall through to simple beep on error.
+ Replace "extern" by real header file.
+
+ * linuxplay.c: Use nativesound.h
+ (play_sound_data): Return error code. Be less verbose on error.
+
+ * sunplay.c: Use nativesound.h
+ (play_sound_data): Return error code. Be less verbose on error.
+
+ * ntplay.c: Use nativesound.h
+ (play_sound_data): Return fake error code
+
+ * sgiplay.c: Use nativesound.h
+ (play_sound_data): Return error code
+
+ * hpplay.c: Use nativesound.h, partially implement
+ new error code. Break compilation until finished.
+ (play_sound_data): error code.
+
+ * nativesound.h (play_sound_file):
+ (play_sound_data): Prototype in new header.
+
+2000-03-31 Andy Piper <andy@xemacs.org>
+
+ * glyphs-widget.c: (button_query_geometry): new function. Adjust
+ for toggle and radio buttons.
+ (image_instantiator_buttons): use it.
+
+2000-03-03 Jan Vroonhof <vroonhof@math.ethz.ch>
+
+ * scrollbar-x.c (x_update_vertical_scrollbar_callback):
+ (x_update_horizontal_scrollbar_callback): Return if no mirror was
+ found. Scrollbar event probably belonged to some old config.
+
+2000-03-31 Andy Piper <andy@xemacs.org>
+
+ * glyphs-widget.c (widget_instantiate): use LAYOUT_VERTICAL rather
+ than 1.
+ (initialize_widget_image_instance): default layout to
+ LAYOUT_HORIZONTAL rather than 0.
+ (widget_instantiate): reverse the item list at the end rather than
+ every iteration.
+ (layout_layout): re-code for the border text at the front of the
+ item list rather than at the end.
+ (layout_query_geometry): ditto. Pick up fixed and dynamic sizes
+ provided by the user.
+ (widget_query_geometry): comment.
+
+2000-03-30 Andy Piper <andy@xemacs.org>
+
+ * glyphs-widget.c (image_instantiator_layout): allow standard
+ widget keywords in layouts.
+
+ * gutter.c (output_gutter): cope with nil gutter contents.
+
+ * frame.c (Fset_frame_properties): add gutter docs.
+
+2000-03-29 Andy Piper <andy@xemacs.org>
+
+ * toolbar-msw.c (TBSTYLE_FLAT): add.
+ (mswindows_output_toolbar): minor fiddling.
+
+2000-03-29 Andy Piper <andy@xemacs.org>
+
+ * gutter.c (output_gutter): force gutter size recalculation if
+ what we are trying to display won't fit.
+ (update_gutter_geometry): new function. A per-gutter version of
+ update_frame_gutter_geometry.
+ (update_frame_gutter_geometry): use it.
+ (redraw_exposed_gutter): add extra debugging output.
+
+2000-03-28 Mike Alexander <mta@arbortext.com>
+
+ * dumper.c: Declare pdump_hFile and pdump_hMap (Windows only)
+ (pdump_file_unmap): Implement it on Windows
+ (pdump_file_get): Save alocated handles for pdump_file_unmap
+
+2000-03-28 Andy Piper <andy@xemacs.org>
+
+ * gui.c (get_gui_callback): treat Quit specially.
+
+2000-03-27 Andy Piper <andy@xemacs.org>
+
+ * glyphs.c (image_instantiate): be careful to check in the same
+ way we assigned.
+
+2000-03-27 Didier Verna <didier@xemacs.org>
+
+ * config.h.in: define the proper SMART_INCLUDE macro.
+ handle renaming of `foo_h_path' to `foo_h_file'.
+
+ * database.c: ditto.
+
+ * emacs.c: ditto.
+
+ * linuxplay.c: ditto.
+
+ * terminfo.c: ditto.
+
+ * tooltalk.h: ditto.
+
+2000-03-27 Andy Piper <andy@xemacs.org>
+
+ * glyphs-msw.c (mswindows_update_widget): make sure the widget
+ gets updated whenever the face might have changed.
+
+2000-03-26 Mike Alexander <mta@arbortext.com>
+
+ * dumper.c (pdump_resource_free): Fix the comment.
+
+2000-03-21 Olivier Galibert <galibert@pobox.com>
+
+ * input-method-xlib.c (XIM_init_frame): Remove painful warning.
+
+2000-03-22 Mike Alexander <mta@arbortext.com>
+
+ * dumper.c: Include Windows headers on Windows
+ (pdump_resource_free): Add a body to the function
+ (pdump_load): exe_name -> exe_path and add some comments.
+
+2000-03-25 Mike Alexander <mta@arbortext.com>
+
+ * gui.c (copy_gui_item_tree): Return a value in all cases
+
+2000-03-21 Didier Verna <didier@xemacs.org>
+
+ * config.h.in: move INCLUDE_GLUE_1 and INCLUDE_GLUE_2 here from
+ lwlib/config.h.in.
+ (SMART_INCLUDE): new macro.
+ (POSTGRES_INCLUDE): new macro to include postgresql headers from
+ the proper location.
+
+ * postgresql.c: use it.
+
+ * inline.c: ditto.
+
+2000-03-24 Andy Piper <andy@xemacs.org>
+
+ * gutter.c (redraw_exposed_gutters): must be "in display" when we
+ do this.
+
+2000-03-24 Andy Piper <andy@xemacs.org>
+
+ * redisplay-output.c (compare_runes): use image_instance_changed
+ to detect changes. Do not depend on glyphs_changed, only depend on
+ dirtiness.
+ (redisplay_output_layout): add debug messages.
+ (compare_runes): ditto.
+
+ * glyphs.h: declare new functions.
+ (struct Lisp_Image_Instance): remove percent and associated
+ accessors.
+
+ * gui.h: declare new copying functions.
+
+ * gui.c (copy_gui_item_tree): new function.
+ (copy_gui_item): new function.
+ (gui_item_id_hash): revert to standard hash.
+ (gui_item_hash): ditto.
+ (gui_item_hash_internal): deleted.
+ (mark_gui_item): mark value.
+ (gui_item_add_keyval_pair): add value.
+ (gui_item_init): ditto.
+ (gui_add_item_keywords_to_plist): ditto.
+ (gui_item_equal): ditto.
+ (syms_of_gui): add Q_value.
+
+ * glyphs-x.c (x_progress_gauge_update): use pending items and
+ value for setting the state.
+ (x_update_widget): don't set items from pending here.
+
+ * glyphs-widget.c (update_widget): update items here.
+ (progress_gauge_set_property): use items for storing value. Put
+ new value in pending items.
+
+ * glyphs-msw.c (mswindows_progress_gauge_update): use pending
+ items for new value. Convert percent -> value.
+ (mswindows_tab_control_update): don't update items here.
+
+ * glyphs.c (Fupdate_widget_instances): use image_instance_changed.
+ (update_subwindow): ditto.
+ (image_instance_changed): new function. Compare hash values and
+ past and present widget items.
+ (image_instantiate): We more careful about where we instantiate
+ things.
+ (image_instantiate): add error checking.
+
+ * gutter.c (syms_of_gutter): use -hook.
+
+2000-03-20 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * console-tty.c (Fset_console_tty_input_coding_system): Use
+ Qkeyboard.
+ (Fset_console_tty_output_coding_system): Use Qterminal.
+ (tty_init_console): Use Qkeyboard and Qterminal.
+
+2000-03-21 Ben Wing <ben@xemacs.org>
+
+ * ntproc.c (create_child): remove bogus HAVE_NTGUI's.
+ From Mike Alexander <mta@arbortext.com>.
+
+2000-03-21 Ben Wing <ben@xemacs.org>
+
+ * event-msw.c (mswindows_need_event): Horrible kludge to fix
+ process brokenness. Proper implementation to come.
+ * callproc.c:
+ Rename call-process-internal to old-call-process-internal.
+ New impl. in process.el.
+
+2000-03-21 Martin Buchholz <martin@xemacs.org>
+
+ * Makefile.in.in: Coalesce HAVE_NATIVE_SOUND code fragments.
+
+2000-03-20 Andy Piper <andy@xemacs.org>
+
+ * glyphs.c (full_list_hash): make hashes of the same elements in
+ different orders return different values.
+
+2000-03-20 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.32 is released.
+
+2000-03-20 Martin Buchholz <martin@xemacs.org>
+
+ * buffer.h (DFC_ALLOCA_USE_CONVERTED_DATA):
+ (DFC_MALLOC_USE_CONVERTED_DATA):
+ Add aliasing-safe casts to allow use with char* or unsigned char*
+ lvalues.
+
+ * eldap.c (Fldap_open):
+ (Fldap_search_basic):
+ (Fldap_add):
+ (Fldap_modify):
+ Make C++-compilable.
+ Make sure GCPRO'ed variables are initialized.
+ Use temp variables to avoid repeated calls to Flength.
+
+2000-03-16 Martin Buchholz <martin@xemacs.org>
+
+ * sysfile.h:
+ Make sure PATH_MAX is always defined.
+ Include limits.h for PATH_MAX.
+ Deprecate use of MAXPATHLEN.
+
+2000-03-10 Martin Buchholz <martin@xemacs.org>
+
+ * emacs.c: Add reinit_vars_of_fileio.
+ * symsinit.h: Add reinit_vars_of_fileio.
+ * fileio.c (reinit_vars_of_fileio): New.
+ * fileio.c (Fmake_temp_name):
+ Initialize temp_name random number from microseconds to make
+ collisions even less likely. Initialize always at process startup
+ time. (make-temp-name) used to return the same file name twice in
+ a row when PDUMP.
+ Random stylistic fiddling.
+ Comment fixes.
+
+2000-03-20 Andy Piper <andy@xemacs.org>
+
+ * glyphs.c (image_instantiate): allow text glyphs to be
+ instantiated in the minibuffer window.
+
+2000-03-19 Andy Piper <andy@xemacs.org>
+
+ * glyphs.c (image_instance_hash): be careful about which items we
+ hash on.
+
+ * glyphs-widget.c (tab_control_set_property): record into pending
+ items rather than the actual items.
+
+ * glyphs-x.c (x_update_widget): use pending items to update with.
+
+ * glyphs-msw.c (mswindows_tab_control_update): use pending items
+ to update with.
+
+ * glyphs.c (mark_image_instance): mark pending items.
+
+ * window.c (Fset_window_configuration): record the buffer.
+ (Fselect_window): totally revert previous change which breaks many
+ things.
+
+2000-03-18 Andy Piper <andy@xemacs.org>
+
+ * glyphs-msw.c (mswindows_tab_control_update): force selected
+ item.
+
+ * glyphs.c (image_instantiate): don't allow the minibuffer as a
+ window domain cache, otherwise we get inconsistencies at
+ startup. There is something fishy at startup which can lead to the
+ minibuffer being the selected window when the gutter content is
+ instantiated.
+
+ * gui.c (parse_gui_item_tree_list): add probably unneccessary
+ gcpros.
+ (parse_gui_item_tree_children): ditto.
+ (parse_gui_item_tree_item): ditto.
+
+ * glyphs.c (Fupdate_widget_instances): return something.
+
+2000-03-18 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * window.c (Fselect_window): Undo 2000-03-17 change.
+
+2000-03-17 SL Baur <steve@musashimaru.m17n.org>
+
+ * postgresql.c (Fpq_setenv): Remove this turkey when linking
+ against v7.0 libraries. Insta-coredump city until the postgres
+ folks fix it.
+
+2000-03-17 Andy Piper <andy@xemacs.org>
+
+ * faces.c (complex_vars_of_faces): don't give the widget face an
+ inherited background pixmap.
+
+ * glyphs-msw.c (mswindows_tab_control_instantiate): select the
+ selected item.
+
+ * event-stream.c (Fdispatch_non_command_events): return something.
+
+ * gutter.c (output_gutter): use widget face.
+ (clear_gutter): ditto.
+
+ * NEWS: adjust again.
+
+ * window.c (Fselect_window): make sure this runs to completion to
+ avoid oddities with Fset_window_configuration.
+ (Fcurrent_window_configuration): in general do not save the
+ minibuffer as the selected window.
+
+ * glyphs.h (IMAGE_INSTANCE_HASH_DEPTH): increase.
+
+2000-03-16 Olivier Galibert <galibert@pobox.com>
+
+ * emacs.c (Frunning_temacs_p): Revert previous patch.
+ (main_1): Reinitialize running_temacs_argc if pdump_load succeeds.
+
+2000-03-16 Andy Piper <andy@xemacs.org>
+
+ * glyphs-x.c (x_tab_control_update): if no widget values then
+ return.
+
+ * NEWS: update for new features.
+
+ * event-Xt.c (emacs_Xt_force_event_pending): new function. Post a
+ synthetic event to the native system.
+ (reinit_vars_of_event_Xt): set force_event_pending to
+ emacs_Xt_force_event_pending.
+
+ * events.h (struct event_stream): add force_event_pending.
+
+ * specifier.c (recompute_one_cached_specifier_in_window): add
+ comment.
+
+ * redisplay.c (redisplay_frame): don't call
+ update_frame_subwindows. Reset subwindow cachels when
+ subwindows_changed, removing this was an optimization too far.
+
+ * redisplay-output.c (compare_runes): reorganize so that we catch
+ glyph changes when we want them. Set optimize_output when this
+ would help layouts.
+ (redisplay_output_layout): remove frame_really_changed, use
+ optimize_output instead.
+
+ * redisplay-msw.c (mswindows_output_display_block): reset
+ optimize_output after outputting a glyph.
+ * redisplay-x.c (x_output_display_block): ditto.
+ * redisplay-tty.c (tty_output_display_block): ditto.
+
+ * gutter.c: (specifier_vars_of_gutter): use new spec changed
+ functions.
+ (gutter_specs_changed): do specific gutter positions.
+ (top_gutter_specs_changed): new function. Only update the
+ specified gutter specs.
+ (bottom_gutter_specs_changed): ditto.
+ (left_gutter_specs_changed): ditto.
+ (right_gutter_specs_changed): ditto.
+
+ * gui.c (gui_item_hash_internal): new function, does a real hash.
+ (gui_item_id_hash): use it.
+ (gui_item_hash): hash the eval'ed gui_item.
+
+ * gui-x.c (popup_selection_callback): send an eval event to call
+ Fupdate_widget_instances.
+
+ * gui-msw.c (mswindows_handle_gui_wm_command): send an eval event
+ to call Fupdate_widget_instances.
+
+ * glyphs.h (struct Lisp_Image_Instance): add optimize_output flag.
+ (IMAGE_INSTANCE_OPTIMIZE_OUTPUT): access it.
+
+ * glyphs.c: (update_frame_subwindows): deleted.
+ (Fupdate_widget_instances): new function for updating the dirty
+ state of widgets that might have changed.
+ (syms_of_glyphs): add Qupdate_widget_instances.
+ (full_list_hash): hash a list completely.
+ (image_instance_hash): use it for items and properties.
+
+ * frame-msw.c (mswindows_size_frame_internal): remove unused
+ variable.
+
+ * faces.h (struct face_cachel): fix comment.
+
+ * event-stream.c (Fdispatch_non_command_events): new
+ function. Process non-command events, forcing an event cycle
+ beforehand.
+ (syms_of_event_stream): declare.
+ (event_stream_force_event_pending): new function. Force an event
+ on the native event queue so that an event cycle will occur next
+ time we check.
+
+ * event-msw.c:
+ (struct ntpipe_shove_stream):
+ (mswindows_enqueue_dispatch_event):
+ (mswindows_dequeue_dispatch_event):
+ (mswindows_cancel_dispatch_event):
+ (mswindows_pump_outstanding_events):
+ (mswindows_drain_windows_queue):
+ (mswindows_handle_paint):
+ (mswindows_wnd_proc):
+ (mswindows_key_to_emacs_keysym):
+ (get_process_input_waitable):
+ (emacs_mswindows_delete_stream_pair): re-indent file.
+ (mswindows_need_event): do not process further fds if the windows
+ fd is set, otherwise you get endless XM_BUMPQUEUE cycles. This
+ fixes the 100% cpu problem.
+ (reinit_vars_of_event_mswindows): set force_event_pending to 0.
+
+2000-03-15 Olivier Galibert <galibert@pobox.com>
+
+ * alloc.h: New.
+ * dumper.h: New.
+ * dumper.c: New.
+
+ * emacs.c: Moved dump file searching to dumper.c.
+ (Frunning_temacs_p): Fixed.
+
+ * alloc.c: Moved everything pdump-related to dumper.c. Removed
+ last_lrecord_type_index_assigned.
+
+2000-02-20 Olivier Galibert <galibert@pobox.com>
+
+ * symsinit.h: Added reinit parameter to init_console_stream
+ declaration.
+
+ * lisp.h: Added file parameter to pdump_load declaration.
+
+ * emacs.c (main_1): Added -nd/--nodump-file and -sd/--show-dump-id
+ support. Added dump file searching.
+
+ * config.h.in: Added EMACS_PROGNAME.
+
+ * console-stream.c (init_console_stream): Fix reinitialisation
+ when running from temacs.
+
+ * alloc.c (pdump): Add id support.
+ (pdump_load): Add file parameter and signature/id support.
+
+ * Makefile.in.in: Add full pdump support.
+
+2000-03-15 SL Baur <steve@musashimaru.m17n.org>
+
+ * postgresql.c: Update documentation to reflect latest code
+ status.
+ (print_result): Show tuple counts in printed representation when
+ appropriate.
+ (Fpq_put_nbytes): MULE-ize.
+ (Fpq_get_line_async): Ditto.
+
+2000-03-14 SL Baur <steve@musashimaru.m17n.org>
+
+ * postgresql.c (Fpq_lo_import): Fix return value.
+ Suggested by: Kenji Itoh <keit@tpj.co.jp>.
+
+2000-03-13 Ben Wing <ben@xemacs.org>
+
+ * alloc.c (pdump_load):
+ Fix compile warning under mswin.
+
+2000-03-14 SL Baur <steve@musashimaru.m17n.org>
+
+ * postgresql.c: Mule-ization, bug fixes.
+ Use PG_CODING to encapsulate coding system name changes.
+ Backport a version of TO_EXTERNAL format for 21.1/InfoDock.
+ (pg-coding-system): Create.
+
+ (Fpq_conn_defaults): Mule-ize.
+ (Fpq_connectdb): Mule-ize & bug fix.
+ (Fpq_connect_start): Mule-ize.
+ (Fpq_set_client_encoding): Mule-ize.
+ (Fpq_finish): Document `DEAD' connection status.
+ (Fpq_clear): Ditto.
+ (Fpq_pgconn): Mule-ize.
+ (Fpq_exec): Mule-ize & bug fix.
+ (Fpq_send_query): Ditto.
+ (Fpq_get_result): Ditto.
+ (Fpq_res_status): Mule-ize.
+ (Fpq_result_error_message): Mule-ize.
+ (Fpq_ntuples): fix comments.
+ (Fpq_fname): Mule-ize.
+ (Fpq_fnumber): Mule-ize.
+ (Fpq_ftype): fix comments.
+ (Fpq_get_value): Mule-ize.
+ (Fpq_cmd_status): Ditto.
+ (Fpq_cmd_tuples): Ditto.
+ (Fpq_oid_value): Ditto.
+ (Fpq_notifies): Ditto.
+ (Fpq_lo_import): Ditto.
+ (Fpq_lo_export): Ditto.
+ (Fpq_get_line): Ditto.
+ (Fpq_put_line): Mule-ize and bug fix.
+ (syms_of_postgresql): Fix ifdef'ing, add pg-coding-system.
+
+2000-03-10 SL Baur <steve@musashimaru.m17n.org>
+
+ * postgresql.c (vars_of_postgresql): Mule-ize.
+ (Fpq_conn_defaults): Ditto.
+
+2000-03-12 Ben Wing <ben@xemacs.org>
+
+ * alloc.c (Fmake_byte_code):
+ * alloc.c (debug_string_purity_print):
+ * alloc.c (pdump_backtrace):
+ * alloc.c (pdump_get_indirect_count):
+ * alloc.c (pdump_register_sub):
+ * alloc.c (pdump_register_object):
+ * alloc.c (pdump_register_struct):
+ * alloc.c (pdump_dump_data):
+ * alloc.c (pdump_reloc_one):
+ Minor cleanups.
+
+ * console-msw.c:
+ * console-msw.c (GetConsoleHwnd):
+ * console-msw.c (msw_hide_console):
+ * console-msw.c (msw_show_console):
+ * console-msw.c (msw_ensure_console_buffered):
+ * console-msw.c (msw_output_console_string):
+ * console-msw.c (console_type_create_mswindows):
+
+ a) Added functions to manipulate the console window for use with
+ shell support.
+
+ b) Added support for writing text to the console, which is now
+ used under Windows when xemacs is not being run non-interactively,
+ to write text that would otherwise be destined for stdout because
+ under these circumstances, text written to stdout tends to
+ disappear and not be seen.
+
+ * console-msw.h:
+ * event-Xt.c:
+ * event-Xt.c (x_event_to_emacs_event):
+ * event-Xt.c (describe_event_window):
+ * events-mod.h (XEMACS_MOD_CONTROL):
+ * events.c:
+ * events.c (Fmake_event):
+ * events.c (character_to_event):
+ * events.c (event_to_character):
+ * events.c (format_event_object):
+ * events.c (Fevent_modifiers):
+ * events.h:
+ * events.h (struct key_data):
+ * events.h (struct button_data):
+ * events.h (struct misc_user_data):
+ * frame-x.c (Fcde_start_drag_internal):
+ * frame-x.c (Foffix_start_drag_internal):
+ * gpmevent.c (Freceive_gpm_event):
+ * keymap.c:
+ * keymap.c (bucky_sym_to_bucky_bit):
+ * keymap.c (control_meta_superify):
+ * keymap.c (make_key_description):
+ * keymap.c (keymap_lookup_directly):
+ * keymap.c (create_bucky_submap):
+ * keymap.c (keymap_store):
+ * keymap.c (define_key_check_and_coerce_keysym):
+ * keymap.c (define_key_parser):
+ * keymap.c (define_key_alternate_name):
+ * keymap.c (Fdefine_key):
+ * keymap.c (raw_lookup_key_mapper):
+ * keymap.c (struct map_keymap_unsorted_closure):
+ * keymap.c (map_keymap_unsorted_mapper):
+ * keymap.c (map_keymap_sort_predicate):
+ * keymap.c (map_keymap_sorted):
+ * keymap.c (accessible_keymaps_mapper_1):
+ * keymap.c (where_is_recursive_mapper):
+ * keymap.c (describe_map_mapper):
+ * keymap.c (describe_map_sort_predicate):
+ * keymap.c (describe_map):
+ * keymap.c (complex_vars_of_keymap):
+ And a number of other files, the key modifier preprocessor
+ constants that xemacs uses have names that conflict with constants
+ defined under MS Windows for other purposes, so they were renamed
+ to begin with the prefix XEMACS_. The variables that hold such
+ modifiers were changed to consistently be of type int to fix
+ various compile warnings.
+
+ * console.c (complex_vars_of_console):
+ * device.c:
+ * device-msw.c:
+ * device-msw.c (mswindows_finish_init_device):
+ * device-msw.c (msw_get_workspace_coords):
+ * device-msw.c (mswindows_device_system_metrics):
+ and various other files, added support for a new
+ device property called offset-workspace which returns the position
+ of the upper left corner of the workspace area and goes along with
+ the existing size-workspace property.
+
+ * dialog-msw.c:
+ * dialog-msw.c (push_bufbyte_string_as_unicode):
+ * dialog-msw.c (mswindows_popup_dialog_box):
+ Added support for XEmacs-style accelerator specifications in
+ button text. Note: I didn't add support for this under X Windows,
+ and somebody needs to do this.
+
+ * dialog.c:
+ * dialog.c (Fpopup_dialog_box):
+ Documented the support for accelerators that was just mentioned.
+
+ editfns.c (get_home_directory): Changed behavior under Windows
+ when HOME not defined; former behavior was irretrievably broken.
+
+ * emacs.c:
+ * emacs.c (main_1):
+ * emacs.c (main):
+ * minibuf.c (clear_echo_area_internal):
+ * minibuf.c (echo_area_append):
+ * print.c:
+ * print.c (std_handle_out_external):
+ * print.c (std_handle_out_va):
+ * print.c (fatal):
+ * print.c (write_string_to_stdio_stream):
+ * print.c (output_string):
+ * print.c (debug_print):
+ * print.c (debug_backtrace):
+ * print.c (debug_short_backtrace):
+ Cleaned up the code that prints text to stdout so that this can be
+ changed to output into a console window instead under MS Windows,
+ as described above.
+
+ * eval.c:
+ * eval.c (DEFEND_AGAINST_THROW_RECURSION):
+ * eval.c (internal_catch):
+ * eval.c (unwind_to_catch):
+ * eval.c (throw_or_bomb_out):
+ * eval.c (condition_case_1):
+ * eval.c (signal_1):
+ * eval.c (check_error_state_sanity):
+ * eval.c (call_with_suspended_errors_1):
+ * eval.c (call_with_suspended_errors):
+ * eval.c (reinit_vars_of_eval):
+ Added code to catch throw loops and check for a pesky bug that may
+ be gone now.
+
+ * event-msw.c:
+ * event-msw.c (key_needs_default_processing_p):
+ * event-msw.c (mswindows_wnd_proc):
+ * event-msw.c (mswindows_modifier_state):
+ * event-msw.c (emacs_mswindows_quit_p):
+ * event-msw.c (vars_of_event_mswindows):
+ a) Added support for using the alt key to select menu items as is
+ standard under MS Windows. This is controlled using the variable
+ menu-accelerator-enabled, just like under X Windows. There is an
+ option on the options menu to turn this support on. I really
+ think that it should be on by default under Windows, but I'm not
+ going to make this change yet.
+
+ b) Added support for dynamic display size changes under Windows.
+
+ * event-stream.c:
+ * event-stream.c (maybe_echo_keys):
+ * event-stream.c (Fnext_event):
+ * event-stream.c (command_builder_find_leaf):
+ * event-stream.c (lookup_command_event):
+ * event-stream.c (execute_command_event):
+ * event-stream.c (pre_command_hook):
+ * event-stream.c (post_command_hook):
+ * event-stream.c (syms_of_event_stream):
+ * event-stream.c (vars_of_event_stream):
+ * event-stream.c (complex_vars_of_event_stream):
+ * events.h (struct command_builder):
+
+ a) Tried to clean up a little bit the horribly written x-specific
+ accelerator code that crept into this file. I moved this code
+ into menubar-x.c where it belongs. I also needed to move the
+ command builder structure into the file events.h because it is
+ accessed directly by this accelerator code. What I didn't do, but
+ which should be done at some point, is to properly abstract this
+ code using device methods instead of the kludgy way that it
+ currently hooks into the event code.
+
+ b) Added the lisp variables this-command-properties and
+ last-command- properties, which should be used to synchronize two
+ adjacent commands in preference to playing games with the variable
+ this-command, which is typically what happens.
+
+ c) Added some slightly nasty code to hook into the lisp support
+ for shifted- motion-key selection. This is actually necessary for
+ somewhat complicated reasons, which are described in
+ simple.el. (NB: I think the proper thing would be to have the code
+ that calls the pre and post command hooks also call out to generic
+ lisp functions in simple.el, where all built-in stuff could be
+ added. I will think about this more.)
+
+ * event-unixoid.c (poll_fds_for_input):
+ * lread.c (readchar):
+ * redisplay-tty.c (tty_clear_frame):
+ * redisplay-x.c (x_get_gc):
+ * signal.c (interrupt_signal):
+ And a whole bunch of other files: fixed up places that printed
+ directly to stderr to instead call the function stderr_out so that
+ the changes I made under Windows work correctly.
+
+ * filemode.c (mode_string):
+ Warning fixes.
+
+ * frame-msw.c:
+ * frame-msw.c (mswindows_size_frame_internal):
+ Fixed the computation of frame size and position to keep the frame
+ within the workspace area, rather than within the physical
+ dimensions of the screen, so that the frame doesn't overlap window
+ manager decorations, such as the start menu and toolbar, typically
+ at the bottom of the screen.
+
+ * frame.c (vars_of_frame):
+ Changed the default frame title format under MS Windows to consist
+ of buffername-XEmacs, which is standard under MS Windows. I think
+ it might be a good idea to change this everywhere because I think
+ it is superior to the current frame title format, but this is the
+ kind of change that is likely to cause some people to get annoyed,
+ so I'm not making it.
+
+ * glyphs-eimage.c (png_instantiate): Fixed some compile warnings.
+
+ * gui-msw.c (mswindows_handle_gui_wm_command):
+ Fixed compile warnings.
+
+ * gui-x.c:
+ * gui-x.c (strdup_and_add_accel):
+ * gui-x.c (button_item_to_widget_value):
+ * gui-x.h:
+ Added code to automatically put an accelerator onto the beginning
+ of menu items that don't have one as is now the standard, and is
+ described more later. Also fixed things so that the menu item
+ name can be an evaluated expression, again a new standard.
+
+ * gui.c:
+ * gui.c (gui_item_add_keyval_pair):
+ * gui.c (make_gui_item_from_keywords_internal):
+ * gui.c (gui_add_item_keywords_to_plist):
+ * gui.c (gui_item_accelerator):
+ * gui.c (gui_name_accelerator):
+ * gui.c (gui_item_included_p):
+ * gui.c (gui_item_display_flush_left):
+ * gui.c (gui_item_display_flush_right):
+ * gui.c (parse_gui_item_tree_item):
+ * gui.c (parse_gui_item_tree_children):
+ * gui.c (parse_gui_item_tree_list):
+ Mule-ized. Cleanup. GCPRO addition.
+
+ * line-number.c (buffer_line_number):
+ * lisp.h:
+ * lisp.h (EMACS_INT_MAX):
+ Added the manifest constant EMACS_INT_MIN corresponding to the
+ existing constant EMACS_INT_MAX. This is partially to fix compile
+ warnings under Windows, and partly for cleanliness.
+
+ * menubar-msw.c:
+ * menubar-msw.c (REPLACE_ME_WITH_GLOBAL_VARIABLE_WHICH_CONTROLS_RIGHT_FLUSH):
+ * menubar-msw.c (msw_translate_menu_or_dialog_item):
+ * menubar-msw.c (displayable_menu_item):
+ * menubar-msw.c (populate_menu_add_item):
+ * menubar-msw.c (populate_or_checksum_helper):
+ * menubar-msw.c (populate_menu):
+ * menubar-msw.c (update_frame_menubar_maybe):
+ * menubar-msw.c (prune_menubar):
+ * menubar-msw.c (msw_char_is_accelerator):
+ * menubar-msw.c (unsafe_handle_wm_initmenu_1):
+ * menubar-msw.c (mswindows_handle_wm_command):
+ * menubar-msw.c (mswindows_handle_wm_initmenupopup):
+ * menubar-msw.c (mswindows_handle_wm_initmenu):
+ * menubar-msw.c (mswindows_update_frame_menubars):
+ * menubar-msw.c (mswindows_free_frame_menubars):
+ * menubar-msw.c (mswindows_popup_menu):
+ Fixed a bug in handling accelerators where an extra character
+ would be displayed in the menu item. Also generalized the
+ function displayable_menu_item because it is now used by the
+ dialog box code as well. And finally, added code in the functions
+ that create the menubar to extract a list of accelerators for the
+ top level menubar, which is used in the event code to determine
+ whether a particular alt-key combination should be used to invoke
+ a menu item, or should be passed through to access the standard
+ XEmacs keymap binding for this key combination.
+
+ Much needed GCPROing.
+
+ * menubar-x.c:
+ * menubar-x.c (menu_item_descriptor_to_widget_value_1):
+ * menubar-x.c (menu_item_descriptor_to_widget_value):
+ * menubar-x.c (restore_in_menu_callback):
+ * menubar-x.c (x_popup_menu):
+ * menubar-x.c (menu_move_up):
+ * menubar-x.c (menu_move_down):
+ * menubar-x.c (menu_move_left):
+ * menubar-x.c (menu_move_right):
+ * menubar-x.c (menu_select_item):
+ * menubar-x.c (command_builder_operate_menu_accelerator):
+ * menubar-x.c (menu_accelerator_junk_on_error):
+ * menubar-x.c (command_builder_find_menu_accelerator):
+ * menubar-x.c (Faccelerate_menu):
+ * menubar.h:
+ Moved a whole bunch of code here that was previously in
+ event-stream.c as described above. There is also code connected
+ to the new standard of adding an accelerator to the beginning of
+ menu items that don't have one as described above and below.
+
+ * menubar.c:
+ * menubar.c (menu_parse_submenu_keywords):
+ * menubar.c (Fmenu_find_real_submenu):
+ * menubar.c (Fnormalize_menu_item_name):
+ * menubar.c (syms_of_menubar):
+ * menubar.c (vars_of_menubar):
+ * menubar.c (complex_vars_of_menubar):
+
+ a) Cleaned up a bunch of documentation and improved it.
+
+ b) XEmacs now automatically adds an accelerator onto the beginning
+ of any menu items that don't have one. I did this because there
+ will inevitably be some menu items on the main menubar that don't
+ have accelerators on them because the package that adds that
+ particular menu item hasn't yet been fixed up to have accelerators
+ in them and it looked rather strange to have some items with and
+ some items without accelerators, especially since even in items
+ without accelerators, you can, at least under windows, still
+ access the item through an accelerator corresponding to the first
+ character in the item's name. If people don't like this behavior,
+ I can add a variable to turn it off optionally, but I'm not sure
+ this is a good idea because we really do need to have accelerators
+ on all of the menu items, and if a package doesn't like the
+ accelerators being put on the first character, then it should put
+ the accelerators where they belong.
+
+ c) I made a behavior change, which is that the descriptor that
+ specifies the text of the menu item, which formerly was just a
+ string, can now also be an evaluated expression. This makes this
+ descriptor parallel with all of the others, which could also be
+ evaluated expressions. This also obviates the need for the
+ keyword :label, which was previously listed in the documentation
+ as unimplemented, and which was for the same purpose.
+
+ d) GCPROing.
+
+ * ntproc.c:
+ * ntproc.c (new_child):
+ * ntproc.c (sys_spawnve):
+ * ntproc.c (find_child_console):
+ * ntproc.c (sys_kill):
+ Fixed compile warnings. By the way, this file should really go
+ away entirely, and this will happen as soon as Kirill makes his
+ final round of process cleanups, which affect the function
+ call-process.
+
+ * process-nt.c:
+ * process-nt.c (struct nt_process_data):
+ * process-nt.c (find_process_from_pid):
+ * process-nt.c (send_signal_the_nt_way):
+ * process-nt.c (enable_child_signals):
+ * process-nt.c (find_child_console):
+ * process-nt.c (send_signal_the_95_way):
+ * process-nt.c (nt_finalize_process_data):
+ * process-nt.c (ensure_console_window_exists):
+ * process-nt.c (nt_create_process):
+ * process-nt.c (nt_kill_child_process):
+ * process-nt.c (nt_kill_process_by_pid):
+ * process-nt.c (nt_open_network_stream):
+ * process-nt.c (vars_of_process_nt):
+ Copied over code from Emacs 20.5 to correctly send signals to sub-
+ processes under Windows 95. Also added code to automatically
+ create and hide console window when a sub-process is created under
+ Windows 95, which obviates the need for the separate runemacs.exe
+ executable, and finally implemented some variables that were
+ implemented in Emacs 20.5, but previously not in XEmacs. These
+ include mswindows- start-process-share-console and
+ mswindows-start-process-inherit-error-mode. (Both of these only
+ apply to Windows 95.)
+
+ * regex.c (regex_compile): Fixed a compile warning.
+
+ * select-msw.c:
+ * select-msw.c (mswindows_own_selection):
+ * select-msw.c (mswindows_get_foreign_selection):
+ * select-msw.c (mswindows_disown_selection):
+ * select-msw.c (console_type_create_select_mswindows):
+ * select-msw.c (syms_of_select_mswindows):
+ Cleaned up the file and implemented the device method
+ selection_exists_p, which had accidentally been left out. Also
+ removed four lisp functions that were remnants from before the
+ time when the selection code was properly device abstracted.
+ These functions are no longer needed because there are generic
+ equivalents, and because they were added recently and don't exist
+ in FSF Emacs, I don't think there's any problem with just deleting
+ them.
+
+ * sysdep.c:
+ * sysdep.c (sys_subshell):
+ Fixed a compile warning, although in this case there's probably
+ something wrong with this code, and it ought to be looked into
+ more thoroughly by somebody who understands it.
+
+ * window.c:
+ * window.c (Fwindow_text_area_height):
+ * window.c (Fwindow_width):
+ * window.c (Fwindow_full_width):
+ * window.c (Fwindow_pixel_width):
+ * window.c (debug_print_window):
+ * window.c (syms_of_window):
+ Added functions window-text-area-height and window-full-width,
+ which are functions for returning various width and height
+ characteristics of a window. (One of these functions is necessary
+ for making the file dialog box work correctly, and the other one
+ was added for completeness.) Also added a table to the
+ documentation for window-height which describes the entire scheme
+ for accessing width and height characteristics of a window.
+
+2000-03-12 Kirill 'Big K' Katsnelson <kkm@dtmx.com>
+
+ * nt.c (fstat): Added a comment for another problem with
+ non-encapsulated [f]stat(), reported by Adrian Aichner
+ <aichner@ecf.teradyne.com>.
+
+2000-03-11 Andy Piper <andy@xemacs.org>
+
+ * window.c (make_dummy_parent): initialize subwindow instance
+ cache.
+ (Fset_window_configuration): zero extent_modiff.
+
+2000-03-10 Andy Piper <andy@xemacs.org>
+
+ * redisplay.c (Fredraw_frame): reset the changed_set flags so that
+ more changes can be triggered.
+ (Fredisplay_frame): ditto.
+ (Fredraw_device): ditto.
+ (Fredisplay_device): ditto.
+ (redisplay_frame): make non-static.
+ (redisplay_frame): call update_frame_gutter_geometry outside of
+ display proper.
+
+ * gutter.h: declare update_frame_gutter_geometry.
+
+ * redisplay.h: declare redisplay_frame.
+
+ * gutter.c (update_frame_gutter_geometry): move geometry changes
+ in update_frame_gutters here. Geometry changes can only occur
+ outside of redisplay.
+ (update_frame_gutters): remove geometry change code.
+ (Fredisplay_gutter_area): make sure that we are in display when we
+ update and that we have flushed any size changes.
+
+2000-03-11 Andy Piper <andy@xemacs.org>
+
+ * alloc.c (pdump_dump_data): remove i & count shadows.
+
+2000-02-27 Mike Alexander <mta@arbortext.com>
+
+ * sysdep.h: Declare pdump_read_file
+
+ * sysdep.c (pdump_read_file): New function
+
+ * alloc.c (pdump_load): Call pdump_read_file to get the portable
+ dump data
+
+2000-03-10 SL Baur <steve@musashimaru.m17n.org>
+
+ * lrecord.h: add `lrecord_type_pgsetenv'.
+
+2000-03-08 SL Baur <steve@musashimaru.m17n.org>
+
+ * symsinit.h: declare (vars|syms)_of* functions.
+ * lrecord.h: add `lrecord_type_pgconn' and 'lrecord_type_pgresult'.
+
+2000-03-06 SL Baur <steve@musashimaru.m17n.org>
+
+ * config.h.in: Add symbols HAVE_POSTGRESQL and HAVE_POSTGRESQLV7
+
+ * inline.c: Include postgresql.h lrecord stuffs to placate buggy
+ GCCs.
+
+ * emacs.c (main_1): Call postgres initialization code.
+
+ * postgresql.h: New file. PostgreSQL RDBMS support.
+ * postgresql.c: New file.
+
+2000-03-08 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * redisplay-output.c (redisplay_output_display_block): Disable
+ redundant code.
+
+2000-03-09 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * mule-canna.c (Fcanna_henkan_region): Translate doc-string.
+ (Fcanna_henkan_next): Ditto.
+ (Fcanna_bunsetu_henkou): Ditto.
+ (Fcanna_henkan_kakutei): Ditto.
+ (Fcanna_henkan_end): Ditto.
+ (Fcanna_henkan_quit): Ditto.
+ (Fcanna_henkan_next): Set retun value correctly.
+ (c2mu): Use unsigned char instead of signed char.
+
+2000-03-09 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * emacs.c (main_1): Always call syms_of_gui.
+ * inline.c: include gui.h
+
+2000-03-09 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * redisplay.c (Vvisible_bell): Renamed from visible_bell and
+ converted to Lisp_Object.
+ (Qtop_bottom): New variable.
+ (syms_of_redisplay): Initialize it.
+ * redisplay.h (Vvisible_bell): Ditto.
+ * sound.c (ding): Ditto and check if Vvisible_bell is nil.
+ * redisplay-x.c (x_flash): When Vvisible_bell is top-bottom,
+ only flash top and bottom.
+
+2000-03-08 Andy Piper <andy@xemacs.org>
+
+ * buffer.c (Frename_buffer): record new buffer name the right way.
+
+2000-03-08 Andy Piper <andy@xemacs.org>
+
+ * glyphs.c (update_subwindow): increase hash depth so that widget
+ items get picked up properly.
+
+ * redisplay-output.c (compare_runes): increase hash depth so that
+ widget items get picked up properly.
+
+2000-03-08 Andy Piper <andy@xemacs.org>
+
+ * gutter.c (output_gutter): add some debug.
+
+ * glyphs.h (struct Lisp_Image_Instance): add display_hash.
+ (IMAGE_INSTANCE_DISPLAY_HASH): new macro.
+ (XIMAGE_INSTANCE_DISPLAY_HASH): ditto.
+
+ * redisplay-output.c (compare_runes): use display_hash to
+ determine if glyphs really are not the same.
+
+ * glyphs.c (update_subwindow): check display_hash to see if
+ anything really needs to be updated. If not then do
+ nothing. Record the display_hash after updating.
+ (image_instance_equal): compare the image_instance face also.
+
+2000-03-07 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * redisplay.h: Fix comment style.
+
+2000-03-08 Jonathan Harris <jhar@tardis.ed.ac.uk>
+
+ * consle-msw.h (struct mswindows_frame):
+ Added new member paint_pending to indicate whether a WM_PAINT
+ magic event has been queued for this frame.
+
+ * event-msw.c (mswindows_drain_windows_queue):
+ Don't queue a WM_PAINT magic event if one is already queued.
+ (emacs_mswindows_handle_magic_event): clear paint_pending flag.
+
+ * frame-msw.c (mswindows_init_frame_1): initialise paint_pending flag.
+
+2000-03-07 Didier Verna <didier@xemacs.org>
+
+ * dired.c: #include `regex.h' after `sysfile.h'.
+
+2000-03-06 Martin Buchholz <martin@xemacs.org>
+
+ * sound.c (init_nas_sound): Fix compiler warning.
+
+ * alloc.c (ALIASING_VOIDPP_DEREFERENCE): New.
+ (FREE_STRUCT_P):
+ (MARK_STRUCT_AS_FREE):
+ (MARK_STRUCT_AS_NOT_FREE):
+ Make `gcc -fstrict-aliasing' work properly.
+
+2000-03-07 Jonathan Harris <jhar@tardis.ed.ac.uk>
+
+ * device-msw.c (mswindows_finish_init_device): Call CoInitialize().
+ (mswindows_delete_device): Call CoUnnitialize().
+
+ * event-msw.c (mswindows_wnd_proc): WM_DROPFILES: Decode Shortcuts.
+
+2000-02-25 <CraigL@DyCon.com>
+
+ * process-nt.c: MinGW now has <shellapi.h>, but still needs
+ <errno.h>.
+
+ * sysdep.c: This extern declaration for environ prevents MinGW
+ from finding the variable in CRTDLL.DLL.
+
+ * s\mingw32.h (PBS_SMOOTH): Removed, now defined in cygwin's
+ windows headers.
+ (SHGFI_EXETYPE): ..
+ (WM_MOUSEWHEEL): ..
+ (_WIN32_IE): Added, needed to get the TCS_BOTTOM and TCS_VERTICAL
+ definitions.
+ (MMRESULT): Removed, now defined in cygwin's windows headers.
+ (TIMECAPS): ..
+ (uid_t,gid_t,pid_t,ssize_t): ..
+ (_timeb): Removed, MinGW defines both _timeb and timeb.
+ (HAVE_H_ERRNO): Added.
+ (HAVE_TZNAME): Added, configure is not detecting this.
+
+2000-02-03 IKEYAMA Tomonori <tomonori@suiyokai.org>
+
+ * chartab.h (XCHAR_TABLE_VALUE_UNSAFE): New macro.
+ * syntax.c (syntax_match): Use it.
+
+ * cmds.c: Import auto-fill-chars from FSF Emacs.
+ (Vauto_fill_chars): New variables.
+ (internal_self_insert): Check Vauto_fill_chars.
+ (vars_of_cmds):
+ Declare auto-fill-chars as a Lisp variable and initialize it.
+
+2000-03-05 Jonathan Harris <jhar@tardis.ed.ac.uk>
+
+ * fileio.c (Fmake_symbolic_link):
+ (Ffile_symlink_p):
+ Run handlers even if local machine doesn't have symlinks.
+
+2000-03-05 Jonathan Harris <jhar@tardis.ed.ac.uk>
+
+ * event-msw.c (mswindows_drain_windows_queue):
+ Don't generate paint magic events for non-XEmacs frames.
+
+2000-03-05 Andy Piper <andy@xemacs.org>
+
+ * redisplay.c (redisplay_frame): generate_displayable_area and
+ friends assumes that we are not in GC, we therefore have to make
+ sure that this doesn't happen.
+
+ * gutter.c (calculate_gutter_size): generate_displayable_area
+ assumes that we are not in GC, we therefore have to make sure that
+ this doesn't happen.
+
+2000-03-05 Martin Buchholz <martin@xemacs.org>
+
+ * opaque.c (DEFINE_LRECORD_IMPLEMENTATION): opaque_ptr ==> opaque-ptr
+
+2000-03-03 Jan Vroonhof <vroonhof@math.ethz.ch>
+
+ * redisplay.c (regenerate_window): Make sure we set a sane value
+ for end_pos even if we jump out of the loop.
+ (regenerate_window): Answer Ben's question :-).
+ (start_end_of_last_line): Add may_error argument.
+ (start_of_last_line):
+ (end_of_last_line): Pass may_error = 0.
+ (end_of_last_line_may_error): New function.
+ (pixel_to_glyph_translation): Use it, so we don't crash in
+ event_to_glyph.
+
+2000-03-04 Andy Piper <andy@xemacs.org>
+
+ * window.h (struct window): add gutter_extent_modiff.
+
+ * window.c (allocate_window): zero out gutter_extent_modiff.
+
+ * redisplay.h: declare sync_display_line_structs.
+
+ * redisplay.c (add_glyph_rune): add a better comment.
+
+ * redisplay-output.c (sync_display_line_structs): made non-static.
+ (compare_runes): remove unneccesary glyph cachel access.
+
+ * gutter.h: declare gutter_extent_signal_changed_region_maybe.
+
+ * gutter.c (output_gutter): don't output the gutter if extent
+ changes only involve extents in buffers. use 4 sets of display
+ lines.
+ (gutter_extent_signal_changed_region_maybe): new function. Mark
+ extents in gutters as changed.
+ (update_frame_gutters): use 4 sets of display lines.
+ (reset_gutter_display_lines): ditto.
+ (free_frame_gutters): ditto.
+ (redraw_exposed_gutter): force output of gutters.
+
+ * frame.h (struct frame): add 4 sets of gutter display lines.
+
+ * extents.c: (extent_changed_for_redisplay): signal changes to
+ extents in strings in the gutter as well as extents in buffers.
+
+2000-03-02 Andy Piper <andy@xemacs.org>
+
+ * gutter.c (specifier_vars_of_gutter): cosmetic changes.
+
+ * frame.c (Fmake_frame): make sure the gutters get initialized
+ after the frame is visible.
+ (set_frame_selected_window): re-arrange compilation macros a
+ little.
+ (change_frame_size_1): mark gutters changed.
+
+ * device.c (Fset_device_class): mark gutters changed.
+
+2000-03-01 Andy Piper <andy@xemacs.org>
+
+ * window.c (window_top_frame_gutter_height): deleted.
+ (window_bottom_frame_gutter_height): ditto.
+ (window_left_frame_gutter_height): ditto.
+ (window_right_frame_gutter_height): ditto.
+ (window_top_gutter_height): don't use them.
+ (window_bottom_gutter_height): ditto.
+ (window_left_gutter_width): ditto.
+ (window_right_gutter_width): ditto.
+ (Fsplit_window): ditto.
+ (Fwindow_pixel_edges): don't use border dimensions here.
+
+ * scrollbar.c (update_scrollbar_instance): don't take gutters into account.
+ (update_scrollbar_instance): ditto.
+
+ * redisplay.c (generate_modeline): don't take gutters into account.
+ (generate_modeline): ditto.
+ (redisplay_frame): small gutter display optimisation.
+
+ * redisplay-x.c (x_output_vertical_divider): don't take gutters into account.
+
+ * redisplay-msw.c (mswindows_output_vertical_divider): don't take
+ gutters into account.
+
+ * gutter.h (WINDOW_REAL_*_GUTTER_BOUNDS): remove bogus checks
+ for window position and type.
+
+ * gutter.c (get_gutter_coords): fix for frame gutters.
+ (update_frame_gutters): update frame geometry if the gutters have
+ changed.
+ (init_frame_gutters): record current gutter geometries.
+
+ * glyphs-msw.c (mswindows_subwindow_instantiate): remove unused
+ var.
+ (mswindows_widget_instantiate): ditto.
+
+ * frame.h (struct frame): add current_gutter_bounds.
+
+ * frame.c (change_frame_size_1): position window and minibuffer
+ appropriately taking into account the frame gutters.
+
+ * frame-x.c: (x_initialize_frame_size): take into account the
+ frame gutters.
+
+2000-02-29 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * emacs.c (data-directory): Xref `locate-data-file' in docstring.
+
+2000-02-29 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * alloc.c (dumpopaquevec): Increase dimension for --with-canna.
+
+1999-12-30 Yoshiki Hayashi <t90553@mail.ecc.u-tokyo.ac.jp>
+
+ * file-coding.c (reset_decoding_stream): Clear previous
+ detection state when autodetect.
+
+2000-02-29 Didier Verna <didier@xemacs.org>
+
+ * extents.c (set_extent_glyph_1): don't require extents to be
+ attached.
+
+2000-02-27 Andy Piper <andy@xemacs.org>
+
+ * gutter.c (Fset_default_gutter_position): don't default left and
+ right gutter visibility to t.
+ (Fset_default_gutter_position): run
+ default-gutter-position-changed-hook.
+ (syms_of_gutter): add default-gutter-position-changed-hook.
+
+2000-02-26 Andy Piper <andy@xemacs.org>
+
+ * specifier.c (Fmake_specifier): add gutter references.
+
+ * gutter.h (RAW_WINDOW_GUTTER): new macro.
+
+ * lisp.h: declare Fvalid_plist_p.
+
+ * gutter.c (gutter_geometry_changed_in_window): mark the modeline
+ as changed.
+ (default_gutter_visible_p_changed_in_window): invalidate gutter as
+ well as its visibility so that it gets reconstructed.
+ (construct_window_gutter_spec): new function. Construct a string
+ to be displayed in the gutter from a plist of strings. Take care
+ to only use elements that are declared as visible.
+ (calculate_gutter_size): use RAW_WINDOW_GUTTER instead of
+ WINDOW_GUTTER.
+ (gutter_validate): allow plists of strings in the specifier.
+ (gutter_specs_changed): construct the real_gutter from the gutter
+ specs using construct_window_gutter_spec.
+ (gutter_visible_validate): gutter-visible is a new specifier type.
+ (Fgutter_visible_specifier_p): new function for the new specifier.
+ (syms_of_gutter): declare gutter-visible and
+ Fgutter_visible_specifier_p.
+ (specifier_type_create_gutter): intitalize new gutter-visible
+ specifier.
+ (reinit_specifier_type_create_gutter): ditto.
+ (specifier_vars_of_gutter): use new specifier type for gutter
+ visibility.
+ (init_frame_gutters): construct real_gutter correctly.
+ (Fgutter_specifier_p): beef up documentation.
+ (Fgutter_size_specifier_p): ditto.
+
+ * winslots.h: add real_gutter slots.
+
+2000-02-25 Andy Piper <andy@xemacs.org>
+
+ * device-msw.c: Be kind to older cygwin versions. From Raymond
+ Toy <toy@rtp.ericsson.se>.
+
+ * gui-msw.c (Fmswindows_shell_execute): Remove things unknown to
+ earlier cygwins. From Raymond Toy <toy@rtp.ericsson.se>.
+
+2000-02-25 Martin Buchholz <martin@xemacs.org>
+
+ * elhash.c (MARK_OBJ): Practice macro hygiene.
+
+2000-02-24 Martin Buchholz <martin@xemacs.org>
+
+ * miscplay.c: s/__inline__/inline/g;
+ * glyphs-msw.c (set_mono_pixel): INLINE ==> static inline
+ (get_device_compdc): INLINE ==> static inline
+ * *.[ch]: Change INLINE to INLINE_HEADER globally.
+ find -name '*.h' | \
+ xargs global-replace \
+ 's/(^|(?<=[^A-Za-z0-9_]))INLINE((?=[^A-Za-z0-9_])|$)/INLINE_HEADER/g'
+
+2000-02-25 Andy Piper <andy@xemacs.org>
+
+ * window.c (window_top_frame_gutter_height): new function.
+ (window_top_window_gutter_height): ditto.
+ (window_top_gutter_height): use them.
+ (window_bottom_frame_gutter_height): new function.
+ (window_bottom_window_gutter_height): ditto.
+ (window_bottom_gutter_height): use them.
+ (window_left_window_gutter_width): new function.
+ (window_left_frame_gutter_width): ditto.
+ (window_left_gutter_width): use them.
+ (window_right_window_gutter_width): new function.
+ (window_right_frame_gutter_width): ditto.
+ (window_right_gutter_width): use them.
+ (window_pixel_height): new function. calulate window pixel height
+ with frame gutter involvement.
+ (Fsplit_window): calculate new sizes taking frame gutters into
+ account.
+ (window_char_height_to_pixel_height): don't include frame gutters.
+ (window_char_height): use window_pixel_height.
+ (window_pixheight): rename from window_pixel_height.
+ (change_window_height): use it.
+ (window_pixel_height_to_char_height): don't include frame gutters.
+ (window_char_width_to_pixel_width): ditto.
+
+2000-02-25 Andy Piper <andy@xemacs.org>
+
+ * glyphs.h (IMAGE_INSTANCE_FACE): glyph might be nil, don't crash
+ if it is.
+
+2000-02-24 Martin Buchholz <martin@xemacs.org>
+
+ * alloc.c (staticpro):
+ (staticpro_nodump):
+ (dumpstruct):
+ (dumpopaque):
+ (pdump_wire):
+ (pdump_wire_list):
+ (compact_string_chars):
+ (pdump_dump_wired):
+ Convert: if (foo) abort(); ==> assert (! foo);
+
+ * eldap.c (Fldap_search_basic):
+ (Fldap_add):
+ (Fldap_modify):
+ (Fldap_delete):
+ Fix compiler warnings, and possible crashes if (random) return
+ value were to be used.
+
+2000-02-21 Kirill 'Big K' Katsnelson <kkm@dtmx.com>
+
+ * device-msw.c: Workaround ResetDC failure.
+
+ * frame-msw.c (msprinter_init_frame_3): Added an assertion before
+ applying a devmode.
+
+ * redisplay-msw.c (get_frame_dc): Added start_page_p.
+ (mswindows_text_width): Do not start printer page.
+
+ * console-msw.h (CHECK_MSGDI_DEVICE): Added this and friends.
+
+ * glyphs-msw.c: Added image methods to msprinter console and
+ msprinter-specific image instantiation.
+
+2000-02-20 Mike Alexander <mta@arbortext.com>
+
+ * select-msw.c (Fmswindows_set_clipboard): GC protect more things
+ to avoid crashes when selection-sets-clipboard is on
+ (mswindows_own_selection): ditto
+
+2000-02-19 Kirill 'Big K' Katsnelson <kkm@dtmx.com>
+
+ * glyphs-msw.c:
+ * redisplay-msw.c (get_frame_dc):
+ (get_frame_compdc):
+ * console-msw.h:
+ * device-msw.c (mswindows_init_device):
+ (mswindows_delete_device):
+ (msprinter_init_device):
+ (msprinter_delete_device):
+ * frame-msw.c (mswindows_init_frame_1):
+ (mswindows_delete_frame):
+ (msprinter_init_frame_3):
+ (msprinter_delete_frame): Move compatible DC to device object from
+ frame object, for both mswindows and msprinter. Only one at a time
+ is needed, it is a real waste to have one per frame!
+
+2000-02-23 Andy Piper <andy@xemacs.org>
+
+ * glyphs.c: add dynamic width and height elements.
+ (image_instance_equal): ditto.
+
+ * glyphs-widget.c (widget_query_geometry): calculate width and
+ height dynamically if required.
+ (initialize_widget_image_instance): initialize dynamic dimensions.
+ (widget_instantiate): pick-up dynamic dimensions.
+
+ * glyphs.h (struct Lisp_Image_Instance): add width and height for
+ dynamic determination. Add appropriate macros.
+
+ * gutter.h (WINDOW_GUTTER_BORDER_WIDTH): make non-integer
+ dimensions safe.
+ (WINDOW_GUTTER_SIZE): ditto.
+ (WINDOW_GUTTER_SIZE_INTERNAL): ditto.
+
+ * redisplay-msw.c (get_frame_compdc): gcc can't cope with this
+ inline.
+ (get_frame_dc): ditto.
+
+ * redisplay.h (GLOBAL_RESET_CHANGED_FLAGS): don't reset faces
+ here.
+
+2000-02-23 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.31 is released.
+
+2000-02-22 Ben Wing <ben@xemacs.org>
+
+ * ntheap.c (allocate_heap): Make sure `ptr' is initialized.
+
+2000-02-22 Andy Piper <andy@xemacs.org>
+
+ * glyphs-x.c (x_widget_instantiate): don't explicitly resize here.
+
+2000-02-21 Mike Sperber <mike@xemacs.org>
+
+ * .dbxrc:
+ * .gdbinit:
+ * Makefile.in.in: Remove obsolete EMACSBOOTSTRAP... environment
+ variables.
+
+2000-02-21 Mike Sperber <mike@xemacs.org>
+
+ * s/aix4.h: Declare getaddrinfo broken for AIX 4, which it is.
+
+2000-02-21 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.30 is released.
+
+2000-02-20 Martin Buchholz <martin@xemacs.org>
+
+ Performance hacking.
+ * *.c (syms_of_*):
+ Add INIT_LRECORD_IMPLEMENTATION macros, paired with
+ DEFINE_LRECORD_IMPLEMENTATION macros in the same file.
+ * emacs.c (main_1):
+ * lisp.h (DEFUN):
+ * console.c (DEFVAR_CONSOLE_LOCAL_1):
+ * buffer.c (DEFVAR_BUFFER_LOCAL_1):
+ * symeval.h (DEFVAR_SYMVAL_FWD):
+ * symbols.c (guts_of_unbound_marker):
+ Make all c_readonly objects also lisp_readonly and marked for life.
+ * lrecord.h (struct lrecord_implementation):
+ Document flags better.
+ * lrecord.h (DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION_WITH_PROPS):
+ * lrecord.h (DECLARE_LRECORD):
+ * lrecord.h (XSETRECORD):
+ * lrecord.h (RECORDP):
+ * lrecord.h (RECORD_TYPEP):
+ * lrecord.h (RECORD_MARKER): New.
+ * lrecord.h (error_check_*):
+ * lrecord.h (CONCHECK_NONRECORD):
+ * lrecord.h (MAKE_LRECORD_IMPLEMENTATION):
+ * lrecord.h (INIT_LRECORD_IMPLEMENTATION): New.
+ * lrecord.h (set_lheader_implementation):
+ * lrecord.h (enum lrecord_type): New.
+ * symeval.h (SYMBOL_VALUE_MAGIC_P):
+ * alloc.c (disksave_object_finalization_1):
+ * alloc.c (mark_object):
+ * alloc.c (lrecord_type_index):
+ * alloc.c (tick_lcrecord_stats):
+ * alloc.c (Fgarbage_collect):
+ * alloc.c (init_alloc_once_early):
+ * alloc.c (pdump_load):
+ * alloc.c (GC_CHECK_LHEADER_INVARIANTS): New.
+ * alloc.c (lrecord_type_index): Delete.
+ Make lisp object type indexes be constant.
+ Makes (byte-compile) 5% faster.
+ Put all marker functions into their own array.
+ Makes (garbage-collect) 5% faster.
+ Optimize SYMBOL_VALUE_MAGIC_P.
+ Makes (byte-compile) 2-3% faster.
+ * config.h.in (gc_checking_assert): New.
+ * alloc.c: Use gc_checking_assert().
+ * .dbxrc: Make compatible with new object type implementation.
+ * .gdbinit: Make compatible with new object type implementation.
+ * alloc.c: Delete all symbols defined only for debugging, such as
+ Lisp_Type_Vector and lrecord_charset.
+
+2000-02-21 Andy Piper <andy@xemacs.org>
+
+ * gui-msw.c (Fmswindows_shell_execute): fix file location
+ problems.
+
+ * buffer.c (Fkill_buffer): remove buffer from alist buffer
+ unshowing so that set_window_buffer doesn't undo
+ kill_buffer_hook's hard work.
+
+ * glyphs-widget.c (tab_control_query_geometry): don't count the
+ first item when calculating geometry.
+
+ * glyphs.c (map_subwindow): remove redundant code.
+ (update_frame_subwindows): be more circumspect about when to
+ update subwindows.
+
+ * glyphs-x.c (x_update_widget): Properly fix sizing bug. Fix bug
+ when items haven't changed. Update faces if faces have changed as
+ well as just the widget face.
+ (x_tab_control_update): Update faces if faces have changed as well
+ as just the widget face.
+
+2000-02-21 Jonathan Harris <jhar@tardis.ed.ac.uk>
+
+ * device-msw.c: (mswindows_delete_device): Remove redundant DDE
+ registration.
+ (build_syscolor_string): Use mswindows_color_to_string to try to
+ get a named color.
+ (mswindows_device_system_metrics): Reverse the foreground and
+ background colors so that they match the documentation.
+
+ * objects-msw.c: (mswindows_X_color_map): tweak some values so
+ they match the default Windows palette.
+ (mswindows_color_to_string): New function.
+
+2000-02-21 Jonathan Harris <jhar@tardis.ed.ac.uk>
+
+ * s/windowsnt.h: Only use __declspec(noreturn) with MSVC>=6.
+
+2000-02-18 Olivier Galibert <galibert@pobox.com>
+
+ * m/*, s/*: Removed obsolete DATA_SEG_BITS, PURE_SEG_BITS,
+ WORD_MACHINE, SIGN_EXTEND_CHAR and EXPLICIT_SIGN_EXTEND.
+
+ * symbols.c (init_symbols_once_early): Removed obsolete
+ DATA_SEG_BITS related kludge.
+ (defvar_magic): Ditto.
+
+ * malloc.c: Removed obsolete DATA_SEG_BITS
+ * ralloc.c: Ditto.
+ * mem-limits.h: Ditto.
+
+ * Makefile.in.in: Removed obsolete HAVE_SHM
+ * emacs.c: Ditto.
+
+2000-02-13 Jonathan Harris <jhar@tardis.ed.ac.uk>
+
+ * device-msw.c (mswindows_delete_device): Free DDE string
+ handles.
+
+2000-02-16 Kirill 'Big K' Katsnelson <kkm@dtmx.com>
+
+ * keymap.c (get_keyelt):
+ * unexnt.c (unexec):
+ * vm-limit.c (memory_warnings):
+ * ntheap.c (recreate_heap):
+ * ntheap.h (UNINIT_PTR):
+ * select-msw.c (Fmswindows_get_clipboard):
+ (Fmswindows_set_clipboard):
+ * objects-msw.h (MSWINDOWS_BAD_HFONT):
+ * objects-msw.c:
+ * menubar-msw.c (displayable_menu_item):
+ * glyphs-msw.c:
+ * glyphs-msw.h (IMAGE_INSTANCE_MSWINDOWS_MASK):
+ * sysdep.c (sys_subshell):
+ * process-nt.c (nt_create_process):
+ * nt.c (normalize_filename):
+ (dostounix_filename):
+ (unixtodos_filename):
+ * ntproc.c (win32_executable_type):
+ * ntplay.c (play_sound_data_1):
+ (play_sound_file):
+ * editfns.c (get_home_directory):
+ * event-msw.c (struct winsock_stream):
+ (mswindows_dde_callback):
+ * device-msw.c (msprinter_init_device):
+ (msprinter_get_devmode_copy): Frobbed syntax frivolities.
+
+ * toolbar-msw.c (mswindows_free_frame_toolbars): Paramters to
+ mswindows_clear_toolbar were swapped!
+
+ * objects-msw.c:(colormap_t):
+ (fontmap_t):
+ * emacs.c (struct standard_args): Fixed const jumble.
+
+ * glyphs-widget.c (update_widget): Fixed comparison notation.
+
+ * event-msw.c (mswindows_dde_callback): Removed extraneous ';'.
+
+ * s\windowsnt.h (DOESNT_RETURN): Defined to support the MSVC
+ __declspec(noreturn) syntax.
+
+2000-02-19 Martin Buchholz <martin@xemacs.org>
+
+ * eldap.c (Fldap_open):
+ (Fldap_search_basic):
+ (Fldap_add):
+ (Fldap_modify):
+ Use new coding system conversion macros.
+
+2000-01-06 Yoshiki Hayashi <t90553@mail.ecc.u-tokyo.ac.jp>
+
+ * console-tty.c (tty_init_console): Change MULE to FILE_CODING.
+
+1999-11-27 Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch>
+
+ * eldap.h (Fldap_search) Renamed from Fldap_search_internal:
+ (Fldap_add, Fldap_modify, Fldap_delete): New functions
+
+ * eldap.c (Qadd, Qreplace): New constant symbols
+ (Fldap_open): Use the LDAP_OPT_RESTART option to avoid
+ interruptions by XEmacs signals
+ Remove unnecessary calls to slow_down_interrupts and
+ speed_up_interrupts
+ (Fldap_search_basic): Renamed from Fldap_search_internal
+ Added new optional parameter VERBOSE that triggers the
+ display of progress messages
+ Remove unnecessary calls to slow_down_interrupts and
+ speed_up_interrupts
+ LDAP result code analysis rewritten
+ (Fldap_add, Fldap_modify, Fldap_delete): New functions
+ (syms_of_eldap): Define the new symbols and functions
+
+
+2000-02-17 Martin Buchholz <martin@xemacs.org>
+
+ * realpath.c: Determine PATH_MAX maximally portably.
+
+ * insdel.c (bytecount_to_charcount): Optimize.
+ The function used to be optimized for entirely ASCII sequences.
+ Now it is optimized for successive characters from the same
+ charset. This also wins big for _mostly_ ASCII sequences.
+
+ * fileio.c (Ffile_truename): convert return from realpath() using
+ Qfile_name, not Qbinary. Fixes obvious bug with non-ASCII symlinks.
+ - Rewrite GCPROing slightly.
+
+ * sysdep.c (sys_open): Do filename conversion, like all other
+ sys_* functions. Fixes bug:
+ (let ((file-name-coding-system 'iso-8859-2))
+ (write-region x y latin2-name))
+ ==> writes filename using internal encoding.
+
+2000-02-18 Martin Buchholz <martin@xemacs.org>
+
+ * buffer.c (DEFVAR_BUFFER_LOCAL_1): Turn on c_readonly. Always const.
+ * console.c (DEFVAR_CONSOLE_LOCAL_1): Turn on c_readonly. Always const.
+ * symeval.h (DEFVAR_SYMVAL_FWD): Turn on c_readonly. Always const.
+ * eval.c (lrecord_subr): Remove this_one_is_unmarkable.
+ * symbols.c (lrecord_symbol_value_forward): Remove this_one_is_unmarkable.
+ * symbols.c (guts_of_unbound_marker): Turn on c_readonly.
+ * lrecord.h (UNMARKABLE_LRECORD_HEADER_P): Delete.
+ (CONST_IF_NOT_DEBUG): Delete.
+ * alloc.c (this_one_is_unmarkable): Delete.
+ (mark_object): Don't check for this_one_is_unmarkable. Use the
+ c_readonly flag instead.
+ * lisp.h (DEFUN): Define a Lisp_Subr as c_readonly.
+
+2000-02-18 Jonathan Harris <jhar@tardis.ed.ac.uk>
+
+ * event-msw.c (mswindows_drain_windows_queue):
+ (emacs_mswindows_handle_magic_event): Remove attempt to optimise
+ away redundant repaint events.
+
+2000-02-17 Andy Piper <andy@xemacs.org>
+
+ * redisplay.h: declare mark_redisplay_structs.
+
+ * redisplay.c (redisplay_window):
+ (redisplay_frame): don't check subwindows_state_changed.
+ (mark_redisplay): mark gutters here.
+
+ * glyphs.c: (instantiate_image_instantiator): always layout if we
+ haven't done so already.
+ (allocate_image_instance): don't mark as dirty.
+ (update_subwindow): bind inhibit_quit.
+
+ * gutter.c (mark_gutters): new function.
+
+ * glyphs-x.c (x_update_widget): Always resize to get round a
+ widget bug.
+
+ * glyphs-msw.c (mswindows_tab_control_update): remove `;' that was
+ breaking absolutely everything.
+
+ * gutter.h: declare mark_gutters.
+
+2000-02-16 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.29 is released.
+
+2000-02-15 Olivier Galibert <galibert@pobox.com>
+
+ * fns.c (size_bit_vector): Fix computation of the size.
+
+2000-02-15 Martin Buchholz <martin@xemacs.org>
+
+ * *.[ch]: Change CONST to const globally.
+ find -name '*.[ch]' | \
+ xargs global-replace \
+ 's/(^|(?<=[^A-Za-z0-9_]))CONST((?=[^A-Za-z0-9_])|$)/const/g'
+ - Remove vestigial references to CONST_IS_LOSING
+
+2000-02-13 Jonathan Harris <jhar@tardis.ed.ac.uk>
+
+ * event-msw.c (mswindows_drain_windows_queue): Remove hack to
+ bailout early on quit. Enqueue WM_PAINT events as XEmacs magic
+ events instead of dispatching them directly.
+ (mswindows_handle_paint): New function to do repainting.
+ (mswindows_wnd_proc):
+ (emacs_mswindows_handle_magic_event): Call above function.
+
+2000-02-13 Jonathan Harris <jhar@tardis.ed.ac.uk>
+
+ * objects-msw.c (mswindows_create_font_variant): Return the new
+ font handle.
+ (initialize_font_instance): Get font metrics from the underlined
+ variant of the font to cope with the case where the underlined
+ font has a bigger descent.
+
+2000-02-08 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * gui.c (gui_item_accelerator): Return the first underlined
+ character in item name.
+
+2000-02-11 Kirill 'Big K' Katsnelson <kkm@dtmx.com>
+
+ * lisp.h: Added Qprinter.
+
+ * general.c (syms_of_general): Initialized it.
+
+ * redisplay-msw.c (get_frame_dc): Conditionally start a new page.
+ (get_frame_dc):
+ (get_frame_compdc): Made inline.
+
+ * console.h (struct console_methods): Added eject_page method.
+
+ * frame.h: Added FRAME_DISPLAY_P and friends.
+ Aligned backslahes in many macros in more readable fashion.
+ Added page_number to struct frame, and an accessor macro
+ for it.
+
+ * defice.h: Added DEVICE_DISPLAY_P and friends.
+
+ * device.c (Fdevice_printer_p): Used these.
+
+ * frame.c (allocate_frame_core): Initialize page number.
+ (Fprint_job_page_number):
+ (Fprint_job_eject_page): Implemented.
+
+ * frame-msw.c (msprinter_eject_page): Added method.
+ (msprinter_start_page): Added.
+
+ * window.c (Fwindow_truncated_p): Fixed docstring.
+ (Fwindow_last_line_visible_height): Implemented.
+
+2000-02-09 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * frame.c (change_frame_size_1): Undo 2000-02-03 change.
+
+1999-12-20 Yoshiki Hayashi <t90553@mail.ecc.u-tokyo.ac.jp>
+
+ * syntax.c (scan_words): Always advance at least one character.
+
+2000-02-13 Andy Piper <andy@xemacs.org>
+
+ * redisplay.c (add_glyph_rune): call get_glyph_cachel_index here
+ to make sure the glyph is in the cachels.
+
+ * glyphs.h (struct Lisp_Image_Instance): make layout_changed a
+ global image instance flag.
+ (IMAGE_INSTANCE_NEEDS_LAYOUT): new macro.
+ (XIMAGE_INSTANCE_NEEDS_LAYOUT): ditto.
+
+ * glyphs.c (allocate_image_instance): set dirty bits correctly.
+ (Fset_image_instance_property): mark layout as changed.
+ (invalidate_glyph_geometry_maybe): mark layout as changed.
+ (glyph_width): use new NEEDS_LAYOUT macro.
+ (glyph_ascent): ditto.
+ (glyph_descent): ditto.
+ (glyph_height): ditto.
+ (image_instance_layout): mark layout as clean after laying out.
+ (update_subwindow): don't mark layout as clean here.
+
+ * glyphs-x.h (IMAGE_INSTANCE_X_WIDGET_ID): undo C++ changes, they
+ should no longer be needed.
+
+ * glyphs-x.c (x_update_widget): sanitize asserts.
+ (x_finalize_image_instance): sanitize assignment to widgets.
+
+ * glyphs-widget.c (widget_instantiate): don't need to clear the
+ layout flag here.
+
+2000-02-13 Martin Buchholz <martin@xemacs.org>
+
+ * sysdep.c (getcwd): Use standard prototype.
+ * sysdep.h (getcwd): Use standard prototype.
+
+ * fns.c (Fsubseq): Change parameters to more natural ANSI Lisp
+ (sequence, start, end).
+ Remove redundant type checking.
+ (Fmapconcat): Remove useless GCPRO, a wrong-headed attempt (in
+ view of `caller-protects') to avoid a crash where the real fix was
+ found elsewhere.
+
+2000-02-12 Martin Buchholz <martin@xemacs.org>
+
+ * glyphs-x.c (x_finalize_image_instance): Compile error fixes.
+
+ * s/sol2.h: Remove feature macro initialization.
+
+ * alloc.c (alloc_lcrecord): Add more type checking assertions.
+ (vector_hash): New. Code from internal_hash.
+ * lrecord.h:
+ Fix up allocation subsystem comments.
+
+ * config.h.in: Add __EXTENSIONS__ for Solaris.
+
+ * systime.h (EMACS_GETTIMEOFDAY): New.
+ (EMACS_GET_TIME): Use EMACS_GETTIMEOFDAY.
+ Remove Solaris-specific code.
+ Use void* for the (ignored) second arg for gettimeofday().
+
+ * elhash.c (hash_table_hash): Implement it, finally.
+ * elhash.c: Use hashcode_t.
+
+ * linuxplay.c (sighandler): Fix prototypes to use SIGTYPE.
+ * sunplay.c (sighandler): Fix prototype to use SIGTYPE.
+
+ * lisp.h (STRETCHY_STRUCT_SIZEOF): Delete.
+ * fns.c (size_bit_vector):
+ * alloc.c (size_vector):
+ (make_vector_internal):
+ (make_bit_vector_internal):
+ (sweep_bit_vectors_1):
+ Replace calls to STRETCHY_STRUCT_SIZEOF with offsetof expression.
+
+2000-02-10 Martin Buchholz <martin@xemacs.org>
+
+ * s/aix4.h: #define MAP_FAILED if sys/mman.h didn't.
+ Include strings.h to avoid warnings for bzero and strcasecmp.
+
+2000-02-10 Olivier Galibert <galibert@pobox.com>
+
+ * alloc.c: Move STRETCHY_STRUCT_SIZEOF from here...
+ * lisp.h (STRETCHY_STRUCT_SIZEOF): ...to here
+
+ * fns.c (size_bit_vector): New. Declare bit vectors as a
+ sequence.
+
+2000-02-10 Olivier Galibert <galibert@pobox.com>
+
+ * symeval.h (struct symbol_value_magic): Remove "next" kludge and
+ use a value field instead.
+ (symbol_value_forward_forward): Use value field.
+ (DEFVAR_SYMVAL_FWD): Use value field.
+ (DEFVAR_SYMVAL_FWD_INT): Added. Dumps the int with dumpopaque.
+ (DEFVAR_INT): Use DEFVAR_SYMVAL_FWD_INT.
+ (DEFVAR_CONST_INT): Ditto.
+ (DEFVAR_BOOL): Ditto.
+ (DEFVAR_CONST_BOOL): Ditto.
+ (DEFVAR_INT_MAGIC): Ditto.
+ (DEFVAR_BOOL_MAGIC): Ditto.
+
+ * symbols.c (guts_of_unbound_marker): Use value field.
+ * console.c (DEFVAR_CONSOLE_LOCAL_1): Ditto.
+ * buffer.c (DEFVAR_BUFFER_LOCAL_1): Ditto.
+
+ * lisp.h: Declare dumpopaque and noninteractive1.
+
+ * alloc.c (dumpopaque): Added.
+ (pdump_dump_opaquevec): Added.
+ (pdump): Call pdump_dump_opaquevec to dump opaque data.
+ (pdump_load): Reload opaque data. Sync noninteractive1 with
+ noninteractive.
+
+2000-02-10 Andy Piper <andy@xemacs.org>
+
+ * glyphs.c (image_instance_layout): if the size changes, mark it
+ as such.
+
+ * redisplay-output.c (redisplay_output_layout): Update the
+ subwindow here.
+ (redisplay_output_subwindow): ditto.
+
+ * glyphs.c (update_subwindow): make sure we reset flags for
+ layouts as well as everything else.
+
+ * glyphs-widget.c (layout_layout): don't need to set the instances
+ dimensions here.
+
+2000-02-09 Martin Buchholz <martin@xemacs.org>
+
+ * device-x.c (x_init_device): Wrap calls to dll_* in HAVE_SHLIB,
+ not HAVE_DLOPEN, which is a lower-level thing.
+
+ * .cvsignore: Ignore gmon.out
+
+2000-02-09 Hamish Macdonald <hamishm@lucent.com>
+
+ * .cvsignore: Ignore portable dumper xemacs.dmp file
+
+2000-02-09 Andy Piper <andy@xemacs.org>
+
+ * redisplay-output.c (redisplay_output_layout): be more clever
+ about when we output based on the changed flags.
+
+ * glyphs.h (struct image_instantiator_methods): add update_method.
+ (struct Lisp_Image_Instance): add changed flags. Declare new
+ macros for manipulating them.
+
+ * glyphs.c (allocate_image_instance): renamed glyph -> parent.
+ (image_instance_parent_glyph): find an image_instance's parent
+ glyph or image_instance.
+ (image_instance_layout): mark the size as changed.
+ (set_image_instance_dirty_p): new function. mark an image
+ instance, plus all of its parents, as dirty.
+ (Fset_image_instance_property): use it.
+ (Fglyph_animated_timeout_handler): use it.
+ (update_subwindow): call update_widget and device methods for
+ update_subwindow. Mark all changed flags as clean.
+ (Fresize_subwindow): mark size as changed.
+
+ * glyphs-x.c (x_finalize_image_instance): try and detect gc
+ failures.
+ (x_update_subwindow): only resize subwindows here.
+ (x_update_widget): new function. Update all changed properties of
+ a widget.
+ (x_resize_subwindow): deleted.
+ (x_widget_set_property): deleted.
+ (x_progress_gauge_set_property): deleted.
+ (x_progress_gauge_update): new function. Implement recorded
+ changes.
+ (x_tab_control_update): ditto.
+ (x_tab_control_set_property): deleted.
+ (console_type_create_glyphs_x): declare new functions.
+ (image_instantiator_format_create_glyphs_x): ditto.
+
+ * glyphs-widget.c (widget_set_property): mark text changed.
+ (update_widget): new function. Update properties of a widget.
+ (widget_instantiate): for layouts make sure we set their
+ children's parent correctly.
+ (tab_control_set_property): new function. Record changes that will
+ take place under redisplay's control.
+ (progress_gauge_set_property): ditto.
+ (image_instantiator_progress_guage): declare new functions.
+ (image_instantiator_tab_control): ditto.
+
+ * glyphs-msw.c (mswindows_update_subwindow): just do resizing here
+ now.
+ (mswindows_update_widget): new function. Update all properties on
+ a widget that have changed.
+ (mswindows_button_update): new function. Update a button's set
+ state.
+ (mswindows_tab_control_update): new function. Update the items in
+ a tab.
+ (mswindows_tab_control_set_property): deleted.
+ (mswindows_progress_gauge_update): new function. Update the
+ progress gauge's progress.
+ (mswindows_widget_set_property): deleted. This is all done
+ asynchronously now.
+ (mswindows_progress_gauge_set_property): ditto.
+ (console_type_create_glyphs_mswindows): declare new methods.
+ (image_instantiator_format_create_glyphs_mswindows): ditto.
+
+ * frame-msw.c (msprinter_init_frame_1): Remove unused variables.
+ (msprinter_set_frame_properties): ditto.
+
+ * console.h (struct console_methods): Add update_widget_method.
+
+2000-02-09 Andy Piper <andy@xemacs.org>
+
+ * gui-msw.c (Fmswindows_shell_execute): Make
+ mswindows-shell-execute industrial strength.
+
+2000-02-08 Martin Buchholz <martin@xemacs.org>
+
+ * lrecord.h: Make macro argument `props' match member function `plist'.
+ * fns.c (Fget):
+ * fns.c (Fput):
+ * fns.c (Fremprop):
+ * fns.c (Fobject_plist):
+ * alloc.c:
+ * symbols.c:
+ Object property list frobbing cleanup.
+ - Allow any lisp object (compared with `eq'), not just symbols, as
+ keys in object plists.
+ - Move symbol plist frobbing into symbols.c, where it belongs.
+ - Move string plist frobbing into alloc.c, where it belongs.
+ - Everything's an lrecord now, so no need to test for symbolp, etc.
+ - Fix up doc strings to refer to PROPERTY, not PROPNAME.
+
+ * extents.c: Reorder code to remove declarations.
+
+ * frame.h (store_in_alist): Remove useless declaration.
+
+2000-02-07 Martin Buchholz <martin@xemacs.org>
+
+ * event-Xt.c (x_has_keysym): Use XConvertCase only if available.
+ * config.h.in: Add HAVE_XCONVERTCASE.
+
+2000-02-07 Andy Piper <andy@xemacs.org>
+
+ * glyphs.c (image_instance_layout): undo 2000-01-29 change since
+ it breaks many things.
+
+2000-02-07 Jan Vroonhof <vroonhof@math.ethz.ch>
+
+ * src/syntax.h (SYNTAX_START_P): Check whether the two chars
+ actually can start a common comment type.
+ * src/syntax.h (SYNTAX_END_P): ditto for end.
+
2000-02-07 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.28 is released.
* minibuf.c (echo_area_append): Workaround egcs-20000131 c++ compiler bug
- * ExternalShell.c:
- * ExternalClient.c:
- * EmacsShell-sub.c:
- * EmacsManager.c:
- * EmacsFrame.c:
+ * ExternalShell.c:
+ * ExternalClient.c:
+ * EmacsShell-sub.c:
+ * EmacsManager.c:
+ * EmacsFrame.c:
Use consistent style for specifying X resources.
* symbols.c (Fset): Further implement SYMVAL_LISP_MAGIC.
This makes (dontusethis-set-symbol-value-handler) actually usable.
* lrecord.h (lrecord_decription_type):
- * alloc.c (pdump_register_sub):
- (pdump_dump_data):
- (pdump_reloc_one):
+ * alloc.c (pdump_register_sub):
+ (pdump_dump_data):
+ (pdump_reloc_one):
Add XD_LISP_OBJECT_ARRAY to describe multiple Lisp_Objects.
Comply with XEmacs coding style.
All lrecord descriptions updated to use XD_LISP_OBJECT with 2
args, and XD_LISP_OBJECT_ARRAY with 3 args.
- * keymap.c (Faccessible_keymaps):
+ * keymap.c (Faccessible_keymaps):
Make (accessible-keymaps map "\C-h") do the Right Thing.
Make (accessible-keymaps map []) do the Right Thing.
Make (accessible-keymaps map "") do the Right Thing.
2000-01-30 Martin Buchholz <martin@xemacs.org>
* redisplay.c (init_redisplay): Fix small memory leak.
- * elhash.h:
- * elhash.c (pdump_reorganize_hash_table):
+ * elhash.h:
+ * elhash.c (pdump_reorganize_hash_table):
Rename from reorganize_hash_table. Change prototype.
Reuse the original memory for hentries. Save 100k.
* alloc.c (PDUMP_READ): new macro.
ifdefs in readable order.
(NEED_STARTS): Do not force NEED_STARTS when PDUMPing.
(start_of_text):
- (end_of_text):
+ (end_of_text):
(end_of_data): Do not compile in if using PDUMP.
* symsinit.h: Protptyped vars_of_nt().
(fstat, stat): Do not compile in if using MSVC 5.0 and above -
stat has been fixed in the C runtime.
(vars_of_nt): Added, defined the nt_fake_unix_uid variable there.
-
+
* file-coding.c (struct file_coding_dump): Do not define
ucs_to_mule_table in the struct if not MULE.
(struct struct lrecord_description fcd_description_1): Do not dump
* faces.c: Moved 'left-margin and 'right-margin defsymbols to
general.c.
- * console-msw.h: Added more msprinter device private slots.
+ * console-msw.h: Added more msprinter device private slots.
2000-02-01 Kirill 'Big K' Katsnelson <kkm@dtmx.com>
only.
* console-msw.h: Moved a few function prototypes here from
- event-msw.c.
+ event-msw.c.
* gui-msw.c (mswindows_handle_gui_wm_command): Changed the ID
parameter from unsigned short to unsigned long.
2000-01-27 URA Hiroshi <ura@hiru.aoba.yokohama.jp>
- * sysdep.c (init_system_name):
- process-unix.c (unix_canonicalized_host_name):
+ * sysdep.c (init_system_name):
+ process-unix.c (unix_canonicalized_host_name):
Don't call freeaddrinfo() if getaddrinfo() fails.
* process-unix.c (unix_open_unix_network_stream):
2000-01-27 Martin Buchholz <martin@xemacs.org>
- * buffer.c (reinit_vars_of_buffer):
+ * buffer.c (reinit_vars_of_buffer):
The right place to initialize conversion_in_dynarr and
conversion_out_dynarr.
file-name-coding-system, terminal-coding-system, and
keyboard-coding-system magical variables that are equivalent to
defining the corresponding coding system aliases.
-
+
* file-coding.c (Fcoding_system_canonical_name_p): New function.
* file-coding.c (Fcoding_system_alias_p): New function.
* file-coding.c (Fcoding_system_aliasee): New function.
2000-01-24 Martin Buchholz <martin@xemacs.org>
- * realpath.c (xrealpath):
+ * realpath.c (xrealpath):
Don't call getwd().
2000-01-25 Martin Buchholz <martin@xemacs.org>
2000-01-24 Martin Buchholz <martin@xemacs.org>
- * glyphs-widget.c (layout_query_geometry):
+ * glyphs-widget.c (layout_query_geometry):
(layout_layout): Use correct types for gheight, gwidth.
2000-01-24 Martin Buchholz <martin@xemacs.org>
2000-01-23 Kirill 'Big K' Katsnelson <kkm@dtmx.com>
- * callproc.c:
- * dired-msw.c:
- * fileio.c:
- * process-nt.c:
- * redisplay-msw.c:
+ * callproc.c:
+ * dired-msw.c:
+ * fileio.c:
+ * process-nt.c:
+ * redisplay-msw.c:
* sysdep.c: Removed redundant #include <windows.h>
2000-01-22 Kirill 'Big K' Katsnelson <kkm@dtmx.com>
* frame.c (delete_frame_internal): Do not delete device when its
implementation so declares.
(delete_frame_internal): Set device selected frame to nil when
- last frame goes away.
+ last frame goes away.
* device-msw.c (msprinter_device_system_metrics): Implemented.
(mswindows_device_system_metrics): Added 'device-dpi property.
2000-01-22 Martin Buchholz <martin@xemacs.org>
* process.c (Fset_process_coding_system):
- * device-x.c (Fx_keysym_hash_table):
+ * device-x.c (Fx_keysym_hash_table):
Docstring fixes.
* lstream.c (Lstream_write): Return documented value, not 0.
- * fileio.c (directory_file_name):
- (Fsubstitute_in_file_name):
- (Fsubstitute_insert_file_contents_internal):
+ * fileio.c (directory_file_name):
+ (Fsubstitute_in_file_name):
+ (Fsubstitute_insert_file_contents_internal):
(Fwrite_region_internal):
* emacs.c:
* sysdep.c:
- * getloadavg.c:
+ * getloadavg.c:
* systty.h:
Remove vestigial APOLLO-conditional code.
* miscplay.h: Add guard macros.
* *.h: Use consistent C-standards-approved guard macro names.
- * opaque.c (make_opaque): Switch parameter order.
+ * opaque.c (make_opaque): Switch parameter order.
* opaque.h (make_opaque): Switch parameter order.
Update all callers.
* buffer.h (MAKE_MIRROR_TRT_TABLE): Use symbolic constant OPAQUE_CLEAR.
* This change adds four scrollbar specifiers:
{horizontal,vertical}-scrollbar-visible-p and
scrollbar-on-{top,left}-p.
- Spare parts supplied by Didier Verna <verna@inf.enst.fr>
+ Spare parts supplied by Didier Verna <didier@xemacs.org>
* frameslots.h: Added slots for the four specifier caching.
(specifier_vars_of_scrollbar): Declared the four specifiers.
* window.h (struct window): Defined slots for caching the new
- specifiers.
+ specifiers.
* window.c (mark_window): Mark them.
(allocate_window): Initialize them.
1998-05-10 Kirill M. Katsnelson <kkm@kis.ru>
- * EmacsFrame.c (update_various_frame_slots): Do not store internal
+ * EmacsFrame.c (update_various_frame_slots): Do not store internal
border width there.
(EmacsFrameInitialize): Do it rather here.
(EmacsFrameSetValues): If EditRes has changed internal border
variables and access macros
Added size_slipped redisplay bit and mark/clear macros.
- * redisplay.c (redisplay_frame): Adjust frame size if size slipped
+ * redisplay.c (redisplay_frame): Adjust frame size if size slipped
bit is set.
(redisplay_device): Call redisplay_frame if size slipped bit is set.
-
- * frame.c (adjust_frame_size): Redisplay beats frame back in shape
+
+ * frame.c (adjust_frame_size): Redisplay beats frame back in shape
with this. Added.
(frame_size_slipped): Added.
(internal_set_frame_size): Clear size slipped bit.
(EmacsFrameSetValues): Simulate a call to resize callback when no
actual geometry change happened.
- * console.h (struct console_methods): Removed declarations for all
+ * console.h (struct console_methods): Removed declarations for all
<specifier>_changed_in_frame methods for toolbars and scrollbars.
Added frame_size_fixed_p method.
the system.
* ntproc.c: Removed select emulation crap and dynamic Windock
- loading.
+ loading.
* nt.c: Removed a lot of terrible wrappers for socket functions.
1998-05-04 Martin Buchholz <martin@xemacs.org>
- * rangetab.c:
+ * rangetab.c:
* rangetab.h: Move #include's from rangetab.h into rangetab.c for
- consistency.
+ consistency.
* inline.c: include rangetab.h to get GCC inlines
1998-05-03 SL Baur <steve@altair.xemacs.org>
* specifier.h: Corrected documentation on magic specifiers.
Documented DEPTH parameter to instantiate_method.
- Renamed reveal->unlock_ghost_specifiers_protected().
+ Renamed reveal->unlock_ghost_specifiers_protected().
* specifier.c: Removed the reveal mechanism and made ghost
specifiers read-only, so they are accessible as fallbacks of magic
specifier, but aren't modifiable unless C code enables so.
(specifier_equal): Compare specifier fallbacks as well.
- * scrollbar.c (init_frame_scrollbars):
- (init_device_scrollbars):
+ * scrollbar.c (init_frame_scrollbars):
+ (init_device_scrollbars):
(init_global_scrollbars): Renamed
- reveal->unlock_ghost_specifiers_protected().
+ reveal->unlock_ghost_specifiers_protected().
1998-05-01 Hrvoje Niksic <hniksic@srce.hr>
Compute new character sizes passed to change_frame_size, do not
use the old (pre-toolbar-change) ones.
(update_frame_toolbars): Honor frame_changed and clear frame bits.
- (recompute_overlaying_specifier): New helper function, called from
+ (recompute_overlaying_specifier): New helper function, called from
default toolbar specifier change handlers.
(default_toolbar_specs_changed): Use it.
(default_toolbar_size_changed_in_frame): Ditto.
(toolbar_geometry_changed_in_window): New handler. The old one,
some_windows_value_changed, did not do the trick.
(default_toolbar_size_changed_in_window): New handler for default
- toolbar.
+ toolbar.
(default_toolbar_border_width_changed_in_window): Ditto.
(default_toolbar_visible_p_changed_in_window): Ditto.
(specifier_vars_of_toolbar): Use one of the above four handlers
1998-04-24 Martin Buchholz <martin@xemacs.org>
- * mule-charset.h:
- * mule-charset.c:
+ * mule-charset.h:
+ * mule-charset.c:
Use ints instead of bitfields for Lisp_Charset fields. This
should work around bugs in the latest egcs snapshot, and make
XEmacs faster. Introduce dimension and chars as fields in
* data.c (Fnot): There has traditionally been kludgy startup lisp
code that called `null' even if `not' was more appropriate,
because `not' was defined in lisp. This is one primitive
- sufficiently important that it should ALWAYS be defined.
+ sufficiently important that it should ALWAYS be defined.
Sat Apr 24 1998 Andy Piper <andyp@parallax.co.uk>
1998-04-23 Hrvoje Niksic <hniksic@srce.hr>
- * fns.c (Fload_average): Respect errno when reporting getloadavg()
+ * fns.c (Fload_average): Respect errno when reporting getloadavg()
errors.
- * getloadavg.c (getloadavg): Cleaner Solaris implementation, based
+ * getloadavg.c (getloadavg): Cleaner Solaris implementation, based
on sample code by Casper Dik.
1998-04-23 SL Baur <steve@altair.xemacs.org>
* toolbar-msw.c (mswindows_clear_toolbar): Fixed wabbit buttons.
(mswindows_output_toolbar): Gave 3D look to toolbars. Still no
pretty, needs more work.
- (mswindows_move_toolbar): Renamed so because it does not deal with
+ (mswindows_move_toolbar): Renamed so because it does not deal with
redrawing exposed toolbars.
Properly position toolbars.
(mswindows_redraw_exposed_toolbars): Changed calls to the above.
* eldap.c: (print_ldap): Ignore escapeflag
(Fldap_search_internal): Added unwind protection to appropriately
- free the LDAP temporary structures in case of interruption. Added
+ free the LDAP temporary structures in case of interruption. Added
a QUIT to the result fetching loop.
1998-04-19 SL Baur <steve@altair.xemacs.org>
* indent.c (vertical_motion_1): new helper function to share
common code between Fvertical_motion and Fvertical_motion_pixels.
- Properly handle the WINDOW argument as the doc string indicates it
+ Properly handle the WINDOW argument as the doc string indicates it
should. Update docstrings to be more clear and concise.
(Fvertical_motion): use vertical_motion_1.
(Fvertical_motion_pixels): use vertical_motion_1.
* specifier.c: Reworked many functions to support magic
specifiers.
- * scrollbar.c (specifier_vars_of_scrollbar): Made magic specifiers
+ * scrollbar.c (specifier_vars_of_scrollbar): Made magic specifiers
Vscrollbar_width and Vscrollbar_height.
(init_frame_scrollbars): Enabled critical lisp code operate on
ghost specifiers.
* scrollbar-msw.c (Fmswindows_init_scrollbar_metrics): Scrollbar
init function, called from init-scrollbars-from-resuorce in
- lisp/scrollbar.c
+ lisp/scrollbar.c
(syms_of_scrollbar_mswindows): DEFSUBR it.
* emacs.c (main_1): Called syms_of_scrollbar_mswindows()
* data.c (pure_write_error): Accept an argument.
- * emacs.c (vars_of_emacs): New variable `internal-error-checking';
+ * emacs.c (vars_of_emacs): New variable `internal-error-checking';
initialize it.
1998-04-16 Hrvoje Niksic <hniksic@srce.hr>
* device-x.c (have_xemacs_resources_in_xrdb): adhere to coding
standards and avoid opening display twice by breaking
- XtOpenDisplay into XOpenDisplay and XtDisplayInitialize.
+ XtOpenDisplay into XOpenDisplay and XtDisplayInitialize.
(x_init_device): Ditto.
1998-04-15 Olivier Galibert <galibert@pobox.com>
1998-04-13 Greg Klanderman <greg@alphatech.com>
- * redisplay.c (redisplay_window): When echo area is active, and we
+ * redisplay.c (redisplay_window): When echo area is active, and we
swap in the echo area buffer, restore the minibuffer's pointm and
startp when we restore the minibuffer to the window. This avoids
having the minibuffer point randomly change when it is active but
(emacs_mswindows_select_process): Get Win32 process handle
directly from process lrecord.
(get_process_handle): Removed function.
- (emacs_mswindows_handle_magic_event): Removed handling of
+ (emacs_mswindows_handle_magic_event): Removed handling of
XM_BUMPQUEUE magic event.
- (mswindows_wnd_proc): Removed handling of WM_EXITMENULOOP message,
+ (mswindows_wnd_proc): Removed handling of WM_EXITMENULOOP message,
which called a do-nothing handler in menubar-msw.c
(mswindows_wnd_proc, WM_EXITSIZEMOVE): Queue an empty event
instead of magic event, via mswindows_bump_queue().
* event-stream.c (event_stream_deal_with_async_timeout):
Conditionalized timer-based polling for finished processes on
- HAVE_UNIX_PROCESSES.
+ HAVE_UNIX_PROCESSES.
* menubar-msw.c (mswindows_handle_wm_command): Queued proper bump
queue event.
(mswindows_handle_wm_exitmenuloop): Removed function.
-
+
* menubar-msw.h: Removed unused function prototype.
* process-nt.c (get_nt_process_handle): Added function.
* signal.c (init_poll_for_sigchld): Conditionalized on
- HAVE_UNIX_PROCESSES.
+ HAVE_UNIX_PROCESSES.
1998-04-13 Kirill M. Katsnelson <kkm@kis.ru>
* callproc.c (init_callproc): Correctly initialize
`shell-file-name' for WINDOWSNT
-
+
* emacs.c (main_1): Properly called new functions (see symsinit.h
entry for which).
- * event-msw.c (struct ntpipe_slurp_stream):
- (slurp_thread):
- (make_ntpipe_input_stream):
- (get_ntpipe_input_stream_waitable):
- (get_ntpipe_input_stream_param):
- (ntpipe_slurp_reader):
- (ntpipe_slurp_closer):
+ * event-msw.c (struct ntpipe_slurp_stream):
+ (slurp_thread):
+ (make_ntpipe_input_stream):
+ (get_ntpipe_input_stream_waitable):
+ (get_ntpipe_input_stream_param):
+ (ntpipe_slurp_reader):
+ (ntpipe_slurp_closer):
(init_slurp_stream): Win32 pipe input stream implementation.
- (struct ntpipe_shove_stream):
- (shove_thread):
- (make_ntpipe_output_stream):
- (get_ntpipe_output_stream_param):
- (ntpipe_shove_writer):
- (ntpipe_shove_was_blocked_p):
- (ntpipe_shove_flusher):
- (ntpipe_shove_closer):
+ (struct ntpipe_shove_stream):
+ (shove_thread):
+ (make_ntpipe_output_stream):
+ (get_ntpipe_output_stream_param):
+ (ntpipe_shove_writer):
+ (ntpipe_shove_was_blocked_p):
+ (ntpipe_shove_flusher):
+ (ntpipe_shove_closer):
(init_shove_stream): Win32 pipe output stream implementation.
(mswindows_enqueue_process_event): Dispatch helper.
- (find_waitable_handle):
- (add_waitable_handle):
+ (find_waitable_handle):
+ (add_waitable_handle):
(remove_waitable_handle): New three, waitable handles handling.
(mswindows_need_event_in_modal_loop): Simplified.
(mswindows_need_event): Simplified.
- (mswindows_need_event): Generate process events on process output;
+ (mswindows_need_event): Generate process events on process output;
kick status_notify when a process ends.
(mswindows_find_console): Simplified.
(emacs_mswindows_event_pending_p): Adjusted parameters to
mswindows_need_event().
(emacs_mswindows_next_event): Ditto.
- (get_process_input_waitable):
+ (get_process_input_waitable):
(get_process_handle): Process select/unselect helpers.
(emacs_mswindows_select_process): Implemented.
(emacs_mswindows_unselect_process): Implemented.
1998-04-10 Martin Buchholz <martin@xemacs.org>
- * fns.c (Fnthcdr):
+ * fns.c (Fnthcdr):
Most times through the loop will get a cons, so optimize for that.
* bytecode.c (Fbyte_code): Remove '91 vintage compiler bug workaround.
* event-msw.c (mswindows_wnd_proc): Fix member access macro names.
- * frame-msw.c (mswindows_frame_property):
- (mswindows_internal_frame_property_p):
+ * frame-msw.c (mswindows_frame_property):
+ (mswindows_internal_frame_property_p):
(mswindows_frame_properties): Implemented for the 'left and 'top
properties.
(console_type_create_frame_mswindows): Regsitered the above.
* insdel.c (make_gap): Thou shan't cast EMACS_INT_MAX to int.
(buffer_insert_string_1): ditto.
- * regex.c (print_partial_compiled_pattern): Neither EMACS_INTs nor
+ * regex.c (print_partial_compiled_pattern): Neither EMACS_INTs nor
ptrdiff_t are portably printable as an int.
- * redisplay.c (window_line_number): Don't assume that an EMACS_INT
+ * redisplay.c (window_line_number): Don't assume that an EMACS_INT
in an int.
* alloc.c (report_pure_usage): Don't assume that a size_t is
(sys_chmod):
(sys_creat):
- * sysdep.c (sys_read_1):
- (sys_read):
- (sys_write_1):
- (sys_write):
- (sys_mkdir):
- (sys_readlink):
- (sys_chmod):
- (sys_creat):
-
- * nt.c (sys_read):
- (sys_chmod):
- (sys_creat):
+ * sysdep.c (sys_read_1):
+ (sys_read):
+ (sys_write_1):
+ (sys_write):
+ (sys_mkdir):
+ (sys_readlink):
+ (sys_chmod):
+ (sys_creat):
+
+ * nt.c (sys_read):
+ (sys_chmod):
+ (sys_creat):
(sys_write): Change types of sys_* in accordance with published
standards. Use size_t and mode_t instead of unsigned int and int.
1998-04-03 Martin Buchholz <martin@xemacs.org>
- * config.h.in (enum_field):
+ * config.h.in (enum_field):
* lisp-union.h:
* extents.h:
* redisplay.c (add_margin_runes):
* window.c (set_window_pixsize): Move up call to
check_min_window_sizes.
- * indent.c (vmotion_1): renamed from vmotion() and added
+ * indent.c (vmotion_1): renamed from vmotion() and added
additional argument to optionally return the pixel motion.
(vpix_motion): Helper for vmotion_1.
(vmotion): Wrapper - just call vmotion_1() with the right args.
1998-04-02 Martin Buchholz <martin@xemacs.org>
- * xselect.c:
- * event-Xt.c:
- * emacs.c:
+ * xselect.c:
+ * event-Xt.c:
+ * emacs.c:
Remove last vestiges of #ifdef EPOCH code. It had no chance of
- working anyways. In honour of seeing Marc Andreesen in person for
+ working anyways. In honour of seeing Marc Andreesen in person for
the first time today.
1998-04-01 Martin Buchholz <martin@xemacs.org>
- * extents.h:
- * lisp-union.h:
+ * extents.h:
+ * lisp-union.h:
Don't use enums as bitfields - only unsigned ints.
Fixes: warning: nonportable bit-field type
* eval.c (call_with_suspended_errors): More volatilizing to
appease Sunpro cc.
- * mem-limits.h:
+ * mem-limits.h:
* ralloc.c: Remove #undef NULL; they're not even used!
- * process-unix.c (unix_send_process): send_process is a method, so
+ * process-unix.c (unix_send_process): send_process is a method, so
we can't include volatile in the prototype. We make the argument
- non-volatile, make a volatile copy, and then use that instead.
+ non-volatile, make a volatile copy, and then use that instead.
- * frame-x.c (x_delete_frame): The `frame' variable is initialized
+ * frame-x.c (x_delete_frame): The `frame' variable is initialized
but not actually used.
* Makefile.in.in (xselect.o): The last line of b34-pre2's
src/Makefile.in.in contains a dependency that should have been
- patched away.
+ patched away.
(mostlyclean): Remove the removal of depend.* - no such files
exist anymore
1998-03-30 Martin Buchholz <martin@xemacs.org>
- * redisplay.c (create_right_glyph_block): glyph_type should really
+ * redisplay.c (create_right_glyph_block): glyph_type should really
be glyph_layout.
1998-03-29 Martin Buchholz <martin@xemacs.org>
#include sysfile.h.
Check all .o files for missing #includes.
* config.h.in:
- Discovered that config.h.in was missing ENCAPSULATE_CLOSEDIR, as a
+ Discovered that config.h.in was missing ENCAPSULATE_CLOSEDIR, as a
result of fixing the above.
* gui.c (gui_item_add_keyval_pair): We should not use the idiom
(signal_too_long_error): Ditto.
* glyphs.c (image_instantiate_cache_result): Use XC[AD]R instead
- of Fc[ad]r. This is always called with valid conses, and in fact,
+ of Fc[ad]r. This is always called with valid conses, and in fact,
already assumed it.
* font-lock.c (find_context): Use context_none with context
1998-03-28 Martin Buchholz <martin@xemacs.org>
- * fns.c (string_putprop):
+ * fns.c (string_putprop):
(string_getprop): Make method functions static.
* window.c (find_window_by_pixel_pos): Warning suppression.
* redisplay-x.c (x_output_eol_cursor): Remove redundant XSETWINDOW.
- * glyphs-x.c (signal_image_error):
+ * glyphs-x.c (signal_image_error):
(signal_image_error_2):
(convert_EImage_to_XImage): Make functions static.
1998-03-27 Martin Buchholz <martin@xemacs.org>
- * console-tty.c (free_tty_console_struct):
+ * console-tty.c (free_tty_console_struct):
Replace con->console_data with CONSOLE_type_DATA (con)
* *.[ch]: C++ compilability of xemacs, on Linux and Solaris.
* eval.c:
* bytecode.c:
Rename Fcondition_case_3 to condition_case_3 - it's not a DEFUN.
-
+
* buffer.h:
Remove all *BUFFER_OR_STRING* macros - unused.
(memind_to_bytind): Merge two versions of function by moving
* marker.c (print_marker): Fix compiler warning, real bug!
- * device.h (MARK_DEVICE_FRAMES_FACES_CHANGED):
- * frame.h (MARK_FRAME_FACES_CHANGED):
- (MARK_FRAME_TOOLBARS_CHANGED):
- (MARK_FRAME_SIZE_CHANGED):
- (MARK_FRAME_CHANGED):
- (MARK_FRAME_WINDOWS_CHANGED):
- (MARK_FRAME_WINDOWS_STRUCTURE_CHANGED):
+ * device.h (MARK_DEVICE_FRAMES_FACES_CHANGED):
+ * frame.h (MARK_FRAME_FACES_CHANGED):
+ (MARK_FRAME_TOOLBARS_CHANGED):
+ (MARK_FRAME_SIZE_CHANGED):
+ (MARK_FRAME_CHANGED):
+ (MARK_FRAME_WINDOWS_CHANGED):
+ (MARK_FRAME_WINDOWS_STRUCTURE_CHANGED):
Fix multiple evaluation of macro arguments.
Macros are a fact of life. Callers have to use temp variables to
avoid multiple evaluation of arguments.
* data.c (Ftrue_list_p): New function, with obvious meaning.
- This is terminology from Cltl2.
+ This is terminology from Cltl2.
Also define a corresponding macro TRUE_LIST_P.
* device-x.c (validify_resource_component): Optimize. Rename.
Use the standard technique of using a precomputed table of valid chars.
-
- (x_get_resource_prefix):
- (Fx_get_resource):
- (Fx_get_resource_prefix):
+
+ (x_get_resource_prefix):
+ (Fx_get_resource):
+ (Fx_get_resource_prefix):
Avoid fixed buffer sizes. Use a char_dynarr.
Run validify_resource_component on all computed components.
Use acons in functions which create alists.
* lisp/cl.el (acons): Add docstring. Really otta be a macro, tho.
- * buffer.c (Fbuffer_memory_usage):
+ * buffer.c (Fbuffer_memory_usage):
* window.c (Fwindow_memory_usage):
Clean up horrible consing code using new acons function.
Fix incorrect value reported for gap-overhead.
-
+
* fns.c (Fmember):
- (Fold_member):
- (Fmemq):
- (Fold_memq):
- (memq_no_quit):
- (Fassoc):
- (Fold_assoc):
- (Fassq):
- (Fold_assq):
- (assq_no_quit):
- (Frassoc):
- (Fold_rassoc):
- (Frassq):
- (Fold_rassq):
- (rassq_no_quit):
- (Fdelete):
- (Fold_delete):
- (Fdelq):
- (Fold_delq):
- (delq_no_quit):
- (delq_no_quit_and_free_cons):
- (Fremassoc):
- (Fremassq):
- (remassq_no_quit):
- (Fremrassoc):
- (Fremrassq):
- (remrassq_no_quit):
- (Fnreverse):
- (Freverse):
- (Fnthcdr):
- Optimize.
- Replace calls to Fcar, Fcdr, Fsetcar with XCAR and XCDR.
+ (Fold_member):
+ (Fmemq):
+ (Fold_memq):
+ (memq_no_quit):
+ (Fassoc):
+ (Fold_assoc):
+ (Fassq):
+ (Fold_assq):
+ (assq_no_quit):
+ (Frassoc):
+ (Fold_rassoc):
+ (Frassq):
+ (Fold_rassq):
+ (rassq_no_quit):
+ (Fdelete):
+ (Fold_delete):
+ (Fdelq):
+ (Fold_delq):
+ (delq_no_quit):
+ (delq_no_quit_and_free_cons):
+ (Fremassoc):
+ (Fremassq):
+ (remassq_no_quit):
+ (Fremrassoc):
+ (Fremrassq):
+ (remrassq_no_quit):
+ (Fnreverse):
+ (Freverse):
+ (Fnthcdr):
+ Optimize.
+ Replace calls to Fcar, Fcdr, Fsetcar with XCAR and XCDR.
Simplify logic.
Many of these functions wouldn't QUIT if called on cyclic lists.
e.g. try (progn (setq x '(nil)) (setcdr x x) (reverse x))
One benchmark of delq showed it to be 3 times faster.
* emacs.c:
- * database.c:
+ * database.c:
Cleanup of database functions.
Make the get_subtype and get_type methods return Lisp_Objects,
instead of C strings. No more need for both dbm_type and dbm_lisp_type.
Replace old `dbm' names with `database'.
Rename struct database to struct Lisp_Database.
Rename DEFUN arguments to `database', when applicable.
-
+
* buffer.c:
* chartab.c:
* console.c:
* window.c:
Place DEFINE_LRECORD_* after definition of static object methods, to
avoid redundant declarations.
-
+
* console.c:
* console.h:
* device.c:
1998-03-21 Martin Buchholz <martin@xemacs.org>
* alloc.c (list*): Optimize recursion levels.
-
+
* alloc.c: Add debugger support via enum dbg_constants.
* gdbinit: Complete rewrite.
* gdbinit.union: Remove
Support all combinations of Kylish DEFINEs.
Work out of the box with no user customizations.
See the updated faq for details.
-
+
* emacsfns.h: Remove. Move declarations to lisp.h
* dynarr.h: Remove. Move declarations to lisp.h
* lisp.h.
Introduce EXFUN macro for external declaration to correspond to DEFUN.
Include header files only when necessary, i.e. not from lisp.h:
- unistd.h, limits.h, fnctl.h, blocktype.h, dynarr.h, emacsfns.h
-
-
+
+
* lisp.h:
* lisp-union.h:
* lisp-disunion.h:
* depend: New file. Generated by make-src-depend
* make-src-depend: New file. generates up-to-date dependencies.
Makefile dependencies are now automagically maintained, and
- CORRECT. lisp.h and friends are now included in the dependencies,
+ CORRECT. lisp.h and friends are now included in the dependencies,
since this complies with the principle of least astonishment.
* symbols.c (symbol_is_constant): Optimize.
1998-03-29 SL Baur <steve@altair.xemacs.org>
* emacs.c (voodoo_free_hook): ELF libraries built with newer
- versions of GCC do horrible things in dumped binaries after exit()
+ versions of GCC do horrible things in dumped binaries after exit()
is called.
(Fkill_emacs): Use it.
glyph_changed_set variables, mimicking
clip_changed and clip_changed_set.
- (redisplay_window): Reset the window's glyph cache is
- f->glyphs_changed is non-zero. Call regenerate_window
+ (redisplay_window): Reset the window's glyph cache is
+ f->glyphs_changed is non-zero. Call regenerate_window
if f->glyphs_changed is non-zero.
(redisplay_frame): Clear f->glyphs_changed after
related, mark all frames.
* redisplay-output.c (compare_display_blocks):
- Output the whole display block if f->glyphs_changed is
+ Output the whole display block if f->glyphs_changed is
non-nil.
1998-03-27 Kyle Jones <kyle_jones@wonderworks.com>
- * callproc.c (Fcall_process_internal): In the case where
+ * callproc.c (Fcall_process_internal): In the case where
fd_error and fd1 are the same don't close that
descriptor twice.
(mswindows_init_frame_1): Fixed support for popup frames.
(mswindows_delete_frame): Fixed memory leak.
(mswindows_get_frame_parent): Implemented.
- (mswindows_update_frame_external_traits): Moved part of the former
+ (mswindows_update_frame_external_traits): Moved part of the former
update_EmacsFrame() here.
(console_type_create_frame_mswindows): Declare get_frame_parent
and update_frame_external_traits methods.
windows does not yet have associated frame object
(mswindows_find_frame): Casted long to Lisp_Object properly.
- * device.c (window_system_pixelated_geometry): Changed to call the
+ * device.c (window_system_pixelated_geometry): Changed to call the
device_implementation_flags device method.
* device-msw.c (mswindows_device_implementation_flags):
- Implemented.
+ Implemented.
(console_type_create_device_mswindows): Declared the above.
* console.h (struct console_methods): Added
device_implementation_flags_method and
- update_frame_external_traits_method.
+ update_frame_external_traits_method.
Defined flags retuned by device_implementation_flags_method.
* console-msw.h (struct mswindows_frame): Added charheight and
Moved Windows-specific macros from frame.h here.
(typedef struct XEMACS_RECT_WH): Added.
Declared global variables.
-
+
1998-03-19 Kirill M. Katsnelson <kkm@kis.ru>
* console-msw.h: Added prototypes for
indication to fake font size to 1.
(char_to_pixel_size): Ditto.
(round_size_to_char): Ditto.
- (pixel_to_real_char_size):
- (char_to_real_pixel_size):
+ (pixel_to_real_char_size):
+ (char_to_real_pixel_size):
(round_size_to_real_char): New three counterparts of the above
metioned functions, which always use real character metrics.
(change_frame_size_1): Use real character metrics when computing
(mswindows_init_frame_2): Commented out, unused.
(mswindows_after_init_frame): Added frame method.
(mswindows_set_frame_size): Reworked to support pixel base
- geometry.
+ geometry.
(mswindows_set_frame_position): Cahnged to use SetWindowPos.
(mswindows_lower_frame): Ditto.
(mswindows_set_frame_properties): Fixed to perform correct
after_init_frame added.
* faces.c (default_face_height_and_width_1): Added.
- (update_EmacsFrame): Changed method of notifying mswindwows frame,
+ (update_EmacsFrame): Changed method of notifying mswindwows frame,
so modeline border gets redrawn.
* faces.h: Prototype for default_face_height_and_width_1().
char if window is maximized.
Use real char metrics for rounding.
Call DefWindowProc to process WM_GETMINMAXINFO
- (mswindows_set_chord_timer): Changed chord timeout from 1/2 to 1/3
+ (mswindows_set_chord_timer): Changed chord timeout from 1/2 to 1/3
system double click time
* device.c (domain_device_type): New function.
- (window_system_pixelated_geometry): New function.
+ (window_system_pixelated_geometry): New function.
(Fdomain_device_type): New function, lisp interface to
- domain_device_type().
+ domain_device_type().
(syms_of_device): DEFSUBRed the above.
* device.h: Ptorotypes for domain_device_type() and
1998-03-27 P. E. Jareth Hein <jareth@camelot-soft.com>
- * glyphs-x.c:
+ * glyphs-x.c:
* imgproc.c:
* imgproc.h:
* glyphs-x.h: Added in a colormap variable in the X specific image
coding standards.
* glyphs.h:
- * glyphs.c:
+ * glyphs.c:
* glyphs-x.c: added image-conversion-error type
* objects-x.c (allocate_nearest_color): Corrected a minor bug involving
1998-03-24 Kirill M. Katsnelson <kkm@kis.ru>
- * fileio.c (Ffile_readable_p): GC protect fix, MS Windows specific.
+ * fileio.c (Ffile_readable_p): GC protect fix, MS Windows specific.
Mon Mar 23 22:14:12 1998 Andy Piper <andyp@parallax.co.uk>
* configure.in: compile in glyphs-msw.o when compiling fopr
mswindows.
-
+
Mon Mar 23 22:14:12 1998 Andy Piper <andyp@parallax.co.uk>
* msw-glyphs.el: add support for xpm and bmp. change
* Makefile.in.in: fastdump - new target for dumping bypassing
bytecompilation, DOC. Add dependencies for glyphs-msw.o. Move
imgproc.o to object list.
-
+
* glyphs-msw.h:
* glyphs-msw.c: new files adding support for xpm and bmp and
EImages.
* console-msw.h: add bitspixel field to mswindows frame.
* device-msw.c: initialise bitspixel field in mswindows frame.
-
+
* glyphs-x.c (xpm_instantiate): call mswindows_xpm_instantiate if
the device type is mswindows.
mswindows.
* symsinit.h: add prototypes for glyphs-msw.c functions.
-
+
* sheap.c: make includes src-dir compliant.
* events.c: remove cygwin ^H <-> erase hack.
if the symbol is in Vobarray.
* symbols.c (reject_constant_symbols): Signal error when
- attempting to assign a value to a keyword, unless the value is the
+ attempting to assign a value to a keyword, unless the value is the
keyword itself.
* symbols.c (Fintern): Initialize symbol's ->obarray to t only
* config.h.in: Add HAVE_LIBMCHECK and HAVE_MCHECK_H.
* hash.c (grow_hashtable): Fix tests to compare against
- Qnull_pointer since this function may be called before any symbols
+ Qnull_pointer since this function may be called before any symbols
or the Lisp engine is initialized.
* emacs.c (main_1): Restore usage of free-hook.c.
control variable is being modified underneath us.
- Avoid calling delete_console_internal on stream consoles.
- * console-tty.c (free_tty_console_struct): NULL out pointers after
+ * console-tty.c (free_tty_console_struct): NULL out pointers after
xfree'ing.
* console-stream.c (allocate_stream_console_struct): Fix memory
(Fwrite_region_internal): Ditto.
(decide_buffer_type): Function removed.
(buf_decide_buffer_type): Function removed.
- (Many places): References to DOS_NT replaced with WINDOWSNT. MSDOS-
+ (Many places): References to DOS_NT replaced with WINDOWSNT. MSDOS-
specific code removed.
* lread.c (Fload_internal): Removed ugly DOS style re-opening a
implemented in nt.c
* fileio.c (Ffile_readable_p): Conditionalized declared never used
- variables.
+ variables.
(Fexpand_file_name): Ditto.
(check_executable): Ditto.
1998-03-15 Kyle Jones <kyle_jones@wonderworks.com>
- * console.h: Added set_final_cursor_coords method to console
+ * console.h: Added set_final_cursor_coords method to console
struct.
* console-tty.h: Added final_cursor_x and final_cursor_y
* glyphs-x.c (png_instantiate): Added in override support
for png backgrounds.
-
+
1998-03-13 P. E. Jareth Hein <jareth@camelot-soft.com>
* glyphs-x.c (png_instantiate): Fixed a bug that was causing
(Fenlarge_window_pixels): New function.
(Fshrink_window_pixels): New function.
(window_displayed_pixel_height): New, helper for
- Fwindow_displayed_pixel_height.
+ Fwindow_displayed_pixel_height.
(change_window_height): Add `inpixels' argument.
(syms_of_window): 3 new DEFSUBR's.
(get_eof_char): Ditto
* symsinit.h: Prototypes for initialization functions called from
- emacs.c: process_type_create_mswindows, process_type_create_unix,
+ emacs.c: process_type_create_mswindows, process_type_create_unix,
vars_of_process_mswindows, vars_of_process_unix.
- * procimpl.h: New file. Includes prototypes and other stuff shared
+ * procimpl.h: New file. Includes prototypes and other stuff shared
by process.c and implementation files (process-unix.c,
process-msw.c in future).
* process.h (PROCESS_LIVE_P): Changed to test against stream
existence, to avoid dependency on fds.
-
+
* process.c: Only process implementation independent code is now
in this file. Moved the rest into process-unix.c
(Fopen_network_stream_internal): Added 5th parameter, protocol
processes. UNIX-specific code from the old process.c is here.
* Lstream.c (Lstream_was_blocked_p): New function. Replaces
- filedesc_stream_was_blocked_p.
+ filedesc_stream_was_blocked_p.
(filedesc_was_blocked_p): Implementation of the method for
filedesc stream
(filedesc_stream_set_pty_flushing): set pty_flushing flag
optional lstream method.
Added prototypes for functions in lstream.c
- * lisp.h: (USID): Typedef for Unique Stream IDentifier. Reuqired
+ * lisp.h: (USID): Typedef for Unique Stream IDentifier. Reuqired
by the new code in many places.
- * events.h (struct event_stream): Declaration of the two mandatory
+ * events.h (struct event_stream): Declaration of the two mandatory
event stream methods, required by process support.
* event-unixoid.c (event_stream_unixoid_create_stream_pair):
(emacs_Xt_delete_stream_pair): Ditto
* emacs.c (main_1): Added calls to process_type_create*() and
- vars_of_process()
+ vars_of_process()
* callproc.c: (many places): removed DOS support
1998-03-01 Kyle Jones <kyle_jones@wonderworks.com>
- * file-coding.c (setup_eol_coding_systems): Don't try
+ * file-coding.c (setup_eol_coding_systems): Don't try
to copy the mnemonic property of the coding system
unless it is a string.
1998-03-01 Kyle Jones <kyle_jones@wonderworks.com>
- * callint.c: Read coding system names for the 'z' and
+ * callint.c: Read coding system names for the 'z' and
'Z' interactive specs if FILE_CODING or MULE is defined.
Previously, coding system names were read only if MULE was
defined.
* mule-coding.c: #if 0 out functionality until file-coding is
split up.
- * file-coding.h:
+ * file-coding.h:
* file-coding.c: new files. copies of mule-coding.h and
mule-coding.c. The mule case is unchanged. The non-mule case
removes coding relating to other charsets - iso2022, big5, sjis,
case, the application class is chosen based on whether the user
has any resources with application class `XEmacs' set in the
resource database.
- (vars_of_device_x): make x-emacs-application-class nil by default
+ (vars_of_device_x): make x-emacs-application-class nil by default
and document new behavior in its doc string.
1998-02-23 Aki Vehtari <Aki.Vehtari@hut.fi>
* s/sol2.h: define HAVE_GETLOADAVG for late edition Solaris
From Georg Nikodym <georgn@Canada.Sun.COM>
-1998-02-24 Didier Verna <verna@inf.enst.fr>
+1998-02-24 Didier Verna <didier@xemacs.org>
* redisplay.c (generate_fstring_runes): fixed the modeline
scrolling lossage (the % constructs appearing in the
- modeline). Now that we can have negative positions and boundaries,
+ modeline). Now that we can have negative positions and boundaries,
max_pos == -1 can't mean 'no limit' anymore. Me, stupido!
(add_string_to_fstring_db_runes): Ditto.
(add_glyph_to_fstring_db_runes): Ditto.
* unexelf.c: The proper way to check for GNU libc is with __GLIBC__.
Suggested by Andreas Jaeger <aj@arthur.rhein-neckar.de>
-
+
1998-02-18 SL Baur <steve@altair.xemacs.org>
* Makefile.in.in: Remove all references to prefix-args.
(Fset-window-configuration): Restore window-cached
specifier values.
-1998-02-18 Didier Verna <verna@inf.enst.fr>
+1998-02-18 Didier Verna <didier@xemacs.org>
* modeline.el (mouse-drag-modeline): added the horizontal
scrolling functionality for the modeline. This could still be
improved, for instance when the mouse goes out of the modeline.
-1998-02-18 Didier Verna <verna@inf.enst.fr>
+1998-02-18 Didier Verna <didier@xemacs.org>
* redisplay.c:
(generate_formatted_string_db): new flag to distinguish a modeline
string from a title or icon one, plus use a negative first pos to
- indicate the modeline hscroll ammount.
+ indicate the modeline hscroll ammount.
(add_string_to_fstring_db_runes): completely rewrote this function
to handle the case of scrolled modelines.
(add_glyph_to_fstring_db_runes): handle the case of scrolled
- modelines.
+ modelines.
* window.c:
(Fmodeline_hscroll): new function to return the modeline current
- horizontal scroll ammount.
+ horizontal scroll ammount.
(Fset_modeline_hscroll): new function to scroll the modeline
- horizontaly.
+ horizontaly.
Plus some updates related to this new functionality (windows
configuration, notably).
1998-02-14 Martin Buchholz <martin@xemacs.org>
- * event-Xt.c (x_reset_key_mapping):
- * device-x.c:
+ * event-Xt.c (x_reset_key_mapping):
+ * device-x.c:
(x-keysym-on-keyboard-p):
(x-keysym-on-keyboard-sans-modifiers-p):
Use x-keysym-on-keyboard-sans-modifiers-p instead of
(gui_item_display_flush_left): Ditto
(gui_item_display_flush_right): Ditto. The above listen new
functions manipulate on properties common to menu items and GUI
- buttons.
+ buttons.
* menubar.c (current_frame_menubar): Moved from menubar-msw.c
(menu_parse_submenu_keywords): New function
Wed Jan 28 13:41:22 1998 Andy Piper <andyp@parallax.co.uk>
* Makefile.in.in: add support for sheap-adjust.h generation for
- static heap.
+ static heap.
Wed Jan 28 13:41:22 1998 Andy Piper <andyp@parallax.co.uk>
* frame-msw.c:
Added file-based drag and drop support. The "System/Open" DDE command
is also implemented as if it were a drag and drop operation.
-
+
* emacsfns.h:
* event-stream.c:
* events.c:
* unexcw.cc: new file for cygwin32 unexec() requires cygwin32
b19. Predicated on HAVE_COFF_H.
- * console.c:
+ * console.c:
* device-msw.c:
* event-msw.c:
* frame-msw.c:
1998-01-23 Hrvoje Niksic <hniksic@srce.hr>
* print.c (print_cons): Use XCAR/XCDR.
- (print_string): Fix up so it Vprint_string_length works under Mule
+ (print_string): Fix up so it Vprint_string_length works under Mule
correctly.
* eval.c (Feval): Increase profile call count.
* offix-cursors.h (cursor_bits):
Warning elimination.
- * redisplay.c (add_blank_rune):
- * redisplay.c (add_glyph_rune):
- * redisplay.c (add_emchar_rune):
+ * redisplay.c (add_blank_rune):
+ * redisplay.c (add_glyph_rune):
+ * redisplay.c (add_emchar_rune):
Warning elimination. Avoid useless computation in non-mule case.
* config.h.in:
Define HAVE_INVERSE_HYPERBOLIC using 1 configure test, not 3.
- * src/alloc.c:
- * src/events.c:
+ * src/alloc.c:
+ * src/events.c:
Rearrange order of declarations and definitions to avoid forward
* src/mem-limits.h: Add motivating comment for future cleanup.
Always define _GNU_SOURCE when using GNU libc.
Support --without-FOO as a synonym for --with-FOO=no.
Always use $srcdir to locate config.guess.
- Make it clear that CONFIGURATION is optional.
+ Make it clear that CONFIGURATION is optional.
De-emphasize CONFIGURATION parameter. Random cleanup.
More compatible with standard GNU install instructions.
--with-menubars=athena3d ==> --with-menubars=lucid.
Suggested by Aki Vehtari <Aki.Vehtari@hut.fi>
* src/symbols.c (Fsetq_default): Fix docstring.
- From Didier Verna <verna@inf.enst.fr>
+ From Didier Verna <didier@xemacs.org>
1998-01-07 Kirill M. Katsnelson <kkm@kis.ru>
* lread.c (Fload_internal): On Win32, this reopened the file
without first closing the handle. This caused running out of
handles.
-
+
* nt.c (sys_open): This one made big mess when opening a handle
next after MAXDESC-1. Fixed.
1998-01-06 Kirill M. Katsnelson <kkm@kis.ru>
- * objects-msw.c (mswindows_string_to_color): Patched not to modify
+ * objects-msw.c (mswindows_string_to_color): Patched not to modify
const char* parameter.
(hexval): Modified to accept uppercase hex digits.
* nt.h: Removed FD_* macros. Rely on definitions in winsock.h.
Changed EMACSDEBUG references to DEBUG_XEMACS
- * event-msw.c (mswindows_cancel_dispatch_event): Returns Qnil when
+ * event-msw.c (mswindows_cancel_dispatch_event): Returns Qnil when
event not found in the queue. Used to return undefined value.
1998-01-07 SL Baur <steve@altair.xemacs.org>
1997-12-29 Kirill M. Katsnelson <kkm@kis.ru>
- * msw-proc.c (mswindows_enqueue_magic_event): Made extern. User by
+ * msw-proc.c (mswindows_enqueue_magic_event): Made extern. User by
menubar-msw.c
* event-msw.h: Prototype for mswindows_enqueue_magic_event
* alloc.c (disksave_object_finalization): Don't zero out
load-history if history of pure symbols is desired.
- * lread.c (build_load_history): If LOADHIST_DUMPED is defined, add
+ * lread.c (build_load_history): If LOADHIST_DUMPED is defined, add
pure symbols to load-history.
* emacsfns.h: New symbols added -- LOADHIST_DUMPED, define to get
1997-12-26 Kirill M. Katsnelson <kkm@kis.ru>
* menubar-msw.c, menubar-msw.h: New files. Menus support.
-
+
* console-msw.h: Added frame menu hashtable variable.
* gui.c: popup_up_p variable and Fpopup_up_p and
can be compared with 'equal. Menubar uses opaque pointers as
hash keys in an 'equal style hastable.
- * Most of the above touched files: Eliminated compiler warnings.
+ * Most of the above touched files: Eliminated compiler warnings.
1997-12-18 Hrvoje Niksic <hniksic@srce.hr>
1997-12-26 P. E. Jareth Hein <jareth@camelot-soft.com>
- * glyphs-x.c (imagick_instantiate): Add in error and
+ * glyphs-x.c (imagick_instantiate): Add in error and
warning handling for ImageMagick files
1997-12-26 SL Baur <steve@altair.xemacs.org>
* fileio.c (Finsert_file_contents_internal): Use
report_file_error() to report reading error.
- * cmds.c (internal_self_insert): Don't self-insert if the expanded
+ * cmds.c (internal_self_insert): Don't self-insert if the expanded
symbol's hook has a non-nil `no-self-insert' property; synch with
FSF 20.2.
* dired.c (file_name_completion): Use noseeum_cons.
(file_name_completion_unwind): Free the cons.
-1997-12-16 <jsparkes@internetivity.com (Jeff Sparkes)>
-
+1997-12-16 <jsparkes@internetivity.com (Jeff Sparkes)>
+
* scrollbar.c: Add HAVE_MS_WINDOWS to scrollbar-page functions.
-
+
* msw-proc.c: Handle scrolling events.
-
+
* frame-msw.c: Initialize scrollbar width and height. This should
not be necessary, since the window shouldn't be created until
init_frame_2
-
+
* emacs.c: Call mswindows scrolbar setup when appropriate.
-
+
* scrollbar-msw.c: Created for mswindows-scrollbar support.
-
+
* scrollbar-msw.h: Ditto.
-
+
1997-12-16 Kirill M. Katsnelson <kkm@kis.ru>
* msw-proc.c: Minor bug in the middle button emulation code
1997-12-12 SL Baur <steve@altair.xemacs.org>
- * input-method-xlib.c (describe_XIC): Add casts, use unsigned long
+ * input-method-xlib.c (describe_XIC): Add casts, use unsigned long
int.
* eval.c (funcall_subr): Ifdef out as it is now unused.
* input-method-xfs.c (Initialize_Locale): Ditto.
* input-method-motif.c (Initialize_Locale): Ditto.
* input-method-xlib.c (Initialize_Locale): Ditto.
- Suggested by Didier Verna <verna@inf.enst.fr> and
+ Suggested by Didier Verna <didier@xemacs.org> and
Martin Buchholz <martin@xemacs.org>
-
+
1997-12-10 Karl M. Hegbloom <karlheg@bittersweet.inetarena.com>
* config.h.in: #undef MAGICK_HEADERS_ARE_UNDER_X11
set the correct window size.
1997-12-04 Jeff Sparkes <jsparkes@internetivity.com>
-
+
* frame-msw.c: added frame functions for move, resize,
iconify, raise, lower, visible_p, iconified_p, focus,
make visible, make invisible, set title.
-
+
1997-12-01 Jonathon Harris <jhar@tardis.ed.ac.uk>
* event-msw.c, event-msw.h, frame-msw.c, msw-proc.c:
* menubar-x.c: change #ifdef LWLIB_MENUBARS_MOTIF to
#if defined LWLIB_MENUBARS_LUCID || defined LWLIB_MENUBARS_MOTIF
- around code for incremental menu build.
+ around code for incremental menu build.
* event-stream.c: Changed HAVE_MENUBARS to HAVE_MENUBARS_LUCID in
the #ifdef wrappers around menubar accelerator stuff.
vector and call mapcar1 with its data.
1997-12-02 P E Jareth Hein <jareth@camelot-soft.com>
-
+
* objects-x.c: Added colormap/visual support, rewrote
allocate_nearest_color, and changed the x-color-instance to deal
with possibly not freeing a color.
(Fredisplay_echo_area): Clear echo_area_garbaged
flag on frame after displaying in echo area.
- * redisplay.c: Added hscroll_glyph_width_adjust field
+ * redisplay.c: Added hscroll_glyph_width_adjust field
to position_redisplay_data_type struct.
(add_hscroll_rune): Compute the difference in width
1997-11-17 Marc Paquette <marcpa@cam.org>
- * callproc.c (Fcall_process_internal): Fix for bug in
+ * callproc.c (Fcall_process_internal): Fix for bug in
CRLF -> LF conversion.
1997-11-19 Jonathan Harris <jhar@tardis.ed.ac.uk>
* callproc.c (Fcall_process_internal): Close fd_error.
-1997-11-19 Didier Verna <verna@inf.enst.fr>
+1997-11-19 Didier Verna <didier@xemacs.org>
* emacs.c (main_1): Added the missing argmatch call to check
for the '-h' option.
* frame.c: Document new toolbar border width
speciifer as being usable as frame properties.
- (frame_conversion_internal): Factor the toolbar border
+ (frame_conversion_internal): Factor the toolbar border
widths into the geometry calculations.
(change_frame_size_1): Ditto.
support for drawing a border along with the blank
button. Accept border_width and vertical args.
- (x_output_toolbar_button): Added support for drawing a
+ (x_output_toolbar_button): Added support for drawing a
border along with the button.
(X_OUTPUT_BUTTONS_LOOP): Pass border_width and vert
- args to x_draw_blank_toolbar_button. Set vertical and
+ args to x_draw_blank_toolbar_button. Set vertical and
border_width fields in toolbar button.
(x_output_toolbar): Support toolbar border widths.
1997-11-16 Hrvoje Niksic <hniksic@srce.hr>
- * events.c (print_event): Use `event-x-pixel' and `event-y-pixel',
+ * events.c (print_event): Use `event-x-pixel' and `event-y-pixel',
to be consistent with `make-event' and `event-properties'.
(Fmake_event): Allow nil dnd-data.
* redisplay.c: init_redisplay
Initialise window system to w32, conditioned on HAVE_W32GUI.
-
+
* symsinit.h: Added syms_of_*_w32, vars_of_*_w32 and
init_event_w32_late.
1997-11-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
- * m/vax.h:
- * s/cxux.h:
- * s/xenix.h:
- * s/umax.h:
- * s/msdos.h:
- * s/template.h:
- * termcap.c:
- * signal.c:
- * lread.c:
+ * m/vax.h:
+ * s/cxux.h:
+ * s/xenix.h:
+ * s/umax.h:
+ * s/msdos.h:
+ * s/template.h:
+ * termcap.c:
+ * signal.c:
+ * lread.c:
* callproc.c
* buffer.c: Remove VMS dependent code.
1997-11-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* syspwd.h:
- * systty.h:
- * systime.h:
- * syssignal.h:
- * sysproc.h:
- * sysfloat.h:
- * sysfile.h:
- * regex.h:
- * process.h:
- * ndir.h:
- * mule-mcpath.h:
- * getpagesize.h:
- * sysdep.h:
+ * systty.h:
+ * systime.h:
+ * syssignal.h:
+ * sysproc.h:
+ * sysfloat.h:
+ * sysfile.h:
+ * regex.h:
+ * process.h:
+ * ndir.h:
+ * mule-mcpath.h:
+ * getpagesize.h:
+ * sysdep.h:
* fileio.c:
* process.c: Remove old VMS code.
1997-11-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
- * sysdep.c:
- * getloadavg.c:
+ * sysdep.c:
+ * getloadavg.c:
* malloc.c: Remove old VMS code.
1997-11-02 Hrvoje Niksic <hniksic@srce.hr>
1997-10-31 Kyle Jones <kyle_jones@wonderworks.com>
- * callproc.c: GC protect current_dir while infile and
+ * callproc.c: GC protect current_dir while infile and
error_file are being initialized.
1997-10-30 SL Baur <steve@altair.xemacs.org>
- * config.h.in: Remove HAVE_GIF, HAVE_JPEG, HAVE_PNG, HAVE_TIFF and
+ * config.h.in: Remove HAVE_GIF, HAVE_JPEG, HAVE_PNG, HAVE_TIFF and
replace with HAVE_IMAGEMAGICK.
1997-10-30 Kyle Jones <kyle_jones@wonderworks.com>
1997-10-28 Kyle Jones <kyle_jones@wonderworks.com>
- * Under LRECORD_VECTOR, moved vectors from being an basic
+ * Under LRECORD_VECTOR, moved vectors from being an basic
lrecord tpye to an lcrecord.
Added support for 31 bits Lisp integers.
Added support for maskless pointers to Lisp objects.
type checking code on an uninitialized implementation
pointer.
- (Fpurecopy): return if given a null pointer. THis can
+ (Fpurecopy): return if given a null pointer. THis can
happen when initializing Qnil.
(mark_object): return if passed a null pointer. I
indirect children list gets reset to a null pointer
when a bfufer is killed.
- (complex_vars_of_buffer): initialize indirect_children
+ (complex_vars_of_buffer): initialize indirect_children
slow of Vbuffer_local_symbols and Vbuffer_defaults to
nil.
* README: Remove references to VMS.
- * vlimit.h:
- * s/vms5-5.h:
- * s/vms4-4.h:
- * s/vms4-2.h:
- * s/vms4-0.h:
+ * vlimit.h:
+ * s/vms5-5.h:
+ * s/vms4-4.h:
+ * s/vms4-2.h:
+ * s/vms4-0.h:
* s/vms.h: Remove files since VMS isn't supported any more.
1997-10-25 Kyle Jones <kyle_jones@wonderworks.com>
* alloc.c: Disable purespace statistics unless --debug is in
effect.
- * console-stream.c (init_console_stream): At the price of a tiny
+ * console-stream.c (init_console_stream): At the price of a tiny
memory leak, reinitialize FILE fields of the console.
From Tonny Madsen <tma@nettest.dk>
separate function so that it could be used as a
`print' method for lrecord-based strings.
-1997-10-20 Jan Vroonhof <vroonhof@math.ethz.ch>
-
+1997-10-20 Jan Vroonhof <vroonhof@math.ethz.ch>
+
* extents.c: Renamed shot property to initial-redisplay-function
(extent_fragment_update): Changed the bookkeeping whether an event
has been spawned. The initial-redisplay-function property is no
longer set to nil.
-
+
* extents.h: ditto
-
+
1997-10-20 Kyle Jones <kyle_jones@wonderworks.com>
* Added support for conses and vectors to be lrecords.
(make-coding-system, coding-system-type, detect-coding-region):
Rename `Qautomatic_conversion' -> `Qundecided'.
-
+
* general.c (syms_of_general): Rename `automatic-conversion' ->
`undecided' to sync with Emacs 20.2.
1997-10-11 SL Baur <steve@altair.xemacs.org>
- * realpath.c (realpath): CONST IS LOSING but removing it conflicts
+ * realpath.c (realpath): CONST IS LOSING but removing it conflicts
with system headers.
* callproc.c: New variable infopath-internal.
* regex.c: Global change: register -> REGISTER.
- Ensure REGISTER is always defined.
-
+
* nt.c: Global change: register -> REGISTER.
* linuxplay.c: Global change: register -> REGISTER.
* gifalloc.c: Global change: register -> REGISTER.
- Ensure REGISTER is always defined.
-
+
* getloadavg.c (getloadavg): register -> REGISTER.
* eval.c (unwind_to_catch): [Unused variable] register -> REGISTER.
Fri Oct 3 12:28:08 1997 Kyle Jones <kyle_jones@wonderworks.com>
* lisp-disunion.h: Move markbit to be between the
- type bits and the value bits. Previously it was always
+ type bits and the value bits. Previously it was always
the sign bit of a EMACS_INT, unless modified by a
#define in a machine dependent .h file.
is a cons.
(Fremrassoc): Ditto.
- * dired.c (Fdirectory_files): Nreverse the list only if it will be
+ * dired.c (Fdirectory_files): Nreverse the list only if it will be
sorted.
Fri Sep 26 13:55:28 1997 Kyle Jones <kyle_jones@wonderworks.com>
1997-09-26 Hrvoje Niksic <hniksic@srce.hr>
* dired.c (close_directory_fd): New function.
- (Fdirectory_files): Use it to set up an unwind-protection to close
+ (Fdirectory_files): Use it to set up an unwind-protection to close
the descriptor.
(Fdirectory_files): Allow QUIT in re_search.
(Fdirectory_files): If the file is too big, allocate necessary
* syntax.c (Fchar_syntax): convert nil input to \000 for
compatibility.
- * alloc.c (report_pure_usage): Increase slop to 512 bytes in betas
+ * alloc.c (report_pure_usage): Increase slop to 512 bytes in betas
and reduce it to 4 bytes in releases.
1997-09-23 SL Baur <steve@altair.xemacs.org>
* eval.c (Fapply): replace Flength call with for-loop
to compute list length.
-
+
* eval.c (apply_lambda):Use XCAR and XCDR in some
places where it is safe to do so.
* events.c (Fmake_event): Add default case, remove unused variables.
1997-08-21 Jan Vroonhof <vroonhof@math.ethz.ch>
-
+
* extents.c (extent_fragment_update): Trigger one_shot_function
* extents.c (set-extent-one-shot-function): New function
1997-08-05 Jens-Ulrik Holger Petersen <petersen@kurims.kyoto-u.ac.jp>
- * eval.c (vars_of_eval): Updated docstring for `debug_on_error' to
+ * eval.c (vars_of_eval): Updated docstring for `debug_on_error' to
mention `debug-ignored-errors'.
1997-08-01 SL Baur <steve@altair.xemacs.org>
* frame-x.c (x_offix_drop_event_handler): Use stderr_out instead
of fprintf.
- * mule-coding.c (parse_iso2022_esc): Add abort() trap on unhandled
+ * mule-coding.c (parse_iso2022_esc): Add abort() trap on unhandled
condition.
* mule-wnnfns.c (Fwnn_dict_search): Remove unused variable.
New variable Vpackage_path.
(vars_of_emacs): Use it.
- * editfns.c (Fstring_to_char): Return nil instead of `0' for empty
+ * editfns.c (Fstring_to_char): Return nil instead of `0' for empty
string.
1997-07-10 Hrvoje Niksic <hniksic@srce.hr>
Was forgotten cut & paste identical clone to
Fcompiled_function_interactive?
- * Makefile.in.in (alloc.o): Remove dependency on puresize_adjust.h
+ * Makefile.in.in (alloc.o): Remove dependency on puresize_adjust.h
so alloc.c need not be recompiled when puresize changes.
* alloc.c (PURIFIED): Use get_PURESIZE() instead of constant.
(get_PURESIZE): New function -- declare it.
* pure.c: Move final PURESIZE computation and include of
- puresize_adjust.h into here so alloc.c need not be recompiled each
+ puresize_adjust.h into here so alloc.c need not be recompiled each
time the puresize is adjusted.
(get_PURESIZE): New function.
I am still not sure what this buys us, but I guess it doesn't hurt
to have it.
From Hrvoje Niksic <hniksic@srce.hr>
-
+
* glyphs.c (make_string_from_file): Use
insert-file-contents-literally instead of
insert-file-contents-internal.
1997-06-18 Martin Buchholz <mrb@eng.sun.com>
- * Makefile.in:
+ * Makefile.in:
* s/*.h:
* m/*.h:
* config.h.in:
- Make quoted pre-processor string tokens out of all macro values
to be used only by configure.
* xmu.c: DON'T use Xos.h
- * sysdep.c (wait_for_termination):
- * search.c:
- * editfns.c:
- * console-*:
+ * sysdep.c (wait_for_termination):
+ * search.c:
+ * editfns.c:
+ * console-*:
1997-06-18 Steven L Baur <steve@altair.xemacs.org>
* syntax.c (Fchar_syntax): Handle case of being passed nil.
- * data.c (eq_with_ebola_notice): Add more legitimate places in the
+ * data.c (eq_with_ebola_notice): Add more legitimate places in the
bytecompiler that should not get Ebola notices.
Tue Jun 10 00:34:40 1997 Kyle Jones <kyle_jones@wonderworks.com>
* keydefs.c (get_relevant_extent_keymaps): Choose correct keymap
at extent boundaries.
-
+
Mon Jun 9 19:35:19 1997 Kyle Jones <kyle_jones@wonderworks.com>
* redisplay.c (pixel_to_glyph_translation):
* sysdep.c: MS Windows NT doesn't (yet) do child TTY processes.
From David Hobley <davidh@wr.com.au>
-
+
Sat Jun 7 22:00:54 1997 Kyle Jones <kyle_jones@wonderworks.com>
* device-x.c (x_delete_device):
* frame.c (Fmake_frame): Correct checking of first_frame_on_device.
From Hrvoje Niksic <hniksic@srce.hr>
-
+
1997-06-04 Steven L Baur <steve@altair.xemacs.org>
* device.c (delete_deviceless_console): New function.
Sat May 31 19:59:49 1997 Kyle Jones <kyle_jones@wonderworks.com>
* frame-tty.c (tty_init_frame_3:
- Defer selection of the newly created frame until
+ Defer selection of the newly created frame until
an event is read.
1997-06-02 Steven L Baur <steve@altair.xemacs.org>
(Fset_recent_keys_ring_size): New function. Modifies the above.
From Hrvoje Niksic <hniksic@srce.hr>
-
+
* event-stream.c: New variable recent_keys_ring_size replacing a
hard-coded macro.
Wed May 21 11:58:17 1997 Kyle Jones <kyle@crystal.wonderworks.com>
* insdel.c (signal_first_change):
- record the current buffer for the unwind instead of the
+ record the current buffer for the unwind instead of the
buffer that's about to become the current buffer.
Tue May 20 23:23:39 1997 Steven L Baur <steve@altair.xemacs.org>
* lread.c: New variable featurep.
(read1): Add processing for #- and #+.
- (read_list_conser): Handle case where a feature test has removed a
+ (read_list_conser): Handle case where a feature test has removed a
portion of the input stream.
(vars_of_lread): New feature `xemacs'.
HAVE_X_WINDOWS.
(main_1): Add vars_of_balloon_x and guard with HAVE_X_WINDOWS.
- * process.c (get_process): This function can be passed a BUFFER as
+ * process.c (get_process): This function can be passed a BUFFER as
a parameter.
Tue Apr 22 01:32:00 1997 Kyle Jones <kyle@crystal.WonderWorks.COM>
* dired.c (Fdirectory_files): Clean up GC protection.
- * insdel.c (signal_after_change): Don't run after_change_functions
+ * insdel.c (signal_after_change): Don't run after_change_functions
on special Vprin1_to_string_buffer.
(signal_before_change): Ditto for before_change_functions.
* config.h.in: Strip unimplemented NeXTStep/Epoch stuff out.
- * Makefile.in.in: Remove unused NeXTStep support. It's all in the
+ * Makefile.in.in: Remove unused NeXTStep support. It's all in the
cvs attic if someone wishes to revive it.
(epoch.o): Remove last vestiges of non-existent epoch support.
Tue Apr 1 12:22:32 1997 Steven L Baur <steve@altair.xemacs.org>
- * config.h.in: MAIL_USE_POP, KERBEROS, HESIOD -- new parameters to
+ * config.h.in: MAIL_USE_POP, KERBEROS, HESIOD -- new parameters to
deal with upgraded movemail.c.
Fri Mar 28 19:25:22 1997 Steven L Baur <steve@altair.xemacs.org>
Mon Mar 24 12:40:56 1997 David Moore <dmoore@ucsd.edu>
* profile.c: Fixed some comments about GC status of functions.
-
+
* profile.c (inside_profiling): New variable to lock the
profiling table.
(sigprof_handler): Check it.
(Fset_file_modes): ditto
(Ffile_newer_than_file_p): ditto
(Fset_visited_file_modtime): ditto
-
+
*fileio.c (Ffile_truename): Unneccessary GC protection.
(Fdelete_directory): Fix broken caller-must-GC-protect call.
* glyphs-x.c (x_print_image_instance): Move define of
HAVE_SUBWINDOWS to glyphs-x.h.
- (our_skip_input_data): Implement with some error checking based on
+ (our_skip_input_data): Implement with some error checking based on
patch by Dominic Froud.
* glyphs-x.h (HAVE_SUBWINDOWS): Define to keep inline.c from
Sun Mar 9 21:46:53 1997 Tomasz J. Cholewo <t.cholewo@ieee.org>
- * minibuf.c (regexp_ignore_completion_p): Reverse meaning of
+ * minibuf.c (regexp_ignore_completion_p): Reverse meaning of
completion-regexp-list.
Thu Mar 6 19:15:29 1997 Steven L Baur <steve@altair.xemacs.org>
* process.c (record_exited_processes): Fix obvious typo in
checking for SIGCLD.
-
+
Sun Feb 23 01:45:49 1997 Martin Buchholz <mrb@eng.sun.com>
* scrollbar.c (update_scrollbar_instance): Fix for
Wed Dec 4 23:38:03 1996 Steven L Baur <steve@altair.xemacs.org>
* redisplay.c: Allow column numbers in modeline to start from 1.
-
* lisp.h (xfree_1): Make non-public.
* (xzero): Use '\0' in memset call for clarity.
* (ALIGNOF): Use __alignof__ instead of undocumented __alignof.
- * alloc.c (allocate_string_chars_struct):
- (make_uninit_string):
- (resize_string):
+ * alloc.c (allocate_string_chars_struct):
+ (make_uninit_string):
+ (resize_string):
(verify_string_chars_integrity):
(compact_string_chars): Now only called for small strings.
(sweep_strings):
2000-01-04 Martin Buchholz <martin@xemacs.org>
- * mule-charset.h (REP_BYTES_BY_FIRST_BYTE):
+ * mule-charset.h (REP_BYTES_BY_FIRST_BYTE):
Remove macro, always use inline function.
* mule-charset.c (make_charset): Don't assign to rep_bytes_by_first_byte.
(rep_bytes_by_first_byte): Make const.
1999-12-21 Martin Buchholz <martin@xemacs.org>
- * editfns.c (Fpoint_min):
- (Fpoint_min_marker):
- (Fpoint_max):
- (Fpoint_max_marker):
- (Fchar_after):
- (Fchar_before):
+ * editfns.c (Fpoint_min):
+ (Fpoint_min_marker):
+ (Fpoint_max):
+ (Fpoint_max_marker):
+ (Fchar_after):
+ (Fchar_before):
Docstring fixes. What's a `buffer pointer' anyways?
* editfns.c (char=): Remove unused and undocumented optional
third BUFFER argument.
- * toolbar.h (DEVICE_SUPPORTS_TOOLBARS_P):
- * fns.c (plists_differ):
- * elhash.c (HASH_CODE):
- * elhash.c (KEYS_EQUAL_P):
- * redisplay-output.c (redisplay_move_cursor):
- * redisplay.c (create_text_block):
- * floatfns.c (Flogb):
- * glyphs-msw.c (mswindows_initialize_image_instance_mask):
- * glyphs-msw.c (xpm_to_eimage):
- * buffer.h (POINT_MARKER_P):
- * syntax.c (scan_lists):
- * cmdloop.c (Fcommand_loop_1):
- * widget.c (Fwidget_apply):
- * regex.c (STREQ):
+ * toolbar.h (DEVICE_SUPPORTS_TOOLBARS_P):
+ * fns.c (plists_differ):
+ * elhash.c (HASH_CODE):
+ * elhash.c (KEYS_EQUAL_P):
+ * redisplay-output.c (redisplay_move_cursor):
+ * redisplay.c (create_text_block):
+ * floatfns.c (Flogb):
+ * glyphs-msw.c (mswindows_initialize_image_instance_mask):
+ * glyphs-msw.c (xpm_to_eimage):
+ * buffer.h (POINT_MARKER_P):
+ * syntax.c (scan_lists):
+ * cmdloop.c (Fcommand_loop_1):
+ * widget.c (Fwidget_apply):
+ * regex.c (STREQ):
Remove extra parens, esp. of the form ((expr))
* floatfns.c (Flogb): Make 64-bit clean.
* glyphs-widget.c (VALID_GUI_KEYWORDS): use NONCOPY keyword for
callbacks and other things that could recurse.
- (VALID_GUI_KEYWORDS):
+ (VALID_GUI_KEYWORDS):
* event-msw.c: fix cpp stuff for cygwin < b20.
1999-12-18 Martin Buchholz <martin@xemacs.org>
- * fns.c (mapcar1):
- (Fmapconcat):
- (Fmapcar):
- (Fmapvector):
+ * fns.c (mapcar1):
+ (Fmapconcat):
+ (Fmapcar):
+ (Fmapvector):
Docstring fixes. Make them consistent with the lispref and ANSI Lisp.
1999-12-17 Martin Buchholz <martin@xemacs.org>
* window.c:
* event-stream.c:
Remove last vestigial uses of GC_*
-
+
* fns.c (mapcar1): Fix ***THREE*** obscure crashes in one function!
- Two of those involve evil mapping functions that destructively
modify a list being mapped over.
1999-12-10 Shenghuo ZHU <zsh@cs.rochester.edu>
- * file-coding.c (add_coding_system_to_list_mapper):
+ * file-coding.c (add_coding_system_to_list_mapper):
- (coding-system-list) should list aliases correctly.
1999-12-07 Andy Piper <andy@xemacs.org>
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.
* events.c (Fcopy_event): Don't copy the lrecord_header.
- * lisp.h (DO_REALLOC):
+ * lisp.h (DO_REALLOC):
Optimize.
Remove redundant parens.
Remove generic hygienic macro comment.
1999-12-05 Martin Buchholz <martin@xemacs.org>
- * lstream.c (Lstream_adding):
+ * lstream.c (Lstream_adding):
- Never compare a size_t and a possibly negative number.
- Optimize.
1999-12-04 Martin Buchholz <martin@xemacs.org>
- * lstream.c: (filedesc_reader):
+ * 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:
+ * systty.h:
* sysdep.h:
* sysdep.c:
- Replace macro calls to EMACS_GET_TTY and EMACS_SET_TTY with
(menu_move_right): Ditto.
* lrecord.h (copy_lcrecord):
- (zero_lcrecord):
+ (zero_lcrecord):
Always add parentheses around uses of macro arguments.
* sysdll.c: #include <stdlib.h> for exit().
* 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.
+ 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.
1999-11-26 Martin Buchholz <martin@xemacs.org>
- * device-x.c (x_init_device):
+ * 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):
+ * 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.
* 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
* 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):
+ * 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):
+ * editfns.c (Fuser_login_name):
(user_login_name):
Use proper type uid_t.
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):
+ * 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):
+ * 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.
* sound.c: support HAVE_ESD_SOUND
- * miscplay.c:
- * miscplay.h:
+ * miscplay.c:
+ * miscplay.h:
* linuxplay.c: Move large part of linuxplay to generalized file
miscplay. Make it platform independent.
1999-10-24 Jan Vroonhof <vroonhof@math.ethz.ch>
- * unexelf.c: Merge Martin's c++ fixes back in
+ * unexelf.c: Merge Martin's c++ fixes back in
1999-10-20 Jan Vroonhof <vroonhof@math.ethz.ch>
* 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.
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):
+ * 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!
* cmdloop.c (num_input_keys):
* print.c (debug_temp):
* emacs.c (Vinfo_directory):
- Delete unused variables
+ Delete unused variables
* console-x.h (x_interline_space): Mark as unimplemented.
* redisplay-x.c (x_interline_space): Mark as unimplemented.
* 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.
* console.h (struct console_methods): new console methods for
outputting pixmaps and strings.
-1999-08-23 Didier Verna <verna@inf.enst.fr>
+1999-08-23 Didier Verna <didier@xemacs.org>
* sound.c: revert the renaming of `bell_volume' to `Vbell_volume'
and `bell_inhibit_time' to `Vbell_inhibit_time'.
* s/linux.h: gcc-2.8 changes for powerpc
From Justin Vallon <vallon@mindspring.com>
-1999-07-05 Didier Verna <verna@inf.enst.fr>
+1999-07-05 Didier Verna <didier@xemacs.org>
* indent.c: new symbol Qcoerce.
(Fmove_to_column): use it + doc string update.
* bytecode.c (Ffetch_bytecode): Fix crash when loading lazy-loaded
bytecode.
-1998-12-02 Didier Verna <verna@inf.enst.fr>
+1998-12-02 Didier Verna <didier@xemacs.org>
* menubar-x.c (menu_item_descriptor_to_widget_value_1): set the
accelerator field to nil for labels.
Escape occurrences of '&' and support occurrences of the
'%_' accelerator indicator in menus.
-1998-11-26 Didier Verna <verna@inf.enst.fr>
+1998-11-26 Didier Verna <didier@xemacs.org>
* dired.c (Fdirectory_files): use make_string instead of
make_ext_string on the filename. The conversion external->internal
* chartab.c (canonicalize_char_table_value): Coerce ints to chars
for tables of type `char'.
-1998-11-26 Didier Verna <verna@inf.enst.fr>
+1998-11-26 Didier Verna <didier@xemacs.org>
* input-method-xlib.c (Initialize_Locale): don't call
XtSetLanguageProc. We've done the whole work here.
* input-method-xfs.c (Initialize_Locale): ditto.
* input-method-motif.c (Initialize_Locale): ditto.
-1998-11-26 Didier Verna <verna@inf.enst.fr>
+1998-11-26 Didier Verna <didier@xemacs.org>
* process-unix.c (unix_create_process): handle properly
Vfile_name_coding_system for converting the program and directory
* fns.c (Fremrassq, remrassq_no_quit):
A XCAR that should have been an XCDR turned Fremrassq into Fremassq
-1998-07-17 Didier Verna <verna@inf.enst.fr>
+1998-07-17 Didier Verna <didier@xemacs.org>
* redisplay-x.c (x_get_gc): returns a GC with a FillStipple fill
style as foreground GC for faces that have the `dim' property.
divider face using Vvertical_divider_face background.
Fix drawing spacing gaps around the divider.
-1998-05-14 Didier Verna <verna@inf.enst.fr>
+1998-05-14 Didier Verna <didier@xemacs.org>
* redisplay-x.c (x_output_vertical_divider): removed hard-wired
values for the vertical divider line width and spacing. Use the
* redisplay-msw.c (mswindows_output_vertical_divider): Syntax fix.
-1998-05-12 Didier Verna <verna@inf.enst.fr>
+1998-05-12 Didier Verna <didier@xemacs.org>
* redisplay-x.c (x_output_vertical_divider): draw shadows around
the divider line. The shadow thickness is currently
hard-wired. This will probably be turned into a specifier soon.
-1998-05-12 Didier Verna <verna@inf.enst.fr>
+1998-05-12 Didier Verna <didier@xemacs.org>
* console.h (struct console_methods): the divider_width console
method now requires a struct window * argument.
hand-crafted regexps.
- Use standard coding conventions for modules/Makefile.in
-1998-05-12 Didier Verna <verna@inf.enst.fr>
+1998-05-12 Didier Verna <didier@xemacs.org>
* redisplay.c: removed the scrolling modeline code that didn't
make it for 21.0. To be continued ...
#include "extw-Xt.h"
#ifdef TOOLTALK
-#include TT_C_H_PATH
+#include TT_C_H_FILE
#endif
/* This is the client widget, used to communicate with an ExternalShell
PROGNAME=@PROGNAME@
-all: ${PROGNAME}
+#define NOT_C_CODE
+#include "config.h"
+
+#ifdef PDUMP
+DUMP_TARGET = ${PROGNAME}.dmp
+EXE_TARGET = ${PROGNAME}
+ID_FILE = dump-id.c
+#else
+DUMP_TARGET = ${PROGNAME}
+EXE_TARGET = temacs
+ID_FILE =
+#endif
+
+all: ${DUMP_TARGET}
.PHONY : all release dump-elc dump-elcs all-elc all-elcs lint
## For performance and consistency, no built-in rules.
lib_gcc=@lib_gcc@
##libmcheck=@libmcheck@
-#define NOT_C_CODE
-#include "config.h"
## With the traditional VPATH setting, it is not possible to
## simultaneously compile in-place and in another directory. The
vpath paths.h
vpath Emacs.ad.h
vpath sheap-adjust.h
+vpath dump-id.c
#else
VPATH=@srcdir@
#endif
RM = rm -f
-#ifdef HAVE_NATIVE_SOUND
-sound_cflags=@sound_cflags@
-#endif
-
LWLIB_SRCDIR = ${srcdir}/../lwlib
#ifdef HAVE_X_WINDOWS
X11_libs = $(LIBI18N)
#endif /* HAVE_X_WINDOWS */
-#ifdef HEAP_IN_DATA
+#if defined (HEAP_IN_DATA) && !defined(PDUMP)
sheap_obj=sheap.o
#endif
mo_file = ${mo_dir}emacs.mo
#endif
-#ifdef WINDOWSNT
-LOADPATH = EMACSBOOTSTRAPLOADPATH="${lispdir};${blddir}"
-MODULEPATH = EMACSBOOTSTRAPMODULEPATH="${moduledir};${blddir}"
-#else
-LOADPATH = EMACSBOOTSTRAPLOADPATH="${lispdir}:${blddir}"
-MODULEPATH = EMACSBOOTSTRAPMODULEPATH="${moduledir}:${blddir}"
-#endif
-DUMPENV = $(LOADPATH) $(MODULEPATH)
-temacs_loadup = $(DUMPENV) ./temacs -batch -l ${srcdir}/../lisp/loadup.el
+temacs_loadup = ./${EXE_TARGET} -nd -batch -l ${srcdir}/../lisp/loadup.el
dump_temacs = ${temacs_loadup} dump
run_temacs = ${temacs_loadup} run-temacs
-debug_temacs = $(DUMPENV) gdb temacs
+debug_temacs = gdb ${EXE_TARGET}
-release: temacs ${libsrc}DOC $(mo_file) ${other_files}
+release: ${EXE_TARGET} ${libsrc}DOC $(mo_file) ${other_files}
#ifdef CANNOT_DUMP
- ln temacs ${PROGNAME}
+ ln ${EXE_TARGET} ${PROGNAME}
#else
-#ifdef HAVE_SHM
- -if [ -w ${srcdir}/../lisp ]; then \
- w=`pwd`; cd ${srcdir} && $${w}/temacs -nl -batch -l ${srcdir}/../lisp/inc-vers; \
- else true; fi
- -$(DUMPENV) ./temacs -nl -batch -l ${srcdir}/../lisp/loadup.el dump
-#else /* ! defined (HAVE_SHM) */
-if [ -w ${srcdir}/../lisp ]; then \
- w=`pwd`; cd ${srcdir} && $${w}/temacs -batch -l ${srcdir}/../lisp/inc-vers; \
+ w=`pwd`; cd ${srcdir} && $${w}/${EXE_TARGET} -nd -batch -l ${srcdir}/../lisp/inc-vers; \
else true; fi
- -$(DUMPENV) ./temacs -batch -l ${srcdir}/../lisp/loadup.el dump
-#endif /* ! defined (HAVE_SHM) */
+ -./${EXE_TARGET} -nd -batch -l ${srcdir}/../lisp/loadup.el dump
touch release
#endif /* ! defined (CANNOT_DUMP) */
-${PROGNAME}: temacs ${libsrc}DOC $(mo_file) ${other_files} update-elc.stamp
+${DUMP_TARGET}: ${EXE_TARGET} ${libsrc}DOC $(mo_file) ${other_files} update-elc.stamp
#ifdef HEAP_IN_DATA
- @$(RM) $@ $@.exe && touch SATISFIED
+ @$(RM) $@ && touch SATISFIED
-${dump_temacs}
@if test -f $@; then if test -f SATISFIED; then \
echo "Testing for Lisp shadows ..."; \
if test -f SATISFIED; then $(RM) SATISFIED; exit 1; fi; \
$(RECURSIVE_MAKE) $@;
#else
- @$(RM) $@ xemacs.dmp
+ @$(RM) $@
${dump_temacs}
-#ifdef PDUMP
- @mv temacs $@
-#endif
@echo "Testing for Lisp shadows ..."
@./${PROGNAME} -batch -vanilla -f list-load-path-shadows
#endif
-fastdump: temacs
- @$(RM) ${PROGNAME} && touch SATISFIED
+fastdump: ${EXE_TARGET}
+ @$(RM) ${DUMP_TARGET} && touch SATISFIED
-${dump_temacs}
@./${PROGNAME} -batch -vanilla -f list-load-path-shadows
FRC.update-elc.stamp :
-update-elc.stamp : temacs FRC.update-elc.stamp
+update-elc.stamp : ${EXE_TARGET} FRC.update-elc.stamp
@touch NOBYTECOMPILE
- ${DUMPENV} ./temacs -batch -l ${srcdir}/../lisp/update-elc.el
+ ./${EXE_TARGET} -nd -batch -l ${srcdir}/../lisp/update-elc.el
@if test ! -f $@ -o -f NOBYTECOMPILE; then touch $@; fi; \
$(RM) NOBYTECOMPILE
cd ../dynodump && $(RECURSIVE_MAKE)
#endif /* DYNODUMP */
-${libsrc}DOC: temacs update-elc.stamp
+${libsrc}DOC: ${EXE_TARGET} update-elc.stamp
$(RM) ${libsrc}DOC; \
- ${DUMPENV} ./temacs -batch -l ${srcdir}/../lisp/make-docfile.el -- \
+ ${DUMPENV} ./${EXE_TARGET} -nd -batch -l ${srcdir}/../lisp/make-docfile.el -- \
-o ${libsrc}DOC -d ${srcdir} -i ${libsrc}../site-packages \
${obj_src} ${mallocdocsrc} ${rallocdocsrc}
dump_elcs: dump-elcs
-dump-elcs: temacs
- -${DUMPENV} ./temacs -batch -l ${srcdir}/../lisp/update-elc.el
+dump-elcs: ${EXE_TARGET}
+ -${DUMPENV} ./${EXE_TARGET} -nd -batch -l ${srcdir}/../lisp/update-elc.el
all-elc all-elcs:
cd .. && $(RECURSIVE_MAKE) all-elc
#endif /* I18N3 */
+${libsrc}make-dump-id:
+ cd ${libsrc} && $(RECURSIVE_MAKE) make-dump-id
+
${libsrc}make-docfile:
cd ${libsrc} && $(RECURSIVE_MAKE) make-docfile
$(LINT.c) $(LINTFILES)
## end of Lint Section
-temacs_deps=\
+link_deps=\
$(start_files) ${objs} ${otherobjs}\
$(lwlib_deps) $(dynodump_deps)
+temacs_deps=\
+ $(link_deps) $(ID_FILE)
+
temacs_link_args=\
- ${start_flags} ${ldflags}\
- -o $@ ${start_files} ${objs} ${otherobjs} ${LIBES}
+ ${start_flags} ${ldflags} -I${srcdir} \
+ -o $@ ${start_files} ${objs} ${otherobjs} ${ID_FILE} ${LIBES}
-temacs: $(temacs_deps)
+${EXE_TARGET}: $(temacs_deps)
$(LD) $(temacs_link_args)
-#ifdef PDUMP
- @$(RM) xemacs.dmp
-#endif
+
+dump-id.c: ${libsrc}make-dump-id ${link_deps}
+ ${libsrc}make-dump-id
.PHONY : run-temacs
-run-temacs: temacs
+run-temacs: ${EXE_TARGET}
-${run_temacs}
## We have automated tests!!
rtc_patch_area -o $@
rtcmacs: $(temacs_deps) rtc_patch.o
- $(RM) temacs; $(RECURSIVE_MAKE) temacs RTC_patch_objs=rtc_patch.o
- mv temacs rtcmacs
+ $(RM) ${EXE_TARGET}; $(RECURSIVE_MAKE) ${EXE_TARGET} RTC_patch_objs=rtc_patch.o
+ mv ${EXE_TARGET} rtcmacs
.PHONY: run-rtcmacs
run-rtcmacs: rtcmacs
runargs -batch -l ${srcdir}/../lisp/loadup.el run-temacs -q; \
run' rtcmacs
-debug-temacs: temacs
+debug-temacs: ${EXE_TARGET}
-${debug_temacs}
## Purify, Quantify, PureCoverage are software quality products from
PURIFY_LIBS = -lpthread
puremacs: $(temacs_deps)
$(PURIFY_PROG) $(PURIFY_FLAGS) $(LD) $(temacs_link_args) $(PURIFY_LIBS)
- cp $@ temacs
+ cp $@ ${EXE_TARGET}
## Quantify
#ifdef QUANTIFY
quantmacs: $(temacs_deps)
$(QUANTIFY_PROG) $(QUANTIFY_FLAGS) $(LD) $(temacs_link_args)
- cp $@ temacs
+ cp $@ ${EXE_TARGET}
#endif /* QUANTIFY */
#endif /* ! defined (C_ALLOCA) */
#ifdef HAVE_NATIVE_SOUND
+sound_cflags=@sound_cflags@
sunplay.o: ${srcdir}/sunplay.c
$(CC) -c $(sound_cflags) $(cflags) ${srcdir}/sunplay.c
hpplay.o: ${srcdir}/hpplay.c
2. Storage classes:
- -- All occurrences of `const' should get replaced by CONST. This
- is to work around a header conflict with X11R4.
-
-- All occurrences of `register' should be replaced by `REGISTER'.
It interferes with backtraces so we disable it if DEBUG_XEMACS
is defined.
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. Portable dumper.
+ og: Killed the purespace. Portable dumper (moved to dumper.c)
*/
#include <config.h>
#include "lisp.h"
+#include "alloc.h"
#include "backtrace.h"
#include "buffer.h"
#include "bytecode.h"
#include "redisplay.h"
#include "specifier.h"
#include "sysfile.h"
+#include "sysdep.h"
#include "window.h"
#include "console-stream.h"
#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;
+#include "dumper.h"
#endif
EXFUN (Fgarbage_collect, 0);
-/* Return the true size of a struct with a variable-length array field. */
-#define STRETCHY_STRUCT_SIZEOF(stretchy_struct_type, \
- stretchy_array_field, \
- stretchy_array_length) \
- (offsetof (stretchy_struct_type, stretchy_array_field) + \
- (offsetof (stretchy_struct_type, stretchy_array_field[1]) - \
- offsetof (stretchy_struct_type, stretchy_array_field[0])) * \
- (stretchy_array_length))
-
#if 0 /* this is _way_ too slow to be part of the standard debug options */
#if defined(DEBUG_XEMACS) && defined(MULE)
#define VERIFY_STRING_CHARS_INTEGRITY
/* "Garbage collecting" */
Lisp_Object Vgc_message;
Lisp_Object Vgc_pointer_glyph;
-static CONST char gc_default_message[] = "Garbage collecting";
+static const char gc_default_message[] = "Garbage collecting";
Lisp_Object Qgarbage_collecting;
#ifndef VIRT_ADDR_VARIES
/* malloc calls this if it finds we are near exhausting storage */
void
-malloc_warning (CONST char *str)
+malloc_warning (const char *str)
{
if (ignore_malloc_warnings)
return;
#undef xstrdup
char *
-xstrdup (CONST char *str)
+xstrdup (const char *str)
{
int len = strlen (str) + 1; /* for stupid terminating 0 */
#ifdef NEED_STRDUP
char *
-strdup (CONST char *s)
+strdup (const char *s)
{
return xstrdup (s);
}
}
-/* lrecords are chained together through their "next.v" field.
- * After doing the mark phase, the GC will walk this linked
- * list and free any record which hasn't been marked.
- */
+/* lcrecords are chained together through their "next" field.
+ After doing the mark phase, GC will walk this linked list
+ and free any lcrecord which hasn't been marked. */
static struct lcrecord_header *all_lcrecords;
void *
-alloc_lcrecord (size_t size, CONST struct lrecord_implementation *implementation)
+alloc_lcrecord (size_t size, const struct lrecord_implementation *implementation)
{
struct lcrecord_header *lcheader;
-#ifdef ERROR_CHECK_GC
- if (implementation->static_size == 0)
- assert (implementation->size_in_bytes_method);
- else
- assert (implementation->static_size == size);
-#endif
+ type_checking_assert
+ ((implementation->static_size == 0 ?
+ implementation->size_in_bytes_method != NULL :
+ implementation->static_size == size)
+ &&
+ (! implementation->basic_p)
+ &&
+ (! (implementation->hash == NULL && implementation->equal != NULL)));
lcheader = (struct lcrecord_header *) allocate_lisp_storage (size);
- set_lheader_implementation (&(lcheader->lheader), implementation);
+ set_lheader_implementation (&lcheader->lheader, implementation);
lcheader->next = all_lcrecords;
#if 1 /* mly prefers to see small ID numbers */
lcheader->uid = lrecord_uid_counter++;
for (header = all_lcrecords; header; header = header->next)
{
- if (LHEADER_IMPLEMENTATION(&header->lheader)->finalizer &&
+ if (LHEADER_IMPLEMENTATION (&header->lheader)->finalizer &&
!header->free)
- ((LHEADER_IMPLEMENTATION(&header->lheader)->finalizer)
- (header, 1));
+ LHEADER_IMPLEMENTATION (&header->lheader)->finalizer (header, 1);
}
}
-/* 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)
-{
- abort ();
- return Qnil;
-}
-
\f
/************************************************************************/
/* Debugger support */
unsigned char dbg_USE_UNION_TYPE = 0;
#endif
-unsigned char Lisp_Type_Int = 100;
-unsigned char Lisp_Type_Cons = 101;
-unsigned char Lisp_Type_String = 102;
-unsigned char Lisp_Type_Vector = 103;
-unsigned char Lisp_Type_Symbol = 104;
-
-#ifndef MULE
-unsigned char lrecord_char_table_entry;
-unsigned char lrecord_charset;
-#ifndef FILE_CODING
-unsigned char lrecord_coding_system;
-#endif
-#endif
-
-#if !((defined HAVE_X_WINDOWS) && \
- (defined (HAVE_MENUBARS) || \
- defined (HAVE_SCROLLBARS) || \
- defined (HAVE_DIALOGS) || \
- defined (HAVE_TOOLBARS) || \
- defined (HAVE_WIDGETS)))
-unsigned char lrecord_popup_data;
-#endif
-
-#ifndef HAVE_TOOLBARS
-unsigned char lrecord_toolbar_button;
-#endif
-
-#ifndef TOOLTALK
-unsigned char lrecord_tooltalk_message;
-unsigned char lrecord_tooltalk_pattern;
-#endif
-
-#ifndef HAVE_DATABASE
-unsigned char lrecord_database;
-#endif
-
unsigned char dbg_valbits = VALBITS;
unsigned char dbg_gctypebits = GCTYPEBITS;
This is called when a relocatable block is freed in ralloc.c. */
void refill_memory_reserve (void);
void
-refill_memory_reserve ()
+refill_memory_reserve (void)
{
if (breathing_space == 0)
breathing_space = (char *) malloc (4096 - MALLOC_OVERHEAD);
You have some weird system and need to supply a reasonable value here.
#endif
+/* The construct (* (void **) (ptr)) would cause aliasing problems
+ with modern optimizing compilers like `gcc -O3 -fstrict-aliasing'.
+ But `char *' can legally alias any pointer. Hence this union trick. */
+typedef union { char c; void *p; } *aliasing_voidpp;
+#define ALIASING_VOIDPP_DEREFERENCE(ptr) \
+ (((aliasing_voidpp) (ptr))->p)
#define FREE_STRUCT_P(ptr) \
- (* (void **) ptr == (void *) INVALID_POINTER_VALUE)
+ (ALIASING_VOIDPP_DEREFERENCE (ptr) == (void *) INVALID_POINTER_VALUE)
#define MARK_STRUCT_AS_FREE(ptr) \
- (* (void **) ptr = (void *) INVALID_POINTER_VALUE)
+ (ALIASING_VOIDPP_DEREFERENCE (ptr) = (void *) INVALID_POINTER_VALUE)
#define MARK_STRUCT_AS_NOT_FREE(ptr) \
- (* (void **) ptr = 0)
+ (ALIASING_VOIDPP_DEREFERENCE (ptr) = 0)
#ifdef ERROR_CHECK_GC
static int
cons_equal (Lisp_Object ob1, Lisp_Object ob2, int depth)
{
- while (internal_equal (XCAR (ob1), XCAR (ob2), depth + 1))
+ depth++;
+ while (internal_equal (XCAR (ob1), XCAR (ob2), depth))
{
ob1 = XCDR (ob1);
ob2 = XCDR (ob2);
if (! CONSP (ob1) || ! CONSP (ob2))
- return internal_equal (ob1, ob2, depth + 1);
+ return internal_equal (ob1, ob2, depth);
}
return 0;
}
Lisp_Cons *c;
ALLOCATE_FIXED_TYPE (cons, Lisp_Cons, c);
- set_lheader_implementation (&(c->lheader), &lrecord_cons);
+ set_lheader_implementation (&c->lheader, &lrecord_cons);
XSETCONS (val, c);
c->car = car;
c->cdr = cdr;
Lisp_Cons *c;
NOSEEUM_ALLOCATE_FIXED_TYPE (cons, Lisp_Cons, c);
- set_lheader_implementation (&(c->lheader), &lrecord_cons);
+ set_lheader_implementation (&c->lheader, &lrecord_cons);
XSETCONS (val, c);
XCAR (val) = car;
XCDR (val) = cdr;
if (sizeof (struct lrecord_header) + sizeof (double) != sizeof (*f))
xzero (*f);
- set_lheader_implementation (&(f->lheader), &lrecord_float);
+ set_lheader_implementation (&f->lheader, &lrecord_float);
float_data (f) = float_value;
XSETFLOAT (val, f);
return val;
}
static size_t
-size_vector (CONST void *lheader)
+size_vector (const void *lheader)
{
- return STRETCHY_STRUCT_SIZEOF (Lisp_Vector, contents,
- ((Lisp_Vector *) lheader)->size);
+ return FLEXIBLE_ARRAY_STRUCT_SIZEOF (Lisp_Vector, contents,
+ ((Lisp_Vector *) lheader)->size);
}
static int
return 1;
}
+static hashcode_t
+vector_hash (Lisp_Object obj, int depth)
+{
+ return HASH2 (XVECTOR_LENGTH (obj),
+ internal_array_hash (XVECTOR_DATA (obj),
+ XVECTOR_LENGTH (obj),
+ depth + 1));
+}
+
static const struct lrecord_description vector_description[] = {
{ XD_LONG, offsetof (Lisp_Vector, size) },
{ XD_LISP_OBJECT_ARRAY, offsetof (Lisp_Vector, contents), XD_INDIRECT(0, 0) },
DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION("vector", vector,
mark_vector, print_vector, 0,
vector_equal,
- /*
- * No `hash' method needed for
- * vectors. internal_hash
- * knows how to handle vectors.
- */
- 0,
+ vector_hash,
vector_description,
size_vector, Lisp_Vector);
make_vector_internal (size_t sizei)
{
/* no vector_next */
- size_t sizem = STRETCHY_STRUCT_SIZEOF (Lisp_Vector, contents, sizei);
+ size_t sizem = FLEXIBLE_ARRAY_STRUCT_SIZEOF (Lisp_Vector, contents, sizei);
Lisp_Vector *p = (Lisp_Vector *) alloc_lcrecord (sizem, &lrecord_vector);
p->size = sizei;
make_bit_vector_internal (size_t sizei)
{
size_t num_longs = BIT_VECTOR_LONG_STORAGE (sizei);
- size_t sizem = STRETCHY_STRUCT_SIZEOF (Lisp_Bit_Vector, bits, num_longs);
+ size_t sizem = FLEXIBLE_ARRAY_STRUCT_SIZEOF (Lisp_Bit_Vector, bits, num_longs);
Lisp_Bit_Vector *p = (Lisp_Bit_Vector *) allocate_lisp_storage (sizem);
- set_lheader_implementation (&(p->lheader), &lrecord_bit_vector);
+ set_lheader_implementation (&p->lheader, &lrecord_bit_vector);
INCREMENT_CONS_COUNTER (sizem, "bit-vector");
Lisp_Object fun;
ALLOCATE_FIXED_TYPE (compiled_function, Lisp_Compiled_Function, f);
- set_lheader_implementation (&(f->lheader), &lrecord_compiled_function);
+ set_lheader_implementation (&f->lheader, &lrecord_compiled_function);
f->stack_depth = 0;
f->specpdl_depth = 0;
f->constants = constants;
CHECK_NATNUM (stack_depth);
- f->stack_depth = XINT (stack_depth);
+ f->stack_depth = (unsigned short) XINT (stack_depth);
#ifdef COMPILED_FUNCTION_ANNOTATION_HACK
if (!NILP (Vcurrent_compiled_function_annotation))
CHECK_STRING (name);
ALLOCATE_FIXED_TYPE (symbol, Lisp_Symbol, p);
- set_lheader_implementation (&(p->lheader), &lrecord_symbol);
+ set_lheader_implementation (&p->lheader, &lrecord_symbol);
p->name = XSTRING (name);
p->plist = Qnil;
p->value = Qunbound;
struct extent *e;
ALLOCATE_FIXED_TYPE (extent, struct extent, e);
- set_lheader_implementation (&(e->lheader), &lrecord_extent);
+ set_lheader_implementation (&e->lheader, &lrecord_extent);
extent_object (e) = Qnil;
set_extent_start (e, -1);
set_extent_end (e, -1);
Lisp_Event *e;
ALLOCATE_FIXED_TYPE (event, Lisp_Event, e);
- set_lheader_implementation (&(e->lheader), &lrecord_event);
+ set_lheader_implementation (&e->lheader, &lrecord_event);
XSETEVENT (val, e);
return val;
Lisp_Marker *p;
ALLOCATE_FIXED_TYPE (marker, Lisp_Marker, p);
- set_lheader_implementation (&(p->lheader), &lrecord_marker);
+ set_lheader_implementation (&p->lheader, &lrecord_marker);
p->buffer = 0;
p->memind = 0;
marker_next (p) = 0;
Lisp_Marker *p;
NOSEEUM_ALLOCATE_FIXED_TYPE (marker, Lisp_Marker, p);
- set_lheader_implementation (&(p->lheader), &lrecord_marker);
+ set_lheader_implementation (&p->lheader, &lrecord_marker);
p->buffer = 0;
p->memind = 0;
marker_next (p) = 0;
{ XD_END }
};
-DEFINE_BASIC_LRECORD_IMPLEMENTATION ("string", string,
- mark_string, print_string,
- /*
- * No `finalize', or `hash' methods.
- * internal_hash already knows how
- * to hash strings and finalization
- * is done with the
- * ADDITIONAL_FREE_string macro,
- * which is the standard way to do
- * finalization when using
- * SWEEP_FIXED_TYPE_BLOCK().
- */
- 0, string_equal, 0,
- string_description,
- Lisp_String);
+/* We store the string's extent info as the first element of the string's
+ property list; and the string's MODIFF as the first or second element
+ of the string's property list (depending on whether the extent info
+ is present), but only if the string has been modified. This is ugly
+ but it reduces the memory allocated for the string in the vast
+ majority of cases, where the string is never modified and has no
+ extent info.
+
+ #### This means you can't use an int as a key in a string's plist. */
+
+static Lisp_Object *
+string_plist_ptr (Lisp_Object string)
+{
+ Lisp_Object *ptr = &XSTRING (string)->plist;
+
+ if (CONSP (*ptr) && EXTENT_INFOP (XCAR (*ptr)))
+ ptr = &XCDR (*ptr);
+ if (CONSP (*ptr) && INTP (XCAR (*ptr)))
+ ptr = &XCDR (*ptr);
+ return ptr;
+}
+
+static Lisp_Object
+string_getprop (Lisp_Object string, Lisp_Object property)
+{
+ return external_plist_get (string_plist_ptr (string), property, 0, ERROR_ME);
+}
+
+static int
+string_putprop (Lisp_Object string, Lisp_Object property, Lisp_Object value)
+{
+ external_plist_put (string_plist_ptr (string), property, value, 0, ERROR_ME);
+ return 1;
+}
+
+static int
+string_remprop (Lisp_Object string, Lisp_Object property)
+{
+ return external_remprop (string_plist_ptr (string), property, 0, ERROR_ME);
+}
+
+static Lisp_Object
+string_plist (Lisp_Object string)
+{
+ return *string_plist_ptr (string);
+}
+
+/* No `finalize', or `hash' methods.
+ internal_hash() already knows how to hash strings and finalization
+ is done with the ADDITIONAL_FREE_string macro, which is the
+ standard way to do finalization when using
+ SWEEP_FIXED_TYPE_BLOCK(). */
+DEFINE_BASIC_LRECORD_IMPLEMENTATION_WITH_PROPS ("string", string,
+ mark_string, print_string,
+ 0, string_equal, 0,
+ string_description,
+ string_getprop,
+ string_putprop,
+ string_remprop,
+ string_plist,
+ Lisp_String);
/* String blocks contain this many useful bytes. */
#define STRING_CHARS_BLOCK_SIZE \
/* Allocate the string header */
ALLOCATE_FIXED_TYPE (string, Lisp_String, s);
- set_lheader_implementation (&(s->lheader), &lrecord_string);
+ set_lheader_implementation (&s->lheader, &lrecord_string);
set_string_data (s, BIG_STRING_FULLSIZE_P (fullsize)
? xnew_array (Bufbyte, length + 1)
/* Take some raw memory, which MUST already be in internal format,
and package it up into a Lisp string. */
Lisp_Object
-make_string (CONST Bufbyte *contents, Bytecount length)
+make_string (const Bufbyte *contents, Bytecount length)
{
Lisp_Object val;
/* Take some raw memory, encoded in some external data format,
and convert it into a Lisp string. */
Lisp_Object
-make_ext_string (CONST Extbyte *contents, EMACS_INT length,
+make_ext_string (const Extbyte *contents, EMACS_INT length,
Lisp_Object coding_system)
{
Lisp_Object string;
}
Lisp_Object
-build_string (CONST char *str)
+build_string (const char *str)
{
/* Some strlen's crash and burn if passed null. */
- return make_string ((CONST Bufbyte *) str, (str ? strlen(str) : 0));
+ return make_string ((const Bufbyte *) str, (str ? strlen(str) : 0));
}
Lisp_Object
-build_ext_string (CONST char *str, Lisp_Object coding_system)
+build_ext_string (const char *str, Lisp_Object coding_system)
{
/* Some strlen's crash and burn if passed null. */
- return make_ext_string ((CONST Extbyte *) str, (str ? strlen(str) : 0),
+ return make_ext_string ((const Extbyte *) str, (str ? strlen(str) : 0),
coding_system);
}
Lisp_Object
-build_translated_string (CONST char *str)
+build_translated_string (const char *str)
{
return build_string (GETTEXT (str));
}
Lisp_Object
-make_string_nocopy (CONST Bufbyte *contents, Bytecount length)
+make_string_nocopy (const Bufbyte *contents, Bytecount length)
{
Lisp_String *s;
Lisp_Object val;
/* Allocate the string header */
ALLOCATE_FIXED_TYPE (string, Lisp_String, s);
- set_lheader_implementation (&(s->lheader), &lrecord_string);
+ set_lheader_implementation (&s->lheader, &lrecord_string);
SET_C_READONLY_RECORD_HEADER (&s->lheader);
s->plist = Qnil;
set_string_data (s, (Bufbyte *)contents);
struct free_lcrecord_header *free_header =
(struct free_lcrecord_header *) lheader;
-#ifdef ERROR_CHECK_GC
- CONST struct lrecord_implementation *implementation
- = LHEADER_IMPLEMENTATION(lheader);
-
- /* There should be no other pointers to the free list. */
- assert (!MARKED_RECORD_HEADER_P (lheader));
- /* Only lcrecords should be here. */
- assert (!implementation->basic_p);
- /* Only free lcrecords should be here. */
- assert (free_header->lcheader.free);
- /* The type of the lcrecord must be right. */
- assert (implementation == list->implementation);
- /* So must the size. */
- assert (implementation->static_size == 0
- || implementation->static_size == list->size);
-#endif /* ERROR_CHECK_GC */
+ gc_checking_assert
+ (/* There should be no other pointers to the free list. */
+ ! MARKED_RECORD_HEADER_P (lheader)
+ &&
+ /* Only lcrecords should be here. */
+ ! LHEADER_IMPLEMENTATION (lheader)->basic_p
+ &&
+ /* Only free lcrecords should be here. */
+ free_header->lcheader.free
+ &&
+ /* The type of the lcrecord must be right. */
+ LHEADER_IMPLEMENTATION (lheader) == list->implementation
+ &&
+ /* So must the size. */
+ (LHEADER_IMPLEMENTATION (lheader)->static_size == 0 ||
+ LHEADER_IMPLEMENTATION (lheader)->static_size == list->size)
+ );
MARK_RECORD_HEADER (lheader);
chain = free_header->chain;
0, 0, 0, 0, struct lcrecord_list);
Lisp_Object
make_lcrecord_list (size_t size,
- CONST struct lrecord_implementation *implementation)
+ const struct lrecord_implementation *implementation)
{
struct lcrecord_list *p = alloc_lcrecord_type (struct lcrecord_list,
&lrecord_lcrecord_list);
(struct free_lcrecord_header *) XPNTR (val);
#ifdef ERROR_CHECK_GC
- struct lrecord_header *lheader =
- (struct lrecord_header *) free_header;
- CONST struct lrecord_implementation *implementation
- = LHEADER_IMPLEMENTATION (lheader);
+ struct lrecord_header *lheader = &free_header->lcheader.lheader;
/* There should be no other pointers to the free list. */
- assert (!MARKED_RECORD_HEADER_P (lheader));
+ assert (! MARKED_RECORD_HEADER_P (lheader));
/* Only lcrecords should be here. */
- assert (!implementation->basic_p);
+ assert (! LHEADER_IMPLEMENTATION (lheader)->basic_p);
/* Only free lcrecords should be here. */
assert (free_header->lcheader.free);
/* The type of the lcrecord must be right. */
- assert (implementation == list->implementation);
+ assert (LHEADER_IMPLEMENTATION (lheader) == list->implementation);
/* So must the size. */
- assert (implementation->static_size == 0
- || implementation->static_size == list->size);
+ assert (LHEADER_IMPLEMENTATION (lheader)->static_size == 0 ||
+ LHEADER_IMPLEMENTATION (lheader)->static_size == list->size);
#endif /* ERROR_CHECK_GC */
+
list->free = free_header->chain;
free_header->lcheader.free = 0;
return val;
struct lcrecord_list *list = XLCRECORD_LIST (lcrecord_list);
struct free_lcrecord_header *free_header =
(struct free_lcrecord_header *) XPNTR (lcrecord);
- struct lrecord_header *lheader =
- (struct lrecord_header *) free_header;
- CONST struct lrecord_implementation *implementation
+ struct lrecord_header *lheader = &free_header->lcheader.lheader;
+ const struct lrecord_implementation *implementation
= LHEADER_IMPLEMENTATION (lheader);
-#ifdef ERROR_CHECK_GC
/* Make sure the size is correct. This will catch, for example,
putting a window configuration on the wrong free list. */
- if (implementation->size_in_bytes_method)
- assert (implementation->size_in_bytes_method (lheader) == list->size);
- else
- assert (implementation->static_size == list->size);
-#endif /* ERROR_CHECK_GC */
+ gc_checking_assert ((implementation->size_in_bytes_method ?
+ implementation->size_in_bytes_method (lheader) :
+ implementation->static_size)
+ == list->size);
if (implementation->finalizer)
implementation->finalizer (lheader, 0);
return obj;
}
-
\f
/************************************************************************/
/* Garbage Collection */
/************************************************************************/
-/* This will be used more extensively In The Future */
-static int last_lrecord_type_index_assigned;
+/* All the built-in lisp object types are enumerated in `enum lrecord_type'.
+ Additional ones may be defined by a module (none yet). We leave some
+ room in `lrecord_implementations_table' for such new lisp object types. */
+#define MODULE_DEFINABLE_TYPE_COUNT 32
+const struct lrecord_implementation *lrecord_implementations_table[lrecord_type_count + MODULE_DEFINABLE_TYPE_COUNT];
-CONST struct lrecord_implementation *lrecord_implementations_table[128];
-#define max_lrecord_type (countof (lrecord_implementations_table) - 1)
+/* Object marker functions are in the lrecord_implementation structure.
+ But copying them to a parallel array is much more cache-friendly.
+ This hack speeds up (garbage-collect) by about 5%. */
+Lisp_Object (*lrecord_markers[countof (lrecord_implementations_table)]) (Lisp_Object);
struct gcpro *gcprolist;
#else
#define NSTATICS 2000
#endif
-/* Not "static" because of linker lossage on some systems */
-Lisp_Object *staticvec[NSTATICS]
- /* Force it into data space! */
- = {0};
-static int staticidx;
+
+/* Not "static" because used by dumper.c */
+Lisp_Object *staticvec[NSTATICS];
+int staticidx;
/* Put an entry in staticvec, pointing at the variable whose address is given
*/
void
staticpro (Lisp_Object *varaddress)
{
- if (staticidx >= countof (staticvec))
- /* #### This is now a dubious abort() since this routine may be called */
- /* by Lisp attempting to load a DLL. */
- abort ();
+ /* #### This is now a dubious assert() since this routine may be called */
+ /* by Lisp attempting to load a DLL. */
+ assert (staticidx < countof (staticvec));
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;
+
+Lisp_Object *staticvec_nodump[200];
+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 ();
+ /* #### This is now a dubious assert() since this routine may be called */
+ /* by Lisp attempting to load a DLL. */
+ assert (staticidx_nodump < countof (staticvec_nodump));
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;
+struct pdump_dumpstructinfo dumpstructvec[200];
+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 ();
+ assert (dumpstructidx < countof (dumpstructvec));
dumpstructvec[dumpstructidx].data = varaddress;
dumpstructvec[dumpstructidx].desc = desc;
dumpstructidx++;
}
+struct pdump_dumpopaqueinfo dumpopaquevec[250];
+int dumpopaqueidx;
+
+/* Put an entry in dumpopaquevec, pointing at the variable whose address is given
+ */
+void
+dumpopaque (void *varaddress, size_t size)
+{
+ assert (dumpopaqueidx < countof (dumpopaquevec));
+
+ dumpopaquevec[dumpopaqueidx].data = varaddress;
+ dumpopaquevec[dumpopaqueidx].size = size;
+ dumpopaqueidx++;
+}
+
Lisp_Object *pdump_wirevec[50];
-static int pdump_wireidx;
+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 ();
+ assert (pdump_wireidx < countof (pdump_wirevec));
pdump_wirevec[pdump_wireidx++] = varaddress;
}
Lisp_Object *pdump_wirevec_list[50];
-static int pdump_wireidx_list;
+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 ();
+ assert (pdump_wireidx_list < countof (pdump_wirevec_list));
pdump_wirevec_list[pdump_wireidx_list++] = varaddress;
}
+#ifdef ERROR_CHECK_GC
+#define GC_CHECK_LHEADER_INVARIANTS(lheader) do { \
+ struct lrecord_header * GCLI_lh = (lheader); \
+ assert (GCLI_lh != 0); \
+ assert (GCLI_lh->type < lrecord_type_count); \
+ assert (! C_READONLY_RECORD_HEADER_P (GCLI_lh) || \
+ (MARKED_RECORD_HEADER_P (GCLI_lh) && \
+ LISP_READONLY_RECORD_HEADER_P (GCLI_lh))); \
+} while (0)
+#else
+#define GC_CHECK_LHEADER_INVARIANTS(lheader)
+#endif
+
\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. */
{
tail_recurse:
-#ifdef ERROR_CHECK_GC
- 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 (XTYPE (obj) == Lisp_Type_Record)
{
struct lrecord_header *lheader = XRECORD_LHEADER (obj);
-#if defined (ERROR_CHECK_GC)
- assert (lheader->type <= last_lrecord_type_index_assigned);
-#endif
- if (C_READONLY_RECORD_HEADER_P (lheader))
- return;
- if (! MARKED_RECORD_HEADER_P (lheader) &&
- ! UNMARKABLE_RECORD_HEADER_P (lheader))
+ GC_CHECK_LHEADER_INVARIANTS (lheader);
+
+ gc_checking_assert (LHEADER_IMPLEMENTATION (lheader)->basic_p ||
+ ! ((struct lcrecord_header *) lheader)->free);
+
+ /* All c_readonly objects have their mark bit set,
+ so that we only need to check the mark bit here. */
+ if (! MARKED_RECORD_HEADER_P (lheader))
{
- CONST struct lrecord_implementation *implementation =
- LHEADER_IMPLEMENTATION (lheader);
MARK_RECORD_HEADER (lheader);
-#ifdef ERROR_CHECK_GC
- if (!implementation->basic_p)
- assert (! ((struct lcrecord_header *) lheader)->free);
-#endif
- if (implementation->marker)
+
+ if (RECORD_MARKER (lheader))
{
- obj = implementation->marker (obj);
+ obj = RECORD_MARKER (lheader) (obj);
if (!NILP (obj)) goto tail_recurse;
}
}
/* static int gc_count_total_records_used, gc_count_records_total_size; */
\f
-int
-lrecord_type_index (CONST struct lrecord_implementation *implementation)
-{
- int type_index = *(implementation->lrecord_type_index);
- /* Have to do this circuitous validation test because of problems
- dumping out initialized variables (ie can't set xxx_type_index to -1
- because that would make xxx_type_index read-only in a dumped emacs. */
- if (type_index < 0 || type_index > max_lrecord_type
- || lrecord_implementations_table[type_index] != implementation)
- {
- assert (last_lrecord_type_index_assigned < max_lrecord_type);
- type_index = ++last_lrecord_type_index_assigned;
- lrecord_implementations_table[type_index] = implementation;
- *(implementation->lrecord_type_index) = type_index;
- }
- return type_index;
-}
-
/* stats on lcrecords in use - kinda kludgy */
static struct
} lcrecord_stats [countof (lrecord_implementations_table)];
static void
-tick_lcrecord_stats (CONST struct lrecord_header *h, int free_p)
+tick_lcrecord_stats (const struct lrecord_header *h, int free_p)
{
- CONST struct lrecord_implementation *implementation =
- LHEADER_IMPLEMENTATION (h);
- int type_index = lrecord_type_index (implementation);
+ unsigned int type_index = h->type;
if (((struct lcrecord_header *) h)->free)
{
- assert (!free_p);
+ gc_checking_assert (!free_p);
lcrecord_stats[type_index].instances_on_free_list++;
}
else
{
- size_t sz = (implementation->size_in_bytes_method
- ? implementation->size_in_bytes_method (h)
- : implementation->static_size);
+ const struct lrecord_implementation *implementation =
+ LHEADER_IMPLEMENTATION (h);
+ size_t sz = (implementation->size_in_bytes_method ?
+ implementation->size_in_bytes_method (h) :
+ implementation->static_size);
if (free_p)
{
lcrecord_stats[type_index].instances_freed++;
for (header = *prev; header; header = header->next)
{
struct lrecord_header *h = &(header->lheader);
- if (!C_READONLY_RECORD_HEADER_P(h)
- && !MARKED_RECORD_HEADER_P (h)
- && ! (header->free))
+
+ GC_CHECK_LHEADER_INVARIANTS (h);
+
+ if (! MARKED_RECORD_HEADER_P (h) && ! header->free)
{
if (LHEADER_IMPLEMENTATION (h)->finalizer)
LHEADER_IMPLEMENTATION (h)->finalizer (h, 0);
for (header = *prev; header; )
{
struct lrecord_header *h = &(header->lheader);
- if (C_READONLY_RECORD_HEADER_P(h) || MARKED_RECORD_HEADER_P (h))
+ if (MARKED_RECORD_HEADER_P (h))
{
- if (MARKED_RECORD_HEADER_P (h))
+ if (! C_READONLY_RECORD_HEADER_P (h))
UNMARK_RECORD_HEADER (h);
num_used++;
/* total_size += n->implementation->size_in_bytes (h);*/
{
Lisp_Bit_Vector *v = XBIT_VECTOR (bit_vector);
int len = v->size;
- if (C_READONLY_RECORD_HEADER_P(&(v->lheader)) || MARKED_RECORD_P (bit_vector))
+ if (MARKED_RECORD_P (bit_vector))
{
- if (MARKED_RECORD_P (bit_vector))
+ if (! C_READONLY_RECORD_HEADER_P(&(v->lheader)))
UNMARK_RECORD_HEADER (&(v->lheader));
total_size += len;
total_storage +=
MALLOC_OVERHEAD +
- STRETCHY_STRUCT_SIZEOF (Lisp_Bit_Vector, bits,
- BIT_VECTOR_LONG_STORAGE (len));
+ FLEXIBLE_ARRAY_STRUCT_SIZEOF (Lisp_Bit_Vector, bits,
+ BIT_VECTOR_LONG_STORAGE (len));
num_used++;
/* #### May modify next on a C_READONLY bitvector */
prev = &(bit_vector_next (v));
{ \
num_used++; \
} \
- else if (!MARKED_RECORD_HEADER_P (&SFTB_victim->lheader)) \
+ else if (! MARKED_RECORD_HEADER_P (&SFTB_victim->lheader)) \
{ \
num_free++; \
FREE_FIXED_TYPE (typename, obj_type, SFTB_victim); \
SFTB_empty = 0; \
num_used++; \
} \
- else if (!MARKED_RECORD_HEADER_P (&SFTB_victim->lheader)) \
+ else if (! MARKED_RECORD_HEADER_P (&SFTB_victim->lheader)) \
{ \
num_free++; \
FREE_FIXED_TYPE (typename, obj_type, SFTB_victim); \
void
free_marker (Lisp_Marker *ptr)
{
-#ifdef ERROR_CHECK_GC
/* Perhaps this will catch freeing an already-freed marker. */
- Lisp_Object temmy;
- XSETMARKER (temmy, ptr);
- assert (MARKERP (temmy));
-#endif /* ERROR_CHECK_GC */
+ gc_checking_assert (ptr->lheader.type = lrecord_type_marker);
#ifndef ALLOC_NO_POOLS
FREE_FIXED_TYPE_WHEN_NOT_IN_GC (marker, Lisp_Marker, ptr);
size = string_length (string);
fullsize = STRING_FULLSIZE (size);
- if (BIG_STRING_FULLSIZE_P (fullsize))
- abort ();
+ gc_checking_assert (! BIG_STRING_FULLSIZE_P (fullsize));
/* Just skip it if it isn't marked. */
if (! MARKED_RECORD_HEADER_P (&(string->lheader)))
{
Charcount i;
Charcount s = string_char_length (p);
- putc ('\"', stderr);
+ stderr_out ("\"");
for (i = 0; i < s; i++)
{
Emchar ch = string_char (p, i);
UNMARK_RECORD_HEADER (&(p->lheader)); \
num_bytes += size; \
if (!BIG_STRING_SIZE_P (size)) \
- { num_small_bytes += size; \
- num_small_used++; \
+ { \
+ num_small_bytes += size; \
+ num_small_used++; \
} \
if (debug) \
debug_string_purity_print (p); \
int
marked_p (Lisp_Object obj)
{
-#ifdef ERROR_CHECK_GC
- 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 (XTYPE (obj) == Lisp_Type_Record)
{
struct lrecord_header *lheader = XRECORD_LHEADER (obj);
-#if defined (ERROR_CHECK_GC)
- assert (lheader->type <= last_lrecord_type_index_assigned);
-#endif
- return C_READONLY_RECORD_HEADER_P (lheader) || MARKED_RECORD_HEADER_P (lheader);
+
+ GC_CHECK_LHEADER_INVARIANTS (lheader);
+
+ return MARKED_RECORD_HEADER_P (lheader);
}
return 1;
}
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;
- }
- }
+ pdump_objects_unmark ();
#endif
}
\f
: 0);
Lisp_Object args[2], whole_msg;
args[0] = build_string (msg ? msg :
- GETTEXT ((CONST char *) gc_default_message));
+ GETTEXT ((const char *) gc_default_message));
args[1] = build_string ("...");
whole_msg = Fconcat (2, args);
echo_area_message (f, (Bufbyte *) 0, whole_msg, 0, -1,
{
Lisp_Object args[2], whole_msg;
args[0] = build_string (msg ? msg :
- GETTEXT ((CONST char *)
+ GETTEXT ((const char *)
gc_default_message));
args[1] = build_string ("... done");
whole_msg = Fconcat (2, args);
/* Debugging aids. */
static Lisp_Object
-gc_plist_hack (CONST char *name, int value, Lisp_Object tail)
+gc_plist_hack (const char *name, int value, Lisp_Object tail)
{
/* C doesn't have local functions (or closures, or GC, or readable syntax,
or portable numeric datatypes, or bit-vectors, or characters, or
garbage_collect_1 ();
- for (i = 0; i <= last_lrecord_type_index_assigned; i++)
+ for (i = 0; i < lrecord_type_count; i++)
{
if (lcrecord_stats[i].bytes_in_use != 0
|| lcrecord_stats[i].bytes_freed != 0
|| lcrecord_stats[i].instances_on_free_list != 0)
{
char buf [255];
- CONST char *name = lrecord_implementations_table[i]->name;
+ const char *name = lrecord_implementations_table[i]->name;
int len = strlen (name);
/* save this for the FSFmacs-compatible part of the summary */
- if (i == *lrecord_vector.lrecord_type_index)
+ if (i == lrecord_vector.lrecord_type_index)
gc_count_vector_total_size =
lcrecord_stats[i].bytes_in_use + lcrecord_stats[i].bytes_freed;
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;
- }
+ {
+ int i;
+ for (i = 0; i < countof (lrecord_implementations_table); i++)
+ lrecord_implementations_table[i] = 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);
+ INIT_LRECORD_IMPLEMENTATION (cons);
+ INIT_LRECORD_IMPLEMENTATION (vector);
+ INIT_LRECORD_IMPLEMENTATION (string);
+ INIT_LRECORD_IMPLEMENTATION (lcrecord_list);
staticidx = 0;
}
{
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;
-
- assert (obj != 0);
-
- 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 = xnew (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 = (pdump_struct_list_elmt *)
- 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
-{
- struct lrecord_header *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",
- 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;
-
- restart:
- for (pos = 0; desc[pos].type != XD_END; pos++)
- {
- const void *rdata = (const char *)data + desc[pos].offset;
-
- backtrace[me].position = pos;
- backtrace[me].offset = desc[pos].offset;
-
- switch (desc[pos].type)
- {
- case XD_SPECIFIER_END:
- pos = 0;
- desc = ((const 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:
- {
- const Lisp_Object *pobj = (const Lisp_Object *)rdata;
-
- assert (desc[pos].data1 == 0);
-
- backtrace[me].offset = (const char *)pobj - (const char *)data;
- pdump_register_object (*pobj);
- break;
- }
- case XD_LISP_OBJECT_ARRAY:
- {
- int i;
- EMACS_INT count = desc[pos].data1;
- 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)
-{
- struct lrecord_header *objh;
-
- if (!POINTER_TYPE_P (XTYPE (obj)))
- return;
-
- objh = XRECORD_LHEADER (obj);
- if (!objh)
- return;
-
- if (pdump_get_entry (objh))
- return;
-
- if (LHEADER_IMPLEMENTATION (objh)->description)
- {
- int me = depth++;
- if (me>65536)
- {
- fprintf (stderr, "Backtrace overflow, loop ?\n");
- abort ();
- }
- backtrace[me].obj = objh;
- backtrace[me].position = 0;
- backtrace[me].offset = 0;
-
- pdump_add_entry (pdump_object_table + objh->type,
- objh,
- LHEADER_IMPLEMENTATION (objh)->static_size ?
- LHEADER_IMPLEMENTATION (objh)->static_size :
- LHEADER_IMPLEMENTATION (objh)->size_in_bytes_method (objh),
- 1,
- 1);
- pdump_register_sub (objh,
- LHEADER_IMPLEMENTATION (objh)->description,
- me);
- --depth;
- }
- else
- {
- pdump_alert_undump_object[objh->type]++;
- fprintf (stderr, "Undumpable object type : %s\n", LHEADER_IMPLEMENTATION (objh)->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;
- 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++)
- {
- void *rdata = cur + desc[pos].offset;
- switch (desc[pos].type)
- {
- case XD_SPECIFIER_END:
- desc = ((const 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:
- {
- Lisp_Object *pobj = (Lisp_Object *) rdata;
-
- assert (desc[pos].data1 == 0);
-
- if (POINTER_TYPE_P (XTYPE (*pobj)) && XRECORD_LHEADER (*pobj))
- *(EMACS_INT *)pobj =
- pdump_get_entry (XRECORD_LHEADER (*pobj))->save_offset;
- break;
- }
- case XD_LISP_OBJECT_ARRAY:
- {
- 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;
- if (POINTER_TYPE_P (XTYPE (*pobj)) && XRECORD_LHEADER (*pobj))
- *(EMACS_INT *)pobj =
- pdump_get_entry (XRECORD_LHEADER (*pobj))->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;
-
- restart:
- for (pos = 0; desc[pos].type != XD_END; pos++)
- {
- void *rdata = (char *)data + desc[pos].offset;
- switch (desc[pos].type)
- {
- case XD_SPECIFIER_END:
- pos = 0;
- desc = ((const 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:
- {
- Lisp_Object *pobj = (Lisp_Object *) rdata;
-
- assert (desc[pos].data1 == 0);
-
- if (POINTER_TYPE_P (XTYPE (*pobj))
- && ! EQ (*pobj, Qnull_pointer))
- XSETOBJ (*pobj, XTYPE (*pobj), (char *) XPNTR (*pobj) + delta);
-
- break;
- }
- case XD_LISP_OBJECT_ARRAY:
- 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;
-
- if (POINTER_TYPE_P (XTYPE (*pobj))
- && ! EQ (*pobj, Qnull_pointer))
- XSETOBJ (*pobj, XTYPE (*pobj), (char *) XPNTR (*pobj) + 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_alignment (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)
-{
- EMACS_INT *reloc = xnew_array (EMACS_INT, staticidx);
- int i;
- write (pdump_fd, staticvec, staticidx*sizeof (Lisp_Object *));
-
- for (i=0; i<staticidx; i++)
- {
- Lisp_Object obj = *staticvec[i];
- if (POINTER_TYPE_P (XTYPE (obj)))
- reloc[i] = pdump_get_entry (XRECORD_LHEADER (obj))->save_offset;
- else
- reloc[i] = *(EMACS_INT *)(staticvec[i]);
- }
- 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 (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 (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++)
- {
- EMACS_INT 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 = xnew_array_and_zero (pdump_entry_list_elmt *, PDUMP_HASHSIZE);
-
- 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_alignment (pdump_allocate_offset);
- pdump_qnil = pdump_get_entry (XRECORD_LHEADER (Qnil));
-
- pdump_buf = xmalloc (max_size);
- /* Avoid use of the `open' macro. We want the real function. */
-#undef open
- pdump_fd = open ("xemacs.dmp",
- O_WRONLY | O_CREAT | O_TRUNC | OPEN_BINARY, 0666);
- hd.stab_offset = (cur_offset + 3) & ~3;
-
- write (pdump_fd, &hd, sizeof (hd));
- lseek (pdump_fd, 256, SEEK_SET);
-
- pdump_scan_by_alignment (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;
-
-#define PDUMP_READ(p, type) (p = (char*) (((type *) p) + 1), *((type *) p - 1))
-
- pdump_start = pdump_end = 0;
-
- pdump_fd = open ("xemacs.dmp", O_RDONLY | OPEN_BINARY);
- if (pdump_fd<0)
- return 0;
-
- length = lseek (pdump_fd, 0, SEEK_END);
- lseek (pdump_fd, 0, SEEK_SET);
-
-#ifdef HAVE_MMAP
- pdump_start = (char *) 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 = (char *)((((unsigned long)(xmalloc(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 = PDUMP_READ (p, Lisp_Object);
- if (POINTER_TYPE_P (XTYPE (obj)))
- XSETOBJ (obj, XTYPE (obj), (char *) XPNTR (obj) + delta);
- *staticvec[i] = obj;
- }
-
- /* Put back the dumpstructs */
- for (i=0; i<((dump_header *)pdump_start)->nb_structdmp; i++)
- {
- void **adr = PDUMP_READ (p, void **);
- *adr = (void *) (PDUMP_READ (p, char *) + delta);
- }
-
- /* 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 < countof (lrecord_implementations_table); 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_READ (p, pdump_reloc_table);
- if (rt.desc)
- {
- for (i=0; i < rt.count; i++)
- {
- char *adr = delta + *(char **)p;
- *(char **)p = adr;
- pdump_reloc_one (adr, delta, rt.desc);
- p += sizeof (char *);
- }
- } else
- if (!(--count))
- break;
- }
-
- /* Put the pdump_wire variables in place */
- count = PDUMP_READ (p, EMACS_INT);
-
- for (i=0; i<count; i++)
- {
- Lisp_Object *var = PDUMP_READ (p, Lisp_Object *);
- Lisp_Object obj = PDUMP_READ (p, Lisp_Object);
-
- if (POINTER_TYPE_P (XTYPE (obj)))
- XSETOBJ (obj, XTYPE (obj), (char *) XPNTR (obj) + delta);
-
- *var = obj;
- }
-
- /* Final cleanups */
- /* reorganize hash tables */
- p = pdump_rt_list;
- for (;;)
- {
- pdump_reloc_table rt = PDUMP_READ (p, pdump_reloc_table);
- if (!rt.desc)
- break;
- if (rt.desc == hash_table_description)
- {
- for (i=0; i < rt.count; i++)
- pdump_reorganize_hash_table (PDUMP_READ (p, Lisp_Object));
- break;
- } else
- p += sizeof (Lisp_Object) * rt.count;
- }
- return 1;
-}
-
-#endif /* PDUMP */
/* #### start of hack */
static unsigned long
-alloc_color (Display* dpy, CONST char* colorname, int light)
+alloc_color (Display* dpy, const char* colorname, int light)
{
Colormap cmap = DEVICE_X_COLORMAP (XDEVICE(Vdefault_x_device));
unsigned long pixel = 0;
}
static XFontStruct *
-open_font (Display* dpy, CONST char* font_name)
+open_font (Display* dpy, const char* font_name)
{
XFontStruct* fontStruct = NULL;
static int b_maskWidth, b_maskHeight;
static GC b_maskGC;
-static CONST char* b_text;
+static const char* b_text;
static int b_width, b_height;
static XtIntervalId b_timer;
============================================================================*/
static void
-text_extent (XFontStruct* fontStruct, CONST char* text, int len,
+text_extent (XFontStruct* fontStruct, const char* text, int len,
int* width, int* height)
{
XCharStruct extent;
}
static void
-get_text_size (Display* dpy, XFontStruct* fontStruct, CONST char* text,
+get_text_size (Display* dpy, XFontStruct* fontStruct, const char* text,
int* max_width, int* max_height)
{
int width;
int height;
- CONST char* start;
- CONST char* end;
+ const char* start;
+ const char* end;
*max_width = *max_height = 0;
static void
draw_text (Display* dpy, Window win, GC gc, XFontStruct* fontStruct,
- int x, int y, CONST char* text)
+ int x, int y, const char* text)
{
- CONST char* start;
- CONST char* end;
+ const char* start;
+ const char* end;
int font_height;
y += fontStruct->ascent;
}
void
-balloon_help_show (CONST char* text)
+balloon_help_show (const char* text)
{
assert (b_dpy != NULL);
Pixel fg, Pixel bg, Pixel shine, Pixel shadow,
XFontStruct* font);
void balloon_help_set_delay (unsigned long milliseconds);
-void balloon_help_show (CONST char* text);
+void balloon_help_show (const char* text);
void balloon_help_hide (void);
void balloon_help_move_to_pointer (void);
/*********************** stdlib functions *********************/
-/* void * memchr (CONST void *, int, size_t); */
+/* void * memchr (const void *, int, size_t); */
-/* int memcmp (CONST void *, CONST void *, size_t); */
-/* void * memcpy (void *, CONST void *, size_t); */
-/* void * memmove (void *, CONST void *, size_t);*/
+/* int memcmp (const void *, const void *, size_t); */
+/* void * memcpy (void *, const void *, size_t); */
+/* void * memmove (void *, const void *, size_t);*/
/* void * memset (void *, int, int); */
-/* char * strcat (char *, CONST char *); */
-/* char * strchr (CONST char *, int); */
-/* int strcmp (CONST char *, CONST char *); */
+/* char * strcat (char *, const char *); */
+/* char * strchr (const char *, int); */
+/* int strcmp (const char *, const char *); */
int strcasecmp (char *, char *);
/* Yes, they even left these functions out! */
#include <stdio.h> /* else can't declare FILE */
-/* FILE *fopen (CONST char *, CONST char *); */
-/* FILE *freopen (CONST char *, CONST char *, FILE *); */
+/* FILE *fopen (const char *, const char *); */
+/* FILE *freopen (const char *, const char *, FILE *); */
FILE *tmpfile (void);
int fclose (FILE *);
char *fgets (char *, int, FILE *);
int fgetc (FILE *);
int fflush (FILE *);
-int fprintf (FILE *, CONST char *, ...);
+int fprintf (FILE *, const char *, ...);
int fputc (char, FILE *);
-int fputs (CONST char *, FILE *);
+int fputs (const char *, FILE *);
size_t fread (void *, size_t, size_t, FILE *);
-int fscanf (FILE *, CONST char *, ...);
+int fscanf (FILE *, const char *, ...);
int fgetpos (FILE *, long *);
int fseek (FILE *, long, int);
-int fsetpos (FILE *, CONST long *);
+int fsetpos (FILE *, const long *);
long ftell (FILE *);
-size_t fwrite (CONST void *, size_t, size_t, FILE *);
+size_t fwrite (const void *, size_t, size_t, FILE *);
char *gets (char *);
int pclose (FILE *);
-void perror (CONST char *);
-int printf (CONST char *, ...);
-int puts (CONST char *);
-int remove (CONST char *);
-int rename (CONST char *, CONST char *);
+void perror (const char *);
+int printf (const char *, ...);
+int puts (const char *);
+int remove (const char *);
+int rename (const char *, const char *);
int rewind (FILE *);
-int scanf (CONST char *, ...);
-int sscanf (CONST char *, CONST char *, ...);
+int scanf (const char *, ...);
+int sscanf (const char *, const char *, ...);
void setbuf (FILE *, char *);
int setvbuf (FILE *, char *, int, size_t);
int ungetc (int, FILE *);
-int vprintf (CONST char *, void *);
-int vfprintf (FILE *, CONST char *, void *);
-char *vsprintf (char *, CONST char *, void *);
+int vprintf (const char *, void *);
+int vfprintf (FILE *, const char *, void *);
+char *vsprintf (char *, const char *, void *);
/*********************** signal functions *********************/
struct timeval;
struct timezone;
-int utimes (CONST char *, struct timeval *);
+int utimes (const char *, struct timeval *);
void tzset (void);
time_t time (time_t *);
int gettimeofday (struct timeval *, struct timezone *);
#include </usr/include/sys/types.h>
int fsync (int);
-int lstat (CONST char *, struct stat *);
+int lstat (const char *, struct stat *);
int fchmod (int, mode_t);
char *mktemp (char *);
-/* int creat (CONST char *, mode_t); better no decl than a conflicting one... */
-int symlink (CONST char *, CONST char *);
-int readlink (CONST char *, char *, int);
+/* int creat (const char *, mode_t); better no decl than a conflicting one... */
+int symlink (const char *, const char *);
+int readlink (const char *, char *, int);
void sync (void);
int select (int, fd_set *, fd_set *, fd_set *, struct timeval *);
char * getwd (char *);
int ioctl (int, int, ...);
struct nlist;
-int nlist (CONST char *, struct nlist *);
+int nlist (const char *, struct nlist *);
int munmap (void *, int);
int brk (void *);
void * sbrk (int);
/*********************** miscellaneous functions *********************/
-void tputs (CONST char *cp, int affcnt, void (*)(int));
+void tputs (const char *cp, int affcnt, void (*)(int));
long random (void);
int srandom (int seed);
Lisp_Object Qdefault_directory;
Lisp_Object Qkill_buffer_hook;
-Lisp_Object Qrecord_buffer_hook;
Lisp_Object Qrename_auto_save_file;
local_var_alist is set to Qnil at the same point, in
nuke_all_buffer_slots(). */
reset_buffer_local_variables (b, 1);
- b->directory = ((current_buffer) ? current_buffer->directory : Qnil);
+ b->directory = current_buffer ? current_buffer->directory : Qnil;
b->last_window_start = 1;
/* The aconses in the Vbuffer_alist are shared with frame->buffer_alist,
so this will change it in the per-frame ordering as well. */
Fsetcar (Frassq (buf, Vbuffer_alist), newname);
+
if (NILP (current_buffer->filename)
&& !NILP (current_buffer->auto_save_file_name))
call0 (Qrename_auto_save_file);
killp = call1
(Qyes_or_no_p,
(emacs_doprnt_string_c
- ((CONST Bufbyte *) GETTEXT ("Buffer %s modified; kill anyway? "),
+ ((const Bufbyte *) GETTEXT ("Buffer %s modified; kill anyway? "),
Qnil, -1, XSTRING_DATA (b->name))));
UNGCPRO;
if (NILP (killp))
kill_buffer_processes (buf);
+ delete_from_buffer_alist (buf);
+
/* #### This is a problem if this buffer is in a dedicated window.
Need to undedicate any windows of this buffer first (and delete them?)
*/
Freplace_buffer_in_windows (buf);
- delete_from_buffer_alist (buf);
-
font_lock_buffer_was_killed (b);
/* Delete any auto-save file, if we saved it in this session. */
XCDR (lynk) = f->buffer_alist;
f->buffer_alist = lynk;
- va_run_hook_with_args (Qrecord_buffer_hook, 1, buffer);
-
return Qnil;
}
void
syms_of_buffer (void)
{
+ INIT_LRECORD_IMPLEMENTATION (buffer);
+
defsymbol (&Qbuffer_live_p, "buffer-live-p");
defsymbol (&Qbuffer_or_string_p, "buffer-or-string-p");
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");
/* Renamed from DEFVAR_PER_BUFFER because FSFmacs D_P_B takes
a bogus extra arg, which confuses an otherwise identical make-docfile.c */
-
-/* Declaring this stuff as const produces 'Cannot reinitialize' messages
- from SunPro C's fix-and-continue feature (a way neato feature that
- makes debugging unbelievably more bearable) */
#define DEFVAR_BUFFER_LOCAL_1(lname, field_name, forward_type, magicfun) do { \
- static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \
- = { { { symbol_value_forward_lheader_initializer, \
- (struct lcrecord_header *) &(buffer_local_flags.field_name), 69 }, \
- forward_type }, magicfun }; \
+ static const struct symbol_value_forward I_hate_C = \
+ { /* struct symbol_value_forward */ \
+ { /* struct symbol_value_magic */ \
+ { /* struct lcrecord_header */ \
+ { /* struct lrecord_header */ \
+ lrecord_type_symbol_value_forward, /* lrecord_type_index */ \
+ 1, /* mark bit */ \
+ 1, /* c_readonly bit */ \
+ 1 /* lisp_readonly bit */ \
+ }, \
+ 0, /* next */ \
+ 0, /* uid */ \
+ 0 /* free */ \
+ }, \
+ &(buffer_local_flags.field_name), \
+ forward_type \
+ }, \
+ magicfun \
+ }; \
+ \
{ \
int offset = ((char *)symbol_value_forward_forward (&I_hate_C) - \
(char *)&buffer_local_flags); \
int modtime;
/* the value of text->modiff at the last auto-save. */
- int auto_save_modified;
+ long auto_save_modified;
/* The time at which we detected a failure to auto-save,
Or -1 if we didn't have a failure. */
/*----------------------------------------------------------------------*/
/* Convert the address of a byte in the buffer into a position. */
-INLINE Bytind BI_BUF_PTR_BYTE_POS (struct buffer *buf, Bufbyte *ptr);
-INLINE Bytind
+INLINE_HEADER Bytind BI_BUF_PTR_BYTE_POS (struct buffer *buf, Bufbyte *ptr);
+INLINE_HEADER Bytind
BI_BUF_PTR_BYTE_POS (struct buffer *buf, Bufbyte *ptr)
{
return (ptr - buf->text->beg + 1
bytind_to_bufpos (buf, BI_BUF_PTR_BYTE_POS (buf, ptr))
/* Address of byte at position POS in buffer. */
-INLINE Bufbyte * BI_BUF_BYTE_ADDRESS (struct buffer *buf, Bytind pos);
-INLINE Bufbyte *
+INLINE_HEADER Bufbyte * BI_BUF_BYTE_ADDRESS (struct buffer *buf, Bytind pos);
+INLINE_HEADER Bufbyte *
BI_BUF_BYTE_ADDRESS (struct buffer *buf, Bytind pos)
{
return (buf->text->beg +
BI_BUF_BYTE_ADDRESS (buf, bufpos_to_bytind (buf, pos))
/* Address of byte before position POS in buffer. */
-INLINE Bufbyte * BI_BUF_BYTE_ADDRESS_BEFORE (struct buffer *buf, Bytind pos);
-INLINE Bufbyte *
+INLINE_HEADER Bufbyte * BI_BUF_BYTE_ADDRESS_BEFORE (struct buffer *buf, Bytind pos);
+INLINE_HEADER Bufbyte *
BI_BUF_BYTE_ADDRESS_BEFORE (struct buffer *buf, Bytind pos)
{
return (buf->text->beg +
/* Converting between byte indices and memory indices */
/*----------------------------------------------------------------------*/
-INLINE int valid_memind_p (struct buffer *buf, Memind x);
-INLINE int
+INLINE_HEADER int valid_memind_p (struct buffer *buf, Memind x);
+INLINE_HEADER int
valid_memind_p (struct buffer *buf, Memind x)
{
return ((x >= 1 && x <= (Memind) buf->text->gpt) ||
x <= (Memind) (buf->text->z + buf->text->gap_size)));
}
-INLINE Memind bytind_to_memind (struct buffer *buf, Bytind x);
-INLINE Memind
+INLINE_HEADER Memind bytind_to_memind (struct buffer *buf, Bytind x);
+INLINE_HEADER Memind
bytind_to_memind (struct buffer *buf, Bytind x)
{
return (Memind) ((x > buf->text->gpt) ? (x + buf->text->gap_size) : x);
}
-INLINE Bytind memind_to_bytind (struct buffer *buf, Memind x);
-INLINE Bytind
+INLINE_HEADER Bytind memind_to_bytind (struct buffer *buf, Memind x);
+INLINE_HEADER Bytind
memind_to_bytind (struct buffer *buf, Memind x)
{
#ifdef ERROR_CHECK_BUFPOS
VALIDATE_BYTIND_BACKWARD (buf, x); \
} while (0)
-INLINE Bytind prev_bytind (struct buffer *buf, Bytind x);
-INLINE Bytind
+INLINE_HEADER Bytind prev_bytind (struct buffer *buf, Bytind x);
+INLINE_HEADER Bytind
prev_bytind (struct buffer *buf, Bytind x)
{
DEC_BYTIND (buf, x);
return x;
}
-INLINE Bytind next_bytind (struct buffer *buf, Bytind x);
-INLINE Bytind
+INLINE_HEADER Bytind next_bytind (struct buffer *buf, Bytind x);
+INLINE_HEADER Bytind
next_bytind (struct buffer *buf, Bytind x)
{
INC_BYTIND (buf, x);
extern short three_to_one_table[];
#endif
-INLINE int real_bufpos_to_bytind (struct buffer *buf, Bufpos x);
-INLINE int
+INLINE_HEADER int real_bufpos_to_bytind (struct buffer *buf, Bufpos x);
+INLINE_HEADER int
real_bufpos_to_bytind (struct buffer *buf, Bufpos x)
{
if (x >= buf->text->mule_bufmin && x <= buf->text->mule_bufmax)
return bufpos_to_bytind_func (buf, x);
}
-INLINE int real_bytind_to_bufpos (struct buffer *buf, Bytind x);
-INLINE int
+INLINE_HEADER int real_bytind_to_bufpos (struct buffer *buf, Bytind x);
+INLINE_HEADER int
real_bytind_to_bufpos (struct buffer *buf, Bytind x)
{
if (x >= buf->text->mule_bytmin && x <= buf->text->mule_bytmax)
} while (0)
/* Assign to the `sink' lvalue(s) using the converted data. */
+typedef union { char c; void *p; } *dfc_aliasing_voidpp;
#define DFC_ALLOCA_USE_CONVERTED_DATA(sink) do { \
void * dfc_sink_ret = alloca (dfc_sink.data.len + 1); \
memcpy (dfc_sink_ret, dfc_sink.data.ptr, dfc_sink.data.len + 1); \
- (DFC_CPP_CAR sink) = (unsigned char *) dfc_sink_ret; \
+ ((dfc_aliasing_voidpp) &(DFC_CPP_CAR sink))->p = dfc_sink_ret; \
(DFC_CPP_CDR sink) = dfc_sink.data.len; \
} while (0)
#define DFC_MALLOC_USE_CONVERTED_DATA(sink) do { \
void * dfc_sink_ret = xmalloc (dfc_sink.data.len + 1); \
memcpy (dfc_sink_ret, dfc_sink.data.ptr, dfc_sink.data.len + 1); \
- (DFC_CPP_CAR sink) = (unsigned char *) dfc_sink_ret; \
+ ((dfc_aliasing_voidpp) &(DFC_CPP_CAR sink))->p = dfc_sink_ret; \
(DFC_CPP_CDR sink) = dfc_sink.data.len; \
} while (0)
#define DFC_C_STRING_ALLOCA_USE_CONVERTED_DATA(sink) do { \
#define GET_C_CHARPTR_EXT_DATA_ALLOCA(ptr, fmt, ptr_out) do \
{ \
Extcount gcceda_ignored_len; \
- CONST Bufbyte *gcceda_ptr_in = (CONST Bufbyte *) (ptr); \
+ const Bufbyte *gcceda_ptr_in = (const Bufbyte *) (ptr); \
Extbyte *gcceda_ptr_out; \
\
GET_CHARPTR_EXT_DATA_ALLOCA (gcceda_ptr_in, \
{ \
Extcount gcida_len_in = (Extcount) (len); \
Bytecount gcida_len_out; \
- CONST Extbyte *gcida_ptr_in = (ptr); \
+ const Extbyte *gcida_ptr_in = (ptr); \
Bufbyte *gcida_ptr_out = \
convert_from_external_format (gcida_ptr_in, gcida_len_in, \
&gcida_len_out, fmt); \
#define GET_C_CHARPTR_INT_DATA_ALLOCA(ptr, fmt, ptr_out) do \
{ \
Bytecount gccida_ignored_len; \
- CONST Extbyte *gccida_ptr_in = (CONST Extbyte *) (ptr); \
+ const Extbyte *gccida_ptr_in = (const Extbyte *) (ptr); \
Bufbyte *gccida_ptr_out; \
\
GET_CHARPTR_INT_DATA_ALLOCA (gccida_ptr_in, \
/* from insdel.c */
void set_buffer_point (struct buffer *buf, Bufpos pos, Bytind bipos);
void find_charsets_in_bufbyte_string (Charset_ID *charsets,
- CONST Bufbyte *str,
+ const Bufbyte *str,
Bytecount len);
void find_charsets_in_emchar_string (Charset_ID *charsets,
- CONST Emchar *str,
+ const Emchar *str,
Charcount len);
-int bufbyte_string_displayed_columns (CONST Bufbyte *str, Bytecount len);
-int emchar_string_displayed_columns (CONST Emchar *str, Charcount len);
-void convert_bufbyte_string_into_emchar_dynarr (CONST Bufbyte *str,
+int bufbyte_string_displayed_columns (const Bufbyte *str, Bytecount len);
+int emchar_string_displayed_columns (const Emchar *str, Charcount len);
+void convert_bufbyte_string_into_emchar_dynarr (const Bufbyte *str,
Bytecount len,
Emchar_dynarr *dyn);
-Charcount convert_bufbyte_string_into_emchar_string (CONST Bufbyte *str,
+Charcount convert_bufbyte_string_into_emchar_string (const Bufbyte *str,
Bytecount len,
Emchar *arr);
void convert_emchar_string_into_bufbyte_dynarr (Emchar *arr, int nels,
TRT_TABLE_AS_STRING (buf->case_eqv_table)
#endif
-INLINE Emchar TRT_TABLE_OF (Lisp_Object trt, Emchar c);
-INLINE Emchar
+INLINE_HEADER Emchar TRT_TABLE_OF (Lisp_Object trt, Emchar c);
+INLINE_HEADER Emchar
TRT_TABLE_OF (Lisp_Object trt, Emchar c)
{
return IN_TRT_TABLE_DOMAIN (c) ? TRT_TABLE_CHAR_1 (trt, c) : c;
/* 1 if CH is upper case. */
-INLINE int UPPERCASEP (struct buffer *buf, Emchar ch);
-INLINE int
+INLINE_HEADER int UPPERCASEP (struct buffer *buf, Emchar ch);
+INLINE_HEADER int
UPPERCASEP (struct buffer *buf, Emchar ch)
{
return DOWNCASE_TABLE_OF (buf, ch) != ch;
/* 1 if CH is lower case. */
-INLINE int LOWERCASEP (struct buffer *buf, Emchar ch);
-INLINE int
+INLINE_HEADER int LOWERCASEP (struct buffer *buf, Emchar ch);
+INLINE_HEADER int
LOWERCASEP (struct buffer *buf, Emchar ch)
{
return (UPCASE_TABLE_OF (buf, ch) != ch &&
/* 1 if CH is neither upper nor lower case. */
-INLINE int NOCASEP (struct buffer *buf, Emchar ch);
-INLINE int
+INLINE_HEADER int NOCASEP (struct buffer *buf, Emchar ch);
+INLINE_HEADER int
NOCASEP (struct buffer *buf, Emchar ch)
{
return UPCASE_TABLE_OF (buf, ch) == ch;
/* Upcase a character, or make no change if that cannot be done. */
-INLINE Emchar UPCASE (struct buffer *buf, Emchar ch);
-INLINE Emchar
+INLINE_HEADER Emchar UPCASE (struct buffer *buf, Emchar ch);
+INLINE_HEADER Emchar
UPCASE (struct buffer *buf, Emchar ch)
{
return (DOWNCASE_TABLE_OF (buf, ch) == ch) ? UPCASE_TABLE_OF (buf, ch) : ch;
static void invalid_byte_code_error (char *error_message, ...);
Lisp_Object * execute_rare_opcode (Lisp_Object *stack_ptr,
- CONST Opbyte *program_ptr,
+ const Opbyte *program_ptr,
Opcode opcode);
-static Lisp_Object execute_optimized_program (CONST Opbyte *program,
+static Lisp_Object execute_optimized_program (const Opbyte *program,
int stack_depth,
Lisp_Object *constants_data);
static Lisp_Object
-execute_optimized_program (CONST Opbyte *program,
+execute_optimized_program (const Opbyte *program,
int stack_depth,
Lisp_Object *constants_data)
{
/* This function can GC */
- REGISTER CONST Opbyte *program_ptr = (Opbyte *) program;
+ REGISTER const Opbyte *program_ptr = (Opbyte *) program;
REGISTER Lisp_Object *stack_ptr
= alloca_array (Lisp_Object, stack_depth + 1);
int speccount = specpdl_depth ();
Don't make this function static, since then the compiler might inline it. */
Lisp_Object *
execute_rare_opcode (Lisp_Object *stack_ptr,
- CONST Opbyte *program_ptr,
+ const Opbyte *program_ptr,
Opcode opcode)
{
switch (opcode)
sprintf (buf, "%s", error_message);
va_start (args, error_message);
- obj = emacs_doprnt_string_va ((CONST Bufbyte *) GETTEXT (buf), Qnil, -1,
+ obj = emacs_doprnt_string_va ((const Bufbyte *) GETTEXT (buf), Qnil, -1,
args);
va_end (args);
Lisp_Object instructions,
Lisp_Object constants,
/* out */
- Opbyte * CONST program,
- int * CONST program_length,
- int * CONST varbind_count)
+ Opbyte * const program,
+ int * const program_length,
+ int * const varbind_count)
{
size_t instructions_length = XSTRING_LENGTH (instructions);
size_t comfy_size = 2 * instructions_length;
- int * CONST icounts = alloca_array (int, comfy_size);
+ int * const icounts = alloca_array (int, comfy_size);
int * icounts_ptr = icounts;
/* We maintain a table of jumps in the source code. */
int from;
int to;
};
- struct jump * CONST jumps = alloca_array (struct jump, comfy_size);
+ struct jump * const jumps = alloca_array (struct jump, comfy_size);
struct jump *jumps_ptr = jumps;
Opbyte *program_ptr = program;
- CONST Bufbyte *ptr = XSTRING_DATA (instructions);
- CONST Bufbyte * CONST end = ptr + instructions_length;
+ const Bufbyte *ptr = XSTRING_DATA (instructions);
+ const Bufbyte * const end = ptr + instructions_length;
*varbind_count = 0;
/* Invert action performed by optimize_byte_code() */
Lisp_Opaque *opaque = XOPAQUE (f->instructions);
- Bufbyte * CONST buffer =
+ Bufbyte * const buffer =
alloca_array (Bufbyte, OPAQUE_SIZE (opaque) * MAX_EMCHAR_LEN);
Bufbyte *bp = buffer;
- CONST Opbyte * CONST program = (CONST Opbyte *) OPAQUE_DATA (opaque);
- CONST Opbyte *program_ptr = program;
- CONST Opbyte * CONST program_end = program_ptr + OPAQUE_SIZE (opaque);
+ const Opbyte * const program = (const Opbyte *) OPAQUE_DATA (opaque);
+ const Opbyte *program_ptr = program;
+ const Opbyte * const program_end = program_ptr + OPAQUE_SIZE (opaque);
while (program_ptr < program_end)
{
void
syms_of_bytecode (void)
{
+ INIT_LRECORD_IMPLEMENTATION (compiled_function);
+
deferror (&Qinvalid_byte_code, "invalid-byte-code",
"Invalid byte code", Qerror);
defsymbol (&Qbyte_code, "byte-code");
Lisp_Object Vmouse_leave_buffer_hook, Qmouse_leave_buffer_hook;
#endif
-Lisp_Object Qlet, QletX, Qsave_excursion;
+Lisp_Object QletX, Qsave_excursion;
Lisp_Object Qread_from_minibuffer;
Lisp_Object Qread_file_name;
}
static Lisp_Object
-callint_prompt (CONST Bufbyte *prompt_start, Bytecount prompt_length,
- CONST Lisp_Object *args, int nargs)
+callint_prompt (const Bufbyte *prompt_start, Bytecount prompt_length,
+ const Lisp_Object *args, int nargs)
{
Lisp_Object s = make_string (prompt_start, prompt_length);
struct gcpro gcpro1;
#endif
/* If SPECS is a string, we reset prompt_data to string_data
* (XSTRING (specs)) every time a GC might have occurred */
- CONST char *prompt_data = 0;
+ const char *prompt_data = 0;
int prompt_index = 0;
int argcount;
int set_zmacs_region_stays = 0;
for (;;)
{
if (STRINGP (specs))
- prompt_data = (CONST char *) XSTRING_DATA (specs);
+ prompt_data = (const char *) XSTRING_DATA (specs);
if (prompt_data[prompt_index] == '+')
error ("`+' is not used in `interactive' for ordinary commands");
us give to the function. */
argcount = 0;
{
- CONST char *tem;
+ const char *tem;
for (tem = prompt_data + prompt_index; *tem; )
{
/* 'r' specifications ("point and mark as 2 numeric args")
argcount += 2;
else
argcount += 1;
- tem = (CONST char *) strchr (tem + 1, '\n');
+ tem = (const char *) strchr (tem + 1, '\n');
if (!tem)
break;
tem++;
for (argnum = 0; ; argnum++)
{
- CONST char *prompt_start = prompt_data + prompt_index + 1;
- CONST char *prompt_limit = (CONST char *) strchr (prompt_start, '\n');
+ const char *prompt_start = prompt_data + prompt_index + 1;
+ const char *prompt_limit = (const char *) strchr (prompt_start, '\n');
int prompt_length;
prompt_length = ((prompt_limit)
? (prompt_limit - prompt_start)
prompts with "Set key C-x C-f to command: "instead of printing
event objects in there.
*/
-#define PROMPT() callint_prompt ((CONST Bufbyte *) prompt_start, prompt_length, visargs, argnum)
+#define PROMPT() callint_prompt ((const Bufbyte *) prompt_start, prompt_length, visargs, argnum)
switch (prompt_data[prompt_index])
{
case 'a': /* Symbol defined as a function */
if (!prompt_limit)
break;
if (STRINGP (specs))
- prompt_data = (CONST char *) XSTRING_DATA (specs);
+ prompt_data = (const char *) XSTRING_DATA (specs);
prompt_index += prompt_length + 1 + 1; /* +1 to skip spec, +1 for \n */
}
unbind_to (speccount, Qnil);
defsymbol (&Qcommand_debug_status, "command-debug-status");
defsymbol (&Qenable_recursive_minibuffers, "enable-recursive-minibuffers");
- defsymbol (&Qlet, "let");
defsymbol (&QletX, "let*");
defsymbol (&Qsave_excursion, "save-excursion");
#if 0 /* ill-conceived */
volatile int synch_process_alive;
/* Nonzero => this is a string explaining death of synchronous subprocess. */
-CONST char *synch_process_death;
+const char *synch_process_death;
/* If synch_process_death is zero,
this is exit code of synchronous subprocess. */
}
#endif /* unused */
-DEFUN ("call-process-internal", Fcall_process_internal, 1, MANY, 0, /*
+DEFUN ("old-call-process-internal", Fold_call_process_internal, 1, MANY, 0, /*
Call PROGRAM synchronously in separate process, with coding-system specified.
Arguments are
(PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS).
fd_error = open (NULL_DEVICE, O_WRONLY | OPEN_BINARY);
else if (STRINGP (error_file))
{
- fd_error = open ((CONST char *) XSTRING_DATA (error_file),
+ fd_error = open ((const char *) XSTRING_DATA (error_file),
#ifdef DOS_NT
O_WRONLY | O_TRUNC | O_CREAT | O_TEXT,
S_IREAD | S_IWRITE
void
#endif
child_setup (int in, int out, int err, char **new_argv,
- CONST char *current_dir)
+ const char *current_dir)
{
char **env;
char *pwd;
#ifdef WINDOWSNT
/* Spawn the child. (See ntproc.c:Spawnve). */
- cpid = spawnve (_P_NOWAIT, new_argv[0], (CONST char* CONST*)new_argv,
- (CONST char* CONST*)env);
+ cpid = spawnve (_P_NOWAIT, new_argv[0], (const char* const*)new_argv,
+ (const char* const*)env);
if (cpid == -1)
/* An error occurred while trying to spawn the process. */
report_file_error ("Spawning child process", Qnil);
}
static int
-getenv_internal (CONST Bufbyte *var,
+getenv_internal (const Bufbyte *var,
Bytecount varlen,
Bufbyte **value,
Bytecount *valuelen)
/* A version of getenv that consults process_environment, easily
callable from C. */
char *
-egetenv (CONST char *var)
+egetenv (const char *var)
{
Bufbyte *value;
Bytecount valuelen;
- if (getenv_internal ((CONST Bufbyte *) var, strlen (var), &value, &valuelen))
+ if (getenv_internal ((const Bufbyte *) var, strlen (var), &value, &valuelen))
return (char *) value;
else
return 0;
{
/* Initialize shell-file-name from environment variables or best guess. */
#ifdef WINDOWSNT
- CONST char *shell = egetenv ("COMSPEC");
+ const char *shell = egetenv ("COMSPEC");
if (!shell) shell = "\\WINNT\\system32\\cmd.exe";
#else /* not WINDOWSNT */
- CONST char *shell = egetenv ("SHELL");
+ const char *shell = egetenv ("SHELL");
if (!shell) shell = "/bin/sh";
#endif
void
syms_of_callproc (void)
{
- DEFSUBR (Fcall_process_internal);
+ DEFSUBR (Fold_call_process_internal);
DEFSUBR (Fgetenv);
}
int non_ascii_valid_char_p (Emchar ch);
-INLINE int valid_char_p (Emchar ch);
-INLINE int
+INLINE_HEADER int valid_char_p (Emchar ch);
+INLINE_HEADER int
valid_char_p (Emchar ch)
{
return ((unsigned int) (ch) <= 0xff) || non_ascii_valid_char_p (ch);
#define CHAR_ASCII_P(ch) ((ch) <= 0x7F)
\f
-DECLARE_LRECORD (char_byte_table, struct Lisp_Char_Byte_Table);
-#define XCHAR_BYTE_TABLE(x) \
- XRECORD (x, char_byte_table, struct Lisp_Char_Byte_Table)
+struct Lisp_Char_Byte_Table
+{
+ struct lcrecord_header header;
+
+ Lisp_Object property[256];
+};
+typedef struct Lisp_Char_Byte_Table Lisp_Char_Byte_Table;
+
+DECLARE_LRECORD (char_byte_table, Lisp_Char_Byte_Table);
+#define XCHAR_BYTE_TABLE(x) XRECORD (x, char_byte_table, Lisp_Char_Byte_Table)
#define XSETCHAR_BYTE_TABLE(x, p) XSETRECORD (x, p, char_byte_table)
#define CHAR_BYTE_TABLE_P(x) RECORDP (x, char_byte_table)
#define GC_CHAR_BYTE_TABLE_P(x) GC_RECORDP (x, char_byte_table)
/* #define CHECK_CHAR_BYTE_TABLE(x) CHECK_RECORD (x, char_byte_table)
char table entries should never escape to Lisp */
-struct Lisp_Char_Byte_Table
+
+struct Lisp_Char_Code_Table
{
struct lcrecord_header header;
- Lisp_Object property[256];
+ Lisp_Object table;
};
+typedef struct Lisp_Char_Code_Table Lisp_Char_Code_Table;
-
-DECLARE_LRECORD (char_code_table, struct Lisp_Char_Code_Table);
-#define XCHAR_CODE_TABLE(x) \
- XRECORD (x, char_code_table, struct Lisp_Char_Code_Table)
+DECLARE_LRECORD (char_code_table, Lisp_Char_Code_Table);
+#define XCHAR_CODE_TABLE(x) XRECORD (x, char_code_table, Lisp_Char_Code_Table)
#define XSETCHAR_CODE_TABLE(x, p) XSETRECORD (x, p, char_code_table)
#define CHAR_CODE_TABLE_P(x) RECORDP (x, char_code_table)
#define GC_CHAR_CODE_TABLE_P(x) GC_RECORDP (x, char_code_table)
/* #define CHECK_CHAR_CODE_TABLE(x) CHECK_RECORD (x, char_code_table)
char table entries should never escape to Lisp */
-struct Lisp_Char_Code_Table
-{
- struct lcrecord_header header;
-
- Lisp_Object table;
-};
Lisp_Object get_char_code_table (Emchar ch, Lisp_Object table);
/* Table of charsets indexed by type/final-byte/direction. */
Lisp_Object charset_by_attributes[4][128];
+
+ Charset_ID next_allocated_leading_byte;
};
extern struct charset_lookup *chlook;
/* int not Bufbyte even though that is the actual type of a leading byte.
This way, out-ot-range values will get caught rather than automatically
truncated. */
-INLINE Lisp_Object CHARSET_BY_LEADING_BYTE (Charset_ID lb);
-INLINE Lisp_Object
+INLINE_HEADER Lisp_Object CHARSET_BY_LEADING_BYTE (Charset_ID lb);
+INLINE_HEADER Lisp_Object
CHARSET_BY_LEADING_BYTE (Charset_ID lb)
{
assert (lb >= MIN_LEADING_BYTE &&
Emchar make_builtin_char (Lisp_Object charset, int c1, int c2);
-INLINE Emchar DECODE_CHAR (Lisp_Object charset, int code_point);
-INLINE Emchar
+INLINE_HEADER Emchar DECODE_CHAR (Lisp_Object charset, int code_point);
+INLINE_HEADER Emchar
DECODE_CHAR (Lisp_Object charset, int code_point)
{
int dim = XCHARSET_DIMENSION (charset);
/* Return a character whose charset is CHARSET and position-codes
are C1 and C2. TYPE9N character ignores C2. */
-INLINE Emchar MAKE_CHAR (Lisp_Object charset, int c1, int c2);
-INLINE Emchar
+INLINE_HEADER Emchar MAKE_CHAR (Lisp_Object charset, int c1, int c2);
+INLINE_HEADER Emchar
MAKE_CHAR (Lisp_Object charset, int c1, int c2)
{
if (XCHARSET_DIMENSION (charset) == 1)
int encode_builtin_char_1 (Emchar c, Lisp_Object* charset);
int range_charset_code_point (Lisp_Object charset, Emchar ch);
-INLINE int charset_code_point (Lisp_Object charset, Emchar ch);
-INLINE int
+INLINE_HEADER int charset_code_point (Lisp_Object charset, Emchar ch);
+INLINE_HEADER int
charset_code_point (Lisp_Object charset, Emchar ch)
{
Lisp_Object cdef = get_char_code_table (ch, Vcharacter_attribute_table);
extern Lisp_Object Vdefault_coded_charset_priority_list;
EXFUN (Ffind_charset, 1);
-INLINE int encode_char_1 (Emchar c, Lisp_Object* charset);
-INLINE int
+INLINE_HEADER int encode_char_1 (Emchar c, Lisp_Object* charset);
+INLINE_HEADER int
encode_char_1 (Emchar c, Lisp_Object* charset)
{
Lisp_Object cdef = get_char_code_table (c, Vcharacter_attribute_table);
return encode_builtin_char_1 (c, charset);
}
-INLINE int encode_char_2 (Emchar ch, Lisp_Object* charset);
-INLINE int
+INLINE_HEADER int encode_char_2 (Emchar ch, Lisp_Object* charset);
+INLINE_HEADER int
encode_char_2 (Emchar ch, Lisp_Object* charset)
{
int code_point = encode_char_1 (ch, charset);
#define ENCODE_CHAR(ch, charset) encode_char_2 (ch, &(charset))
-INLINE void breakup_char_1 (Emchar c, Lisp_Object *charset, int *c1, int *c2);
-INLINE void
+INLINE_HEADER void
+breakup_char_1 (Emchar c, Lisp_Object *charset, int *c1, int *c2);
+INLINE_HEADER void
breakup_char_1 (Emchar c, Lisp_Object *charset, int *c1, int *c2)
{
int code_point = encode_char_2 (c, charset);
#define BREAKUP_CHAR(ch, charset, b1, b2) \
breakup_char_1 (ch, &(charset), &(b1), &(b2))
-INLINE Lisp_Object CHAR_CHARSET (Emchar ch);
-INLINE Lisp_Object
+INLINE_HEADER Lisp_Object CHAR_CHARSET (Emchar ch);
+INLINE_HEADER Lisp_Object
CHAR_CHARSET (Emchar ch)
{
Lisp_Object charset;
#ifdef ERROR_CHECK_TYPECHECK
-INLINE Emchar XCHAR_OR_CHAR_INT (Lisp_Object obj);
-INLINE Emchar
+INLINE_HEADER Emchar XCHAR_OR_CHAR_INT (Lisp_Object obj);
+INLINE_HEADER Emchar
XCHAR_OR_CHAR_INT (Lisp_Object obj)
{
assert (CHAR_OR_CHAR_INTP (obj));
void
syms_of_chartab (void)
{
+ INIT_LRECORD_IMPLEMENTATION (char_table);
+
#ifdef MULE
+ INIT_LRECORD_IMPLEMENTATION (char_table_entry);
+
defsymbol (&Qcategory_table_p, "category-table-p");
defsymbol (&Qcategory_designator_p, "category-designator-p");
defsymbol (&Qcategory_table_value_p, "category-table-value-p");
int leading_byte,
Emchar c);
-INLINE Lisp_Object
+INLINE_HEADER Lisp_Object
CHAR_TABLE_NON_ASCII_VALUE_UNSAFE (Lisp_Char_Table *ct, Emchar ch);
-INLINE Lisp_Object
+INLINE_HEADER Lisp_Object
CHAR_TABLE_NON_ASCII_VALUE_UNSAFE (Lisp_Char_Table *ct, Emchar ch)
{
#ifdef UTF2000
#endif /* not MULE */
+#define XCHAR_TABLE_VALUE_UNSAFE(ct, ch) \
+ CHAR_TABLE_VALUE_UNSAFE (XCHAR_TABLE (ct), ch)
+
enum chartab_range_type
{
CHARTAB_RANGE_ALL,
#ifdef __cplusplus
extern "C" {
#endif
-extern char *tgoto (CONST char *cm, int hpos, int vpos);
-extern void tputs (CONST char *, int, void (*)(int));
+extern char *tgoto (const char *cm, int hpos, int vpos);
+extern void tputs (const char *, int, void (*)(int));
#ifdef __cplusplus
}
#endif
int cm_curX; /* Current column */
/* Capabilities from termcap */
- CONST char *cm_up; /* up (up) */
- CONST char *cm_down; /* down (do) */
- CONST char *cm_left; /* left (le) */
- CONST char *cm_right; /* right (nd) */
- CONST char *cm_home; /* home (ho) */
- CONST char *cm_cr; /* carriage return (cr) */
- CONST char *cm_ll; /* last line (ll) */
+ const char *cm_up; /* up (up) */
+ const char *cm_down; /* down (do) */
+ const char *cm_left; /* left (le) */
+ const char *cm_right; /* right (nd) */
+ const char *cm_home; /* home (ho) */
+ const char *cm_cr; /* carriage return (cr) */
+ const char *cm_ll; /* last line (ll) */
#endif /* 0 */
- CONST char *cm_tab; /* tab (ta) */
- CONST char *cm_backtab; /* backtab (bt) */
+ const char *cm_tab; /* tab (ta) */
+ const char *cm_backtab; /* backtab (bt) */
#if 0
- CONST char *cm_abs; /* absolute (cm) */
- CONST char *cm_habs; /* horizontal absolute (ch) */
- CONST char *cm_vabs; /* vertical absolute (cv) */
- CONST char *cm_ds; /* "don't send" string (ds) */
- CONST char *cm_multiup; /* multiple up (UP) */
- CONST char *cm_multidown; /* multiple down (DO) */
- CONST char *cm_multileft; /* multiple left (LE) */
- CONST char *cm_multiright; /* multiple right (RI) */
+ const char *cm_abs; /* absolute (cm) */
+ const char *cm_habs; /* horizontal absolute (ch) */
+ const char *cm_vabs; /* vertical absolute (cv) */
+ const char *cm_ds; /* "don't send" string (ds) */
+ const char *cm_multiup; /* multiple up (UP) */
+ const char *cm_multidown; /* multiple down (DO) */
+ const char *cm_multileft; /* multiple left (LE) */
+ const char *cm_multiright; /* multiple right (RI) */
int cm_cols; /* number of cols on frame (co) */
int cm_rows; /* number of rows on frame (li) */
int cm_tabwidth; /* tab width (it) */
/* This is the command that set up Vself_insert_face. */
Lisp_Object Vself_insert_face_command;
+
+/* A char-table for characters which may invoke auto-filling. */
+Lisp_Object Vauto_fill_chars;
\f
DEFUN ("forward-char", Fforward_char, 0, 2, "_p", /*
Move point right N characters (left if N negative).
#endif /* FSFmacs */
}
}
- if ((c1 == ' ' || c1 == '\n')
+ if ((CHAR_TABLEP (Vauto_fill_chars)
+ ? !NILP (XCHAR_TABLE_VALUE_UNSAFE (Vauto_fill_chars, c1))
+ : (c1 == ' ' || c1 == '\n'))
&& !noautofill
&& !NILP (buf->auto_fill_function))
{
More precisely, a char with closeparen syntax is self-inserted.
*/ );
Vblink_paren_function = Qnil;
+
+ DEFVAR_LISP ("auto-fill-chars", &Vauto_fill_chars /*
+A char-table for characters which invoke auto-filling.
+Such characters has value t in this table.
+*/);
+ Vauto_fill_chars = Fmake_char_table (Qgeneric);
+ XCHAR_TABLE (Vauto_fill_chars)->ascii[' '] = Qt;
+ XCHAR_TABLE (Vauto_fill_chars)->ascii['\n'] = Qt;
}
#ifndef _SRC_CONFIG_H_
#define _SRC_CONFIG_H_
+
/* alloca twiddling belongs in one place, not the s&m headers
AIX requires this to be the first thing in the file. */
#undef HAVE_ALLOCA_H
#elif defined(_AIX)
#pragma alloca
#elif ! defined (alloca)
-char *alloca();
+char *alloca ();
#endif
#endif /* C code */
+/* Use SMART_INCLUDE to generate #include statements with variable paths.
+
+ #### WARNING: NEVER EVER PUT A SPACE BETWEEN THE ARGUMENTS OF THE
+ `SMART_INCLUDE' MACRO: when the simple (direct version) is defined, you
+ would end up with a space in your header filename.
+
+ Since the effect of macro expansion in #include statements is underspecified
+ in the C standard, and rarely used in source code, different compilers need
+ different implementations of SMART_INCLUDE (e.g. gcc 2.5.8 and AIX xlc).
+*/
+#undef SMART_INCLUDE_INDIRECTIONS
+
+#if SMART_INCLUDE_INDIRECTIONS == 0
+# define SMART_INCLUDE(path,file) <path/file>
+#elif SMART_INCLUDE_INDIRECTIONS == 1
+# define GLUE_INCLUDE(path,file) <##path##/##file##>
+# define SMART_INCLUDE(path,file) GLUE_INCLUDE(path,file)
+#elif SMART_INCLUDE_INDIRECTIONS == 2
+# define GLUE_INCLUDE_2(path,file) <##path##/##file##>
+# define GLUE_INCLUDE_1(path,file) GLUE_INCLUDE_2(path,file)
+# define SMART_INCLUDE(path,file) GLUE_INCLUDE_1(path,file)
+#else
+# error SMART_INCLUDE_INDIRECTIONS was not properly defined by configure
+#endif
+
+
/* Use this to add code in a structured way to FSF-maintained source
files so as to make it obvious where XEmacs changes are. */
#define XEMACS 1
+/* Program name */
+#undef EMACS_PROGNAME
+
/* Allow s&m files to differentiate OS versions without having
multiple files to maintain. */
#undef OS_RELEASE
#undef INFODOCK_MINOR_VERSION
#undef INFODOCK_BUILD_VERSION
+/* Make all functions from all IEEE Stds 1003.[123] available. */
+#undef _POSIX_C_SOURCE
+
+/* Make all functions from Unix98 available. */
+#undef _XOPEN_SOURCE
+
+/* Make extensions from Unix98 available. */
+#undef _XOPEN_SOURCE_EXTENDED
+
/* Make all functions available on AIX. See AC_AIX. */
#undef _ALL_SOURCE
/* Make all functions available on GNU libc systems. See features.h. */
#undef _GNU_SOURCE
+/* Make all functions available on Solaris 2 systems. */
+#undef __EXTENSIONS__
+
/* Used to identify the XEmacs version in stack traces. */
#undef STACK_TRACE_EYE_CATCHER
#undef THIS_IS_X11R5
#undef THIS_IS_X11R6
+#undef HAVE_XCONVERTCASE
+
/* Where do we find bitmaps? */
#undef BITMAPDIR
/* Some things figured out by the configure script, grouped as they are in
configure.in. */
#undef HAVE_MCHECK_H
+#undef HAVE_A_OUT_H
+#undef HAVE_CYGWIN_VERSION_H
+#undef HAVE_FCNTL_H
+#undef HAVE_INTTYPES_H
+#undef HAVE_LIBGEN_H
+#undef HAVE_LOCALE_H
#undef HAVE_MACH_MACH_H
+#undef HAVE_SYS_PARAM_H
+#undef HAVE_SYS_PSTAT_H
#undef HAVE_SYS_STROPTS_H
-#undef HAVE_SYS_TIMEB_H
#undef HAVE_SYS_TIME_H
+#undef HAVE_SYS_TIMEB_H
+#undef HAVE_SYS_UN_H
+#undef HAVE_ULIMIT_H
#undef HAVE_UNISTD_H
#undef HAVE_UTIME_H
+
#undef HAVE_SYS_WAIT_H
#undef HAVE_LIBINTL_H
-#undef HAVE_LIBGEN_H
-#undef HAVE_LOCALE_H
-#undef HAVE_FCNTL_H
-#undef HAVE_ULIMIT_H
#undef HAVE_X11_XLOCALE_H
-#undef HAVE_LINUX_VERSION_H
-#undef HAVE_CYGWIN_VERSION_H
-#undef HAVE_INTTYPES_H
-#undef HAVE_SYS_UN_H
-#undef HAVE_A_OUT_H
#undef STDC_HEADERS
#undef TIME_WITH_SYS_TIME
#undef WORDS_BIGENDIAN
#undef HAVE_VFORK_H
#undef HAVE_KSTAT_H
-#undef HAVE_SYS_PSTAT_H
#undef vfork
#undef HAVE_LONG_FILE_NAMES
/* Compile in support for Berkeley DB style databases? May require libdb. */
#undef HAVE_BERKELEY_DB
/* Full #include file path for Berkeley DB's db.h */
-#undef DB_H_PATH
+#undef DB_H_FILE
/* Do we have either DBM or Berkeley DB database support? */
#undef HAVE_DATABASE
/* Does the library define ldap_parse_result () ? */
#undef HAVE_LDAP_PARSE_RESULT
+/* Do we wish to link against the PostgreSQL RDBMS run-time library?
+ */
+#undef HAVE_POSTGRESQL
+#undef HAVE_POSTGRESQLV7
+#undef POSTGRES_H_PATH
+#if defined POSTGRES_H_PATH
+# define POSTGRES_INCLUDE(file) SMART_INCLUDE (POSTGRES_H_PATH,file)
+#else
+# define POSTGRES_INCLUDE(file) <file>
+#endif
+
/* Do you have the Xauth library present? This will add some extra
functionality to gnuserv. */
#undef HAVE_XAUTH
/* Compile in support for ncurses? */
#undef HAVE_NCURSES
/* Full #include file paths for ncurses' curses.h and term.h. */
-#undef CURSES_H_PATH
-#undef TERM_H_PATH
+#undef CURSES_H_FILE
+#undef TERM_H_FILE
/* Define USE_ASSERTIONS if you want the abort() to be changed to assert().
If the assertion fails, assert_failed() will be called. This is
/* Attempt to catch bugs related to garbage collection (e.g. not GCPRO'ing). */
#undef ERROR_CHECK_GC
+#ifdef ERROR_CHECK_GC
+#define gc_checking_assert(assertion) assert (assertion)
+#else
+#define gc_checking_assert(assertion)
+#endif
/* Attempt to catch freeing of a non-malloc()ed block, heap corruption, etc. */
#undef ERROR_CHECK_MALLOC
debugging the byte compiler. */
#undef ERROR_CHECK_BYTE_CODE
+/* Minor sanity checking of glyphs, especially subwindows and
+ widgets. */
+#undef ERROR_CHECK_GLYPHS
+
/* Define DEBUG_XEMACS if you want extra debugging code compiled in.
This is mainly intended for use by developers. */
#undef DEBUG_XEMACS
/* Enable special GNU Make features in the Makefiles. */
#undef USE_GNU_MAKE
-/* Debugging option: Don't automatically rebuild the DOC file.
- This saves a lot of time when you're repeatedly
- compiling-running-crashing. */
-#undef NO_DOC_FILE
+/* Debugging development option: Remove inessential but time consuming
+ actions from happening during build. This saves a lot of time when
+ you're repeatedly compiling-running-crashing. This (1) doesn't
+ garbage-collect after loading each file during dumping, and (2)
+ doesn't automatically rebuild the DOC file. (Remove it by hand to
+ get it rebuilt.)
+ */
+#undef QUICK_BUILD
/* Defined by AC_C_CONST in configure.in */
#undef const
-#define CONST const
-
/* Allow the source to use standard types. Include these before the
s&m files so that they can use them. */
#undef ssize_t
"SUNWaudmo" package.) */
#undef HAVE_NATIVE_SOUND
/* Native sound may be provided via soundcard.h, in various directories */
-#undef SOUNDCARD_H_PATH
+#undef SOUNDCARD_H_FILE
/* Compile in support for NAS (Network Audio System)?
NAS_NO_ERROR_JUMP means that the NAS libraries don't include some
/* Compile in support for Tooltalk? */
#undef TOOLTALK
/* tt_c.h might be in "Tt" or "desktop" subdirectories */
-#undef TT_C_H_PATH
+#undef TT_C_H_FILE
/* Toolkits used by lwlib for various widgets... */
#undef LWLIB_USES_MOTIF
#define LONG_LONG_BITS (SIZEOF_LONG_LONG * BITS_PER_CHAR)
#define VOID_P_BITS (SIZEOF_VOID_P * BITS_PER_CHAR)
-#ifndef NOT_C_CODE
-#ifdef __cplusplus
-#define HAVE_INLINE 1
-#define INLINE inline
-#else /* not C++ */
+/* Use `INLINE_HEADER' to define inline functions in .h files.
+ Use `inline static' to define inline functions in .c files.
+ See the Internals manual for examples and more information. */
+
/* Does the keyword `inline' exist? */
-#undef HAVE_INLINE
#undef inline
-# ifdef HAVE_INLINE
-# ifdef __GNUC__
-# ifdef DONT_EXTERN_INLINE_FUNCTIONS
-# define INLINE inline
-# else
-# define INLINE extern inline
-# endif
-# else
-# define INLINE static inline
-# endif /* __GNUC__ */
-# else
-# define INLINE static
-# endif /* HAVE_INLINE */
-#endif /* not C++ */
-#endif /* C code */
+#if defined (__cplusplus) || ! defined (__GNUC__)
+# define INLINE_HEADER inline static
+#elif defined (DONT_EXTERN_INLINE_HEADER_FUNCTIONS)
+# define INLINE_HEADER inline
+#else
+# define INLINE_HEADER inline extern
+#endif
#if defined (__cplusplus) && !defined (NOT_C_CODE)
/* Avoid C++ keywords used as ordinary C identifiers */
/* Console functions for mswindows.
- Copyright (C) 1996 Ben Wing.
+ Copyright (C) 1996, 2000 Ben Wing.
This file is part of XEmacs.
#include <config.h>
#include "lisp.h"
+#include "events.h"
+#include "opaque.h"
#include "console-msw.h"
return 1;
}
+static HWND msw_console_hwnd = 0;
+
+#define KLUDGE_BUFSIZE 1024 /* buffer size for console window titles */
+
+/* Direct from the horse's mouth: Microsoft KB article Q124103 */
+static HWND
+GetConsoleHwnd (void)
+{
+ HWND hwndFound; /* this is what is returned to the caller */
+ char pszNewWindowTitle[KLUDGE_BUFSIZE]; /* contains fabricated WindowTitle */
+ char pszOldWindowTitle[KLUDGE_BUFSIZE]; /* contains original WindowTitle */
+
+ /* fetch current window title */
+
+ GetConsoleTitle(pszOldWindowTitle, KLUDGE_BUFSIZE);
+
+ /* format a "unique" NewWindowTitle */
+
+ wsprintf(pszNewWindowTitle,"%d/%d",
+ GetTickCount(),
+ GetCurrentProcessId());
+
+ /* change current window title */
+
+ SetConsoleTitle(pszNewWindowTitle);
+
+ /* ensure window title has been updated */
+
+ Sleep(40);
+
+ /* look for NewWindowTitle */
+
+ hwndFound=FindWindow(NULL, pszNewWindowTitle);
+
+ /* restore original window title */
+
+ SetConsoleTitle(pszOldWindowTitle);
+
+ return(hwndFound);
+}
+
+HWND
+msw_get_console_hwnd (void)
+{
+ if (!msw_console_hwnd)
+ msw_console_hwnd = GetConsoleHwnd ();
+ return msw_console_hwnd;
+}
+
+int
+msw_ensure_console_allocated (void)
+{
+ HWND fgwin = GetForegroundWindow ();
+ /* stupid mswin api won't let you create the console window
+ hidden! creating it changes the focus! fuck me! */
+ if (AllocConsole ())
+ {
+ SetForegroundWindow (fgwin);
+ return 1;
+ }
+ return 0;
+}
+
static Lisp_Object
mswindows_canonicalize_console_connection (Lisp_Object connection,
Error_behavior errb)
return mswindows_canonicalize_console_connection (connection, errb);
}
-\f
-/************************************************************************/
-/* initialization */
-/************************************************************************/
-
void
-syms_of_console_mswindows (void)
+msw_hide_console (void)
{
+ ShowWindow (msw_get_console_hwnd (), SW_HIDE);
}
void
-console_type_create_mswindows (void)
+msw_show_console (void)
{
- INITIALIZE_CONSOLE_TYPE (mswindows, "mswindows", "console-mswindows-p");
+ HWND hwnd = msw_get_console_hwnd ();
+ ShowWindow (hwnd, SW_SHOWNA);
+
+ /* I tried to raise the window to the top without activating
+ it, but this fails. Apparently Windows just doesn't like
+ having the active window not be on top. So instead, we
+ at least put it just below our own window, where part of it
+ will likely be seen. */
+ SetWindowPos (hwnd, GetForegroundWindow (), 0, 0, 0, 0,
+ SWP_NOSIZE | SWP_NOMOVE | SWP_NOSENDCHANGING |
+ SWP_NOACTIVATE);
+}
- /* console methods */
-/* CONSOLE_HAS_METHOD (mswindows, init_console); */
-/* CONSOLE_HAS_METHOD (mswindows, mark_console); */
- CONSOLE_HAS_METHOD (mswindows, initially_selected_for_input);
-/* CONSOLE_HAS_METHOD (mswindows, delete_console); */
- CONSOLE_HAS_METHOD (mswindows, canonicalize_console_connection);
- CONSOLE_HAS_METHOD (mswindows, canonicalize_device_connection);
-/* CONSOLE_HAS_METHOD (mswindows, semi_canonicalize_console_connection); */
-/* CONSOLE_HAS_METHOD (mswindows, semi_canonicalize_device_connection); */
+static int msw_console_buffered = 0;
+HANDLE msw_console_buffer;
- INITIALIZE_CONSOLE_TYPE (msprinter, "msprinter", "console-msprinter-p");
+static void
+msw_ensure_console_buffered (void)
+{
+ if (!msw_console_buffered)
+ {
+ COORD new_size;
+
+ new_size.X = 80;
+ new_size.Y = 1000;
+ msw_ensure_console_allocated ();
+ msw_console_buffer =
+ CreateConsoleScreenBuffer (GENERIC_WRITE, 0, NULL,
+ CONSOLE_TEXTMODE_BUFFER, NULL);
+ SetConsoleScreenBufferSize (msw_console_buffer, new_size);
+ SetConsoleActiveScreenBuffer (msw_console_buffer);
+ msw_console_buffered = 1;
+ }
}
-void
-reinit_console_type_create_mswindows (void)
+int
+msw_output_console_string (CONST Extbyte *str, Extcount len)
{
- REINITIALIZE_CONSOLE_TYPE (mswindows);
- REINITIALIZE_CONSOLE_TYPE (msprinter);
+ DWORD num_written;
+
+ msw_ensure_console_buffered ();
+ msw_show_console ();
+ return WriteConsole (msw_console_buffer, str, len, &num_written, NULL);
}
-void
-vars_of_console_mswindows (void)
+/* Determine if running on Windows 9x and not NT */
+int
+msw_windows9x_p (void)
{
- Fprovide (Qmswindows);
+ return GetVersion () & 0x80000000;
}
#ifdef DEBUG_XEMACS
-#include "events.h"
-#include "opaque.h"
+
/*
* Random helper functions for debugging.
* Intended for use in the MSVC "Watch" window which doesn't like
}
#endif /* DEBUG_XEMACS */
+
+
+\f
+/************************************************************************/
+/* initialization */
+/************************************************************************/
+
+void
+syms_of_console_mswindows (void)
+{
+}
+
+void
+console_type_create_mswindows (void)
+{
+ INITIALIZE_CONSOLE_TYPE (mswindows, "mswindows", "console-mswindows-p");
+
+ /* console methods */
+/* CONSOLE_HAS_METHOD (mswindows, init_console); */
+/* CONSOLE_HAS_METHOD (mswindows, mark_console); */
+ CONSOLE_HAS_METHOD (mswindows, initially_selected_for_input);
+/* CONSOLE_HAS_METHOD (mswindows, delete_console); */
+ CONSOLE_HAS_METHOD (mswindows, canonicalize_console_connection);
+ CONSOLE_HAS_METHOD (mswindows, canonicalize_device_connection);
+/* CONSOLE_HAS_METHOD (mswindows, semi_canonicalize_console_connection); */
+/* CONSOLE_HAS_METHOD (mswindows, semi_canonicalize_device_connection); */
+
+ INITIALIZE_CONSOLE_TYPE (msprinter, "msprinter", "console-msprinter-p");
+}
+
+void
+reinit_console_type_create_mswindows (void)
+{
+ REINITIALIZE_CONSOLE_TYPE (mswindows);
+ REINITIALIZE_CONSOLE_TYPE (msprinter);
+}
+
+void
+vars_of_console_mswindows (void)
+{
+ Fprovide (Qmswindows);
+}
#define INCLUDED_console_msw_h_
#include "console.h"
-#ifdef CONST /* I suspect this is safe */
-#undef CONST
-#endif
#include <windows.h>
#include <ddeml.h> /* DDE management library */
#if !defined(__CYGWIN32__) && !defined(__MINGW32__) \
#include <X11/xpm.h>
#endif
-/*
- * XXX FIXME: The following X modifier defs in events-mod.h clash with win32
- * hotkey defs in winuser.h. For the moment lose the win32 versions.
- * Maybe we should rename all of MOD_* to something that doesn't clash.
- */
-#ifdef MOD_CONTROL
-# undef MOD_CONTROL
-#endif
-#ifdef MOD_ALT
-# undef MOD_ALT
-#endif
-#ifdef MOD_SHIFT
-# undef MOD_SHIFT
-#endif
-
-
/* The name of the main window class */
#define XEMACS_CLASS "XEmacs"
int horzsize, vertsize; /* Size in mm */
int bitspixel;
Lisp_Object fontlist; /* List of strings, device fonts */
+ HDC hcdc; /* Compatible DC */
};
#define DEVICE_MSWINDOWS_DATA(d) DEVICE_TYPE_DATA (d, mswindows)
#define DEVICE_MSWINDOWS_VERTSIZE(d) (DEVICE_MSWINDOWS_DATA (d)->vertsize)
#define DEVICE_MSWINDOWS_BITSPIXEL(d) (DEVICE_MSWINDOWS_DATA (d)->bitspixel)
#define DEVICE_MSWINDOWS_FONTLIST(d) (DEVICE_MSWINDOWS_DATA (d)->fontlist)
+#define DEVICE_MSWINDOWS_HCDC(d) (DEVICE_MSWINDOWS_DATA (d)->hcdc)
struct msprinter_device
{
- HDC hdc;
+ HDC hdc, hcdc; /* Printer and the comp. DCs */
HANDLE hprinter;
Lisp_Object fontlist;
char* name;
#define DEVICE_MSPRINTER_DATA(d) DEVICE_TYPE_DATA (d, msprinter)
#define DEVICE_MSPRINTER_HDC(d) (DEVICE_MSPRINTER_DATA (d)->hdc)
+#define DEVICE_MSPRINTER_HCDC(d) (DEVICE_MSPRINTER_DATA (d)->hcdc)
#define DEVICE_MSPRINTER_HPRINTER(d) (DEVICE_MSPRINTER_DATA (d)->hprinter)
#define DEVICE_MSPRINTER_FONTLIST(d) (DEVICE_MSPRINTER_DATA (d)->fontlist)
#define DEVICE_MSPRINTER_NAME(d) (DEVICE_MSPRINTER_DATA (d)->name)
#define CHECK_MSPRINTER_DEVICE(z) CHECK_DEVICE_TYPE (z, msprinter)
#define CONCHECK_MSPRINTER_DEVICE(z) CONCHECK_DEVICE_TYPE (z, msprinter)
-/* Printer functions */
+/* Printer functions in device-msw.c */
DEVMODE* msprinter_get_devmode_copy (struct device *d);
void msprinter_apply_devmode (struct device *d, DEVMODE *devmode);
+/* Printer functions in frame-msw.c */
+void msprinter_start_page (struct frame *f);
+
+/* Common checks */
+
+#define DEVICE_MSGDI_P(dev) (DEVICE_MSWINDOWS_P(dev) || DEVICE_MSPRINTER_P(dev))
+#define CHECK_MSGDI_DEVICE(d) \
+ do { \
+ CHECK_DEVICE (d); \
+ if (!(DEVICEP (d) && DEVICE_MSGDI_P(XDEVICE(d)))) \
+ dead_wrong_type_argument \
+ (list3 (Qor, Qmswindows, Qmsprinter), d); \
+ } while (0)
+#define CONCHECK_MSGDI_DEVICE(d) \
+ do { \
+ CHECK_DEVICE (d); \
+ if (!(DEVICEP (d) && DEVICE_MSGDI_P(XDEVICE(d)))) \
+ wrong_type_argument \
+ (list3 (Qor, Qmswindows, Qmsprinter), d); \
+ } while (0)
+
/*
* Frame
*/
/* DC for this win32 window */
HDC hdc;
- /* compatible DC for bitmap operations */
- HDC cdc;
-
/* Time of last click event, for button 2 emul */
DWORD last_click_time;
unsigned int menu_checksum;
/* Widget glyphs attached to this frame. See glyphs-msw.c */
- Lisp_Object widget_hash_table;
+ Lisp_Object widget_hash_table1, widget_hash_table2, widget_hash_table3;
/* Frame title hash value. See frame-msw.c */
unsigned int title_checksum;
int ignore_next_lbutton_up : 1;
int ignore_next_rbutton_up : 1;
int sizing : 1;
+ int paint_pending : 1; /* Whether a WM_PAINT magic event has been queued */
/* Geometry, in characters, as specified by proplist during frame
creation. Memebers are set to -1 for unspecified */
#define FRAME_MSWINDOWS_HANDLE(f) (FRAME_MSWINDOWS_DATA (f)->hwnd)
#define FRAME_MSWINDOWS_DC(f) (FRAME_MSWINDOWS_DATA (f)->hdc)
-#define FRAME_MSWINDOWS_CDC(f) (FRAME_MSWINDOWS_DATA (f)->cdc)
#define FRAME_MSWINDOWS_MENU_HASH_TABLE(f) (FRAME_MSWINDOWS_DATA (f)->menu_hash_table)
#define FRAME_MSWINDOWS_TOOLBAR_HASH_TABLE(f) \
(FRAME_MSWINDOWS_DATA (f)->toolbar_hash_table)
-#define FRAME_MSWINDOWS_WIDGET_HASH_TABLE(f) \
- (FRAME_MSWINDOWS_DATA (f)->widget_hash_table)
+#define FRAME_MSWINDOWS_WIDGET_HASH_TABLE1(f) \
+ (FRAME_MSWINDOWS_DATA (f)->widget_hash_table1)
+#define FRAME_MSWINDOWS_WIDGET_HASH_TABLE2(f) \
+ (FRAME_MSWINDOWS_DATA (f)->widget_hash_table2)
+#define FRAME_MSWINDOWS_WIDGET_HASH_TABLE3(f) \
+ (FRAME_MSWINDOWS_DATA (f)->widget_hash_table3)
#define FRAME_MSWINDOWS_TOOLBAR_CHECKSUM(f,pos) \
(FRAME_MSWINDOWS_DATA (f)->toolbar_checksum[pos])
#define FRAME_MSWINDOWS_MENU_CHECKSUM(f) (FRAME_MSWINDOWS_DATA (f)->menu_checksum)
struct msprinter_frame
{
- HDC hcdc; /* Compatoble DC */
int left_margin, top_margin, /* All in twips */
right_margin, bottom_margin;
int charheight, charwidth; /* As per proplist or -1 if not gven */
Lisp_Object orientation, duplex; /* nil for printer's default */
int job_started : 1;
+ int page_started : 1;
};
#define FRAME_MSPRINTER_DATA(f) FRAME_TYPE_DATA (f, msprinter)
#define FRAME_MSPRINTER_RIGHT_MARGIN(f) (FRAME_MSPRINTER_DATA (f)->top_margin)
#define FRAME_MSPRINTER_TOP_MARGIN(f) (FRAME_MSPRINTER_DATA (f)->right_margin)
#define FRAME_MSPRINTER_BOTTOM_MARGIN(f) (FRAME_MSPRINTER_DATA (f)->bottom_margin)
-#define FRAME_MSPRINTER_CDC(f) (FRAME_MSPRINTER_DATA (f)->hcdc)
#define FRAME_MSPRINTER_JOB_STARTED(f) (FRAME_MSPRINTER_DATA (f)->job_started)
+#define FRAME_MSPRINTER_PAGE_STARTED(f) (FRAME_MSPRINTER_DATA (f)->page_started)
#define FRAME_MSPRINTER_ORIENTATION(f) (FRAME_MSPRINTER_DATA (f)->orientation)
#define FRAME_MSPRINTER_DUPLEX(f) (FRAME_MSPRINTER_DATA (f)->duplex)
#define FRAME_MSPRINTER_CHARWIDTH(f) (FRAME_MSPRINTER_DATA (f)->charheight)
extern HSZ mswindows_dde_topic_system;
extern HSZ mswindows_dde_item_open;
HDDEDATA CALLBACK mswindows_dde_callback (UINT uType, UINT uFmt, HCONV hconv,
- HSZ hszTopic, HSZ hszItem, HDDEDATA hdata,
+ HSZ hszTopic, HSZ hszItem,
+ HDDEDATA hdata,
DWORD dwData1, DWORD dwData2);
+void mswindows_enqueue_dispatch_event (Lisp_Object event);
void mswindows_enqueue_misc_user_event (Lisp_Object channel,
Lisp_Object function,
Lisp_Object object);
Lisp_Object mswindows_cancel_dispatch_event (Lisp_Event* event);
Lisp_Object mswindows_pump_outstanding_events (void);
-Lisp_Object mswindows_protect_modal_loop (Lisp_Object (*bfun) (Lisp_Object barg),
+Lisp_Object mswindows_protect_modal_loop (Lisp_Object (*bfun)
+ (Lisp_Object barg),
Lisp_Object barg);
void mswindows_unmodalize_signal_maybe (void);
-#ifdef HAVE_TOOLBARS
-Lisp_Object
-mswindows_get_toolbar_button_text ( struct frame* f, int command_id );
-Lisp_Object
-mswindows_handle_toolbar_wm_command (struct frame* f, HWND ctrl, WORD id);
-#endif
-Lisp_Object
-mswindows_handle_gui_wm_command (struct frame* f, HWND ctrl, DWORD id);
-COLORREF mswindows_string_to_color (CONST char *name);
+COLORREF mswindows_string_to_color (const char *name);
USID emacs_mswindows_create_stream_pair (void* inhandle, void* outhandle,
Lisp_Object* instream,
Lisp_Object* outstream,
extern Lisp_Object Vmswindows_frame_being_created;
extern Lisp_Object mswindows_frame_being_created;
+void msw_get_workspace_coords (RECT *rc);
+
+HWND msw_get_console_hwnd (void);
+void msw_hide_console (void);
+void msw_show_console (void);
+int msw_output_console_string (CONST Extbyte *str, Extcount len);
+
Lisp_Object mswindows_enumerate_fonts (HDC hdc);
+int msw_char_is_accelerator (struct frame *f, Emchar ch);
+Bytecount msw_translate_menu_or_dialog_item (Bufbyte *item, Bytecount len,
+ Bytecount maxlen, Emchar *accel,
+ Lisp_Object error_name);
+
+#ifdef HAVE_TOOLBARS
Lisp_Object mswindows_get_toolbar_button_text (struct frame* f,
int command_id);
Lisp_Object mswindows_handle_toolbar_wm_command (struct frame* f,
HWND ctrl, WORD id);
+#endif
Lisp_Object mswindows_handle_gui_wm_command (struct frame* f,
- HWND ctrl, DWORD id);
+ HWND ctrl, LPARAM id);
+
+int msw_windows9x_p (void);
#endif /* INCLUDED_console_msw_h_ */
\f
static int
stream_text_width (struct frame *f, struct face_cachel *cachel,
- CONST Emchar *str, Charcount len)
+ const Emchar *str, Charcount len)
{
return len;
}
#ifndef PDUMP
void
-init_console_stream (void)
+init_console_stream (int reinit)
{
/* This function can GC */
if (!initialized)
#else
void
-init_console_stream (void)
+init_console_stream (int reinit)
{
/* 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 (!reinit)
+ {
+ 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);
tty_con->instream = make_filedesc_input_stream (tty_con->infd, 0, -1, 0);
tty_con->outstream = make_filedesc_output_stream (tty_con->outfd, 0, -1, 0);
-#ifdef MULE
+#ifdef FILE_CODING
tty_con->instream =
make_decoding_input_stream (XLSTREAM (tty_con->instream),
- Fget_coding_system (Vkeyboard_coding_system));
+ Fget_coding_system (Qkeyboard));
Lstream_set_character_mode (XLSTREAM (tty_con->instream));
tty_con->outstream =
make_encoding_output_stream (XLSTREAM (tty_con->outstream),
- Fget_coding_system (Vterminal_coding_system));
-#endif /* MULE */
+ Fget_coding_system (Qterminal));
+#endif /* FILE_CODING */
tty_con->terminal_type = terminal_type;
tty_con->controlling_process = controlling_process;
{
set_decoding_stream_coding_system
(XLSTREAM (CONSOLE_TTY_DATA (decode_tty_console (console))->instream),
- Fget_coding_system (NILP (codesys) ? Vkeyboard_coding_system : codesys));
+ Fget_coding_system (NILP (codesys) ? Qkeyboard : codesys));
return Qnil;
}
{
set_encoding_stream_coding_system
(XLSTREAM (CONSOLE_TTY_DATA (decode_tty_console (console))->outstream),
- Fget_coding_system (NILP (codesys) ? Vterminal_coding_system : codesys));
+ Fget_coding_system (NILP (codesys) ? Qterminal : codesys));
/* Redraw tty */
face_property_was_changed (Vdefault_face, Qfont, Qtty);
return Qnil;
struct
{
/* local cursor movement */
- CONST char *up; /* cuu1, up */
- CONST char *down; /* cud1, do */
- CONST char *left; /* cub1, le */
- CONST char *right; /* cuf1, nd */
- CONST char *home; /* home, ho */
- CONST char *low_left; /* ll, ll */
- CONST char *car_return; /* cr, cr */
+ const char *up; /* cuu1, up */
+ const char *down; /* cud1, do */
+ const char *left; /* cub1, le */
+ const char *right; /* cuf1, nd */
+ const char *home; /* home, ho */
+ const char *low_left; /* ll, ll */
+ const char *car_return; /* cr, cr */
/* parameterized local cursor movement */
- CONST char *multi_up; /* cuu, UP */
- CONST char *multi_down; /* cud, DO */
- CONST char *multi_left; /* cub, LE */
- CONST char *multi_right; /* cuf, RI */
+ const char *multi_up; /* cuu, UP */
+ const char *multi_down; /* cud, DO */
+ const char *multi_left; /* cub, LE */
+ const char *multi_right; /* cuf, RI */
/* absolute cursor motion */
- CONST char *abs; /* cup, cm */
- CONST char *hor_abs; /* hpa, ch */
- CONST char *ver_abs; /* vpa, cv */
+ const char *abs; /* cup, cm */
+ const char *hor_abs; /* hpa, ch */
+ const char *ver_abs; /* vpa, cv */
/* scrolling */
- CONST char *scroll_forw; /* ind, sf */
- CONST char *scroll_back; /* ri, sr */
- CONST char *multi_scroll_forw; /* indn, SF */
- CONST char *multi_scroll_back; /* rin, SR */
- CONST char *set_scroll_region; /* csr, cs */
+ const char *scroll_forw; /* ind, sf */
+ const char *scroll_back; /* ri, sr */
+ const char *multi_scroll_forw; /* indn, SF */
+ const char *multi_scroll_back; /* rin, SR */
+ const char *set_scroll_region; /* csr, cs */
} cm;
/* screen editing entries - each entry is commented with the
struct
{
/* adding to the screen */
- CONST char *ins_line; /* il1, al */
- CONST char *multi_ins_line; /* il, AL */
- CONST char *repeat; /* rep, rp */
- CONST char *begin_ins_mode; /* smir, im */
- CONST char *end_ins_mode; /* rmir, ei */
- CONST char *ins_char; /* ich1, ic */
- CONST char *multi_ins_char; /* ich, IC */
- CONST char *insert_pad; /* ip, ip */
+ const char *ins_line; /* il1, al */
+ const char *multi_ins_line; /* il, AL */
+ const char *repeat; /* rep, rp */
+ const char *begin_ins_mode; /* smir, im */
+ const char *end_ins_mode; /* rmir, ei */
+ const char *ins_char; /* ich1, ic */
+ const char *multi_ins_char; /* ich, IC */
+ const char *insert_pad; /* ip, ip */
/* deleting from the screen */
- CONST char *clr_frame; /* clear, cl */
- CONST char *clr_from_cursor; /* ed, cd */
- CONST char *clr_to_eol; /* el, ce */
- CONST char *del_line; /* dl1, dl */
- CONST char *multi_del_line; /* dl, DL */
- CONST char *del_char; /* dch1, dc */
- CONST char *multi_del_char; /* dch, DC */
- CONST char *begin_del_mode; /* smdc, dm */
- CONST char *end_del_mode; /* rmdc, ed */
- CONST char *erase_at_cursor; /* ech, ec */
+ const char *clr_frame; /* clear, cl */
+ const char *clr_from_cursor; /* ed, cd */
+ const char *clr_to_eol; /* el, ce */
+ const char *del_line; /* dl1, dl */
+ const char *multi_del_line; /* dl, DL */
+ const char *del_char; /* dch1, dc */
+ const char *multi_del_char; /* dch, DC */
+ const char *begin_del_mode; /* smdc, dm */
+ const char *end_del_mode; /* rmdc, ed */
+ const char *erase_at_cursor; /* ech, ec */
} se;
/* screen display entries - each entry is commented with the
terminfo and termcap entry */
struct
{
- CONST char *begin_standout; /* smso, so */
- CONST char *end_standout; /* rmso, se */
- CONST char *begin_underline; /* smul, us */
- CONST char *end_underline; /* rmul, ue */
- CONST char *begin_alternate; /* smacs, as */
- CONST char *end_alternate; /* rmacs, ae */
-
- CONST char *turn_on_reverse; /* rev, mr */
- CONST char *turn_on_blinking; /* blink, mb */
- CONST char *turn_on_bold; /* bold, md */
- CONST char *turn_on_dim; /* dim, mh */
- CONST char *turn_off_attributes; /* sgr0, me */
-
- CONST char *visual_bell; /* flash, vb */
- CONST char *audio_bell; /* bel, bl */
-
- CONST char *cursor_visible; /* cvvis, vs */
- CONST char *cursor_normal; /* cnorm, ve */
- CONST char *init_motion; /* smcup, ti */
- CONST char *end_motion; /* rmcup, te */
- CONST char *keypad_on; /* smkx, ks */
- CONST char *keypad_off; /* rmkx, ke */
-
- CONST char *orig_pair; /* op, op */
+ const char *begin_standout; /* smso, so */
+ const char *end_standout; /* rmso, se */
+ const char *begin_underline; /* smul, us */
+ const char *end_underline; /* rmul, ue */
+ const char *begin_alternate; /* smacs, as */
+ const char *end_alternate; /* rmacs, ae */
+
+ const char *turn_on_reverse; /* rev, mr */
+ const char *turn_on_blinking; /* blink, mb */
+ const char *turn_on_bold; /* bold, md */
+ const char *turn_on_dim; /* dim, mh */
+ const char *turn_off_attributes; /* sgr0, me */
+
+ const char *visual_bell; /* flash, vb */
+ const char *audio_bell; /* bel, bl */
+
+ const char *cursor_visible; /* cvvis, vs */
+ const char *cursor_normal; /* cnorm, ve */
+ const char *init_motion; /* smcup, ti */
+ const char *end_motion; /* rmcup, te */
+ const char *keypad_on; /* smkx, ks */
+ const char *keypad_off; /* rmkx, ke */
+
+ const char *orig_pair; /* op, op */
} sd;
/* costs of various operations */
static Lisp_Object
get_display_arg_connection (void)
{
- CONST char *disp_name;
+ const char *disp_name;
/* If the user didn't explicitly specify a display to use when
they called make-x-device, then we first check to see if a
/* Check for a couple of standard special cases */
if (string_byte (XSTRING (connection), 0) == ':')
connection = concat2 (build_string ("localhost"), connection);
- else if (!strncmp ((CONST char *) XSTRING_DATA (connection),
+ else if (!strncmp ((const char *) XSTRING_DATA (connection),
"unix:", 5))
connection = concat2 (build_string ("localhost:"),
Fsubstring (connection, make_int (5), Qnil));
split_up_display_spec (connection, &hostname_length, &display_length,
&screen_length);
- screen_str = build_string ((CONST char *) XSTRING_DATA (connection)
+ screen_str = build_string ((const char *) XSTRING_DATA (connection)
+ hostname_length + display_length);
connection = x_canonicalize_console_connection (connection, errb);
void x_wm_set_cell_size (Widget wmshell, int cw, int ch);
void x_wm_set_variable_size (Widget wmshell, int width, int height);
-CONST char *x_event_name (int event_type);
+const char *x_event_name (int event_type);
int x_error_handler (Display *disp, XErrorEvent *event);
void expect_x_error (Display *dpy);
int x_error_occurred_p (Display *dpy);
void
syms_of_console (void)
{
+ INIT_LRECORD_IMPLEMENTATION (console);
+
DEFSUBR (Fvalid_console_type_p);
DEFSUBR (Fconsole_type_list);
DEFSUBR (Fcdfw_console);
}
/* The docstrings for DEFVAR_* are recorded externally by make-docfile. */
-
-/* Declaring this stuff as const produces 'Cannot reinitialize' messages
- from SunPro C's fix-and-continue feature (a way neato feature that
- makes debugging unbelievably more bearable) */
#define DEFVAR_CONSOLE_LOCAL_1(lname, field_name, forward_type, magicfun) do { \
- static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \
- = { { { symbol_value_forward_lheader_initializer, \
- (struct lcrecord_header *) &(console_local_flags.field_name), 69 }, \
- forward_type }, magicfun }; \
+ static const struct symbol_value_forward I_hate_C = \
+ { /* struct symbol_value_forward */ \
+ { /* struct symbol_value_magic */ \
+ { /* struct lcrecord_header */ \
+ { /* struct lrecord_header */ \
+ lrecord_type_symbol_value_forward, /* lrecord_type_index */ \
+ 1, /* mark bit */ \
+ 1, /* c_readonly bit */ \
+ 1 /* lisp_readonly bit */ \
+ }, \
+ 0, /* next */ \
+ 0, /* uid */ \
+ 0 /* free */ \
+ }, \
+ &(console_local_flags.field_name), \
+ forward_type \
+ }, \
+ magicfun \
+ }; \
+ \
{ \
int offset = ((char *)symbol_value_forward_forward (&I_hate_C) \
- (char *)&console_local_flags); \
*/ );
#endif
- /* While this should be CONST it can't be because some things
+ /* While this should be const it can't be because some things
(i.e. edebug) do manipulate it. */
DEFVAR_CONSOLE_LOCAL ("defining-kbd-macro", defining_kbd_macro /*
-Non-nil while a console macro is being defined. Don't set this!
+Non-nil while a keyboard macro is being defined. Don't set this!
*/ );
DEFVAR_CONSOLE_LOCAL ("last-kbd-macro", last_kbd_macro /*
-Last kbd macro defined, as a vector of events; nil if none defined.
+Last keyboard macro defined, as a vector of events; nil if none defined.
*/ );
DEFVAR_CONSOLE_LOCAL ("prefix-arg", prefix_arg /*
struct console_methods
{
- CONST char *name; /* Used by print_console, print_device, print_frame */
+ const char *name; /* Used by print_console, print_device, print_frame */
Lisp_Object symbol;
Lisp_Object predicate_symbol;
Lisp_Object (*get_frame_parent_method) (struct frame *f);
void (*update_frame_external_traits_method) (struct frame *f, Lisp_Object name);
int (*frame_size_fixed_p_method) (struct frame *f);
+ void (*eject_page_method) (struct frame *f);
/* redisplay methods */
int (*left_margin_width_method) (struct window *);
int (*right_margin_width_method) (struct window *);
int (*text_width_method) (struct frame *f, struct face_cachel *cachel,
- CONST Emchar *str, Charcount len);
+ const Emchar *str, Charcount len);
void (*output_display_block_method) (struct window *, struct display_line *,
int, int, int, int, int, int, int);
int (*divider_height_method) (void);
Lisp_Object charset);
int (*font_spec_matches_charset_method) (struct device *d,
Lisp_Object charset,
- CONST Bufbyte *nonreloc,
+ const Bufbyte *nonreloc,
Lisp_Object reloc,
Bytecount offset,
Bytecount length);
struct display_glyph_area* dga);
void (*resize_subwindow_method) (Lisp_Image_Instance *, int w, int h);
void (*update_subwindow_method) (Lisp_Image_Instance *);
+ void (*update_widget_method) (Lisp_Image_Instance *);
int (*image_instance_equal_method) (Lisp_Image_Instance *,
Lisp_Image_Instance *,
int depth);
#define CONSOLE_TYPE_P(con, type) EQ (CONSOLE_TYPE (con), Q##type)
#ifdef ERROR_CHECK_TYPECHECK
-INLINE struct console *
+INLINE_HEADER struct console *
error_check_console_type (struct console *con, Lisp_Object sym);
-INLINE struct console *
+INLINE_HEADER struct console *
error_check_console_type (struct console *con, Lisp_Object sym)
{
assert (EQ (CONSOLE_TYPE (con), sym));
*/
(subr))
{
- CONST char *prompt;
+ const char *prompt;
CHECK_SUBR (subr);
prompt = XSUBR (subr)->prompt;
return prompt ? list2 (Qinteractive, build_string (prompt)) : Qnil;
{
CHECK_CHAR_COERCE_INT (newval);
if (idx >= XSTRING_CHAR_LENGTH (array)) goto range_error;
- set_string_char (XSTRING (array), idx, XCHAR (newval));
+ set_string_char (XSTRING (array), idx, (unsigned char) XCHAR (newval));
bump_string_modiff (array);
}
else
void
syms_of_data (void)
{
+ INIT_LRECORD_IMPLEMENTATION (weak_list);
+
defsymbol (&Qquote, "quote");
defsymbol (&Qlambda, "lambda");
defsymbol (&Qlistp, "listp");
#endif /* WE_DONT_NEED_QUADS */
#endif /* HAVE_INTTYPES_H */
#endif /* !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1) */
-#include DB_H_PATH /* Berkeley db's header file */
+#include DB_H_FILE /* Berkeley db's header file */
#ifndef DB_VERSION_MAJOR
# define DB_VERSION_MAJOR 1
#endif /* DB_VERSION_MAJOR */
void
syms_of_database (void)
{
+ INIT_LRECORD_IMPLEMENTATION (database);
+
defsymbol (&Qdatabasep, "databasep");
#ifdef HAVE_DBM
defsymbol (&Qdbm, "dbm");
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* This file is only necessary to get INLINE handling correct.
+/* This file is only necessary to get inline handling correct.
See inline.c */
#ifndef INCLUDED_database_h_
LISP_H = lisp.h config.h $(LISP_UNION_H)
#ifdef HAVE_MS_WINDOWS
console-msw.o: $(LISP_H) conslots.h console-msw.h console.h events.h lisp-disunion.h lisp-union.h lrecord.h opaque.h symeval.h symsinit.h systime.h
-device-msw.o: $(LISP_H) buffer.h bufslots.h 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 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) 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 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 toolbar.h
-menubar-msw.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h commands.h conslots.h console-msw.h console.h device.h elhash.h events.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h menubar-msw.h menubar.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
-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
+device-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console-stream.h console.h device.h events.h faces.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h systime.h toolbar.h
+dialog-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h device.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h
+dired-msw.o: $(LISP_H) buffer.h bufslots.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h ndir.h nt.h regex.h symeval.h symsinit.h sysdir.h sysfile.h sysproc.h systime.h
+event-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console-tty.h console.h device.h dragdrop.h events-mod.h events.h faces.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h lstream.h menubar-msw.h menubar.h mule-charset.h objects-msw.h objects.h process.h redisplay.h scrollbar-msw.h scrollbar.h select.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h toolbar.h
+frame-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h device.h elhash.h events.h faces.h frame.h frameslots.h glyphs-msw.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h
+glyphs-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h device.h elhash.h faces.h file-coding.h frame.h frameslots.h glyphs-msw.h glyphs.h gui.h imgproc.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h objects-msw.h objects.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h toolbar.h window.h winslots.h
+gui-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h device.h elhash.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h
+menubar-msw.o: $(LISP_H) buffer.h bufslots.h commands.h conslots.h console-msw.h console.h device.h elhash.h events.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h menubar-msw.h menubar.h mule-charset.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h
+objects-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h device.h hash.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects-msw.h objects.h specifier.h symeval.h symsinit.h
+redisplay-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h debug.h device.h events.h faces.h frame.h frameslots.h glyphs-msw.h glyphs.h gui.h gutter.h lisp-disunion.h lisp-union.h lrecord.h mule-ccl.h mule-charset.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h systime.h toolbar.h window.h winslots.h
scrollbar-msw.o: $(LISP_H) conslots.h console-msw.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h redisplay.h scrollbar-msw.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h
select-msw.o: $(LISP_H) conslots.h console-msw.h console.h device.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h redisplay.h scrollbar.h select.h specifier.h symeval.h symsinit.h toolbar.h
-toolbar-msw.o: $(LISP_H) buffer.h bufslots.h 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
+toolbar-msw.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h device.h elhash.h faces.h frame.h frameslots.h glyphs-msw.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
#endif
#ifdef HAVE_X_WINDOWS
balloon-x.o: $(LISP_H) balloon_help.h conslots.h console-x.h console.h device.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h xintrinsic.h
console-x.o: $(LISP_H) conslots.h console-x.h console.h lisp-disunion.h lisp-union.h lrecord.h process.h redisplay.h symeval.h symsinit.h xintrinsic.h
-device-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console-x.h console.h device.h elhash.h events.h faces.h frame.h frameslots.h glyphs-x.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h 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 redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysdll.h sysfile.h systime.h toolbar.h window.h winslots.h xgccache.h xintrinsic.h xintrinsicp.h xmu.h
-dialog-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h 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
-frame-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h EmacsManager.h EmacsShell.h ExternalShell.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 dragdrop.h events-mod.h events.h extents.h faces.h frame.h frameslots.h glyphs-x.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h 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 redisplay.h scrollbar-x.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h xintrinsic.h xintrinsicp.h xmprimitivep.h xmu.h
-glyphs-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h bitmaps.h buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console-x.h console.h device.h faces.h file-coding.h frame.h frameslots.h glyphs-x.h glyphs.h gui-x.h gui.h imgproc.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h 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 specifier.h symeval.h symsinit.h sysfile.h toolbar.h window.h winslots.h xintrinsic.h xmu.h
-gui-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h 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-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 toolbar.h xintrinsic.h
-input-method-xfs.o: $(LISP_H) EmacsFrame.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 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 xintrinsic.h
-input-method-xlib.o: $(LISP_H) EmacsFrame.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 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 xintrinsic.h
-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
+device-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h conslots.h console-x.h console.h device.h elhash.h events.h faces.h frame.h frameslots.h glyphs-x.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects-x.h objects.h offix-types.h offix.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysdll.h sysfile.h systime.h toolbar.h window.h winslots.h xgccache.h xintrinsic.h xintrinsicp.h xmu.h
+dialog-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h commands.h conslots.h console-x.h console.h device.h events.h frame.h frameslots.h glyphs.h gui-x.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h xintrinsic.h
+frame-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h EmacsManager.h EmacsShell.h ExternalShell.h buffer.h bufslots.h conslots.h console-x.h console.h device.h dragdrop.h events-mod.h events.h extents.h faces.h frame.h frameslots.h glyphs-x.h glyphs.h gui.h gutter.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects-x.h objects.h offix-types.h offix.h redisplay.h scrollbar-x.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h xintrinsic.h xintrinsicp.h xmprimitivep.h xmu.h
+glyphs-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h bitmaps.h buffer.h bufslots.h conslots.h console-x.h console.h device.h faces.h file-coding.h frame.h frameslots.h glyphs-x.h glyphs.h gui-x.h gui.h imgproc.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h objects-x.h objects.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h toolbar.h window.h winslots.h xintrinsic.h xmu.h
+gui-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h conslots.h console-x.h console.h device.h frame.h frameslots.h glyphs.h gui-x.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h xintrinsic.h
+input-method-xfs.o: $(LISP_H) EmacsFrame.h buffer.h bufslots.h conslots.h console-x.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h xintrinsic.h
+input-method-xlib.o: $(LISP_H) EmacsFrame.h buffer.h bufslots.h conslots.h console-x.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h xintrinsic.h
+menubar-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h commands.h conslots.h console-x.h console.h device.h events.h frame.h frameslots.h glyphs.h gui-x.h gui.h keymap.h lisp-disunion.h lisp-union.h lrecord.h menubar.h mule-charset.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h xintrinsic.h
+objects-x.o: $(LISP_H) buffer.h bufslots.h conslots.h console-x.h console.h device.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects-x.h objects.h specifier.h symeval.h symsinit.h xintrinsic.h
+redisplay-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h buffer.h bufslots.h conslots.h console-x.h console.h debug.h device.h faces.h file-coding.h frame.h frameslots.h glyphs-x.h glyphs.h gui.h gutter.h lisp-disunion.h lisp-union.h lrecord.h mule-ccl.h mule-charset.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysproc.h systime.h toolbar.h window.h winslots.h xgccache.h xintrinsic.h xintrinsicp.h xmprimitivep.h
scrollbar-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h conslots.h console-x.h console.h device.h frame.h frameslots.h glyphs-x.h glyphs.h gui-x.h gui.h lisp-disunion.h lisp-union.h lrecord.h redisplay.h scrollbar-x.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h xintrinsic.h
-select-x.o: $(LISP_H) buffer.h bufslots.h 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
+select-x.o: $(LISP_H) buffer.h bufslots.h conslots.h console-x.h console.h device.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects-x.h objects.h opaque.h redisplay.h scrollbar.h select.h specifier.h symeval.h symsinit.h systime.h toolbar.h xintrinsic.h
+toolbar-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h buffer.h bufslots.h conslots.h console-x.h console.h device.h faces.h frame.h frameslots.h glyphs-x.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h xintrinsic.h xintrinsicp.h xmprimitivep.h
#endif
#ifdef HAVE_DATABASE
-database.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h database.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 sysfile.h
+database.o: $(LISP_H) buffer.h bufslots.h database.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h sysfile.h
#endif
#ifdef MULE
-mule-canna.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 mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h symeval.h symsinit.h
-mule-ccl.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 mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-ccl.h mule-charset.h multibyte.h symeval.h symsinit.h
-mule-charset.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 lisp-disunion.h lisp-union.h lrecord.h lstream.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-ccl.h mule-charset.h multibyte.h symeval.h symsinit.h
-mule-mcpath.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 symeval.h symsinit.h sysfile.h
-mule-wnnfns.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 redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h window.h winslots.h
+mule-canna.o: $(LISP_H) buffer.h bufslots.h file-coding.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h
+mule-ccl.o: $(LISP_H) buffer.h bufslots.h file-coding.h lisp-disunion.h lisp-union.h lrecord.h mule-ccl.h mule-charset.h symeval.h symsinit.h
+mule-charset.o: $(LISP_H) buffer.h bufslots.h chartab.h conslots.h console.h device.h elhash.h faces.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-ccl.h mule-charset.h symeval.h symsinit.h
+mule-mcpath.o: $(LISP_H) buffer.h bufslots.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h sysfile.h
+mule-wnnfns.o: $(LISP_H) buffer.h bufslots.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h window.h winslots.h
mule.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h regex.h symeval.h symsinit.h
#endif
#ifdef EXTERNAL_WIDGET
extw-Xlib.o: config.h extw-Xlib.h
extw-Xt.o: config.h extw-Xlib.h extw-Xt.h
#endif
-EmacsFrame.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h EmacsManager.h buffer.h bufslots.h 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 xmu.h
+EmacsFrame.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h EmacsManager.h buffer.h bufslots.h conslots.h console-x.h console.h device.h faces.h frame.h frameslots.h glyphs-x.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h xintrinsic.h xintrinsicp.h xmprimitivep.h xmu.h
EmacsManager.o: EmacsManager.h EmacsManagerP.h config.h xintrinsicp.h xmmanagerp.h
EmacsShell-sub.o: EmacsShell.h EmacsShellP.h config.h xintrinsic.h xintrinsicp.h
EmacsShell.o: EmacsShell.h ExternalShell.h config.h xintrinsicp.h
-abbrev.o: $(LISP_H) buffer.h bufslots.h 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-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
+abbrev.o: $(LISP_H) buffer.h bufslots.h chartab.h commands.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h symeval.h symsinit.h syntax.h window.h winslots.h
+alloc.o: $(LISP_H) alloc.h backtrace.h buffer.h bufslots.h bytecode.h chartab.h conslots.h console-stream.h console.h device.h dumper.h elhash.h events.h extents.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h systime.h toolbar.h window.h winslots.h
alloca.o: config.h
balloon_help.o: balloon_help.h config.h xintrinsic.h
blocktype.o: $(LISP_H) blocktype.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
-buffer.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h commands.h conslots.h console.h device.h elhash.h extents.h faces.h file-coding.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h 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 syntax.h sysdep.h sysfile.h toolbar.h window.h winslots.h
-bytecode.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h char-1byte.h char-lb.h char-ucs.h character.h chartab.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 syntax.h
-callint.o: $(LISP_H) buffer.h bufslots.h bytecode.h char-1byte.h char-lb.h char-ucs.h character.h commands.h events.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 systime.h window.h winslots.h
-callproc.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h commands.h file-coding.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 nt.h process.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h window.h winslots.h
-casefiddle.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h chartab.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
-casetab.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 opaque.h symeval.h symsinit.h
-chartab.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h chartab.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
-cm.o: $(LISP_H) char-1byte.h char-lb.h char-ucs.h character.h conslots.h console-tty.h console.h device.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h lstream.h 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 systty.h toolbar.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
+buffer.o: $(LISP_H) buffer.h bufslots.h chartab.h commands.h conslots.h console.h device.h elhash.h extents.h faces.h file-coding.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syntax.h sysdep.h sysfile.h toolbar.h window.h winslots.h
+bytecode.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h chartab.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h opaque.h symeval.h symsinit.h syntax.h
+callint.o: $(LISP_H) buffer.h bufslots.h bytecode.h commands.h events.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h symeval.h symsinit.h systime.h window.h winslots.h
+callproc.o: $(LISP_H) buffer.h bufslots.h commands.h file-coding.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h nt.h process.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h window.h winslots.h
+casefiddle.o: $(LISP_H) buffer.h bufslots.h chartab.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h syntax.h
+casetab.o: $(LISP_H) buffer.h bufslots.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h opaque.h symeval.h symsinit.h
+chartab.o: $(LISP_H) buffer.h bufslots.h chartab.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h syntax.h
+cm.o: $(LISP_H) conslots.h console-tty.h console.h device.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syssignal.h systty.h toolbar.h
+cmdloop.o: $(LISP_H) buffer.h bufslots.h commands.h conslots.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h
+cmds.o: $(LISP_H) buffer.h bufslots.h chartab.h commands.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h syntax.h
console-stream.o: $(LISP_H) conslots.h console-stream.h console-tty.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h systime.h systty.h toolbar.h window.h winslots.h
-console-tty.o: $(LISP_H) buffer.h bufslots.h 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
+console-tty.o: $(LISP_H) buffer.h bufslots.h conslots.h console-stream.h console-tty.h console.h device.h faces.h file-coding.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h systty.h toolbar.h
+console.o: $(LISP_H) buffer.h bufslots.h conslots.h console-tty.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h syssignal.h systime.h systty.h toolbar.h window.h winslots.h
+data.o: $(LISP_H) buffer.h bufslots.h bytecode.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h sysfloat.h syssignal.h
debug.o: $(LISP_H) bytecode.h debug.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
-device-tty.o: $(LISP_H) buffer.h bufslots.h 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 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 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
-device.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 events.h faces.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 sysdep.h syssignal.h systime.h toolbar.h window.h winslots.h
+device-tty.o: $(LISP_H) buffer.h bufslots.h conslots.h console-stream.h console-tty.h console.h device.h events.h faces.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h syssignal.h systime.h systty.h toolbar.h
+device.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h elhash.h events.h faces.h frame.h frameslots.h glyphs.h gui.h keymap.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h syssignal.h systime.h toolbar.h window.h winslots.h
dgif_lib.o: gifrlib.h
dialog.o: $(LISP_H) conslots.h console.h device.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h
-dired.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h commands.h elhash.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 opaque.h regex.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h syspwd.h systime.h
-doc.o: $(LISP_H) buffer.h bufslots.h bytecode.h char-1byte.h char-lb.h char-ucs.h character.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 symeval.h symsinit.h sysfile.h
-doprnt.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 lstream.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h symeval.h symsinit.h
+dired.o: $(LISP_H) buffer.h bufslots.h commands.h elhash.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h ndir.h opaque.h regex.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h syspwd.h systime.h
+doc.o: $(LISP_H) buffer.h bufslots.h bytecode.h insdel.h keymap.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h sysfile.h
+doprnt.o: $(LISP_H) buffer.h bufslots.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h symeval.h symsinit.h
dragdrop.o: $(LISP_H) dragdrop.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
+dumper.o: $(LISP_H) alloc.h conslots.h console-stream.h console.h dump-id.h dumper.h elhash.h lisp-disunion.h lisp-union.h lrecord.h specifier.h symeval.h symsinit.h sysfile.h
dynarr.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
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 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
+editfns.o: $(LISP_H) buffer.h bufslots.h chartab.h commands.h conslots.h console.h device.h events.h extents.h frame.h frameslots.h glyphs.h gui.h insdel.h line-number.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syspwd.h systime.h toolbar.h window.h winslots.h
+eldap.o: $(LISP_H) buffer.h bufslots.h eldap.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h opaque.h symeval.h symsinit.h sysdep.h
elhash.o: $(LISP_H) bytecode.h elhash.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
-emacs.o: $(LISP_H) backtrace.h buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h commands.h conslots.h console.h device.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h paths.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysdll.h sysfile.h syssignal.h systime.h systty.h toolbar.h
-emodules.o: $(LISP_H) buffer.h bufslots.h 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
+emacs.o: $(LISP_H) backtrace.h buffer.h bufslots.h commands.h conslots.h console.h device.h dump-id.h dumper.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h paths.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysdll.h sysfile.h syssignal.h systime.h systty.h toolbar.h
+emodules.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h emodules.h file-coding.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysdll.h toolbar.h window.h winslots.h
esd.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h miscplay.h symeval.h symsinit.h
-eval.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h 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 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
+eval.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h commands.h conslots.h console.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h opaque.h symeval.h symsinit.h
+event-Xt.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h Emacs.ad.h EmacsFrame.h blocktype.h buffer.h bufslots.h conslots.h console-tty.h console-x.h console.h device.h dragdrop.h elhash.h events-mod.h events.h file-coding.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h objects-x.h objects.h offix-types.h offix.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysproc.h syssignal.h systime.h systty.h toolbar.h xintrinsic.h xintrinsicp.h
+event-stream.o: $(LISP_H) blocktype.h buffer.h bufslots.h commands.h conslots.h console.h device.h elhash.h events-mod.h events.h file-coding.h frame.h frameslots.h glyphs.h gui.h insdel.h keymap.h lisp-disunion.h lisp-union.h lrecord.h lstream.h macros.h menubar.h mule-charset.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h systime.h toolbar.h window.h winslots.h
event-tty.o: $(LISP_H) conslots.h console-tty.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysproc.h syssignal.h systime.h systty.h syswait.h toolbar.h
-event-unixoid.o: $(LISP_H) 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
-file-coding.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h elhash.h file-coding.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-ccl.h mule-charset.h multibyte.h opaque.h symeval.h symsinit.h
-fileio.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console.h device.h events.h file-coding.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h ndir.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h systime.h toolbar.h window.h winslots.h
-filelock.o: $(LISP_H) buffer.h bufslots.h 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 paths.h symeval.h symsinit.h sysdir.h sysfile.h syspwd.h syssignal.h
+event-unixoid.o: $(LISP_H) conslots.h console-stream.h console-tty.h console.h device.h events.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h process.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h
+events.o: $(LISP_H) buffer.h bufslots.h conslots.h console-tty.h console-x.h console.h device.h events-mod.h events.h extents.h frame.h frameslots.h glyphs.h gui.h keymap.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syssignal.h systime.h systty.h toolbar.h window.h winslots.h xintrinsic.h
+extents.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h debug.h device.h elhash.h extents.h faces.h frame.h frameslots.h glyphs.h gui.h gutter.h insdel.h keymap.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h opaque.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h
+faces.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h elhash.h extents.h faces.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
+file-coding.o: $(LISP_H) buffer.h bufslots.h chartab.h elhash.h file-coding.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-ccl.h mule-charset.h opaque.h symeval.h symsinit.h
+fileio.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h events.h file-coding.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h ndir.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h systime.h toolbar.h window.h winslots.h
+filelock.o: $(LISP_H) buffer.h bufslots.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h ndir.h paths.h symeval.h symsinit.h sysdir.h sysfile.h syspwd.h syssignal.h
filemode.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h sysfile.h
floatfns.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h sysfloat.h syssignal.h
-fns.o: $(LISP_H) buffer.h bufslots.h bytecode.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console.h device.h events.h extents.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h 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
-font-lock.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h chartab.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
+fns.o: $(LISP_H) buffer.h bufslots.h bytecode.h conslots.h console.h device.h events.h extents.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h
+font-lock.o: $(LISP_H) buffer.h bufslots.h chartab.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h syntax.h
frame-tty.o: $(LISP_H) conslots.h console-tty.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syssignal.h systime.h systty.h toolbar.h
-frame.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console.h device.h events.h extents.h faces.h frame.h frameslots.h glyphs.h gui.h gutter.h lisp-disunion.h lisp-union.h lrecord.h 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 systime.h toolbar.h window.h winslots.h
+frame.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h events.h extents.h faces.h frame.h frameslots.h glyphs.h gui.h gutter.h lisp-disunion.h lisp-union.h lrecord.h menubar.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h
free-hook.o: $(LISP_H) hash.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
general.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
getloadavg.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h sysfile.h
gif_io.o: gifrlib.h sysfile.h
-glyphs-eimage.o: $(LISP_H) buffer.h bufslots.h 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) 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
+glyphs-eimage.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h faces.h file-coding.h frame.h frameslots.h gifrlib.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h objects.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h toolbar.h
+glyphs-widget.o: $(LISP_H) buffer.h bufslots.h bytecode.h conslots.h console.h device.h faces.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h objects.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
+glyphs.o: $(LISP_H) blocktype.h buffer.h bufslots.h chartab.h conslots.h console.h device.h elhash.h faces.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects.h opaque.h rangetab.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
gmalloc.o: config.h getpagesize.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
+gpmevent.o: $(LISP_H) commands.h conslots.h console-tty.h console.h device.h events-mod.h events.h gpmevent.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h process.h symeval.h symsinit.h sysdep.h sysproc.h syssignal.h systime.h systty.h
+gui.o: $(LISP_H) buffer.h bufslots.h bytecode.h elhash.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h
+gutter.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h faces.h frame.h frameslots.h glyphs.h gui.h gutter.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
hash.o: $(LISP_H) hash.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
hftctl.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
-hpplay.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
+hpplay.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h nativesound.h symeval.h symsinit.h
imgproc.o: $(LISP_H) imgproc.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
-indent.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console.h device.h extents.h faces.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h 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
-inline.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h bytecode.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h conslots.h console.h database.h device.h eldap.h elhash.h events.h extents.h faces.h file-coding.h frame.h frameslots.h glyphs-x.h glyphs.h gui-x.h gui.h keymap.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h objects.h opaque.h process.h rangetab.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syntax.h systime.h toolbar.h tooltalk.h window.h winslots.h xintrinsic.h
+indent.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h extents.h faces.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
+inline.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h bytecode.h chartab.h conslots.h console.h database.h device.h eldap.h elhash.h events.h extents.h faces.h file-coding.h frame.h frameslots.h glyphs-x.h glyphs.h gui-x.h gui.h keymap.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h objects.h opaque.h postgresql.h process.h rangetab.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syntax.h systime.h toolbar.h tooltalk.h window.h winslots.h xintrinsic.h
input-method-motif.o: $(LISP_H) EmacsFrame.h conslots.h console-x.h console.h device.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h xintrinsic.h
-insdel.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console.h device.h extents.h frame.h frameslots.h glyphs.h gui.h insdel.h line-number.h lisp-disunion.h lisp-union.h lrecord.h lstream.h 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
+insdel.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h extents.h frame.h frameslots.h glyphs.h gui.h insdel.h line-number.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h
intl.o: $(LISP_H) bytecode.h conslots.h console.h device.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
-keymap.o: $(LISP_H) buffer.h bufslots.h bytecode.h 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
+keymap.o: $(LISP_H) buffer.h bufslots.h bytecode.h conslots.h console.h device.h elhash.h events-mod.h events.h frame.h frameslots.h glyphs.h gui.h insdel.h keymap.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h
libsst.o: $(LISP_H) libsst.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
-line-number.o: $(LISP_H) buffer.h bufslots.h 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 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
+line-number.o: $(LISP_H) buffer.h bufslots.h line-number.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h
+linuxplay.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h miscplay.h nativesound.h symeval.h symsinit.h sysfile.h syssignal.h
+lread.o: $(LISP_H) buffer.h bufslots.h bytecode.h elhash.h file-coding.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h opaque.h symeval.h symsinit.h sysfile.h sysfloat.h
+lstream.o: $(LISP_H) buffer.h bufslots.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h symeval.h symsinit.h sysfile.h
+macros.o: $(LISP_H) buffer.h bufslots.h commands.h conslots.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h keymap.h lisp-disunion.h lisp-union.h lrecord.h macros.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h
malloc.o: config.h getpagesize.h
-marker.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 symeval.h symsinit.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
+marker.o: $(LISP_H) buffer.h bufslots.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h
+md5.o: $(LISP_H) buffer.h bufslots.h file-coding.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h symeval.h symsinit.h
+menubar.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h frame.h frameslots.h glyphs.h gui.h keymap.h lisp-disunion.h lisp-union.h lrecord.h menubar.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
+minibuf.o: $(LISP_H) buffer.h bufslots.h commands.h conslots.h console-stream.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h toolbar.h window.h winslots.h
miscplay.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h miscplay.h symeval.h symsinit.h sysfile.h syssignal.h
nas.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h sysdep.h syssignal.h
nt.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h nt.h ntheap.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h
ntheap.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h ntheap.h symeval.h symsinit.h
-ntplay.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h sysfile.h
-ntproc.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 nt.h ntheap.h process.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h syswait.h
-objects-tty.o: $(LISP_H) char-1byte.h char-lb.h char-ucs.h character.h conslots.h console-tty.h console.h device.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects-tty.h objects.h specifier.h symeval.h symsinit.h syssignal.h systty.h
-objects.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console.h device.h elhash.h faces.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h 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
+ntplay.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h nativesound.h symeval.h symsinit.h sysfile.h
+ntproc.o: $(LISP_H) buffer.h bufslots.h conslots.h console-msw.h console.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h nt.h ntheap.h process.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h syswait.h
+objects-tty.o: $(LISP_H) conslots.h console-tty.h console.h device.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects-tty.h objects.h specifier.h symeval.h symsinit.h syssignal.h systty.h
+objects.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h elhash.h faces.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
offix.o: offix-cursors.h offix-types.h offix.h xintrinsic.h
opaque.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h opaque.h symeval.h symsinit.h
-print.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console-stream.h console-tty.h console.h device.h extents.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h 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 sysfile.h syssignal.h systty.h toolbar.h
-process-nt.o: $(LISP_H) char-1byte.h char-lb.h char-ucs.h character.h hash.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 procimpl.h symeval.h symsinit.h sysdep.h
-process-unix.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console.h device.h events.h file-coding.h frame.h frameslots.h glyphs.h gui.h hash.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h opaque.h process.h procimpl.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h toolbar.h window.h winslots.h
-process.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h commands.h conslots.h console.h device.h events.h file-coding.h frame.h frameslots.h glyphs.h gui.h hash.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h mule-charset.h multibyte.h opaque.h process.h procimpl.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h toolbar.h window.h winslots.h
+postgresql.o: $(LISP_H) buffer.h bufslots.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h postgresql.h symeval.h symsinit.h sysdep.h
+print.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h conslots.h console-msw.h console-stream.h console-tty.h console.h device.h extents.h frame.h frameslots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h syssignal.h systty.h toolbar.h
+process-nt.o: $(LISP_H) conslots.h console-msw.h console.h hash.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h process.h procimpl.h symeval.h symsinit.h sysdep.h
+process-unix.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h events.h file-coding.h frame.h frameslots.h glyphs.h gui.h hash.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h opaque.h process.h procimpl.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h toolbar.h window.h winslots.h
+process.o: $(LISP_H) buffer.h bufslots.h commands.h conslots.h console.h device.h events.h file-coding.h frame.h frameslots.h glyphs.h gui.h hash.h insdel.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h opaque.h process.h procimpl.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h toolbar.h window.h winslots.h
profile.o: $(LISP_H) backtrace.h bytecode.h elhash.h hash.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h syssignal.h systime.h
ralloc.o: $(LISP_H) getpagesize.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
rangetab.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h rangetab.h symeval.h symsinit.h
realpath.o: config.h
-redisplay-output.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 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
-redisplay-tty.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 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 mule-charset.h multibyte.h objects-tty.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h syssignal.h systime.h systty.h toolbar.h window.h winslots.h
-redisplay.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h commands.h conslots.h console-tty.h console.h debug.h device.h elhash.h extents.h faces.h file-coding.h frame.h frameslots.h glyphs.h gui.h gutter.h insdel.h line-number.h lisp-disunion.h lisp-union.h lrecord.h mb-1byte.h mb-lb.h mb-multibyte.h mb-utf-8.h menubar.h mule-charset.h multibyte.h objects.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syssignal.h systty.h toolbar.h window.h winslots.h
-regex.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h chartab.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 regex.h symeval.h symsinit.h syntax.h
-scrollbar.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 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
-search.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h chartab.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 opaque.h regex.h symeval.h symsinit.h syntax.h
-select.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 mule-charset.h multibyte.h objects.h opaque.h redisplay.h scrollbar.h select.h specifier.h symeval.h symsinit.h toolbar.h
+redisplay-output.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h faces.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
+redisplay-tty.o: $(LISP_H) buffer.h bufslots.h conslots.h console-tty.h console.h device.h events.h faces.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h objects-tty.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h syssignal.h systime.h systty.h toolbar.h window.h winslots.h
+redisplay.o: $(LISP_H) buffer.h bufslots.h commands.h conslots.h console-tty.h console.h debug.h device.h elhash.h extents.h faces.h file-coding.h frame.h frameslots.h glyphs.h gui.h gutter.h insdel.h line-number.h lisp-disunion.h lisp-union.h lrecord.h menubar.h mule-charset.h objects.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syssignal.h systty.h toolbar.h window.h winslots.h
+regex.o: $(LISP_H) buffer.h bufslots.h chartab.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h regex.h symeval.h symsinit.h syntax.h
+scrollbar.o: $(LISP_H) buffer.h bufslots.h commands.h conslots.h console.h device.h frame.h frameslots.h glyphs.h gui.h gutter.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
+search.o: $(LISP_H) buffer.h bufslots.h chartab.h insdel.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h opaque.h regex.h symeval.h symsinit.h syntax.h
+select.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects.h opaque.h redisplay.h scrollbar.h select.h specifier.h symeval.h symsinit.h toolbar.h
sgiplay.o: $(LISP_H) libst.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
sheap.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h sheap-adjust.h symeval.h symsinit.h
signal.o: $(LISP_H) conslots.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h syssignal.h systime.h toolbar.h
-sound.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console-x.h console.h device.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 symeval.h symsinit.h sysdep.h xintrinsic.h
-specifier.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 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 rangetab.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
+sound.o: $(LISP_H) buffer.h bufslots.h conslots.h console-x.h console.h device.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h nativesound.h redisplay.h symeval.h symsinit.h sysdep.h xintrinsic.h
+specifier.o: $(LISP_H) buffer.h bufslots.h chartab.h conslots.h console.h device.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h opaque.h rangetab.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
strcat.o: config.h
strcmp.o: config.h
strcpy.o: config.h
strftime.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
sunOS-fix.o: config.h
-sunplay.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h sysdep.h syssignal.h
+sunplay.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h nativesound.h symeval.h symsinit.h sysdep.h syssignal.h
sunpro.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
-symbols.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h conslots.h console.h elhash.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.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h chartab.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
-sysdep.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 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 ndir.h ntheap.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h syssignal.h systime.h systty.h syswait.h toolbar.h window.h winslots.h
+symbols.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h elhash.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h
+syntax.o: $(LISP_H) buffer.h bufslots.h chartab.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h syntax.h
+sysdep.o: $(LISP_H) buffer.h bufslots.h conslots.h console-stream.h console-tty.h console.h device.h events.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h ndir.h ntheap.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h syssignal.h systime.h systty.h syswait.h toolbar.h window.h winslots.h
sysdll.o: config.h sysdll.h
termcap.o: $(LISP_H) conslots.h console.h device.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
terminfo.o: config.h
-tests.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 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
-text-coding.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h chartab.h elhash.h file-coding.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-ccl.h mule-charset.h multibyte.h opaque.h symeval.h symsinit.h
-toolbar.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 mule-charset.h multibyte.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
-tooltalk.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h elhash.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 process.h symeval.h symsinit.h tooltalk.h
+tests.o: $(LISP_H) buffer.h bufslots.h lisp-disunion.h lisp-union.h lrecord.h lstream.h mule-charset.h opaque.h symeval.h symsinit.h
+toolbar.o: $(LISP_H) buffer.h bufslots.h conslots.h console.h device.h frame.h frameslots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
+tooltalk.o: $(LISP_H) buffer.h bufslots.h elhash.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h process.h symeval.h symsinit.h tooltalk.h
tparam.o: config.h
-undo.o: $(LISP_H) buffer.h bufslots.h char-1byte.h char-lb.h char-ucs.h character.h extents.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
+undo.o: $(LISP_H) buffer.h bufslots.h extents.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h
unexaix.o: $(LISP_H) getpagesize.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h
unexalpha.o: config.h
unexapollo.o: config.h
unexnt.o: config.h ntheap.h
unexsunos4.o: config.h
vm-limit.o: $(LISP_H) lisp-disunion.h lisp-union.h lrecord.h mem-limits.h symeval.h symsinit.h
-widget.o: $(LISP_H) buffer.h bufslots.h 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
-window.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 elhash.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 objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
+widget.o: $(LISP_H) buffer.h bufslots.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h symeval.h symsinit.h
+window.o: $(LISP_H) buffer.h bufslots.h commands.h conslots.h console.h device.h elhash.h faces.h frame.h frameslots.h glyphs.h gui.h gutter.h lisp-disunion.h lisp-union.h lrecord.h mule-charset.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h toolbar.h window.h winslots.h
xgccache.o: $(LISP_H) hash.h lisp-disunion.h lisp-union.h lrecord.h symeval.h symsinit.h xgccache.h
xmu.o: config.h
#include "console-msw.h"
#include "console-stream.h"
+#include "objects-msw.h"
#include "events.h"
#include "faces.h"
#include "frame.h"
#include "sysdep.h"
+#if (defined (__CYGWIN32__) || defined(__MINGW32__)) && \
+ CYGWIN_VERSION_DLL_MAJOR < 21
+extern BOOL WINAPI DdeFreeStringHandle(DWORD,HSZ);
+#else
#include <winspool.h>
+#endif
+
+#if !(defined (__CYGWIN32__) || defined(__MINGW32__))
+# include <objbase.h> /* For CoInitialize */
+#endif
/* win32 DDE management library globals */
#ifdef HAVE_DRAGNDROP
static Lisp_Object
build_syscolor_string (int idx)
{
- DWORD clr;
- char buf[16];
-
- if (idx < 0)
- return Qnil;
-
- clr = GetSysColor (idx);
- sprintf (buf, "#%02X%02X%02X",
- GetRValue (clr),
- GetGValue (clr),
- GetBValue (clr));
- return build_string (buf);
+ return (idx < 0 ? Qnil : mswindows_color_to_string (GetSysColor (idx)));
}
static Lisp_Object
DEVICE_MSWINDOWS_VERTSIZE(d) = GetDeviceCaps(hdc, VERTSIZE);
DEVICE_MSWINDOWS_BITSPIXEL(d) = GetDeviceCaps(hdc, BITSPIXEL);
DEVICE_MSWINDOWS_FONTLIST (d) = mswindows_enumerate_fonts (hdc);
-
- DeleteDC (hdc);
+
+ DEVICE_MSWINDOWS_HCDC(d) = hdc;
/* Register the main window class */
wc.cbSize = sizeof (WNDCLASSEX);
wc.lpszMenuName = NULL;
wc.lpszClassName = XEMACS_CLASS;
- wc.hIconSm = LoadImage (GetModuleHandle (NULL), XEMACS_CLASS,
+ wc.hIconSm = (HICON) LoadImage (GetModuleHandle (NULL), XEMACS_CLASS,
IMAGE_ICON, 16, 16, 0);
RegisterClassEx (&wc);
/* Initialize DDE management library and our related globals. We execute a
* dde Open("file") by simulating a drop, so this depends on dnd support. */
#ifdef HAVE_DRAGNDROP
+# if !(defined(__CYGWIN32__) || defined(__MINGW32__))
+ CoInitialize (NULL);
+# endif
+
mswindows_dde_mlid = 0;
DdeInitialize (&mswindows_dde_mlid, (PFNCALLBACK)mswindows_dde_callback,
APPCMD_FILTERINITS|CBF_FAIL_SELFCONNECTIONS|CBF_FAIL_ADVISES|
- CBF_FAIL_POKES|CBF_FAIL_REQUESTS|CBF_SKIP_ALLNOTIFICATIONS, 0);
+ CBF_FAIL_POKES|CBF_FAIL_REQUESTS|CBF_SKIP_ALLNOTIFICATIONS,
+ 0);
- mswindows_dde_service = DdeCreateStringHandle (mswindows_dde_mlid, XEMACS_CLASS, 0);
- mswindows_dde_topic_system = DdeCreateStringHandle (mswindows_dde_mlid, SZDDESYS_TOPIC, 0);
+ mswindows_dde_service = DdeCreateStringHandle (mswindows_dde_mlid,
+ XEMACS_CLASS, 0);
+ mswindows_dde_topic_system = DdeCreateStringHandle (mswindows_dde_mlid,
+ SZDDESYS_TOPIC, 0);
mswindows_dde_item_open = DdeCreateStringHandle (mswindows_dde_mlid,
TEXT(MSWINDOWS_DDE_ITEM_OPEN), 0);
DdeNameService (mswindows_dde_mlid, mswindows_dde_service, 0L, DNS_REGISTER);
mswindows_delete_device (struct device *d)
{
#ifdef HAVE_DRAGNDROP
- DdeNameService (mswindows_dde_mlid, 0L, 0L, DNS_REGISTER);
+ DdeNameService (mswindows_dde_mlid, 0L, 0L, DNS_UNREGISTER);
+ DdeFreeStringHandle (mswindows_dde_mlid, mswindows_dde_item_open);
+ DdeFreeStringHandle (mswindows_dde_mlid, mswindows_dde_topic_system);
+ DdeFreeStringHandle (mswindows_dde_mlid, mswindows_dde_service);
DdeUninitialize (mswindows_dde_mlid);
+
+# if !(defined(__CYGWIN32__) || defined(__MINGW32__))
+ CoUninitialize ();
+# endif
#endif
+ DeleteDC (DEVICE_MSWINDOWS_HCDC(d));
free (d->device_data);
}
+void
+msw_get_workspace_coords (RECT *rc)
+{
+ SystemParametersInfo (SPI_GETWORKAREA, 0, rc, 0);
+}
+
static void
mswindows_mark_device (struct device *d)
{
break;
/*** Colors ***/
-#define FROB(met, index1, index2) \
+#define FROB(met, fore, back) \
case DM_##met: \
- return build_syscolor_cons (index1, index2);
+ return build_syscolor_cons (fore, back);
- FROB (color_default, COLOR_WINDOW, COLOR_WINDOWTEXT);
- FROB (color_select, COLOR_HIGHLIGHT, COLOR_HIGHLIGHTTEXT);
- FROB (color_balloon, COLOR_INFOBK, COLOR_INFOTEXT);
- FROB (color_3d_face, COLOR_3DFACE, COLOR_BTNTEXT);
- FROB (color_3d_light, COLOR_3DLIGHT, COLOR_3DHILIGHT);
- FROB (color_3d_dark, COLOR_3DSHADOW, COLOR_3DDKSHADOW);
- FROB (color_menu, COLOR_MENU, COLOR_MENUTEXT);
- FROB (color_menu_highlight, COLOR_HIGHLIGHT, COLOR_HIGHLIGHTTEXT);
- FROB (color_menu_button, COLOR_MENU, COLOR_MENUTEXT);
- FROB (color_menu_disabled, COLOR_MENU, COLOR_GRAYTEXT);
- FROB (color_toolbar, COLOR_BTNFACE, COLOR_BTNTEXT);
- FROB (color_scrollbar, COLOR_SCROLLBAR, COLOR_CAPTIONTEXT);
+ FROB (color_default, COLOR_WINDOWTEXT, COLOR_WINDOW);
+ FROB (color_select, COLOR_HIGHLIGHTTEXT, COLOR_HIGHLIGHT);
+ FROB (color_balloon, COLOR_INFOTEXT, COLOR_INFOBK);
+ FROB (color_3d_face, COLOR_BTNTEXT, COLOR_BTNFACE);
+ FROB (color_3d_light, COLOR_3DHILIGHT, COLOR_3DLIGHT);
+ FROB (color_3d_dark, COLOR_3DDKSHADOW, COLOR_3DSHADOW);
+ FROB (color_menu, COLOR_MENUTEXT, COLOR_MENU);
+ FROB (color_menu_highlight, COLOR_HIGHLIGHTTEXT, COLOR_HIGHLIGHT);
+ FROB (color_menu_button, COLOR_MENUTEXT, COLOR_MENU);
+ FROB (color_menu_disabled, COLOR_GRAYTEXT, COLOR_MENU);
+ FROB (color_toolbar, COLOR_BTNTEXT, COLOR_BTNFACE);
+ FROB (color_scrollbar, COLOR_CAPTIONTEXT, COLOR_SCROLLBAR);
FROB (color_desktop, -1, COLOR_DESKTOP);
FROB (color_workspace, -1, COLOR_APPWORKSPACE);
#undef FROB
case DM_size_workspace:
{
RECT rc;
- SystemParametersInfo (SPI_GETWORKAREA, 0, &rc, 0);
+ msw_get_workspace_coords (&rc);
return Fcons (make_int (rc.right - rc.left),
make_int (rc.bottom - rc.top));
}
+
+ case DM_offset_workspace:
+ {
+ RECT rc;
+ msw_get_workspace_coords (&rc);
+ return Fcons (make_int (rc.left), make_int (rc.top));
+ }
+
/*
case DM_size_toolbar:
case DM_size_toolbar_button:
if (DEVICE_MSPRINTER_HDC (d) == NULL)
signal_open_printer_error (d);
+ DEVICE_MSPRINTER_HCDC(d) =
+ CreateCompatibleDC (DEVICE_MSPRINTER_HDC (d));
+
/* Determinie DEVMODE size and store the default DEVMODE */
- DEVICE_MSPRINTER_DEVMODE_SIZE(d) =
+ DEVICE_MSPRINTER_DEVMODE_SIZE(d) =
DocumentProperties (NULL, DEVICE_MSPRINTER_HPRINTER(d),
printer_name, NULL, NULL, 0);
if (DEVICE_MSPRINTER_DEVMODE_SIZE(d) <= 0)
signal_open_printer_error (d);
- DEVICE_MSPRINTER_DEVMODE(d) = xmalloc (DEVICE_MSPRINTER_DEVMODE_SIZE(d));
+ DEVICE_MSPRINTER_DEVMODE(d) =
+ (DEVMODE*) xmalloc (DEVICE_MSPRINTER_DEVMODE_SIZE(d));
DocumentProperties (NULL, DEVICE_MSPRINTER_HPRINTER(d),
printer_name, DEVICE_MSPRINTER_DEVMODE(d),
NULL, DM_OUT_BUFFER);
ClosePrinter (DEVICE_MSPRINTER_HPRINTER (d));
if (DEVICE_MSPRINTER_HDC (d))
DeleteDC (DEVICE_MSPRINTER_HDC (d));
+ if (DEVICE_MSPRINTER_HCDC (d))
+ DeleteDC (DEVICE_MSPRINTER_HCDC (d));
if (DEVICE_MSPRINTER_NAME (d))
free (DEVICE_MSPRINTER_NAME (d));
if (DEVICE_MSPRINTER_DEVMODE (d))
if (DEVICE_MSPRINTER_DEVMODE_MIRROR(d) == NULL)
DEVICE_MSPRINTER_DEVMODE_MIRROR(d) =
- xmalloc (DEVICE_MSPRINTER_DEVMODE_SIZE(d));
+ (DEVMODE*) xmalloc (DEVICE_MSPRINTER_DEVMODE_SIZE(d));
memcpy (DEVICE_MSPRINTER_DEVMODE_MIRROR(d),
DEVICE_MSPRINTER_DEVMODE(d),
devmode, devmode,
DM_IN_BUFFER | DM_OUT_BUFFER);
- ResetDC (DEVICE_MSPRINTER_HDC (d), devmode);
+ /* #### ResetDC fails sometimes, Bill only know s why.
+ The solution below looks more like a workaround to me,
+ although it might be fine. --kkm */
+ if (ResetDC (DEVICE_MSPRINTER_HDC (d), devmode) == NULL)
+ {
+ DeleteDC (DEVICE_MSPRINTER_HDC (d));
+ DEVICE_MSPRINTER_HDC (d) =
+ CreateDC ("WINSPOOL", DEVICE_MSPRINTER_NAME(d), NULL, devmode);
+ }
}
\f
#include "sysfile.h"
#include "systime.h"
-#if defined(HAVE_DLOPEN) && defined(LWLIB_USES_ATHENA) && !defined(HAVE_ATHENA_3D)
+#if defined(HAVE_SHLIB) && defined(LWLIB_USES_ATHENA) && !defined(HAVE_ATHENA_3D)
#include "sysdll.h"
-#endif /* HAVE_DLOPEN and LWLIB_USES_ATHENA and not HAVE_ATHENA_3D */
+#endif /* HAVE_SHLIB and LWLIB_USES_ATHENA and not HAVE_ATHENA_3D */
#ifdef HAVE_OFFIX_DND
#include "offix.h"
Widget app_shell;
int argc;
char **argv;
- CONST char *app_class;
- CONST char *app_name;
- CONST char *disp_name;
+ const char *app_class;
+ const char *app_name;
+ const char *disp_name;
Visual *visual = NULL;
int depth = 8; /* shut up the compiler */
Colormap cmap;
/* */
int best_visual_found = 0;
-#if defined(HAVE_DLOPEN) && defined(LWLIB_USES_ATHENA) && !defined(HAVE_ATHENA_3D)
+#if defined(HAVE_SHLIB) && defined(LWLIB_USES_ATHENA) && !defined(HAVE_ATHENA_3D)
/*
* In order to avoid the lossage with flat Athena widgets dynamically
* linking to one of the ThreeD variants, using the dynamic symbol helpers
dll_close (xaw_dll_handle);
}
}
-#endif /* HAVE_DLOPEN and LWLIB_USES_ATHENA and not HAVE_ATHENA_3D */
+#endif /* HAVE_SHLIB and LWLIB_USES_ATHENA and not HAVE_ATHENA_3D */
XSETDEVICE (device, d);
data-directory/app-defaults/$LANG/Emacs.
This is in addition to the standard app-defaults files, and
does not override resources defined elsewhere */
- CONST char *data_dir;
+ const char *data_dir;
char *path;
XrmDatabase db = XtDatabase (dpy); /* #### XtScreenDatabase(dpy) ? */
- CONST char *locale = XrmLocaleOfDatabase (db);
+ const char *locale = XrmLocaleOfDatabase (db);
if (STRINGP (Vx_app_defaults_directory) &&
XSTRING_LENGTH (Vx_app_defaults_directory) > 0)
/* handle X errors */
/************************************************************************/
-CONST char *
+const char *
x_event_name (int event_type)
{
- static CONST char *events[] =
+ static const char *events[] =
{
"0: ERROR!",
"1: REPLY",
*/
(keysym))
{
- CONST char *keysym_ext;
+ const char *keysym_ext;
CHECK_STRING (keysym);
TO_EXTERNAL_FORMAT (LISP_STRING, keysym,
{
Display *dpy = get_x_display (device);
int ndirs_return;
- CONST char **directories = (CONST char **) XGetFontPath (dpy, &ndirs_return);
+ const char **directories = (const char **) XGetFontPath (dpy, &ndirs_return);
Lisp_Object font_path = Qnil;
if (!directories)
{
Display *dpy = get_x_display (device);
Lisp_Object path_entry;
- CONST char **directories;
+ const char **directories;
int i=0,ndirs=0;
EXTERNAL_LIST_LOOP (path_entry, font_path)
ndirs++;
}
- directories = alloca_array (CONST char *, ndirs);
+ directories = alloca_array (const char *, ndirs);
EXTERNAL_LIST_LOOP (path_entry, font_path)
{
reinit_console_type_create_device_x (void)
{
/* Initialize variables to speed up X resource interactions */
- CONST char *valid_resource_chars =
+ const char *valid_resource_chars =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
while (*valid_resource_chars)
valid_resource_char_p[(unsigned int) (*valid_resource_chars++)] = 1;
- /* Generic device functions.
+/* Generic device functions.
Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
Copyright (C) 1994, 1995 Free Software Foundation, Inc.
Copyright (C) 1995, 1996 Ben Wing
MARK_FRAME_GLYPHS_CHANGED (f);
MARK_FRAME_SUBWINDOWS_CHANGED (f);
MARK_FRAME_TOOLBARS_CHANGED (f);
+ MARK_FRAME_GUTTERS_CHANGED (f);
f->menubar_changed = 1;
}
}
*/
(device))
{
- return (MAYBE_INT_DEVMETH (decode_device (device),
- device_implementation_flags, ())
- & XDEVIMPF_IS_A_PRINTER) ? Qt : Qnil;
+ return DEVICE_PRINTER_P (decode_device (device)) ? Qt : Qnil;
}
DEFUN ("device-system-metric", Fdevice_system_metric, 1, 3, 0, /*
size-device Device screen or paper size in pixels.
size-workspace Workspace size in pixels. This can be less than or
equal to the above. For diplays, this is the area
- available to applications less window manager
+ available to applications less window manager
decorations. For printers, this is the size of
printable area.
offset-workspace Offset of workspace area from the top left corner
- of screen or paper.
+ of screen or paper, in pixels.
size-device-mm Device screen size in millimeters.
device-dpi Device resolution, in dots per inch.
num-bit-planes Integer, number of device bit planes.
void
syms_of_device (void)
{
+ INIT_LRECORD_IMPLEMENTATION (device);
+
DEFSUBR (Fvalid_device_class_p);
DEFSUBR (Fdevice_class_list);
#define DEVICE_TYPE_P(d, type) EQ (DEVICE_TYPE (d), Q##type)
#ifdef ERROR_CHECK_TYPECHECK
-INLINE struct device *
+INLINE_HEADER struct device *
error_check_device_type (struct device *d, Lisp_Object sym);
-INLINE struct device *
+INLINE_HEADER struct device *
error_check_device_type (struct device *d, Lisp_Object sym)
{
assert (EQ (DEVICE_TYPE (d), sym));
(type##_console_methods->predicate_symbol, x); \
} while (0)
+#define DEVICE_DISPLAY_P(dev) \
+ (DEVICE_LIVE_P (dev) && \
+ (MAYBE_INT_DEVMETH (dev, \
+ device_implementation_flags, ()) \
+ & XDEVIMPF_IS_A_PRINTER) ? 0 : 1)
+
+#define CHECK_DISPLAY_DEVICE(dev) \
+ do { \
+ CHECK_DEVICE (dev); \
+ if (!(DEVICEP (dev) \
+ && DEVICE_DISPLAY_P (XDEVICE (dev)))) \
+ dead_wrong_type_argument (Qdisplay, dev); \
+ } while (0)
+
+#define CONCHECK_DISPLAY_DEVICE(dev) \
+ do { \
+ CONCHECK_DEVICE (dev); \
+ if (!(DEVICEP (dev) \
+ && DEVICE_DISPLAY_P (XDEVICE (dev)))) \
+ wrong_type_argument (Qdisplay, dev); \
+ } while (0)
+
+#define DEVICE_PRINTER_P(dev) \
+ (DEVICE_LIVE_P (dev) && !DEVICE_DISPLAY_P (dev))
+
+#define CHECK_PRINTER_DEVICE(dev) \
+ do { \
+ CHECK_DEVICE (dev); \
+ if (!(DEVICEP (dev) \
+ && DEVICE_PRINTER_P (XDEVICE (dev)))) \
+ dead_wrong_type_argument (Qprinter, dev); \
+ } while (0)
+
+#define CONCHECK_PRINTER_DEVICE(dev) \
+ do { \
+ CONCHECK_DEVICE (dev); \
+ if (!(DEVICEP (dev) \
+ && DEVICE_PRINTER_P (XDEVICE (dev)))) \
+ wrong_type_argument (Qprinter, dev); \
+ } while (0)
+
/* #### These should be in the device-*.h files but there are
too many places where the abstraction is broken. Need to
fix. */
Dynarr_add_many (dynarr, uni_string, sizeof(WCHAR) * length);
}
+/* Helper function which converts the supplied string STRING into Unicode and
+ pushes it at the end of DYNARR */
+static void
+push_bufbyte_string_as_unicode (unsigned_char_dynarr* dynarr, Bufbyte *string,
+ Bytecount len)
+{
+ Extbyte *mbcs_string;
+ Charcount length = bytecount_to_charcount (string, len);
+ LPWSTR uni_string;
+
+ TO_EXTERNAL_FORMAT (C_STRING, string,
+ C_STRING_ALLOCA, mbcs_string,
+ Qnative);
+ uni_string = alloca_array (WCHAR, length + 1);
+ length = MultiByteToWideChar (CP_ACP, 0, mbcs_string, -1,
+ uni_string, sizeof(WCHAR) * (length + 1));
+ Dynarr_add_many (dynarr, uni_string, sizeof(WCHAR) * length);
+}
+
/* Given button TEXT, return button width in DLU */
static unsigned int
button_width (Lisp_Object text)
Dynarr_add_many (template, &button_class_id, sizeof (button_class_id));
/* Next thing to add is control text, as Unicode string */
- push_lisp_string_as_unicode (template, pgui_item->name);
+ {
+ Lisp_Object ctext = pgui_item->name;
+ Emchar accel_unused;
+ Bufbyte *trans = (Bufbyte *) alloca (2 * XSTRING_LENGTH (ctext) + 3);
+ Bytecount translen;
+
+ memcpy (trans, XSTRING_DATA (ctext), XSTRING_LENGTH (ctext) + 1);
+ translen =
+ msw_translate_menu_or_dialog_item (trans,
+ XSTRING_LENGTH (ctext),
+ 2 * XSTRING_LENGTH (ctext) + 3,
+ &accel_unused,
+ ctext);
+ push_bufbyte_string_as_unicode (template, trans, translen);
+ }
/* Specify 0 length creation data. */
Dynarr_add_many (template, &zeroes, 2);
vector = make_vector (Dynarr_length (dialog_items), Qunbound);
dialog_data = Fcons (frame, vector);
for (i = 0; i < Dynarr_length (dialog_items); i++)
- XVECTOR_DATA (vector) [i] = XGUI_ITEM (*Dynarr_atp (dialog_items, i))->callback;
+ XVECTOR_DATA (vector) [i] =
+ XGUI_ITEM (*Dynarr_atp (dialog_items, i))->callback;
/* Woof! Everything is ready. Pop pop pop in now! */
if (!CreateDialogIndirectParam (NULL,
Lisp_Object text_field_callback;
char *text_field_value = wv->value;
VOID_TO_LISP (text_field_callback, wv->call_data);
+ text_field_callback = XCAR (XCDR (text_field_callback));
if (text_field_value)
{
- void *tmp = LISP_TO_VOID (list2 (text_field_callback,
- build_string (text_field_value)));
+ void *tmp =
+ LISP_TO_VOID (cons3 (Qnil,
+ list2 (text_field_callback,
+ build_string (text_field_value)),
+ Qnil));
popup_selection_callback (0, id, (XtPointer) tmp);
}
}
lw_set_keyboard_focus (FRAME_X_SHELL_WIDGET (f), FRAME_X_TEXT_WIDGET (f));
}
-static CONST char * CONST button_names [] = {
+static const char * const button_names [] = {
"button1", "button2", "button3", "button4", "button5",
"button6", "button7", "button8", "button9", "button10" };
wv = xmalloc_widget_value ();
gui_item = gui_parse_item_keywords (button);
- if (!button_item_to_widget_value (gui_item, wv, allow_text_p, 1))
+ if (!button_item_to_widget_value (Qdialog,
+ gui_item, wv, allow_text_p, 1, 0))
{
free_widget_value_tree (wv);
continue;
/* Synched up with: Not in FSF. */
-/* #### There ain't nothin' here because dialog boxes have not been
- properly abstracted yet. */
-
#include <config.h>
#include "lisp.h"
#include "frame.h"
resource database, so it is possible for resources to override what string
is actually displayed.
+Accelerators can be indicated in the string by putting the sequence
+"%_" before the character corresponding to the key that will invoke
+the button. Uppercase and lowercase accelerators are equivalent. The
+sequence "%%" is also special, and is translated into a single %.
+
If the `callback' of a button is a symbol, then it must name a command.
It will be invoked with `call-interactively'. If it is a list, then it is
evaluated with `eval'.
Though the keyword/value syntax is supported for dialog boxes just as in
popup menus, the only keyword which is both meaningful and fully implemented
-for dialog box buttons is `:active'.
-*/
+for dialog box buttons is `:active'. */
(dbox_desc))
{
struct frame *f = selected_frame ();
CHECK_CONS (dbox_desc);
CHECK_STRING (XCAR (dbox_desc));
if (!CONSP (XCDR (dbox_desc)))
- signal_simple_error ("Dialog descriptor must supply at least one button", dbox_desc);
+ signal_simple_error ("Dialog descriptor must supply at least one button",
+ dbox_desc);
DEVMETH (d, popup_dialog_box, (f, dbox_desc));
#include <config.h>
#include "lisp.h"
-#include "buffer.h"
-#include "commands.h"
-#include "elhash.h"
-#include "regex.h"
-#include "opaque.h"
#include "sysfile.h"
#include "sysdir.h"
#include "systime.h"
#include "sysdep.h"
#include "syspwd.h"
+#include "buffer.h"
+#include "commands.h"
+#include "elhash.h"
+#include "regex.h"
+#include "opaque.h"
Lisp_Object Vcompletion_ignored_extensions;
Lisp_Object Qdirectory_files;
\f
Lisp_Object
-make_directory_hash_table (CONST char *path)
+make_directory_hash_table (const char *path)
{
DIR *d;
if ((d = opendir (path)))
}
\f
static void
-weird_doc (Lisp_Object sym, CONST char *weirdness, CONST char *type, int pos)
+weird_doc (Lisp_Object sym, const char *weirdness, const char *type, int pos)
{
if (!strcmp (weirdness, GETTEXT ("duplicate"))) return;
message ("Note: Strange doc (%s) for %s %s @ %d",
#include "buffer.h"
#include "lstream.h"
-static CONST char *valid_flags = "-+ #0";
+static const char *valid_flags = "-+ #0";
-static CONST char *valid_converters = "diouxXfeEgGcsS";
-static CONST char *int_converters = "dic";
-static CONST char *unsigned_int_converters = "ouxX";
-static CONST char *double_converters = "feEgG";
-static CONST char *string_converters = "sS";
+static const char *valid_converters = "diouxXfeEgGcsS";
+static const char *int_converters = "dic";
+static const char *unsigned_int_converters = "ouxX";
+static const char *double_converters = "feEgG";
+static const char *string_converters = "sS";
typedef struct printf_spec printf_spec;
struct printf_spec
Note that MINLEN and MAXLEN are Charcounts but LEN is a Bytecount. */
static void
-doprnt_1 (Lisp_Object stream, CONST Bufbyte *string, Bytecount len,
+doprnt_1 (Lisp_Object stream, const Bufbyte *string, Bytecount len,
Charcount minlen, Charcount maxlen, int minus_flag, int zero_flag)
{
Charcount cclen;
}
}
-static CONST Bufbyte *
-parse_off_posnum (CONST Bufbyte *start, CONST Bufbyte *end, int *returned_num)
+static const Bufbyte *
+parse_off_posnum (const Bufbyte *start, const Bufbyte *end, int *returned_num)
{
Bufbyte arg_convert[100];
REGISTER Bufbyte *arg_ptr = arg_convert;
} while (0)
static printf_spec_dynarr *
-parse_doprnt_spec (CONST Bufbyte *format, Bytecount format_length)
+parse_doprnt_spec (const Bufbyte *format, Bytecount format_length)
{
- CONST Bufbyte *fmt = format;
- CONST Bufbyte *fmt_end = format + format_length;
+ const Bufbyte *fmt = format;
+ const Bufbyte *fmt_end = format + format_length;
printf_spec_dynarr *specs = Dynarr_new (printf_spec);
int prev_argnum = 0;
while (1)
{
struct printf_spec spec;
- CONST Bufbyte *text_end;
+ const Bufbyte *text_end;
Bufbyte ch;
xzero (spec);
/* Is there a field number specifier? */
{
- CONST Bufbyte *ptr;
+ const Bufbyte *ptr;
int fieldspec;
ptr = parse_off_posnum (fmt, fmt_end, &fieldspec);
to the arguments. */
static Bytecount
-emacs_doprnt_1 (Lisp_Object stream, CONST Bufbyte *format_nonreloc,
+emacs_doprnt_1 (Lisp_Object stream, const Bufbyte *format_nonreloc,
Lisp_Object format_reloc, Bytecount format_length,
int nargs,
/* #### Gag me, gag me, gag me */
- CONST Lisp_Object *largs, va_list vargs)
+ const Lisp_Object *largs, va_list vargs)
{
printf_spec_dynarr *specs = 0;
printf_arg_dynarr *args = 0;
format_length = XSTRING_LENGTH (format_reloc);
}
if (format_length < 0)
- format_length = (Bytecount) strlen ((CONST char *) format_nonreloc);
+ format_length = (Bytecount) strlen ((const char *) format_nonreloc);
specs = parse_doprnt_spec (format_nonreloc, format_length);
if (largs)
/* You really don't want to know why this is necessary... */
static Bytecount
-emacs_doprnt_2 (Lisp_Object stream, CONST Bufbyte *format_nonreloc,
+emacs_doprnt_2 (Lisp_Object stream, const Bufbyte *format_nonreloc,
Lisp_Object format_reloc, Bytecount format_length, int nargs,
- CONST Lisp_Object *largs, ...)
+ const Lisp_Object *largs, ...)
{
va_list vargs;
Bytecount val;
parameter, because this function can cause GC. */
Bytecount
-emacs_doprnt_c (Lisp_Object stream, CONST Bufbyte *format_nonreloc,
+emacs_doprnt_c (Lisp_Object stream, const Bufbyte *format_nonreloc,
Lisp_Object format_reloc, Bytecount format_length,
...)
{
/* Like emacs_doprnt_c but the args come in va_list format. */
Bytecount
-emacs_doprnt_va (Lisp_Object stream, CONST Bufbyte *format_nonreloc,
+emacs_doprnt_va (Lisp_Object stream, const Bufbyte *format_nonreloc,
Lisp_Object format_reloc, Bytecount format_length,
va_list vargs)
{
See `format' for a description of this behavior. */
Bytecount
-emacs_doprnt_lisp (Lisp_Object stream, CONST Bufbyte *format_nonreloc,
+emacs_doprnt_lisp (Lisp_Object stream, const Bufbyte *format_nonreloc,
Lisp_Object format_reloc, Bytecount format_length,
- int nargs, CONST Lisp_Object *largs)
+ int nargs, const Lisp_Object *largs)
{
return emacs_doprnt_2 (stream, format_nonreloc, format_reloc,
format_length, nargs, largs);
/* Like the previous function but takes a variable number of arguments. */
Bytecount
-emacs_doprnt_lisp_2 (Lisp_Object stream, CONST Bufbyte *format_nonreloc,
+emacs_doprnt_lisp_2 (Lisp_Object stream, const Bufbyte *format_nonreloc,
Lisp_Object format_reloc, Bytecount format_length,
int nargs, ...)
{
to a stream. */
Lisp_Object
-emacs_doprnt_string_c (CONST Bufbyte *format_nonreloc,
+emacs_doprnt_string_c (const Bufbyte *format_nonreloc,
Lisp_Object format_reloc, Bytecount format_length,
...)
{
}
Lisp_Object
-emacs_doprnt_string_va (CONST Bufbyte *format_nonreloc,
+emacs_doprnt_string_va (const Bufbyte *format_nonreloc,
Lisp_Object format_reloc, Bytecount format_length,
va_list vargs)
{
}
Lisp_Object
-emacs_doprnt_string_lisp (CONST Bufbyte *format_nonreloc,
+emacs_doprnt_string_lisp (const Bufbyte *format_nonreloc,
Lisp_Object format_reloc, Bytecount format_length,
- int nargs, CONST Lisp_Object *largs)
+ int nargs, const Lisp_Object *largs)
{
Lisp_Object obj;
Lisp_Object stream = make_resizing_buffer_output_stream ();
}
Lisp_Object
-emacs_doprnt_string_lisp_2 (CONST Bufbyte *format_nonreloc,
+emacs_doprnt_string_lisp_2 (const Bufbyte *format_nonreloc,
Lisp_Object format_reloc, Bytecount format_length,
int nargs, ...)
{
#include "console-stream.h"
#include "dumper.h"
+#ifdef WINDOWSNT
+#define WINDOWS_LEAN_AND_MEAN
+#include <windows.h>
+#define PATH_MAX MAXPATHLEN
+#else
#ifdef HAVE_MMAP
#include <sys/mman.h>
#endif
+#endif
#ifndef SEPCHAR
#define SEPCHAR ':'
char *pdump_start, *pdump_end;
static size_t pdump_length;
+
+#ifdef WINDOWSNT
+// Handle for the dump file
+HANDLE pdump_hFile = INVALID_HANDLE_VALUE;
+// Handle for the file mapping object for the dump file
+HANDLE pdump_hMap = INVALID_HANDLE_VALUE;
+#endif
+
void (*pdump_free) (void);
static const unsigned char align_table[256] =
}
#ifdef WINDOWSNT
+/* Free the mapped file if we decide we don't want it after all */
static void pdump_file_unmap(void)
{
+ UnmapViewOfFile (pdump_start);
+ CloseHandle (pdump_hFile);
+ CloseHandle (pdump_hMap);
}
static int pdump_file_get(const char *path)
{
- HANDLE hFile;
- HANDLE hMap;
-
- hFile = CreateFile (path,
- GENERIC_READ + GENERIC_WRITE, /* Required for copy on write */
- 0, /* Not shared */
- NULL, /* Not inheritable */
- OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL,
- NULL); /* No template file */
- if (hFile == INVALID_HANDLE_VALUE)
+
+ pdump_hFile = CreateFile (path,
+ GENERIC_READ + GENERIC_WRITE, /* Required for copy on write */
+ 0, /* Not shared */
+ NULL, /* Not inheritable */
+ OPEN_EXISTING,
+ FILE_ATTRIBUTE_NORMAL,
+ NULL); /* No template file */
+ if (pdump_hFile == INVALID_HANDLE_VALUE)
return 0;
- pdump_length = GetFileSize (hFile, NULL);
- hMap = CreateFileMapping (hFile,
- NULL, /* No security attributes */
- PAGE_WRITECOPY, /* Copy on write */
- 0, /* Max size, high half */
- 0, /* Max size, low half */
- NULL); /* Unnamed */
- if (hMap == INVALID_HANDLE_VALUE)
+ pdump_length = GetFileSize (pdump_hFile, NULL);
+ pdump_hMap = CreateFileMapping (pdump_hFile,
+ NULL, /* No security attributes */
+ PAGE_WRITECOPY, /* Copy on write */
+ 0, /* Max size, high half */
+ 0, /* Max size, low half */
+ NULL); /* Unnamed */
+ if (pdump_hMap == INVALID_HANDLE_VALUE)
return 0;
- pdump_start = MapViewOfFile (hMap,
+ pdump_start = MapViewOfFile (pdump_hMap,
FILE_MAP_COPY, /* Copy on write */
0, /* Start at zero */
0,
return 1;
}
+/* pdump_resource_free is called (via the pdump_free pointer) to release
+ any resources allocated by pdump_resource_get. Since the Windows API
+ specs specifically state that you don't need to (and shouldn't) free the
+ resources allocated by FindResource, LoadResource, and LockResource this
+ routine does nothing. */
static void pdump_resource_free (void)
+{
+}
+
static int pdump_resource_get (void)
{
HRSRC hRes; /* Handle to dump resource */
int pdump_load(const char *argv0)
{
char exe_path[PATH_MAX];
- char *w;
#ifdef WINDOWSNT
- GetModuleFileName (NULL, exe_name, PATH_MAX);
+ GetModuleFileName (NULL, exe_path, PATH_MAX);
#else /* !WINDOWSNT */
+ char *w;
const char *dir, *p;
dir = argv0;
/* Add a number of contiguous elements to the array starting at START. */
void
-Dynarr_insert_many (void *d, CONST void *el, int len, int start)
+Dynarr_insert_many (void *d, const void *el, int len, int start)
{
Dynarr *dy = (Dynarr *) d;
user_name = (STRINGP (user) ? user : Fuser_login_name (user));
if (!NILP (user_name)) /* nil when nonexistent UID passed as arg */
{
- CONST char *user_name_ext;
+ const char *user_name_ext;
/* Fuck me. getpwnam() can call select() and (under IRIX at least)
things get wedged if a SIGIO arrives during this time. */
/* #### - Stig sez: this should return nil instead of "unknown" when pw==0 */
/* Ben sez: bad idea because it's likely to break something */
#ifndef AMPERSAND_FULL_NAME
- p = ((pw) ? USER_FULL_NAME : "unknown"); /* don't gettext */
+ p = pw ? USER_FULL_NAME : "unknown"; /* don't gettext */
q = strchr (p, ',');
#else
- p = ((pw) ? USER_FULL_NAME : "unknown"); /* don't gettext */
+ p = pw ? USER_FULL_NAME : "unknown"; /* don't gettext */
q = strchr (p, ',');
#endif
tem = ((!NILP (user) && !pw)
of a few bytes */
}
+/* !!#### not Mule correct. */
+
/* Returns the home directory, in external format */
Extbyte *
get_home_directory (void)
{
+ /* !!#### this is hopelessly bogus. Rule #1: Do not make any assumptions
+ about what format an external string is in. Could be Unicode, for all
+ we know, and then all the operations below are totally bogus.
+ Instead, convert all data to internal format *right* at the juncture
+ between XEmacs and the outside world, the very moment we first get
+ the data. --ben */
int output_home_warning = 0;
if (cached_home_directory == NULL)
}
else
{
-# if 1
+# if 0 /* changed by ben. This behavior absolutely stinks, and the
+ possibility being addressed here occurs quite commonly.
+ Using the current directory makes absolutely no sense. */
/*
* Use the current directory.
* This preserves the existing XEmacs behavior, but is different
*/
if (initial_directory[0] != '\0')
{
- cached_home_directory = initial_directory;
+ cached_home_directory = (Extbyte*) initial_directory;
}
else
{
/* This will probably give the wrong value */
- cached_home_directory = getcwd (NULL, 0);
+ cached_home_directory = (Extbyte*) getcwd (NULL, 0);
}
# else
/*
return Fcons (make_int (item >> 16), make_int (item & 0xffff));
}
-size_t emacs_strftime (char *string, size_t max, CONST char *format,
- CONST struct tm *tm);
-static long difftm (CONST struct tm *a, CONST struct tm *b);
+size_t emacs_strftime (char *string, size_t max, const char *format,
+ const struct tm *tm);
+static long difftm (const struct tm *a, const struct tm *b);
DEFUN ("format-time-string", Fformat_time_string, 1, 2, 0, /*
char *buf = (char *) alloca (size);
*buf = 1;
if (emacs_strftime (buf, size,
- (CONST char *) XSTRING_DATA (format_string),
+ (const char *) XSTRING_DATA (format_string),
localtime (&value))
|| !*buf)
return build_ext_string (buf, Qbinary);
/* Yield A - B, measured in seconds. */
static long
-difftm (CONST struct tm *a, CONST struct tm *b)
+difftm (const struct tm *a, const struct tm *b)
{
int ay = a->tm_year + (TM_YEAR_ORIGIN - 1);
int by = b->tm_year + (TM_YEAR_ORIGIN - 1);
static Lisp_Object Qkrbv41, Qkrbv42;
/* Deref policy */
static Lisp_Object Qnever, Qalways, Qfind;
+/* Modification types (Qdelete is defined in general.c) */
+static Lisp_Object Qadd, Qreplace;
+
\f
/************************************************************************/
/* Utility Functions */
if ((err = ldap_set_option (ld, LDAP_OPT_REFERRALS,
LDAP_OPT_ON)) != LDAP_SUCCESS)
signal_ldap_error (ld, NULL, err);
+ if ((err = ldap_set_option (ld, LDAP_OPT_RESTART,
+ LDAP_OPT_ON)) != LDAP_SUCCESS)
+ signal_ldap_error (ld, NULL, err);
#else /* not HAVE_LDAP_SET_OPTION */
ld->ld_deref = ldap_deref;
ld->ld_timelimit = ldap_timelimit;
#else /* not LDAP_REFERRALS */
ld->ld_options = 0;
#endif /* not LDAP_REFERRALS */
+ /* XEmacs uses interrupts (SIGIO,SIGALRM), LDAP calls need to ignore them */
+ ld->ld_options |= LDAP_OPT_RESTART;
#endif /* not HAVE_LDAP_SET_OPTION */
- /* ldap_bind_s calls select and may be wedged by SIGIO. */
- slow_down_interrupts ();
err = ldap_bind_s (ld, ldap_binddn, ldap_passwd, ldap_auth);
- speed_up_interrupts ();
if (err != LDAP_SUCCESS)
signal_simple_error ("Failed binding to the server",
build_string (ldap_err2string (err)));
struct berval **vals;
};
-
static Lisp_Object
ldap_search_unwind (Lisp_Object unwind_obj)
{
return Qnil;
}
-DEFUN ("ldap-search-internal", Fldap_search_internal, 2, 7, 0, /*
+/* The following function is called `ldap-search-basic' instead of */
+/* plain `ldap-search' to maintain compatibility with the XEmacs 21.1 */
+/* API where `ldap-search' was the name of the high-level search */
+/* function */
+
+DEFUN ("ldap-search-basic", Fldap_search_basic, 2, 8, 0, /*
Perform a search on an open LDAP connection.
LDAP is an LDAP connection object created with `ldap-open'.
FILTER is a filter string for the search as described in RFC 1558.
for each matching entry. If nil return all available attributes.
If ATTRSONLY is non-nil then only the attributes are retrieved, not
the associated values.
-If WITHDN is non-nil each entry in the result will be prepennded with
+If WITHDN is non-nil each entry in the result will be prepended with
its distinguished name DN.
+If VERBOSE is non-nil progress messages will be echoed.
The function returns a list of matching entries. Each entry is itself
an alist of attribute/value pairs optionally preceded by the DN of the
entry according to the value of WITHDN.
*/
- (ldap, filter, base, scope, attrs, attrsonly, withdn))
+ (ldap, filter, base, scope, attrs, attrsonly, withdn, verbose))
{
/* This function can GC */
LDAPMessage *e;
BerElement *ptr;
char *a, *dn;
- int i, rc, rc2;
+ int i, rc;
int matches;
struct ldap_unwind_struct unwind;
int speccount = specpdl_depth ();
- Lisp_Object list, entry, result;
+ Lisp_Object list = Qnil;
+ Lisp_Object entry = Qnil;
+ Lisp_Object result = Qnil;
struct gcpro gcpro1, gcpro2, gcpro3;
- list = entry = result = Qnil;
GCPRO3 (list, entry, result);
unwind.res = NULL;
/* Perform the search */
if (ldap_search (ld,
- NILP (base) ? "" : (char *) XSTRING_DATA (base),
+ NILP (base) ? (char *) "" : (char *) XSTRING_DATA (base),
ldap_scope,
- NILP (filter) ? "" : (char *) XSTRING_DATA (filter),
+ NILP (filter) ? (char *) "" : (char *) XSTRING_DATA (filter),
ldap_attributes,
NILP (attrsonly) ? 0 : 1)
== -1)
/* Build the results list */
matches = 0;
- /* ldap_result calls select() and can get wedged by EINTR signals */
- slow_down_interrupts ();
rc = ldap_result (ld, LDAP_RES_ANY, 0, NULL, &unwind.res);
- speed_up_interrupts ();
+
while (rc == LDAP_RES_SEARCH_ENTRY)
{
QUIT;
destroys the current echo area contents, even when invoked
from Lisp. It should use echo_area_message() instead, and
restore the old echo area contents later. */
- message ("Parsing ldap results... %d", matches);
+ if (! NILP (verbose))
+ message ("Parsing ldap results... %d", matches);
entry = Qnil;
/* Get the DN if required */
if (! NILP (withdn))
{
for (i = 0; unwind.vals[i] != NULL; i++)
{
- list = Fcons (make_ext_string (unwind.vals[i]->bv_val,
+ list = Fcons (make_ext_string ((Extbyte *) unwind.vals[i]->bv_val,
unwind.vals[i]->bv_len,
Qnative),
list);
ldap_msgfree (unwind.res);
unwind.res = NULL;
- slow_down_interrupts ();
rc = ldap_result (ld, LDAP_RES_ANY, 0, NULL, &(unwind.res));
- speed_up_interrupts ();
}
- if (rc == -1)
- signal_ldap_error (ld, unwind.res, 0);
-
+#if defined HAVE_LDAP_PARSE_RESULT
+ {
+ int rc2 = ldap_parse_result (ld, unwind.res,
+ &rc,
+ NULL, NULL, NULL, NULL, 0);
+ if (rc2 != LDAP_SUCCESS)
+ rc = rc2;
+ }
+#else
if (rc == 0)
signal_ldap_error (ld, NULL, LDAP_TIMELIMIT_EXCEEDED);
-#if defined HAVE_LDAP_PARSE_RESULT
- rc2 = ldap_parse_result (ld, unwind.res,
- &rc,
- NULL, NULL, NULL, NULL, 0);
- if (rc2 != LDAP_SUCCESS)
- rc = rc2;
-#elif defined HAVE_LDAP_RESULT2ERROR
+ if (rc == -1)
+ signal_ldap_error (ld, unwind.res, (unwind.res==NULL) ? ld->ld_errno : 0);
+
+#if defined HAVE_LDAP_RESULT2ERROR
rc = ldap_result2error (ld, unwind.res, 0);
#endif
- if ((rc != LDAP_SUCCESS) && (rc != LDAP_SIZELIMIT_EXCEEDED))
+#endif
+
+ if (rc != LDAP_SUCCESS)
signal_ldap_error (ld, NULL, rc);
ldap_msgfree (unwind.res);
unwind.res = (LDAPMessage *)NULL;
+
/* #### See above for calling message(). */
- message ("Parsing ldap results... done");
+ if (! NILP (verbose))
+ message ("Parsing ldap results... done");
unbind_to (speccount, Qnil);
UNGCPRO;
return Fnreverse (result);
}
+DEFUN ("ldap-add", Fldap_add, 3, 3, 0, /*
+Add an entry to an LDAP directory.
+LDAP is an LDAP connection object created with `ldap-open'.
+DN is the distinguished name of the entry to add.
+ENTRY is an entry specification, i.e., a list of cons cells
+containing attribute/value string pairs.
+*/
+ (ldap, dn, entry))
+{
+ LDAP *ld;
+ LDAPMod *ldap_mods, **ldap_mods_ptrs;
+ struct berval *bervals;
+ int rc;
+ int i, j;
+ size_t len;
+
+ Lisp_Object current = Qnil;
+ Lisp_Object values = Qnil;
+ struct gcpro gcpro1, gcpro2;
+
+ GCPRO2 (current, values);
+
+ /* Do all the parameter checking */
+ CHECK_LIVE_LDAP (ldap);
+ ld = XLDAP (ldap)->ld;
+
+ /* Check the DN */
+ CHECK_STRING (dn);
+
+ /* Check the entry */
+ CHECK_CONS (entry);
+ if (NILP (entry))
+ signal_simple_error ("Cannot add void entry", entry);
+
+ /* Build the ldap_mods array */
+ len = XINT (Flength (entry));
+ ldap_mods = alloca_array (LDAPMod, len);
+ ldap_mods_ptrs = alloca_array (LDAPMod *, 1 + len);
+ i = 0;
+ EXTERNAL_LIST_LOOP (entry, entry)
+ {
+ current = XCAR (entry);
+ CHECK_CONS (current);
+ CHECK_STRING (XCAR (current));
+ ldap_mods_ptrs[i] = &(ldap_mods[i]);
+ TO_EXTERNAL_FORMAT (LISP_STRING, XCAR (current),
+ C_STRING_ALLOCA, ldap_mods[i].mod_type,
+ Qnative);
+ ldap_mods[i].mod_op = LDAP_MOD_ADD | LDAP_MOD_BVALUES;
+ values = XCDR (current);
+ if (CONSP (values))
+ {
+ len = XINT (Flength (values));
+ bervals = alloca_array (struct berval, len);
+ ldap_mods[i].mod_vals.modv_bvals =
+ alloca_array (struct berval *, 1 + len);
+ j = 0;
+ EXTERNAL_LIST_LOOP (values, values)
+ {
+ current = XCAR (values);
+ CHECK_STRING (current);
+ ldap_mods[i].mod_vals.modv_bvals[j] = &(bervals[j]);
+ TO_EXTERNAL_FORMAT (LISP_STRING, current,
+ ALLOCA, (bervals[j].bv_val,
+ bervals[j].bv_len),
+ Qnative);
+ j++;
+ }
+ ldap_mods[i].mod_vals.modv_bvals[j] = NULL;
+ }
+ else
+ {
+ CHECK_STRING (values);
+ bervals = alloca_array (struct berval, 1);
+ ldap_mods[i].mod_vals.modv_bvals = alloca_array (struct berval *, 2);
+ ldap_mods[i].mod_vals.modv_bvals[0] = &(bervals[0]);
+ TO_EXTERNAL_FORMAT (LISP_STRING, values,
+ ALLOCA, (bervals[0].bv_val,
+ bervals[0].bv_len),
+ Qnative);
+ ldap_mods[i].mod_vals.modv_bvals[1] = NULL;
+ }
+ i++;
+ }
+ ldap_mods_ptrs[i] = NULL;
+ rc = ldap_add_s (ld, (char *) XSTRING_DATA (dn), ldap_mods_ptrs);
+ if (rc != LDAP_SUCCESS)
+ signal_ldap_error (ld, NULL, rc);
+
+ UNGCPRO;
+ return Qnil;
+}
+
+DEFUN ("ldap-modify", Fldap_modify, 3, 3, 0, /*
+Add an entry to an LDAP directory.
+LDAP is an LDAP connection object created with `ldap-open'.
+DN is the distinguished name of the entry to modify.
+MODS is a list of modifications to apply.
+A modification is a list of the form (MOD-OP ATTR VALUE1 VALUE2 ...)
+MOD-OP and ATTR are mandatory, VALUEs are optional depending on MOD-OP.
+MOD-OP is the type of modification, one of the symbols `add', `delete'
+or `replace'. ATTR is the LDAP attribute type to modify.
+*/
+ (ldap, dn, mods))
+{
+ LDAP *ld;
+ LDAPMod *ldap_mods, **ldap_mods_ptrs;
+ struct berval *bervals;
+ int i, j, rc;
+ Lisp_Object mod_op;
+ size_t len;
+
+ Lisp_Object current = Qnil;
+ Lisp_Object values = Qnil;
+ struct gcpro gcpro1, gcpro2;
+
+ GCPRO2 (current, values);
+
+ /* Do all the parameter checking */
+ CHECK_LIVE_LDAP (ldap);
+ ld = XLDAP (ldap)->ld;
+
+ /* Check the DN */
+ CHECK_STRING (dn);
+
+ /* Check the entry */
+ CHECK_CONS (mods);
+ if (NILP (mods))
+ return Qnil;
+
+ /* Build the ldap_mods array */
+ len = XINT (Flength (mods));
+ ldap_mods = alloca_array (LDAPMod, len);
+ ldap_mods_ptrs = alloca_array (LDAPMod *, 1 + len);
+ i = 0;
+ EXTERNAL_LIST_LOOP (mods, mods)
+ {
+ current = XCAR (mods);
+ CHECK_CONS (current);
+ CHECK_SYMBOL (XCAR (current));
+ mod_op = XCAR (current);
+ ldap_mods_ptrs[i] = &(ldap_mods[i]);
+ ldap_mods[i].mod_op = LDAP_MOD_BVALUES;
+ if (EQ (mod_op, Qadd))
+ ldap_mods[i].mod_op |= LDAP_MOD_ADD;
+ else if (EQ (mod_op, Qdelete))
+ ldap_mods[i].mod_op |= LDAP_MOD_DELETE;
+ else if (EQ (mod_op, Qreplace))
+ ldap_mods[i].mod_op |= LDAP_MOD_REPLACE;
+ else
+ signal_simple_error ("Invalid LDAP modification type", mod_op);
+ current = XCDR (current);
+ CHECK_STRING (XCAR (current));
+ TO_EXTERNAL_FORMAT (LISP_STRING, XCAR (current),
+ C_STRING_ALLOCA, ldap_mods[i].mod_type,
+ Qnative);
+ values = XCDR (current);
+ len = XINT (Flength (values));
+ bervals = alloca_array (struct berval, len);
+ ldap_mods[i].mod_vals.modv_bvals =
+ alloca_array (struct berval *, 1 + len);
+ j = 0;
+ EXTERNAL_LIST_LOOP (values, values)
+ {
+ current = XCAR (values);
+ CHECK_STRING (current);
+ ldap_mods[i].mod_vals.modv_bvals[j] = &(bervals[j]);
+ TO_EXTERNAL_FORMAT (LISP_STRING, current,
+ ALLOCA, (bervals[j].bv_val,
+ bervals[j].bv_len),
+ Qnative);
+ j++;
+ }
+ ldap_mods[i].mod_vals.modv_bvals[j] = NULL;
+ i++;
+ }
+ ldap_mods_ptrs[i] = NULL;
+ rc = ldap_modify_s (ld, (char *) XSTRING_DATA (dn), ldap_mods_ptrs);
+ if (rc != LDAP_SUCCESS)
+ signal_ldap_error (ld, NULL, rc);
+
+ UNGCPRO;
+ return Qnil;
+}
+
+
+DEFUN ("ldap-delete", Fldap_delete, 2, 2, 0, /*
+Delete an entry to an LDAP directory.
+LDAP is an LDAP connection object created with `ldap-open'.
+DN is the distinguished name of the entry to delete.
+*/
+ (ldap, dn))
+{
+ LDAP *ld;
+ int rc;
+
+ /* Check parameters */
+ CHECK_LIVE_LDAP (ldap);
+ ld = XLDAP (ldap)->ld;
+ CHECK_STRING (dn);
+
+ rc = ldap_delete_s (ld, (char *) XSTRING_DATA (dn));
+ if (rc != LDAP_SUCCESS)
+ signal_ldap_error (ld, NULL, rc);
+
+ return Qnil;
+}
void
syms_of_eldap (void)
{
+ INIT_LRECORD_IMPLEMENTATION (ldap);
+
defsymbol (&Qldapp, "ldapp");
defsymbol (&Qport, "port");
defsymbol (&Qauth, "auth");
defsymbol (&Qnever, "never");
defsymbol (&Qalways, "always");
defsymbol (&Qfind, "find");
+ defsymbol (&Qadd, "add");
+ defsymbol (&Qreplace, "replace");
DEFSUBR (Fldapp);
DEFSUBR (Fldap_host);
DEFSUBR (Fldap_status);
DEFSUBR (Fldap_open);
DEFSUBR (Fldap_close);
- DEFSUBR (Fldap_search_internal);
+ DEFSUBR (Fldap_search_basic);
+ DEFSUBR (Fldap_add);
+ DEFSUBR (Fldap_modify);
+ DEFSUBR (Fldap_delete);
}
void
Lisp_Object Fldap_open (Lisp_Object host,
Lisp_Object ldap_plist);
Lisp_Object Fldap_close (Lisp_Object ldap);
-Lisp_Object Fldap_search_internal (Lisp_Object ldap,
- Lisp_Object filter,
- Lisp_Object base,
- Lisp_Object scope,
- Lisp_Object attrs,
- Lisp_Object attrsonly,
- Lisp_Object withdn);
+Lisp_Object Fldap_search_basic (Lisp_Object ldap,
+ Lisp_Object filter,
+ Lisp_Object base,
+ Lisp_Object scope,
+ Lisp_Object attrs,
+ Lisp_Object attrsonly,
+ Lisp_Object withdn,
+ Lisp_Object verbose);
+Lisp_Object Fldap_add (Lisp_Object ldap,
+ Lisp_Object dn,
+ Lisp_Object entry);
+Lisp_Object Fldap_modify (Lisp_Object ldap,
+ Lisp_Object dn,
+ Lisp_Object entry);
+Lisp_Object Fldap_delete (Lisp_Object ldap,
+ Lisp_Object dn);
#endif /* INCLUDED_eldap_h_ */
/* Return some prime near, but greater than or equal to, SIZE.
Decades from the time of writing, someone will have a system large
enough that the list below will be too short... */
- static CONST size_t primes [] =
+ static const size_t primes [] =
{
19, 29, 41, 59, 79, 107, 149, 197, 263, 347, 457, 599, 787, 1031,
1361, 1777, 2333, 3037, 3967, 5167, 6719, 8737, 11369, 14783,
return 1;
}
+
+/* This is not a great hash function, but it _is_ correct and fast.
+ Examining all entries is too expensive, and examining a random
+ subset does not yield a correct hash function. */
+static hashcode_t
+hash_table_hash (Lisp_Object hash_table, int depth)
+{
+ return XHASH_TABLE (hash_table)->count;
+}
+
\f
/* Printing hash tables.
DEFINE_LRECORD_IMPLEMENTATION ("hash-table", hash_table,
mark_hash_table, print_hash_table,
finalize_hash_table,
- /* #### Implement hash_table_hash()! */
- hash_table_equal, 0,
+ hash_table_equal, hash_table_hash,
hash_table_description,
Lisp_Hash_Table);
*/
(hash_table))
{
- CONST Lisp_Hash_Table *ht_old = xhash_table (hash_table);
+ const Lisp_Hash_Table *ht_old = xhash_table (hash_table);
Lisp_Hash_Table *ht = alloc_lcrecord_type (Lisp_Hash_Table, &lrecord_hash_table);
copy_lcrecord (ht, ht_old);
void
pdump_reorganize_hash_table (Lisp_Object hash_table)
{
- CONST Lisp_Hash_Table *ht = xhash_table (hash_table);
+ const Lisp_Hash_Table *ht = xhash_table (hash_table);
hentry *new_entries = xnew_array_and_zero (hentry, ht->size + 1);
hentry *e, *sentinel;
}
static hentry *
-find_hentry (Lisp_Object key, CONST Lisp_Hash_Table *ht)
+find_hentry (Lisp_Object key, const Lisp_Hash_Table *ht)
{
hash_table_test_function_t test_function = ht->test_function;
hentry *entries = ht->hentries;
*/
(key, hash_table, default_))
{
- CONST Lisp_Hash_Table *ht = xhash_table (hash_table);
+ const Lisp_Hash_Table *ht = xhash_table (hash_table);
hentry *e = find_hentry (key, ht);
return HENTRY_CLEAR_P (e) ? default_ : e->value;
*/
(function, hash_table))
{
- CONST Lisp_Hash_Table *ht = xhash_table (hash_table);
- CONST hentry *e, *sentinel;
+ const Lisp_Hash_Table *ht = xhash_table (hash_table);
+ const hentry *e, *sentinel;
for (e = ht->hentries, sentinel = e + ht->size; e < sentinel; e++)
if (!HENTRY_CLEAR_P (e))
elisp_maphash (maphash_function_t function,
Lisp_Object hash_table, void *extra_arg)
{
- CONST Lisp_Hash_Table *ht = XHASH_TABLE (hash_table);
- CONST hentry *e, *sentinel;
+ const Lisp_Hash_Table *ht = XHASH_TABLE (hash_table);
+ const hentry *e, *sentinel;
for (e = ht->hentries, sentinel = e + ht->size; e < sentinel; e++)
if (!HENTRY_CLEAR_P (e))
/************************************************************************/
/* garbage collecting weak hash tables */
/************************************************************************/
+#define MARK_OBJ(obj) do { \
+ Lisp_Object mo_obj = (obj); \
+ if (!marked_p (mo_obj)) \
+ { \
+ mark_object (mo_obj); \
+ did_mark = 1; \
+ } \
+} while (0)
+
/* Complete the marking for semi-weak hash tables. */
int
!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;
+ const Lisp_Hash_Table *ht = XHASH_TABLE (hash_table);
+ const hentry *e = ht->hentries;
+ const hentry *sentinel = e + ht->size;
if (! marked_p (hash_table))
/* The hash table is probably garbage. Ignore it. */
/* Now, scan over all the pairs. For all pairs that are
half-marked, we may need to mark the other half if we're
keeping this pair. */
-#define MARK_OBJ(obj) \
-do { if (!marked_p (obj)) mark_object (obj), did_mark = 1; } while (0)
-
switch (ht->weakness)
{
case HASH_TABLE_KEY_WEAK:
internal_array_hash (Lisp_Object *arr, int size, int depth)
{
int i;
- unsigned long hash = 0;
+ hashcode_t hash = 0;
+ depth++;
if (size <= 5)
{
for (i = 0; i < size; i++)
- hash = HASH2 (hash, internal_hash (arr[i], depth + 1));
+ hash = HASH2 (hash, internal_hash (arr[i], depth));
return hash;
}
A slightly better approach would be to offset by some
noise factor from the points chosen below. */
for (i = 0; i < 5; i++)
- hash = HASH2 (hash, internal_hash (arr[i*size/5], depth + 1));
+ hash = HASH2 (hash, internal_hash (arr[i*size/5], depth));
return hash;
}
{
return hash_string (XSTRING_DATA (obj), XSTRING_LENGTH (obj));
}
- if (VECTORP (obj))
- {
- return HASH2 (XVECTOR_LENGTH (obj),
- internal_array_hash (XVECTOR_DATA (obj),
- XVECTOR_LENGTH (obj),
- depth + 1));
- }
if (LRECORDP (obj))
{
- CONST struct lrecord_implementation
+ const struct lrecord_implementation
*imp = XRECORD_LHEADER_IMPLEMENTATION (obj);
if (imp->hash)
return imp->hash (obj, depth);
(object))
{
/* This function is pretty 32bit-centric. */
- unsigned long hash = internal_hash (object, 0);
+ hashcode_t hash = internal_hash (object, 0);
return Fcons (hash >> 16, hash & 0xffff);
}
#endif
void
syms_of_elhash (void)
{
+ INIT_LRECORD_IMPLEMENTATION (hash_table);
+
DEFSUBR (Fhash_table_p);
DEFSUBR (Fmake_hash_table);
DEFSUBR (Fcopy_hash_table);
#include "sysfile.h"
#include "systime.h"
+#ifdef PDUMP
+#include "dump-id.h"
+#include "dumper.h"
+#endif
+
+#ifndef SEPCHAR
+#define SEPCHAR ':'
+#endif
+
#ifdef QUANTIFY
#include <quantify.h>
#endif
#endif
#ifdef TOOLTALK
-#include TT_C_H_PATH
+#include TT_C_H_FILE
#endif
#if defined (WINDOWSNT)
/* For PATH_EXEC */
#include <paths.h>
-#ifdef HEAP_IN_DATA
+#if defined (HEAP_IN_DATA) && !defined(PDUMP)
void report_sheap_usage (int die_if_pure_storage_exceeded);
#endif
/* Type of display specified. We cannot use a Lisp symbol here because
Lisp symbols may not initialized at the time that we set this
variable. */
-CONST char *display_use;
+const char *display_use;
/* If non-zero, then the early error handler will only print the error
message and exit. */
/* Nonzero means don't load package autoloads at startup */
int inhibit_autoloads;
+/* Nonzero means don't load the dump file (ignored if not PDUMP) */
+
+int nodumpfile;
+
/* Nonzero means print debug information about path searching */
int debug_paths;
/* Nonzero if handling a fatal error already */
static int fatal_error_in_progress;
+static JMP_BUF run_temacs_catch;
+
+static int run_temacs_argc;
+static char **run_temacs_argv;
+static char *run_temacs_args;
+static size_t run_temacs_argv_size;
+static size_t run_temacs_args_size;
+
static void shut_down_emacs (int sig, Lisp_Object stuff);
/* Handle bus errors, illegal instruction, etc. */
# if 0 /* This is evil, rarely useful, and causes grief in some cases. */
/* Check for Sun-style stack printing via /proc */
{
- CONST char *pstack = "/usr/proc/bin/pstack";
+ const char *pstack = "/usr/proc/bin/pstack";
if (access (pstack, X_OK) == 0)
{
char buf[100];
}
\f
-DOESNT_RETURN
-fatal (CONST char *fmt, ...)
-{
- va_list args;
- va_start (args, fmt);
-
- fprintf (stderr, "\nXEmacs: ");
- vfprintf (stderr, GETTEXT (fmt), args);
- fprintf (stderr, "\n");
-
- va_end (args);
- fflush (stderr);
- exit (1);
-}
-
-/* #### The following two functions should be replaced with
- calls to emacs_doprnt_*() functions, with STREAM set to send out
- to stdout or stderr. This is the only way to ensure that
- I18N3 works properly (many implementations of the *printf()
- functions, including the ones included in glibc, do not implement
- the %###$ argument-positioning syntax). */
-
-/* exactly equivalent to fprintf (stderr, fmt, ...) except that it calls
- GETTEXT on the format string. */
-
-int
-stderr_out (CONST char *fmt, ...)
-{
- int retval;
- va_list args;
- va_start (args, fmt);
-
- retval = vfprintf (stderr, GETTEXT (fmt), args);
-
- va_end (args);
- /* fflush (stderr); */
- return retval;
-}
-
-/* exactly equivalent to fprintf (stdout, fmt, ...) except that it calls
- GETTEXT on the format string. */
-
-int
-stdout_out (CONST char *fmt, ...)
-{
- int retval;
- va_list args;
- va_start (args, fmt);
-
- retval = vfprintf (stdout, GETTEXT (fmt), args);
-
- va_end (args);
- return retval;
-}
-
#ifdef SIGDANGER
/* Handler for SIGDANGER. */
for (i = 0, next = argv_list; i < n; i++, next = XCDR (next))
{
- CONST char *temp;
+ const char *temp;
CHECK_STRING (XCAR (next));
TO_EXTERNAL_FORMAT (LISP_STRING, XCAR (next),
* But hey, it solves all NS related memory problems, so who's
* complaining? */
if (initialized && malloc_jumpstart (malloc_cookie) != 0)
- fprintf (stderr, "malloc jumpstart failed!\n");
+ stderr_out ("malloc jumpstart failed!\n");
#endif /* NeXT */
/*
sort_args (argc, argv);
- /* Map in shared memory, if we are using that. */
-#ifdef HAVE_SHM
- if (argmatch (argv, argc, "-nl", "--no-shared-memory", 6, NULL, &skip_args))
- {
- map_in_data (0);
- /* The shared memory was just restored, which clobbered this. */
- skip_args = 1;
- }
- else
- {
- map_in_data (1);
- /* The shared memory was just restored, which clobbered this. */
- skip_args = 0;
- }
-#endif /* HAVE_SHM */
-
#if (defined (MSDOS) && defined (EMX)) || defined (WIN32) || defined (_SCO_DS)
environ = envp;
#endif
inhibit_window_system = 1;
#endif
+ /* Handle the -sd/--show-dump-id switch, which means show the hex dump_id and quit */
+ if (argmatch (argv, argc, "-sd", "--show-dump-id", 9, NULL, &skip_args))
+ {
+#ifdef PDUMP
+ printf ("%08x\n", dump_id);
+#else
+ printf ("*ERROR**\n");
+#endif
+ exit (0);
+ }
+
/* Handle the -t switch, which specifies filename to use as terminal */
{
char *term;
}
}
+ /* Handle the --no-dump-file/-nd switch, which means don't load the dump file (ignored when not using pdump) */
+ if (argmatch (argv, argc, "-nd", "--no-dump-file", 7, NULL, &skip_args))
+ {
+ nodumpfile = 1;
+ }
+
/* Handle -nw switch */
if (argmatch (argv, argc, "-nw", "--no-windows", 6, NULL, &skip_args))
inhibit_window_system = 1;
#ifdef PDUMP
if (restart)
initialized = 1;
- else {
- initialized = pdump_load ();
- purify_flag = !initialized;
+ else if (nodumpfile) {
+ initialized = 0;
+ purify_flag = 1;
+ } else {
+ initialized = pdump_load (argv[0]);
+ if (initialized)
+ run_temacs_argc = -1;
+ else
+ purify_flag = 1;
}
#else
if (!initialized)
/* Initialize Qnil, Qt, Qunbound, and the
obarray. After this, symbols can be
- interned. This depends on init_alloc_once(). */
+ interned. This depends on init_alloc_once_early(). */
init_symbols_once_early ();
/* Declare the basic symbols pertaining to errors,
The *only* thing that the syms_of_*() functions are allowed to do
is call one of the following three functions:
+ INIT_LRECORD_IMPLEMENTATION()
defsymbol()
defsubr() (i.e. DEFSUBR)
deferror()
syms_of_glyphs ();
syms_of_glyphs_eimage ();
syms_of_glyphs_widget ();
-#if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) || defined (HAVE_TOOLBARS)
syms_of_gui ();
-#endif
syms_of_gutter ();
syms_of_indent ();
syms_of_intl ();
syms_of_gpmevent ();
#endif
+#ifdef HAVE_POSTGRESQL
+ syms_of_postgresql ();
+#endif
+
/* Now create the subtypes for the types that have them.
We do this before the vars_*() because more symbols
may get initialized here. */
using a global variable that has been initialized
earlier on in the same function
- Any of the object-creating functions on alloc.c: e.g.
+ Any of the object-creating functions in alloc.c: e.g.
make_pure_*()
make_string()
vars_of_glyphs ();
vars_of_glyphs_eimage ();
vars_of_glyphs_widget ();
-#if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) || defined (HAVE_TOOLBARS)
vars_of_gui ();
-#endif
vars_of_gutter ();
vars_of_indent ();
vars_of_insdel ();
vars_of_eldap ();
#endif
+#ifdef HAVE_POSTGRESQL
+ vars_of_postgresql();
+#endif
+
#ifdef HAVE_GPM
vars_of_gpmevent ();
#endif
reinit_vars_of_event_stream ();
reinit_vars_of_events ();
reinit_vars_of_extents ();
+ reinit_vars_of_fileio ();
reinit_vars_of_font_lock ();
reinit_vars_of_glyphs ();
reinit_vars_of_glyphs_widget ();
#ifdef HAVE_TTY
init_device_tty ();
#endif
- init_console_stream (); /* Create the first console */
+ init_console_stream (restart); /* Create the first console */
/* try to get the actual pathname of the exec file we are running */
if (!restart)
struct standard_args
{
- CONST char * CONST name;
- CONST char * CONST longname;
+ const char *name;
+ const char *longname;
int priority;
int nargs;
};
-static struct standard_args standard_args[] =
+static const struct standard_args standard_args[] =
{
/* Handled by main_1 above: */
- { "-nl", "--no-shared-memory", 100, 0 },
- { "-t", "--terminal", 95, 1 },
+ { "-sd", "--show-dump-id", 105, 0 },
+ { "-t", "--terminal", 100, 1 },
+ { "-nd", "--no-dump-file", 95, 0 },
{ "-nw", "--no-windows", 90, 0 },
{ "-batch", "--batch", 85, 0 },
{ "-debug-paths", "--debug-paths", 82, 0 },
xfree (priority);
}
-static JMP_BUF run_temacs_catch;
-
-static int run_temacs_argc;
-static char **run_temacs_argv;
-static char *run_temacs_args;
-static size_t run_temacs_argv_size;
-static size_t run_temacs_args_size;
-
DEFUN ("running-temacs-p", Frunning_temacs_p, 0, 0, 0, /*
True if running temacs. This means we are in the dumping stage.
This is false during normal execution of the `xemacs' program, and
(int nargs, Lisp_Object *args))
{
int ac;
- CONST Extbyte *wampum;
+ const Extbyte *wampum;
int namesize;
int total_len;
Lisp_Object orig_invoc_name = Fcar (Vcommand_line_args);
- CONST Extbyte **wampum_all = alloca_array (CONST Extbyte *, nargs);
+ const Extbyte **wampum_all = alloca_array (const Extbyte *, nargs);
int *wampum_all_len = alloca_array (int, nargs);
assert (!gc_in_progress);
unbind_to (0, Qnil); /* this closes loadup.el */
purify_flag = 0;
run_temacs_argc = nargs + 1;
-#ifdef HEAP_IN_DATA
+#if defined (HEAP_IN_DATA) && !defined(PDUMP)
report_sheap_usage (0);
#endif
LONGJMP (run_temacs_catch, 1);
int rc = malloc_set_state (malloc_state_ptr);
if (rc != 0)
{
- fprintf (stderr, "malloc_set_state failed, rc = %d\n", rc);
+ stderr_out ("malloc_set_state failed, rc = %d\n", rc);
abort ();
}
#if 0
"\n"
" gdb ");
{
- CONST char *name;
+ const char *name;
char *dir = 0;
/* Now try to determine the actual path to the executable,
extern char my_edata[];
#endif
-#ifdef HAVE_SHM
-
-DEFUN ("dump-emacs-data", Fdump_emacs_data, 1, 1, 0, /*
-Dump current state of XEmacs into data file FILENAME.
-This function exists on systems that use HAVE_SHM.
-*/
- (intoname))
-{
- /* This function can GC */
- int opurify;
- struct gcpro gcpro1;
- GCPRO1 (intoname);
-
- CHECK_STRING (intoname);
- intoname = Fexpand_file_name (intoname, Qnil);
-
- opurify = purify_flag;
- purify_flag = 0;
-
- fflush (stderr);
- fflush (stdout);
-
- disksave_object_finalization ();
- release_breathing_space ();
-
- /* Tell malloc where start of impure now is */
- /* Also arrange for warnings when nearly out of space. */
-#ifndef SYSTEM_MALLOC
- memory_warnings (my_edata, malloc_warning);
-#endif
- UNGCPRO;
- map_out_data (XSTRING_DATA (intoname));
-
- purify_flag = opurify;
-
- return Qnil;
-}
-
-#else /* not HAVE_SHM */
extern void disable_free_hook (void);
DEFUN ("dump-emacs", Fdump_emacs, 2, 2, 0, /*
opurify = purify_flag;
purify_flag = 0;
-#ifdef HEAP_IN_DATA
+#if defined (HEAP_IN_DATA) && !defined(PDUMP)
report_sheap_usage (1);
#endif
return Qnil;
}
-#endif /* not HAVE_SHM */
-
#endif /* not CANNOT_DUMP */
\f
-#ifndef SEPCHAR
-#define SEPCHAR ':'
-#endif
/* Split STRING into a list of substrings. The substrings are the
parts of original STRING separated by SEPCHAR. */
static Lisp_Object
-split_string_by_emchar_1 (CONST Bufbyte *string, Bytecount size,
+split_string_by_emchar_1 (const Bufbyte *string, Bytecount size,
Emchar sepchar)
{
Lisp_Object result = Qnil;
- CONST Bufbyte *end = string + size;
+ const Bufbyte *end = string + size;
while (1)
{
- CONST Bufbyte *p = string;
+ const Bufbyte *p = string;
while (p < end)
{
if (charptr_emchar (p) == sepchar)
converted using Qfile_name), and sepchar is hardcoded to SEPCHAR
(':' or whatever). */
Lisp_Object
-decode_path (CONST char *path)
+decode_path (const char *path)
{
Bytecount newlen;
Bufbyte *newpath;
}
Lisp_Object
-decode_env_path (CONST char *evarname, CONST char *default_)
+decode_env_path (const char *evarname, const char *default_)
{
- CONST char *path = 0;
+ const char *path = 0;
if (evarname)
path = egetenv (evarname);
if (!path)
/* This highly dubious kludge ... shut up Jamie, I'm tired of your slagging. */
DOESNT_RETURN
-assert_failed (CONST char *file, int line, CONST char *expr)
+assert_failed (const char *file, int line, const char *expr)
{
stderr_out ("Fatal error: assertion failed, file %s, line %d, %s\n",
file, line, expr);
syms_of_emacs (void)
{
#ifndef CANNOT_DUMP
-#ifdef HAVE_SHM
- DEFSUBR (Fdump_emacs_data);
-#else
DEFSUBR (Fdump_emacs);
-#endif
#endif /* !CANNOT_DUMP */
DEFSUBR (Frun_emacs_from_temacs);
malloc - check operation of malloc;
gc - check garbage collection;
bufpos - check buffer positions.
+
+quick-build - user has requested the "quick-build" configure option.
*/ );
Vinternal_error_checking = Qnil;
#ifdef ERROR_CHECK_EXTENTS
Vinternal_error_checking = Fcons (intern ("bufpos"),
Vinternal_error_checking);
#endif
+#ifdef QUICK_BUILD
+ Vinternal_error_checking = Fcons (intern ("quick-build"),
+ Vinternal_error_checking);
+#endif
DEFVAR_CONST_LISP ("mail-lock-methods", &Vmail_lock_methods /*
Mail spool locking methods supported by this instance of XEmacs.
Vmail_lock_methods = Fcons (intern ("locking"), Vmail_lock_methods);
#endif
}
-
+
DEFVAR_CONST_LISP ("configure-mail-lock-method", &Vconfigure_mail_lock_method /*
Mail spool locking method suggested by configure. This is one
of the symbols in MAIL-LOCK-METHODS.
*Directory of architecture-independent files that come with XEmacs,
intended for XEmacs to use.
Use of this variable in new code is almost never correct. See the
-function `locate-data-directory' and the variable `data-directory-list'.
+functions `locate-data-file' and `locate-data-directory' and the variable
+`data-directory-list'.
*/ );
Vdata_directory = Qnil;
static emodules_list *modules;
static int modnum;
-static int find_make_module (CONST char *mod, CONST char *name, CONST char *ver, int make_or_find);
+static int find_make_module (const char *mod, const char *name, const char *ver, int make_or_find);
static Lisp_Object module_load_unwind (Lisp_Object);
static void attempt_module_delete (int mod);
}
static int
-find_make_module (CONST char *mod, CONST char *name, CONST char *ver, int mof)
+find_make_module (const char *mod, const char *name, const char *ver, int mof)
{
int i, fs = -1;
* the cleaning up.
*/
void
-emodules_load(CONST char *module, CONST char *modname, CONST char *modver)
+emodules_load(const char *module, const char *modname, const char *modver)
{
Lisp_Object filename;
Lisp_Object foundname;
int fd, x, mpx;
char *soname, *tmod;
- CONST char **f;
- CONST long *ellcc_rev;
+ const char **f;
+ const long *ellcc_rev;
char *mver, *mname, *mtitle, *symname;
void (*modload)(void) = 0;
void (*modsyms)(void) = 0;
emodules_depth++;
dlhandle = 0;
- if ((module == (CONST char *)0) || (module[0] == '\0'))
+ if ((module == (const char *)0) || (module[0] == '\0'))
error ("Empty module name");
/* This is to get around the fact that build_string() is not declared
if (dlhandle == (dll_handle)0)
error ("Opening dynamic module: %s", dll_error (dlhandle));
- ellcc_rev = (CONST long *)dll_variable (dlhandle, "emodule_compiler");
- if ((ellcc_rev == (CONST long *)0) || (*ellcc_rev <= 0))
+ ellcc_rev = (const long *)dll_variable (dlhandle, "emodule_compiler");
+ if ((ellcc_rev == (const long *)0) || (*ellcc_rev <= 0))
error ("Missing symbol `emodule_compiler': Invalid dynamic module");
if (*ellcc_rev > EMODULES_REVISION)
error ("Unsupported version `%ld(%ld)': Invalid dynamic module",
*ellcc_rev, EMODULES_REVISION);
- f = (CONST char **)dll_variable (dlhandle, "emodule_name");
- if ((f == (CONST char **)0) || (*f == (CONST char *)0))
+ f = (const char **)dll_variable (dlhandle, "emodule_name");
+ if ((f == (const char **)0) || (*f == (const char *)0))
error ("Missing symbol `emodule_name': Invalid dynamic module");
mname = (char *)alloca (strlen (*f) + 1);
if (mname[0] == '\0')
error ("Empty value for `emodule_name': Invalid dynamic module");
- f = (CONST char **)dll_variable (dlhandle, "emodule_version");
- if ((f == (CONST char **)0) || (*f == (CONST char *)0))
+ f = (const char **)dll_variable (dlhandle, "emodule_version");
+ if ((f == (const char **)0) || (*f == (const char *)0))
error ("Missing symbol `emodule_version': Invalid dynamic module");
mver = (char *)alloca (strlen (*f) + 1);
strcpy (mver, *f);
- f = (CONST char **)dll_variable (dlhandle, "emodule_title");
- if ((f == (CONST char **)0) || (*f == (CONST char *)0))
+ f = (const char **)dll_variable (dlhandle, "emodule_title");
+ if ((f == (const char **)0) || (*f == (const char *)0))
error ("Missing symbol `emodule_title': Invalid dynamic module");
mtitle = (char *)alloca (strlen (*f) + 1);
}
void
-emodules_doc_subr(CONST char *symname, CONST char *doc)
+emodules_doc_subr(const char *symname, const char *doc)
{
Bytecount len = strlen (symname);
- Lisp_Object sym = oblookup (Vobarray, (CONST Bufbyte *)symname, len);
+ Lisp_Object sym = oblookup (Vobarray, (const Bufbyte *)symname, len);
Lisp_Subr *subr;
if (SYMBOLP(sym))
}
void
-emodules_doc_sym (CONST char *symname, CONST char *doc)
+emodules_doc_sym (const char *symname, const char *doc)
{
Bytecount len = strlen (symname);
- Lisp_Object sym = oblookup (Vobarray, (CONST Bufbyte *)symname, len);
+ Lisp_Object sym = oblookup (Vobarray, (const Bufbyte *)symname, len);
Lisp_Object docstr;
struct gcpro gcpro1;
* specified version before. We also use these as checks when we open the
* module to make sure we have the right module.
*/
-extern void emodules_load (CONST char *module, CONST char *name, CONST char *version);
+extern void emodules_load (const char *module, const char *name, const char *version);
/*
* Because subrs and symbols added by a dynamic module are not part of
* into the right place. These functions will be called by the module
* init code, generated by ellcc during initialization mode.
*/
-extern void emodules_doc_subr (CONST char *objname, CONST char *docstr);
-extern void emodules_doc_sym (CONST char *objname, CONST char *docstr);
+extern void emodules_doc_subr (const char *objname, const char *docstr);
+extern void emodules_doc_sym (const char *objname, const char *docstr);
#define CDOCSUBR(Fname, DOC) emodules_doc_subr (Fname, DOC)
#define CDOCSYM(Sname, DOC) emodules_doc_sym (Sname, DOC)
static Lisp_Object Vcondition_handlers;
-#if 0 /* no longer used */
+#define DEFEND_AGAINST_THROW_RECURSION
+
+#ifdef DEFEND_AGAINST_THROW_RECURSION
/* Used for error catching purposes by throw_or_bomb_out */
static int throw_level;
-#endif /* unused */
+#endif
+
+#ifdef ERROR_CHECK_TYPECHECK
+void check_error_state_sanity (void);
+#endif
\f
/************************************************************************/
print_subr (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
{
Lisp_Subr *subr = XSUBR (obj);
- CONST char *header =
+ const char *header =
(subr->max_args == UNEVALLED) ? "#<special-form " : "#<subr ";
- CONST char *name = subr_name (subr);
- CONST char *trailer = subr->prompt ? " (interactive)>" : ">";
+ const char *name = subr_name (subr);
+ const char *trailer = subr->prompt ? " (interactive)>" : ">";
if (print_readably)
error ("printing unreadable object %s%s%s", header, name, trailer);
};
DEFINE_BASIC_LRECORD_IMPLEMENTATION ("subr", subr,
- this_one_is_unmarkable, print_subr, 0, 0, 0,
+ 0, print_subr, 0, 0, 0,
subr_description,
Lisp_Subr);
\f
c.val = (*func) (arg);
if (threw) *threw = 0;
catchlist = c.next;
+#ifdef ERROR_CHECK_TYPECHECK
+ check_error_state_sanity ();
+#endif
return c.val;
}
unbind_to (catchlist->pdlcount, Qnil);
handlerlist = catchlist->handlerlist;
catchlist = catchlist->next;
+#ifdef ERROR_CHECK_TYPECHECK
+ check_error_state_sanity ();
+#endif
}
while (! last_time);
#else /* Actual XEmacs code */
/* Unwind the specpdl stack */
unbind_to (c->pdlcount, Qnil);
catchlist = c->next;
+#ifdef ERROR_CHECK_TYPECHECK
+ check_error_state_sanity ();
+#endif
#endif
gcprolist = c->gcpro;
backtrace_list = c->backlist;
lisp_eval_depth = c->lisp_eval_depth;
-#if 0 /* no longer used */
+#ifdef DEFEND_AGAINST_THROW_RECURSION
throw_level = 0;
#endif
LONGJMP (c->jmp, 1);
throw_or_bomb_out (Lisp_Object tag, Lisp_Object val, int bomb_out_p,
Lisp_Object sig, Lisp_Object data)
{
-#if 0
+#ifdef DEFEND_AGAINST_THROW_RECURSION
/* die if we recurse more than is reasonable */
if (++throw_level > 20)
abort();
have this code here, and it doesn't cost anything, so I'm leaving it.*/
UNGCPRO;
catchlist = c.next;
+#ifdef ERROR_CHECK_TYPECHECK
+ check_error_state_sanity ();
+#endif
Vcondition_handlers = XCDR (c.tag);
return unbind_to (speccount, c.val);
{
/* who knows how much has been initialized? Safest bet is
just to bomb out immediately. */
+ /* let's not use stderr_out() here, because that does a bunch of
+ things that might not be safe yet. */
fprintf (stderr, "Error before initialization is complete!\n");
abort ();
}
for (;;)
Fsignal (sig, data);
}
-
-static Lisp_Object
-call_with_suspended_errors_1 (Lisp_Object opaque_arg)
+#ifdef ERROR_CHECK_TYPECHECK
+void
+check_error_state_sanity (void)
{
- Lisp_Object val;
- Lisp_Object *kludgy_args = (Lisp_Object *) get_opaque_ptr (opaque_arg);
- PRIMITIVE_FUNCALL (val, get_opaque_ptr (kludgy_args[0]),
- kludgy_args + 2, XINT (kludgy_args[1]));
- return val;
+ struct catchtag *c;
+ int found_error_tag = 0;
+
+ for (c = catchlist; c; c = c->next)
+ {
+ if (EQ (c->tag, Qunbound_suspended_errors_tag))
+ {
+ found_error_tag = 1;
+ break;
+ }
+ }
+
+ assert (found_error_tag || NILP (Vcurrent_error_state));
}
+#endif
static Lisp_Object
restore_current_warning_class (Lisp_Object warning_class)
return Qnil;
}
+static Lisp_Object
+call_with_suspended_errors_1 (Lisp_Object opaque_arg)
+{
+ Lisp_Object val;
+ Lisp_Object *kludgy_args = (Lisp_Object *) get_opaque_ptr (opaque_arg);
+ Lisp_Object no_error = kludgy_args[2];
+ int speccount = specpdl_depth ();
+
+ if (!EQ (Vcurrent_error_state, no_error))
+ {
+ record_unwind_protect (restore_current_error_state,
+ Vcurrent_error_state);
+ Vcurrent_error_state = no_error;
+ }
+ PRIMITIVE_FUNCALL (val, get_opaque_ptr (kludgy_args[0]),
+ kludgy_args + 3, XINT (kludgy_args[1]));
+ return unbind_to (speccount, val);
+}
+
/* Many functions would like to do one of three things if an error
occurs:
{
va_list vargs;
int speccount;
- Lisp_Object kludgy_args[22];
- Lisp_Object *args = kludgy_args + 2;
+ Lisp_Object kludgy_args[23];
+ Lisp_Object *args = kludgy_args + 3;
int i;
Lisp_Object no_error;
return val;
}
- speccount = specpdl_depth();
+ speccount = specpdl_depth ();
if (NILP (class) || NILP (Vcurrent_warning_class))
{
/* If we're currently calling for no warnings, then make it so.
Vcurrent_warning_class);
Vcurrent_warning_class = class;
}
- if (!EQ (Vcurrent_error_state, no_error))
- {
- record_unwind_protect (restore_current_error_state,
- Vcurrent_error_state);
- Vcurrent_error_state = no_error;
- }
{
int threw;
GCPRO2 (opaque1, opaque2);
kludgy_args[0] = opaque2;
kludgy_args[1] = make_int (nargs);
+ kludgy_args[2] = no_error;
the_retval = internal_catch (Qunbound_suspended_errors_tag,
call_with_suspended_errors_1,
opaque1, &threw);
/* dump an error message; called like printf */
DOESNT_RETURN
-error (CONST char *fmt, ...)
+error (const char *fmt, ...)
{
Lisp_Object obj;
va_list args;
va_start (args, fmt);
- obj = emacs_doprnt_string_va ((CONST Bufbyte *) GETTEXT (fmt), Qnil, -1,
+ obj = emacs_doprnt_string_va ((const Bufbyte *) GETTEXT (fmt), Qnil, -1,
args);
va_end (args);
}
void
-maybe_error (Lisp_Object class, Error_behavior errb, CONST char *fmt, ...)
+maybe_error (Lisp_Object class, Error_behavior errb, const char *fmt, ...)
{
Lisp_Object obj;
va_list args;
return;
va_start (args, fmt);
- obj = emacs_doprnt_string_va ((CONST Bufbyte *) GETTEXT (fmt), Qnil, -1,
+ obj = emacs_doprnt_string_va ((const Bufbyte *) GETTEXT (fmt), Qnil, -1,
args);
va_end (args);
}
Lisp_Object
-continuable_error (CONST char *fmt, ...)
+continuable_error (const char *fmt, ...)
{
Lisp_Object obj;
va_list args;
va_start (args, fmt);
- obj = emacs_doprnt_string_va ((CONST Bufbyte *) GETTEXT (fmt), Qnil, -1,
+ obj = emacs_doprnt_string_va ((const Bufbyte *) GETTEXT (fmt), Qnil, -1,
args);
va_end (args);
Lisp_Object
maybe_continuable_error (Lisp_Object class, Error_behavior errb,
- CONST char *fmt, ...)
+ const char *fmt, ...)
{
Lisp_Object obj;
va_list args;
return Qnil;
va_start (args, fmt);
- obj = emacs_doprnt_string_va ((CONST Bufbyte *) GETTEXT (fmt), Qnil, -1,
+ obj = emacs_doprnt_string_va ((const Bufbyte *) GETTEXT (fmt), Qnil, -1,
args);
va_end (args);
where the error is occurring). */
DOESNT_RETURN
-signal_simple_error (CONST char *reason, Lisp_Object frob)
+signal_simple_error (const char *reason, Lisp_Object frob)
{
signal_error (Qerror, list2 (build_translated_string (reason), frob));
}
void
-maybe_signal_simple_error (CONST char *reason, Lisp_Object frob,
+maybe_signal_simple_error (const char *reason, Lisp_Object frob,
Lisp_Object class, Error_behavior errb)
{
/* Optimization: */
}
Lisp_Object
-signal_simple_continuable_error (CONST char *reason, Lisp_Object frob)
+signal_simple_continuable_error (const char *reason, Lisp_Object frob)
{
return Fsignal (Qerror, list2 (build_translated_string (reason), frob));
}
Lisp_Object
-maybe_signal_simple_continuable_error (CONST char *reason, Lisp_Object frob,
+maybe_signal_simple_continuable_error (const char *reason, Lisp_Object frob,
Lisp_Object class, Error_behavior errb)
{
/* Optimization: */
*/
DOESNT_RETURN
-error_with_frob (Lisp_Object frob, CONST char *fmt, ...)
+error_with_frob (Lisp_Object frob, const char *fmt, ...)
{
Lisp_Object obj;
va_list args;
va_start (args, fmt);
- obj = emacs_doprnt_string_va ((CONST Bufbyte *) GETTEXT (fmt), Qnil, -1,
+ obj = emacs_doprnt_string_va ((const Bufbyte *) GETTEXT (fmt), Qnil, -1,
args);
va_end (args);
void
maybe_error_with_frob (Lisp_Object frob, Lisp_Object class,
- Error_behavior errb, CONST char *fmt, ...)
+ Error_behavior errb, const char *fmt, ...)
{
Lisp_Object obj;
va_list args;
return;
va_start (args, fmt);
- obj = emacs_doprnt_string_va ((CONST Bufbyte *) GETTEXT (fmt), Qnil, -1,
+ obj = emacs_doprnt_string_va ((const Bufbyte *) GETTEXT (fmt), Qnil, -1,
args);
va_end (args);
}
Lisp_Object
-continuable_error_with_frob (Lisp_Object frob, CONST char *fmt, ...)
+continuable_error_with_frob (Lisp_Object frob, const char *fmt, ...)
{
Lisp_Object obj;
va_list args;
va_start (args, fmt);
- obj = emacs_doprnt_string_va ((CONST Bufbyte *) GETTEXT (fmt), Qnil, -1,
+ obj = emacs_doprnt_string_va ((const Bufbyte *) GETTEXT (fmt), Qnil, -1,
args);
va_end (args);
Lisp_Object
maybe_continuable_error_with_frob (Lisp_Object frob, Lisp_Object class,
- Error_behavior errb, CONST char *fmt, ...)
+ Error_behavior errb, const char *fmt, ...)
{
Lisp_Object obj;
va_list args;
return Qnil;
va_start (args, fmt);
- obj = emacs_doprnt_string_va ((CONST Bufbyte *) GETTEXT (fmt), Qnil, -1,
+ obj = emacs_doprnt_string_va ((const Bufbyte *) GETTEXT (fmt), Qnil, -1,
args);
va_end (args);
is three objects, a string and two related Lisp objects. */
DOESNT_RETURN
-signal_simple_error_2 (CONST char *reason,
+signal_simple_error_2 (const char *reason,
Lisp_Object frob0, Lisp_Object frob1)
{
signal_error (Qerror, list3 (build_translated_string (reason), frob0,
}
void
-maybe_signal_simple_error_2 (CONST char *reason, Lisp_Object frob0,
+maybe_signal_simple_error_2 (const char *reason, Lisp_Object frob0,
Lisp_Object frob1, Lisp_Object class,
Error_behavior errb)
{
Lisp_Object
-signal_simple_continuable_error_2 (CONST char *reason, Lisp_Object frob0,
+signal_simple_continuable_error_2 (const char *reason, Lisp_Object frob0,
Lisp_Object frob1)
{
return Fsignal (Qerror, list3 (build_translated_string (reason), frob0,
}
Lisp_Object
-maybe_signal_simple_continuable_error_2 (CONST char *reason, Lisp_Object frob0,
+maybe_signal_simple_continuable_error_2 (const char *reason, Lisp_Object frob0,
Lisp_Object frob1, Lisp_Object class,
Error_behavior errb)
{
/************************************************************************/
static Lisp_Object funcall_lambda (Lisp_Object fun,
- int nargs, Lisp_Object args[]);
+ int nargs, Lisp_Object args[]);
static int in_warnings;
static Lisp_Object
args[1] = errordata;
warn_when_safe_lispobj
(Qerror, Qwarning,
- emacs_doprnt_string_lisp ((CONST Bufbyte *) "%s: %s",
+ emacs_doprnt_string_lisp ((const Bufbyte *) "%s: %s",
Qnil, -1, 2, args));
}
return Qunbound;
}
Lisp_Object
-eval_in_buffer_trapping_errors (CONST char *warning_string,
+eval_in_buffer_trapping_errors (const char *warning_string,
struct buffer *buf, Lisp_Object form)
{
int speccount = specpdl_depth();
}
Lisp_Object
-run_hook_trapping_errors (CONST char *warning_string, Lisp_Object hook_symbol)
+run_hook_trapping_errors (const char *warning_string, Lisp_Object hook_symbol)
{
int speccount;
Lisp_Object tem;
if an error occurs. */
Lisp_Object
-safe_run_hook_trapping_errors (CONST char *warning_string,
+safe_run_hook_trapping_errors (const char *warning_string,
Lisp_Object hook_symbol,
int allow_quit)
{
}
Lisp_Object
-call0_trapping_errors (CONST char *warning_string, Lisp_Object function)
+call0_trapping_errors (const char *warning_string, Lisp_Object function)
{
int speccount;
Lisp_Object tem;
}
Lisp_Object
-call1_trapping_errors (CONST char *warning_string, Lisp_Object function,
+call1_trapping_errors (const char *warning_string, Lisp_Object function,
Lisp_Object object)
{
int speccount = specpdl_depth();
}
Lisp_Object
-call2_trapping_errors (CONST char *warning_string, Lisp_Object function,
+call2_trapping_errors (const char *warning_string, Lisp_Object function,
Lisp_Object object1, Lisp_Object object2)
{
int speccount = specpdl_depth();
{
int quitf;
+ ++specpdl_ptr;
+ ++specpdl_depth_counter;
+
check_quit (); /* make Vquit_flag accurate */
quitf = !NILP (Vquit_flag);
Vquit_flag = Qnil;
- ++specpdl_ptr;
- ++specpdl_depth_counter;
-
while (specpdl_depth_counter != count)
{
--specpdl_ptr;
automatically be called when it is safe to do so. */
void
-warn_when_safe (Lisp_Object class, Lisp_Object level, CONST char *fmt, ...)
+warn_when_safe (Lisp_Object class, Lisp_Object level, const char *fmt, ...)
{
Lisp_Object obj;
va_list args;
va_start (args, fmt);
- obj = emacs_doprnt_string_va ((CONST Bufbyte *) GETTEXT (fmt),
+ obj = emacs_doprnt_string_va ((const Bufbyte *) GETTEXT (fmt),
Qnil, -1, args);
va_end (args);
void
syms_of_eval (void)
{
+ INIT_LRECORD_IMPLEMENTATION (subr);
+
defsymbol (&Qinhibit_quit, "inhibit-quit");
defsymbol (&Qautoload, "autoload");
defsymbol (&Qdebug_on_error, "debug-on-error");
/* XEmacs change: increase these values. */
max_specpdl_size = 3000;
max_lisp_eval_depth = 500;
-#if 0 /* no longer used */
+#ifdef DEFEND_AGAINST_THROW_RECURSION
throw_level = 0;
#endif
}
#include "offix.h"
#endif
-#ifdef WINDOWSNT
-/* Hmm, under unix we want X modifiers, under NT we want X modifiers if
- we are running X and Windows modifiers otherwise.
- gak. This is a kludge until we support multiple native GUIs!
-*/
-#undef MOD_ALT
-#undef MOD_CONTROL
-#undef MOD_SHIFT
-#endif
-
#include "events-mod.h"
-static void enqueue_Xt_dispatch_event (Lisp_Object event);
static void handle_focus_event_1 (struct frame *f, int in_p);
static struct event_stream *Xt_event_stream;
/* Mask of bits indicating the descriptors that we wait for input on */
extern SELECT_TYPE input_wait_mask, process_only_mask, tty_only_mask;
-static CONST String x_fallback_resources[] =
+static const String x_fallback_resources[] =
{
/* This file is automatically generated from the app-defaults file
in ../etc/Emacs.ad. These resources are consulted only if no
if (keysym < 0x80) /* Optimize for ASCII keysyms */
return;
- /* If you do: xmodmap -e 'keysym NN = scaron'
+
+ /* If you execute:
+ xmodmap -e 'keysym NN = scaron'
and then press (Shift scaron), X11 will return the different
- keysym Scaron, but xmodmap -pke might not even mention Scaron.
- So we `register' both scaron and Scaron. */
+ keysym `Scaron', but `xmodmap -pke' might not even mention `Scaron'.
+ So we "register" both `scaron' and `Scaron'. */
+#ifdef HAVE_XCONVERTCASE
XConvertCase (keysym, &upper_lower[0], &upper_lower[1]);
+#else
+ upper_lower[0] = upper_lower[1] = keysym;
+#endif
for (j = 0; j < (upper_lower[0] == upper_lower[1] ? 1 : 2); j++)
{
}
}
-static CONST char *
+static const char *
index_to_name (int indice)
{
switch (indice)
be totally wrong. */
if (mode_bit)
{
- CONST char *warn = 0;
+ const char *warn = 0;
if (mode_bit == meta_bit) warn = "Meta", meta_bit = 0;
else if (mode_bit == hyper_bit) warn = "Hyper", hyper_bit = 0;
else if (mode_bit == super_bit) warn = "Super", super_bit = 0;
case ButtonPress:
case ButtonRelease:
{
- unsigned int modifiers = 0;
+ int modifiers = 0;
int shift_p, lock_p;
Bool key_event_p = (x_event->type == KeyPress);
unsigned int *state =
x_handle_sticky_modifiers (x_event, d);
- if (*state & ControlMask) modifiers |= MOD_CONTROL;
- if (*state & xd->MetaMask) modifiers |= MOD_META;
- if (*state & xd->SuperMask) modifiers |= MOD_SUPER;
- if (*state & xd->HyperMask) modifiers |= MOD_HYPER;
- if (*state & xd->AltMask) modifiers |= MOD_ALT;
+ if (*state & ControlMask) modifiers |= XEMACS_MOD_CONTROL;
+ if (*state & xd->MetaMask) modifiers |= XEMACS_MOD_META;
+ if (*state & xd->SuperMask) modifiers |= XEMACS_MOD_SUPER;
+ if (*state & xd->HyperMask) modifiers |= XEMACS_MOD_HYPER;
+ if (*state & xd->AltMask) modifiers |= XEMACS_MOD_ALT;
/* Ignore the Caps_Lock key if:
- any other modifiers are down, so that Caps_Lock doesn't
lock_p = *state & LockMask;
if (shift_p || lock_p)
- modifiers |= MOD_SHIFT;
+ modifiers |= XEMACS_MOD_SHIFT;
if (key_event_p)
{
! (CHAR_OR_CHAR_INTP (keysym)
&& keysym_obeys_caps_lock_p
((KeySym) XCHAR_OR_CHAR_INT (keysym), d)))
- modifiers &= (~MOD_SHIFT);
+ modifiers &= (~XEMACS_MOD_SHIFT);
/* If this key contains two distinct keysyms, that is,
"shift" generates a different keysym than the
in the modifiers slot. Neither the characters "a",
"A", "2", nor "@" normally have the shift bit set.
However, "F1" normally does. */
- if (modifiers & MOD_SHIFT)
+ if (modifiers & XEMACS_MOD_SHIFT)
{
int Mode_switch_p = *state & xd->ModeMask;
KeySym bot = XLookupKeysym (ev, Mode_switch_p ? 2 : 0);
KeySym top = XLookupKeysym (ev, Mode_switch_p ? 3 : 1);
if (top && bot && top != bot)
- modifiers &= ~MOD_SHIFT;
+ modifiers &= ~XEMACS_MOD_SHIFT;
}
emacs_event->event_type = key_press_event;
emacs_event->timestamp = ev->time;
{
XMotionEvent *ev = &x_event->xmotion;
struct frame *frame = x_window_to_frame (d, ev->window);
- unsigned int modifiers = 0;
+ int modifiers = 0;
XMotionEvent event2;
if (! frame)
emacs_event->timestamp = ev->time;
emacs_event->event.motion.x = ev->x;
emacs_event->event.motion.y = ev->y;
- if (ev->state & ShiftMask) modifiers |= MOD_SHIFT;
- if (ev->state & ControlMask) modifiers |= MOD_CONTROL;
- if (ev->state & xd->MetaMask) modifiers |= MOD_META;
- if (ev->state & xd->SuperMask) modifiers |= MOD_SUPER;
- if (ev->state & xd->HyperMask) modifiers |= MOD_HYPER;
- if (ev->state & xd->AltMask) modifiers |= MOD_ALT;
+ if (ev->state & ShiftMask) modifiers |= XEMACS_MOD_SHIFT;
+ if (ev->state & ControlMask) modifiers |= XEMACS_MOD_CONTROL;
+ if (ev->state & xd->MetaMask) modifiers |= XEMACS_MOD_META;
+ if (ev->state & xd->SuperMask) modifiers |= XEMACS_MOD_SUPER;
+ if (ev->state & xd->HyperMask) modifiers |= XEMACS_MOD_HYPER;
+ if (ev->state & xd->AltMask) modifiers |= XEMACS_MOD_ALT;
/* Currently ignores Shift_Lock but probably shouldn't
(but it definitely should ignore Caps_Lock). */
emacs_event->event.motion.modifiers = modifiers;
#ifdef HAVE_OFFIX_DND
if (DndIsDropMessage(x_event))
{
- unsigned int state, modifiers = 0, button=0;
+ unsigned int state;
+ int modifiers = 0;
+ unsigned int button=0;
struct frame *frame = x_any_window_to_frame (d, ev->window);
Extbyte *data;
unsigned long size, dtype;
state=DndDragButtons(x_event);
- if (state & ShiftMask) modifiers |= MOD_SHIFT;
- if (state & ControlMask) modifiers |= MOD_CONTROL;
- if (state & xd->MetaMask) modifiers |= MOD_META;
- if (state & xd->SuperMask) modifiers |= MOD_SUPER;
- if (state & xd->HyperMask) modifiers |= MOD_HYPER;
- if (state & xd->AltMask) modifiers |= MOD_ALT;
+ if (state & ShiftMask) modifiers |= XEMACS_MOD_SHIFT;
+ if (state & ControlMask) modifiers |= XEMACS_MOD_CONTROL;
+ if (state & xd->MetaMask) modifiers |= XEMACS_MOD_META;
+ if (state & xd->SuperMask) modifiers |= XEMACS_MOD_SUPER;
+ if (state & xd->HyperMask) modifiers |= XEMACS_MOD_HYPER;
+ if (state & xd->AltMask) modifiers |= XEMACS_MOD_ALT;
if (state & Button5Mask) button = Button5;
if (state & Button4Mask) button = Button4;
case FocusIn:
case FocusOut: FROB(xfocus, window); break;
case VisibilityNotify: FROB(xvisibility, window); break;
+ case CreateNotify: FROB(xcreatewindow, window); break;
default:
w = x_event->xany.window;
*x_event_copy = *x_event;
#ifdef HAVE_XIM
XIM_focus_event (f, in_p);
#endif /* HAVE_XIM */
-
/* On focus change, clear all memory of sticky modifiers
to avoid non-intuitive behavior. */
clear_sticky_modifiers (XDEVICE (FRAME_DEVICE (f)));
}
static void
+emacs_Xt_force_event_pending (struct frame* f)
+{
+ XEvent event;
+
+ Display* dpy = DEVICE_X_DISPLAY (XDEVICE (FRAME_DEVICE (f)));
+ event.xclient.type = ClientMessage;
+ event.xclient.display = dpy;
+ event.xclient.message_type = XInternAtom (dpy, "BumpQueue", False);
+ event.xclient.format = 32;
+ event.xclient.window = 0;
+
+ /* Send the drop message */
+ XSendEvent(dpy, XtWindow (FRAME_X_SHELL_WIDGET (f)),
+ True, NoEventMask, &event);
+ /* Force event pending to check the X queue. */
+ quit_check_signal_tick_count++;
+}
+
+static void
emacs_Xt_handle_magic_event (Lisp_Event *emacs_event)
{
/* This function can GC */
#endif
break;
+ case CreateNotify:
+ break;
+
default:
break;
}
char *buf = alloca_array (char, XSTRING_LENGTH (f->name) + 4);
sprintf (buf, " \"%s\"", XSTRING_DATA (f->name));
write_string_to_stdio_stream (stderr, 0, (Bufbyte *) buf, 0,
- strlen (buf), Qterminal);
+ strlen (buf), Qterminal, 1);
}
stderr_out ("\n");
}
-static CONST char *
+static const char *
XEvent_mode_to_string (int mode)
{
switch (mode)
}
}
-static CONST char *
+static const char *
XEvent_detail_to_string (int detail)
{
switch (detail)
}
}
-static CONST char *
+static const char *
XEvent_visibility_to_string (int state)
{
switch (state)
static Lisp_Object dispatch_event_queue, dispatch_event_queue_tail;
-static void
+void
enqueue_Xt_dispatch_event (Lisp_Object event)
{
enqueue_event (event, &dispatch_event_queue, &dispatch_event_queue_tail);
\f
/************************************************************************/
+/* handle focus changes for native widgets */
+/************************************************************************/
+static void
+emacs_Xt_event_widget_focus_in (Widget w,
+ XEvent *event,
+ String *params,
+ Cardinal *num_params)
+{
+ struct frame* f =
+ x_any_widget_or_parent_to_frame (get_device_from_display (event->xany.display), w);
+
+ XtSetKeyboardFocus (FRAME_X_SHELL_WIDGET (f), w);
+}
+
+static void
+emacs_Xt_event_widget_focus_out (Widget w,
+ XEvent *event,
+ String *params,
+ Cardinal *num_params)
+{
+}
+
+static XtActionsRec widgetActionsList[] =
+{
+ {"widget-focus-in", emacs_Xt_event_widget_focus_in },
+ {"widget-focus-out", emacs_Xt_event_widget_focus_out },
+};
+
+static void
+emacs_Xt_event_add_widget_actions (XtAppContext ctx)
+{
+ XtAppAddActions (ctx, widgetActionsList, 2);
+}
+
+\f
+/************************************************************************/
/* initialization */
/************************************************************************/
{
Xt_event_stream = xnew (struct event_stream);
Xt_event_stream->event_pending_p = emacs_Xt_event_pending_p;
+ Xt_event_stream->force_event_pending = emacs_Xt_force_event_pending;
Xt_event_stream->next_event_cb = emacs_Xt_next_event;
Xt_event_stream->handle_magic_event_cb = emacs_Xt_handle_magic_event;
Xt_event_stream->add_timeout_cb = emacs_Xt_add_timeout;
NULL, 0,
XtCacheByDisplay, EmacsFreeXIMStyles);
#endif /* XIM_XLIB */
+ /* Add extra actions to native widgets to handle focus and friends. */
+ emacs_Xt_event_add_widget_actions (Xt_app_con);
/* insert the visual inheritance patch/hack described above */
orig_shell_init_proc = shellClassRec.core_class.initialize;
/* The mswindows event_stream interface.
Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
Copyright (C) 1995 Sun Microsystems, Inc.
- Copyright (C) 1996 Ben Wing.
+ Copyright (C) 1996, 2000 Ben Wing.
Copyright (C) 1997 Jonathan Harris.
This file is part of XEmacs.
#endif
#ifdef HAVE_MENUBARS
+# include "menubar.h"
# include "menubar-msw.h"
#endif
#include <io.h>
#include <errno.h>
+#if !(defined(__CYGWIN32__) || defined(__MINGW32__))
+# include <shlobj.h> /* For IShellLink */
+#endif
+
#if defined (__CYGWIN32__) && (CYGWIN_VERSION_DLL_MAJOR < 20)
typedef NMHDR *LPNMHDR;
#endif
/* Number of wait handles */
static int mswindows_waitable_count=0;
#endif /* HAVE_MSG_SELECT */
+
/* Brush for painting widgets */
static HBRUSH widget_brush = 0;
static LONG last_widget_brushed = 0;
/* These are Lisp integers; see DEFVARS in this file for description. */
int mswindows_dynamic_frame_resize;
-int mswindows_meta_activates_menu;
+int mswindows_alt_by_itself_activates_menu;
int mswindows_num_mouse_buttons;
int mswindows_mouse_button_max_skew_x;
int mswindows_mouse_button_max_skew_y;
struct ntpipe_slurp_stream_shared_data
{
HANDLE hev_thread; /* Our thread blocks on this, signaled by caller */
- /* This is a manual-reset object. */
+ /* This is a manual-reset object. */
HANDLE hev_caller; /* Caller blocks on this, and we signal it */
- /* This is a manual-reset object. */
+ /* This is a manual-reset object. */
HANDLE hev_unsleep; /* Pipe read delay is canceled if this is set */
- /* This is a manual-reset object. */
+ /* This is a manual-reset object. */
HANDLE hpipe; /* Pipe read end handle. */
LONG die_p; /* Thread must exit ASAP if non-zero */
BOOL eof_p : 1; /* Set when thread saw EOF */
}
static struct ntpipe_slurp_stream_shared_data*
-slurper_allocate_shared_data()
+slurper_allocate_shared_data (void)
{
int i=0;
for (i=0; i<MAX_SLURP_STREAMS; i++)
{
LPARAM user_data; /* Any user data stored in the stream object */
HANDLE hev_thread; /* Our thread blocks on this, signaled by caller */
- /* This is an auto-reset object. */
+ /* This is an auto-reset object. */
HANDLE hpipe; /* Pipe write end handle. */
HANDLE hthread; /* Reader thread handle. */
char buffer[MAX_SHOVE_BUFFER_SIZE]; /* Buffer being written */
SOCKET s; /* Socket handle (which is a Win32 handle) */
OVERLAPPED ov; /* Overlapped I/O structure */
void* buffer; /* Buffer. Allocated for input stream only */
- unsigned int bufsize; /* Number of bytes last read */
- unsigned int bufpos; /* Position in buffer for next fetch */
+ unsigned long bufsize; /* Number of bytes last read */
+ unsigned long bufpos; /* Position in buffer for next fetch */
unsigned int error_p :1; /* I/O Error seen */
unsigned int eof_p :1; /* EOF Error seen */
unsigned int pending_p :1; /* There is a pending I/O operation */
}
static ssize_t
-winsock_writer (Lstream *stream, CONST unsigned char *data, size_t size)
+winsock_writer (Lstream *stream, const unsigned char *data, size_t size)
{
struct winsock_stream *str = WINSOCK_STREAM_DATA (stream);
}
static Lisp_Object
-make_winsock_stream_1 (SOCKET s, LPARAM param, CONST char *mode)
+make_winsock_stream_1 (SOCKET s, LPARAM param, const char *mode)
{
Lisp_Object obj;
Lstream *lstr = Lstream_new (lstream_winsock, mode);
/*
* Add an emacs event to the proper dispatch queue
*/
-static void
+void
mswindows_enqueue_dispatch_event (Lisp_Object event)
{
int user_p = mswindows_user_event_p (XEVENT(event));
enqueue_event (event,
user_p ? &mswindows_u_dispatch_event_queue :
- &mswindows_s_dispatch_event_queue,
+ &mswindows_s_dispatch_event_queue,
user_p ? &mswindows_u_dispatch_event_queue_tail :
- &mswindows_s_dispatch_event_queue_tail);
+ &mswindows_s_dispatch_event_queue_tail);
/* Avoid blocking on WaitMessage */
PostMessage (NULL, XM_BUMPQUEUE, 0, 0);
* Give a preference to user events over non-user ones.
*/
static Lisp_Object
-mswindows_dequeue_dispatch_event ()
+mswindows_dequeue_dispatch_event (void)
{
Lisp_Object event;
Lisp_Event* sevt;
!NILP(mswindows_s_dispatch_event_queue));
event = dequeue_event (
- NILP(mswindows_u_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 previous_event = Qnil;
int user_p = mswindows_user_event_p (match);
Lisp_Object* head = user_p ? &mswindows_u_dispatch_event_queue :
- &mswindows_s_dispatch_event_queue;
+ &mswindows_s_dispatch_event_queue;
Lisp_Object* tail = user_p ? &mswindows_u_dispatch_event_queue_tail :
- &mswindows_s_dispatch_event_queue_tail;
+ &mswindows_s_dispatch_event_queue_tail;
assert (match->event_type == timeout_event
|| match->event_type == key_press_event);
GCPRO1 (result);
if (NILP(mswindows_error_caught_in_modal_loop))
- result = mswindows_protect_modal_loop (mswindows_unsafe_pump_events, Qnil);
+ result = mswindows_protect_modal_loop (mswindows_unsafe_pump_events, Qnil);
UNGCPRO;
return result;
}
* QUITP, and are interesting in keyboard messages only.
*/
static void
-mswindows_drain_windows_queue (int keyboard_only_till_quit_char_p)
+mswindows_drain_windows_queue (void)
{
MSG msg;
- /* Minimize the hassle of misordered events by not fetching
- past quit char if called from QUITP; */
- while (!(keyboard_only_till_quit_char_p &&
- mswindows_quit_chars_count > 0) &&
- PeekMessage (&msg, NULL,
- keyboard_only_till_quit_char_p ? WM_KEYFIRST : 0,
- keyboard_only_till_quit_char_p ? WM_KEYLAST : 0,
- PM_REMOVE))
+ /* should call mswindows_need_event_in_modal_loop() if in modal loop */
+ assert (!mswindows_in_modal_loop);
+
+ while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
{
/* We have to translate messages that are not sent to the main
window. This is so that key presses work ok in things like
edit fields. However, we *musn't* translate message for the
- main window as this is handled in the wnd proc. */
- if (GetWindowLong (msg.hwnd, GWL_STYLE) & WS_CHILD)
+ main window as this is handled in the wnd proc.
+ We also have to avoid generating paint magic events for windows
+ that aren't XEmacs frames */
+ if (GetWindowLong (msg.hwnd, GWL_STYLE) & (WS_CHILD|WS_POPUP))
{
TranslateMessage (&msg);
}
+ else if (msg.message == WM_PAINT)
+ {
+ struct mswindows_frame* msframe;
+
+ /* hdc will be NULL unless this is a subwindow - in which case we
+ shouldn't have received a paint message for it here. */
+ assert (msg.wParam == 0);
+
+ /* Queue a magic event for handling when safe */
+ msframe = FRAME_MSWINDOWS_DATA (
+ XFRAME (mswindows_find_frame (msg.hwnd)));
+ if (!msframe->paint_pending)
+ {
+ msframe->paint_pending = 1;
+ mswindows_enqueue_magic_event (msg.hwnd, WM_PAINT);
+ }
+ /* Don't dispatch. WM_PAINT is always the last message in the
+ queue so it's OK to just return. */
+ return;
+ }
DispatchMessage (&msg);
mswindows_unmodalize_signal_maybe ();
}
return;
}
-#if 0
- /* Have to drain Windows message queue first, otherwise, we may miss
- quit char when called from quit_p */
- /* #### This is, ehm, not quite true -- this function is not
- called from quit_p. --kkm */
- mswindows_drain_windows_queue ();
-#endif
-
while (NILP (mswindows_u_dispatch_event_queue)
&& NILP (mswindows_s_dispatch_event_queue))
{
{
if (FD_ISSET (windows_fd, &temp_mask))
{
- mswindows_drain_windows_queue (0);
+ mswindows_drain_windows_queue ();
}
-#ifdef HAVE_TTY
- /* Look for a TTY event */
- for (i = 0; i < MAXDESC-1; i++)
+ else
{
- /* To avoid race conditions (among other things, an infinite
- loop when called from Fdiscard_input()), we must return
- user events ahead of process events. */
- if (FD_ISSET (i, &temp_mask) && FD_ISSET (i, &tty_only_mask))
+#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);
- Lisp_Event* event = XEVENT (emacs_event);
-
- assert (c);
- if (read_event_from_tty_or_stream_desc (event, c, i))
+ /* To avoid race conditions (among other things, an infinite
+ loop when called from Fdiscard_input()), we must return
+ user events ahead of process events. */
+ if (FD_ISSET (i, &temp_mask) && FD_ISSET (i, &tty_only_mask))
{
- mswindows_enqueue_dispatch_event (emacs_event);
- return;
+ struct console *c = tty_find_console_from_fd (i);
+ Lisp_Object emacs_event = Fmake_event (Qnil, Qnil);
+ Lisp_Event* event = XEVENT (emacs_event);
+
+ assert (c);
+ if (read_event_from_tty_or_stream_desc (event, c, i))
+ {
+ mswindows_enqueue_dispatch_event (emacs_event);
+ return;
+ }
}
}
- }
#endif
- /* Look for a process event */
- for (i = 0; i < MAXDESC-1; i++)
- {
- if (FD_ISSET (i, &temp_mask))
+ /* Look for a process event */
+ for (i = 0; i < MAXDESC-1; i++)
{
- if (FD_ISSET (i, &process_only_mask))
+ if (FD_ISSET (i, &temp_mask))
{
- Lisp_Process *p =
- get_process_from_usid (FD_TO_USID(i));
-
- mswindows_enqueue_process_event (p);
- }
- else
- {
- /* We might get here when a fake event came
- through a signal. Return a dummy event, so
- that a cycle of the command loop will
- occur. */
- drain_signal_event_pipe ();
- mswindows_enqueue_magic_event (NULL, XM_BUMPQUEUE);
+ if (FD_ISSET (i, &process_only_mask))
+ {
+ Lisp_Process *p =
+ get_process_from_usid (FD_TO_USID(i));
+
+ mswindows_enqueue_process_event (p);
+ }
+ else
+ {
+ /* We might get here when a fake event came
+ through a signal. Return a dummy event, so
+ that a cycle of the command loop will
+ occur. */
+ drain_signal_event_pipe ();
+ mswindows_enqueue_magic_event (NULL, XM_BUMPQUEUE);
+ }
}
}
}
}
#else
/* Now try getting a message or process event */
- active = MsgWaitForMultipleObjects (mswindows_waitable_count,
- mswindows_waitable_handles,
- FALSE, badly_p ? INFINITE : 0,
- QS_ALLINPUT);
-
- /* This will assert if handle being waited for becomes abandoned.
- Not the case currently tho */
- 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 */
- return;
- }
- else if (active == WAIT_OBJECT_0 + mswindows_waitable_count)
- {
- /* Got your message, thanks */
- mswindows_drain_windows_queue (0);
- }
- else
- {
- int ix = active - WAIT_OBJECT_0;
- /* First, try to find which process' output has signaled */
- Lisp_Process *p =
- get_process_from_usid (HANDLE_TO_USID (mswindows_waitable_handles[ix]));
- if (p != NULL)
- {
- /* Found a signaled process input handle */
- mswindows_enqueue_process_event (p);
- }
- else
- {
- /* None. This means that the process handle itself has signaled.
- Remove the handle from the wait vector, and make status_notify
- note the exited process */
- mswindows_waitable_handles [ix] =
- mswindows_waitable_handles [--mswindows_waitable_count];
- kick_status_notify ();
- /* Have to return something: there may be no accompanying
- process event */
- mswindows_enqueue_magic_event (NULL, XM_BUMPQUEUE);
- }
- }
+ active = MsgWaitForMultipleObjects (mswindows_waitable_count,
+ mswindows_waitable_handles,
+ FALSE, badly_p ? INFINITE : 0,
+ QS_ALLINPUT);
+
+ /* This will assert if handle being waited for becomes abandoned.
+ Not the case currently tho */
+ 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 */
+ return;
+ }
+ else if (active == WAIT_OBJECT_0 + mswindows_waitable_count)
+ {
+ /* Got your message, thanks */
+ mswindows_drain_windows_queue ();
+ }
+ else
+ {
+ int ix = active - WAIT_OBJECT_0;
+ /* First, try to find which process' output has signaled */
+ Lisp_Process *p =
+ get_process_from_usid (HANDLE_TO_USID (mswindows_waitable_handles[ix]));
+ if (p != NULL)
+ {
+ /* Found a signaled process input handle */
+ mswindows_enqueue_process_event (p);
+ }
+ else
+ {
+ /* None. This means that the process handle itself has signaled.
+ Remove the handle from the wait vector, and make status_notify
+ note the exited process */
+ mswindows_waitable_handles [ix] =
+ mswindows_waitable_handles [--mswindows_waitable_count];
+ kick_status_notify ();
+ /* We need to return a process event here so that
+ (1) accept-process-output will return when called on this
+ process, and (2) status notifications will happen in
+ accept-process-output, sleep-for, and sit-for. */
+ /* #### horrible kludge till my real process fixes go in.
+ */
+ if (!NILP (Vprocess_list))
+ {
+ Lisp_Object vaffanculo = XCAR (Vprocess_list);
+ mswindows_enqueue_process_event (XPROCESS (vaffanculo));
+ }
+ else /* trash me soon. */
+ /* Have to return something: there may be no accompanying
+ process event */
+ mswindows_enqueue_magic_event (NULL, XM_BUMPQUEUE);
+ }
+ }
#endif
- } /* while */
+ } /* while */
}
/************************************************************************/
{ mswindows_dde_service, mswindows_dde_topic_system }, { 0, 0 } };
if (!(hszItem || DdeCmpStringHandles (hszItem, mswindows_dde_service)) &&
- !(hszTopic || DdeCmpStringHandles (hszTopic, mswindows_dde_topic_system)));
+ !(hszTopic || DdeCmpStringHandles (hszTopic, mswindows_dde_topic_system)))
return (DdeCreateDataHandle (mswindows_dde_mlid, (LPBYTE)pairs,
sizeof (pairs), 0L, 0, uFmt, 0));
}
if (!DdeCmpStringHandles (hszTopic, mswindows_dde_topic_system))
{
DWORD len = DdeGetData (hdata, NULL, 0, 0);
- char *cmd = alloca (len+1);
+ LPBYTE cmd = (LPBYTE) alloca (len+1);
char *end;
char *filename;
struct gcpro gcpro1, gcpro2;
#endif
/*
+ * Helper to do repainting - repaints can happen both from the windows
+ * procedure and from magic events
+ */
+static void
+mswindows_handle_paint (struct frame *frame)
+{
+ HWND hwnd = FRAME_MSWINDOWS_HANDLE (frame);
+
+ /* 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);
+ 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);
+ }
+}
+
+/*
* Returns 1 if a key is a real modifier or special key, which
* is better handled by DefWindowProc
*/
static int
key_needs_default_processing_p (UINT vkey)
{
- if (mswindows_meta_activates_menu && vkey == VK_MENU)
+ if (mswindows_alt_by_itself_activates_menu && vkey == VK_MENU)
return 1;
return 0;
struct frame *frame;
struct mswindows_frame* msframe;
+ assert (!GetWindowLong (hwnd, GWL_USERDATA));
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)));
- if (msframe->sizing && !mswindows_dynamic_frame_resize)
- goto defproc;
- return 1;
-
- case WM_CLOSE:
- fobj = mswindows_find_frame (hwnd);
- mswindows_enqueue_misc_user_event (fobj, Qeval, list3 (Qdelete_frame, fobj, Qt));
- break;
-
- case WM_KEYUP:
- case WM_SYSKEYUP:
- /* See Win95 comment under WM_KEYDOWN */
{
- BYTE keymap[256];
-
- if (wParam == VK_CONTROL)
- {
- GetKeyboardState (keymap);
- keymap [(lParam & 0x1000000) ? VK_RCONTROL : VK_LCONTROL] &= ~0x80;
- SetKeyboardState (keymap);
- }
- else if (wParam == VK_MENU)
- {
- GetKeyboardState (keymap);
- keymap [(lParam & 0x1000000) ? VK_RMENU : VK_LMENU] &= ~0x80;
- SetKeyboardState (keymap);
- }
- };
- if (key_needs_default_processing_p (wParam))
- goto defproc;
- else
+ 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_KEYDOWN:
- case WM_SYSKEYDOWN:
- /* In some locales the right-hand Alt key is labelled AltGr. This key
- * should produce alternative charcaters when combined with another key.
- * eg on a German keyboard pressing AltGr+q should produce '@'.
- * AltGr generates exactly the same keystrokes as LCtrl+RAlt. But if
- * TranslateMessage() is called with *any* combination of Ctrl+Alt down,
- * it translates as if AltGr were down.
- * We get round this by removing all modifiers from the keymap before
- * calling TranslateMessage() unless AltGr is *really* down. */
- {
- 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 non-printables */
- if (!NILP (keysym = mswindows_key_to_emacs_keysym (wParam, mods,
- extendedp)))
- mswindows_enqueue_keypress_event (hwnd, keysym, mods);
- 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;
- msg.lParam = lParam;
- msg.time = GetMessageTime();
- msg.pt = pnt;
-
- /* GetKeyboardState() does not work as documented on Win95. We have
- * 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 [extendedp ? VK_RCONTROL : VK_LCONTROL] |= 0x80;
- else if (wParam == VK_MENU)
- keymap [extendedp ? VK_RMENU : VK_LMENU] |= 0x80;
-
- memcpy (keymap_orig, keymap, 256);
-
- /* Remove shift modifier from an ascii character */
- mods &= ~MOD_SHIFT;
-
- /* Clear control and alt modifiers unless AltGr is pressed */
- keymap [VK_RCONTROL] = 0;
- keymap [VK_LMENU] = 0;
- if (!has_AltGr || !(keymap [VK_LCONTROL] & 0x80)
- || !(keymap [VK_RMENU] & 0x80))
- {
- keymap [VK_LCONTROL] = 0;
- keymap [VK_CONTROL] = 0;
- keymap [VK_RMENU] = 0;
- keymap [VK_MENU] = 0;
- }
- SetKeyboardState (keymap);
-
- /* Maybe generate some WM_[SYS]CHARs in the queue */
- TranslateMessage (&msg);
-
- while (PeekMessage (&msg, hwnd, WM_CHAR, WM_CHAR, PM_REMOVE)
- || PeekMessage (&msg, hwnd, WM_SYSCHAR, WM_SYSCHAR, PM_REMOVE))
- {
- int mods1 = mods;
- WPARAM ch = msg.wParam;
-
- /* If a quit char with no modifiers other than control and
- shift, then mark it with a fake modifier, which is removed
- upon dequeueing the event */
- /* #### This might also not withstand localization, if
- quit character is not a latin-1 symbol */
- if (((quit_ch < ' ' && (mods & MOD_CONTROL) && quit_ch + 'a' - 1 == ch)
- || (quit_ch >= ' ' && !(mods & MOD_CONTROL) && quit_ch == ch))
- && ((mods & ~(MOD_CONTROL | MOD_SHIFT)) == 0))
- {
- mods1 |= FAKE_MOD_QUIT;
- ++mswindows_quit_chars_count;
- }
+ case WM_ERASEBKGND:
+ /* Erase background only during non-dynamic sizing */
+ msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd)));
+ if (msframe->sizing && !mswindows_dynamic_frame_resize)
+ goto defproc;
+ return 1;
- mswindows_enqueue_keypress_event (hwnd, make_char(ch), mods1);
- } /* while */
- SetKeyboardState (keymap_orig);
- } /* else */
- }
- if (key_needs_default_processing_p (wParam))
- goto defproc;
- else
+ case WM_CLOSE:
+ fobj = mswindows_find_frame (hwnd);
+ mswindows_enqueue_misc_user_event (fobj, Qeval, list3 (Qdelete_frame, fobj, Qt));
break;
- case WM_MBUTTONDOWN:
- case WM_MBUTTONUP:
- /* Real middle mouse button has nothing to do with emulated one:
- if one wants to exercise fingers playing chords on the mouse,
- he is allowed to do that! */
- mswindows_enqueue_mouse_button_event (hwnd, message,
- MAKEPOINTS (lParam), GetMessageTime());
- break;
-
- case WM_LBUTTONUP:
- msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd)));
- msframe->last_click_time = GetMessageTime();
-
- KillTimer (hwnd, BUTTON_2_TIMER_ID);
- msframe->button2_need_lbutton = 0;
- if (msframe->ignore_next_lbutton_up)
- {
- msframe->ignore_next_lbutton_up = 0;
- }
- else if (msframe->button2_is_down)
- {
- msframe->button2_is_down = 0;
- msframe->ignore_next_rbutton_up = 1;
- mswindows_enqueue_mouse_button_event (hwnd, WM_MBUTTONUP,
- MAKEPOINTS (lParam), GetMessageTime());
- }
- else
+ case WM_KEYUP:
+ case WM_SYSKEYUP:
+ /* See Win95 comment under WM_KEYDOWN */
{
- if (msframe->button2_need_rbutton)
+ BYTE keymap[256];
+ int should_set_keymap = 0;
+
+ if (wParam == VK_CONTROL)
{
- msframe->button2_need_rbutton = 0;
- mswindows_enqueue_mouse_button_event (hwnd, WM_LBUTTONDOWN,
- MAKEPOINTS (lParam), GetMessageTime());
+ GetKeyboardState (keymap);
+ keymap [(lParam & 0x1000000) ? VK_RCONTROL : VK_LCONTROL] &= ~0x80;
+ should_set_keymap = 1;
}
- mswindows_enqueue_mouse_button_event (hwnd, WM_LBUTTONUP,
- MAKEPOINTS (lParam), GetMessageTime());
- }
- break;
-
- case WM_RBUTTONUP:
- msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd)));
- msframe->last_click_time = GetMessageTime();
-
- KillTimer (hwnd, BUTTON_2_TIMER_ID);
- msframe->button2_need_rbutton = 0;
- if (msframe->ignore_next_rbutton_up)
- {
- msframe->ignore_next_rbutton_up = 0;
- }
- else if (msframe->button2_is_down)
- {
- msframe->button2_is_down = 0;
- msframe->ignore_next_lbutton_up = 1;
- mswindows_enqueue_mouse_button_event (hwnd, WM_MBUTTONUP,
- MAKEPOINTS (lParam), GetMessageTime());
- }
- else
- {
- if (msframe->button2_need_lbutton)
+ else if (wParam == VK_MENU)
{
- msframe->button2_need_lbutton = 0;
- mswindows_enqueue_mouse_button_event (hwnd, WM_RBUTTONDOWN,
- MAKEPOINTS (lParam), GetMessageTime());
+ GetKeyboardState (keymap);
+ keymap [(lParam & 0x1000000) ? VK_RMENU : VK_LMENU] &= ~0x80;
+ should_set_keymap = 1;
}
- mswindows_enqueue_mouse_button_event (hwnd, WM_RBUTTONUP,
- MAKEPOINTS (lParam), GetMessageTime());
- }
- break;
- case WM_LBUTTONDOWN:
- msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd)));
+ if (should_set_keymap
+ && (message != WM_SYSKEYUP
+ || NILP (Vmenu_accelerator_enabled)))
+ SetKeyboardState (keymap);
- if (msframe->button2_need_lbutton)
- {
- KillTimer (hwnd, BUTTON_2_TIMER_ID);
- msframe->button2_need_lbutton = 0;
- msframe->button2_need_rbutton = 0;
- if (mswindows_button2_near_enough (msframe->last_click_point, MAKEPOINTS (lParam)))
- {
- mswindows_enqueue_mouse_button_event (hwnd, WM_MBUTTONDOWN,
- MAKEPOINTS (lParam), GetMessageTime());
- msframe->button2_is_down = 1;
- }
- else
- {
- mswindows_enqueue_mouse_button_event (hwnd, WM_RBUTTONDOWN,
- msframe->last_click_point, msframe->last_click_time);
- mswindows_enqueue_mouse_button_event (hwnd, WM_LBUTTONDOWN,
- MAKEPOINTS (lParam), GetMessageTime());
- }
}
- else
- {
- mswindows_set_chord_timer (hwnd);
- msframe->button2_need_rbutton = 1;
- msframe->last_click_point = MAKEPOINTS (lParam);
- }
- msframe->last_click_time = GetMessageTime();
- break;
-
- case WM_RBUTTONDOWN:
- msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd)));
+ if (key_needs_default_processing_p (wParam))
+ goto defproc;
+ else
+ break;
- if (msframe->button2_need_rbutton)
+ case WM_KEYDOWN:
+ case WM_SYSKEYDOWN:
+ /* In some locales the right-hand Alt key is labelled AltGr. This key
+ * should produce alternative charcaters when combined with another key.
+ * eg on a German keyboard pressing AltGr+q should produce '@'.
+ * AltGr generates exactly the same keystrokes as LCtrl+RAlt. But if
+ * TranslateMessage() is called with *any* combination of Ctrl+Alt down,
+ * it translates as if AltGr were down.
+ * We get round this by removing all modifiers from the keymap before
+ * calling TranslateMessage() unless AltGr is *really* down. */
{
- KillTimer (hwnd, BUTTON_2_TIMER_ID);
- msframe->button2_need_lbutton = 0;
- msframe->button2_need_rbutton = 0;
- if (mswindows_button2_near_enough (msframe->last_click_point, MAKEPOINTS (lParam)))
+ BYTE keymap[256];
+ int has_AltGr = mswindows_current_layout_has_AltGr ();
+ int mods;
+ int extendedp = lParam & 0x1000000;
+ Lisp_Object keysym;
+
+ frame = XFRAME (mswindows_find_frame (hwnd));
+ GetKeyboardState (keymap);
+ mods = mswindows_modifier_state (keymap, has_AltGr);
+
+ /* Handle non-printables */
+ if (!NILP (keysym = mswindows_key_to_emacs_keysym (wParam, mods,
+ extendedp)))
+ mswindows_enqueue_keypress_event (hwnd, keysym, mods);
+ else /* Normal keys & modifiers */
{
- mswindows_enqueue_mouse_button_event (hwnd, WM_MBUTTONDOWN,
- MAKEPOINTS (lParam), GetMessageTime());
- msframe->button2_is_down = 1;
- }
- else
- {
- mswindows_enqueue_mouse_button_event (hwnd, WM_LBUTTONDOWN,
- msframe->last_click_point, msframe->last_click_time);
- mswindows_enqueue_mouse_button_event (hwnd, WM_RBUTTONDOWN,
- MAKEPOINTS (lParam), GetMessageTime());
- }
- }
- else
- {
- mswindows_set_chord_timer (hwnd);
- msframe->button2_need_lbutton = 1;
- msframe->last_click_point = MAKEPOINTS (lParam);
+ Emchar quit_ch = CONSOLE_QUIT_CHAR (XCONSOLE (mswindows_find_console (hwnd)));
+ BYTE keymap_orig[256];
+ POINT pnt = { LOWORD (GetMessagePos()), HIWORD (GetMessagePos()) };
+ MSG msg, tranmsg;
+ int potential_accelerator = 0;
+ int got_accelerator = 0;
+
+ msg.hwnd = hwnd;
+ msg.message = message;
+ msg.wParam = wParam;
+ msg.lParam = lParam;
+ msg.time = GetMessageTime();
+ msg.pt = pnt;
+
+ /* GetKeyboardState() does not work as documented on Win95. We have
+ * 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 [extendedp ? VK_RCONTROL : VK_LCONTROL] |= 0x80;
+ else if (wParam == VK_MENU)
+ keymap [extendedp ? VK_RMENU : VK_LMENU] |= 0x80;
+
+ memcpy (keymap_orig, keymap, 256);
+
+ if (!NILP (Vmenu_accelerator_enabled) &&
+ !(mods & XEMACS_MOD_SHIFT) && message == WM_SYSKEYDOWN)
+ potential_accelerator = 1;
+
+ /* Remove shift modifier from an ascii character */
+ mods &= ~XEMACS_MOD_SHIFT;
+
+ /* Clear control and alt modifiers unless AltGr is pressed */
+ keymap [VK_RCONTROL] = 0;
+ keymap [VK_LMENU] = 0;
+ if (!has_AltGr || !(keymap [VK_LCONTROL] & 0x80)
+ || !(keymap [VK_RMENU] & 0x80))
+ {
+ keymap [VK_LCONTROL] = 0;
+ keymap [VK_CONTROL] = 0;
+ keymap [VK_RMENU] = 0;
+ keymap [VK_MENU] = 0;
+ }
+ SetKeyboardState (keymap);
+
+ /* Maybe generate some WM_[SYS]CHARs in the queue */
+ TranslateMessage (&msg);
+
+ while (PeekMessage (&tranmsg, hwnd, WM_CHAR, WM_CHAR, PM_REMOVE)
+ || PeekMessage (&tranmsg, hwnd, WM_SYSCHAR, WM_SYSCHAR, PM_REMOVE))
+ {
+ int mods1 = mods;
+ WPARAM ch = tranmsg.wParam;
+
+ /* If a quit char with no modifiers other than control and
+ shift, then mark it with a fake modifier, which is removed
+ upon dequeueing the event */
+ /* #### This might also not withstand localization, if
+ quit character is not a latin-1 symbol */
+ if (((quit_ch < ' ' && (mods & XEMACS_MOD_CONTROL) && quit_ch + 'a' - 1 == ch)
+ || (quit_ch >= ' ' && !(mods & XEMACS_MOD_CONTROL) && quit_ch == ch))
+ && ((mods & ~(XEMACS_MOD_CONTROL | XEMACS_MOD_SHIFT)) == 0))
+ {
+ mods1 |= FAKE_MOD_QUIT;
+ ++mswindows_quit_chars_count;
+ }
+ else if (potential_accelerator && !got_accelerator &&
+ msw_char_is_accelerator (frame, ch))
+ {
+ got_accelerator = 1;
+ break;
+ }
+ mswindows_enqueue_keypress_event (hwnd, make_char (ch), mods1);
+ } /* while */
+ SetKeyboardState (keymap_orig);
+ /* This generates WM_SYSCHAR messages, which are interpreted
+ by DefWindowProc as the menu selections. */
+ if (got_accelerator)
+ {
+ TranslateMessage (&msg);
+ goto defproc;
+ }
+ } /* else */
}
- msframe->last_click_time = GetMessageTime();
- break;
+ if (key_needs_default_processing_p (wParam))
+ goto defproc;
+ else
+ break;
- case WM_TIMER:
- if (wParam == BUTTON_2_TIMER_ID)
- {
- msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd)));
- KillTimer (hwnd, BUTTON_2_TIMER_ID);
+ case WM_MBUTTONDOWN:
+ case WM_MBUTTONUP:
+ /* Real middle mouse button has nothing to do with emulated one:
+ if one wants to exercise fingers playing chords on the mouse,
+ he is allowed to do that! */
+ mswindows_enqueue_mouse_button_event (hwnd, message,
+ MAKEPOINTS (lParam), GetMessageTime());
+ break;
- if (msframe->button2_need_lbutton)
- {
- msframe->button2_need_lbutton = 0;
- mswindows_enqueue_mouse_button_event (hwnd, WM_RBUTTONDOWN,
- msframe->last_click_point, msframe->last_click_time);
- }
- else if (msframe->button2_need_rbutton)
- {
- msframe->button2_need_rbutton = 0;
- mswindows_enqueue_mouse_button_event (hwnd, WM_LBUTTONDOWN,
- msframe->last_click_point, msframe->last_click_time);
- }
- }
- else
- assert ("Spurious timer fired" == 0);
- break;
+ case WM_LBUTTONUP:
+ msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd)));
+ msframe->last_click_time = GetMessageTime();
- case WM_MOUSEMOVE:
- /* Optimization: don't report mouse movement while size is changing */
- msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd)));
- if (!msframe->sizing)
- {
- /* When waiting for the second mouse button to finish
- button2 emulation, and have moved too far, just pretend
- as if timer has expired. This improves drag-select feedback */
- if ((msframe->button2_need_lbutton || msframe->button2_need_rbutton)
- && !mswindows_button2_near_enough (msframe->last_click_point,
- MAKEPOINTS (lParam)))
+ KillTimer (hwnd, BUTTON_2_TIMER_ID);
+ msframe->button2_need_lbutton = 0;
+ if (msframe->ignore_next_lbutton_up)
{
- KillTimer (hwnd, BUTTON_2_TIMER_ID);
- SendMessage (hwnd, WM_TIMER, BUTTON_2_TIMER_ID, 0);
+ msframe->ignore_next_lbutton_up = 0;
}
+ else if (msframe->button2_is_down)
+ {
+ msframe->button2_is_down = 0;
+ msframe->ignore_next_rbutton_up = 1;
+ mswindows_enqueue_mouse_button_event (hwnd, WM_MBUTTONUP,
+ MAKEPOINTS (lParam), GetMessageTime());
+ }
+ else
+ {
+ if (msframe->button2_need_rbutton)
+ {
+ msframe->button2_need_rbutton = 0;
+ mswindows_enqueue_mouse_button_event (hwnd, WM_LBUTTONDOWN,
+ MAKEPOINTS (lParam), GetMessageTime());
+ }
+ mswindows_enqueue_mouse_button_event (hwnd, WM_LBUTTONUP,
+ MAKEPOINTS (lParam), GetMessageTime());
+ }
+ break;
- emacs_event = Fmake_event (Qnil, Qnil);
- event = XEVENT(emacs_event);
-
- event->channel = mswindows_find_frame(hwnd);
- event->timestamp = GetMessageTime();
- event->event_type = pointer_motion_event;
- event->event.motion.x = MAKEPOINTS(lParam).x;
- event->event.motion.y = MAKEPOINTS(lParam).y;
- event->event.motion.modifiers = mswindows_modifier_state (NULL, 0);
-
- mswindows_enqueue_dispatch_event (emacs_event);
- }
- break;
+ case WM_RBUTTONUP:
+ msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd)));
+ msframe->last_click_time = GetMessageTime();
- case WM_CANCELMODE:
- ReleaseCapture ();
- /* Queue a `cancel-mode-internal' misc user event, so mouse
- selection would be canceled if any */
- mswindows_enqueue_misc_user_event (mswindows_find_frame (hwnd),
- Qcancel_mode_internal, Qnil);
- break;
+ KillTimer (hwnd, BUTTON_2_TIMER_ID);
+ msframe->button2_need_rbutton = 0;
+ if (msframe->ignore_next_rbutton_up)
+ {
+ msframe->ignore_next_rbutton_up = 0;
+ }
+ else if (msframe->button2_is_down)
+ {
+ msframe->button2_is_down = 0;
+ msframe->ignore_next_lbutton_up = 1;
+ mswindows_enqueue_mouse_button_event (hwnd, WM_MBUTTONUP,
+ MAKEPOINTS (lParam), GetMessageTime());
+ }
+ else
+ {
+ if (msframe->button2_need_lbutton)
+ {
+ msframe->button2_need_lbutton = 0;
+ mswindows_enqueue_mouse_button_event (hwnd, WM_RBUTTONDOWN,
+ MAKEPOINTS (lParam), GetMessageTime());
+ }
+ mswindows_enqueue_mouse_button_event (hwnd, WM_RBUTTONUP,
+ MAKEPOINTS (lParam), GetMessageTime());
+ }
+ break;
- case WM_NOTIFY:
- {
- LPNMHDR nmhdr = (LPNMHDR)lParam;
+ case WM_LBUTTONDOWN:
+ msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd)));
- if (nmhdr->code == TTN_NEEDTEXT)
+ if (msframe->button2_need_lbutton)
{
-#ifdef HAVE_TOOLBARS
- LPTOOLTIPTEXT tttext = (LPTOOLTIPTEXT)lParam;
- Lisp_Object btext;
-
- /* find out which toolbar */
- frame = XFRAME (mswindows_find_frame (hwnd));
- btext = mswindows_get_toolbar_button_text ( frame,
- nmhdr->idFrom );
+ KillTimer (hwnd, BUTTON_2_TIMER_ID);
+ msframe->button2_need_lbutton = 0;
+ msframe->button2_need_rbutton = 0;
+ if (mswindows_button2_near_enough (msframe->last_click_point, MAKEPOINTS (lParam)))
+ {
+ mswindows_enqueue_mouse_button_event (hwnd, WM_MBUTTONDOWN,
+ MAKEPOINTS (lParam), GetMessageTime());
+ msframe->button2_is_down = 1;
+ }
+ else
+ {
+ mswindows_enqueue_mouse_button_event (hwnd, WM_RBUTTONDOWN,
+ msframe->last_click_point, msframe->last_click_time);
+ mswindows_enqueue_mouse_button_event (hwnd, WM_LBUTTONDOWN,
+ MAKEPOINTS (lParam), GetMessageTime());
+ }
+ }
+ else
+ {
+ mswindows_set_chord_timer (hwnd);
+ msframe->button2_need_rbutton = 1;
+ msframe->last_click_point = MAKEPOINTS (lParam);
+ }
+ msframe->last_click_time = GetMessageTime();
+ break;
- tttext->lpszText = NULL;
- tttext->hinst = NULL;
+ case WM_RBUTTONDOWN:
+ msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd)));
- if (!NILP(btext))
+ if (msframe->button2_need_rbutton)
+ {
+ KillTimer (hwnd, BUTTON_2_TIMER_ID);
+ msframe->button2_need_lbutton = 0;
+ msframe->button2_need_rbutton = 0;
+ if (mswindows_button2_near_enough (msframe->last_click_point, MAKEPOINTS (lParam)))
{
- /* I think this is safe since the text will only go away
- when the toolbar does...*/
- TO_EXTERNAL_FORMAT (LISP_STRING, btext,
- C_STRING_ALLOCA, tttext->lpszText,
- Qnative);
+ mswindows_enqueue_mouse_button_event (hwnd, WM_MBUTTONDOWN,
+ MAKEPOINTS (lParam), GetMessageTime());
+ msframe->button2_is_down = 1;
+ }
+ else
+ {
+ mswindows_enqueue_mouse_button_event (hwnd, WM_LBUTTONDOWN,
+ msframe->last_click_point, msframe->last_click_time);
+ mswindows_enqueue_mouse_button_event (hwnd, WM_RBUTTONDOWN,
+ MAKEPOINTS (lParam), GetMessageTime());
}
-#endif
}
- /* handle tree view callbacks */
- else if (nmhdr->code == TVN_SELCHANGED)
+ else
{
- NM_TREEVIEW* ptree = (NM_TREEVIEW*)lParam;
- frame = XFRAME (mswindows_find_frame (hwnd));
- mswindows_handle_gui_wm_command (frame, 0, ptree->itemNew.lParam);
+ mswindows_set_chord_timer (hwnd);
+ msframe->button2_need_lbutton = 1;
+ msframe->last_click_point = MAKEPOINTS (lParam);
}
- /* handle tab control callbacks */
- else if (nmhdr->code == TCN_SELCHANGE)
- {
- TC_ITEM item;
- int idx = SendMessage (nmhdr->hwndFrom, TCM_GETCURSEL, 0, 0);
- frame = XFRAME (mswindows_find_frame (hwnd));
+ msframe->last_click_time = GetMessageTime();
+ break;
- item.mask = TCIF_PARAM;
- SendMessage (nmhdr->hwndFrom, TCM_GETITEM, (WPARAM)idx,
- (LPARAM)&item);
+ case WM_TIMER:
+ if (wParam == BUTTON_2_TIMER_ID)
+ {
+ msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd)));
+ KillTimer (hwnd, BUTTON_2_TIMER_ID);
- mswindows_handle_gui_wm_command (frame, 0, item.lParam);
+ if (msframe->button2_need_lbutton)
+ {
+ msframe->button2_need_lbutton = 0;
+ mswindows_enqueue_mouse_button_event (hwnd, WM_RBUTTONDOWN,
+ msframe->last_click_point, msframe->last_click_time);
+ }
+ else if (msframe->button2_need_rbutton)
+ {
+ msframe->button2_need_rbutton = 0;
+ mswindows_enqueue_mouse_button_event (hwnd, WM_LBUTTONDOWN,
+ msframe->last_click_point, msframe->last_click_time);
+ }
}
- }
- break;
+ else
+ assert ("Spurious timer fired" == 0);
+ break;
- case WM_PAINT:
- {
- /* According to the docs we need to check GetUpdateRect() before
- actually doing a WM_PAINT */
- if (GetUpdateRect (hwnd, NULL, FALSE))
+ case WM_MOUSEMOVE:
+ /* Optimization: don't report mouse movement while size is changing */
+ msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd)));
+ if (!msframe->sizing)
{
- PAINTSTRUCT paintStruct;
- int x, y, width, height;
-
- 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))
+ /* When waiting for the second mouse button to finish
+ button2 emulation, and have moved too far, just pretend
+ as if timer has expired. This improves drag-select feedback */
+ if ((msframe->button2_need_lbutton || msframe->button2_need_rbutton)
+ && !mswindows_button2_near_enough (msframe->last_click_point,
+ MAKEPOINTS (lParam)))
{
- hold_ignored_expose_registration = 1;
- mswindows_redraw_exposed_area (frame, x, y, width, height);
- hold_ignored_expose_registration = 0;
+ KillTimer (hwnd, BUTTON_2_TIMER_ID);
+ SendMessage (hwnd, WM_TIMER, BUTTON_2_TIMER_ID, 0);
}
- EndPaint (hwnd, &paintStruct);
+ emacs_event = Fmake_event (Qnil, Qnil);
+ event = XEVENT(emacs_event);
+
+ event->channel = mswindows_find_frame(hwnd);
+ event->timestamp = GetMessageTime();
+ event->event_type = pointer_motion_event;
+ event->event.motion.x = MAKEPOINTS(lParam).x;
+ event->event.motion.y = MAKEPOINTS(lParam).y;
+ event->event.motion.modifiers = mswindows_modifier_state (NULL, 0);
+
+ mswindows_enqueue_dispatch_event (emacs_event);
}
- else
- goto defproc;
- }
- break;
+ break;
- case WM_SIZE:
- /* We only care about this message if our size has really changed */
- if (wParam==SIZE_RESTORED || wParam==SIZE_MAXIMIZED || wParam==SIZE_MINIMIZED)
- {
- RECT rect;
- int columns, rows;
+ case WM_CANCELMODE:
+ ReleaseCapture ();
+ /* Queue a `cancel-mode-internal' misc user event, so mouse
+ selection would be canceled if any */
+ mswindows_enqueue_misc_user_event (mswindows_find_frame (hwnd),
+ Qcancel_mode_internal, Qnil);
+ break;
- fobj = mswindows_find_frame (hwnd);
- frame = XFRAME (fobj);
- msframe = FRAME_MSWINDOWS_DATA (frame);
+ case WM_NOTIFY:
+ {
+ LPNMHDR nmhdr = (LPNMHDR)lParam;
- /* We cannot handle frame map and unmap hooks right in
- this routine, because these may throw. We queue
- magic events to run these hooks instead - kkm */
+ if (nmhdr->code == TTN_NEEDTEXT)
+ {
+#ifdef HAVE_TOOLBARS
+ LPTOOLTIPTEXT tttext = (LPTOOLTIPTEXT)lParam;
+ Lisp_Object btext;
+
+ /* find out which toolbar */
+ frame = XFRAME (mswindows_find_frame (hwnd));
+ btext = mswindows_get_toolbar_button_text ( frame,
+ nmhdr->idFrom );
+
+ tttext->lpszText = NULL;
+ tttext->hinst = NULL;
+
+ if (!NILP(btext))
+ {
+ /* I think this is safe since the text will only go away
+ when the toolbar does...*/
+ TO_EXTERNAL_FORMAT (LISP_STRING, btext,
+ C_STRING_ALLOCA, tttext->lpszText,
+ Qnative);
+ }
+#endif
+ }
+ /* handle tree view callbacks */
+ else if (nmhdr->code == TVN_SELCHANGED)
+ {
+ NM_TREEVIEW* ptree = (NM_TREEVIEW*)lParam;
+ frame = XFRAME (mswindows_find_frame (hwnd));
+ mswindows_handle_gui_wm_command (frame, 0, ptree->itemNew.lParam);
+ }
+ /* handle tab control callbacks */
+ else if (nmhdr->code == TCN_SELCHANGE)
+ {
+ TC_ITEM item;
+ int idx = SendMessage (nmhdr->hwndFrom, TCM_GETCURSEL, 0, 0);
+ frame = XFRAME (mswindows_find_frame (hwnd));
- if (wParam==SIZE_MINIMIZED)
- {
- /* Iconified */
- FRAME_VISIBLE_P (frame) = 0;
- mswindows_enqueue_magic_event (hwnd, XM_UNMAPFRAME);
- }
- else
+ item.mask = TCIF_PARAM;
+ SendMessage (nmhdr->hwndFrom, TCM_GETITEM, (WPARAM)idx,
+ (LPARAM)&item);
+
+ mswindows_handle_gui_wm_command (frame, 0, item.lParam);
+ }
+ }
+ break;
+
+ case WM_PAINT:
+ /* hdc will be NULL unless this is a subwindow - in which case we
+ shouldn't have received a paint message for it here. */
+ assert (wParam == 0);
+
+ /* Can't queue a magic event because windows goes modal and sends paint
+ messages directly to the windows procedure when doing solid drags
+ and the message queue doesn't get processed. */
+ mswindows_handle_paint (XFRAME (mswindows_find_frame (hwnd)));
+ break;
+
+ case WM_SIZE:
+ /* We only care about this message if our size has really changed */
+ if (wParam==SIZE_RESTORED || wParam==SIZE_MAXIMIZED || wParam==SIZE_MINIMIZED)
{
- GetClientRect(hwnd, &rect);
- FRAME_PIXWIDTH(frame) = rect.right;
- FRAME_PIXHEIGHT(frame) = rect.bottom;
+ RECT rect;
+ int columns, rows;
- pixel_to_real_char_size (frame, rect.right, rect.bottom,
- &FRAME_MSWINDOWS_CHARWIDTH (frame),
- &FRAME_MSWINDOWS_CHARHEIGHT (frame));
+ fobj = mswindows_find_frame (hwnd);
+ frame = XFRAME (fobj);
+ msframe = FRAME_MSWINDOWS_DATA (frame);
- pixel_to_char_size (frame, rect.right, rect.bottom, &columns, &rows);
- change_frame_size (frame, rows, columns, 1);
+ /* We cannot handle frame map and unmap hooks right in
+ this routine, because these may throw. We queue
+ magic events to run these hooks instead - kkm */
- /* If we are inside frame creation, we have to apply geometric
- properties now. */
- if (FRAME_MSWINDOWS_TARGET_RECT (frame))
+ if (wParam==SIZE_MINIMIZED)
{
- /* Yes, we have to size again */
- 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 (FRAME_MSWINDOWS_TARGET_RECT (frame))
- {
- xfree (FRAME_MSWINDOWS_TARGET_RECT (frame));
- FRAME_MSWINDOWS_TARGET_RECT (frame) = 0;
- }
+ /* Iconified */
+ FRAME_VISIBLE_P (frame) = 0;
+ mswindows_enqueue_magic_event (hwnd, XM_UNMAPFRAME);
}
else
{
- if (!msframe->sizing && !FRAME_VISIBLE_P (frame))
- mswindows_enqueue_magic_event (hwnd, XM_MAPFRAME);
- FRAME_VISIBLE_P (frame) = 1;
+ GetClientRect(hwnd, &rect);
+ FRAME_PIXWIDTH(frame) = rect.right;
+ FRAME_PIXHEIGHT(frame) = rect.bottom;
+
+ pixel_to_real_char_size (frame, rect.right, rect.bottom,
+ &FRAME_MSWINDOWS_CHARWIDTH (frame),
+ &FRAME_MSWINDOWS_CHARHEIGHT (frame));
+
+ pixel_to_char_size (frame, rect.right, rect.bottom, &columns, &rows);
+ change_frame_size (frame, rows, columns, 1);
+
+ /* If we are inside frame creation, we have to apply geometric
+ properties now. */
+ if (FRAME_MSWINDOWS_TARGET_RECT (frame))
+ {
+ /* Yes, we have to size again */
+ 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 (FRAME_MSWINDOWS_TARGET_RECT (frame))
+ {
+ xfree (FRAME_MSWINDOWS_TARGET_RECT (frame));
+ FRAME_MSWINDOWS_TARGET_RECT (frame) = 0;
+ }
+ }
+ else
+ {
+ 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 ();
+ if (!msframe->sizing || mswindows_dynamic_frame_resize)
+ redisplay ();
+ }
}
}
- }
- break;
+ break;
- /* Misc magic events which only require that the frame be identified */
- case WM_SETFOCUS:
- case WM_KILLFOCUS:
- mswindows_enqueue_magic_event (hwnd, message);
- break;
+ case WM_DISPLAYCHANGE:
+ {
+ struct device *d;
- case WM_WINDOWPOSCHANGING:
- {
- WINDOWPOS *wp = (LPWINDOWPOS) lParam;
- WINDOWPLACEMENT wpl = { sizeof(WINDOWPLACEMENT) };
- GetWindowPlacement(hwnd, &wpl);
-
- /* Only interested if size is changing and we're not being iconified */
- if (wpl.showCmd != SW_SHOWMINIMIZED
- && wpl.showCmd != SW_SHOWMAXIMIZED
- && !(wp->flags & SWP_NOSIZE))
+ fobj = mswindows_find_frame (hwnd);
+ frame = XFRAME (fobj);
+ d = XDEVICE (FRAME_DEVICE (frame));
+
+ DEVICE_MSWINDOWS_HORZRES(d) = LOWORD (lParam);
+ DEVICE_MSWINDOWS_VERTRES(d) = HIWORD (lParam);
+ DEVICE_MSWINDOWS_BITSPIXEL(d) = wParam;
+ break;
+ }
+
+ /* Misc magic events which only require that the frame be identified */
+ case WM_SETFOCUS:
+ case WM_KILLFOCUS:
+ mswindows_enqueue_magic_event (hwnd, message);
+ break;
+
+ case WM_WINDOWPOSCHANGING:
{
- RECT ncsize = { 0, 0, 0, 0 };
- int pixwidth, pixheight;
- AdjustWindowRectEx (&ncsize, GetWindowLong (hwnd, GWL_STYLE),
- GetMenu(hwnd) != NULL,
- GetWindowLong (hwnd, GWL_EXSTYLE));
-
- round_size_to_real_char (XFRAME (mswindows_find_frame (hwnd)),
- wp->cx - (ncsize.right - ncsize.left),
- wp->cy - (ncsize.bottom - ncsize.top),
- &pixwidth, &pixheight);
-
- /* Convert client sizes to window sizes */
- pixwidth += (ncsize.right - ncsize.left);
- pixheight += (ncsize.bottom - ncsize.top);
-
- if (wpl.showCmd != SW_SHOWMAXIMIZED)
+ WINDOWPOS *wp = (LPWINDOWPOS) lParam;
+ WINDOWPLACEMENT wpl = { sizeof(WINDOWPLACEMENT) };
+ GetWindowPlacement(hwnd, &wpl);
+
+ /* Only interested if size is changing and we're not being iconified */
+ if (wpl.showCmd != SW_SHOWMINIMIZED
+ && wpl.showCmd != SW_SHOWMAXIMIZED
+ && !(wp->flags & SWP_NOSIZE))
{
- /* Adjust so that the bottom or right doesn't move if it's
- * the top or left that's being changed */
- RECT rect;
- GetWindowRect (hwnd, &rect);
-
- if (rect.left != wp->x)
- wp->x += wp->cx - pixwidth;
- if (rect.top != wp->y)
- wp->y += wp->cy - pixheight;
+ RECT ncsize = { 0, 0, 0, 0 };
+ int pixwidth, pixheight;
+ AdjustWindowRectEx (&ncsize, GetWindowLong (hwnd, GWL_STYLE),
+ GetMenu(hwnd) != NULL,
+ GetWindowLong (hwnd, GWL_EXSTYLE));
+
+ round_size_to_real_char (XFRAME (mswindows_find_frame (hwnd)),
+ wp->cx - (ncsize.right - ncsize.left),
+ wp->cy - (ncsize.bottom - ncsize.top),
+ &pixwidth, &pixheight);
+
+ /* Convert client sizes to window sizes */
+ pixwidth += (ncsize.right - ncsize.left);
+ pixheight += (ncsize.bottom - ncsize.top);
+
+ if (wpl.showCmd != SW_SHOWMAXIMIZED)
+ {
+ /* Adjust so that the bottom or right doesn't move if it's
+ * the top or left that's being changed */
+ RECT rect;
+ GetWindowRect (hwnd, &rect);
+
+ if (rect.left != wp->x)
+ wp->x += wp->cx - pixwidth;
+ if (rect.top != wp->y)
+ wp->y += wp->cy - pixheight;
+ }
+
+ wp->cx = pixwidth;
+ wp->cy = pixheight;
}
-
- wp->cx = pixwidth;
- wp->cy = pixheight;
+ /* DefWindowProc sends useful WM_GETMINMAXINFO message, and adjusts
+ window position if the user tries to track window too small */
}
- /* DefWindowProc sends useful WM_GETMINMAXINFO message, and adjusts
- window position if the user tries to track window too small */
- }
- goto defproc;
+ goto defproc;
- case WM_ENTERSIZEMOVE:
- msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd)));
- msframe->sizing = 1;
- return 0;
+ case WM_ENTERSIZEMOVE:
+ msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd)));
+ msframe->sizing = 1;
+ return 0;
- case WM_EXITSIZEMOVE:
- msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd)));
- msframe->sizing = 0;
- /* Queue noop event */
- mswindows_enqueue_magic_event (NULL, XM_BUMPQUEUE);
- return 0;
+ case WM_EXITSIZEMOVE:
+ msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd)));
+ msframe->sizing = 0;
+ /* Queue noop event */
+ mswindows_enqueue_magic_event (NULL, XM_BUMPQUEUE);
+ return 0;
#ifdef HAVE_SCROLLBARS
- case WM_VSCROLL:
- case WM_HSCROLL:
- {
- /* Direction of scroll is determined by scrollbar instance. */
- int code = (int) LOWORD(wParam);
- int pos = (short int) HIWORD(wParam);
- HWND hwndScrollBar = (HWND) lParam;
- struct gcpro gcpro1, gcpro2;
-
- mswindows_handle_scrollbar_event (hwndScrollBar, code, pos);
- GCPRO2 (emacs_event, fobj);
- if (UNBOUNDP(mswindows_pump_outstanding_events())) /* Can GC */
- {
- /* Error during event pumping - cancel scroll */
- SendMessage (hwndScrollBar, WM_CANCELMODE, 0, 0);
- }
- UNGCPRO;
- break;
- }
+ case WM_VSCROLL:
+ case WM_HSCROLL:
+ {
+ /* Direction of scroll is determined by scrollbar instance. */
+ int code = (int) LOWORD(wParam);
+ int pos = (short int) HIWORD(wParam);
+ HWND hwndScrollBar = (HWND) lParam;
+ struct gcpro gcpro1, gcpro2;
+
+ mswindows_handle_scrollbar_event (hwndScrollBar, code, pos);
+ GCPRO2 (emacs_event, fobj);
+ if (UNBOUNDP(mswindows_pump_outstanding_events())) /* Can GC */
+ {
+ /* Error during event pumping - cancel scroll */
+ SendMessage (hwndScrollBar, WM_CANCELMODE, 0, 0);
+ }
+ UNGCPRO;
+ break;
+ }
- case WM_MOUSEWHEEL:
- {
- int keys = LOWORD (wParam); /* Modifier key flags */
- int delta = (short) HIWORD (wParam); /* Wheel rotation amount */
- struct gcpro gcpro1, gcpro2;
+ 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;
- }
+ 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
#ifdef HAVE_MENUBARS
- case WM_INITMENU:
- if (UNBOUNDP (mswindows_handle_wm_initmenu (
- (HMENU) wParam,
- XFRAME (mswindows_find_frame (hwnd)))))
- SendMessage (hwnd, WM_CANCELMODE, 0, 0);
- break;
-
- case WM_INITMENUPOPUP:
- if (!HIWORD(lParam))
- {
- if (UNBOUNDP (mswindows_handle_wm_initmenupopup (
- (HMENU) wParam,
- XFRAME (mswindows_find_frame (hwnd)))))
- SendMessage (hwnd, WM_CANCELMODE, 0, 0);
- }
- break;
+ case WM_INITMENU:
+ if (UNBOUNDP (mswindows_handle_wm_initmenu (
+ (HMENU) wParam,
+ XFRAME (mswindows_find_frame (hwnd)))))
+ SendMessage (hwnd, WM_CANCELMODE, 0, 0);
+ break;
+
+ case WM_INITMENUPOPUP:
+ if (!HIWORD(lParam))
+ {
+ if (UNBOUNDP (mswindows_handle_wm_initmenupopup (
+ (HMENU) wParam,
+ XFRAME (mswindows_find_frame (hwnd)))))
+ SendMessage (hwnd, WM_CANCELMODE, 0, 0);
+ }
+ break;
#endif /* HAVE_MENUBARS */
- case WM_COMMAND:
- {
- WORD id = LOWORD (wParam);
- WORD nid = HIWORD (wParam);
- HWND cid = (HWND)lParam;
- frame = XFRAME (mswindows_find_frame (hwnd));
+ case WM_COMMAND:
+ {
+ WORD id = LOWORD (wParam);
+ WORD nid = HIWORD (wParam);
+ HWND cid = (HWND)lParam;
+ frame = XFRAME (mswindows_find_frame (hwnd));
#ifdef HAVE_TOOLBARS
- if (!NILP (mswindows_handle_toolbar_wm_command (frame, cid, id)))
- break;
+ if (!NILP (mswindows_handle_toolbar_wm_command (frame, cid, id)))
+ break;
#endif
- /* widgets in a buffer only eval a callback for suitable events.*/
- switch (nid)
- {
- case BN_CLICKED:
- case EN_CHANGE:
- case CBN_EDITCHANGE:
- case CBN_SELCHANGE:
- if (!NILP (mswindows_handle_gui_wm_command (frame, cid, id)))
- return 0;
- }
- /* menubars always must come last since the hashtables do not
- always exist*/
+ /* widgets in a buffer only eval a callback for suitable events.*/
+ switch (nid)
+ {
+ case BN_CLICKED:
+ case EN_CHANGE:
+ case CBN_EDITCHANGE:
+ case CBN_SELCHANGE:
+ if (!NILP (mswindows_handle_gui_wm_command (frame, cid, id)))
+ return 0;
+ }
+ /* menubars always must come last since the hashtables do not
+ always exist*/
#ifdef HAVE_MENUBARS
- if (!NILP (mswindows_handle_wm_command (frame, id)))
- break;
+ if (!NILP (mswindows_handle_wm_command (frame, id)))
+ break;
#endif
- return DefWindowProc (hwnd, message, wParam, lParam);
- /* Bite me - a spurious command. This used to not be able to
- happen but with the introduction of widgets its now
- possible. */
- }
- break;
+ return DefWindowProc (hwnd, message, wParam, lParam);
+ /* Bite me - a spurious command. This used to not be able to
+ happen but with the introduction of widgets its now
+ possible. */
+ }
+ break;
- case WM_CTLCOLORBTN:
- case WM_CTLCOLORLISTBOX:
- case WM_CTLCOLOREDIT:
- case WM_CTLCOLORSTATIC:
- case WM_CTLCOLORSCROLLBAR:
- {
- /* if we get an opportunity to paint a widget then do so if
- there is an appropriate face */
- HWND crtlwnd = (HWND)lParam;
- LONG ii = GetWindowLong (crtlwnd, GWL_USERDATA);
- if (ii)
- {
- Lisp_Object image_instance;
- VOID_TO_LISP (image_instance, ii);
- if (IMAGE_INSTANCEP (image_instance)
- &&
- IMAGE_INSTANCE_TYPE_P (image_instance, IMAGE_WIDGET))
- {
- /* set colors for the buttons */
- HDC hdc = (HDC)wParam;
- if (last_widget_brushed != ii)
- {
- if (widget_brush)
- DeleteObject (widget_brush);
- 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
- (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
- (XIMAGE_INSTANCE_WIDGET_FACE (image_instance),
- XIMAGE_INSTANCE_SUBWINDOW_FRAME (image_instance)))));
- return (LRESULT)widget_brush;
- }
- }
- }
- goto defproc;
+ case WM_CTLCOLORBTN:
+ case WM_CTLCOLORLISTBOX:
+ case WM_CTLCOLOREDIT:
+ case WM_CTLCOLORSTATIC:
+ case WM_CTLCOLORSCROLLBAR:
+ {
+ /* if we get an opportunity to paint a widget then do so if
+ there is an appropriate face */
+ HWND crtlwnd = (HWND)lParam;
+ LONG ii = GetWindowLong (crtlwnd, GWL_USERDATA);
+ if (ii)
+ {
+ Lisp_Object image_instance;
+ VOID_TO_LISP (image_instance, ii);
+ if (IMAGE_INSTANCEP (image_instance)
+ &&
+ IMAGE_INSTANCE_TYPE_P (image_instance, IMAGE_WIDGET))
+ {
+ /* set colors for the buttons */
+ HDC hdc = (HDC)wParam;
+ if (last_widget_brushed != ii)
+ {
+ if (widget_brush)
+ DeleteObject (widget_brush);
+ 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
+ (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
+ (XIMAGE_INSTANCE_WIDGET_FACE (image_instance),
+ XIMAGE_INSTANCE_SUBWINDOW_FRAME (image_instance)))));
+ return (LRESULT)widget_brush;
+ }
+ }
+ }
+ goto defproc;
#ifdef HAVE_DRAGNDROP
- case WM_DROPFILES: /* implementation ripped-off from event-Xt.c */
- {
- UINT filecount, i, len;
- POINT point;
- char* filename;
-#ifdef __CYGWIN32__
- char* fname;
-#endif
- Lisp_Object l_dndlist = Qnil, l_item = Qnil;
- struct gcpro gcpro1, gcpro2, gcpro3;
+ case WM_DROPFILES: /* implementation ripped-off from event-Xt.c */
+ {
+ UINT filecount, i, len;
+ POINT point;
+ char* filename;
+ char* fname;
- emacs_event = Fmake_event (Qnil, Qnil);
- event = XEVENT(emacs_event);
+ Lisp_Object l_dndlist = Qnil, l_item = Qnil;
+ struct gcpro gcpro1, gcpro2, gcpro3;
- GCPRO3 (emacs_event, l_dndlist, l_item);
+ emacs_event = Fmake_event (Qnil, Qnil);
+ event = XEVENT(emacs_event);
- if (!DragQueryPoint ((HANDLE) wParam, &point))
- point.x = point.y = -1; /* outside client area */
+ GCPRO3 (emacs_event, l_dndlist, l_item);
- event->event_type = misc_user_event;
- event->channel = mswindows_find_frame(hwnd);
- event->timestamp = GetMessageTime();
- event->event.misc.button = 1; /* #### Should try harder */
- event->event.misc.modifiers = mswindows_modifier_state (NULL, 0);
- event->event.misc.x = point.x;
- event->event.misc.y = point.y;
- event->event.misc.function = Qdragdrop_drop_dispatch;
+ if (!DragQueryPoint ((HDROP) wParam, &point))
+ point.x = point.y = -1; /* outside client area */
+
+ event->event_type = misc_user_event;
+ event->channel = mswindows_find_frame(hwnd);
+ event->timestamp = GetMessageTime();
+ event->event.misc.button = 1; /* #### Should try harder */
+ event->event.misc.modifiers = mswindows_modifier_state (NULL, 0);
+ event->event.misc.x = point.x;
+ event->event.misc.y = point.y;
+ event->event.misc.function = Qdragdrop_drop_dispatch;
+
+ filecount = DragQueryFile ((HDROP) wParam, 0xffffffff, NULL, 0);
+ for (i=0; i<filecount; i++)
+ {
+ len = DragQueryFile ((HDROP) wParam, i, NULL, 0);
+ /* The URLs that we make here aren't correct according to section
+ * 3.10 of rfc1738 because they're missing the //<host>/ part and
+ * because they may contain reserved characters. But that's OK -
+ * they just need to be good enough to keep dragdrop.el happy. */
+ fname = (char *)xmalloc (len+1);
+ DragQueryFile ((HANDLE) wParam, i, fname, len+1);
+
+ /* May be a shell link aka "shortcut" - replace fname if so */
+#if !(defined(__CYGWIN32__) || defined(__MINGW32__))
+ /* cygwin doesn't define this COM stuff */
+ if (!stricmp (fname + strlen (fname) - 4, ".LNK"))
+ {
+ IShellLink* psl;
+
+ if (CoCreateInstance (&CLSID_ShellLink, NULL,
+ CLSCTX_INPROC_SERVER, &IID_IShellLink, &psl) == S_OK)
+ {
+ IPersistFile* ppf;
+
+ if (psl->lpVtbl->QueryInterface (psl, &IID_IPersistFile,
+ &ppf) == S_OK)
+ {
+ WORD wsz[MAX_PATH];
+ WIN32_FIND_DATA wfd;
+ LPSTR resolved = (char *) xmalloc (MAX_PATH+1);
+
+ MultiByteToWideChar (CP_ACP,0, fname, -1, wsz, MAX_PATH);
+
+ if ((ppf->lpVtbl->Load (ppf, wsz, STGM_READ) == S_OK) &&
+ (psl->lpVtbl->GetPath (psl, resolved, MAX_PATH,
+ &wfd, 0)==S_OK))
+ {
+ xfree (fname);
+ fname = resolved;
+ len = strlen (fname);
+ }
+
+ ppf->lpVtbl->Release (ppf);
+ }
+
+ psl->lpVtbl->Release (psl);
+ }
+ }
+#endif
- filecount = DragQueryFile ((HANDLE) wParam, 0xffffffff, NULL, 0);
- for (i=0; i<filecount; i++)
- {
- len = DragQueryFile ((HANDLE) wParam, i, NULL, 0);
- /* The URLs that we make here aren't correct according to section
- * 3.10 of rfc1738 because they're missing the //<host>/ part and
- * because they may contain reserved characters. But that's OK. */
#ifdef __CYGWIN32__
- fname = (char *)xmalloc (len+1);
- DragQueryFile ((HANDLE) wParam, i, fname, len+1);
- filename = xmalloc (cygwin32_win32_to_posix_path_list_buf_size (fname) + 5);
- strcpy (filename, "file:");
- cygwin32_win32_to_posix_path_list (fname, filename+5);
- xfree (fname);
+ filename = xmalloc (cygwin32_win32_to_posix_path_list_buf_size (fname) + 5);
+ strcpy (filename, "file:");
+ cygwin32_win32_to_posix_path_list (fname, filename+5);
#else
- filename = (char *)xmalloc (len+6);
- strcpy (filename, "file:");
- DragQueryFile ((HANDLE) wParam, i, filename+5, len+1);
- dostounix_filename (filename+5);
+ filename = (char *)xmalloc (len+6);
+ strcat (strcpy (filename, "file:"), fname);
+ dostounix_filename (filename+5);
#endif
- l_item = make_string (filename, strlen (filename));
- l_dndlist = Fcons (l_item, l_dndlist);
- xfree (filename);
- }
- DragFinish ((HANDLE) wParam);
+ xfree (fname);
+ l_item = make_string (filename, strlen (filename));
+ l_dndlist = Fcons (l_item, l_dndlist);
+ xfree (filename);
+ }
+ DragFinish ((HDROP) wParam);
- event->event.misc.object = Fcons (Qdragdrop_URL, l_dndlist);
- mswindows_enqueue_dispatch_event (emacs_event);
- UNGCPRO;
- }
- break;
+ event->event.misc.object = Fcons (Qdragdrop_URL, l_dndlist);
+ mswindows_enqueue_dispatch_event (emacs_event);
+ UNGCPRO;
+ }
+ break;
#endif
- defproc:
- default:
- return DefWindowProc (hwnd, message, wParam, lParam);
- }
+ defproc:
+ default:
+ return DefWindowProc (hwnd, message, wParam, lParam);
+ }
return (0);
}
if (has_AltGr && (keymap [VK_LCONTROL] & 0x80) && (keymap [VK_RMENU] & 0x80))
{
- mods |= (keymap [VK_LMENU] & 0x80) ? MOD_META : 0;
- mods |= (keymap [VK_RCONTROL] & 0x80) ? MOD_CONTROL : 0;
+ mods |= (keymap [VK_LMENU] & 0x80) ? XEMACS_MOD_META : 0;
+ mods |= (keymap [VK_RCONTROL] & 0x80) ? XEMACS_MOD_CONTROL : 0;
}
else
{
- mods |= (keymap [VK_MENU] & 0x80) ? MOD_META : 0;
- mods |= (keymap [VK_CONTROL] & 0x80) ? MOD_CONTROL : 0;
+ mods |= (keymap [VK_MENU] & 0x80) ? XEMACS_MOD_META : 0;
+ mods |= (keymap [VK_CONTROL] & 0x80) ? XEMACS_MOD_CONTROL : 0;
}
- mods |= (keymap [VK_SHIFT] & 0x80) ? MOD_SHIFT : 0;
+ mods |= (keymap [VK_SHIFT] & 0x80) ? XEMACS_MOD_SHIFT : 0;
return mods;
}
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 ("");
+ case VK_LWIN return KEYSYM ("");
+ case VK_RWIN return KEYSYM ("");
#endif
case VK_APPS: return KEYSYM ("menu");
case VK_NUMPAD0: return KEYSYM ("kp-0");
case XM_BUMPQUEUE:
break;
+ case WM_PAINT:
+ {
+ struct frame *f = XFRAME (EVENT_CHANNEL (emacs_event));
+ mswindows_handle_paint (f);
+ (FRAME_MSWINDOWS_DATA (f))->paint_pending = 0;
+ }
+ break;
+
case WM_SETFOCUS:
case WM_KILLFOCUS:
{
? get_winsock_stream_waitable (XLSTREAM (instr))
: get_ntpipe_input_stream_waitable (XLSTREAM (instr)));
#else
- return get_ntpipe_input_stream_waitable (XLSTREAM (instr));
+ return get_ntpipe_input_stream_waitable (XLSTREAM (instr));
#endif
}
/* Drain windows queue. This sets up number of quit characters in
the queue */
- mswindows_drain_windows_queue (1);
+ mswindows_drain_windows_queue ();
if (mswindows_quit_chars_count > 0)
{
emacs_event = mswindows_cancel_dispatch_event (&match_against);
assert (!NILP (emacs_event));
- if (XEVENT(emacs_event)->event.key.modifiers & MOD_SHIFT)
+ if (XEVENT(emacs_event)->event.key.modifiers & XEMACS_MOD_SHIFT)
critical_p = 1;
Fdeallocate_event(emacs_event);
USID
emacs_mswindows_delete_stream_pair (Lisp_Object instream,
- Lisp_Object outstream)
+ Lisp_Object outstream)
{
/* Oh nothing special here for Win32 at all */
#if defined (HAVE_UNIX_PROCESSES)
mswindows_event_stream = xnew (struct event_stream);
mswindows_event_stream->event_pending_p = emacs_mswindows_event_pending_p;
+ mswindows_event_stream->force_event_pending = 0;
mswindows_event_stream->next_event_cb = emacs_mswindows_next_event;
mswindows_event_stream->handle_magic_event_cb = emacs_mswindows_handle_magic_event;
mswindows_event_stream->add_timeout_cb = emacs_mswindows_add_timeout;
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.
+ DEFVAR_BOOL ("mswindows-alt-by-itself-activates-menu",
+ &mswindows_alt_by_itself_activates_menu /*
+*Controls whether pressing and releasing the Alt key activates the menubar.
+This applies only if no intervening key was pressed. See also
+`menu-accelerator-enabled', which is probably the behavior you actually want.
Default is t.
*/ );
- DEFVAR_BOOL ("mswindows-dynamic-frame-resize", &mswindows_dynamic_frame_resize /*
+ DEFVAR_BOOL ("mswindows-dynamic-frame-resize",
+ &mswindows_dynamic_frame_resize /*
*Controls redrawing frame contents during mouse-drag or keyboard resize
operation. When non-nil, the frame is redrawn while being resized. When
nil, frame is not redrawn, and exposed areas are filled with default
Default is t on fast machines, nil on slow.
*/ );
-/* The description copied verbatim from nt-emacs. (C) Geoff Voelker */
- DEFVAR_INT ("mswindows-mouse-button-tolerance", &mswindows_mouse_button_tolerance /*
+ DEFVAR_INT ("mswindows-mouse-button-tolerance",
+ &mswindows_mouse_button_tolerance /*
*Analogue of double click interval for faking middle mouse events.
The value is the minimum time in milliseconds that must elapse between
left/right button down events before they are considered distinct events.
If negative or zero, currently set system default is used instead.
*/ );
-/* The description copied verbatim from nt-emacs. (C) Geoff Voelker */
DEFVAR_INT ("mswindows-num-mouse-buttons", &mswindows_num_mouse_buttons /*
Number of physical mouse buttons.
*/ );
- DEFVAR_INT ("mswindows-mouse-button-max-skew-x", &mswindows_mouse_button_max_skew_x /*
+ DEFVAR_INT ("mswindows-mouse-button-max-skew-x",
+ &mswindows_mouse_button_max_skew_x /*
*Maximum horizontal distance in pixels between points in which left and
right button clicks occurred for them to be translated into single
middle button event. Clicks must occur in time not longer than defined
If negative or zero, currently set system default is used instead.
*/ );
- DEFVAR_INT ("mswindows-mouse-button-max-skew-y", &mswindows_mouse_button_max_skew_y /*
+ DEFVAR_INT ("mswindows-mouse-button-max-skew-y",
+ &mswindows_mouse_button_max_skew_y /*
*Maximum vertical distance in pixels between points in which left and
right button clicks occurred for them to be translated into single
middle button event. Clicks must occur in time not longer than defined
mswindows_mouse_button_max_skew_x = 0;
mswindows_mouse_button_max_skew_y = 0;
mswindows_mouse_button_tolerance = 0;
- mswindows_meta_activates_menu = 1;
+ mswindows_alt_by_itself_activates_menu = 1;
}
void
/* Synched up with: Not in FSF. */
+/* Authorship:
+
+ Created 1991 by Jamie Zawinski.
+ A great deal of work over the ages by Ben Wing (Mule-ization for 19.12,
+ device abstraction for 19.12/19.13, async timers for 19.14,
+ rewriting of focus code for 19.12, pre-idle hook for 19.12,
+ redoing of signal and quit handling for 19.9 and 19.12,
+ misc-user events to clean up menu/scrollbar handling for 19.11,
+ function-key-map/key-translation-map/keyboard-translate-table for
+ 19.13/19.14, open-dribble-file for 19.13, much other cleanup).
+ focus-follows-mouse from Chuck Thompson, 1995.
+ XIM stuff by Martin Buchholz, c. 1996?.
+*/
+
/* This file has been Mule-ized. */
/*
/* TODO:
This stuff is way too hard to maintain - needs rework.
- (global-set-key "\C-p" global-map) causes a crash - need recursion check.
-
C-x @ h <scrollbar-drag> x causes a crash.
The command builder should deal only with key and button events.
#include <config.h>
#include "lisp.h"
-#ifdef HAVE_X_WINDOWS
-#include "console-x.h" /* for menu accelerators ... */
-#include "gui-x.h"
-#include "../lwlib/lwlib.h"
-#else
-#define lw_menu_active 0
-#endif
-
#include "blocktype.h"
#include "buffer.h"
#include "commands.h"
#include "keymap.h"
#include "lstream.h"
#include "macros.h" /* for defining_keyboard_macro */
+#include "menubar.h" /* #### for evil kludges. */
#include "process.h"
#include "window.h"
Lisp_Object Vpre_command_hook, Vpost_command_hook;
Lisp_Object Qpre_command_hook, Qpost_command_hook;
+/* See simple.el */
+Lisp_Object Qhandle_pre_motion_command, Qhandle_post_motion_command;
+
/* Hook run when XEmacs is about to be idle. */
Lisp_Object Qpre_idle_hook, Vpre_idle_hook;
/* Control gratuitous keyboard focus throwing. */
int focus_follows_mouse;
-#ifdef ILL_CONCEIVED_HOOK
+#if 0 /* FSF Emacs crap */
/* Hook run after a command if there's no more input soon. */
Lisp_Object Qpost_command_idle_hook, Vpost_command_idle_hook;
/* Delay time in microseconds before running post-command-idle-hook. */
int post_command_idle_delay;
-#endif /* ILL_CONCEIVED_HOOK */
-#ifdef DEFERRED_ACTION_CRAP
/* List of deferred actions to be performed at a later time.
The precise format isn't relevant here; we just check whether it is nil. */
Lisp_Object Vdeferred_action_list;
/* Function to call to handle deferred actions, when there are any. */
Lisp_Object Vdeferred_action_function;
Lisp_Object Qdeferred_action_function;
-#endif /* DEFERRED_ACTION_CRAP */
+#endif /* FSF Emacs crap */
/* Non-nil disable property on a command means
do not execute it; call disabled-command-hook's value instead. */
static Lisp_Object Qunread_command_events, Qunread_command_event;
/* Previous command, represented by a Lisp object.
- Does not include prefix commands and arg setting commands */
+ Does not include prefix commands and arg setting commands. */
Lisp_Object Vlast_command;
+/* Contents of this-command-properties for the last command. */
+Lisp_Object Vlast_command_properties;
+
/* If a command sets this, the value goes into
- previous-command for the next command. */
+ last-command for the next command. */
Lisp_Object Vthis_command;
+/* If a command sets this, the value goes into
+ last-command-properties for the next command. */
+Lisp_Object Vthis_command_properties;
+
/* The value of point when the last command was executed. */
Bufpos last_point_position;
recent-keys. */
int inhibit_input_event_recording;
-/* prefix key(s) that must match in order to activate menu.
- This is ugly. fix me.
- */
-Lisp_Object Vmenu_accelerator_prefix;
-
-/* list of modifier keys to match accelerator for top level menus */
-Lisp_Object Vmenu_accelerator_modifiers;
-
-/* whether menu accelerators are enabled */
-Lisp_Object Vmenu_accelerator_enabled;
-
-/* keymap for auxiliary menu accelerator functions */
-Lisp_Object Vmenu_accelerator_map;
-
-Lisp_Object Qmenu_force;
-Lisp_Object Qmenu_fallback;
-Lisp_Object Qmenu_quit;
-Lisp_Object Qmenu_up;
-Lisp_Object Qmenu_down;
-Lisp_Object Qmenu_left;
-Lisp_Object Qmenu_right;
-Lisp_Object Qmenu_select;
-Lisp_Object Qmenu_escape;
-
Lisp_Object Qself_insert_defer_undo;
/* this is in keymap.c */
/* The callback routines for the window system or terminal driver */
struct event_stream *event_stream;
-/* This structure is what we use to encapsulate the state of a command sequence
- being composed; key events are executed by adding themselves to the command
- builder; if the command builder is then complete (does not still represent
- a prefix key sequence) it executes the corresponding command.
- */
-struct command_builder
-{
- struct lcrecord_header header;
- Lisp_Object console; /* back pointer to the console this command
- builder is for */
- /* Qnil, or a Lisp_Event representing the first event read
- * after the last command completed. Threaded. */
- /* #### NYI */
- Lisp_Object prefix_events;
- /* Qnil, or a Lisp_Event representing event in the current
- * keymap-lookup sequence. Subsequent events are threaded via
- * the event's next slot */
- Lisp_Object current_events;
- /* Last elt of above */
- Lisp_Object most_current_event;
- /* Last elt before function map code took over. What this means is:
- All prefixes up to (but not including) this event have non-nil
- bindings, but the prefix including this event has a nil binding.
- Any events in the chain after this one were read solely because
- we're part of a possible function key. If we end up with
- something that's not part of a possible function key, we have to
- unread all of those events. */
- Lisp_Object last_non_munged_event;
- /* One set of values for function-key-map, one for key-translation-map */
- struct munging_key_translation
- {
- /* First event that can begin a possible function key sequence
- (to be translated according to function-key-map). Normally
- this is the first event in the chain. However, once we've
- translated a sequence through function-key-map, this will point
- to the first event after the translated sequence: we don't ever
- want to translate any events twice through function-key-map, or
- things could get really screwed up (e.g. if the user created a
- translation loop). If this is nil, then the next-read event is
- the first that can begin a function key sequence. */
- Lisp_Object first_mungeable_event;
- } munge_me[2];
-
- Bufbyte *echo_buf;
- Bytecount echo_buf_length; /* size of echo_buf */
- Bytecount echo_buf_index; /* index into echo_buf
- * -1 before doing echoing for new cmd */
- /* Self-insert-command is magic in that it doesn't always push an undo-
- boundary: up to 20 consecutive self-inserts can happen before an undo-
- boundary is pushed. This variable is that counter.
- */
- int self_insert_countdown;
-};
-
static void echo_key_event (struct command_builder *, Lisp_Object event);
static void maybe_kbd_translate (Lisp_Object event);
return event_stream && event_stream->event_pending_p (user);
}
+static void
+event_stream_force_event_pending (struct frame* f)
+{
+ if (event_stream->force_event_pending)
+ event_stream->force_event_pending (f);
+}
+
static int
maybe_read_quit_event (Lisp_Event *event)
{
if (minibuf_level == 0
&& echo_keystrokes > 0.0
- && !lw_menu_active)
+#if defined (HAVE_X_WINDOWS) && defined (LWLIB_MENUBARS_LUCID)
+ && !x_kludge_lw_menu_active ()
+#endif
+ )
{
if (!no_snooze)
{
static void
print_timeout (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
{
- CONST Lisp_Timeout *t = XTIMEOUT (obj);
+ const Lisp_Timeout *t = XTIMEOUT (obj);
char buf[64];
sprintf (buf, "#<INTERNAL OBJECT (XEmacs bug?) (timeout) 0x%lx>",
XCOMMAND_BUILDER (con->command_builder);
int store_this_key = 0;
struct gcpro gcpro1;
-#ifdef LWLIB_MENUBARS_LUCID
- extern int in_menu_callback; /* defined in menubar-x.c */
-#endif /* LWLIB_MENUBARS_LUCID */
GCPRO1 (event);
/* DO NOT do QUIT anywhere within this function or the functions it calls.
return event;
}
+DEFUN ("dispatch-non-command-events", Fdispatch_non_command_events, 0, 0, 0, /*
+Dispatch any pending "magic" events.
+
+This function is useful for forcing the redisplay of native
+widgets. Normally these are redisplayed through a native window-system
+event encoded as magic event, rather than by the redisplay code. This
+function does not call redisplay or do any of the other things that
+`next-event' does.
+*/
+ ())
+{
+ /* This function can GC */
+ Lisp_Object event = Qnil;
+ struct gcpro gcpro1;
+ GCPRO1 (event);
+ event = Fmake_event (Qnil, Qnil);
+
+ /* Make sure that there will be something in the native event queue
+ so that externally managed things (e.g. widgets) get some CPU
+ time. */
+ event_stream_force_event_pending (selected_frame ());
+
+ while (event_stream_event_pending_p (0))
+ {
+ QUIT; /* next_event_internal() does not QUIT. */
+
+ /* We're a generator of the command_event_queue, so we can't be a
+ consumer as well. Also, we have no reason to consult the
+ command_event_queue; there are only user and eval-events there,
+ and we'd just have to put them back anyway.
+ */
+ next_event_internal (event, 0); /* blocks */
+ /* See the comment in accept-process-output about Vquit_flag */
+ if (XEVENT_TYPE (event) == magic_event ||
+ XEVENT_TYPE (event) == timeout_event ||
+ XEVENT_TYPE (event) == process_event ||
+ XEVENT_TYPE (event) == pointer_motion_event)
+ execute_internal_event (event);
+ else
+ {
+ enqueue_command_event_1 (event);
+ break;
+ }
+ }
+
+ Fdeallocate_event (event);
+ UNGCPRO;
+ return Qnil;
+}
+
static void
reset_current_events (struct command_builder *command_builder)
{
return event_binding (event0, 1);
}
-#if defined(HAVE_X_WINDOWS) && defined(LWLIB_MENUBARS_LUCID)
-static void
-menu_move_up (void)
-{
- widget_value *current = lw_get_entries (False);
- widget_value *entries = lw_get_entries (True);
- widget_value *prev = NULL;
-
- while (entries != current)
- {
- if (entries->name /*&& entries->enabled*/) prev = entries;
- entries = entries->next;
- assert (entries);
- }
-
- if (!prev)
- /* move to last item */
- {
- while (entries->next)
- {
- if (entries->name /*&& entries->enabled*/) prev = entries;
- entries = entries->next;
- }
- if (prev)
- {
- if (entries->name /*&& entries->enabled*/)
- prev = entries;
- }
- else
- {
- /* no selectable items in this menu, pop up to previous level */
- lw_pop_menu ();
- return;
- }
- }
- lw_set_item (prev);
-}
-
-static void
-menu_move_down (void)
-{
- widget_value *current = lw_get_entries (False);
- widget_value *new = current;
-
- while (new->next)
- {
- new = new->next;
- if (new->name /*&& new->enabled*/) break;
- }
-
- if (new==current||!(new->name/*||new->enabled*/))
- {
- new = lw_get_entries (True);
- while (new!=current)
- {
- if (new->name /*&& new->enabled*/) break;
- new = new->next;
- }
- if (new==current&&!(new->name /*|| new->enabled*/))
- {
- lw_pop_menu ();
- return;
- }
- }
-
- lw_set_item (new);
-}
-
-static void
-menu_move_left (void)
-{
- int level = lw_menu_level ();
- int l = level;
- widget_value *current;
-
- while (level-- >= 3)
- lw_pop_menu ();
-
- menu_move_up ();
- current = lw_get_entries (False);
- if (l > 2 && current->contents)
- lw_push_menu (current->contents);
-}
-
-static void
-menu_move_right (void)
-{
- int level = lw_menu_level ();
- int l = level;
- widget_value *current;
-
- while (level-- >= 3)
- lw_pop_menu ();
-
- menu_move_down ();
- current = lw_get_entries (False);
- if (l > 2 && current->contents)
- lw_push_menu (current->contents);
-}
-
-static void
-menu_select_item (widget_value *val)
-{
- if (val == NULL)
- val = lw_get_entries (False);
-
- /* is match a submenu? */
-
- if (val->contents)
- {
- /* enter the submenu */
-
- lw_set_item (val);
- lw_push_menu (val->contents);
- }
- else
- {
- /* Execute the menu entry by calling the menu's `select'
- callback function
- */
- lw_kill_menus (val);
- }
-}
-
-static Lisp_Object
-command_builder_operate_menu_accelerator (struct command_builder *builder)
-{
- /* this function can GC */
-
- struct console *con = XCONSOLE (Vselected_console);
- Lisp_Object evee = builder->most_current_event;
- Lisp_Object binding;
- widget_value *entries;
-
- extern int lw_menu_accelerate; /* lwlib.c */
-
-#if 0
- {
- int i;
- Lisp_Object t;
- char buf[50];
-
- t = builder->current_events;
- i = 0;
- while (!NILP (t))
- {
- i++;
- sprintf (buf,"OPERATE (%d): ",i);
- write_c_string (buf, Qexternal_debugging_output);
- print_internal (t, Qexternal_debugging_output, 1);
- write_c_string ("\n", Qexternal_debugging_output);
- t = XEVENT_NEXT (t);
- }
- }
-#endif /* 0 */
-
- /* menu accelerator keys don't go into keyboard macros */
- if (!NILP (con->defining_kbd_macro) && NILP (Vexecuting_macro))
- con->kbd_macro_ptr = con->kbd_macro_end;
-
- /* don't echo menu accelerator keys */
- /*reset_key_echo (builder, 1);*/
-
- if (!lw_menu_accelerate)
- {
- /* `convert' mouse display to keyboard display
- by entering the open submenu
- */
- entries = lw_get_entries (False);
- if (entries->contents)
- {
- lw_push_menu (entries->contents);
- lw_display_menu (CurrentTime);
- }
- }
-
- /* compare event to the current menu accelerators */
-
- entries=lw_get_entries (True);
-
- while (entries)
- {
- Lisp_Object accel;
- VOID_TO_LISP (accel, entries->accel);
- if (entries->name && !NILP (accel))
- {
- if (event_matches_key_specifier_p (XEVENT (evee), accel))
- {
- /* a match! */
-
- menu_select_item (entries);
-
- if (lw_menu_active) lw_display_menu (CurrentTime);
-
- reset_this_command_keys (Vselected_console, 1);
- /*reset_command_builder_event_chain (builder);*/
- return Vmenu_accelerator_map;
- }
- }
- entries = entries->next;
- }
-
- /* try to look up event in menu-accelerator-map */
-
- binding = event_binding_in (evee, Vmenu_accelerator_map, 1);
-
- if (NILP (binding))
- {
- /* beep at user for undefined key */
- return Qnil;
- }
- else
- {
- if (EQ (binding, Qmenu_quit))
- {
- /* turn off menus and set quit flag */
- lw_kill_menus (NULL);
- Vquit_flag = Qt;
- }
- else if (EQ (binding, Qmenu_up))
- {
- int level = lw_menu_level ();
- if (level > 2)
- menu_move_up ();
- }
- else if (EQ (binding, Qmenu_down))
- {
- int level = lw_menu_level ();
- if (level > 2)
- menu_move_down ();
- else
- menu_select_item (NULL);
- }
- else if (EQ (binding, Qmenu_left))
- {
- int level = lw_menu_level ();
- if (level > 3)
- {
- lw_pop_menu ();
- lw_display_menu (CurrentTime);
- }
- else
- menu_move_left ();
- }
- else if (EQ (binding, Qmenu_right))
- {
- int level = lw_menu_level ();
- if (level > 2 &&
- lw_get_entries (False)->contents)
- {
- widget_value *current = lw_get_entries (False);
- if (current->contents)
- menu_select_item (NULL);
- }
- else
- menu_move_right ();
- }
- else if (EQ (binding, Qmenu_select))
- menu_select_item (NULL);
- else if (EQ (binding, Qmenu_escape))
- {
- int level = lw_menu_level ();
-
- if (level > 2)
- {
- lw_pop_menu ();
- lw_display_menu (CurrentTime);
- }
- else
- {
- /* turn off menus quietly */
- lw_kill_menus (NULL);
- }
- }
- else if (KEYMAPP (binding))
- {
- /* prefix key */
- reset_this_command_keys (Vselected_console, 1);
- /*reset_command_builder_event_chain (builder);*/
- return binding;
- }
- else
- {
- /* turn off menus and execute binding */
- lw_kill_menus (NULL);
- reset_this_command_keys (Vselected_console, 1);
- /*reset_command_builder_event_chain (builder);*/
- return binding;
- }
- }
-
- if (lw_menu_active) lw_display_menu (CurrentTime);
-
- reset_this_command_keys (Vselected_console, 1);
- /*reset_command_builder_event_chain (builder);*/
-
- return Vmenu_accelerator_map;
-}
-
-static Lisp_Object
-menu_accelerator_junk_on_error (Lisp_Object errordata, Lisp_Object ignored)
-{
- Vmenu_accelerator_prefix = Qnil;
- Vmenu_accelerator_modifiers = Qnil;
- Vmenu_accelerator_enabled = Qnil;
- if (!NILP (errordata))
- {
- Lisp_Object args[2];
-
- args[0] = build_string ("Error in menu accelerators (setting to nil)");
- /* #### This should call
- (with-output-to-string (display-error errordata))
- but that stuff is all in Lisp currently. */
- args[1] = errordata;
- warn_when_safe_lispobj
- (Qerror, Qwarning,
- emacs_doprnt_string_lisp ((CONST Bufbyte *) "%s: %s",
- Qnil, -1, 2, args));
- }
-
- return Qnil;
-}
-
-static Lisp_Object
-menu_accelerator_safe_compare (Lisp_Object event0)
-{
- if (CONSP (Vmenu_accelerator_prefix))
- {
- Lisp_Object t;
- t=Vmenu_accelerator_prefix;
- while (!NILP (t)
- && !NILP (event0)
- && event_matches_key_specifier_p (XEVENT (event0), Fcar (t)))
- {
- t = Fcdr (t);
- event0 = XEVENT_NEXT (event0);
- }
- if (!NILP (t))
- return Qnil;
- }
- else if (NILP (event0))
- return Qnil;
- else if (event_matches_key_specifier_p (XEVENT (event0), Vmenu_accelerator_prefix))
- event0 = XEVENT_NEXT (event0);
- else
- return Qnil;
- return event0;
-}
-
-static Lisp_Object
-menu_accelerator_safe_mod_compare (Lisp_Object cons)
-{
- return (event_matches_key_specifier_p (XEVENT (XCAR (cons)), XCDR (cons))
- ? Qt
- : Qnil);
-}
-
-static Lisp_Object
-command_builder_find_menu_accelerator (struct command_builder *builder)
-{
- /* this function can GC */
- Lisp_Object event0 = builder->current_events;
- struct console *con = XCONSOLE (Vselected_console);
- struct frame *f = XFRAME (CONSOLE_SELECTED_FRAME (con));
- Widget menubar_widget;
-
- /* compare entries in event0 against the menu prefix */
-
- if ((!CONSOLE_X_P (XCONSOLE (builder->console))) || NILP (event0) ||
- XEVENT (event0)->event_type != key_press_event)
- return Qnil;
-
- if (!NILP (Vmenu_accelerator_prefix))
- {
- event0 = condition_case_1 (Qerror,
- menu_accelerator_safe_compare,
- event0,
- menu_accelerator_junk_on_error,
- Qnil);
- }
-
- if (NILP (event0))
- return Qnil;
-
- menubar_widget = FRAME_X_MENUBAR_WIDGET (f);
- if (menubar_widget
- && CONSP (Vmenu_accelerator_modifiers))
- {
- Lisp_Object fake;
- Lisp_Object last = Qnil;
- struct gcpro gcpro1;
- Lisp_Object matchp;
-
- widget_value *val;
- LWLIB_ID id = XPOPUP_DATA (f->menubar_data)->id;
-
- val = lw_get_all_values (id);
- if (val)
- {
- val = val->contents;
-
- fake = Fcopy_sequence (Vmenu_accelerator_modifiers);
- last = fake;
-
- while (!NILP (Fcdr (last)))
- last = Fcdr (last);
-
- Fsetcdr (last, Fcons (Qnil, Qnil));
- last = Fcdr (last);
- }
-
- fake = Fcons (Qnil, fake);
-
- GCPRO1 (fake);
-
- while (val)
- {
- Lisp_Object accel;
- VOID_TO_LISP (accel, val->accel);
- if (val->name && !NILP (accel))
- {
- Fsetcar (last, accel);
- Fsetcar (fake, event0);
- matchp = condition_case_1 (Qerror,
- menu_accelerator_safe_mod_compare,
- fake,
- menu_accelerator_junk_on_error,
- Qnil);
- if (!NILP (matchp))
- {
- /* we found one! */
-
- lw_set_menu (menubar_widget, val);
- /* yah - yet another hack.
- pretend emacs timestamp is the same as an X timestamp,
- which for the moment it is. (read events.h)
- */
- lw_map_menu (XEVENT (event0)->timestamp);
-
- if (val->contents)
- lw_push_menu (val->contents);
-
- lw_display_menu (CurrentTime);
-
- /* menu accelerator keys don't go into keyboard macros */
- if (!NILP (con->defining_kbd_macro) && NILP (Vexecuting_macro))
- con->kbd_macro_ptr = con->kbd_macro_end;
-
- /* don't echo menu accelerator keys */
- /*reset_key_echo (builder, 1);*/
- reset_this_command_keys (Vselected_console, 1);
- UNGCPRO;
-
- return Vmenu_accelerator_map;
- }
- }
-
- val = val->next;
- }
-
- UNGCPRO;
- }
- return Qnil;
-}
-
-
-DEFUN ("accelerate-menu", Faccelerate_menu, 0, 0, "_", /*
-Make the menubar active. Menu items can be selected using menu accelerators
-or by actions defined in menu-accelerator-map.
-*/
- ())
-{
- struct console *con = XCONSOLE (Vselected_console);
- struct frame *f = XFRAME (CONSOLE_SELECTED_FRAME (con));
- LWLIB_ID id;
- widget_value *val;
-
- if (NILP (f->menubar_data))
- error ("Frame has no menubar.");
-
- id = XPOPUP_DATA (f->menubar_data)->id;
- val = lw_get_all_values (id);
- val = val->contents;
- lw_set_menu (FRAME_X_MENUBAR_WIDGET (f), val);
- lw_map_menu (CurrentTime);
-
- lw_display_menu (CurrentTime);
-
- /* menu accelerator keys don't go into keyboard macros */
- if (!NILP (con->defining_kbd_macro) && NILP (Vexecuting_macro))
- con->kbd_macro_ptr = con->kbd_macro_end;
-
- return Qnil;
-}
-#endif /* HAVE_X_WINDOWS && HAVE_MENUBARS */
-
/* See if we can do function-key-map or key-translation-map translation
on the current events in the command builder. If so, do this, and
return the resulting binding, if any. */
return Qnil;
}
- /* if we're currently in a menu accelerator, check there for further events */
+ /* if we're currently in a menu accelerator, check there for further
+ events */
+ /* #### fuck me! who wrote this crap? think "abstraction", baby. */
#if defined(HAVE_X_WINDOWS) && defined(LWLIB_MENUBARS_LUCID)
- if (lw_menu_active)
+ if (x_kludge_lw_menu_active ())
{
return command_builder_operate_menu_accelerator (builder);
}
Lisp_Object terminal = builder->most_current_event;
struct key_data* key = & XEVENT (terminal)->event.key;
Emchar c = 0;
- if ((key->modifiers & MOD_SHIFT)
+ if ((key->modifiers & XEMACS_MOD_SHIFT)
|| (CHAR_OR_CHAR_INTP (key->keysym)
&& ((c = XCHAR_OR_CHAR_INT (key->keysym)), c >= 'A' && c <= 'Z')))
{
Lisp_Event terminal_copy = *XEVENT (terminal);
- if (key->modifiers & MOD_SHIFT)
- key->modifiers &= (~ MOD_SHIFT);
+ if (key->modifiers & XEMACS_MOD_SHIFT)
+ key->modifiers &= (~ XEMACS_MOD_SHIFT);
else
key->keysym = make_char (c + 'a' - 'A');
Fcopy_event (event, recent);
e = XEVENT (recent);
if (e->event_type == key_press_event)
- e->event.key.modifiers |= MOD_META;
+ e->event.key.modifiers |= XEMACS_MOD_META;
else if (e->event_type == button_press_event
|| e->event_type == button_release_event)
- e->event.button.modifiers |= MOD_META;
+ e->event.button.modifiers |= XEMACS_MOD_META;
else
abort ();
if (KEYMAPP (leaf))
{
- if (!lw_menu_active)
+#if defined (HAVE_X_WINDOWS) && defined (LWLIB_MENUBARS_LUCID)
+ if (!x_kludge_lw_menu_active ())
+#else
+ if (1)
+#endif
{
Lisp_Object prompt = Fkeymap_prompt (leaf, Qt);
if (STRINGP (prompt))
else
maybe_echo_keys (command_builder, 0);
}
- else if (!NILP (Vquit_flag)) {
- Lisp_Object quit_event = Fmake_event(Qnil, Qnil);
- Lisp_Event *e = XEVENT (quit_event);
- /* if quit happened during menu acceleration, pretend we read it */
- struct console *con = XCONSOLE (Fselected_console ());
- int ch = CONSOLE_QUIT_CHAR (con);
-
- character_to_event (ch, e, con, 1, 1);
- e->channel = make_console (con);
-
- enqueue_command_event (quit_event);
- Vquit_flag = Qnil;
- }
+ else if (!NILP (Vquit_flag))
+ {
+ Lisp_Object quit_event = Fmake_event (Qnil, Qnil);
+ Lisp_Event *e = XEVENT (quit_event);
+ /* if quit happened during menu acceleration, pretend we read it */
+ struct console *con = XCONSOLE (Fselected_console ());
+ int ch = CONSOLE_QUIT_CHAR (con);
+
+ character_to_event (ch, e, con, 1, 1);
+ e->channel = make_console (con);
+
+ enqueue_command_event (quit_event);
+ Vquit_flag = Qnil;
+ }
}
else if (!NILP (leaf))
{
{
/* Start a new command next time */
Vlast_command = Vthis_command;
+ Vlast_command_properties = Vthis_command_properties;
+ Vthis_command_properties = Qnil;
+
/* Emacs 18 doesn't unconditionally clear the echoed keystrokes,
so we don't either */
reset_this_command_keys (make_console (con), 0);
safe_run_hook_trapping_errors
("Error in `pre-command-hook' (setting hook to nil)",
Qpre_command_hook, 1);
+
+ /* This is a kludge, but necessary; see simple.el */
+ call0 (Qhandle_pre_motion_command);
}
/* Run the post command hook. */
Lisp_Object win = Fselected_window (Qnil);
-#if 0
/* If the last command deleted the frame, `win' might be nil.
It seems safest to do nothing in this case. */
+ /* Note: Someone added the following comment and put #if 0's around
+ this code, not realizing that doing this invites a crash in the
+ line after. */
/* #### This doesn't really fix the problem,
if delete-frame is called by some hook */
if (NILP (win))
return;
-#endif
+
+ /* This is a kludge, but necessary; see simple.el */
+ call0 (Qhandle_post_motion_command);
if (! zmacs_region_stays
&& (!MINI_WINDOW_P (XWINDOW (win))
("Error in `post-command-hook' (setting hook to nil)",
Qpost_command_hook, 1);
-#ifdef DEFERRED_ACTION_CRAP
+#if 0 /* FSF Emacs crap */
if (!NILP (Vdeferred_action_list))
call0 (Vdeferred_action_function);
-#endif
-#ifdef ILL_CONCEIVED_HOOK
if (NILP (Vunread_command_events)
&& NILP (Vexecuting_macro)
&& !NILP (Vpost_command_idle_hook)
safe_run_hook_trapping_errors
("Error in `post-command-idle-hook' (setting hook to nil)",
Qpost_command_idle_hook, 1);
-#endif
+#endif /* FSF Emacs crap */
-#if 0 /* FSFmacs */
+#if 0 /* FSF Emacs */
if (!NILP (current_buffer->mark_active))
{
if (!NILP (Vdeactivate_mark) && !NILP (Vtransient_mark_mode))
BUF_MODIFF (current_buffer) != prev_modiff)
run_hook (intern ("activate-mark-hook"));
}
-#endif /* FSFmacs */
+#endif /* FSF Emacs */
/* #### Kludge!!! This is necessary to make sure that things
are properly positioned even if post-command-hook moves point.
be done without an undo boundary. This counter is reset as
soon as a command other than self-insert-command is executed.
- Programmers can also use the `self-insert-undo-magic'
+ Programmers can also use the `self-insert-defer-undo'
property to install that behaviour on functions other
than `self-insert-command', or to change the magic
- number 20 to something else. */
+ number 20 to something else. #### DOCUMENT THIS! */
if (SYMBOLP (leaf))
{
void
syms_of_event_stream (void)
{
+ INIT_LRECORD_IMPLEMENTATION (command_builder);
+ INIT_LRECORD_IMPLEMENTATION (timeout);
+
defsymbol (&Qdisabled, "disabled");
defsymbol (&Qcommand_event_p, "command-event-p");
DEFSUBR (Fadd_async_timeout);
DEFSUBR (Fdisable_async_timeout);
DEFSUBR (Fdispatch_event);
+ DEFSUBR (Fdispatch_non_command_events);
DEFSUBR (Fread_key_sequence);
DEFSUBR (Fthis_command_keys);
DEFSUBR (Freset_this_command_lengths);
DEFSUBR (Fopen_dribble_file);
-#if defined(HAVE_X_WINDOWS) && defined(LWLIB_MENUBARS_LUCID)
- DEFSUBR (Faccelerate_menu);
-#endif
defsymbol (&Qpre_command_hook, "pre-command-hook");
defsymbol (&Qpost_command_hook, "post-command-hook");
defsymbol (&Qunread_command_events, "unread-command-events");
defsymbol (&Qunread_command_event, "unread-command-event");
defsymbol (&Qpre_idle_hook, "pre-idle-hook");
-#ifdef ILL_CONCEIVED_HOOK
+ defsymbol (&Qhandle_pre_motion_command, "handle-pre-motion-command");
+ defsymbol (&Qhandle_post_motion_command, "handle-post-motion-command");
+#if 0 /* FSF Emacs crap */
defsymbol (&Qpost_command_idle_hook, "post-command-idle-hook");
-#endif
-#ifdef DEFERRED_ACTION_CRAP
defsymbol (&Qdeferred_action_function, "deferred-action-function");
#endif
defsymbol (&Qretry_undefined_key_binding_unshifted,
defsymbol (&Qauto_show_make_point_visible,
"auto-show-make-point-visible");
- defsymbol (&Qmenu_force, "menu-force");
- defsymbol (&Qmenu_fallback, "menu-fallback");
-
- defsymbol (&Qmenu_quit, "menu-quit");
- defsymbol (&Qmenu_up, "menu-up");
- defsymbol (&Qmenu_down, "menu-down");
- defsymbol (&Qmenu_left, "menu-left");
- defsymbol (&Qmenu_right, "menu-right");
- 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");
}
*/ );
focus_follows_mouse = 0;
-#ifdef ILL_CONCEIVED_HOOK
+#if 0 /* FSF Emacs crap */
/* Ill-conceived because it's not run in all sorts of cases
where XEmacs is blocking. That's what `pre-idle-hook'
is designed to solve. */
This is measured in microseconds.
*/ );
post_command_idle_delay = 5000;
-#endif /* ILL_CONCEIVED_HOOK */
-#ifdef DEFERRED_ACTION_CRAP
/* Random FSFmacs crap. There is absolutely nothing to gain,
and a great deal to lose, in using this in place of just
setting `post-command-hook'. */
whenever `deferred-action-list' is non-nil.
*/ );
Vdeferred_action_function = Qnil;
-#endif /* DEFERRED_ACTION_CRAP */
+#endif /* FSF Emacs crap */
DEFVAR_LISP ("last-command-event", &Vlast_command_event /*
Last keyboard or mouse button event that was part of a command. This
*/ );
Vthis_command = Qnil;
+ DEFVAR_LISP ("last-command-properties", &Vlast_command_properties /*
+Value of `this-command-properties' for the last command.
+Used by commands to help synchronize consecutive commands, in preference
+to looking at `last-command' directly.
+*/ );
+ Vlast_command_properties = Qnil;
+
+ DEFVAR_LISP ("this-command-properties", &Vthis_command_properties /*
+Properties set by the current command.
+At the beginning of each command, the current value of this variable is
+copied to `last-command-properties', and then it is set to nil. Use `putf'
+to add properties to this variable. Commands should use this to communicate
+with pre/post-command hooks, subsequent commands, wrapping commands, etc.
+in preference to looking at and/or setting `this-command'.
+*/ );
+ Vthis_command_properties = Qnil;
+
DEFVAR_LISP ("help-char", &Vhelp_char /*
Character to recognize as meaning Help.
When it is read, do `(eval help-form)', and display result if it's a string.
Non-nil inhibits recording of input-events to recent-keys ring.
*/ );
inhibit_input_event_recording = 0;
-
- DEFVAR_LISP("menu-accelerator-prefix", &Vmenu_accelerator_prefix /*
-Prefix key(s) that must be typed before menu accelerators will be activated.
-Set this to a value acceptable by define-key.
-*/ );
- Vmenu_accelerator_prefix = Qnil;
-
- DEFVAR_LISP ("menu-accelerator-modifiers", &Vmenu_accelerator_modifiers /*
-Modifier keys which must be pressed to get to the top level menu accelerators.
-This is a list of modifier key symbols. All modifier keys must be held down
-while a valid menu accelerator key is pressed in order for the top level
-menu to become active.
-
-See also menu-accelerator-enabled and menu-accelerator-prefix.
-*/ );
- Vmenu_accelerator_modifiers = list1 (Qmeta);
-
- DEFVAR_LISP ("menu-accelerator-enabled", &Vmenu_accelerator_enabled /*
-Whether menu accelerator keys can cause the menubar to become active.
-If 'menu-force or 'menu-fallback, then menu accelerator keys can
-be used to activate the top level menu. Once the menubar becomes active, the
-accelerator keys can be used regardless of the value of this variable.
-
-menu-force is used to indicate that the menu accelerator key takes
-precedence over bindings in the current keymap(s). menu-fallback means
-that bindings in the current keymap take precedence over menu accelerator keys.
-Thus a top level menu with an accelerator of "T" would be activated on a
-keypress of Meta-t if menu-accelerator-enabled is menu-force.
-However, if menu-accelerator-enabled is menu-fallback, then
-Meta-t will not activate the menubar and will instead run the function
-transpose-words, to which it is normally bound.
-
-See also menu-accelerator-modifiers and menu-accelerator-prefix.
-*/ );
- Vmenu_accelerator_enabled = Qnil;
}
void
{
Vkeyboard_translate_table =
make_lisp_hash_table (100, HASH_TABLE_NON_WEAK, HASH_TABLE_EQ);
-
- DEFVAR_LISP ("menu-accelerator-map", &Vmenu_accelerator_map /*
-Keymap for use when the menubar is active.
-The actions menu-quit, menu-up, menu-down, menu-left, menu-right,
-menu-select and menu-escape can be mapped to keys in this map.
-
-menu-quit Immediately deactivate the menubar and any open submenus without
- selecting an item.
-menu-up Move the menu cursor up one row in the current menu. If the
- move extends past the top of the menu, wrap around to the bottom.
-menu-down Move the menu cursor down one row in the current menu. If the
- move extends past the bottom of the menu, wrap around to the top.
- If executed while the cursor is in the top level menu, move down
- into the selected menu.
-menu-left Move the cursor from a submenu into the parent menu. If executed
- while the cursor is in the top level menu, move the cursor to the
- left. If the move extends past the left edge of the menu, wrap
- around to the right edge.
-menu-right Move the cursor into a submenu. If the cursor is located in the
- top level menu or is not currently on a submenu heading, then move
- the cursor to the next top level menu entry. If the move extends
- past the right edge of the menu, wrap around to the left edge.
-menu-select Activate the item under the cursor. If the cursor is located on
- a submenu heading, then move the cursor into the submenu.
-menu-escape Pop up to the next level of menus. Moves from a submenu into its
- parent menu. From the top level menu, this deactivates the
- menubar.
-
-This keymap can also contain normal key-command bindings, in which case the
-menubar is deactivated and the corresponding command is executed.
-
-The action bindings used by the menu accelerator code are designed to mimic
-the actions of menu traversal keys in a commonly used PC operating system.
-*/ );
- Vmenu_accelerator_map = Fmake_keymap(Qnil);
}
void
tty_event_stream = xnew (struct event_stream);
tty_event_stream->event_pending_p = emacs_tty_event_pending_p;
+ tty_event_stream->force_event_pending = 0;
tty_event_stream->next_event_cb = emacs_tty_next_event;
tty_event_stream->handle_magic_event_cb = emacs_tty_handle_magic_event;
tty_event_stream->add_timeout_cb = emacs_tty_add_timeout;
{
/* Something went seriously wrong; don't abort since maybe
the TTY just died at the wrong time. */
- fprintf (stderr, "xemacs: select failed: errno = %d\n", errno);
+ stderr_out ("xemacs: select failed: errno = %d\n", errno);
return 0;
}
/* else, we got interrupted by a signal, so try again. */
/* The modifiers XEmacs knows about; these appear in key and button events. */
-#define MOD_CONTROL (1<<0)
-#define MOD_META (1<<1)
-#define MOD_SUPER (1<<2)
-#define MOD_HYPER (1<<3)
-#define MOD_ALT (1<<4)
-#define MOD_SHIFT (1<<5) /* not used for dual-case characters */
+#define XEMACS_MOD_CONTROL (1<<0)
+#define XEMACS_MOD_META (1<<1)
+#define XEMACS_MOD_SUPER (1<<2)
+#define XEMACS_MOD_HYPER (1<<3)
+#define XEMACS_MOD_ALT (1<<4)
+#define XEMACS_MOD_SHIFT (1<<5) /* not used for dual-case characters */
#include "keymap.h" /* for key_desc_list_to_event() */
#include "redisplay.h"
#include "window.h"
-
-#ifdef WINDOWSNT
-/* Hmm, under unix we want X modifiers, under NT we want X modifiers if
- we are running X and Windows modifiers otherwise.
- gak. This is a kludge until we support multiple native GUIs!
-*/
-#undef MOD_ALT
-#undef MOD_CONTROL
-#undef MOD_SHIFT
-#endif
-
#include "events-mod.h"
/* Where old events go when they are explicitly deallocated.
((int *) event) [i] = 0xdeadbeef;
event->event_type = dead_event;
event->channel = Qnil;
- set_lheader_implementation (&(event->lheader), &lrecord_event);
+ set_lheader_implementation (&event->lheader, &lrecord_event);
XSET_EVENT_NEXT (ev, Qnil);
}
zero_event (Lisp_Event *e)
{
xzero (*e);
- set_lheader_implementation (&(e->lheader), &lrecord_event);
+ set_lheader_implementation (&e->lheader, &lrecord_event);
e->event_type = empty_event;
e->next = Qnil;
e->channel = Qnil;
}
static void
-print_event_1 (CONST char *str, Lisp_Object obj, Lisp_Object printcharfun)
+print_event_1 (const char *str, Lisp_Object obj, Lisp_Object printcharfun)
{
char buf[255];
write_c_string (str, printcharfun);
EXTERNAL_LIST_LOOP_2 (sym, value)
{
- if (EQ (sym, Qcontrol)) modifiers |= MOD_CONTROL;
- else if (EQ (sym, Qmeta)) modifiers |= MOD_META;
- else if (EQ (sym, Qsuper)) modifiers |= MOD_SUPER;
- else if (EQ (sym, Qhyper)) modifiers |= MOD_HYPER;
- else if (EQ (sym, Qalt)) modifiers |= MOD_ALT;
- else if (EQ (sym, Qsymbol)) modifiers |= MOD_ALT;
- else if (EQ (sym, Qshift)) modifiers |= MOD_SHIFT;
+ if (EQ (sym, Qcontrol)) modifiers |= XEMACS_MOD_CONTROL;
+ else if (EQ (sym, Qmeta)) modifiers |= XEMACS_MOD_META;
+ else if (EQ (sym, Qsuper)) modifiers |= XEMACS_MOD_SUPER;
+ else if (EQ (sym, Qhyper)) modifiers |= XEMACS_MOD_HYPER;
+ else if (EQ (sym, Qalt)) modifiers |= XEMACS_MOD_ALT;
+ else if (EQ (sym, Qsymbol)) modifiers |= XEMACS_MOD_ALT;
+ else if (EQ (sym, Qshift)) modifiers |= XEMACS_MOD_SHIFT;
else
signal_simple_error ("Invalid key modifier", sym);
}
int use_console_meta_flag, int do_backspace_mapping)
{
Lisp_Object k = Qnil;
- unsigned int m = 0;
+ int m = 0;
if (event->event_type == dead_event)
error ("character-to-event called with a deallocated event!");
break;
case 1: /* top bit is meta */
c -= 128;
- m = MOD_META;
+ m = XEMACS_MOD_META;
break;
default: /* this is a real character */
break;
}
}
- if (c < ' ') c += '@', m |= MOD_CONTROL;
- if (m & MOD_CONTROL)
+ if (c < ' ') c += '@', m |= XEMACS_MOD_CONTROL;
+ if (m & XEMACS_MOD_CONTROL)
{
switch (c)
{
- case 'I': k = QKtab; m &= ~MOD_CONTROL; break;
- case 'J': k = QKlinefeed; m &= ~MOD_CONTROL; break;
- case 'M': k = QKreturn; m &= ~MOD_CONTROL; break;
- case '[': k = QKescape; m &= ~MOD_CONTROL; break;
+ case 'I': k = QKtab; m &= ~XEMACS_MOD_CONTROL; break;
+ case 'J': k = QKlinefeed; m &= ~XEMACS_MOD_CONTROL; break;
+ case 'M': k = QKreturn; m &= ~XEMACS_MOD_CONTROL; break;
+ case '[': k = QKescape; m &= ~XEMACS_MOD_CONTROL; break;
default:
#if defined(HAVE_TTY)
if (do_backspace_mapping &&
c - '@' == XCHAR (con->tty_erase_char))
{
k = QKbackspace;
- m &= ~MOD_CONTROL;
+ m &= ~XEMACS_MOD_CONTROL;
}
#endif /* defined(HAVE_TTY) && !defined(__CYGWIN32__) */
break;
return -1;
}
if (!allow_extra_modifiers &&
- event->event.key.modifiers & (MOD_SUPER|MOD_HYPER|MOD_ALT))
+ event->event.key.modifiers & (XEMACS_MOD_SUPER|XEMACS_MOD_HYPER|XEMACS_MOD_ALT))
return -1;
if (CHAR_OR_CHAR_INTP (event->event.key.keysym))
c = XCHAR_OR_CHAR_INT (event->event.key.keysym);
else
return -1;
- if (event->event.key.modifiers & MOD_CONTROL)
+ if (event->event.key.modifiers & XEMACS_MOD_CONTROL)
{
if (c >= 'a' && c <= 'z')
c -= ('a' - 'A');
if (! allow_extra_modifiers) return -1;
}
- if (event->event.key.modifiers & MOD_META)
+ if (event->event.key.modifiers & XEMACS_MOD_META)
{
if (! allow_meta) return -1;
if (c & 0200) return -1; /* don't allow M-oslash (overlap) */
key = event->event.key.keysym;
/* Hack. */
if (! brief && CHARP (key) &&
- mod & (MOD_CONTROL | MOD_META | MOD_SUPER | MOD_HYPER))
+ mod & (XEMACS_MOD_CONTROL | XEMACS_MOD_META | XEMACS_MOD_SUPER | XEMACS_MOD_HYPER))
{
int k = XCHAR (key);
if (k >= 'a' && k <= 'z')
key = make_char (k - ('a' - 'A'));
else if (k >= 'A' && k <= 'Z')
- mod |= MOD_SHIFT;
+ mod |= XEMACS_MOD_SHIFT;
}
break;
}
}
case magic_event:
{
- CONST char *name = NULL;
+ const char *name = NULL;
#ifdef HAVE_X_WINDOWS
{
}
#define modprint1(x) do { strcpy (buf, (x)); buf += sizeof (x)-1; } while (0)
#define modprint(x,y) do { if (brief) modprint1 (y); else modprint1 (x); } while (0)
- if (mod & MOD_CONTROL) modprint ("control-", "C-");
- if (mod & MOD_META) modprint ("meta-", "M-");
- if (mod & MOD_SUPER) modprint ("super-", "S-");
- if (mod & MOD_HYPER) modprint ("hyper-", "H-");
- if (mod & MOD_ALT) modprint ("alt-", "A-");
- if (mod & MOD_SHIFT) modprint ("shift-", "Sh-");
+ if (mod & XEMACS_MOD_CONTROL) modprint ("control-", "C-");
+ if (mod & XEMACS_MOD_META) modprint ("meta-", "M-");
+ if (mod & XEMACS_MOD_SUPER) modprint ("super-", "S-");
+ if (mod & XEMACS_MOD_HYPER) modprint ("hyper-", "H-");
+ if (mod & XEMACS_MOD_ALT) modprint ("alt-", "A-");
+ if (mod & XEMACS_MOD_SHIFT) modprint ("shift-", "Sh-");
if (mouse_p)
{
modprint1 ("button");
}
else if (SYMBOLP (key))
{
- CONST char *str = 0;
+ const char *str = 0;
if (brief)
{
if (EQ (key, QKlinefeed)) str = "LFD";
{
int mod = XINT (Fevent_modifier_bits (event));
Lisp_Object result = Qnil;
- if (mod & MOD_SHIFT) result = Fcons (Qshift, result);
- if (mod & MOD_ALT) result = Fcons (Qalt, result);
- if (mod & MOD_HYPER) result = Fcons (Qhyper, result);
- if (mod & MOD_SUPER) result = Fcons (Qsuper, result);
- if (mod & MOD_META) result = Fcons (Qmeta, result);
- if (mod & MOD_CONTROL) result = Fcons (Qcontrol, result);
+ if (mod & XEMACS_MOD_SHIFT) result = Fcons (Qshift, result);
+ if (mod & XEMACS_MOD_ALT) result = Fcons (Qalt, result);
+ if (mod & XEMACS_MOD_HYPER) result = Fcons (Qhyper, result);
+ if (mod & XEMACS_MOD_SUPER) result = Fcons (Qsuper, result);
+ if (mod & XEMACS_MOD_META) result = Fcons (Qmeta, result);
+ if (mod & XEMACS_MOD_CONTROL) result = Fcons (Qcontrol, result);
return result;
}
void
syms_of_events (void)
{
+ INIT_LRECORD_IMPLEMENTATION (event);
+
DEFSUBR (Fcharacter_to_event);
DEFSUBR (Fevent_to_character);
void (*select_process_cb) (Lisp_Process *);
void (*unselect_process_cb) (Lisp_Process *);
void (*quit_p_cb) (void);
+ void (*force_event_pending) (struct frame* f);
USID (*create_stream_pair_cb) (void* /* inhandle*/, void* /*outhandle*/ ,
Lisp_Object* /* instream */,
Lisp_Object* /* outstream */,
struct key_data
{
Lisp_Object keysym;
- unsigned char modifiers;
+ int modifiers;
};
struct button_data
{
int button;
- unsigned char modifiers;
+ int modifiers;
int x, y;
};
struct motion_data
{
int x, y;
- unsigned char modifiers;
+ int modifiers;
};
struct process_data
Lisp_Object function;
Lisp_Object object;
int button;
- unsigned char modifiers;
+ int modifiers;
int x, y;
};
extern Lisp_Object QKspace, QKtab, Qmouse_event_p, Vcharacter_set_property;
extern Lisp_Object Qcancel_mode_internal;
-/* Note: under X Windows, MOD_ALT is generated by the Alt key if there are
+/* Note: under X Windows, XEMACS_MOD_ALT is generated by the Alt key if there are
both Alt and Meta keys. If there are no Meta keys, then Alt generates
- MOD_META instead.
+ XEMACS_MOD_META instead.
*/
#ifdef emacs
#endif /* emacs */
+/* #### a hack, until accelerator shit is cleaned up */
+
+/* This structure is what we use to encapsulate the state of a command sequence
+ being composed; key events are executed by adding themselves to the command
+ builder; if the command builder is then complete (does not still represent
+ a prefix key sequence) it executes the corresponding command.
+ */
+struct command_builder
+{
+ struct lcrecord_header header;
+ Lisp_Object console; /* back pointer to the console this command
+ builder is for */
+ /* Qnil, or a Lisp_Event representing the first event read
+ * after the last command completed. Threaded. */
+ /* #### NYI */
+ Lisp_Object prefix_events;
+ /* Qnil, or a Lisp_Event representing event in the current
+ * keymap-lookup sequence. Subsequent events are threaded via
+ * the event's next slot */
+ Lisp_Object current_events;
+ /* Last elt of above */
+ Lisp_Object most_current_event;
+ /* Last elt before function map code took over. What this means is:
+ All prefixes up to (but not including) this event have non-nil
+ bindings, but the prefix including this event has a nil binding.
+ Any events in the chain after this one were read solely because
+ we're part of a possible function key. If we end up with
+ something that's not part of a possible function key, we have to
+ unread all of those events. */
+ Lisp_Object last_non_munged_event;
+ /* One set of values for function-key-map, one for key-translation-map */
+ struct munging_key_translation
+ {
+ /* First event that can begin a possible function key sequence
+ (to be translated according to function-key-map). Normally
+ this is the first event in the chain. However, once we've
+ translated a sequence through function-key-map, this will point
+ to the first event after the translated sequence: we don't ever
+ want to translate any events twice through function-key-map, or
+ things could get really screwed up (e.g. if the user created a
+ translation loop). If this is nil, then the next-read event is
+ the first that can begin a function key sequence. */
+ Lisp_Object first_mungeable_event;
+ } munge_me[2];
+
+ Bufbyte *echo_buf;
+ Bytecount echo_buf_length; /* size of echo_buf */
+ Bytecount echo_buf_index; /* index into echo_buf
+ * -1 before doing echoing for new cmd */
+ /* Self-insert-command is magic in that it doesn't always push an undo-
+ boundary: up to 20 consecutive self-inserts can happen before an undo-
+ boundary is pushed. This variable is that counter.
+ */
+ int self_insert_countdown;
+};
+
#endif /* INCLUDED_events_h_ */
#include "opaque.h"
#include "process.h"
#include "redisplay.h"
+#include "gutter.h"
/* ------------------------------- */
/* gap array */
/* FSFmacs bogosity */
Lisp_Object Vdefault_text_properties;
-
EXFUN (Fextent_properties, 1);
EXFUN (Fset_extent_property, 3);
+/* if true, we don't want to set any redisplay flags on modeline extent
+ changes */
+int in_modeline_generation;
+
\f
/************************************************************************/
/* Generalized gap array */
assert (EXTENT_LIVE_P (extent));
assert (!extent_detached_p (extent));
{
- Memind i = (endp) ? (extent_end (extent)) :
- (extent_start (extent));
+ Memind i = endp ? extent_end (extent) : extent_start (extent);
Lisp_Object obj = extent_object (extent);
return buffer_or_string_memind_to_bytind (obj, i);
}
assert (EXTENT_LIVE_P (extent));
assert (!extent_detached_p (extent));
{
- Memind i = (endp) ? (extent_end (extent)) :
- (extent_start (extent));
+ Memind i = endp ? extent_end (extent) : extent_start (extent);
Lisp_Object obj = extent_object (extent);
return buffer_or_string_memind_to_bufpos (obj, i);
}
object = extent_object (extent);
- if (!BUFFERP (object) || extent_detached_p (extent))
- /* #### Can changes to string extents affect redisplay?
- I will have to think about this. What about string glyphs?
- Things in the modeline? etc. */
- /* #### changes to string extents can certainly affect redisplay
- if the extent is in some generated-modeline-string: when
- we change an extent in generated-modeline-string, this changes
- its parent, which is in `modeline-format', so we should
- force the modeline to be updated. But how to determine whether
- a string is a `generated-modeline-string'? Looping through
- all buffers is not very efficient. Should we add all
- `generated-modeline-string' strings to a hash table?
- Maybe efficiency is not the greatest concern here and there's
- no big loss in looping over the buffers. */
+ if (extent_detached_p (extent))
return;
- {
- struct buffer *b;
- b = XBUFFER (object);
- BUF_FACECHANGE (b)++;
- MARK_EXTENTS_CHANGED;
- if (invisibility_change)
- MARK_CLIP_CHANGED;
- buffer_extent_signal_changed_region (b,
- extent_endpoint_bufpos (extent, 0),
- extent_endpoint_bufpos (extent, 1));
- }
+ else if (STRINGP (object))
+ {
+ /* #### Changes to string extents can affect redisplay if they are
+ in the modeline or in the gutters.
+
+ If the extent is in some generated-modeline-string: when we
+ change an extent in generated-modeline-string, this changes its
+ parent, which is in `modeline-format', so we should force the
+ modeline to be updated. But how to determine whether a string
+ is a `generated-modeline-string'? Looping through all buffers
+ is not very efficient. Should we add all
+ `generated-modeline-string' strings to a hash table? Maybe
+ efficiency is not the greatest concern here and there's no big
+ loss in looping over the buffers.
+
+ If the extent is in a gutter we mark the gutter as
+ changed. This means (a) we can update extents in the gutters
+ when we need it. (b) we don't have to update the gutters when
+ only extents attached to buffers have changed. */
+
+ if (!in_modeline_generation)
+ MARK_EXTENTS_CHANGED;
+ gutter_extent_signal_changed_region_maybe (object,
+ extent_endpoint_bufpos (extent, 0),
+ extent_endpoint_bufpos (extent, 1));
+ }
+ else if (BUFFERP (object))
+ {
+ struct buffer *b;
+ b = XBUFFER (object);
+ BUF_FACECHANGE (b)++;
+ MARK_EXTENTS_CHANGED;
+ if (invisibility_change)
+ MARK_CLIP_CHANGED;
+ buffer_extent_signal_changed_region (b,
+ extent_endpoint_bufpos (extent, 0),
+ extent_endpoint_bufpos (extent, 1));
+ }
}
/* A change to an extent occurred that might affect redisplay.
xfree (ef);
}
-/* Note: CONST is losing, but `const' is part of the interface of qsort() */
static int
extent_priority_sort_function (const void *humpty, const void *dumpty)
{
- CONST EXTENT foo = * (CONST EXTENT *) humpty;
- CONST EXTENT bar = * (CONST EXTENT *) dumpty;
+ const EXTENT foo = * (const EXTENT *) humpty;
+ const EXTENT bar = * (const EXTENT *) dumpty;
if (extent_priority (foo) < extent_priority (bar))
return -1;
return extent_priority (foo) > extent_priority (bar);
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);
-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,
- int escapeflag);
-static Lisp_Object extent_getprop (Lisp_Object obj, Lisp_Object prop);
-static int extent_putprop (Lisp_Object obj, Lisp_Object prop,
- Lisp_Object value);
-static int extent_remprop (Lisp_Object obj, Lisp_Object prop);
-static Lisp_Object extent_plist (Lisp_Object obj);
-
-static const struct lrecord_description extent_description[] = {
- { XD_LISP_OBJECT, offsetof (struct extent, object) },
- { XD_LISP_OBJECT, offsetof (struct extent, flags.face) },
- { XD_LISP_OBJECT, offsetof (struct extent, plist) },
- { XD_END }
-};
-
-DEFINE_BASIC_LRECORD_IMPLEMENTATION_WITH_PROPS ("extent", extent,
- mark_extent,
- print_extent,
- /* NOTE: If you declare a
- finalization method here,
- it will NOT be called.
- Shaft city. */
- 0,
- extent_equal, extent_hash,
- extent_description,
- extent_getprop, extent_putprop,
- extent_remprop, extent_plist,
- struct extent);
-
static Lisp_Object
mark_extent (Lisp_Object obj)
{
{
if (escapeflag)
{
- CONST char *title = "";
- CONST char *name = "";
- CONST char *posttitle = "";
+ const char *title = "";
+ const char *name = "";
+ const char *posttitle = "";
Lisp_Object obj2 = Qnil;
/* Destroyed extents have 't' in the object field, causing
internal_hash (extent_object (e), depth + 1));
}
+static const struct lrecord_description extent_description[] = {
+ { XD_LISP_OBJECT, offsetof (struct extent, object) },
+ { XD_LISP_OBJECT, offsetof (struct extent, flags.face) },
+ { XD_LISP_OBJECT, offsetof (struct extent, plist) },
+ { XD_END }
+};
+
static Lisp_Object
extent_getprop (Lisp_Object obj, Lisp_Object prop)
{
return Fextent_properties (obj);
}
+DEFINE_BASIC_LRECORD_IMPLEMENTATION_WITH_PROPS ("extent", extent,
+ mark_extent,
+ print_extent,
+ /* NOTE: If you declare a
+ finalization method here,
+ it will NOT be called.
+ Shaft city. */
+ 0,
+ extent_equal, extent_hash,
+ extent_description,
+ extent_getprop, extent_putprop,
+ extent_remprop, extent_plist,
+ struct extent);
+
\f
/************************************************************************/
/* basic extent accessors */
set_extent_glyph_1 (Lisp_Object extent_obj, Lisp_Object glyph, int endp,
Lisp_Object layout_obj)
{
- EXTENT extent = decode_extent (extent_obj, DE_MUST_HAVE_BUFFER);
+ EXTENT extent = decode_extent (extent_obj, 0);
glyph_layout layout = symbol_to_glyph_layout (layout_obj);
/* Make sure we've actually been given a valid glyph or it's nil
void
syms_of_extents (void)
{
+ INIT_LRECORD_IMPLEMENTATION (extent);
+ INIT_LRECORD_IMPLEMENTATION (extent_info);
+ INIT_LRECORD_IMPLEMENTATION (extent_auxiliary);
+
defsymbol (&Qextentp, "extentp");
defsymbol (&Qextent_live_p, "extent-live-p");
#define extent_no_chase_normal_field(e, field) ((e)->flags.field)
-INLINE struct extent_auxiliary *extent_aux_or_default (EXTENT e);
-INLINE struct extent_auxiliary *
+INLINE_HEADER struct extent_auxiliary *extent_aux_or_default (EXTENT e);
+INLINE_HEADER struct extent_auxiliary *
extent_aux_or_default (EXTENT e)
{
return e->flags.has_aux ?
#define extent_internal_p(e) extent_normal_field (e, internal)
#define extent_in_red_event_p(e) extent_normal_field (e, in_red_event)
-INLINE Lisp_Object * extent_no_chase_plist_addr (EXTENT e);
-INLINE Lisp_Object *
+INLINE_HEADER Lisp_Object * extent_no_chase_plist_addr (EXTENT e);
+INLINE_HEADER Lisp_Object *
extent_no_chase_plist_addr (EXTENT e)
{
return e->flags.has_aux ? &XCDR (e->plist) : &e->plist;
EXFUN (Fset_extent_parent, 2);
extern int inside_undo;
+extern int in_modeline_generation;
struct extent_fragment *extent_fragment_new (Lisp_Object buffer_or_string,
struct frame *frm);
/* extent_ancestor() chases all the parent links until there aren't any
more. extent_ancestor_1() does the same thing but it a function;
the following optimizes the most common case. */
-INLINE EXTENT extent_ancestor (EXTENT e);
-INLINE EXTENT
+INLINE_HEADER EXTENT extent_ancestor (EXTENT e);
+INLINE_HEADER EXTENT
extent_ancestor (EXTENT e)
{
return e->flags.has_parent ? extent_ancestor_1 (e) : e;
ERROR! This ought not be getting compiled if EXTERNAL_WIDGET is undefined
#endif
-void fatal (CONST char *fmt, ...);
+void fatal (const char *fmt, ...);
#else /* not emacs */
static void fatal (char *msg);
#endif
}
static int
-update_face_inheritance_mapper (CONST void *hash_key, void *hash_contents,
+update_face_inheritance_mapper (const void *hash_key, void *hash_contents,
void *face_inheritance_closure)
{
Lisp_Object key, contents;
void
syms_of_faces (void)
{
+ INIT_LRECORD_IMPLEMENTATION (face);
+
/* Qdefault, Qwidget, Qleft_margin, Qright_margin defined in general.c */
defsymbol (&Qmodeline, "modeline");
defsymbol (&Qgui_element, "gui-element");
(#### Perhaps we should remove the stuff from x-faces.el
and only depend on this stuff here? That should work.)
*/
- CONST char *fonts[] =
+ const char *fonts[] =
{
"-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*",
"-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*",
"-*-*-*-*-*-*-*-120-*-*-*-*-*-*",
"*"
};
- CONST char **fontptr;
+ const char **fontptr;
for (fontptr = fonts + countof(fonts) - 1; fontptr >= fonts; fontptr--)
inst_list = Fcons (Fcons (list1 (Qx), build_string (*fontptr)),
Vwidget_face = Fmake_face (Qwidget,
build_string ("widget face"),
Qnil);
+ set_specifier_fallback (Fget (Vwidget_face, Qfont, Qunbound),
+ Fget (Vgui_element_face, Qfont, Qunbound));
set_specifier_fallback (Fget (Vwidget_face, Qforeground, Qunbound),
Fget (Vgui_element_face, Qforeground, Qunbound));
set_specifier_fallback (Fget (Vwidget_face, Qbackground, Qunbound),
Fget (Vgui_element_face, Qbackground, Qunbound));
- set_specifier_fallback (Fget (Vwidget_face, Qbackground_pixmap, Qnil),
- Fget (Vgui_element_face, Qbackground_pixmap,
- Qunbound));
+ /* We don't want widgets to have a default background pixmap. */
Vleft_margin_face = Fmake_face (Qleft_margin,
build_string ("left margin face"),
corresponding single-face cachels.
Formerly we didn't bother to keep track of the faces used for
- merging. We do know because we need to do so because there is no
+ merging. We do now because we need to do so because there is no
other way to properly handle multiple charsets for Mule in the
presence of display tables short of always computing the values
for all charsets, which is very expensive. Instead, we use a
#ifdef MULE
struct detection_state;
static int detect_coding_sjis (struct detection_state *st,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned int n);
static void decode_coding_sjis (Lstream *decoding,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned_char_dynarr *dst,
unsigned int n);
static void encode_coding_sjis (Lstream *encoding,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned_char_dynarr *dst,
unsigned int n);
static int detect_coding_big5 (struct detection_state *st,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned int n);
static void decode_coding_big5 (Lstream *decoding,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n);
static void encode_coding_big5 (Lstream *encoding,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n);
static int detect_coding_ucs4 (struct detection_state *st,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned int n);
static void decode_coding_ucs4 (Lstream *decoding,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n);
static void encode_coding_ucs4 (Lstream *encoding,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n);
static int detect_coding_utf8 (struct detection_state *st,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned int n);
static void decode_coding_utf8 (Lstream *decoding,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n);
static void encode_coding_utf8 (Lstream *encoding,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n);
static int postprocess_iso2022_mask (int mask);
static void reset_iso2022 (Lisp_Object coding_system,
struct iso2022_decoder *iso);
static int detect_coding_iso2022 (struct detection_state *st,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned int n);
static void decode_coding_iso2022 (Lstream *decoding,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n);
static void encode_coding_iso2022 (Lstream *encoding,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n);
#endif /* MULE */
static void decode_coding_no_conversion (Lstream *decoding,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned_char_dynarr *dst,
unsigned int n);
static void encode_coding_no_conversion (Lstream *encoding,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned_char_dynarr *dst,
unsigned int n);
-static void mule_decode (Lstream *decoding, CONST unsigned char *src,
+static void mule_decode (Lstream *decoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n);
-static void mule_encode (Lstream *encoding, CONST unsigned char *src,
+static void mule_encode (Lstream *encoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n);
typedef struct codesys_prop codesys_prop;
return aliasee;
else
signal_simple_error ("Symbol is not a coding system alias", alias);
+ return Qnil; /* To keep the compiler happy */
}
static Lisp_Object
}
static eol_type_t
-detect_eol_type (struct detection_state *st, CONST unsigned char *src,
+detect_eol_type (struct detection_state *st, const unsigned char *src,
unsigned int n)
{
int c;
*/
static int
-detect_coding_type (struct detection_state *st, CONST Extbyte *src,
+detect_coding_type (struct detection_state *st, const Extbyte *src,
unsigned int n, int just_do_eol)
{
int c;
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);
+ 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 ssize_t
-decoding_writer (Lstream *stream, CONST unsigned char *data, size_t size)
+decoding_writer (Lstream *stream, const unsigned char *data, size_t size)
{
struct decoding_stream *str = DECODING_STREAM_DATA (stream);
ssize_t retval;
}
str->counter = 0;
#endif /* MULE */
+ if (CODING_SYSTEM_TYPE (str->codesys) == CODESYS_AUTODETECT
+ || CODING_SYSTEM_EOL_TYPE (str->codesys) == EOL_AUTODETECT)
+ {
+ xzero (str->decst);
+ str->decst.eol_type = EOL_AUTODETECT;
+ str->decst.mask = ~0;
+ }
str->flags = str->ch = 0;
}
static Lisp_Object
make_decoding_stream_1 (Lstream *stream, Lisp_Object codesys,
- CONST char *mode)
+ const char *mode)
{
Lstream *lstr = Lstream_new (lstream_decoding, mode);
struct decoding_stream *str = DECODING_STREAM_DATA (lstr);
be used for both reading and writing. */
static void
-mule_decode (Lstream *decoding, CONST unsigned char *src,
+mule_decode (Lstream *decoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n)
{
struct decoding_stream *str = DECODING_STREAM_DATA (decoding);
};
static ssize_t encoding_reader (Lstream *stream, unsigned char *data, size_t size);
-static ssize_t encoding_writer (Lstream *stream, CONST unsigned char *data,
+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 ssize_t
-encoding_writer (Lstream *stream, CONST unsigned char *data, size_t size)
+encoding_writer (Lstream *stream, const unsigned char *data, size_t size)
{
struct encoding_stream *str = ENCODING_STREAM_DATA (stream);
ssize_t retval;
static Lisp_Object
make_encoding_stream_1 (Lstream *stream, Lisp_Object codesys,
- CONST char *mode)
+ const char *mode)
{
Lstream *lstr = Lstream_new (lstream_encoding, mode);
struct encoding_stream *str = ENCODING_STREAM_DATA (lstr);
Store the encoded data into DST. */
static void
-mule_encode (Lstream *encoding, CONST unsigned char *src,
+mule_encode (Lstream *encoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n)
{
struct encoding_stream *str = ENCODING_STREAM_DATA (encoding);
((c) >= 0xA1 && (c) <= 0xDF)
static int
-detect_coding_sjis (struct detection_state *st, CONST unsigned char *src,
+detect_coding_sjis (struct detection_state *st, const unsigned char *src,
unsigned int n)
{
int c;
/* Convert Shift-JIS data to internal format. */
static void
-decode_coding_sjis (Lstream *decoding, CONST unsigned char *src,
+decode_coding_sjis (Lstream *decoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n)
{
unsigned char c;
/* Convert internally-formatted data to Shift-JIS. */
static void
-encode_coding_sjis (Lstream *encoding, CONST unsigned char *src,
+encode_coding_sjis (Lstream *encoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n)
{
unsigned char c;
} while (0)
static int
-detect_coding_big5 (struct detection_state *st, CONST unsigned char *src,
+detect_coding_big5 (struct detection_state *st, const unsigned char *src,
unsigned int n)
{
int c;
/* Convert Big5 data to internal format. */
static void
-decode_coding_big5 (Lstream *decoding, CONST unsigned char *src,
+decode_coding_big5 (Lstream *decoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n)
{
unsigned char c;
/* Convert internally-formatted data to Big5. */
static void
-encode_coding_big5 (Lstream *encoding, CONST unsigned char *src,
+encode_coding_big5 (Lstream *encoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n)
{
#ifndef UTF2000
#endif
static int
-detect_coding_ucs4 (struct detection_state *st, CONST unsigned char *src,
+detect_coding_ucs4 (struct detection_state *st, const unsigned char *src,
unsigned int n)
{
while (n--)
}
static void
-decode_coding_ucs4 (Lstream *decoding, CONST unsigned char *src,
+decode_coding_ucs4 (Lstream *decoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n)
{
struct decoding_stream *str = DECODING_STREAM_DATA (decoding);
}
static void
-encode_coding_ucs4 (Lstream *encoding, CONST unsigned char *src,
+encode_coding_ucs4 (Lstream *encoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n)
{
#ifndef UTF2000
/* flags for handling composite chars. We do a little switcharoo
on the source while we're outputting the composite char. */
unsigned int saved_n = 0;
- CONST unsigned char *saved_src = NULL;
+ const unsigned char *saved_src = NULL;
int in_composite = 0;
back_to_square_n:
/************************************************************************/
static int
-detect_coding_utf8 (struct detection_state *st, CONST unsigned char *src,
+detect_coding_utf8 (struct detection_state *st, const unsigned char *src,
unsigned int n)
{
while (n--)
}
static void
-decode_coding_utf8 (Lstream *decoding, CONST unsigned char *src,
+decode_coding_utf8 (Lstream *decoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n)
{
struct decoding_stream *str = DECODING_STREAM_DATA (decoding);
#endif
static void
-encode_coding_utf8 (Lstream *encoding, CONST unsigned char *src,
+encode_coding_utf8 (Lstream *encoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n)
{
struct encoding_stream *str = ENCODING_STREAM_DATA (encoding);
/* flags for handling composite chars. We do a little switcharoo
on the source while we're outputting the composite char. */
unsigned int saved_n = 0;
- CONST unsigned char *saved_src = NULL;
+ const unsigned char *saved_src = NULL;
int in_composite = 0;
back_to_square_n:
}
static int
-detect_coding_iso2022 (struct detection_state *st, CONST unsigned char *src,
+detect_coding_iso2022 (struct detection_state *st, const unsigned char *src,
unsigned int n)
{
int mask;
/* Convert ISO2022-format data to internal format. */
static void
-decode_coding_iso2022 (Lstream *decoding, CONST unsigned char *src,
+decode_coding_iso2022 (Lstream *decoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n)
{
struct decoding_stream *str = DECODING_STREAM_DATA (decoding);
iso2022_designate (Lisp_Object charset, unsigned char reg,
struct encoding_stream *str, unsigned_char_dynarr *dst)
{
- static CONST char inter94[] = "()*+";
- static CONST char inter96[] = ",-./";
+ static const char inter94[] = "()*+";
+ static const char inter96[] = ",-./";
unsigned int type;
unsigned char final;
Lisp_Object old_charset = str->iso2022.charset[reg];
/* Convert internally-formatted data to ISO2022 format. */
static void
-encode_coding_iso2022 (Lstream *encoding, CONST unsigned char *src,
+encode_coding_iso2022 (Lstream *encoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n)
{
unsigned char charmask, c;
/* flags for handling composite chars. We do a little switcharoo
on the source while we're outputting the composite char. */
unsigned int saved_n = 0;
- CONST unsigned char *saved_src = NULL;
+ const unsigned char *saved_src = NULL;
int in_composite = 0;
#endif /* ENABLE_COMPOSITE_CHARS */
contain all 256 possible byte values and that are not to be
interpreted as being in any particular decoding. */
static void
-decode_coding_no_conversion (Lstream *decoding, CONST unsigned char *src,
+decode_coding_no_conversion (Lstream *decoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n)
{
unsigned char c;
}
static void
-encode_coding_no_conversion (Lstream *encoding, CONST unsigned char *src,
+encode_coding_no_conversion (Lstream *encoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n)
{
unsigned char c;
void
syms_of_file_coding (void)
{
+ INIT_LRECORD_IMPLEMENTATION (coding_system);
+
deferror (&Qcoding_system_error, "coding-system-error",
"Coding-system error", Qio_error);
/* signal a file error when errno contains a meaningful value. */
DOESNT_RETURN
-report_file_error (CONST char *string, Lisp_Object data)
+report_file_error (const char *string, Lisp_Object data)
{
/* #### dmoore - This uses current_buffer, better make sure no one
has GC'd the current buffer. File handlers are giving me a headache
}
void
-maybe_report_file_error (CONST char *string, Lisp_Object data,
+maybe_report_file_error (const char *string, Lisp_Object data,
Lisp_Object class, Error_behavior errb)
{
/* Optimization: */
/* signal a file error when errno does not contain a meaningful value. */
DOESNT_RETURN
-signal_file_error (CONST char *string, Lisp_Object data)
+signal_file_error (const char *string, Lisp_Object data)
{
signal_error (Qfile_error,
list2 (build_translated_string (string), data));
}
void
-maybe_signal_file_error (CONST char *string, Lisp_Object data,
+maybe_signal_file_error (const char *string, Lisp_Object data,
Lisp_Object class, Error_behavior errb)
{
/* Optimization: */
}
DOESNT_RETURN
-signal_double_file_error (CONST char *string1, CONST char *string2,
+signal_double_file_error (const char *string1, const char *string2,
Lisp_Object data)
{
signal_error (Qfile_error,
}
void
-maybe_signal_double_file_error (CONST char *string1, CONST char *string2,
+maybe_signal_double_file_error (const char *string1, const char *string2,
Lisp_Object data, Lisp_Object class,
Error_behavior errb)
{
}
DOESNT_RETURN
-signal_double_file_error_2 (CONST char *string1, CONST char *string2,
+signal_double_file_error_2 (const char *string1, const char *string2,
Lisp_Object data1, Lisp_Object data2)
{
signal_error (Qfile_error,
}
void
-maybe_signal_double_file_error_2 (CONST char *string1, CONST char *string2,
+maybe_signal_double_file_error_2 (const char *string1, const char *string2,
Lisp_Object data1, Lisp_Object data2,
Lisp_Object class, Error_behavior errb)
{
}
ssize_t
-write_allowing_quit (int fildes, CONST void *buf, size_t size)
+write_allowing_quit (int fildes, const void *buf, size_t size)
{
QUIT;
return sys_write_1 (fildes, buf, size, 1);
if (p == beg + 2 && beg[1] == ':')
{
/* MAXPATHLEN+1 is guaranteed to be enough space for getdefdir. */
- Bufbyte *res = alloca (MAXPATHLEN + 1);
- if (getdefdir (toupper (*beg) - 'A' + 1, res))
+ Bufbyte *res = (Bufbyte*) alloca (MAXPATHLEN + 1);
+ if (getdefdir (toupper (*beg) - 'A' + 1, (char *)res))
{
char *c=((char *) res) + strlen ((char *) res);
if (!IS_DIRECTORY_SEP (*c))
*/
static int
-directory_file_name (CONST char *src, char *dst)
+directory_file_name (const char *src, char *dst)
{
long slen = strlen (src);
/* Process as Unix format: just remove any final slash.
This implementation is better than what one usually finds in libc.
--hniksic */
+static unsigned int temp_name_rand;
+
DEFUN ("make-temp-name", Fmake_temp_name, 1, 1, 0, /*
-Generate temporary file name starting with PREFIX.
+Generate 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 process.
*/
(prefix))
{
- static char tbl[64] = {
+ static const char tbl[64] =
+ {
'A','B','C','D','E','F','G','H',
'I','J','K','L','M','N','O','P',
'Q','R','S','T','U','V','W','X',
'g','h','i','j','k','l','m','n',
'o','p','q','r','s','t','u','v',
'w','x','y','z','0','1','2','3',
- '4','5','6','7','8','9','-','_' };
- static unsigned count, count_initialized_p;
+ '4','5','6','7','8','9','-','_'
+ };
Lisp_Object val;
Bytecount len;
Bufbyte *p, *data;
- unsigned pid;
CHECK_STRING (prefix);
/* VAL is created by adding 6 characters to PREFIX. The first three
are the PID of this process, in base 64, and the second three are
- incremented if the file already exists. This ensures 262144
- unique file names per PID per PREFIX. */
+ a pseudo-random number seeded from process startup time. This
+ ensures 262144 unique file names per PID per PREFIX per machine. */
- pid = (unsigned)getpid ();
- *p++ = tbl[pid & 63], pid >>= 6;
- *p++ = tbl[pid & 63], pid >>= 6;
- *p++ = tbl[pid & 63], pid >>= 6;
+ {
+ unsigned int pid = (unsigned int) getpid ();
+ *p++ = tbl[(pid >> 0) & 63];
+ *p++ = tbl[(pid >> 6) & 63];
+ *p++ = tbl[(pid >> 12) & 63];
+ }
/* Here we try to minimize useless stat'ing when this function is
invoked many times successively with the same PREFIX. We achieve
- this by initializing count to a random value, and incrementing it
- afterwards. */
- if (!count_initialized_p)
- {
- count = (unsigned)time (NULL);
- /* Dumping temacs with a non-zero count_initialized_p wouldn't
- make much sense. */
- if (NILP (Frunning_temacs_p ()))
- count_initialized_p = 1;
- }
+ this by using a very pseudo-random number generator to generate
+ file names unique to this process, with a very long cycle. */
while (1)
{
struct stat ignored;
- unsigned num = count;
- p[0] = tbl[num & 63], num >>= 6;
- p[1] = tbl[num & 63], num >>= 6;
- p[2] = tbl[num & 63], num >>= 6;
+ p[0] = tbl[(temp_name_rand >> 0) & 63];
+ p[1] = tbl[(temp_name_rand >> 6) & 63];
+ p[2] = tbl[(temp_name_rand >> 12) & 63];
/* Poor man's congruential RN generator. Replace with ++count
for debugging. */
- count += 25229;
- count %= 225307;
+ temp_name_rand += 25229;
+ temp_name_rand %= 225307;
QUIT;
- if (stat ((CONST char *) data, &ignored) < 0)
+ if (stat ((const char *) data, &ignored) < 0)
{
/* We want to return only if errno is ENOENT. */
if (errno == ENOENT)
#ifdef WINDOWSNT
/* We will force directory separators to be either all \ or /, so make
a local copy to modify, even if there ends up being no change. */
- nm = strcpy (alloca (strlen (nm) + 1), nm);
+ nm = strcpy ((char *)alloca (strlen ((char *)nm) + 1), (char *)nm);
/* Find and remove drive specifier if present; this makes nm absolute
even if the rest of the name appears to be relative. */
{
- Bufbyte *colon = strrchr (nm, ':');
+ Bufbyte *colon = (Bufbyte *) strrchr ((char *)nm, ':');
if (colon)
/* Only recognize colon as part of drive specifier if there is a
return make_string (target, o - target);
}
-#if 0 /* FSFmacs */
-/* another older version of expand-file-name; */
-#endif
-
DEFUN ("file-truename", Ffile_truename, 1, 2, 0, /*
Return the canonical name of the given FILE.
Second arg DEFAULT is directory to start with if FILE is relative
*/
(filename, default_))
{
- /* This function can GC. GC checked 1997.04.06. */
+ /* This function can GC. */
Lisp_Object expanded_name;
- Lisp_Object handler;
struct gcpro gcpro1;
CHECK_STRING (filename);
expanded_name = Fexpand_file_name (filename, default_);
+ GCPRO1 (expanded_name);
+
if (!STRINGP (expanded_name))
return Qnil;
- GCPRO1 (expanded_name);
- handler = Ffind_file_name_handler (expanded_name, Qfile_truename);
- UNGCPRO;
+ {
+ Lisp_Object handler =
+ Ffind_file_name_handler (expanded_name, Qfile_truename);
- if (!NILP (handler))
- return call2_check_string (handler, Qfile_truename, expanded_name);
+ if (!NILP (handler))
+ RETURN_UNGCPRO
+ (call2_check_string (handler, Qfile_truename, expanded_name));
+ }
{
char resolved_path[MAXPATHLEN];
p = path;
if (elen > MAXPATHLEN)
goto toolong;
-
+
/* Try doing it all at once. */
/* !! Does realpath() Mule-encapsulate?
Answer: Nope! So we do it above */
It claims to return a useful value in the "error" case, but since
there is no indication provided of how far along the pathname
the function went before erring, there is no way to use the
- partial result returned. What a piece of junk. */
+ partial result returned. What a piece of junk.
+
+ The above comment refers to historical versions of
+ realpath(). The Unix98 specs state:
+
+ "On successful completion, realpath() returns a
+ pointer to the resolved name. Otherwise, realpath()
+ returns a null pointer and sets errno to indicate the
+ error, and the contents of the buffer pointed to by
+ resolved_name are undefined."
+
+ Since we depend on undocumented semantics of various system realpath()s,
+ we just use our own version in realpath.c. */
for (;;)
{
p = (Extbyte *) memchr (p + 1, '/', elen - (p + 1 - path));
if (p)
*p = 0;
- /* memset (resolved_path, 0, sizeof (resolved_path)); */
if (xrealpath ((char *) path, resolved_path))
{
if (p)
/* "On failure, it returns NULL, sets errno to indicate
the error, and places in resolved_path the absolute pathname
of the path component which could not be resolved." */
- if (p)
+
+ if (p)
{
int plen = elen - (p - path);
}
{
+ Lisp_Object resolved_name;
int rlen = strlen (resolved_path);
if (elen > 0 && XSTRING_BYTE (expanded_name, elen - 1) == '/'
&& !(rlen > 0 && resolved_path[rlen - 1] == '/'))
{
if (rlen + 1 > countof (resolved_path))
goto toolong;
- resolved_path[rlen] = '/';
- resolved_path[rlen + 1] = 0;
- rlen = rlen + 1;
+ resolved_path[rlen++] = '/';
+ resolved_path[rlen] = '\0';
}
- return make_ext_string ((Bufbyte *) resolved_path, rlen, Qbinary);
+ TO_INTERNAL_FORMAT (DATA, (resolved_path, rlen),
+ LISP_STRING, resolved_name,
+ Qfile_name);
+ RETURN_UNGCPRO (resolved_name);
}
toolong:
lose:
report_file_error ("Finding truename", list1 (expanded_name));
}
- return Qnil; /* suppress compiler warning */
+ RETURN_UNGCPRO (Qnil);
}
\f
If the file does not exist, STATPTR->st_mode is set to 0. */
static void
-barf_or_query_if_file_exists (Lisp_Object absname, CONST char *querystring,
+barf_or_query_if_file_exists (Lisp_Object absname, const char *querystring,
int interactive, struct stat *statptr)
{
/* This function can GC. GC checked 1997.04.06. */
struct gcpro gcpro1;
prompt = emacs_doprnt_string_c
- ((CONST Bufbyte *) GETTEXT ("File %s already exists; %s anyway? "),
+ ((const Bufbyte *) GETTEXT ("File %s already exists; %s anyway? "),
Qnil, -1, XSTRING_DATA (absname),
GETTEXT (querystring));
|| INTP (ok_if_already_exists))
barf_or_query_if_file_exists (newname, "copy to it",
INTP (ok_if_already_exists), &out_st);
- else if (stat ((CONST char *) XSTRING_DATA (newname), &out_st) < 0)
+ else if (stat ((const char *) XSTRING_DATA (newname), &out_st) < 0)
out_st.st_mode = 0;
ifd = interruptible_open ((char *) XSTRING_DATA (filename), O_RDONLY | OPEN_BINARY, 0);
mtime))
report_file_error ("I/O error", list1 (newname));
}
- chmod ((CONST char *) XSTRING_DATA (newname),
+ chmod ((const char *) XSTRING_DATA (newname),
st.st_mode & 07777);
}
{
return Fsignal (Qfile_error,
list3 (build_translated_string ("Creating directory"),
- build_translated_string ("pathame too long"),
+ build_translated_string ("pathname too long"),
dirname_));
}
strncpy (dir, (char *) XSTRING_DATA (dirname_),
}
DEFUN ("delete-file", Fdelete_file, 1, 1, "fDelete file: ", /*
-Delete specified file. One argument, a file name string.
-If file has multiple names, it continues to exist with the other names.
+Delete the file named FILENAME (a string).
+If FILENAME has multiple names, it continues to exist with the other names.
*/
(filename))
{
return Qnil;
}
-#ifdef S_IFLNK
DEFUN ("make-symbolic-link", Fmake_symbolic_link, 2, 3,
"FMake symbolic link to file: \nFMake symbolic link to file %s: \np", /*
Make a symbolic link to FILENAME, named LINKNAME. Both args strings.
(filename, linkname, ok_if_already_exists))
{
/* This function can GC. GC checked 1997.06.04. */
+ /* XEmacs change: run handlers even if local machine doesn't have symlinks */
Lisp_Object handler;
struct gcpro gcpro1, gcpro2;
RETURN_UNGCPRO (call4 (handler, Qmake_symbolic_link, filename,
linkname, ok_if_already_exists));
+#ifdef S_IFLNK
if (NILP (ok_if_already_exists)
|| INTP (ok_if_already_exists))
barf_or_query_if_file_exists (linkname, "make it a link",
report_file_error ("Making symbolic link",
list2 (filename, linkname));
}
+#endif /* S_IFLNK */
+
UNGCPRO;
return Qnil;
}
-#endif /* S_IFLNK */
#ifdef HPUX_NET
/* Return nonzero if file FILENAME exists and can be written. */
static int
-check_writable (CONST char *filename)
+check_writable (const char *filename)
{
#ifdef HAVE_EACCESS
return (eaccess (filename, 2) >= 0);
(filename))
{
/* This function can GC. GC checked 1997.04.10. */
+ /* XEmacs change: run handlers even if local machine doesn't have symlinks */
#ifdef S_IFLNK
char *buf;
int bufsize;
int valsize;
Lisp_Object val;
+#endif
Lisp_Object handler;
struct gcpro gcpro1;
if (!NILP (handler))
return call2 (handler, Qfile_symlink_p, filename);
+#ifdef S_IFLNK
bufsize = 100;
while (1)
{
if (desc < 0)
{
desc = open ((char *) XSTRING_DATA (fn),
- (O_WRONLY | O_TRUNC | O_CREAT | OPEN_BINARY),
- ((auto_saving) ? auto_save_mode_bits : CREAT_MODE));
+ O_WRONLY | O_TRUNC | O_CREAT | OPEN_BINARY,
+ auto_saving ? auto_save_mode_bits : CREAT_MODE);
}
if (desc < 0)
set_buffer_internal (b);
if (!auto_saved && NILP (no_message))
{
- static CONST unsigned char *msg
- = (CONST unsigned char *) "Auto-saving...";
+ static const unsigned char *msg
+ = (const unsigned char *) "Auto-saving...";
echo_area_message (selected_frame (), msg, Qnil,
- 0, strlen ((CONST char *) msg),
+ 0, strlen ((const char *) msg),
Qauto_saving);
}
auto save name. */
if (listdesc >= 0)
{
- CONST Extbyte *auto_save_file_name_ext;
+ const Extbyte *auto_save_file_name_ext;
Extcount auto_save_file_name_ext_len;
TO_EXTERNAL_FORMAT (LISP_STRING, b->auto_save_file_name,
Qfile_name);
if (!NILP (b->filename))
{
- CONST Extbyte *filename_ext;
+ const Extbyte *filename_ext;
Extcount filename_ext_len;
TO_EXTERNAL_FORMAT (LISP_STRING, b->filename,
if (auto_saved && NILP (no_message)
&& NILP (clear_echo_area (selected_frame (), Qauto_saving, 0)))
{
- static CONST unsigned char *msg
- = (CONST unsigned char *)"Auto-saving...done";
+ static const unsigned char *msg
+ = (const unsigned char *)"Auto-saving...done";
echo_area_message (selected_frame (), msg, Qnil, 0,
- strlen ((CONST char *) msg), Qauto_saving);
+ strlen ((const char *) msg), Qauto_saving);
}
Vquit_flag = oquit;
DEFSUBR (Fdelete_file);
DEFSUBR (Frename_file);
DEFSUBR (Fadd_name_to_file);
-#ifdef S_IFLNK
DEFSUBR (Fmake_symbolic_link);
-#endif /* S_IFLNK */
#ifdef HPUX_NET
DEFSUBR (Fsysnetunam);
#endif /* HPUX_NET */
#ifdef WINDOWSNT
Vdirectory_sep_char = make_char ('\\');
#else
- Vdirectory_sep_char = make_char ('/');
+ Vdirectory_sep_char = make_char ('/');
#endif
+
+ reinit_vars_of_fileio ();
+}
+
+void
+reinit_vars_of_fileio (void)
+{
+ /* We want temp_name_rand to be initialized to a value likely to be
+ unique to the process, not to the executable. The danger is that
+ two different XEmacs processes using the same binary on different
+ machines creating temp files in the same directory will be
+ unlucky enough to have the same pid. If we randomize using
+ process startup time, then in practice they will be unlikely to
+ collide. We use the microseconds field so that scripts that start
+ simultaneous XEmacs processes on multiple machines will have less
+ chance of collision. */
+ {
+ EMACS_TIME thyme;
+
+ EMACS_GET_TIME (thyme);
+ temp_name_rand = (unsigned int) (EMACS_SECS (thyme) ^ EMACS_USECS (thyme));
+ }
}
Lisp_Object Qask_user_about_lock;
#ifdef CLASH_DETECTION
-
+
/* The strategy: to lock a file FN, create a symlink .#FN in FN's
directory, with link data `user@host.pid'. This avoids a single
mount (== failure) point for lock files.
When the host in the lock data is the current host, we can check if
the pid is valid with kill.
-
+
Otherwise, we could look at a separate file that maps hostnames to
reboot times to see if the remote pid can possibly be valid, since we
don't want Emacs to have to communicate via pipes or sockets or
Similarly, we don't worry about a possible 14-character limit on
file names, because those are all the same systems that don't have
symlinks.
-
+
This is compatible with the locking scheme used by Interleaf (which
has contributed this implementation for Emacs), and was designed by
Ethan Jacobson, Kimbo Mundy, and others.
-
+
--karl@cs.umb.edu/karl@hq.ileaf.com. */
+/* Note that muleization is provided by using mule-encapsulated
+ versions of the system calls we use like symlink(), unlink(), etc... */
+
\f
/* Here is the structure that stores information about a lock. */
/* Write the name of the lock file for FN into LFNAME. Length will be
that of FN plus two more for the leading `.#' plus one for the null. */
#define MAKE_LOCK_NAME(lock, file) \
- (lock = (char *) alloca (XSTRING_LENGTH(file) + 2 + 1), \
- fill_in_lock_file_name (lock, (file)))
+ (lock = (char *) alloca (XSTRING_LENGTH (file) + 2 + 1), \
+ fill_in_lock_file_name ((Bufbyte *) (lock), (file)))
static void
-fill_in_lock_file_name (lockfile, fn)
- register char *lockfile;
- register Lisp_Object fn;
+fill_in_lock_file_name (Bufbyte *lockfile, Lisp_Object fn)
{
- register char *p;
-
- strcpy (lockfile, XSTRING_DATA(fn));
-
- /* Shift the nondirectory part of the file name (including the null)
- right two characters. Here is one of the places where we'd have to
- do something to support 14-character-max file names. */
- for (p = lockfile + strlen (lockfile); p != lockfile && *p != '/'; p--)
- p[2] = *p;
-
- /* Insert the `.#'. */
- p[1] = '.';
- p[2] = '#';
+ Bufbyte *file_name = XSTRING_DATA (fn);
+ Bufbyte *p;
+ size_t dirlen;
+
+ for (p = file_name + XSTRING_LENGTH (fn) - 1;
+ p > file_name && !IS_ANY_SEP (p[-1]);
+ p--)
+ ;
+ dirlen = p - file_name;
+
+ memcpy (lockfile, file_name, dirlen);
+ p = lockfile + dirlen;
+ *(p++) = '.';
+ *(p++) = '#';
+ memcpy (p, file_name + dirlen, XSTRING_LENGTH (fn) - dirlen + 1);
}
/* Lock the lock file named LFNAME.
Return 1 if successful, 0 if not. */
static int
-lock_file_1 (char *lfname,int force)
+lock_file_1 (char *lfname, int force)
{
- register int err;
- char *user_name;
- char *host_name;
+ int err;
char *lock_info_str;
+ char *host_name;
+ char *user_name = user_login_name (NULL);
- if (STRINGP (Fuser_login_name (Qnil)))
- user_name = (char *) XSTRING_DATA (Fuser_login_name (Qnil));
- else
+ if (user_name == NULL)
user_name = "";
- if (STRINGP (Fsystem_name ()))
- host_name = (char *) XSTRING_DATA (Fsystem_name ());
+
+ if (STRINGP (Vsystem_name))
+ host_name = (char *) XSTRING_DATA (Vsystem_name);
else
host_name = "";
+
lock_info_str = (char *)alloca (strlen (user_name) + strlen (host_name)
+ LOCK_PID_MAX + 5);
(unsigned long) getpid ());
err = symlink (lock_info_str, lfname);
- if (errno == EEXIST && force)
+ if (err != 0 && errno == EEXIST && force)
{
unlink (lfname);
err = symlink (lock_info_str, lfname);
static int
current_lock_owner (lock_info_type *owner, char *lfname)
{
- int o, p, len, ret;
+ int len, ret;
int local_owner = 0;
char *at, *dot;
char *lfinfo = 0;
len = readlink (lfname, lfinfo, bufsize);
}
while (len >= bufsize);
-
+
/* If nonexistent lock file, all is well; otherwise, got strange error. */
if (len == -1)
{
/* Link info exists, so `len' is its length. Null terminate. */
lfinfo[len] = 0;
-
+
/* Even if the caller doesn't want the owner info, we still have to
read it to determine return value, so allocate it. */
if (!owner)
owner = (lock_info_type *) alloca (sizeof (lock_info_type));
local_owner = 1;
}
-
+
/* Parse USER@HOST.PID. If can't parse, return -1. */
/* The USER is everything before the first @. */
at = strchr (lfinfo, '@');
owner->user = (char *) xmalloc (len + 1);
strncpy (owner->user, lfinfo, len);
owner->user[len] = 0;
-
+
/* The PID is everything after the last `.'. */
owner->pid = atoi (dot + 1);
/* We're done looking at the link info. */
xfree (lfinfo);
-
+
/* On current host? */
- if (STRINGP (Fsystem_name ())
- && strcmp (owner->host, XSTRING_DATA(Fsystem_name ())) == 0)
+ if (STRINGP (Fsystem_name ())
+ && strcmp (owner->host, (char *) XSTRING_DATA (Fsystem_name ())) == 0)
{
if (owner->pid == getpid ())
ret = 2; /* We own it. */
here's where we'd do it. */
ret = 1;
}
-
+
/* Avoid garbage. */
if (local_owner || ret <= 0)
{
if (errno != EEXIST)
return -1;
-
+
locker = current_lock_owner (clasher, lfname);
if (locker == 2)
{
/* dmoore - and can destroy current_buffer and all sorts of other
mean nasty things with pointy teeth. If you call this make sure
you protect things right. */
- /* Somebody updated the code in this function and removed the previous
+ /* Somebody updated the code in this function and removed the previous
comment. -slb */
register Lisp_Object attack, orig_fn;
&& NILP (Fverify_visited_file_modtime (subject_buf))
&& !NILP (Ffile_exists_p (fn)))
call1_in_buffer (XBUFFER(subject_buf),
- Qask_user_about_supersession_threat, fn);
+ Qask_user_about_supersession_threat, fn);
}
/* Try to lock the lock. */
sprintf (locker, "%s@%s (pid %lu)", lock_info.user, lock_info.host,
lock_info.pid);
FREE_LOCK_INFO (lock_info);
-
+
attack = call2_in_buffer (BUFFERP (subject_buf) ? XBUFFER (subject_buf) :
current_buffer, Qask_user_about_lock , fn,
build_string (locker));
unlock_file (Lisp_Object fn)
{
register char *lfname;
+ struct gcpro gcpro1;
+
+ GCPRO1 (fn);
fn = Fexpand_file_name (fn, Qnil);
if (current_lock_owner (0, lfname) == 2)
unlink (lfname);
+
+ UNGCPRO;
}
void
-unlock_all_files ()
+unlock_all_files (void)
{
register Lisp_Object tail;
- register struct buffer *b;
for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail))
{
- b = XBUFFER (XCDR (XCAR (tail)));
+ struct buffer *b = XBUFFER (XCDR (XCAR (tail)));
if (STRINGP (b->file_truename) && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b))
unlock_file (b->file_truename);
}
}
\f
DEFUN ("lock-buffer", Flock_buffer, 0, 1, 0, /*
- Lock FILE, if current buffer is modified.\n\
-FILE defaults to current buffer's visited file,\n\
+Lock FILE, if current buffer is modified.
+FILE defaults to current buffer's visited file,
or else nothing is done if current buffer isn't visiting a file.
*/
- (file))
+ (file))
{
if (NILP (file))
file = current_buffer->file_truename;
}
DEFUN ("file-locked-p", Ffile_locked_p, 0, 1, 0, /*
- Return nil if the FILENAME is not locked,\n\
+Return nil if the FILENAME is not locked,
t if it is locked by you, else a string of the name of the locker.
*/
- (filename))
+ (filename))
{
Lisp_Object ret;
register char *lfname;
int owner;
lock_info_type locker;
+ struct gcpro gcpro1;
+
+ GCPRO1 (filename);
filename = Fexpand_file_name (filename, Qnil);
if (owner > 0)
FREE_LOCK_INFO (locker);
+ UNGCPRO;
+
return ret;
}
mode_string (unsigned short mode, char *str)
{
str[0] = ftypelet (mode);
- rwx ((mode & 0700) << 0, &str[1]);
- rwx ((mode & 0070) << 3, &str[4]);
- rwx ((mode & 0007) << 6, &str[7]);
+ rwx ((unsigned short) ((mode & 0700) << 0), &str[1]);
+ rwx ((unsigned short) ((mode & 0070) << 3), &str[4]);
+ rwx ((unsigned short) ((mode & 0007) << 6), &str[7]);
setst (mode, str);
}
/* If an argument is out of range for a mathematical function,
here is the actual argument value to use in the error message. */
static Lisp_Object float_error_arg, float_error_arg2;
-static CONST char *float_error_fn_name;
+static const char *float_error_fn_name;
/* Evaluate the floating point expression D, recording NUM
as the original argument for error messages.
/* Convert float to Lisp Integer if it fits, else signal a range
error using the given arguments. */
static Lisp_Object
-float_to_int (double x, CONST char *name, Lisp_Object num, Lisp_Object num2)
+float_to_int (double x, const char *name, Lisp_Object num, Lisp_Object num2)
{
if (x >= ((EMACS_INT) 1 << (VALBITS-1))
|| x <= - ((EMACS_INT) 1 << (VALBITS-1)) - (EMACS_INT) 1)
void
syms_of_floatfns (void)
{
+ INIT_LRECORD_IMPLEMENTATION (float);
/* Trig functions. */
sizeof (long)));
}
+static size_t
+size_bit_vector (const void *lheader)
+{
+ Lisp_Bit_Vector *v = (Lisp_Bit_Vector *) lheader;
+ return FLEXIBLE_ARRAY_STRUCT_SIZEOF (Lisp_Bit_Vector, bits,
+ BIT_VECTOR_LONG_STORAGE (bit_vector_length (v)));
+}
+
static const struct lrecord_description bit_vector_description[] = {
{ XD_LISP_OBJECT, offsetof (Lisp_Bit_Vector, next) },
{ XD_END }
};
-DEFINE_BASIC_LRECORD_IMPLEMENTATION ("bit-vector", bit_vector,
- mark_bit_vector, print_bit_vector, 0,
- bit_vector_equal, bit_vector_hash,
- bit_vector_description,
- Lisp_Bit_Vector);
+DEFINE_BASIC_LRECORD_SEQUENCE_IMPLEMENTATION ("bit-vector", bit_vector,
+ mark_bit_vector, print_bit_vector, 0,
+ bit_vector_equal, bit_vector_hash,
+ bit_vector_description, size_bit_vector,
+ Lisp_Bit_Vector);
\f
DEFUN ("identity", Fidentity, 1, 1, 0, /*
Return the argument unchanged.
#endif /* LOSING_BYTECODE */
void
-check_losing_bytecode (CONST char *function, Lisp_Object seq)
+check_losing_bytecode (const char *function, Lisp_Object seq)
{
if (COMPILED_FUNCTIONP (seq))
error_with_frob
}
DEFUN ("subseq", Fsubseq, 2, 3, 0, /*
-Return a subsequence of SEQ, starting at index FROM and ending before TO.
-TO may be nil or omitted; then the subsequence runs to the end of SEQ.
-If FROM or TO is negative, it counts from the end.
-The resulting subsequence is always the same type as the original
- sequence.
-If SEQ is a string, relevant parts of the string-extent-data are copied
- to the new string.
+Return the subsequence of SEQUENCE starting at START and ending before END.
+END may be omitted; then the subsequence runs to the end of SEQUENCE.
+If START or END is negative, it counts from the end.
+The returned subsequence is always of the same type as SEQUENCE.
+If SEQUENCE is a string, relevant parts of the string-extent-data
+are copied to the new string.
*/
- (seq, from, to))
+ (sequence, start, end))
{
- EMACS_INT len, f, t;
+ EMACS_INT len, s, e;
- if (STRINGP (seq))
- return Fsubstring (seq, from, to);
+ if (STRINGP (sequence))
+ return Fsubstring (sequence, start, end);
- if (!LISTP (seq) && !VECTORP (seq) && !BIT_VECTORP (seq))
- {
- check_losing_bytecode ("subseq", seq);
- seq = wrong_type_argument (Qsequencep, seq);
- }
+ len = XINT (Flength (sequence));
- len = XINT (Flength (seq));
+ CHECK_INT (start);
+ s = XINT (start);
+ if (s < 0)
+ s = len + s;
- CHECK_INT (from);
- f = XINT (from);
- if (f < 0)
- f = len + f;
-
- if (NILP (to))
- t = len;
+ if (NILP (end))
+ e = len;
else
{
- CHECK_INT (to);
- t = XINT (to);
- if (t < 0)
- t = len + t;
+ CHECK_INT (end);
+ e = XINT (end);
+ if (e < 0)
+ e = len + e;
}
- if (!(0 <= f && f <= t && t <= len))
- args_out_of_range_3 (seq, make_int (f), make_int (t));
+ if (!(0 <= s && s <= e && e <= len))
+ args_out_of_range_3 (sequence, make_int (s), make_int (e));
- if (VECTORP (seq))
+ if (VECTORP (sequence))
{
- Lisp_Object result = make_vector (t - f, Qnil);
+ Lisp_Object result = make_vector (e - s, Qnil);
EMACS_INT i;
- Lisp_Object *in_elts = XVECTOR_DATA (seq);
+ Lisp_Object *in_elts = XVECTOR_DATA (sequence);
Lisp_Object *out_elts = XVECTOR_DATA (result);
- for (i = f; i < t; i++)
- out_elts[i - f] = in_elts[i];
+ for (i = s; i < e; i++)
+ out_elts[i - s] = in_elts[i];
return result;
}
-
- if (LISTP (seq))
+ else if (LISTP (sequence))
{
Lisp_Object result = Qnil;
EMACS_INT i;
- seq = Fnthcdr (make_int (f), seq);
+ sequence = Fnthcdr (make_int (s), sequence);
- for (i = f; i < t; i++)
+ for (i = s; i < e; i++)
{
- result = Fcons (Fcar (seq), result);
- seq = Fcdr (seq);
+ result = Fcons (Fcar (sequence), result);
+ sequence = Fcdr (sequence);
}
return Fnreverse (result);
}
+ else if (BIT_VECTORP (sequence))
+ {
+ Lisp_Object result = make_bit_vector (e - s, Qzero);
+ EMACS_INT i;
- /* bit vector */
- {
- Lisp_Object result = make_bit_vector (t - f, Qzero);
- EMACS_INT i;
-
- for (i = f; i < t; i++)
- set_bit_vector_bit (XBIT_VECTOR (result), i - f,
- bit_vector_bit (XBIT_VECTOR (seq), i));
- return result;
- }
+ for (i = s; i < e; i++)
+ set_bit_vector_bit (XBIT_VECTOR (result), i - s,
+ bit_vector_bit (XBIT_VECTOR (sequence), i));
+ return result;
+ }
+ else
+ abort (); /* unreachable, since Flength (sequence) did not get an error */
}
\f
DEFUN ("valid-plist-p", Fvalid_plist_p, 1, 1, 0, /*
Given a plist, return 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.
+the plist; that means it's a malformed or circular plist.
*/
(plist))
{
(lax_plist, prop, default_))
{
Lisp_Object val = external_plist_get (&lax_plist, prop, 1, ERROR_ME);
- if (UNBOUNDP (val))
- return default_;
- return val;
+ return UNBOUNDP (val) ? default_ : val;
}
DEFUN ("lax-plist-put", Flax_plist_put, 3, 3, 0, /*
return head;
}
-/* Symbol plists are directly accessible, so we need to protect against
- invalid property list structure */
-
-static Lisp_Object
-symbol_getprop (Lisp_Object sym, Lisp_Object propname, Lisp_Object default_)
-{
- Lisp_Object val = external_plist_get (&XSYMBOL (sym)->plist, propname,
- 0, ERROR_ME);
- return UNBOUNDP (val) ? default_ : val;
-}
-
-static void
-symbol_putprop (Lisp_Object sym, Lisp_Object propname, Lisp_Object value)
-{
- external_plist_put (&XSYMBOL (sym)->plist, propname, value, 0, ERROR_ME);
-}
-
-static int
-symbol_remprop (Lisp_Object symbol, Lisp_Object propname)
-{
- return external_remprop (&XSYMBOL (symbol)->plist, propname, 0, ERROR_ME);
-}
-
-/* We store the string's extent info as the first element of the string's
- property list; and the string's MODIFF as the first or second element
- of the string's property list (depending on whether the extent info
- is present), but only if the string has been modified. This is ugly
- but it reduces the memory allocated for the string in the vast
- majority of cases, where the string is never modified and has no
- extent info. */
-
-
-static Lisp_Object *
-string_plist_ptr (Lisp_String *s)
-{
- Lisp_Object *ptr = &s->plist;
-
- if (CONSP (*ptr) && EXTENT_INFOP (XCAR (*ptr)))
- ptr = &XCDR (*ptr);
- if (CONSP (*ptr) && INTP (XCAR (*ptr)))
- ptr = &XCDR (*ptr);
- return ptr;
-}
-
-static Lisp_Object
-string_getprop (Lisp_String *s, Lisp_Object property,
- Lisp_Object default_)
-{
- Lisp_Object val = external_plist_get (string_plist_ptr (s), property, 0,
- ERROR_ME);
- return UNBOUNDP (val) ? default_ : val;
-}
-
-static void
-string_putprop (Lisp_String *s, Lisp_Object property,
- Lisp_Object value)
-{
- external_plist_put (string_plist_ptr (s), property, value, 0, ERROR_ME);
-}
-
-static int
-string_remprop (Lisp_String *s, Lisp_Object property)
-{
- return external_remprop (string_plist_ptr (s), property, 0, ERROR_ME);
-}
-
-static Lisp_Object
-string_plist (Lisp_String *s)
-{
- return *string_plist_ptr (s);
-}
-
DEFUN ("get", Fget, 2, 3, 0, /*
-Return the value of OBJECT's PROPNAME property.
-This is the last VALUE stored with `(put OBJECT PROPNAME VALUE)'.
+Return the value of OBJECT's PROPERTY property.
+This is the last VALUE stored with `(put OBJECT PROPERTY VALUE)'.
If there is no such property, return optional third arg DEFAULT
-\(which defaults to `nil'). OBJECT can be a symbol, face, extent,
-or string. See also `put', `remprop', and `object-plist'.
+\(which defaults to `nil'). OBJECT can be a symbol, string, extent,
+face, or glyph. See also `put', `remprop', and `object-plist'.
*/
- (object, propname, default_))
+ (object, property, default_))
{
/* Various places in emacs call Fget() and expect it not to quit,
so don't quit. */
+ Lisp_Object val;
- /* It's easiest to treat symbols specially because they may not
- be an lrecord */
- if (SYMBOLP (object))
- return symbol_getprop (object, propname, default_);
- else if (STRINGP (object))
- return string_getprop (XSTRING (object), propname, default_);
- else if (LRECORDP (object))
- {
- CONST struct lrecord_implementation *imp
- = XRECORD_LHEADER_IMPLEMENTATION (object);
- if (!imp->getprop)
- goto noprops;
-
- {
- Lisp_Object val = (imp->getprop) (object, propname);
- if (UNBOUNDP (val))
- val = default_;
- return val;
- }
- }
+ if (LRECORDP (object) && XRECORD_LHEADER_IMPLEMENTATION (object)->getprop)
+ val = XRECORD_LHEADER_IMPLEMENTATION (object)->getprop (object, property);
else
- {
- noprops:
- signal_simple_error ("Object type has no properties", object);
- return Qnil; /* Not reached */
- }
+ signal_simple_error ("Object type has no properties", object);
+
+ return UNBOUNDP (val) ? default_ : val;
}
DEFUN ("put", Fput, 3, 3, 0, /*
-Store OBJECT's PROPNAME property with value VALUE.
-It can be retrieved with `(get OBJECT PROPNAME)'. OBJECT can be a
-symbol, face, extent, or string.
-
+Set OBJECT's PROPERTY to VALUE.
+It can be subsequently retrieved with `(get OBJECT PROPERTY)'.
+OBJECT can be a symbol, face, extent, or string.
For a string, no properties currently have predefined meanings.
For the predefined properties for extents, see `set-extent-property'.
For the predefined properties for faces, see `set-face-property'.
-
See also `get', `remprop', and `object-plist'.
*/
- (object, propname, value))
+ (object, property, value))
{
- CHECK_SYMBOL (propname);
CHECK_LISP_WRITEABLE (object);
- if (SYMBOLP (object))
- symbol_putprop (object, propname, value);
- else if (STRINGP (object))
- string_putprop (XSTRING (object), propname, value);
- else if (LRECORDP (object))
+ if (LRECORDP (object) && XRECORD_LHEADER_IMPLEMENTATION (object)->putprop)
{
- CONST struct lrecord_implementation
- *imp = XRECORD_LHEADER_IMPLEMENTATION (object);
- if (imp->putprop)
- {
- if (! (imp->putprop) (object, propname, value))
- signal_simple_error ("Can't set property on object", propname);
- }
- else
- goto noprops;
+ if (! XRECORD_LHEADER_IMPLEMENTATION (object)->putprop
+ (object, property, value))
+ signal_simple_error ("Can't set property on object", property);
}
else
- {
- noprops:
- signal_simple_error ("Object type has no settable properties", object);
- }
+ signal_simple_error ("Object type has no settable properties", object);
return value;
}
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
-non-nil if the property list was actually changed (i.e. if PROPNAME
-was present in the property list). See also `get', `put', and
-`object-plist'.
+Remove, from OBJECT's property list, PROPERTY and its corresponding value.
+OBJECT can be a symbol, string, extent, face, or glyph. Return non-nil
+if the property list was actually modified (i.e. if PROPERTY was present
+in the property list). See also `get', `put', and `object-plist'.
*/
- (object, propname))
+ (object, property))
{
- int retval = 0;
+ int ret = 0;
- CHECK_SYMBOL (propname);
CHECK_LISP_WRITEABLE (object);
- if (SYMBOLP (object))
- retval = symbol_remprop (object, propname);
- else if (STRINGP (object))
- retval = string_remprop (XSTRING (object), propname);
- else if (LRECORDP (object))
+ if (LRECORDP (object) && XRECORD_LHEADER_IMPLEMENTATION (object)->remprop)
{
- CONST struct lrecord_implementation
- *imp = XRECORD_LHEADER_IMPLEMENTATION (object);
- if (imp->remprop)
- {
- retval = (imp->remprop) (object, propname);
- if (retval == -1)
- signal_simple_error ("Can't remove property from object",
- propname);
- }
- else
- goto noprops;
+ ret = XRECORD_LHEADER_IMPLEMENTATION (object)->remprop (object, property);
+ if (ret == -1)
+ signal_simple_error ("Can't remove property from object", property);
}
else
- {
- noprops:
- signal_simple_error ("Object type has no removable properties", object);
- }
+ signal_simple_error ("Object type has no removable properties", object);
- return retval ? Qt : Qnil;
+ return ret ? Qt : Qnil;
}
DEFUN ("object-plist", Fobject_plist, 1, 1, 0, /*
-Return a property list of OBJECT's props.
-For a symbol this is equivalent to `symbol-plist'.
-Do not modify the property list directly; this may or may not have
-the desired effects. (In particular, for a property with a special
-interpretation, this will probably have no effect at all.)
+Return a property list of OBJECT's properties.
+For a symbol, this is equivalent to `symbol-plist'.
+OBJECT can be a symbol, string, extent, face, or glyph.
+Do not modify the returned property list directly;
+this may or may not have the desired effects. Use `put' instead.
*/
(object))
{
- if (SYMBOLP (object))
- return Fsymbol_plist (object);
- else if (STRINGP (object))
- return string_plist (XSTRING (object));
- else if (LRECORDP (object))
- {
- CONST struct lrecord_implementation
- *imp = XRECORD_LHEADER_IMPLEMENTATION (object);
- if (imp->plist)
- return (imp->plist) (object);
- else
- signal_simple_error ("Object type has no properties", object);
- }
+ if (LRECORDP (object) && XRECORD_LHEADER_IMPLEMENTATION (object)->plist)
+ return XRECORD_LHEADER_IMPLEMENTATION (object)->plist (object);
else
signal_simple_error ("Object type has no properties", object);
return 0;
if (LRECORDP (obj1))
{
- CONST struct lrecord_implementation
+ const struct lrecord_implementation
*imp1 = XRECORD_LHEADER_IMPLEMENTATION (obj1),
*imp2 = XRECORD_LHEADER_IMPLEMENTATION (obj2);
}
}
else
- abort(); /* cannot get here since Flength(sequence) did not get an error */
+ abort (); /* unreachable, since Flength (sequence) did not get an error */
if (vals)
UNGCPRO;
size_t len = XINT (Flength (sequence));
Lisp_Object *args;
int i;
- struct gcpro gcpro1;
int nargs = len + len - 1;
- if (nargs < 0) return build_string ("");
+ if (len == 0) return build_string ("");
args = alloca_array (Lisp_Object, nargs);
- GCPRO1 (separator);
mapcar1 (len, args, function, sequence);
- UNGCPRO;
for (i = len - 1; i >= 0; i--)
args[i + i] = args[i];
}
\f
+
+
+DEFUN ("replace-list", Freplace_list, 2, 2, 0, /*
+Destructively replace the list OLD with NEW.
+This is like (copy-sequence NEW) except that it reuses the
+conses in OLD as much as possible. If OLD and NEW are the same
+length, no consing will take place.
+*/
+ (old, new))
+{
+ Lisp_Object tail, oldtail = old, prevoldtail = Qnil;
+
+ EXTERNAL_LIST_LOOP (tail, new)
+ {
+ if (!NILP (oldtail))
+ {
+ CHECK_CONS (oldtail);
+ XCAR (oldtail) = XCAR (tail);
+ }
+ else if (!NILP (prevoldtail))
+ {
+ XCDR (prevoldtail) = Fcons (XCAR (tail), Qnil);
+ prevoldtail = XCDR (prevoldtail);
+ }
+ else
+ old = oldtail = Fcons (XCAR (tail), Qnil);
+
+ if (!NILP (oldtail))
+ {
+ prevoldtail = oldtail;
+ oldtail = XCDR (oldtail);
+ }
+ }
+
+ if (!NILP (prevoldtail))
+ XCDR (prevoldtail) = Qnil;
+ else
+ old = Qnil;
+
+ return old;
+}
+
+\f
/* #### this function doesn't belong in this file! */
DEFUN ("load-average", Fload_average, 0, 1, 0, /*
void
syms_of_fns (void)
{
+ INIT_LRECORD_IMPLEMENTATION (bit_vector);
+
defsymbol (&Qstring_lessp, "string-lessp");
defsymbol (&Qidentity, "identity");
defsymbol (&Qyes_or_no_p, "yes-or-no-p");
DEFSUBR (Fmapvector);
DEFSUBR (Fmapc_internal);
DEFSUBR (Fmapconcat);
+ DEFSUBR (Freplace_list);
DEFSUBR (Fload_average);
DEFSUBR (Ffeaturep);
DEFSUBR (Frequire);
#define POPUP_WIDTH 30
#define POPUP_HEIGHT 10
-/* Default popup size, in characters */
+/* Default regular frame size, in characters */
#define DEFAULT_FRAME_WIDTH 80
#define DEFAULT_FRAME_HEIGHT 35
FRAME_MSWINDOWS_DATA(f)->ignore_next_lbutton_up = 0;
FRAME_MSWINDOWS_DATA(f)->ignore_next_rbutton_up = 0;
FRAME_MSWINDOWS_DATA(f)->sizing = 0;
+ FRAME_MSWINDOWS_DATA(f)->paint_pending = 0;
FRAME_MSWINDOWS_MENU_HASH_TABLE(f) = Qnil;
#ifdef HAVE_TOOLBARS
FRAME_MSWINDOWS_TOOLBAR_HASH_TABLE(f) =
make_lisp_hash_table (50, HASH_TABLE_NON_WEAK, HASH_TABLE_EQUAL);
#endif
/* hashtable of instantiated glyphs on the frame. */
- FRAME_MSWINDOWS_WIDGET_HASH_TABLE (f) =
+ FRAME_MSWINDOWS_WIDGET_HASH_TABLE1 (f) =
+ make_lisp_hash_table (50, HASH_TABLE_VALUE_WEAK, HASH_TABLE_EQUAL);
+ FRAME_MSWINDOWS_WIDGET_HASH_TABLE2 (f) =
+ make_lisp_hash_table (50, HASH_TABLE_VALUE_WEAK, HASH_TABLE_EQUAL);
+ FRAME_MSWINDOWS_WIDGET_HASH_TABLE3 (f) =
make_lisp_hash_table (50, HASH_TABLE_VALUE_WEAK, HASH_TABLE_EQUAL);
/* Will initialize these in WM_SIZE handler. We cannot do it now,
because we do not know what is CW_USEDEFAULT height and width */
XEMACS_CLASS,
STRINGP(f->name) ? XSTRING_DATA(f->name) :
(STRINGP(name) ?
- (CONST Extbyte*)XSTRING_DATA(name) :
- (CONST Extbyte*)XEMACS_CLASS),
+ (const Extbyte*)XSTRING_DATA(name) :
+ (const Extbyte*)XEMACS_CLASS),
style,
rect_default.left, rect_default.top,
rect_default.width, rect_default.height,
SetWindowLong (hwnd, XWL_FRAMEOBJ, (LONG)LISP_TO_VOID(frame_obj));
FRAME_MSWINDOWS_DC(f) = GetDC (hwnd);
- FRAME_MSWINDOWS_CDC(f) = CreateCompatibleDC (FRAME_MSWINDOWS_CDC(f));
SetTextAlign (FRAME_MSWINDOWS_DC(f), TA_BASELINE | TA_LEFT | TA_NOUPDATECP);
}
#ifdef HAVE_TOOLBARS
mark_object (FRAME_MSWINDOWS_TOOLBAR_HASH_TABLE (f));
#endif
- mark_object (FRAME_MSWINDOWS_WIDGET_HASH_TABLE (f));
+ mark_object (FRAME_MSWINDOWS_WIDGET_HASH_TABLE1 (f));
+ mark_object (FRAME_MSWINDOWS_WIDGET_HASH_TABLE2 (f));
+ mark_object (FRAME_MSWINDOWS_WIDGET_HASH_TABLE3 (f));
}
static void
{
if (f->frame_data)
{
- DeleteDC(FRAME_MSWINDOWS_CDC(f));
ReleaseDC(FRAME_MSWINDOWS_HANDLE(f), FRAME_MSWINDOWS_DC(f));
DestroyWindow(FRAME_MSWINDOWS_HANDLE(f));
xfree (f->frame_data);
void mswindows_size_frame_internal (struct frame* f, XEMACS_RECT_WH* dest)
{
- RECT rect;
+ RECT rect, ws_rect;
int pixel_width, pixel_height;
int size_p = (dest->width >=0 || dest->height >=0);
int move_p = (dest->top >=0 || dest->left >=0);
- struct device* d = XDEVICE (FRAME_DEVICE (f));
char_to_real_pixel_size (f, dest->width, dest->height, &pixel_width, &pixel_height);
if (dest->width < 0)
GetMenu (FRAME_MSWINDOWS_HANDLE(f)) != NULL,
GetWindowLong (FRAME_MSWINDOWS_HANDLE(f), GWL_EXSTYLE));
- /* resize and move the window so that it fits on the screen. This is
+ /* resize and move the window so that it fits in the workspace. This is
not restrictive since this will happen later anyway in WM_SIZE. We
have to do this after adjusting the rect to account for menubar
etc. */
+ msw_get_workspace_coords (&ws_rect);
pixel_width = rect.right - rect.left;
pixel_height = rect.bottom - rect.top;
- if (pixel_width > DEVICE_MSWINDOWS_HORZRES(d))
+ if (pixel_width > ws_rect.right - ws_rect.left)
{
- pixel_width = DEVICE_MSWINDOWS_HORZRES(d);
+ pixel_width = ws_rect.right - ws_rect.left;
size_p=1;
}
- if (pixel_height > DEVICE_MSWINDOWS_VERTRES(d))
+ if (pixel_height > ws_rect.bottom - ws_rect.top)
{
- pixel_height = DEVICE_MSWINDOWS_VERTRES(d);
+ pixel_height = ws_rect.bottom - ws_rect.top;
size_p=1;
}
- /* adjust position so window is on screen */
- if (dest->left + pixel_width > DEVICE_MSWINDOWS_HORZRES(d))
+ /* adjust position so window is in workspace */
+ if (dest->left + pixel_width > ws_rect.right)
{
- dest->left = DEVICE_MSWINDOWS_HORZRES(d) - pixel_width;
+ dest->left = ws_rect.right - pixel_width;
move_p=1;
}
- if (dest->top + pixel_height > DEVICE_MSWINDOWS_VERTRES(d))
+ if (dest->left < ws_rect.left)
{
- dest->top = DEVICE_MSWINDOWS_VERTRES(d) - pixel_height;
+ dest->left = ws_rect.left;
+ move_p=1;
+ }
+
+ if (dest->top + pixel_height > ws_rect.bottom)
+ {
+ dest->top = ws_rect.bottom - pixel_height;
+ move_p=1;
+ }
+ if (dest->top < ws_rect.top)
+ {
+ dest->top = ws_rect.top;
move_p=1;
}
/*----- PRINTER FRAME -----*/
/*---------------------------------------------------------------------*/
-EXFUN (Fset_frame_properties, 2);
+void
+msprinter_start_page (struct frame *f)
+{
+ if (!FRAME_MSPRINTER_PAGE_STARTED (f))
+ {
+ FRAME_MSPRINTER_PAGE_STARTED (f) = 1;
+ StartPage (DEVICE_MSPRINTER_HDC (XDEVICE (FRAME_DEVICE (f))));
+ }
+}
static void
error_frame_unsizable (struct frame *f)
static void
msprinter_init_frame_1 (struct frame *f, Lisp_Object props)
{
- HDC hdc = DEVICE_MSPRINTER_HDC (XDEVICE (FRAME_DEVICE (f)));
- Lisp_Object frame_obj = Qnil;
-
/* Make sure this is the only frame on device. Windows printer can
handle only one job at a time. */
if (!NILP (DEVICE_FRAME_LIST (XDEVICE (FRAME_DEVICE (f)))))
{
DOCINFO di;
struct device *device = XDEVICE (FRAME_DEVICE (f));
- HDC hdc = DEVICE_MSPRINTER_HDC (device);
+ HDC hdc;
int frame_left, frame_top, frame_width, frame_height;
/* Change printer parameters */
abort();
}
+ assert (!FRAME_MSPRINTER_PAGE_STARTED (f));
msprinter_apply_devmode (device, devmode);
}
+ /* DC might be recreated in msprinter_apply_devmode,
+ so do not initialize until now */
+ hdc = DEVICE_MSPRINTER_HDC (device);
+
/* Compute geometry properties */
frame_left = (MulDiv (GetDeviceCaps (hdc, LOGPIXELSX),
FRAME_MSPRINTER_LEFT_MARGIN(f), 1440)
error ("Cannot start print job");
/* Finish frame setup */
- FRAME_MSPRINTER_CDC(f) = CreateCompatibleDC (hdc);
FRAME_MSPRINTER_JOB_STARTED (f) = 1;
FRAME_VISIBLE_P(f) = 0;
}
{
if (f->frame_data)
{
+ HDC hdc = DEVICE_MSPRINTER_HDC (XDEVICE (FRAME_DEVICE (f)));
+ if (FRAME_MSPRINTER_PAGE_STARTED (f))
+ EndPage (hdc);
if (FRAME_MSPRINTER_JOB_STARTED (f))
- EndDoc (DEVICE_MSPRINTER_HDC (XDEVICE (FRAME_DEVICE (f))));
- if (FRAME_MSPRINTER_CDC(f))
- DeleteDC(FRAME_MSPRINTER_CDC(f));
+ EndDoc (hdc);
xfree (f->frame_data);
}
static void
msprinter_set_frame_properties (struct frame *f, Lisp_Object plist)
{
- BOOL size_changed_p = FALSE;
Lisp_Object tail;
/* Extract the properties from plist */
error_frame_unsizable (f);
}
+static void
+msprinter_eject_page (struct frame *f)
+{
+ /* #### Should we eject empty pages? */
+ if (FRAME_MSPRINTER_PAGE_STARTED (f))
+ {
+ FRAME_MSPRINTER_PAGE_STARTED (f) = 0;
+ EndPage (DEVICE_MSPRINTER_HDC (XDEVICE (FRAME_DEVICE (f))));
+ }
+}
+
+\f
void
console_type_create_frame_mswindows (void)
{
CONSOLE_HAS_METHOD (msprinter, frame_properties);
CONSOLE_HAS_METHOD (msprinter, set_frame_properties);
CONSOLE_HAS_METHOD (msprinter, set_frame_size);
+ CONSOLE_HAS_METHOD (msprinter, eject_page);
}
void
#include "faces.h"
#include "frame.h"
#include "window.h"
+#include "gutter.h"
#ifdef HAVE_DRAGNDROP
#include "dragdrop.h"
for (ptr = value; *ptr; ptr++)
if (!BYTE_ASCII_P (*ptr))
{
- CONST char * tmp;
+ const char * tmp;
encoding = DEVICE_XATOM_COMPOUND_TEXT (XDEVICE (FRAME_DEVICE (f)));
TO_EXTERNAL_FORMAT (C_STRING, value,
C_STRING_ALLOCA, tmp,
if (STRINGP (prop))
{
- CONST char *extprop;
+ const char *extprop;
if (XSTRING_LENGTH (prop) == 0)
continue;
Qctext);
if (STRINGP (val))
{
- CONST Extbyte *extval;
+ const Extbyte *extval;
Extcount extvallen;
TO_EXTERNAL_FORMAT (LISP_STRING, val,
x_event.xbutton.y_root = lisp_event->event.button.y;
}
modifier = lisp_event->event.button.modifiers;
- if (modifier & MOD_SHIFT) state |= ShiftMask;
- if (modifier & MOD_CONTROL) state |= ControlMask;
- if (modifier & MOD_META) state |= xd->MetaMask;
- if (modifier & MOD_SUPER) state |= xd->SuperMask;
- if (modifier & MOD_HYPER) state |= xd->HyperMask;
- if (modifier & MOD_ALT) state |= xd->AltMask;
+ if (modifier & XEMACS_MOD_SHIFT) state |= ShiftMask;
+ if (modifier & XEMACS_MOD_CONTROL) state |= ControlMask;
+ if (modifier & XEMACS_MOD_META) state |= xd->MetaMask;
+ if (modifier & XEMACS_MOD_SUPER) state |= xd->SuperMask;
+ if (modifier & XEMACS_MOD_HYPER) state |= xd->HyperMask;
+ if (modifier & XEMACS_MOD_ALT) state |= xd->AltMask;
state |= Button1Mask << (lisp_event->event.button.button-1);
x_event.xbutton.state = state;
Ctext=NULL;
break;
}
- strcpy (Ctext+pos, (CONST char *)XSTRING_DATA (XCAR (item)));
+ strcpy (Ctext+pos, (const char *)XSTRING_DATA (XCAR (item)));
pos += XSTRING_LENGTH (XCAR (item)) + 1;
item = XCDR (item);
}
}
len = XSTRING_LENGTH (XCAR (run)) + 1;
dnd_data = (char *) xrealloc (dnd_data, dnd_len + len);
- strcpy (dnd_data + dnd_len - 1, (CONST char *)XSTRING_DATA (XCAR (run)));
+ strcpy (dnd_data + dnd_len - 1, (const char *)XSTRING_DATA (XCAR (run)));
dnd_len += len;
run = XCDR (run);
}
}
modifier = lisp_event->event.button.modifiers;
- if (modifier & MOD_SHIFT) state |= ShiftMask;
- if (modifier & MOD_CONTROL) state |= ControlMask;
- if (modifier & MOD_META) state |= xd->MetaMask;
- if (modifier & MOD_SUPER) state |= xd->SuperMask;
- if (modifier & MOD_HYPER) state |= xd->HyperMask;
- if (modifier & MOD_ALT) state |= xd->AltMask;
+ if (modifier & XEMACS_MOD_SHIFT) state |= ShiftMask;
+ if (modifier & XEMACS_MOD_CONTROL) state |= ControlMask;
+ if (modifier & XEMACS_MOD_META) state |= xd->MetaMask;
+ if (modifier & XEMACS_MOD_SUPER) state |= xd->SuperMask;
+ if (modifier & XEMACS_MOD_HYPER) state |= xd->HyperMask;
+ if (modifier & XEMACS_MOD_ALT) state |= xd->AltMask;
state |= Button1Mask << (lisp_event->event.button.button-1);
x_event.xbutton.state = state;
{
struct window *win = XWINDOW (f->root_window);
- WINDOW_LEFT (win) = FRAME_LEFT_BORDER_END (f);
- WINDOW_TOP (win) = FRAME_TOP_BORDER_END (f);
+ WINDOW_LEFT (win) = FRAME_LEFT_BORDER_END (f)
+ + FRAME_LEFT_GUTTER_BOUNDS (f);
+ WINDOW_TOP (win) = FRAME_TOP_BORDER_END (f)
+ + FRAME_TOP_GUTTER_BOUNDS (f);
if (!NILP (f->minibuffer_window))
{
win = XWINDOW (f->minibuffer_window);
- WINDOW_LEFT (win) = FRAME_LEFT_BORDER_END (f);
+ WINDOW_LEFT (win) = FRAME_LEFT_BORDER_END (f)
+ + FRAME_LEFT_GUTTER_BOUNDS (f);
}
}
#ifdef EXTERNAL_WIDGET
Window window_id = 0;
#endif
- CONST char *name;
+ const char *name;
Arg al [25];
int ac = 0;
Widget text, container, shell;
the dynamic allocation time adds up. */
static Emchar_dynarr *title_string_emchar_dynarr;
-EXFUN (Fset_frame_properties, 2);
-
\f
static Lisp_Object
mark_frame (Lisp_Object obj)
f->subwindow_exposures = 0;
f->subwindow_exposures_tail = 0;
+ FRAME_SET_PAGENUMBER (f, 1);
+
/* Choose a buffer for the frame's root window. */
XWINDOW (root_window)->buffer = Qt;
{
else
name = build_string ("emacs");
- if (!NILP (Fstring_match (make_string ((CONST Bufbyte *) "\\.", 2), name,
+ if (!NILP (Fstring_match (make_string ((const Bufbyte *) "\\.", 2), name,
Qnil, Qnil)))
signal_simple_error (". not allowed in frame names", name);
reset_face_cachels (XWINDOW (FRAME_SELECTED_WINDOW (f)));
reset_glyph_cachels (XWINDOW (FRAME_SELECTED_WINDOW (f)));
reset_subwindow_cachels (f);
- change_frame_size (f, f->height, f->width, 0);
+ change_frame_size (f, f->height, f->width, 0);
}
MAYBE_FRAMEMETH (f, init_frame_2, (f, props));
Fset_frame_properties (frame, props);
MAYBE_FRAMEMETH (f, init_frame_3, (f));
- /* now initialise the gutters, this won't change the frame size
- so is ok here. */
- if (!DEVICE_STREAM_P (d))
- init_frame_gutters (f);
-
/* Hallelujah, praise the lord. */
f->init_finished = 1;
MAYBE_FRAMEMETH (f, after_init_frame, (f, first_frame_on_device,
first_frame_on_console));
+ if (!DEVICE_STREAM_P (d))
+ {
+ /* Now initialise the gutters. This won't change the frame size,
+ but is needed as input to the layout that change_frame_size
+ will eventually do. Unfortunately gutter sizing code relies
+ on the frame in question being visible so we can't do this
+ earlier. */
+ init_frame_gutters (f);
+
+ change_frame_size (f, f->height, f->width, 0);
+ }
+
if (first_frame_on_device)
{
if (first_frame_on_console)
f->selected_window = window;
if (!MINI_WINDOW_P (XWINDOW (window)) || FRAME_MINIBUF_ONLY_P (f))
{
-#ifdef HAVE_TOOLBARS
if (!EQ (f->last_nonminibuf_window, window))
{
+#ifdef HAVE_TOOLBARS
MARK_TOOLBAR_CHANGED;
+#endif
MARK_GUTTER_CHANGED;
}
-#endif
f->last_nonminibuf_window = window;
}
}
/* Ben thinks there is no need for `redirect-frame-focus' or `frame-focus',
crockish FSFmacs functions. See summary on focus in event-stream.c. */
+\f
+DEFUN ("print-job-page-number", Fprint_job_page_number, 1, 1, 0, /*
+Return current page number for the print job FRAME.
+*/
+ (frame))
+{
+ CHECK_PRINTER_FRAME (frame);
+ return make_int (FRAME_PAGENUMBER (XFRAME (frame)));
+}
+
+DEFUN ("print-job-eject-page", Fprint_job_eject_page, 1, 1, 0, /*
+Eject page in the print job FRAME.
+*/
+ (frame))
+{
+ struct frame *f;
+
+ CHECK_PRINTER_FRAME (frame);
+ f = XFRAME (frame);
+ FRAMEMETH (f, eject_page, (f));
+ FRAME_SET_PAGENUMBER (f, 1 + FRAME_PAGENUMBER (f));
+ f->clear = 1;
+
+ return Qnil;
+}
\f
/***************************************************************************/
minibuffer Gives the minibuffer behavior for this frame. Either
t (frame has its own minibuffer), `only' (frame is
- a minibuffer-only frame), or a window (frame uses that
- window, which is on another frame, as the minibuffer).
+ a minibuffer-only frame), `none' (frame has no minibuffer)
+ or a window (frame uses that window, which is on another
+ frame, as the minibuffer).
unsplittable If non-nil, frame cannot be split by `display-buffer'.
left-toolbar-visible-p, right-toolbar-visible-p, toolbar-buttons-captioned-p,
top-toolbar-border-width, bottom-toolbar-border-width,
left-toolbar-border-width, right-toolbar-border-width,
- modeline-shadow-thickness, has-modeline-p
+ modeline-shadow-thickness, has-modeline-p,
+ default-gutter, top-gutter, bottom-gutter, left-gutter, right-gutter,
+ default-gutter-height, default-gutter-width, top-gutter-height,
+ bottom-gutter-height, left-gutter-width, right-gutter-width,
+ default-gutter-visible-p, top-gutter-visible-p, bottom-gutter-visible-p,
+ left-gutter-visible-p, right-gutter-visible-p, top-gutter-border-width,
+ bottom-gutter-border-width, left-gutter-border-width, right-gutter-border-width,
[Giving the name of any built-in specifier variable is
equivalent to calling `set-specifier' on the specifier,
with a locale of FRAME. Giving the name to `frame-property'
- FRAME_REAL_RIGHT_TOOLBAR_WIDTH (f)
- 2 * FRAME_REAL_RIGHT_TOOLBAR_BORDER_WIDTH (f);
- new_pixwidth += 2 * f->internal_border_width;
-
/* Adjust the width for the end glyph which may be a different width
than the default character width. */
{
if (new_pixheight)
{
- XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_top = FRAME_TOP_BORDER_END (f);
+ /* Adjust for gutters here so that we always get set
+ properly. */
+ new_pixheight -=
+ (FRAME_TOP_GUTTER_BOUNDS (f)
+ + FRAME_BOTTOM_GUTTER_BOUNDS (f));
+
+ XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_top
+ = FRAME_TOP_BORDER_END (f) + FRAME_TOP_GUTTER_BOUNDS (f);
if (FRAME_HAS_MINIBUF_P (f)
&& ! FRAME_MINIBUF_ONLY_P (f))
new_pixheight - minibuf_height, 0);
XWINDOW (FRAME_MINIBUF_WINDOW (f))->pixel_top =
- new_pixheight - minibuf_height + FRAME_TOP_BORDER_END (f);
+ FRAME_TOP_BORDER_END (f) +
+ FRAME_TOP_GUTTER_BOUNDS (f) +
+ FRAME_BOTTOM_GUTTER_BOUNDS (f) +
+ new_pixheight - minibuf_height;
set_window_pixheight (FRAME_MINIBUF_WINDOW (f), minibuf_height, 0);
}
if (new_pixwidth)
{
- XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_left = FRAME_LEFT_BORDER_END (f);
+ /* Adjust for gutters here so that we always get set
+ properly. */
+ new_pixwidth -=
+ (FRAME_LEFT_GUTTER_BOUNDS (f)
+ + FRAME_RIGHT_GUTTER_BOUNDS (f));
+
+ XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_left =
+ FRAME_LEFT_BORDER_END (f) + FRAME_LEFT_GUTTER_BOUNDS (f);
set_window_pixwidth (FRAME_ROOT_WINDOW (f), new_pixwidth, 0);
if (FRAME_HAS_MINIBUF_P (f))
{
XWINDOW (FRAME_MINIBUF_WINDOW (f))->pixel_left =
- FRAME_LEFT_BORDER_END (f);
+ FRAME_LEFT_BORDER_END (f) + FRAME_LEFT_GUTTER_BOUNDS (f);
set_window_pixwidth (FRAME_MINIBUF_WINDOW (f), new_pixwidth, 0);
}
}
MARK_FRAME_TOOLBARS_CHANGED (f);
+ MARK_FRAME_GUTTERS_CHANGED (f);
MARK_FRAME_CHANGED (f);
f->echo_area_garbaged = 1;
}
void
syms_of_frame (void)
{
+ INIT_LRECORD_IMPLEMENTATION (frame);
+
defsymbol (&Qdelete_frame_hook, "delete-frame-hook");
defsymbol (&Qselect_frame_hook, "select-frame-hook");
defsymbol (&Qdeselect_frame_hook, "deselect-frame-hook");
DEFSUBR (Fset_frame_size);
DEFSUBR (Fset_frame_position);
DEFSUBR (Fset_frame_pointer);
+ DEFSUBR (Fprint_job_page_number);
+ DEFSUBR (Fprint_job_eject_page);
}
void
Vsynchronize_minibuffers = Qnil;
DEFVAR_LISP ("frame-title-format", &Vframe_title_format /*
-Controls the title of the X window corresponding to the selected frame.
+Controls the title of the window-system window of the selected frame.
This is the same format as `modeline-format' with the exception that
%- is ignored.
*/ );
+/* #### I would change this unilaterally but for the wrath of the Kyles
+of the world. */
+#ifdef WINDOWSNT
+ Vframe_title_format = build_string ("%b - XEmacs");
+#else
Vframe_title_format = build_string ("%S: %b");
+#endif
DEFVAR_LISP ("frame-icon-title-format", &Vframe_icon_title_format /*
Controls the title of the icon corresponding to the selected frame.
DEFVAR_LISP ("default-frame-name", &Vdefault_frame_name /*
The default name to assign to newly-created frames.
-This can be overridden by arguments to `make-frame'.
-This must be a string.
+This can be overridden by arguments to `make-frame'. This must be a string.
+This is used primarily for picking up X resources, and is *not* the title
+of the frame. (See `frame-title-format'.)
*/ );
#ifndef INFODOCK
Vdefault_frame_name = build_string ("emacs");
int order_count;
#endif
+ /* Current page number for a printer frame. */
+ int page_number;
+
/* Width of the internal border. This is a line of background color
just inside the window's border. It is normally only non-zero on
X frames, but we put it here to avoid introducing window system
unsigned int current_toolbar_size[4];
#endif
- /* Dynamic array of display lines for gutters */
- display_line_dynarr *current_display_lines;
- display_line_dynarr *desired_display_lines;
+ /* Size of gutters as seen by redisplay. This is used to determine
+ whether to re-layout windows by a call to change_frame_size early
+ in redisplay_frame. */
+ unsigned int current_gutter_bounds[4];
+
+ /* Dynamic arrays of display lines for gutters */
+ display_line_dynarr *current_display_lines[4];
+ display_line_dynarr *desired_display_lines[4];
/* A structure of auxiliary data specific to the device type.
struct x_frame is used for X window frames; defined in console-x.h */
EXFUN (Fselect_frame, 1);
EXFUN (Fset_frame_pointer, 2);
EXFUN (Fset_frame_position, 3);
+EXFUN (Fset_frame_properties, 2);
EXFUN (Fset_frame_size, 4);
extern Lisp_Object Qbackground_toolbar_color, Qbell_volume, Qborder_color;
#define FRAME_TYPE_P(f, type) EQ (FRAME_TYPE (f), Q##type)
#ifdef ERROR_CHECK_TYPECHECK
-INLINE struct frame *
+INLINE_HEADER struct frame *
error_check_frame_type (struct frame * f, Lisp_Object sym);
-INLINE struct frame *
+INLINE_HEADER struct frame *
error_check_frame_type (struct frame * f, Lisp_Object sym)
{
assert (EQ (FRAME_TYPE (f), sym));
(type##_console_methods->predicate_symbol, x); \
} while (0)
+#define FRAME_DISPLAY_P(frm) \
+ (DEVICE_DISPLAY_P (XDEVICE (FRAME_DEVICE (frm))))
+
+#define CHECK_DISPLAY_FRAME(frm) \
+ do { \
+ CHECK_FRAME (frm); \
+ CHECK_LIVE_FRAME (frm); \
+ CHECK_DISPLAY_DEVICE (FRAME_DEVICE (XFRAME (frm))); \
+ } while (0)
+
+#define CONCHECK_DISPLAY_FRAME(frm) \
+ do { \
+ CONCHECK_FRAME (frm); \
+ CONCHECK_LIVE_FRAME (frm); \
+ CONCHECK_DISPLAY_DEVICE (FRAME_DEVICE (XFRAME (frm))); \
+ } while (0)
+
+#define FRAME_PRINTER_P(frm) \
+ (DEVICE_PRINTER_P (XDEVICE (FRAME_DEVICE (frm))))
+
+#define CHECK_PRINTER_FRAME(frm) \
+ do { \
+ CHECK_FRAME (frm); \
+ CHECK_LIVE_FRAME (frm); \
+ CHECK_PRINTER_DEVICE (FRAME_DEVICE (XFRAME (frm))); \
+ } while (0)
+
+#define CONCHECK_PRINTER_FRAME(frm) \
+ do { \
+ CONCHECK_FRAME (frm); \
+ CONCHECK_LIVE_FRAME (frm); \
+ CONCHECK_PRINTER_DEVICE (FRAME_DEVICE (XFRAME (frm))); \
+ } while (0)
+
/* #### These should be in the frame-*.h files but there are
too many places where the abstraction is broken. Need to
fix. */
#define MARK_FRAME_SUBWINDOWS_CHANGED(f) do { \
struct frame *mfgc_f = (f); \
- mfgc_f->subwindows_changed = 1; \
+ mfgc_f->subwindows_changed = 1; \
mfgc_f->modiff++; \
if (!NILP (mfgc_f->device)) \
{ \
MARK_DEVICE_SUBWINDOWS_CHANGED (mfgc_d); \
} \
else \
- subwindows_changed = 1; \
+ 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->subwindows_state_changed = 1; \
mfgc_f->modiff++; \
if (!NILP (mfgc_f->device)) \
{ \
toolbar_changed = 1; \
} while (0)
-#define MARK_FRAME_GUTTERS_CHANGED(f) do { \
+#define MARK_FRAME_GUTTERS_CHANGED(f) do { \
struct frame *mftc_f = (f); \
mftc_f->gutter_changed = 1; \
mftc_f->modiff++; \
if (!NILP (mftc_f->device)) \
{ \
struct device *mftc_d = XDEVICE (mftc_f->device); \
- MARK_DEVICE_GUTTERS_CHANGED (mftc_d); \
+ MARK_DEVICE_GUTTERS_CHANGED (mftc_d); \
} \
else \
gutter_changed = 1; \
#define FRAME_MINIBUF_ONLY_P(f) \
EQ (FRAME_ROOT_WINDOW (f), FRAME_MINIBUF_WINDOW (f))
-#define FRAME_HAS_MINIBUF_P(f) ((f)->has_minibuffer)
-#define FRAME_HEIGHT(f) ((f)->height)
-#define FRAME_WIDTH(f) ((f)->width)
-#define FRAME_CHARHEIGHT(f) ((f)->char_height)
-#define FRAME_CHARWIDTH(f) ((f)->char_width)
-#define FRAME_PIXHEIGHT(f) ((f)->pixheight)
-#define FRAME_PIXWIDTH(f) ((f)->pixwidth)
+#define FRAME_HAS_MINIBUF_P(f) ((f)->has_minibuffer)
+#define FRAME_HEIGHT(f) ((f)->height)
+#define FRAME_WIDTH(f) ((f)->width)
+#define FRAME_CHARHEIGHT(f) ((f)->char_height)
+#define FRAME_CHARWIDTH(f) ((f)->char_width)
+#define FRAME_PIXHEIGHT(f) ((f)->pixheight)
+#define FRAME_PIXWIDTH(f) ((f)->pixwidth)
+#define FRAME_PAGENUMBER(f) ((f)->page_number + 0)
+#define FRAME_SET_PAGENUMBER(f,x) (f)->page_number = (x);
#ifdef HAVE_SCROLLBARS
#define FRAME_SCROLLBAR_WIDTH(f) \
(NILP ((f)->vertical_scrollbar_visible_p) ? \
#define FW_FRAME(obj) \
(WINDOWP (obj) ? WINDOW_FRAME (XWINDOW (obj)) \
- : (FRAMEP (obj) ? obj \
- : Qnil))
+ : (FRAMEP (obj) ? obj \
+ : Qnil))
#define FRAME_NEW_HEIGHT(f) ((f)->new_height)
#define FRAME_NEW_WIDTH(f) ((f)->new_width)
FRAME_THEORETICAL_TOOLBAR_SIZE (f, RIGHT_TOOLBAR)
#define FRAME_THEORETICAL_TOOLBAR_BORDER_WIDTH(f, pos) \
- (FRAME_RAW_THEORETICAL_TOOLBAR_VISIBLE (f, pos) \
+ (FRAME_RAW_THEORETICAL_TOOLBAR_VISIBLE (f, pos) \
? FRAME_RAW_THEORETICAL_TOOLBAR_BORDER_WIDTH (f, pos) \
: 0)
if you encounter some odd toolbar behavior, you might want
to look into this. --ben */
-#define FRAME_REAL_TOOLBAR_VISIBLE(f, pos) \
- ((!NILP (FRAME_REAL_TOOLBAR (f, pos)) \
- && FRAME_RAW_REAL_TOOLBAR_SIZE (f, pos) > 0) \
- ? FRAME_RAW_REAL_TOOLBAR_VISIBLE (f, pos) \
+#define FRAME_REAL_TOOLBAR_VISIBLE(f, pos) \
+ ((!NILP (FRAME_REAL_TOOLBAR (f, pos)) \
+ && FRAME_RAW_REAL_TOOLBAR_SIZE (f, pos) > 0) \
+ ? FRAME_RAW_REAL_TOOLBAR_VISIBLE (f, pos) \
: 0)
-#define FRAME_REAL_TOOLBAR_SIZE(f, pos) \
- ((!NILP (FRAME_REAL_TOOLBAR (f, pos)) \
- && FRAME_RAW_REAL_TOOLBAR_VISIBLE (f, pos)) \
- ? FRAME_RAW_REAL_TOOLBAR_SIZE (f, pos) \
+#define FRAME_REAL_TOOLBAR_SIZE(f, pos) \
+ ((!NILP (FRAME_REAL_TOOLBAR (f, pos)) \
+ && FRAME_RAW_REAL_TOOLBAR_VISIBLE (f, pos)) \
+ ? FRAME_RAW_REAL_TOOLBAR_SIZE (f, pos) \
: 0)
#define FRAME_REAL_TOOLBAR_BORDER_WIDTH(f, pos) \
- ((!NILP (FRAME_REAL_TOOLBAR (f, pos)) \
+ ((!NILP (FRAME_REAL_TOOLBAR (f, pos)) \
&& FRAME_RAW_REAL_TOOLBAR_VISIBLE (f, pos)) \
? FRAME_RAW_REAL_TOOLBAR_BORDER_WIDTH (f, pos) \
: 0)
#define FRAME_REAL_RIGHT_TOOLBAR_VISIBLE(f) \
FRAME_REAL_TOOLBAR_VISIBLE (f, RIGHT_TOOLBAR)
-#define FRAME_TOP_BORDER_START(f) \
- (FRAME_REAL_TOP_TOOLBAR_HEIGHT (f) + \
+#define FRAME_TOP_BORDER_START(f) \
+ (FRAME_REAL_TOP_TOOLBAR_HEIGHT (f) + \
2 * FRAME_REAL_TOP_TOOLBAR_BORDER_WIDTH (f))
-#define FRAME_TOP_BORDER_END(f) \
+#define FRAME_TOP_BORDER_END(f) \
(FRAME_TOP_BORDER_START (f) + FRAME_BORDER_HEIGHT (f))
-#define FRAME_BOTTOM_BORDER_START(f) \
- (FRAME_PIXHEIGHT (f) - FRAME_BORDER_HEIGHT (f) - \
- FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT (f) - \
+#define FRAME_BOTTOM_BORDER_START(f) \
+ (FRAME_PIXHEIGHT (f) - FRAME_BORDER_HEIGHT (f) - \
+ FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT (f) - \
2 * FRAME_REAL_BOTTOM_TOOLBAR_BORDER_WIDTH (f))
-#define FRAME_BOTTOM_BORDER_END(f) \
- (FRAME_PIXHEIGHT (f) - FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT (f) - \
+#define FRAME_BOTTOM_BORDER_END(f) \
+ (FRAME_PIXHEIGHT (f) - FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT (f) - \
2 * FRAME_REAL_BOTTOM_TOOLBAR_BORDER_WIDTH (f))
-#define FRAME_LEFT_BORDER_START(f) \
- (FRAME_REAL_LEFT_TOOLBAR_WIDTH (f) + \
+#define FRAME_LEFT_BORDER_START(f) \
+ (FRAME_REAL_LEFT_TOOLBAR_WIDTH (f) + \
2 * FRAME_REAL_LEFT_TOOLBAR_BORDER_WIDTH (f))
-#define FRAME_LEFT_BORDER_END(f) \
+#define FRAME_LEFT_BORDER_END(f) \
(FRAME_LEFT_BORDER_START (f) + FRAME_BORDER_WIDTH (f))
-#define FRAME_RIGHT_BORDER_START(f) \
- (FRAME_PIXWIDTH (f) - FRAME_BORDER_WIDTH (f) - \
- FRAME_REAL_RIGHT_TOOLBAR_WIDTH(f) - \
+#define FRAME_RIGHT_BORDER_START(f) \
+ (FRAME_PIXWIDTH (f) - FRAME_BORDER_WIDTH (f) - \
+ FRAME_REAL_RIGHT_TOOLBAR_WIDTH(f) - \
2 * FRAME_REAL_RIGHT_TOOLBAR_BORDER_WIDTH (f))
-#define FRAME_RIGHT_BORDER_END(f) \
- (FRAME_PIXWIDTH (f) - FRAME_REAL_RIGHT_TOOLBAR_WIDTH (f) - \
+#define FRAME_RIGHT_BORDER_END(f) \
+ (FRAME_PIXWIDTH (f) - FRAME_REAL_RIGHT_TOOLBAR_WIDTH (f) - \
2 * FRAME_REAL_RIGHT_TOOLBAR_BORDER_WIDTH(f))
/* Equivalent in FSF Emacs:
Lisp_Object console);
Lisp_Object prev_frame (Lisp_Object f, Lisp_Object frametype,
Lisp_Object console);
-void store_in_alist (Lisp_Object *alistptr,
- CONST char *propname,
- Lisp_Object val);
void pixel_to_char_size (struct frame *f, int pixel_width, int pixel_height,
int *char_width, int *char_height);
void char_to_pixel_size (struct frame *f, int char_width, int char_height,
/* frame property list */
MARKED_SLOT (plist);
+ /* buffer_alist at last redisplay. */
+ MARKED_SLOT (old_buffer_alist);
+
/* A copy of the global Vbuffer_list, to maintain a per-frame buffer
ordering. The Vbuffer_list variable and the buffer_list slot of each
frame contain exactly the same data, just in different orders. */
#endif
EMACS_INT present = (EMACS_INT) gethash (ptr, pointer_table,
- (CONST void **) &size);
+ (const void **) &size);
if (!present)
{
void *result = malloc (size);
if (!ptr) return result;
- present = (EMACS_INT) gethash (ptr, pointer_table, (CONST void **) &old_size);
+ present = (EMACS_INT) gethash (ptr, pointer_table, (const void **) &old_size);
if (!present)
{
/* This can only happen by reallocing a pointer that didn't
Lisp_Object Qdelete;
Lisp_Object Qdelq;
Lisp_Object Qdevice;
+Lisp_Object Qdialog;
Lisp_Object Qdimension;
Lisp_Object Qdisplay;
Lisp_Object Qdoc_string;
Lisp_Object Qfont;
Lisp_Object Qframe;
Lisp_Object Qfunction;
+Lisp_Object Qfuncall;
Lisp_Object Qgap_overhead;
Lisp_Object Qgeneric;
Lisp_Object Qgeometry;
Lisp_Object Qkeyboard;
Lisp_Object Qkeymap;
Lisp_Object Qlandscape;
+Lisp_Object Qlast_command;
Lisp_Object Qleft;
Lisp_Object Qleft_margin;
+Lisp_Object Qlet;
Lisp_Object Qlist;
Lisp_Object Qmagic;
Lisp_Object Qmalloc_overhead;
Lisp_Object Qmarkers;
Lisp_Object Qmax;
Lisp_Object Qmemory;
+Lisp_Object Qmenubar;
Lisp_Object Qmessage;
Lisp_Object Qminus;
Lisp_Object Qmodifiers;
Lisp_Object Qpopup;
Lisp_Object Qportrait;
Lisp_Object Qprint;
+Lisp_Object Qprinter;
Lisp_Object Qprocess;
Lisp_Object Qprovide;
Lisp_Object Qrassoc;
Lisp_Object Qterminal;
Lisp_Object Qtest;
Lisp_Object Qtext;
+Lisp_Object Qthis_command;
Lisp_Object Qtimeout;
Lisp_Object Qtimestamp;
Lisp_Object Qtoolbar;
defsymbol (&Qdelete, "delete");
defsymbol (&Qdelq, "delq");
defsymbol (&Qdevice, "device");
+ defsymbol (&Qdialog, "dialog");
defsymbol (&Qdimension, "dimension");
defsymbol (&Qdisplay, "display");
defsymbol (&Qdoc_string, "doc-string");
defsymbol (&Qfont, "font");
defsymbol (&Qframe, "frame");
defsymbol (&Qfunction, "function");
+ defsymbol (&Qfuncall, "funcall");
defsymbol (&Qgap_overhead, "gap-overhead");
defsymbol (&Qgeneric, "generic");
defsymbol (&Qgeometry, "geometry");
defsymbol (&Qkeyboard, "keyboard");
defsymbol (&Qkeymap, "keymap");
defsymbol (&Qlandscape, "landscape");
+ defsymbol (&Qlast_command, "last-command");
defsymbol (&Qleft, "left");
defsymbol (&Qleft_margin, "left-margin");
+ defsymbol (&Qlet, "let");
defsymbol (&Qlist, "list");
defsymbol (&Qmagic, "magic");
defsymbol (&Qmalloc_overhead, "malloc-overhead");
defsymbol (&Qmarkers, "markers");
defsymbol (&Qmax, "max");
defsymbol (&Qmemory, "memory");
+ defsymbol (&Qmenubar, "menubar");
defsymbol (&Qmessage, "message");
defsymbol (&Qminus, "-");
defsymbol (&Qmodifiers, "modifiers");
defsymbol (&Qpopup, "popup");
defsymbol (&Qportrait, "portrait");
defsymbol (&Qprint, "print");
+ defsymbol (&Qprinter, "printer");
defsymbol (&Qprocess, "process");
defsymbol (&Qprovide, "provide");
defsymbol (&Qrassoc, "rassoc");
defsymbol (&Qterminal, "terminal");
defsymbol (&Qtest, "test");
defsymbol (&Qtext, "text");
+ defsymbol (&Qthis_command, "this-command");
defsymbol (&Qtimeout, "timeout");
defsymbol (&Qtimestamp, "timestamp");
defsymbol (&Qtoolbar, "toolbar");
{
Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
- CONST Extbyte *bytes;
+ const Extbyte *bytes;
Extcount len;
/* #### This is a definite problem under Mule due to the amount of
struct gif_error_struct
{
- CONST char *err_str; /* return the error string */
+ const char *err_str; /* return the error string */
jmp_buf setjmp_buffer; /* for return to caller */
};
static void
-gif_error_func(CONST char *err_str, VoidPtr error_ptr)
+gif_error_func(const char *err_str, VoidPtr error_ptr)
{
struct gif_error_struct *error_data = (struct gif_error_struct*)error_ptr;
struct png_memory_storage
{
- CONST Extbyte *bytes; /* The data */
+ const Extbyte *bytes; /* The data */
Extcount len; /* How big is it? */
int index; /* Where are we? */
};
struct png_error_struct
{
- CONST char *err_str;
+ const char *err_str;
jmp_buf setjmp_buffer; /* for return to caller */
};
/* Initialize the IO layer and read in header information */
{
Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
- CONST Extbyte *bytes;
+ const Extbyte *bytes;
Extcount len;
assert (!NILP (data));
rgblist = MAYBE_LISP_DEVMETH (XDEVICE (c->device),
color_instance_rgb_components,
(c));
- my_background.red = XINT (XCAR (rgblist));
- my_background.green = XINT (XCAR (XCDR (rgblist)));
- my_background.blue = XINT (XCAR (XCDR (XCDR (rgblist))));
+ my_background.red = (unsigned short) XINT (XCAR (rgblist));
+ my_background.green = (unsigned short) XINT (XCAR (XCDR (rgblist)));
+ my_background.blue = (unsigned short) XINT (XCAR (XCDR (XCDR (rgblist))));
}
if (png_get_bKGD (png_ptr, info_ptr, &image_background))
static struct tiff_error_struct tiff_err_data;
static void
-tiff_error_func(CONST char *module, CONST char *fmt, ...)
+tiff_error_func(const char *module, const char *fmt, ...)
{
va_list vargs;
}
static void
-tiff_warning_func(CONST char *module, CONST char *fmt, ...)
+tiff_warning_func(const char *module, const char *fmt, ...)
{
va_list vargs;
#ifdef HAVE_VSNPRINTF
#endif
#ifdef HAVE_XPM
DEFINE_DEVICE_IIFORMAT (mswindows, xpm);
+DEFINE_DEVICE_IIFORMAT (msprinter, xpm);
#endif
DEFINE_DEVICE_IIFORMAT (mswindows, xbm);
+DEFINE_DEVICE_IIFORMAT (msprinter, xbm);
#ifdef HAVE_XFACE
DEFINE_DEVICE_IIFORMAT (mswindows, xface);
+DEFINE_DEVICE_IIFORMAT (msprinter, xface);
#endif
DEFINE_DEVICE_IIFORMAT (mswindows, button);
DEFINE_DEVICE_IIFORMAT (mswindows, edit_field);
enum image_instance_type type);
static void
mswindows_initialize_image_instance_mask (Lisp_Image_Instance* image,
- struct frame* f);
+ HDC hcdc);
+\f
+/*
+ * Given device D, retrieve compatible device context. D can be either
+ * mswindows or an msprinter device.
+ */
+inline static HDC
+get_device_compdc (struct device *d)
+{
+ if (DEVICE_MSWINDOWS_P (d))
+ return DEVICE_MSWINDOWS_HCDC (d);
+ else
+ return DEVICE_MSPRINTER_HCDC (d);
+}
+
+/*
+ * Initialize image instance pixel sizes in II. For a display bitmap,
+ * these will be same as real bitmap sizes. For a printer bitmap,
+ * these will be scaled up so that the bitmap is proportionally enlarged
+ * when output to printer. Redisplay code takes care of scaling, to
+ * conserve memory we do not really scale bitmaps. Set the watermark
+ * only here.
+ * #### Add support for unscalable bitmaps.
+ */
+static void init_image_instance_geometry (Lisp_Image_Instance *ii)
+{
+ Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
+ struct device *d = XDEVICE (device);
+
+ if (/* #### Scaleable && */ DEVICE_MSPRINTER_P (d))
+ {
+ HDC printer_dc = DEVICE_MSPRINTER_HCDC (d);
+ HDC display_dc = CreateCompatibleDC (NULL);
+ IMAGE_INSTANCE_PIXMAP_WIDTH (ii) =
+ MulDiv (IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_WIDTH (ii),
+ GetDeviceCaps (printer_dc, LOGPIXELSX),
+ GetDeviceCaps (display_dc, LOGPIXELSX));
+ IMAGE_INSTANCE_PIXMAP_HEIGHT (ii) =
+ MulDiv (IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_HEIGHT (ii),
+ GetDeviceCaps (printer_dc, LOGPIXELSY),
+ GetDeviceCaps (display_dc, LOGPIXELSY));
+ }
+ else
+ {
+ IMAGE_INSTANCE_PIXMAP_WIDTH (ii) =
+ IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_WIDTH (ii);
+ IMAGE_INSTANCE_PIXMAP_HEIGHT (ii) =
+ IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_HEIGHT (ii);
+ }
+}
#define BPLINE(width) ((int)(~3UL & (unsigned long)((width) +3)))
BITMAPINFO* bmp_info;
unsigned char *ip, *dp;
- if (DEVICE_MSWINDOWS_BITSPIXEL (d) > 0)
+ if (GetDeviceCaps (get_device_compdc (d), BITSPIXEL) > 0)
{
int bpline = BPLINE(width * 3);
/* FIXME: we can do this because 24bpp implies no color table, once
}
/* build up an RGBQUAD colortable */
- for (i = 0; i < qtable->num_active_colors; i++) {
- colortbl[i].rgbRed = (BYTE) qtable->rm[i];
- colortbl[i].rgbGreen = (BYTE) qtable->gm[i];
- colortbl[i].rgbBlue = (BYTE) qtable->bm[i];
- colortbl[i].rgbReserved = 0;
- }
+ for (i = 0; i < qtable->num_active_colors; i++)
+ {
+ colortbl[i].rgbRed = (BYTE) qtable->rm[i];
+ colortbl[i].rgbGreen = (BYTE) qtable->gm[i];
+ colortbl[i].rgbBlue = (BYTE) qtable->bm[i];
+ colortbl[i].rgbReserved = 0;
+ }
/* now build up the data. picture has to be upside-down and
back-to-front for msw bitmaps */
ip = pic;
- for (i = height-1; i >= 0; i--) {
- dp = (*bmp_data) + (i * bpline);
- for (j = 0; j < width; j++) {
- rd = *ip++;
- gr = *ip++;
- bl = *ip++;
- *dp++ = QUANT_GET_COLOR (qtable,rd,gr,bl);
+ for (i = height-1; i >= 0; i--)
+ {
+ dp = (*bmp_data) + (i * bpline);
+ for (j = 0; j < width; j++)
+ {
+ rd = *ip++;
+ gr = *ip++;
+ bl = *ip++;
+ *dp++ = QUANT_GET_COLOR (qtable,rd,gr,bl);
+ }
}
- }
xfree (qtable);
}
/* fix up the standard stuff */
{
Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
struct device *d = XDEVICE (device);
- struct frame *f;
void* bmp_buf=0;
- int type = 0;
+ enum image_instance_type type;
HBITMAP bitmap;
HDC hdc;
- if (!DEVICE_MSWINDOWS_P (d))
- signal_simple_error ("Not an mswindows device", device);
-
- if (NILP (DEVICE_SELECTED_FRAME (d)))
- signal_simple_error ("No selected frame on mswindows device", device);
-
- f = XFRAME (DEVICE_SELECTED_FRAME (d));
-
if (dest_mask & IMAGE_COLOR_PIXMAP_MASK)
type = IMAGE_COLOR_PIXMAP;
else if (dest_mask & IMAGE_POINTER_MASK)
else
incompatible_image_types (instantiator, dest_mask,
IMAGE_COLOR_PIXMAP_MASK | IMAGE_POINTER_MASK);
- hdc = FRAME_MSWINDOWS_CDC (f);
- bitmap=CreateDIBSection (hdc,
- bmp_info,
- DIB_RGB_COLORS,
- &bmp_buf,
- 0,0);
+ hdc = get_device_compdc (d);
+ bitmap = CreateDIBSection (hdc,
+ bmp_info,
+ DIB_RGB_COLORS,
+ &bmp_buf,
+ 0, 0);
if (!bitmap || !bmp_buf)
signal_simple_error ("Unable to create bitmap", instantiator);
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;
- IMAGE_INSTANCE_PIXMAP_DEPTH (ii) = bmp_info->bmiHeader.biBitCount;
+ IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_WIDTH (ii) =
+ bmp_info->bmiHeader.biWidth;
+ IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_HEIGHT (ii) =
+ bmp_info->bmiHeader.biHeight;
+ IMAGE_INSTANCE_PIXMAP_DEPTH (ii) = bmp_info->bmiHeader.biBitCount;
XSETINT (IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii), x_hot);
XSETINT (IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii), y_hot);
+ init_image_instance_geometry (ii);
if (create_mask)
{
- mswindows_initialize_image_instance_mask (ii, f);
+ mswindows_initialize_image_instance_mask (ii, hdc);
}
if (type == IMAGE_POINTER)
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));
+ struct device *d = XDEVICE (IMAGE_INSTANCE_DEVICE (ii));
void* bmp_buf=0;
- HDC hdc = FRAME_MSWINDOWS_CDC (f);
- HBITMAP bitmap = CreateDIBSection (hdc,
+
+ HBITMAP bitmap = CreateDIBSection (get_device_compdc (d),
bmp_info,
DIB_RGB_COLORS,
&bmp_buf,
COLORREF bkcolor;
int slice;
- if (!DEVICE_MSWINDOWS_P (XDEVICE (device)))
- signal_simple_error ("Not an mswindows device", device);
+ CHECK_MSGDI_DEVICE (device);
/* this is a hack but MaskBlt and TransparentBlt are not supported
on most windows variants */
}
}
-static void set_mono_pixel ( unsigned char* bits,
- int bpline, int height,
- int x, int y, int white )
+inline static void
+set_mono_pixel (unsigned char* bits,
+ int bpline, int height,
+ int x, int y, int white)
{
int i;
- unsigned char bitnum;
+ unsigned char bitnum;
/* Find the byte on which this scanline begins */
i = (height - y - 1) * bpline;
/* Find the byte containing this pixel */
i += (x >> 3);
/* Which bit is it? */
- bitnum = (unsigned char)( 7 - (x % 8) );
- if( white ) /* Turn it on */
- bits[i] |= (1<<bitnum);
- else /* Turn it off */
- bits[i] &= ~(1<<bitnum);
+ bitnum = (unsigned char) (7 - (x & 7));
+ if (white) /* Turn it on */
+ bits[i] |= (1 << bitnum);
+ else /* Turn it off */
+ bits[i] &= ~(1 << bitnum);
}
static void
mswindows_initialize_image_instance_mask (Lisp_Image_Instance* image,
- struct frame* f)
+ HDC hcdc)
{
HBITMAP mask;
HGDIOBJ old = NULL;
- HDC hcdc = FRAME_MSWINDOWS_CDC (f);
- unsigned char* dibits;
- BITMAPINFO* bmp_info =
- xmalloc_and_zero (sizeof(BITMAPINFO) + sizeof(RGBQUAD));
+ unsigned char *dibits, *and_bits;
+ BITMAPINFO *bmp_info =
+ (BITMAPINFO*) xmalloc_and_zero (sizeof (BITMAPINFO) + sizeof (RGBQUAD));
int i, j;
- int height = IMAGE_INSTANCE_PIXMAP_HEIGHT (image);
+ int height = IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_HEIGHT (image);
- void* and_bits;
- int maskbpline = BPLINE ((IMAGE_INSTANCE_PIXMAP_WIDTH (image)+7)/8);
- int bpline = BPLINE (IMAGE_INSTANCE_PIXMAP_WIDTH (image) * 3);
+ int maskbpline = BPLINE ((IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_WIDTH (image) + 7) / 8);
+ int bpline = BPLINE (IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_WIDTH (image) * 3);
if (!bmp_info)
return;
- bmp_info->bmiHeader.biWidth=IMAGE_INSTANCE_PIXMAP_WIDTH (image);
+ bmp_info->bmiHeader.biWidth=IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_WIDTH (image);
bmp_info->bmiHeader.biHeight = height;
- bmp_info->bmiHeader.biPlanes=1;
+ bmp_info->bmiHeader.biPlanes = 1;
bmp_info->bmiHeader.biSize=sizeof(BITMAPINFOHEADER);
- bmp_info->bmiHeader.biBitCount=1;
- bmp_info->bmiHeader.biCompression=BI_RGB;
+ bmp_info->bmiHeader.biBitCount = 1;
+ bmp_info->bmiHeader.biCompression = BI_RGB;
bmp_info->bmiHeader.biClrUsed = 2;
bmp_info->bmiHeader.biClrImportant = 2;
bmp_info->bmiHeader.biSizeImage = height * maskbpline;
if (!(mask = CreateDIBSection (hcdc,
bmp_info,
DIB_RGB_COLORS,
- &and_bits,
+ (void**)&and_bits,
0,0)))
{
xfree (bmp_info);
/* build up an in-memory set of bits to mess with */
xzero (*bmp_info);
- bmp_info->bmiHeader.biWidth=IMAGE_INSTANCE_PIXMAP_WIDTH (image);
+ bmp_info->bmiHeader.biWidth = IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_WIDTH (image);
bmp_info->bmiHeader.biHeight = -height;
- bmp_info->bmiHeader.biPlanes=1;
- bmp_info->bmiHeader.biSize=sizeof(BITMAPINFOHEADER);
- bmp_info->bmiHeader.biBitCount=24;
- bmp_info->bmiHeader.biCompression=BI_RGB;
+ bmp_info->bmiHeader.biPlanes = 1;
+ bmp_info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
+ bmp_info->bmiHeader.biBitCount = 24;
+ bmp_info->bmiHeader.biCompression = BI_RGB;
bmp_info->bmiHeader.biClrUsed = 0;
bmp_info->bmiHeader.biClrImportant = 0;
bmp_info->bmiHeader.biSizeImage = height * bpline;
- dibits = xmalloc_and_zero (bpline * height);
+ dibits = (unsigned char*) xmalloc_and_zero (bpline * height);
if (GetDIBits (hcdc,
IMAGE_INSTANCE_MSWINDOWS_BITMAP (image),
0,
/* now set the colored bits in the mask and transparent ones to
black in the original */
- for(i=0; i<IMAGE_INSTANCE_PIXMAP_WIDTH (image); i++)
+ for (i = 0; i < IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_WIDTH (image); i++)
{
- for(j=0; j<height; j++)
+ for (j=0; j<height; j++)
{
unsigned char* idx = &dibits[j * bpline + i * 3];
- if( RGB (idx[2], idx[1], idx[0]) == transparent_color )
+ if (RGB (idx[2], idx[1], idx[0]) == transparent_color)
{
idx[0] = idx[1] = idx[2] = 0;
- set_mono_pixel( and_bits, maskbpline, height, i, j, TRUE );
+ set_mono_pixel (and_bits, maskbpline, height, i, j, TRUE);
}
else
{
- set_mono_pixel( and_bits, maskbpline, height, i, j, FALSE );
+ set_mono_pixel (and_bits, maskbpline, height, i, j, FALSE);
}
}
}
CreateIconIndirect (&x_icon);
}
-HBITMAP
-mswindows_create_resized_bitmap (Lisp_Image_Instance* ii,
- struct frame* f,
- int newx, int newy)
+static HBITMAP
+create_resized_bitmap (HBITMAP curbmp, struct frame *f,
+ int curx, int cury,
+ int newx, int newy)
{
HBITMAP newbmp;
HGDIOBJ old1, old2;
- HDC hcdc = FRAME_MSWINDOWS_CDC (f);
+
+ HDC hcdc = get_device_compdc (XDEVICE (FRAME_DEVICE (f)));
HDC hdcDst = CreateCompatibleDC (hcdc);
- old1 = SelectObject (hcdc, IMAGE_INSTANCE_MSWINDOWS_BITMAP (ii));
+ old1 = SelectObject (hcdc, curbmp);
newbmp = CreateCompatibleBitmap (hcdc, newx, newy);
if (!StretchBlt (hdcDst, 0, 0, newx, newy,
hcdc, 0, 0,
- IMAGE_INSTANCE_PIXMAP_WIDTH (ii),
- IMAGE_INSTANCE_PIXMAP_HEIGHT (ii),
+ curx,
+ cury,
SRCCOPY))
{
DeleteObject (newbmp);
}
HBITMAP
+mswindows_create_resized_bitmap (Lisp_Image_Instance* ii,
+ struct frame* f,
+ int newx, int newy)
+{
+ return create_resized_bitmap (IMAGE_INSTANCE_MSWINDOWS_BITMAP (ii),
+ f,
+ IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_WIDTH (ii),
+ IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_HEIGHT (ii),
+ newx, newy);
+}
+
+HBITMAP
mswindows_create_resized_mask (Lisp_Image_Instance* ii,
struct frame* f,
int newx, int newy)
{
- if (IMAGE_INSTANCE_MSWINDOWS_MASK (ii))
- {
- HBITMAP newmask;
- HGDIOBJ old1, old2;
- HDC hcdc = FRAME_MSWINDOWS_CDC (f);
- HDC hdcDst = CreateCompatibleDC (hcdc);
-
- old1 = SelectObject (hcdc, IMAGE_INSTANCE_MSWINDOWS_MASK (ii));
- newmask = CreateCompatibleBitmap(hcdc, newx, newy);
- old2 = SelectObject (hdcDst, newmask);
-
- if (!StretchBlt(hdcDst, 0, 0, newx, newy,
- hcdc, 0, 0,
- IMAGE_INSTANCE_PIXMAP_WIDTH (ii),
- IMAGE_INSTANCE_PIXMAP_HEIGHT (ii),
- SRCCOPY))
- {
- DeleteObject (newmask);
- DeleteDC (hdcDst);
- return NULL;
- }
-
- SelectObject (hdcDst, old2);
- SelectObject (hcdc, old1);
-
- DeleteDC (hdcDst);
-
- return newmask;
- }
+ if (IMAGE_INSTANCE_MSWINDOWS_MASK (ii) == NULL)
+ return NULL;
- return NULL;
+ return create_resized_bitmap (IMAGE_INSTANCE_MSWINDOWS_MASK (ii),
+ f,
+ IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_WIDTH (ii),
+ IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_HEIGHT (ii),
+ newx, newy);
}
+#if 0 /* Currently unused */
+/* #### Warining: This function is not correct anymore with
+ resizable printer bitmaps. If you uncomment it, clean it. --kkm */
int
mswindows_resize_dibitmap_instance (Lisp_Image_Instance* ii,
struct frame* f,
return TRUE;
}
+#endif
/**********************************************************************
* XPM *
return colortbl;
}
-static int xpm_to_eimage (Lisp_Object image, CONST Extbyte *buffer,
+static int xpm_to_eimage (Lisp_Object image, const Extbyte *buffer,
unsigned char** data,
int* width, int* height,
int* x_hot, int* y_hot,
default:
{
signal_double_file_error_2 ("Parsing pixmap data",
- "unknown error code",
+ "unknown error",
make_int (result), image);
}
}
{
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
- CONST Extbyte *bytes;
+ const Extbyte *bytes;
Extcount len;
unsigned char *eimage;
int width, height, x_hot, y_hot;
Lisp_Object color_symbol_alist = find_keyword_in_vector (instantiator,
Q_color_symbols);
- if (!DEVICE_MSWINDOWS_P (XDEVICE (device)))
- signal_simple_error ("Not an mswindows device", device);
+ CHECK_MSGDI_DEVICE (device);
assert (!NILP (data));
{
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
- CONST Extbyte *bytes;
+ const Extbyte *bytes;
Extcount len;
BITMAPFILEHEADER* bmp_file_header;
BITMAPINFO* bmp_info;
int bmp_bits;
Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
- if (!DEVICE_MSWINDOWS_P (XDEVICE (device)))
- signal_simple_error ("Not an mswindows device", device);
+ CHECK_MSGDI_DEVICE (device);
assert (!NILP (data));
#endif
#endif
-static CONST resource_t bitmap_table[] =
+static const resource_t bitmap_table[] =
{
/* bitmaps */
{ "close", OBM_CLOSE },
{0}
};
-static CONST resource_t cursor_table[] =
+static const resource_t cursor_table[] =
{
/* cursors */
{ "normal", OCR_NORMAL },
{ 0 }
};
-static CONST resource_t icon_table[] =
+static const resource_t icon_table[] =
{
/* icons */
{ "sample", OIC_SAMPLE },
static int resource_name_to_resource (Lisp_Object name, int type)
{
- CONST resource_t* res = (type == IMAGE_CURSOR ? cursor_table
+ const resource_t* res = (type == IMAGE_CURSOR ? cursor_table
: type == IMAGE_ICON ? icon_table
: bitmap_table);
LPCTSTR resid=0;
HINSTANCE hinst = NULL;
ICONINFO iconinfo;
- int iitype=0;
+ enum image_instance_type iitype;
char* fname=0;
Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
xzero (iconinfo);
- if (!DEVICE_MSWINDOWS_P (XDEVICE (device)))
- signal_simple_error ("Not an mswindows device", device);
+ CHECK_MSGDI_DEVICE (device);
type = resource_symbol_to_type (resource_type);
mswindows_initialize_dibitmap_image_instance (ii, 1, iitype);
IMAGE_INSTANCE_PIXMAP_FILENAME (ii) = file;
- IMAGE_INSTANCE_PIXMAP_WIDTH (ii) =
+ IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_WIDTH (ii) =
GetSystemMetrics (type == IMAGE_CURSOR ? SM_CXCURSOR : SM_CXICON);
- IMAGE_INSTANCE_PIXMAP_HEIGHT (ii) =
+ IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_HEIGHT (ii) =
GetSystemMetrics (type == IMAGE_CURSOR ? SM_CYCURSOR : SM_CYICON);
IMAGE_INSTANCE_PIXMAP_DEPTH (ii) = 1;
+ init_image_instance_geometry (ii);
/* hey, we've got an icon type thing so we can reverse engineer the
bitmap and mask */
if (type != IMAGE_BITMAP)
{
- GetIconInfo (himage, &iconinfo);
+ GetIconInfo ((HICON)himage, &iconinfo);
IMAGE_INSTANCE_MSWINDOWS_BITMAP (ii) = iconinfo.hbmColor;
IMAGE_INSTANCE_MSWINDOWS_MASK (ii) = iconinfo.hbmMask;
XSETINT (IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii), iconinfo.xHotspot);
XSETINT (IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii), iconinfo.yHotspot);
- IMAGE_INSTANCE_MSWINDOWS_ICON (ii) = himage;
+ IMAGE_INSTANCE_MSWINDOWS_ICON (ii) = (HICON) himage;
}
else
{
IMAGE_INSTANCE_MSWINDOWS_ICON (ii) = NULL;
- IMAGE_INSTANCE_MSWINDOWS_BITMAP (ii) = himage;
+ IMAGE_INSTANCE_MSWINDOWS_BITMAP (ii) = (HBITMAP) himage;
IMAGE_INSTANCE_MSWINDOWS_MASK (ii) = NULL;
XSETINT (IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii), 0);
XSETINT (IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii), 0);
* Table index for the hex values. Initialized once, first time.
* Used for translation value or delimiter significance lookup.
*/
-static void initHexTable()
+static void
+initHexTable (void)
{
/*
* We build the table at run time for several reasons:
/*
* read next hex value in the input stream, return -1 if EOF
*/
-static int NextInt ( FILE *fstream )
+static int
+NextInt (FILE *fstream)
{
int ch;
int value = 0;
* its arguments won't have been touched. This routine should look as much
* like the Xlib routine XReadBitmapfile as possible.
*/
-int read_bitmap_data (fstream, width, height, datap, x_hot, y_hot)
- FILE *fstream; /* handle on file */
- unsigned int *width, *height; /* RETURNED */
- unsigned char **datap; /* RETURNED */
- int *x_hot, *y_hot; /* RETURNED */
+int read_bitmap_data (FILE* fstream, unsigned int *width,
+ unsigned int *height, unsigned char **datap,
+ int *x_hot, int *y_hot)
{
unsigned char *data = NULL; /* working variable */
char line[MAX_SIZE]; /* input line from file */
}
-int read_bitmap_data_from_file (CONST char *filename, unsigned int *width,
+int read_bitmap_data_from_file (const char *filename, unsigned int *width,
unsigned int *height, unsigned char **datap,
int *x_hot, int *y_hot)
{
void *bmp_buf = 0;
unsigned char *new_data, *new_offset;
int i, j;
- BITMAPINFO* bmp_info =
- xmalloc_and_zero (sizeof(BITMAPINFO) + sizeof(RGBQUAD));
+ BITMAPINFO *bmp_info =
+ (BITMAPINFO*) xmalloc_and_zero (sizeof(BITMAPINFO) + sizeof(RGBQUAD));
HBITMAP bitmap;
if (!bmp_info)
init_image_instance_from_xbm_inline (Lisp_Image_Instance *ii,
int width, int height,
/* Note that data is in ext-format! */
- CONST char *bits,
+ const char *bits,
Lisp_Object instantiator,
Lisp_Object pointer_fg,
Lisp_Object pointer_bg,
Lisp_Object mask_filename)
{
Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
- struct frame* f = XFRAME (DEVICE_SELECTED_FRAME (XDEVICE (device)));
Lisp_Object foreground = find_keyword_in_vector (instantiator, Q_foreground);
Lisp_Object background = find_keyword_in_vector (instantiator, Q_background);
enum image_instance_type type;
COLORREF black = PALETTERGB (0,0,0);
COLORREF white = PALETTERGB (255,255,255);
+ HDC hdc;
- HDC hdc = FRAME_MSWINDOWS_CDC (f);
+ CHECK_MSGDI_DEVICE (device);
- if (!DEVICE_MSWINDOWS_P (XDEVICE (device)))
- signal_simple_error ("Not an MS-Windows device", device);
+ hdc = get_device_compdc (XDEVICE (device));
if ((dest_mask & IMAGE_MONO_PIXMAP_MASK) &&
(dest_mask & IMAGE_COLOR_PIXMAP_MASK))
IMAGE_INSTANCE_PIXMAP_FILENAME (ii) =
find_keyword_in_vector (instantiator, Q_file);
- IMAGE_INSTANCE_PIXMAP_WIDTH (ii) = width;
- IMAGE_INSTANCE_PIXMAP_HEIGHT (ii) = height;
+ IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_WIDTH (ii) = width;
+ IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_HEIGHT (ii) = height;
IMAGE_INSTANCE_PIXMAP_DEPTH (ii) = 1;
XSETINT (IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii), 0);
XSETINT (IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii), 0);
+ init_image_instance_geometry (ii);
+
IMAGE_INSTANCE_MSWINDOWS_MASK (ii) = mask ? mask :
xbm_create_bitmap_from_data (hdc, (Extbyte *) bits, width, height,
TRUE, black, white);
Lisp_Object pointer_fg, Lisp_Object pointer_bg,
int dest_mask, int width, int height,
/* Note that data is in ext-format! */
- CONST char *bits)
+ const char *bits)
{
Lisp_Object mask_data = find_keyword_in_vector (instantiator, Q_mask_data);
Lisp_Object mask_file = find_keyword_in_vector (instantiator, Q_mask_file);
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
- struct frame* f = XFRAME (DEVICE_SELECTED_FRAME
- (XDEVICE (IMAGE_INSTANCE_DEVICE (ii))));
- HDC hdc = FRAME_MSWINDOWS_CDC (f);
+ HDC hdc = get_device_compdc (XDEVICE (IMAGE_INSTANCE_DEVICE (ii)));
HBITMAP mask = 0;
if (!NILP (mask_data))
{
- CONST char *ext_data;
+ const char *ext_data;
TO_EXTERNAL_FORMAT (LISP_STRING, XCAR (XCDR (XCDR (mask_data))),
C_STRING_ALLOCA, ext_data,
int dest_mask, Lisp_Object domain)
{
Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
- CONST char *ext_data;
+ const char *ext_data;
assert (!NILP (data));
Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
int i, stattis;
char *p, *bits, *bp;
- CONST char * volatile emsg = 0;
- CONST char * volatile dstring;
+ const char * volatile emsg = 0;
+ const char * volatile dstring;
assert (!NILP (data));
| SWP_NOCOPYBITS | SWP_NOSENDCHANGING);
}
+/* Simply resize the window here. */
+static void
+mswindows_update_subwindow (Lisp_Image_Instance *p)
+{
+ mswindows_resize_subwindow (p,
+ IMAGE_INSTANCE_WIDTH (p),
+ IMAGE_INSTANCE_HEIGHT (p));
+}
+
/* when you click on a widget you may activate another widget this
needs to be checked and all appropriate widgets updated */
static void
-mswindows_update_subwindow (Lisp_Image_Instance *p)
+mswindows_update_widget (Lisp_Image_Instance *p)
{
- /* Now do widget specific updates. */
- if (IMAGE_INSTANCE_TYPE (p) == IMAGE_WIDGET)
+ /* Possibly update the face font and colors. */
+ if (IMAGE_INSTANCE_WIDGET_FACE_CHANGED (p)
+ ||
+ XFRAME (IMAGE_INSTANCE_SUBWINDOW_FRAME (p))->faces_changed
+ ||
+ IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (p))
{
- /* buttons checked or otherwise */
- if ( EQ (IMAGE_INSTANCE_WIDGET_TYPE (p), Qbutton))
- {
- 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) mswindows_widget_hfont
- (p, IMAGE_INSTANCE_SUBWINDOW_FRAME (p)),
+ (p, IMAGE_INSTANCE_SUBWINDOW_FRAME (p)),
MAKELPARAM (TRUE, 0));
}
+ /* Possibly update the dimensions. */
+ if (IMAGE_INSTANCE_SIZE_CHANGED (p))
+ {
+ mswindows_resize_subwindow (p,
+ IMAGE_INSTANCE_WIDTH (p),
+ IMAGE_INSTANCE_HEIGHT (p));
+ }
+ /* Possibly update the text in the widget. */
+ if (IMAGE_INSTANCE_TEXT_CHANGED (p))
+ {
+ Extbyte* lparam=0;
+ TO_EXTERNAL_FORMAT (LISP_STRING, IMAGE_INSTANCE_WIDGET_TEXT (p),
+ C_STRING_ALLOCA, lparam,
+ Qnative);
+ SendMessage (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p),
+ WM_SETTEXT, 0, (LPARAM)lparam);
+ }
}
/* register widgets into our hastable so that we can cope with the
callbacks. The hashtable is weak so deregistration is handled
automatically */
static int
-mswindows_register_gui_item (Lisp_Object gui, Lisp_Object domain)
+mswindows_register_gui_item (Lisp_Object image_instance,
+ Lisp_Object gui, Lisp_Object domain)
{
Lisp_Object frame = FW_FRAME (domain);
struct frame* f = XFRAME (frame);
- int id = gui_item_id_hash (FRAME_MSWINDOWS_WIDGET_HASH_TABLE (f),
+ int id = gui_item_id_hash (FRAME_MSWINDOWS_WIDGET_HASH_TABLE2 (f),
gui,
WIDGET_GLYPH_SLOT);
- Fputhash (make_int (id),
- XGUI_ITEM (gui)->callback,
- FRAME_MSWINDOWS_WIDGET_HASH_TABLE (f));
+ Fputhash (make_int (id), image_instance,
+ FRAME_MSWINDOWS_WIDGET_HASH_TABLE1 (f));
+ Fputhash (make_int (id), XGUI_ITEM (gui)->callback,
+ FRAME_MSWINDOWS_WIDGET_HASH_TABLE2 (f));
+ Fputhash (make_int (id), XGUI_ITEM (gui)->callback_ex,
+ FRAME_MSWINDOWS_WIDGET_HASH_TABLE3 (f));
return id;
}
static int
mswindows_register_widget_instance (Lisp_Object instance, Lisp_Object domain)
{
- return mswindows_register_gui_item (XIMAGE_INSTANCE_WIDGET_ITEM (instance),
+ return mswindows_register_gui_item (instance,
+ XIMAGE_INSTANCE_WIDGET_ITEM (instance),
domain);
}
{
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
- struct device* d = XDEVICE (device);
Lisp_Object frame = FW_FRAME (domain);
HWND wnd;
- if (!DEVICE_MSWINDOWS_P (d))
- signal_simple_error ("Not an mswindows device", device);
+ CHECK_MSWINDOWS_DEVICE (device);
/* have to set the type this late in case there is no device
instantiation for a widget */
mswindows_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
Lisp_Object pointer_fg, Lisp_Object pointer_bg,
int dest_mask, Lisp_Object domain,
- CONST char* class, int flags, int exflags)
+ const char* class, int flags, int exflags)
{
/* this function can call lisp */
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii), style;
- struct device* d = XDEVICE (device);
Lisp_Object frame = FW_FRAME (domain);
Extbyte* nm=0;
HWND wnd;
Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii);
Lisp_Gui_Item* pgui = XGUI_ITEM (gui);
- if (!DEVICE_MSWINDOWS_P (d))
- signal_simple_error ("Not an mswindows device", device);
+ CHECK_MSWINDOWS_DEVICE (device);
if (!gui_item_active_p (gui))
flags |= WS_DISABLED;
style = pgui->style;
- if (!NILP (pgui->callback))
+ if (!NILP (pgui->callback) || !NILP (pgui->callback_ex))
{
id = mswindows_register_widget_instance (image_instance, domain);
}
Lisp_Object pointer_fg, Lisp_Object pointer_bg,
int dest_mask, Lisp_Object domain)
{
- /* this function can call lisp */
+ /* This function can call lisp */
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
HWND wnd;
int flags = WS_TABSTOP;/* BS_NOTIFY #### is needed to get exotic feedback
}
}
+/* Update the state of a button. */
+static void
+mswindows_button_update (Lisp_Object image_instance)
+{
+ /* This function can GC if IN_REDISPLAY is false. */
+ Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+
+ /* buttons checked or otherwise */
+ if (gui_item_selected_p (IMAGE_INSTANCE_WIDGET_ITEM (ii)))
+ SendMessage (WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii),
+ BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
+ else
+ SendMessage (WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii),
+ BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0);
+}
+
/* instantiate an edit control */
static void
mswindows_edit_field_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
if (GUI_ITEMP (item))
{
- tvitem.item.lParam = mswindows_register_gui_item (item, domain);
+ tvitem.item.lParam = mswindows_register_gui_item (image_instance,
+ item, domain);
tvitem.item.mask |= TVIF_PARAM;
TO_EXTERNAL_FORMAT (LISP_STRING, XGUI_ITEM (item)->name,
C_STRING_ALLOCA, tvitem.item.pszText,
if (GUI_ITEMP (item))
{
- tvitem.lParam = mswindows_register_gui_item (item, domain);
+ tvitem.lParam = mswindows_register_gui_item (image_instance,
+ item, domain);
tvitem.mask |= TCIF_PARAM;
TO_EXTERNAL_FORMAT (LISP_STRING, XGUI_ITEM (item)->name,
C_STRING_ALLOCA, tvitem.pszText,
Lisp_Object pointer_fg, Lisp_Object pointer_bg,
int dest_mask, Lisp_Object domain)
{
+ /* This function can call lisp */
Lisp_Object rest;
HWND wnd;
- int i = 0;
+ int i = 0, selected = 0;
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
Lisp_Object orient = find_keyword_in_vector (instantiator, Q_orientation);
unsigned int flags = WS_TABSTOP;
pointer_bg, dest_mask, domain, WC_TABCONTROL,
/* borders don't suit tabs so well */
flags, 0);
-
wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
/* add items to the tab */
LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)))
{
add_tab_item (image_instance, wnd, XCAR (rest), domain, i);
+ if (gui_item_selected_p (XCAR (rest)))
+ selected = i;
i++;
}
+ SendMessage (wnd, TCM_SETCURSEL, selected, 0);
}
/* set the properties of a tab control */
-static Lisp_Object
-mswindows_tab_control_set_property (Lisp_Object image_instance, Lisp_Object prop,
- Lisp_Object val)
+static void
+mswindows_tab_control_update (Lisp_Object image_instance)
{
+ /* This function can GC if IN_REDISPLAY is false. */
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
- if (EQ (prop, Q_items))
+ if (IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii))
{
HWND wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
- int i = 0;
+ int i = 0, selected = 0;
Lisp_Object rest;
- check_valid_item_list_1 (val);
/* 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, XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)))
+ LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)))
{
add_tab_item (image_instance, wnd, XCAR (rest),
IMAGE_INSTANCE_SUBWINDOW_FRAME (ii), i);
+ if (gui_item_selected_p (XCAR (rest)))
+ selected = i;
i++;
}
-
- return Qt;
+ SendMessage (wnd, TCM_SETCURSEL, selected, 0);
}
- return Qunbound;
}
/* instantiate a static control possible for putting other things in */
int dest_mask, Lisp_Object domain)
{
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
- HANDLE wnd;
+ HWND wnd;
Lisp_Object rest;
Lisp_Object data = Fplist_get (find_keyword_in_vector (instantiator, Q_properties),
Q_items, Qnil);
mswindows_widget_property (Lisp_Object image_instance, Lisp_Object prop)
{
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
- HANDLE wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
+ HWND wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
/* get the text from a control */
if (EQ (prop, Q_text))
{
Extcount len = SendMessage (wnd, WM_GETTEXTLENGTH, 0, 0);
- Extbyte* buf =alloca (len+1);
+ Extbyte *buf = (Extbyte*) alloca (len+1);
SendMessage (wnd, WM_GETTEXT, (WPARAM)len+1, (LPARAM) buf);
return build_ext_string (buf, Qnative);
mswindows_button_property (Lisp_Object image_instance, Lisp_Object prop)
{
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
- HANDLE wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
+ HWND wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
/* check the state of a button */
if (EQ (prop, Q_selected))
{
mswindows_combo_box_property (Lisp_Object image_instance, Lisp_Object prop)
{
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
- HANDLE wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
+ HWND wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
/* get the text from a control */
if (EQ (prop, Q_text))
{
long item = SendMessage (wnd, CB_GETCURSEL, 0, 0);
Extcount len = SendMessage (wnd, CB_GETLBTEXTLEN, (WPARAM)item, 0);
- Extbyte* buf = alloca (len+1);
+ Extbyte* buf = (Extbyte*) alloca (len+1);
SendMessage (wnd, CB_GETLBTEXT, (WPARAM)item, (LPARAM)buf);
return build_ext_string (buf, Qnative);
}
return Qunbound;
}
-/* set the properties of a control */
-static Lisp_Object
-mswindows_widget_set_property (Lisp_Object image_instance, Lisp_Object prop,
- Lisp_Object val)
-{
- Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
-
- if (EQ (prop, Q_text))
- {
- Extbyte* lparam=0;
- CHECK_STRING (val);
- TO_EXTERNAL_FORMAT (LISP_STRING, val,
- C_STRING_ALLOCA, lparam,
- Qnative);
- SendMessage (WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii),
- WM_SETTEXT, 0, (LPARAM)lparam);
- /* We don't return Qt here so that other widget methods can be
- called afterwards. */
- }
- return Qunbound;
-}
-
/* set the properties of a progres guage */
-static Lisp_Object
-mswindows_progress_gauge_set_property (Lisp_Object image_instance, Lisp_Object prop,
- Lisp_Object val)
+static void
+mswindows_progress_gauge_update (Lisp_Object image_instance)
{
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
-
- if (EQ (prop, Q_percent))
+
+ if (IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii))
{
+ Lisp_Object val;
+#ifdef ERROR_CHECK_GLYPHS
+ assert (GUI_ITEMP (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)));
+#endif
+ val = XGUI_ITEM (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii))->value;
+#ifdef DEBUG_WIDGET_OUTPUT
+ printf ("progress gauge displayed value on %p updated to %ld\n",
+ WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii),
+ XINT(val));
+#endif
CHECK_INT (val);
SendMessage (WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii),
PBM_SETPOS, (WPARAM)XINT (val), 0);
- return Qt;
}
- return Qunbound;
}
LRESULT WINAPI
void
console_type_create_glyphs_mswindows (void)
{
- /* image methods */
-
+ /* image methods - display */
CONSOLE_HAS_METHOD (mswindows, print_image_instance);
CONSOLE_HAS_METHOD (mswindows, finalize_image_instance);
CONSOLE_HAS_METHOD (mswindows, unmap_subwindow);
CONSOLE_HAS_METHOD (mswindows, map_subwindow);
CONSOLE_HAS_METHOD (mswindows, update_subwindow);
+ CONSOLE_HAS_METHOD (mswindows, resize_subwindow);
+ CONSOLE_HAS_METHOD (mswindows, update_widget);
CONSOLE_HAS_METHOD (mswindows, image_instance_equal);
CONSOLE_HAS_METHOD (mswindows, image_instance_hash);
CONSOLE_HAS_METHOD (mswindows, init_image_instance_from_eimage);
CONSOLE_HAS_METHOD (mswindows, locate_pixmap_file);
- CONSOLE_HAS_METHOD (mswindows, resize_subwindow);
+
+ /* image methods - printer */
+ CONSOLE_INHERITS_METHOD (msprinter, mswindows, print_image_instance);
+ CONSOLE_INHERITS_METHOD (msprinter, mswindows, finalize_image_instance);
+ CONSOLE_INHERITS_METHOD (msprinter, mswindows, image_instance_equal);
+ CONSOLE_INHERITS_METHOD (msprinter, mswindows, image_instance_hash);
+ CONSOLE_INHERITS_METHOD (msprinter, mswindows, init_image_instance_from_eimage);
+ CONSOLE_INHERITS_METHOD (msprinter, mswindows, locate_pixmap_file);
}
void
image_instantiator_format_create_glyphs_mswindows (void)
{
- IIFORMAT_VALID_CONSOLE (mswindows, nothing);
- IIFORMAT_VALID_CONSOLE (mswindows, string);
- IIFORMAT_VALID_CONSOLE (mswindows, layout);
- IIFORMAT_VALID_CONSOLE (mswindows, formatted_string);
- IIFORMAT_VALID_CONSOLE (mswindows, inherit);
+ IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, nothing);
+ IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, string);
+ IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, layout);
+ IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, formatted_string);
+ IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, inherit);
/* image-instantiator types */
+ INITIALIZE_DEVICE_IIFORMAT (mswindows, xbm);
+ INITIALIZE_DEVICE_IIFORMAT (msprinter, xbm);
+ IIFORMAT_HAS_DEVMETHOD (mswindows, xbm, instantiate);
+ IIFORMAT_INHERITS_DEVMETHOD (msprinter, mswindows, xbm, instantiate);
#ifdef HAVE_XPM
INITIALIZE_DEVICE_IIFORMAT (mswindows, xpm);
+ INITIALIZE_DEVICE_IIFORMAT (msprinter, xpm);
IIFORMAT_HAS_DEVMETHOD (mswindows, xpm, instantiate);
+ IIFORMAT_INHERITS_DEVMETHOD (msprinter, mswindows, xpm, instantiate);
#endif
- INITIALIZE_DEVICE_IIFORMAT (mswindows, xbm);
- IIFORMAT_HAS_DEVMETHOD (mswindows, xbm, instantiate);
#ifdef HAVE_XFACE
INITIALIZE_DEVICE_IIFORMAT (mswindows, xface);
+ INITIALIZE_DEVICE_IIFORMAT (msprinter, xface);
IIFORMAT_HAS_DEVMETHOD (mswindows, xface, instantiate);
+ IIFORMAT_INHERITS_DEVMETHOD (msprinter, mswindows, xface, instantiate);
#endif
#ifdef HAVE_JPEG
- IIFORMAT_VALID_CONSOLE (mswindows, jpeg);
+ IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, jpeg);
#endif
#ifdef HAVE_TIFF
- IIFORMAT_VALID_CONSOLE (mswindows, tiff);
+ IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, tiff);
#endif
#ifdef HAVE_PNG
- IIFORMAT_VALID_CONSOLE (mswindows, png);
+ IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, png);
#endif
#ifdef HAVE_GIF
- IIFORMAT_VALID_CONSOLE (mswindows, gif);
+ IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, gif);
#endif
#ifdef HAVE_WIDGETS
/* button widget */
INITIALIZE_DEVICE_IIFORMAT (mswindows, button);
IIFORMAT_HAS_DEVMETHOD (mswindows, button, property);
IIFORMAT_HAS_DEVMETHOD (mswindows, button, instantiate);
+ IIFORMAT_HAS_DEVMETHOD (mswindows, button, update);
INITIALIZE_DEVICE_IIFORMAT (mswindows, edit_field);
IIFORMAT_HAS_DEVMETHOD (mswindows, edit_field, instantiate);
INITIALIZE_DEVICE_IIFORMAT (mswindows, widget);
IIFORMAT_HAS_DEVMETHOD (mswindows, widget, property);
- IIFORMAT_HAS_DEVMETHOD (mswindows, widget, set_property);
/* label */
INITIALIZE_DEVICE_IIFORMAT (mswindows, label);
/* progress gauge */
INITIALIZE_DEVICE_IIFORMAT (mswindows, progress_gauge);
- IIFORMAT_HAS_DEVMETHOD (mswindows, progress_gauge, set_property);
+ IIFORMAT_HAS_DEVMETHOD (mswindows, progress_gauge, update);
IIFORMAT_HAS_DEVMETHOD (mswindows, progress_gauge, instantiate);
/* tree view widget */
/* tab control widget */
INITIALIZE_DEVICE_IIFORMAT (mswindows, tab_control);
IIFORMAT_HAS_DEVMETHOD (mswindows, tab_control, instantiate);
- IIFORMAT_HAS_DEVMETHOD (mswindows, tab_control, set_property);
+ IIFORMAT_HAS_DEVMETHOD (mswindows, tab_control, update);
#endif
/* windows bitmap format */
INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (bmp, "bmp");
IIFORMAT_VALID_KEYWORD (bmp, Q_data, check_valid_string);
IIFORMAT_VALID_KEYWORD (bmp, Q_file, check_valid_string);
- IIFORMAT_VALID_CONSOLE (mswindows, bmp);
+ IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, bmp);
/* mswindows resources */
INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (mswindows_resource,
check_valid_resource_symbol);
IIFORMAT_VALID_KEYWORD (mswindows_resource, Q_resource_id, check_valid_resource_id);
IIFORMAT_VALID_KEYWORD (mswindows_resource, Q_file, check_valid_string);
- IIFORMAT_VALID_CONSOLE (mswindows, mswindows_resource);
+ IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, mswindows_resource);
}
void
{
HBITMAP* bitmaps;
HICON icon;
+ int real_width, real_height;
};
#define MSWINDOWS_IMAGE_INSTANCE_DATA(i) \
#define IMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICES(i) \
(MSWINDOWS_IMAGE_INSTANCE_DATA (i)->bitmaps)
#define IMAGE_INSTANCE_MSWINDOWS_MASK(i) \
- (HBITMAP)(IMAGE_INSTANCE_PIXMAP_MASK (i))
+ (*(HBITMAP*)&(IMAGE_INSTANCE_PIXMAP_MASK (i))) /* Make it lvalue */
#define IMAGE_INSTANCE_MSWINDOWS_ICON(i) \
(MSWINDOWS_IMAGE_INSTANCE_DATA (i)->icon)
+#define IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_WIDTH(i) \
+ (MSWINDOWS_IMAGE_INSTANCE_DATA (i)->real_width)
+#define IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_HEIGHT(i) \
+ (MSWINDOWS_IMAGE_INSTANCE_DATA (i)->real_height)
#define XIMAGE_INSTANCE_MSWINDOWS_BITMAP(i) \
IMAGE_INSTANCE_MSWINDOWS_BITMAP (XIMAGE_INSTANCE (i))
Lisp_Object Qlayout;
Lisp_Object Q_descriptor, Q_height, Q_width, Q_properties, Q_items;
-Lisp_Object Q_image, Q_text, Q_percent, Q_orientation, Q_justify, Q_border;
+Lisp_Object Q_image, Q_text, Q_orientation, Q_justify, Q_border;
Lisp_Object Qetched_in, Qetched_out, Qbevel_in, Qbevel_out;
+Lisp_Object Vwidget_callback_current_channel;
+Lisp_Object Qwidget_callback_current_channel;
#ifdef DEBUG_WIDGETS
int debug_widget_instances;
}
static void
+check_valid_int_or_function (Lisp_Object data)
+{
+ if (!INTP (data) && !CONSP (data))
+ signal_simple_error ("must be an integer or expresssion", data);
+}
+
+static void
check_valid_symbol (Lisp_Object data)
{
CHECK_SYMBOL (data);
if (EQ (prop, Q_text))
{
IMAGE_INSTANCE_WIDGET_TEXT (ii) = val;
+ IMAGE_INSTANCE_TEXT_CHANGED (ii) = 1;
}
/* Now try device specific methods first ... */
return val;
}
+/* Like the rest of redisplay, we want widget updates to occur
+asynchronously. Thus toolkit specific methods for setting properties
+must be called by redisplay instead of by *_set_property. Thus
+*_set_property records the change and this function actually
+implements it. We want to be slightly clever about this however by
+supplying format specific functions for the updates instead of lumping
+them all into this function. Note that there is no need for format
+generic functions. */
+void
+update_widget (Lisp_Object widget)
+{
+ Lisp_Image_Instance* ii = XIMAGE_INSTANCE (widget);
+ struct image_instantiator_methods* meths;
+
+ if (IMAGE_INSTANCE_TYPE (ii) != IMAGE_WIDGET)
+ return;
+
+ /* Device generic methods. We must update the widget's size as it
+ may have been changed by the the layout routines. We also do this
+ here so that explicit resizing from lisp does not result in
+ synchronous updates. */
+ MAYBE_DEVMETH (XDEVICE (ii->device), update_widget, (ii));
+
+ /* Device-format specific methods */
+ meths = decode_device_ii_format (IMAGE_INSTANCE_DEVICE (ii),
+ IMAGE_INSTANCE_WIDGET_TYPE (ii),
+ ERROR_ME_NOT);
+ MAYBE_IIFORMAT_METH (meths, update, (widget));
+
+ /* Pick up the items we recorded earlier. */
+ if (IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii))
+ {
+ IMAGE_INSTANCE_WIDGET_ITEMS (ii) =
+ IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii);
+ IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii) = Qnil;
+ }
+}
+
/* Query for a widgets desired geometry. If no type specific method is
provided then use the widget text to calculate sizes. */
static void
{
Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance);
struct image_instantiator_methods* meths;
+ Lisp_Object dynamic_width = Qnil;
+ Lisp_Object dynamic_height = Qnil;
/* First just set up what we already have. */
if (width) *width = IMAGE_INSTANCE_WIDTH (ii);
*height = h + 2 * WIDGET_BORDER_HEIGHT;
}
}
+ /* Finish off with dynamic sizing. */
+ if (!NILP (IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (ii)))
+ {
+ dynamic_width = Feval (IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (ii));
+ if (INTP (dynamic_width))
+ *width = XINT (dynamic_width);
+ }
+ if (!NILP (IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (ii)))
+ {
+ dynamic_height = Feval (IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (ii));
+ if (INTP (dynamic_height))
+ *height = XINT (dynamic_height);
+ }
}
}
IMAGE_INSTANCE_WIDGET_PROPS (ii) = Qnil;
SET_IMAGE_INSTANCE_WIDGET_FACE (ii, Qnil);
IMAGE_INSTANCE_WIDGET_ITEMS (ii) = allocate_gui_item ();
+ IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii) = Qnil;
+ IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (ii) = Qnil;
+ IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (ii) = Qnil;
IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii) = 1;
IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP (ii) = 1;
- IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii) = 0;
+ IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii) = LAYOUT_HORIZONTAL;
IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (ii) = 0;
}
/* 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. */
- children = Fcons (glyph_image_instance (border, domain, ERROR_ME, 1),
- children);
+ Lisp_Object gii = glyph_image_instance (border, domain, ERROR_ME, 1);
+ /* make sure we are designated as the parent. */
+ XIMAGE_INSTANCE_PARENT (gii) = image_instance;
+ children = Fcons (gii, children);
IMAGE_INSTANCE_LAYOUT_BORDER (ii) = make_int (0);
}
else
{
/* make sure the image is instantiated */
Lisp_Object gii = glyph_image_instance (XCAR (rest), domain, ERROR_ME, 1);
+ /* make sure we are designated as the parent. */
+ XIMAGE_INSTANCE_PARENT (gii) = image_instance;
children = Fcons (gii, children);
- /* Make sure elements in the layout are in the order the
- user expected. */
- children = Fnreverse (children);
}
+ /* Make sure elements in the layout are in the order the
+ user expected. */
+ children = Fnreverse (children);
IMAGE_INSTANCE_LAYOUT_CHILDREN (ii) = children;
}
/* retrieve the gui item information. This is easy if we have been
/* Pick up the orientation before we do our first layout. */
if (EQ (orient, Qleft) || EQ (orient, Qright) || EQ (orient, Qvertical))
- IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii) = 1;
+ IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii) = LAYOUT_VERTICAL;
/* parse more gui items out of the properties */
if (!NILP (props)
geometry gets called. */
if (!NILP (pixwidth)) /* pixwidth takes precendent */
{
- pw = XINT (pixwidth);
- IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii) = 0;
+ if (!INTP (pixwidth))
+ IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (ii) = pixwidth;
+ else
+ {
+ pw = XINT (pixwidth);
+ IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii) = 0;
+ }
}
else if (!NILP (width))
{
if (!NILP (pixheight))
{
- ph = XINT (pixheight);
- IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP (ii) = 0;
+ if (!INTP (pixheight))
+ IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (ii) = pixheight;
+ else
+ {
+ ph = XINT (pixheight);
+ IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP (ii) = 0;
+ }
}
else if (!NILP (height) && XINT (height) > 1)
{
pw ? pw : IMAGE_UNSPECIFIED_GEOMETRY,
ph ? ph : IMAGE_UNSPECIFIED_GEOMETRY,
domain);
- /* Layout has already been done so we don't need to re-layout. */
- IMAGE_INSTANCE_DIRTYP (ii) = 0;
#ifdef DEBUG_WIDGETS
debug_widget_instances++;
#endif
}
+/* Get the geometry of a button control. We need to adjust the size
+ depending on the type of button. */
+static void
+button_query_geometry (Lisp_Object image_instance,
+ unsigned int* width, unsigned int* height,
+ enum image_instance_geometry disp, Lisp_Object domain)
+{
+ Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+ unsigned int w, h;
+ query_string_geometry (IMAGE_INSTANCE_WIDGET_TEXT (ii),
+ IMAGE_INSTANCE_WIDGET_FACE (ii),
+ &w, &h, 0, domain);
+ /* Adjust the size for borders. */
+ if (IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii))
+ {
+ *width = w + 2 * WIDGET_BORDER_WIDTH;
+
+ if (EQ (XGUI_ITEM (IMAGE_INSTANCE_WIDGET_ITEM (ii))->style, Qradio)
+ ||
+ EQ (XGUI_ITEM (IMAGE_INSTANCE_WIDGET_ITEM (ii))->style, Qtoggle))
+ /* This is an approximation to the size of the actual button bit. */
+ *width += 12;
+ }
+ if (IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP (ii))
+ *height = h + 2 * WIDGET_BORDER_HEIGHT;
+}
+
/* tree-view geometry - get the height right */
static void
tree_view_query_geometry (Lisp_Object image_instance,
enum image_instance_geometry disp, Lisp_Object domain)
{
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
- Lisp_Object items = IMAGE_INSTANCE_WIDGET_ITEMS (ii);
+ Lisp_Object items = XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii));
Lisp_Object rest;
unsigned int tw = 0, th = 0;
query_string_geometry (XGUI_ITEM (XCAR (rest))->name,
IMAGE_INSTANCE_WIDGET_FACE (ii),
&w, &h, 0, domain);
- tw += 2 * WIDGET_BORDER_WIDTH; /* some bias */
+ tw += 5 * WIDGET_BORDER_WIDTH; /* some bias */
tw += w;
th = max (th, h + 2 * WIDGET_BORDER_HEIGHT);
}
}
}
+/* Get the geometry of a tab control. This is based on the number of
+ items and text therin in the tab control. */
+static Lisp_Object
+tab_control_set_property (Lisp_Object image_instance,
+ Lisp_Object prop,
+ Lisp_Object val)
+{
+ /* Record new items for update. *_tab_control_update will do the
+ rest. */
+ if (EQ (prop, Q_items))
+ {
+ Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance);
+
+ check_valid_item_list_1 (val);
+
+ /* Don't set the actual items since we might decide not to use
+ the new ones (because nothing has really changed). If we did
+ set them and didn't use them then we would get into whole
+ heaps of trouble when the old items get GC'd. */
+ IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii) =
+ Fcons (XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)),
+ parse_gui_item_tree_children (val));
+ IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii) = 1;
+
+ return Qt;
+ }
+ return Qunbound;
+}
+
+/* set the properties of a progres guage */
+static Lisp_Object
+progress_gauge_set_property (Lisp_Object image_instance,
+ Lisp_Object prop,
+ Lisp_Object val)
+{
+ Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+
+ if (EQ (prop, Q_value))
+ {
+ CHECK_INT (val);
+#ifdef DEBUG_WIDGET_OUTPUT
+ printf ("progress gauge value set to %ld\n", XINT (val));
+#endif
+ IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii) =
+ copy_gui_item_tree (IMAGE_INSTANCE_WIDGET_ITEMS (ii));
+#ifdef ERROR_CHECK_GLYPHS
+ assert (GUI_ITEMP (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)));
+#endif
+ if (GUI_ITEMP (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)))
+ XGUI_ITEM (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii))->value = val;
+
+ IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii) = 1;
+
+ return Qt;
+ }
+ return Qunbound;
+}
+
\f
/*****************************************************************************
* widget layout *
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
Lisp_Object items = IMAGE_INSTANCE_LAYOUT_CHILDREN (ii), rest;
int maxph = 0, maxpw = 0, nitems = 0, ph_adjust = 0;
+ unsigned int gheight, gwidth;
+
+ /* First just set up what we already have. */
+ if (width) *width = IMAGE_INSTANCE_WIDTH (ii);
+ if (height) *height = IMAGE_INSTANCE_HEIGHT (ii);
+
+ /* If we are not allowed to dynamically size then return. */
+ if (!IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP (ii)
+ &&
+ !IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii))
+ return;
+ /* Pick up the border text if we have one. */
+ if (INTP (IMAGE_INSTANCE_LAYOUT_BORDER (ii)))
+ {
+ image_instance_query_geometry (XCAR (items), &gwidth, &gheight, disp, domain);
+ ph_adjust = gheight / 2;
+ items = XCDR (items);
+ }
+
/* Flip through the items to work out how much stuff we have to display */
LIST_LOOP (rest, items)
{
Lisp_Object glyph = XCAR (rest);
- unsigned int gheight, gwidth;
-
image_instance_query_geometry (glyph, &gwidth, &gheight, disp, domain);
- /* Pick up the border text if we have one. */
- if (INTP (IMAGE_INSTANCE_LAYOUT_BORDER (ii))
- && NILP (XCDR (rest)))
+ nitems ++;
+ if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
+ == LAYOUT_HORIZONTAL)
{
- ph_adjust = gheight / 2;
+ maxph = max (maxph, gheight);
+ maxpw += gwidth;
}
else
{
-
- nitems ++;
- if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
- == LAYOUT_HORIZONTAL)
- {
- maxph = max (maxph, gheight);
- maxpw += gwidth;
- }
- else
- {
- maxpw = max (maxpw, gwidth);
- maxph += gheight;
- }
+ maxpw = max (maxpw, gwidth);
+ maxph += gheight;
}
}
- /* work out spacing between items and bounds of the layout. No user
- provided width so we just do default spacing. */
- if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
- == LAYOUT_HORIZONTAL)
+ /* Work out minimum space we need to fit all the items. This could
+ have been fixed by the user. */
+ if (!NILP (IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (ii)))
+ {
+ Lisp_Object dynamic_width =
+ Feval (IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (ii));
+ if (INTP (dynamic_width))
+ *width = XINT (dynamic_width);
+ }
+ else if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
+ == LAYOUT_HORIZONTAL)
*width = maxpw + (nitems + 1) * WIDGET_BORDER_WIDTH * 2;
else
*width = maxpw + 2 * WIDGET_BORDER_WIDTH * 2;
/* Work out vertical spacings. */
- if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
- == LAYOUT_VERTICAL)
+ if (!NILP (IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (ii)))
+ {
+ Lisp_Object dynamic_height =
+ Feval (IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (ii));
+ if (INTP (dynamic_height))
+ *height = XINT (dynamic_height);
+ }
+ else if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
+ == LAYOUT_VERTICAL)
*height = maxph + (nitems + 1) * WIDGET_BORDER_HEIGHT * 2 + ph_adjust;
- else
+ else
*height = maxph + 2 * WIDGET_BORDER_HEIGHT * 2 + ph_adjust;
}
-
static void
layout_layout (Lisp_Object image_instance,
unsigned int width, unsigned int height, Lisp_Object domain)
int x, y, maxph = 0, maxpw = 0, nitems = 0,
horiz_spacing, vert_spacing, ph_adjust = 0;
unsigned int gheight, gwidth;
+
+ /* Pick up the border text if we have one. */
+ if (INTP (IMAGE_INSTANCE_LAYOUT_BORDER (ii)))
+ {
+ Lisp_Object border = XCAR (items);
+ items = XCDR (items);
+ image_instance_query_geometry (border, &gwidth, &gheight,
+ IMAGE_DESIRED_GEOMETRY, domain);
+ /* #### Really, what should this be? */
+ XIMAGE_INSTANCE_XOFFSET (border) = 10;
+ XIMAGE_INSTANCE_YOFFSET (border) = 0;
+ ph_adjust = gheight / 2;
+ IMAGE_INSTANCE_LAYOUT_BORDER (ii) = make_int (ph_adjust);
+
+ image_instance_layout (border, gwidth, gheight, domain);
+ }
- /* flip through the items to work out how much stuff we have to display */
+ /* Flip through the items to work out how much stuff we have to display. */
LIST_LOOP (rest, items)
{
Lisp_Object glyph = XCAR (rest);
image_instance_query_geometry (glyph, &gwidth, &gheight,
IMAGE_DESIRED_GEOMETRY, domain);
-
- /* Pick up the border text if we have one. */
- if (INTP (IMAGE_INSTANCE_LAYOUT_BORDER (ii))
- && NILP (XCDR (rest)))
+ nitems ++;
+ if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
+ == LAYOUT_HORIZONTAL)
{
- XIMAGE_INSTANCE_XOFFSET (glyph) = 10; /* Really, what should this be? */
- XIMAGE_INSTANCE_YOFFSET (glyph) = 0;
- ph_adjust = gheight / 2;
- IMAGE_INSTANCE_LAYOUT_BORDER (ii) = make_int (ph_adjust);
+ maxph = max (maxph, gheight);
+ maxpw += gwidth;
}
else
{
-
- nitems ++;
- if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
- == LAYOUT_HORIZONTAL)
- {
- maxph = max (maxph, gheight);
- maxpw += gwidth;
- }
- else
- {
- maxpw = max (maxpw, gwidth);
- maxph += gheight;
- }
+ maxpw = max (maxpw, gwidth);
+ maxph += gheight;
}
}
image_instance_query_geometry (glyph, &gwidth, &gheight,
IMAGE_DESIRED_GEOMETRY, domain);
- if (!INTP (IMAGE_INSTANCE_LAYOUT_BORDER (ii))
- || !NILP (XCDR (rest)))
- {
- if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
- == LAYOUT_HORIZONTAL)
- {
- if (IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (ii)
- == LAYOUT_JUSTIFY_RIGHT)
- y = height - (gheight + vert_spacing);
- if (IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (ii)
- == LAYOUT_JUSTIFY_CENTER)
- y = (height - gheight) / 2;
- }
- else
- {
- if (IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (ii)
- == LAYOUT_JUSTIFY_RIGHT)
- x = width - (gwidth + horiz_spacing);
- if (IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (ii)
- == LAYOUT_JUSTIFY_CENTER)
- x = (width - gwidth) / 2;
- }
+ if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
+ == LAYOUT_HORIZONTAL)
+ {
+ if (IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (ii)
+ == LAYOUT_JUSTIFY_RIGHT)
+ y = height - (gheight + vert_spacing);
+ if (IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (ii)
+ == LAYOUT_JUSTIFY_CENTER)
+ y = (height - gheight) / 2;
+ }
+ else
+ {
+ if (IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (ii)
+ == LAYOUT_JUSTIFY_RIGHT)
+ x = width - (gwidth + horiz_spacing);
+ if (IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (ii)
+ == LAYOUT_JUSTIFY_CENTER)
+ x = (width - gwidth) / 2;
+ }
- XIMAGE_INSTANCE_XOFFSET (glyph) = x;
- XIMAGE_INSTANCE_YOFFSET (glyph) = y;
+ XIMAGE_INSTANCE_XOFFSET (glyph) = x;
+ XIMAGE_INSTANCE_YOFFSET (glyph) = y;
- if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
- == LAYOUT_HORIZONTAL)
- {
- x += (gwidth + horiz_spacing);
- }
- else
- {
- y += (gheight + vert_spacing);
- }
- }
+ if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
+ == LAYOUT_HORIZONTAL)
+ {
+ x += (gwidth + horiz_spacing);
+ }
+ else
+ {
+ y += (gheight + vert_spacing);
+ }
/* Now layout subwidgets if they require it. */
image_instance_layout (glyph, gwidth, gheight, domain);
}
-
- IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii) = width;
- IMAGE_INSTANCE_SUBWINDOW_HEIGHT (ii) = height;
}
\f
defkeyword (&Q_properties, ":properties");
defkeyword (&Q_items, ":items");
defkeyword (&Q_image, ":image");
- defkeyword (&Q_percent, ":percent");
defkeyword (&Q_text, ":text");
defkeyword (&Q_orientation, ":orientation");
defkeyword (&Q_justify, ":justify");
defsymbol (&Qetched_out, "etched-out");
defsymbol (&Qbevel_in, "bevel-in");
defsymbol (&Qbevel_out, "bevel-out");
+ defsymbol (&Qwidget_callback_current_channel, "widget-callback-current-channel");
}
#define VALID_GUI_KEYWORDS(type) do { \
IIFORMAT_VALID_KEYWORD (type, Q_accelerator, check_valid_string); \
IIFORMAT_VALID_KEYWORD (type, Q_label, check_valid_anything); \
IIFORMAT_VALID_NONCOPY_KEYWORD (type, Q_callback, check_valid_callback); \
+ IIFORMAT_VALID_NONCOPY_KEYWORD (type, Q_callback_ex, check_valid_callback); \
IIFORMAT_VALID_NONCOPY_KEYWORD (type, Q_descriptor, check_valid_string_or_vector); \
} while (0)
#define VALID_WIDGET_KEYWORDS(type) do { \
IIFORMAT_VALID_KEYWORD (type, Q_width, check_valid_int); \
IIFORMAT_VALID_KEYWORD (type, Q_height, check_valid_int); \
- IIFORMAT_VALID_KEYWORD (type, Q_pixel_width, check_valid_int); \
- IIFORMAT_VALID_KEYWORD (type, Q_pixel_height, check_valid_int); \
+ IIFORMAT_VALID_KEYWORD (type, Q_pixel_width, check_valid_int_or_function);\
+ IIFORMAT_VALID_KEYWORD (type, Q_pixel_height, check_valid_int_or_function);\
IIFORMAT_VALID_KEYWORD (type, Q_face, check_valid_face); \
} while (0)
IIFORMAT_HAS_SHARED_METHOD (button, possible_dest_types, widget);
IIFORMAT_HAS_SHARED_METHOD (button, instantiate, widget);
IIFORMAT_HAS_SHARED_METHOD (button, normalize, widget);
+ IIFORMAT_HAS_METHOD (button, query_geometry);
IIFORMAT_VALID_KEYWORD (button,
Q_image, check_valid_glyph_or_instantiator);
VALID_WIDGET_KEYWORDS (button);
IIFORMAT_VALID_KEYWORD (combo_box, Q_width, check_valid_int);
IIFORMAT_VALID_KEYWORD (combo_box, Q_height, check_valid_int);
- IIFORMAT_VALID_KEYWORD (combo_box, Q_pixel_width, check_valid_int);
+ IIFORMAT_VALID_KEYWORD (combo_box, Q_pixel_width, check_valid_int_or_function);
IIFORMAT_VALID_KEYWORD (combo_box, Q_face, check_valid_face);
IIFORMAT_VALID_KEYWORD (combo_box, Q_properties, check_valid_item_list);
}
IIFORMAT_HAS_SHARED_METHOD (scrollbar, instantiate, widget);
VALID_GUI_KEYWORDS (scrollbar);
- IIFORMAT_VALID_KEYWORD (scrollbar, Q_pixel_width, check_valid_int);
- IIFORMAT_VALID_KEYWORD (scrollbar, Q_pixel_height, check_valid_int);
+ IIFORMAT_VALID_KEYWORD (scrollbar, Q_pixel_width, check_valid_int_or_function);
+ IIFORMAT_VALID_KEYWORD (scrollbar, Q_pixel_height, check_valid_int_or_function);
IIFORMAT_VALID_KEYWORD (scrollbar, Q_face, check_valid_face);
}
IIFORMAT_HAS_SHARED_METHOD (progress_gauge, validate, widget);
IIFORMAT_HAS_SHARED_METHOD (progress_gauge, possible_dest_types, widget);
IIFORMAT_HAS_SHARED_METHOD (progress_gauge, instantiate, widget);
+ IIFORMAT_HAS_METHOD (progress_gauge, set_property);
VALID_WIDGET_KEYWORDS (progress_gauge);
VALID_GUI_KEYWORDS (progress_gauge);
}
IIFORMAT_HAS_SHARED_METHOD (tab_control, possible_dest_types, widget);
IIFORMAT_HAS_SHARED_METHOD (tab_control, instantiate, widget);
IIFORMAT_HAS_METHOD (tab_control, query_geometry);
+ IIFORMAT_HAS_METHOD (tab_control, set_property);
VALID_WIDGET_KEYWORDS (tab_control);
VALID_GUI_KEYWORDS (tab_control);
IIFORMAT_VALID_KEYWORD (tab_control, Q_orientation, check_valid_tab_orientation);
IIFORMAT_HAS_METHOD (layout, normalize);
IIFORMAT_HAS_METHOD (layout, query_geometry);
IIFORMAT_HAS_METHOD (layout, layout);
- IIFORMAT_VALID_KEYWORD (layout, Q_pixel_width, check_valid_int);
- IIFORMAT_VALID_KEYWORD (layout, Q_pixel_height, check_valid_int);
+ VALID_WIDGET_KEYWORDS (layout);
IIFORMAT_VALID_KEYWORD (layout, Q_orientation, check_valid_orientation);
IIFORMAT_VALID_KEYWORD (layout, Q_justify, check_valid_justification);
IIFORMAT_VALID_KEYWORD (layout, Q_border, check_valid_border);
vars_of_glyphs_widget (void)
{
reinit_vars_of_glyphs_widget ();
+
+ DEFVAR_LISP ("widget-callback-current-channel", &Vwidget_callback_current_channel /*
+The domain that is current when a widget callback is invoked.
+This is invariably the frame that the widget is instantiated in.
+*/);
+ Vwidget_callback_current_channel = Qnil;
}
gr = *ip++;
bl = *ip++;
conv.val = pixarray[QUANT_GET_COLOR(qtable,rd,gr,bl)];
-#if WORDS_BIGENDIAN
+#ifdef WORDS_BIGENDIAN
if (outimg->byte_order == MSBFirst)
for (q = 4-byte_cnt; q < 4; q++) *dp++ = conv.cp[q];
else
bl = *ip++ >> (8 - bbits);
conv.val = (rd << rshift) | (gr << gshift) | (bl << bshift);
-#if WORDS_BIGENDIAN
+#ifdef WORDS_BIGENDIAN
if (outimg->byte_order == MSBFirst)
for (q = 4-byte_cnt; q < 4; q++) *dp++ = conv.cp[q];
else
#endif
lw_destroy_widget (IMAGE_INSTANCE_X_WIDGET_ID (p));
lw_destroy_widget (IMAGE_INSTANCE_X_CLIPWIDGET (p));
- IMAGE_INSTANCE_SUBWINDOW_ID (p) = 0;
+ IMAGE_INSTANCE_X_WIDGET_ID (p) = 0;
+ IMAGE_INSTANCE_X_CLIPWIDGET (p) = 0;
}
}
else if (IMAGE_INSTANCE_TYPE (p) == IMAGE_SUBWINDOW)
}
}
-int read_bitmap_data_from_file (CONST char *filename, unsigned int *width,
+int read_bitmap_data_from_file (const char *filename, unsigned int *width,
unsigned int *height, unsigned char **datap,
int *x_hot, int *y_hot)
{
static Pixmap
pixmap_from_xbm_inline (Lisp_Object device, int width, int height,
/* Note that data is in ext-format! */
- CONST Extbyte *bits)
+ const Extbyte *bits)
{
return XCreatePixmapFromBitmapData (DEVICE_X_DISPLAY (XDEVICE(device)),
XtWindow (DEVICE_XT_APP_SHELL (XDEVICE (device))),
init_image_instance_from_xbm_inline (Lisp_Image_Instance *ii,
int width, int height,
/* Note that data is in ext-format! */
- CONST char *bits,
+ const char *bits,
Lisp_Object instantiator,
Lisp_Object pointer_fg,
Lisp_Object pointer_bg,
Lisp_Object pointer_fg, Lisp_Object pointer_bg,
int dest_mask, int width, int height,
/* Note that data is in ext-format! */
- CONST char *bits)
+ const char *bits)
{
Lisp_Object mask_data = find_keyword_in_vector (instantiator, Q_mask_data);
Lisp_Object mask_file = find_keyword_in_vector (instantiator, Q_mask_file);
if (!NILP (mask_data))
{
- CONST char *ext_data;
+ const char *ext_data;
TO_EXTERNAL_FORMAT (LISP_STRING, XCAR (XCDR (XCDR (mask_data))),
C_STRING_ALLOCA, ext_data,
mask = pixmap_from_xbm_inline (IMAGE_INSTANCE_DEVICE (ii),
XINT (XCAR (mask_data)),
XINT (XCAR (XCDR (mask_data))),
- (CONST unsigned char *) ext_data);
+ (const unsigned char *) ext_data);
}
init_image_instance_from_xbm_inline (ii, width, height, bits,
int dest_mask, Lisp_Object domain)
{
Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
- CONST char *ext_data;
+ const char *ext_data;
assert (!NILP (data));
Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
int i, stattis;
char *p, *bits, *bp;
- CONST char * volatile emsg = 0;
- CONST char * volatile dstring;
+ const char * volatile emsg = 0;
+ const char * volatile dstring;
assert (!NILP (data));
alist = tagged_vector_to_alist (instantiator);
if (dest_mask & IMAGE_POINTER_MASK)
{
- CONST char *name_ext;
+ const char *name_ext;
TO_EXTERNAL_FORMAT (LISP_STRING, data,
C_STRING_ALLOCA, name_ext,
Qfile_name);
Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
Display *dpy;
int i;
- CONST char *name_ext;
+ const char *name_ext;
Lisp_Object foreground, background;
if (!DEVICE_X_P (XDEVICE (device)))
static void
x_update_subwindow (Lisp_Image_Instance *p)
{
-#ifdef HAVE_WIDGETS
- if (IMAGE_INSTANCE_TYPE (p) == IMAGE_WIDGET)
+ /* Update the subwindow size if necessary. */
+ if (IMAGE_INSTANCE_SIZE_CHANGED (p))
{
- widget_value* wv = gui_items_to_widget_values
- (IMAGE_INSTANCE_WIDGET_ITEMS (p));
+ XResizeWindow (IMAGE_INSTANCE_X_SUBWINDOW_DISPLAY (p),
+ IMAGE_INSTANCE_X_SUBWINDOW_ID (p),
+ IMAGE_INSTANCE_WIDTH (p),
+ IMAGE_INSTANCE_HEIGHT (p));
+ }
+}
- /* This seems ugly, but I'm not sure what else to do. */
- if (EQ (IMAGE_INSTANCE_WIDGET_TYPE (p), Qtab_control))
- {
- update_tab_widget_face (wv, p,
- IMAGE_INSTANCE_SUBWINDOW_FRAME (p));
- }
- /* update the colors and font */
- update_widget_face (wv, p, IMAGE_INSTANCE_SUBWINDOW_FRAME (p));
+/* Update all attributes that have changed. Lwlib actually does most
+ of this for us. */
+static void
+x_update_widget (Lisp_Image_Instance *p)
+{
+ /* This function can GC if IN_REDISPLAY is false. */
+#ifdef HAVE_WIDGETS
+ widget_value* wv = 0;
+ /* First get the items if they have changed since this is a
+ structural change. As such it will nuke all added values so we
+ need to update most other things after the items have changed.*/
+ if (IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (p))
+ {
+ Lisp_Object image_instance;
+
+ XSETIMAGE_INSTANCE (image_instance, p);
+ wv = gui_items_to_widget_values
+ (image_instance, IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (p));
+ wv->change = STRUCTURAL_CHANGE;
/* now modify the widget */
lw_modify_all_widgets (IMAGE_INSTANCE_X_WIDGET_LWID (p),
wv, True);
free_widget_value_tree (wv);
- /* subwindow resizing now gets done by the parent function. */
}
+
+ /* Now do non structural updates. */
+ wv = lw_get_all_values (IMAGE_INSTANCE_X_WIDGET_LWID (p));
+
+ if (!wv)
+ return;
+
+ /* Possibly update the colors and font */
+ if (IMAGE_INSTANCE_WIDGET_FACE_CHANGED (p)
+ ||
+ XFRAME (IMAGE_INSTANCE_SUBWINDOW_FRAME (p))->faces_changed
+ ||
+ IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (p))
+ {
+ update_widget_face (wv, p, IMAGE_INSTANCE_SUBWINDOW_FRAME (p));
+ }
+
+ /* Possibly update the text. */
+ if (IMAGE_INSTANCE_TEXT_CHANGED (p))
+ {
+ char* str;
+ Lisp_Object val = IMAGE_INSTANCE_WIDGET_TEXT (p);
+ TO_EXTERNAL_FORMAT (LISP_STRING, val,
+ C_STRING_ALLOCA, str,
+ Qnative);
+ wv->value = str;
+ }
+
+ /* Possibly update the size. */
+ if (IMAGE_INSTANCE_SIZE_CHANGED (p)
+ ||
+ IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (p)
+ ||
+ IMAGE_INSTANCE_TEXT_CHANGED (p))
+ {
+ assert (IMAGE_INSTANCE_X_WIDGET_ID (p) &&
+ IMAGE_INSTANCE_X_CLIPWIDGET (p)) ;
+
+ if (IMAGE_INSTANCE_X_WIDGET_ID (p)->core.being_destroyed
+ || !XtIsManaged(IMAGE_INSTANCE_X_WIDGET_ID (p)))
+ {
+ Lisp_Object sw;
+ XSETIMAGE_INSTANCE (sw, p);
+ signal_simple_error ("XEmacs bug: subwindow is deleted", sw);
+ }
+
+ lw_add_widget_value_arg (wv, XtNwidth,
+ (Dimension)IMAGE_INSTANCE_WIDTH (p));
+ lw_add_widget_value_arg (wv, XtNheight,
+ (Dimension)IMAGE_INSTANCE_HEIGHT (p));
+ }
+
+ /* now modify the widget */
+ lw_modify_all_widgets (IMAGE_INSTANCE_X_WIDGET_LWID (p),
+ wv, False);
#endif
}
}
#endif
-static void
-x_resize_subwindow (Lisp_Image_Instance* ii, int w, int h)
-{
- if (IMAGE_INSTANCE_TYPE (ii) == IMAGE_SUBWINDOW)
- {
- XResizeWindow (IMAGE_INSTANCE_X_SUBWINDOW_DISPLAY (ii),
- IMAGE_INSTANCE_X_SUBWINDOW_ID (ii),
- w, h);
- }
- else /* must be a widget */
- {
- Arg al[2];
-
- if ( !XtIsManaged(IMAGE_INSTANCE_X_WIDGET_ID (ii))
- ||
- IMAGE_INSTANCE_X_WIDGET_ID (ii)->core.being_destroyed )
- {
- Lisp_Object sw;
- XSETIMAGE_INSTANCE (sw, ii);
- signal_simple_error ("XEmacs bug: subwindow is deleted", 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
x_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
Lisp_Object pointer_fg, Lisp_Object pointer_bg,
int dest_mask, Lisp_Object domain,
- CONST char* type, widget_value* wv)
+ const char* type, widget_value* wv)
{
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii), pixel;
lw_add_widget_value_arg (clip_wv, XtNresize, False);
lw_add_widget_value_arg (clip_wv, XtNwidth,
- (Dimension)IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii));
+ (Dimension)IMAGE_INSTANCE_WIDTH (ii));
lw_add_widget_value_arg (clip_wv, XtNheight,
- (Dimension)IMAGE_INSTANCE_SUBWINDOW_HEIGHT (ii));
+ (Dimension)IMAGE_INSTANCE_HEIGHT (ii));
clip_wv->enabled = True;
clip_wv->name = xstrdup ("clip-window");
/* we cannot allow widgets to resize themselves */
lw_add_widget_value_arg (wv, XtNresize, False);
lw_add_widget_value_arg (wv, XtNwidth,
- (Dimension)IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii));
+ (Dimension)IMAGE_INSTANCE_WIDTH (ii));
lw_add_widget_value_arg (wv, XtNheight,
- (Dimension)IMAGE_INSTANCE_SUBWINDOW_HEIGHT (ii));
+ (Dimension)IMAGE_INSTANCE_HEIGHT (ii));
/* update the font. */
update_widget_face (wv, ii, domain);
IMAGE_INSTANCE_SUBWINDOW_ID (ii) = (void*)wid;
IMAGE_INSTANCE_X_WIDGET_LWID (ii) = id;
-
- /* 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 (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. */
free_widget_value_tree (wv);
}
-static Lisp_Object
-x_widget_set_property (Lisp_Object image_instance, Lisp_Object prop,
- Lisp_Object val)
-{
- Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
-
- /* Modify the text properties of the widget */
- if (EQ (prop, Q_text))
- {
- char* str;
- widget_value* wv = lw_get_all_values (IMAGE_INSTANCE_X_WIDGET_LWID (ii));
- CHECK_STRING (val);
- TO_EXTERNAL_FORMAT (LISP_STRING, val,
- C_STRING_ALLOCA, str,
- Qnative);
- wv->value = str;
- lw_modify_all_widgets (IMAGE_INSTANCE_X_WIDGET_LWID (ii), wv, False);
- }
-
- /* Modify the text properties of the widget */
- else if (EQ (prop, Q_face))
- {
- widget_value* wv = lw_get_all_values (IMAGE_INSTANCE_X_WIDGET_LWID (ii));
- update_widget_face (wv, ii, IMAGE_INSTANCE_SUBWINDOW_FRAME (ii));
- lw_modify_all_widgets (IMAGE_INSTANCE_X_WIDGET_LWID (ii), wv, False);
- }
- return Qunbound;
-}
-
/* get properties of a control */
static Lisp_Object
x_widget_property (Lisp_Object image_instance, Lisp_Object prop)
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii);
Lisp_Object glyph = find_keyword_in_vector (instantiator, Q_image);
- widget_value* wv = xmalloc_widget_value ();
-
- button_item_to_widget_value (gui, wv, 1, 1);
+ widget_value* wv = gui_items_to_widget_values (image_instance, gui);
if (!NILP (glyph))
{
}
}
+/* Update a button's clicked state.
+
+ #### This is overkill, but it works. Right now this causes all
+ button instances to flash for some reason buried deep in lwlib. In
+ theory this should be the Right Thing to do since lwlib should only
+ merge in changed values - and if nothing has changed then nothing
+ should get done. This may be because of the args stuff,
+ i.e. although the arg contents may be the same the args look
+ different and so are re-applied to the widget. */
+static void
+x_button_update (Lisp_Object image_instance)
+{
+ /* This function can GC if IN_REDISPLAY is false. */
+ Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance);
+ widget_value* wv =
+ gui_items_to_widget_values (image_instance,
+ IMAGE_INSTANCE_WIDGET_ITEMS (p));
+
+ /* now modify the widget */
+ lw_modify_all_widgets (IMAGE_INSTANCE_X_WIDGET_LWID (p),
+ wv, True);
+ free_widget_value_tree (wv);
+}
+
/* get properties of a button */
static Lisp_Object
x_button_property (Lisp_Object image_instance, Lisp_Object prop)
{
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);
+ widget_value* wv = gui_items_to_widget_values (image_instance, gui);
x_widget_instantiate (image_instance, instantiator, pointer_fg,
pointer_bg, dest_mask, domain, "progress", wv);
}
/* set the properties of a progres guage */
-static Lisp_Object
-x_progress_gauge_set_property (Lisp_Object image_instance, Lisp_Object prop,
- Lisp_Object val)
+static void
+x_progress_gauge_update (Lisp_Object image_instance)
{
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
- if (EQ (prop, Q_percent))
+ if (IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii))
{
Arg al [1];
- CHECK_INT (val);
+ Lisp_Object val;
+#ifdef ERROR_CHECK_GLYPHS
+ assert (GUI_ITEMP (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)));
+#endif
+ val = XGUI_ITEM (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii))->value;
XtSetArg (al[0], XtNvalue, XINT (val));
XtSetValues (IMAGE_INSTANCE_X_WIDGET_ID (ii), al, 1);
- return Qt;
}
- return Qunbound;
}
/* instantiate an edit control */
{
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);
+ widget_value* wv = gui_items_to_widget_values (image_instance, gui);
x_widget_instantiate (image_instance, instantiator, pointer_fg,
pointer_bg, dest_mask, domain, "text-field", wv);
widget_instantiate (image_instance, instantiator, pointer_fg,
pointer_bg, dest_mask, domain);
- wv = gui_items_to_widget_values (IMAGE_INSTANCE_WIDGET_ITEMS (ii));
+ wv = gui_items_to_widget_values (image_instance,
+ IMAGE_INSTANCE_WIDGET_ITEMS (ii));
x_widget_instantiate (image_instance, instantiator, pointer_fg,
pointer_bg, dest_mask, domain, "combo-box", wv);
{
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
widget_value * wv =
- gui_items_to_widget_values (IMAGE_INSTANCE_WIDGET_ITEMS (ii));
+ gui_items_to_widget_values (image_instance,
+ IMAGE_INSTANCE_WIDGET_ITEMS (ii));
update_tab_widget_face (wv, ii,
IMAGE_INSTANCE_SUBWINDOW_FRAME (ii));
}
/* 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)
+static void
+x_tab_control_update (Lisp_Object image_instance)
{
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
- if (EQ (prop, Q_items))
+ /* Possibly update the face. */
+ if (IMAGE_INSTANCE_WIDGET_FACE_CHANGED (ii)
+ ||
+ XFRAME (IMAGE_INSTANCE_SUBWINDOW_FRAME (ii))->faces_changed
+ ||
+ IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii))
{
- widget_value * wv = 0;
- check_valid_item_list_1 (val);
-
- IMAGE_INSTANCE_WIDGET_ITEMS (ii) =
- Fcons (XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)),
- parse_gui_item_tree_children (val));
+ widget_value* wv = lw_get_all_values (IMAGE_INSTANCE_X_WIDGET_LWID (ii));
- wv = gui_items_to_widget_values (IMAGE_INSTANCE_WIDGET_ITEMS (ii));
+ /* #### I don't know why this can occur. */
+ if (!wv)
+ return;
update_tab_widget_face (wv, ii,
IMAGE_INSTANCE_SUBWINDOW_FRAME (ii));
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 */
{
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);
+ widget_value* wv = gui_items_to_widget_values (image_instance, gui);
x_widget_instantiate (image_instance, instantiator, pointer_fg,
pointer_bg, dest_mask, domain, "button", wv);
CONSOLE_HAS_METHOD (x, locate_pixmap_file);
CONSOLE_HAS_METHOD (x, unmap_subwindow);
CONSOLE_HAS_METHOD (x, map_subwindow);
- CONSOLE_HAS_METHOD (x, resize_subwindow);
+ CONSOLE_HAS_METHOD (x, update_widget);
CONSOLE_HAS_METHOD (x, update_subwindow);
}
INITIALIZE_DEVICE_IIFORMAT (x, button);
IIFORMAT_HAS_DEVMETHOD (x, button, property);
IIFORMAT_HAS_DEVMETHOD (x, button, instantiate);
+ IIFORMAT_HAS_DEVMETHOD (x, button, update);
INITIALIZE_DEVICE_IIFORMAT (x, widget);
IIFORMAT_HAS_DEVMETHOD (x, widget, property);
- IIFORMAT_HAS_DEVMETHOD (x, widget, set_property);
/* progress gauge */
INITIALIZE_DEVICE_IIFORMAT (x, progress_gauge);
- IIFORMAT_HAS_DEVMETHOD (x, progress_gauge, set_property);
+ IIFORMAT_HAS_DEVMETHOD (x, progress_gauge, update);
IIFORMAT_HAS_DEVMETHOD (x, progress_gauge, instantiate);
/* text field */
INITIALIZE_DEVICE_IIFORMAT (x, edit_field);
/* combo box */
INITIALIZE_DEVICE_IIFORMAT (x, combo_box);
IIFORMAT_HAS_DEVMETHOD (x, combo_box, instantiate);
- IIFORMAT_HAS_SHARED_DEVMETHOD (x, combo_box, set_property, tab_control);
+ IIFORMAT_HAS_SHARED_DEVMETHOD (x, combo_box, update, 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);
+ IIFORMAT_HAS_DEVMETHOD (x, tab_control, update);
/* label */
INITIALIZE_DEVICE_IIFORMAT (x, label);
IIFORMAT_HAS_DEVMETHOD (x, label, instantiate);
Window parent_window;
Window clip_window;
} sub;
- struct
+ struct
{
Widget clip_window;
Position x_offset;
#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))
+ (* (Window *) & IMAGE_INSTANCE_SUBWINDOW_ID (i))
#define IMAGE_INSTANCE_X_WIDGET_ID(i) \
- ((Widget) IMAGE_INSTANCE_SUBWINDOW_ID (i))
+ (* (Widget *) & IMAGE_INSTANCE_SUBWINDOW_ID (i))
#endif /* HAVE_X_WINDOWS */
#endif /* INCLUDED_glyphs_x_h_ */
Lisp_Object Qpointer_image_instance_p;
Lisp_Object Qsubwindow_image_instance_p;
Lisp_Object Qlayout_image_instance_p;
+Lisp_Object Qupdate_widget_instances;
Lisp_Object Qwidget_image_instance_p;
Lisp_Object Qconst_glyph_variable;
Lisp_Object Qmono_pixmap, Qcolor_pixmap, Qsubwindow;
static void glyph_property_was_changed (Lisp_Object glyph,
Lisp_Object property,
Lisp_Object locale);
+static void set_image_instance_dirty_p (Lisp_Object instance, int dirty);
static void register_ignored_expose (struct frame* f, int x, int y, int width, int height);
/* Unfortunately windows and X are different. In windows BeginPaint()
will prevent WM_PAINT messages being generated so it is unnecessary
EXFUN (Fimage_instance_type, 1);
EXFUN (Fglyph_type, 1);
+EXFUN (Fnext_window, 4);
\f
/****************************************************************************
int dest_mask, Lisp_Object glyph)
{
Lisp_Object ii = allocate_image_instance (device, glyph);
+ Lisp_Image_Instance* p = XIMAGE_INSTANCE (ii);
struct image_instantiator_methods *meths;
struct gcpro gcpro1;
int methp = 0;
pointer_bg, dest_mask, domain));
UNGCPRO;
+ /* Some code may have already laid out the widget, if not then do it
+ here. */
+ if (IMAGE_INSTANCE_LAYOUT_CHANGED (p))
+ image_instance_layout (ii, IMAGE_UNSPECIFIED_GEOMETRY,
+ IMAGE_UNSPECIFIED_GEOMETRY, domain);
+
+ /* We *must* have a clean image at this point. */
+ IMAGE_INSTANCE_TEXT_CHANGED (p) = 0;
+ IMAGE_INSTANCE_SIZE_CHANGED (p) = 0;
+ IMAGE_INSTANCE_LAYOUT_CHANGED (p) = 0;
+ IMAGE_INSTANCE_DIRTYP (p) = 0;
+
return ii;
}
mark_object (IMAGE_INSTANCE_WIDGET_PROPS (i));
mark_object (IMAGE_INSTANCE_WIDGET_FACE (i));
mark_object (IMAGE_INSTANCE_WIDGET_ITEMS (i));
+ mark_object (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (i));
+ mark_object (IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (i));
+ mark_object (IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (i));
case IMAGE_SUBWINDOW:
mark_object (IMAGE_INSTANCE_SUBWINDOW_FRAME (i));
break;
break;
case IMAGE_WIDGET:
+ print_internal (IMAGE_INSTANCE_WIDGET_TYPE (ii), printcharfun, 0);
+
+ if (!NILP (IMAGE_INSTANCE_WIDGET_TEXT (ii)))
+ {
+ write_c_string (" ", printcharfun);
+ print_internal (IMAGE_INSTANCE_WIDGET_TEXT (ii), printcharfun, 1);
+ }
+
if (!NILP (IMAGE_INSTANCE_WIDGET_FACE (ii)))
{
- write_c_string (" (", printcharfun);
+ write_c_string (" face=", printcharfun);
print_internal
(IMAGE_INSTANCE_WIDGET_FACE (ii), printcharfun, 0);
- write_c_string (")", printcharfun);
}
- if (!NILP (IMAGE_INSTANCE_WIDGET_TEXT (ii)))
- print_internal (IMAGE_INSTANCE_WIDGET_TEXT (ii), printcharfun, 0);
case IMAGE_SUBWINDOW:
case IMAGE_LAYOUT:
else
write_c_string (DEVICE_TYPE_NAME (XDEVICE (FRAME_DEVICE (f))),
printcharfun);
-
- write_c_string ("-frame ", printcharfun);
}
- write_c_string (">", printcharfun);
+ write_c_string ("-frame>", printcharfun);
sprintf (buf, " 0x%p", IMAGE_INSTANCE_SUBWINDOW_ID (ii));
write_c_string (buf, printcharfun);
/* do this so that the cachels get reset */
if (IMAGE_INSTANCE_TYPE (i) == IMAGE_WIDGET
||
+ IMAGE_INSTANCE_TYPE (i) == IMAGE_SUBWINDOW
+ ||
IMAGE_INSTANCE_TYPE (i) == IMAGE_SUBWINDOW)
{
MARK_FRAME_SUBWINDOWS_CHANGED
IMAGE_INSTANCE_WIDGET_TYPE (i2))
&& IMAGE_INSTANCE_SUBWINDOW_ID (i1) ==
IMAGE_INSTANCE_SUBWINDOW_ID (i2)
+ &&
+ EQ (IMAGE_INSTANCE_WIDGET_FACE (i1),
+ IMAGE_INSTANCE_WIDGET_TYPE (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)
+ && internal_equal (IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (i1),
+ IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (i2),
+ depth + 1)
+ && internal_equal (IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (i1),
+ IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (i2),
+ depth + 1)
))
return 0;
break;
return DEVMETH_OR_GIVEN (d1, image_instance_equal, (i1, i2, depth), 1);
}
+#if 0
+/* internal_hash will not go very far down a list because of the way
+ its written. For items we need to hash all elements so we provide
+ our own list hashing function. */
+static unsigned long
+full_list_hash (Lisp_Object obj, int depth)
+{
+ unsigned long hash = 0;
+ Lisp_Object rest;
+
+ if (!CONSP (obj))
+ return internal_hash (obj, depth + 1);
+
+ hash = LISP_HASH (XCAR (obj));
+ LIST_LOOP (rest, XCDR (obj))
+ {
+ hash = HASH2 (hash, internal_hash (XCAR (rest), depth + 1));
+ }
+ return hash;
+}
+#endif
+
static unsigned long
image_instance_hash (Lisp_Object obj, int depth)
{
case IMAGE_WIDGET:
case IMAGE_LAYOUT:
+ /* We need the hash to be equivalent to what should be
+ displayed. */
hash = HASH4 (hash,
- internal_hash (IMAGE_INSTANCE_WIDGET_TYPE (i), depth + 1),
+ LISP_HASH (IMAGE_INSTANCE_WIDGET_TYPE (i)),
internal_hash (IMAGE_INSTANCE_WIDGET_PROPS (i), depth + 1),
internal_hash (IMAGE_INSTANCE_WIDGET_ITEMS (i), depth + 1));
case IMAGE_SUBWINDOW:
lp->y_offset = 0;
lp->width = 0;
lp->height = 0;
- lp->glyph = glyph;
- MARK_IMAGE_INSTANCE_CHANGED (lp); /* So that layouts get done. */
+ lp->parent = glyph;
+ /* So that layouts get done. */
+ lp->layout_changed = 1;
+
XSETIMAGE_INSTANCE (val, lp);
- MARK_GLYPHS_CHANGED; /* So that the dirty flag gets reset. */
+ MARK_GLYPHS_CHANGED;
+
return val;
}
(Qerror,
list2
(emacs_doprnt_string_lisp_2
- ((CONST Bufbyte *)
+ ((const Bufbyte *)
"No compatible image-instance types given: wanted one of %s, got %s",
Qnil, -1, 2,
encode_image_instance_type_list (desired_dest_mask),
}
}
+/* Recurse up the hierarchy looking for the topmost glyph. This means
+ that instances in layouts will inherit face properties from their
+ parent. */
+Lisp_Object image_instance_parent_glyph (Lisp_Image_Instance* ii)
+{
+ if (IMAGE_INSTANCEP (IMAGE_INSTANCE_PARENT (ii)))
+ {
+ return image_instance_parent_glyph
+ (XIMAGE_INSTANCE (IMAGE_INSTANCE_PARENT (ii)));
+ }
+ return IMAGE_INSTANCE_PARENT (ii);
+}
+
static Lisp_Object
make_image_instance_1 (Lisp_Object data, Lisp_Object device,
Lisp_Object dest_types)
}
}
- /* Make sure the image instance gets redisplayed.
+ /* Make sure the image instance gets redisplayed. */
+ set_image_instance_dirty_p (image_instance, 1);
+ /* Force the glyph to be laid out again. */
+ IMAGE_INSTANCE_LAYOUT_CHANGED (ii) = 1;
- ### This currently does not change the dirty state of an
- enclosing layout which may be bad. */
- MARK_IMAGE_INSTANCE_CHANGED (ii);
MARK_SUBWINDOWS_STATE_CHANGED;
MARK_GLYPHS_CHANGED;
/* At this point width and height should contain sane values. Thus
we set the glyph geometry and lay it out. */
+ if (IMAGE_INSTANCE_WIDTH (ii) != width
+ ||
+ IMAGE_INSTANCE_HEIGHT (ii) != height)
+ {
+ IMAGE_INSTANCE_SIZE_CHANGED (ii) = 1;
+ }
+
IMAGE_INSTANCE_WIDTH (ii) = width;
IMAGE_INSTANCE_HEIGHT (ii) = height;
}
/* else no change to the geometry. */
- XIMAGE_INSTANCE_DIRTYP (image_instance) = 0;
+ /* Do not clear the dirty flag here - redisplay will do this for
+ us at the end. */
+ IMAGE_INSTANCE_LAYOUT_CHANGED (ii) = 0;
}
/*
if (TEXT_IMAGE_INSTANCEP (image))
{
- XIMAGE_INSTANCE_DIRTYP (image) = 1;
+ Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image);
+ IMAGE_INSTANCE_DIRTYP (ii) = 1;
+ IMAGE_INSTANCE_LAYOUT_CHANGED (ii) = 1;
if (GLYPHP (glyph_or_ii))
XGLYPH_DIRTYP (glyph_or_ii) = 1;
return 1;
/* error helpers */
/************************************************************************/
DOESNT_RETURN
-signal_image_error (CONST char *reason, Lisp_Object frob)
+signal_image_error (const char *reason, Lisp_Object frob)
{
signal_error (Qimage_conversion_error,
list2 (build_translated_string (reason), frob));
}
DOESNT_RETURN
-signal_image_error_2 (CONST char *reason, Lisp_Object frob0, Lisp_Object frob1)
+signal_image_error_2 (const char *reason, Lisp_Object frob0, Lisp_Object frob1)
{
signal_error (Qimage_conversion_error,
list3 (build_translated_string (reason), frob0, frob1));
unsigned int w, h;
Extbyte *data;
int result;
- CONST char *filename_ext;
+ const char *filename_ext;
TO_EXTERNAL_FORMAT (LISP_STRING, name,
C_STRING_ALLOCA, filename_ext,
static Lisp_Object
image_instantiate_cache_result (Lisp_Object locative)
{
- /* locative = (instance instantiator . subtable) */
+ /* locative = (instance instantiator . subtable)
+
+ So we are using the instantiator as the key and the instance as
+ the value. Since the hashtable is key-weak this means that the
+ image instance will stay around as long as the instantiator stays
+ around. The instantiator is stored in the `image' slot of the
+ glyph, so as long as the glyph is marked the instantiator will be
+ as well and hence the cached image instance also.*/
Fputhash (XCAR (XCDR (locative)), XCAR (locative), XCDR (XCDR (locative)));
free_cons (XCONS (XCDR (locative)));
free_cons (XCONS (locative));
Lisp_Object pointer_fg = Qnil;
Lisp_Object pointer_bg = Qnil;
+ /* We have to put subwindow, widget and text image instances in
+ a per-window cache so that we can see the same glyph in
+ different windows. Unfortunately we do not know the type of
+ image_instance until after it has been created. We thus need
+ to be really careful how we place things. */
+
if (pointerp)
{
pointer_fg = FACE_FOREGROUND (Vpointer_face, domain);
&&
dest_mask & (IMAGE_SUBWINDOW_MASK
| IMAGE_WIDGET_MASK
- | IMAGE_TEXT_MASK))
+ | IMAGE_LAYOUT_MASK
+ | IMAGE_TEXT_MASK)
+ && WINDOWP (domain))
{
- if (!WINDOWP (domain))
- signal_simple_error ("Can't instantiate text or subwindow outside a window",
- instantiator);
instance = Fgethash (instantiator,
XWINDOW (domain)->subwindow_instance_cache,
Qunbound);
cache. */
if (image_instance_type_to_mask (XIMAGE_INSTANCE_TYPE (instance))
&
- (IMAGE_SUBWINDOW_MASK | IMAGE_WIDGET_MASK))
+ (IMAGE_SUBWINDOW_MASK
+ | IMAGE_WIDGET_MASK
+ | IMAGE_LAYOUT_MASK
+ | IMAGE_TEXT_MASK ))
{
+#ifdef ERROR_CHECK_GLYPHS
+ if (XIMAGE_INSTANCE_TYPE (instance) != IMAGE_TEXT)
+ assert (EQ (XIMAGE_INSTANCE_SUBWINDOW_FRAME (instance),
+ FW_FRAME (domain)));
+#endif
if (!WINDOWP (domain))
- signal_simple_error ("Can't instantiate subwindow outside a window",
+ signal_simple_error ("Can't instantiate text or subwindow outside a window",
instantiator);
-
- Fsetcdr (XCDR (locative), XWINDOW (domain)->subwindow_instance_cache );
+#ifdef ERROR_CHECK_GLYPHS
+ if (XIMAGE_INSTANCE_TYPE (instance) != IMAGE_TEXT)
+ assert (EQ (XIMAGE_INSTANCE_SUBWINDOW_FRAME (instance),
+ FW_FRAME (domain)));
+#endif
+ Fsetcdr (XCDR (locative), XWINDOW (domain)->subwindow_instance_cache);
}
unbind_to (speccount, Qnil);
+#ifdef ERROR_CHECK_GLYPHS
+ if (image_instance_type_to_mask (XIMAGE_INSTANCE_TYPE (instance))
+ &
+ (IMAGE_SUBWINDOW_MASK
+ | IMAGE_WIDGET_MASK
+ | IMAGE_LAYOUT_MASK
+ | IMAGE_TEXT_MASK ))
+ assert (EQ (Fgethash ((pointerp ? ls3 : instantiator),
+ XWINDOW (domain)->subwindow_instance_cache,
+ Qunbound), instance));
+#endif
}
else
free_list (ls3);
if (NILP (instance))
signal_simple_error ("Can't instantiate image (probably cached)",
instantiator);
+#ifdef ERROR_CHECK_GLYPHS
+ if (image_instance_type_to_mask (XIMAGE_INSTANCE_TYPE (instance))
+ & (IMAGE_SUBWINDOW_MASK | IMAGE_WIDGET_MASK))
+ assert (EQ (XIMAGE_INSTANCE_SUBWINDOW_FRAME (instance),
+ FW_FRAME (domain)));
+#endif
return instance;
}
if (!IMAGE_INSTANCEP (instance))
return 0;
- if (XIMAGE_INSTANCE_DIRTYP (instance))
+ if (XIMAGE_INSTANCE_NEEDS_LAYOUT (instance))
image_instance_layout (instance, IMAGE_UNSPECIFIED_GEOMETRY,
IMAGE_UNSPECIFIED_GEOMETRY, domain);
if (!IMAGE_INSTANCEP (instance))
return 0;
- if (XIMAGE_INSTANCE_DIRTYP (instance))
+ if (XIMAGE_INSTANCE_NEEDS_LAYOUT (instance))
image_instance_layout (instance, IMAGE_UNSPECIFIED_GEOMETRY,
IMAGE_UNSPECIFIED_GEOMETRY, domain);
if (!IMAGE_INSTANCEP (instance))
return 0;
- if (XIMAGE_INSTANCE_DIRTYP (instance))
+ if (XIMAGE_INSTANCE_NEEDS_LAYOUT (instance))
image_instance_layout (instance, IMAGE_UNSPECIFIED_GEOMETRY,
IMAGE_UNSPECIFIED_GEOMETRY, domain);
if (!IMAGE_INSTANCEP (instance))
return 0;
- if (XIMAGE_INSTANCE_DIRTYP (instance))
+ if (XIMAGE_INSTANCE_NEEDS_LAYOUT (instance))
image_instance_layout (instance, IMAGE_UNSPECIFIED_GEOMETRY,
IMAGE_UNSPECIFIED_GEOMETRY, domain);
}
}
+static void
+set_image_instance_dirty_p (Lisp_Object instance, int dirty)
+{
+ if (IMAGE_INSTANCEP (instance))
+ {
+ XIMAGE_INSTANCE_DIRTYP (instance) = dirty;
+ /* Now cascade up the hierarchy. */
+ set_image_instance_dirty_p (XIMAGE_INSTANCE_PARENT (instance),
+ dirty);
+ }
+ else if (GLYPHP (instance))
+ {
+ XGLYPH_DIRTYP (instance) = dirty;
+ }
+}
+
/* #### do we need to cache this info to speed things up? */
Lisp_Object
* glyph cachel functions *
*****************************************************************************/
-/*
- #### All of this is 95% copied from face cachels.
- Consider consolidating.
- */
-
+/* #### All of this is 95% copied from face cachels. Consider
+ consolidating.
+
+ Why do we need glyph_cachels? Simply because a glyph_cachel captures
+ per-window information about a particular glyph. A glyph itself is
+ not created in any particular context, so if we were to rely on a
+ glyph to tell us about its dirtiness we would not be able to reset
+ the dirty flag after redisplaying it as it may exist in other
+ contexts. When we have redisplayed we need to know which glyphs to
+ reset the dirty flags on - the glyph_cachels give us a nice list we
+ can iterate through doing this. */
void
mark_glyph_cachels (glyph_cachel_dynarr *elements)
{
* subwindow functions *
*****************************************************************************/
-/* update the displayed characteristics of a subwindow */
-static void
+/* Update the displayed characteristics of a subwindow. This function
+ should generally only get called if the subwindow is actually
+ dirty. */
+void
update_subwindow (Lisp_Object subwindow)
{
Lisp_Image_Instance* ii = XIMAGE_INSTANCE (subwindow);
+ int count = specpdl_depth ();
- if (!IMAGE_INSTANCE_TYPE (ii) == IMAGE_WIDGET
+ /* The update method is allowed to call eval. Since it is quite
+ common for this function to get called from somewhere in
+ redisplay we need to make sure that quits are ignored. Otherwise
+ Fsignal will abort. */
+ specbind (Qinhibit_quit, Qt);
+
+ if (IMAGE_INSTANCE_TYPE (ii) == IMAGE_WIDGET
||
- NILP (IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)))
- return;
+ IMAGE_INSTANCE_TYPE (ii) == IMAGE_LAYOUT)
+ {
+ if (image_instance_changed (subwindow))
+ update_widget (subwindow);
+ /* Reset the changed flags. */
+ IMAGE_INSTANCE_WIDGET_FACE_CHANGED (ii) = 0;
+ IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii) = 0;
+ IMAGE_INSTANCE_TEXT_CHANGED (ii) = 0;
+ }
+ else if (IMAGE_INSTANCE_TYPE (ii) == IMAGE_SUBWINDOW
+ &&
+ !NILP (IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)))
+ {
+ MAYBE_DEVMETH (XDEVICE (ii->device), update_subwindow, (ii));
+ }
- MAYBE_DEVMETH (XDEVICE (ii->device), update_subwindow, (ii));
- /* We must update the window's size as it may have been changed by
- the the layout routines. We also do this here so that explicit resizing
- from lisp does not result in synchronous updates. */
- MAYBE_DEVMETH (XDEVICE (ii->device), resize_subwindow, (ii,
- IMAGE_INSTANCE_WIDTH (ii),
- IMAGE_INSTANCE_HEIGHT (ii)));
+ IMAGE_INSTANCE_SIZE_CHANGED (ii) = 0;
+ /* This function is typically called by redisplay just before
+ outputting the information to the screen. Thus we record a hash
+ of the output to determine whether on-screen is the same as
+ recorded structure. This approach has limitations in there is a
+ good chance that hash values will be different for the same
+ visual appearance. However, we would rather that then the other
+ way round - it simply means that we will get more displays than
+ we might need. We can get better hashing by making the depth
+ negative - currently it will recurse down 7 levels.*/
+ IMAGE_INSTANCE_DISPLAY_HASH (ii) = internal_hash (subwindow,
+ IMAGE_INSTANCE_HASH_DEPTH);
+
+ unbind_to (count, Qnil);
+}
+
+int
+image_instance_changed (Lisp_Object subwindow)
+{
+ Lisp_Image_Instance* ii = XIMAGE_INSTANCE (subwindow);
+
+ if (internal_hash (subwindow, IMAGE_INSTANCE_HASH_DEPTH) !=
+ IMAGE_INSTANCE_DISPLAY_HASH (ii))
+ return 1;
+ else if ((WIDGET_IMAGE_INSTANCEP (subwindow)
+ || LAYOUT_IMAGE_INSTANCEP (subwindow))
+ && !internal_equal (IMAGE_INSTANCE_WIDGET_ITEMS (ii),
+ IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii), 0))
+ return 1;
+ else
+ return 0;
}
/* Update all the subwindows on a frame. */
-void
-update_frame_subwindows (struct frame *f)
+DEFUN ("update-widget-instances", Fupdate_widget_instances,1, 1, 0, /*
+Given a FRAME, re-evaluate the display hash code for all widgets in the frame.
+Don't use this.
+*/
+ (frame))
{
int elt;
+ struct frame* f;
+ CHECK_FRAME (frame);
+ f = XFRAME (frame);
- if (f->subwindows_changed || f->subwindows_state_changed || f->faces_changed)
- for (elt = 0; elt < Dynarr_length (f->subwindow_cachels); elt++)
+ /* If we get called we know something has changed. */
+ for (elt = 0; elt < Dynarr_length (f->subwindow_cachels); elt++)
{
struct subwindow_cachel *cachel =
Dynarr_atp (f->subwindow_cachels, elt);
- if (cachel->being_displayed)
+ if (cachel->being_displayed &&
+ image_instance_changed (cachel->subwindow))
{
- update_subwindow (cachel->subwindow);
+ set_image_instance_dirty_p (cachel->subwindow, 1);
+ MARK_FRAME_GLYPHS_CHANGED (f);
}
}
+ return Qnil;
}
/* remove a subwindow from its frame */
cachel->height = dga->height;
cachel->being_displayed = 1;
- /* This forces any pending display changes to happen to the image
- before we show it. I'm not sure whether or not we need mark as
- clean here, but for now we will. */
- if (IMAGE_INSTANCE_DIRTYP (ii))
- {
- update_subwindow (subwindow);
- IMAGE_INSTANCE_DIRTYP (ii) = 0;
- }
-
MAYBE_DEVMETH (XDEVICE (ii->device), map_subwindow, (ii, x, y, dga));
}
actually really dumb now that we have dynamic geometry
calculations. What should really happen is that the subwindow
should query its child for an appropriate geometry. */
- if (NILP (width))
- IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii) = 20;
- else
+ if (INTP (width))
{
int w = 1;
- CHECK_INT (width);
if (XINT (width) > 1)
w = XINT (width);
IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii) = w;
}
- if (NILP (height))
- IMAGE_INSTANCE_SUBWINDOW_HEIGHT (ii) = 20;
else
+ IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii) = 20;
+
+ if (INTP (height))
{
int h = 1;
- CHECK_INT (height);
if (XINT (height) > 1)
h = XINT (height);
IMAGE_INSTANCE_SUBWINDOW_HEIGHT (ii) = h;
}
+ else
+ IMAGE_INSTANCE_SUBWINDOW_HEIGHT (ii) = 20;
}
DEFUN ("subwindowp", Fsubwindowp, 1, 1, 0, /*
(subwindow, width, height))
{
int neww, newh;
+ Lisp_Image_Instance* ii;
CHECK_SUBWINDOW_IMAGE_INSTANCE (subwindow);
+ ii = XIMAGE_INSTANCE (subwindow);
if (NILP (width))
- neww = XIMAGE_INSTANCE_WIDTH (subwindow);
+ neww = IMAGE_INSTANCE_WIDTH (ii);
else
neww = XINT (width);
if (NILP (height))
- newh = XIMAGE_INSTANCE_HEIGHT (subwindow);
+ newh = IMAGE_INSTANCE_HEIGHT (ii);
else
newh = XINT (height);
/* The actual resizing gets done asychronously by
update_subwindow. */
- XIMAGE_INSTANCE_HEIGHT (subwindow) = newh;
- XIMAGE_INSTANCE_WIDTH (subwindow) = neww;
+ IMAGE_INSTANCE_HEIGHT (ii) = newh;
+ IMAGE_INSTANCE_WIDTH (ii) = neww;
+ IMAGE_INSTANCE_SIZE_CHANGED (ii) = 1;
/* need to update the cachels as redisplay will not do this */
update_subwindow_cachel (subwindow);
also might not. */
MARK_DEVICE_FRAMES_GLYPHS_CHANGED
(XDEVICE (IMAGE_INSTANCE_DEVICE (ii)));
- MARK_IMAGE_INSTANCE_CHANGED (ii);
+ /* Cascade dirtiness so that we can have an animated glyph in a layout
+ for instance. */
+ set_image_instance_dirty_p (value, 1);
}
}
}
void
syms_of_glyphs (void)
{
+ INIT_LRECORD_IMPLEMENTATION (glyph);
+ INIT_LRECORD_IMPLEMENTATION (image_instance);
+
/* image instantiators */
DEFSUBR (Fimage_instantiator_format_list);
DEFSUBR (Fvalid_image_instantiator_format_p);
DEFSUBR (Fset_console_type_image_conversion_list);
DEFSUBR (Fconsole_type_image_conversion_list);
+ DEFSUBR (Fupdate_widget_instances);
defkeyword (&Q_file, ":file");
defkeyword (&Q_data, ":data");
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");
+ defsymbol (&Qupdate_widget_instances, "update-widget-instances");
DEFSUBR (Fmake_image_instance);
DEFSUBR (Fimage_instance_p);
Lisp_Object (*set_property_method) (Lisp_Object image_instance,
Lisp_Object property,
Lisp_Object val);
+ /* Asynchronously update properties. */
+ void (*update_method) (Lisp_Object image_instance);
/* Find out the desired geometry, as given by disp, of this image
instance. Actual geometry is stored in the appropriate slots in the
entry); \
} while (0)
+#define IIFORMAT_VALID_CONSOLE2(con1, con2, format) \
+ IIFORMAT_VALID_CONSOLE (con1, format); \
+ IIFORMAT_VALID_CONSOLE (con2, format);
+
#define DEFINE_DEVICE_IIFORMAT(type, format) \
DECLARE_IMAGE_INSTANTIATOR_FORMAT(format); \
struct image_instantiator_methods *type##_##format##_image_instantiator_methods
#define IIFORMAT_HAS_SHARED_DEVMETHOD(type, format, m, fromformat) \
(type##_##format##_image_instantiator_methods->m##_method = type##_##fromformat##_##m)
+#define IIFORMAT_INHERITS_DEVMETHOD(type, from, format, m) \
+ (type##_##format##_image_instantiator_methods->m##_method = from##_##format##_##m)
+#define IIFORMAT_INHERITS_SHARED_DEVMETHOD(type, from, format, m, fromformat) \
+ (type##_##format##_image_instantiator_methods->m##_method = from##_##fromformat##_##m)
+
struct image_instantiator_methods *
decode_device_ii_format (Lisp_Object device, Lisp_Object format,
Error_behavior errb);
DECLARE_DOESNT_RETURN (incompatible_image_types (Lisp_Object instantiator,
int given_dest_mask,
int desired_dest_mask));
-DECLARE_DOESNT_RETURN (signal_image_error (CONST char *, Lisp_Object));
-DECLARE_DOESNT_RETURN (signal_image_error_2 (CONST char *, Lisp_Object, Lisp_Object));
+DECLARE_DOESNT_RETURN (signal_image_error (const char *, Lisp_Object));
+DECLARE_DOESNT_RETURN (signal_image_error_2 (const char *, Lisp_Object, Lisp_Object));
/************************************************************************/
/* Image Specifier Object */
Lisp_Object name;
/* The glyph from which we were instantiated. This is a weak
reference. */
- Lisp_Object glyph;
+ Lisp_Object parent;
enum image_instance_type type;
unsigned int x_offset, y_offset; /* for layout purposes */
unsigned int width, height;
+ unsigned long display_hash; /* Hash value representing the structure
+ of the image_instance when it was
+ last displayed. */
unsigned int dirty : 1;
+ unsigned int size_changed : 1;
+ unsigned int text_changed : 1;
+ unsigned int layout_changed : 1;
+ unsigned int optimize_output : 1; /* For outputting layouts. */
+
union
{
struct
Lisp_Object type;
Lisp_Object props; /* properties or border*/
Lisp_Object items; /* a list of gui_items or children */
+ Lisp_Object pending_items; /* gui_items that should be displayed */
+ Lisp_Object width; /* dynamic width spec. */
+ Lisp_Object height; /* dynamic height spec. */
+ /* Change flags to augment dirty. */
+ unsigned int face_changed : 1;
+ unsigned int items_changed : 1;
} subwindow;
} u;
#define LAYOUT_JUSTIFY_RIGHT 1
#define LAYOUT_JUSTIFY_CENTER 2
+#define IMAGE_INSTANCE_HASH_DEPTH 0
+
/* Accessor macros. */
#define IMAGE_INSTANCE_DEVICE(i) ((i)->device)
#define IMAGE_INSTANCE_NAME(i) ((i)->name)
-#define IMAGE_INSTANCE_GLYPH(i) ((i)->glyph)
+#define IMAGE_INSTANCE_PARENT(i) ((i)->parent)
+#define IMAGE_INSTANCE_GLYPH(i) (image_instance_parent_glyph(i))
#define IMAGE_INSTANCE_TYPE(i) ((i)->type)
#define IMAGE_INSTANCE_XOFFSET(i) ((i)->x_offset)
#define IMAGE_INSTANCE_YOFFSET(i) ((i)->y_offset)
#define IMAGE_INSTANCE_WIDTH(i) ((i)->width)
#define IMAGE_INSTANCE_HEIGHT(i) ((i)->height)
+#define IMAGE_INSTANCE_DISPLAY_HASH(i) ((i)->display_hash)
#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_NEEDS_LAYOUT(i) \
+ (IMAGE_INSTANCE_DIRTYP (i) && IMAGE_INSTANCE_LAYOUT_CHANGED (i))
#define IMAGE_INSTANCE_FACE(i) \
- XGLYPH_FACE (IMAGE_INSTANCE_GLYPH (i))
-
+ (GLYPHP (IMAGE_INSTANCE_GLYPH (i)) ? \
+ XGLYPH_FACE (IMAGE_INSTANCE_GLYPH (i)) : Qnil)
+
+/* Changed flags */
+#define IMAGE_INSTANCE_TEXT_CHANGED(i) ((i)->text_changed)
+#define IMAGE_INSTANCE_SIZE_CHANGED(i) ((i)->size_changed)
+#define IMAGE_INSTANCE_WIDGET_FACE_CHANGED(i) \
+ ((i)->u.subwindow.face_changed)
+#define IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED(i) \
+ ((i)->u.subwindow.items_changed)
+#define IMAGE_INSTANCE_LAYOUT_CHANGED(i) ((i)->layout_changed)
+#define IMAGE_INSTANCE_OPTIMIZE_OUTPUT(i) ((i)->optimize_output)
+
+/* Text properties */
#define IMAGE_INSTANCE_TEXT_STRING(i) ((i)->u.text.string)
#define IMAGE_INSTANCE_TEXT_WIDTH(i) \
IMAGE_INSTANCE_WIDTH(i)
#define IMAGE_INSTANCE_TEXT_ASCENT(i) \
(IMAGE_INSTANCE_TEXT_HEIGHT(i) - IMAGE_INSTANCE_TEXT_DESCENT(i))
+/* Pixmap properties */
#define IMAGE_INSTANCE_PIXMAP_WIDTH(i) \
IMAGE_INSTANCE_WIDTH(i)
#define IMAGE_INSTANCE_PIXMAP_HEIGHT(i) \
#define IMAGE_INSTANCE_PIXMAP_MAXSLICE(i) ((i)->u.pixmap.maxslice)
#define IMAGE_INSTANCE_PIXMAP_TIMEOUT(i) ((i)->u.pixmap.timeout)
+/* Subwindow properties */
#define IMAGE_INSTANCE_SUBWINDOW_WIDTH(i) \
IMAGE_INSTANCE_WIDTH(i)
#define IMAGE_INSTANCE_SUBWINDOW_HEIGHT(i) \
#define IMAGE_INSTANCE_SUBWINDOW_JUSTIFY(i) \
((i)->u.subwindow.justification)
+/* Widget properties */
#define IMAGE_INSTANCE_WIDGET_WIDTH(i) \
IMAGE_INSTANCE_WIDTH(i)
#define IMAGE_INSTANCE_WIDGET_HEIGHT(i) \
IMAGE_INSTANCE_HEIGHT(i)
+#define IMAGE_INSTANCE_WIDGET_WIDTH_SUBR(i) ((i)->u.subwindow.width)
+#define IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR(i) ((i)->u.subwindow.height)
#define IMAGE_INSTANCE_WIDGET_TYPE(i) ((i)->u.subwindow.type)
#define IMAGE_INSTANCE_WIDGET_PROPS(i) ((i)->u.subwindow.props)
#define SET_IMAGE_INSTANCE_WIDGET_FACE(i,f) \
!NILP (IMAGE_INSTANCE_FACE (i)) ? IMAGE_INSTANCE_FACE (i) : \
Vwidget_face)
#define IMAGE_INSTANCE_WIDGET_ITEMS(i) ((i)->u.subwindow.items)
+#define IMAGE_INSTANCE_WIDGET_PENDING_ITEMS(i) \
+ ((i)->u.subwindow.pending_items)
#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
+/* Layout properties */
#define IMAGE_INSTANCE_LAYOUT_CHILDREN(i) ((i)->u.subwindow.items)
#define IMAGE_INSTANCE_LAYOUT_BORDER(i) ((i)->u.subwindow.props)
IMAGE_INSTANCE_NAME (XIMAGE_INSTANCE (i))
#define XIMAGE_INSTANCE_GLYPH(i) \
IMAGE_INSTANCE_GLYPH (XIMAGE_INSTANCE (i))
+#define XIMAGE_INSTANCE_PARENT(i) \
+ IMAGE_INSTANCE_PARENT (XIMAGE_INSTANCE (i))
#define XIMAGE_INSTANCE_TYPE(i) \
IMAGE_INSTANCE_TYPE (XIMAGE_INSTANCE (i))
+#define XIMAGE_INSTANCE_DISPLAY_HASH(i) \
+ IMAGE_INSTANCE_DISPLAY_HASH (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_NEEDS_LAYOUT(i) \
+ IMAGE_INSTANCE_NEEDS_LAYOUT (XIMAGE_INSTANCE (i))
#define XIMAGE_INSTANCE_WIDTH(i) \
IMAGE_INSTANCE_WIDTH (XIMAGE_INSTANCE (i))
#define XIMAGE_INSTANCE_HEIGHT(i) \
IMAGE_INSTANCE_WIDGET_WIDTH (XIMAGE_INSTANCE (i))
#define XIMAGE_INSTANCE_WIDGET_HEIGHT(i) \
IMAGE_INSTANCE_WIDGET_HEIGHT (XIMAGE_INSTANCE (i))
+#define XIMAGE_INSTANCE_WIDGET_WIDTH_SUBR(i) \
+ IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (XIMAGE_INSTANCE (i))
+#define XIMAGE_INSTANCE_WIDGET_HEIGHT_SUBR(i) \
+ IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (XIMAGE_INSTANCE (i))
#define XIMAGE_INSTANCE_WIDGET_TYPE(i) \
IMAGE_INSTANCE_WIDGET_TYPE (XIMAGE_INSTANCE (i))
#define XIMAGE_INSTANCE_WIDGET_PROPS(i) \
IMAGE_INSTANCE_WIDGET_ITEM (XIMAGE_INSTANCE (i))
#define XIMAGE_INSTANCE_WIDGET_ITEMS(i) \
IMAGE_INSTANCE_WIDGET_ITEMS (XIMAGE_INSTANCE (i))
+#define XIMAGE_INSTANCE_WIDGET_PENDING_ITEMS(i) \
+ IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (XIMAGE_INSTANCE (i))
#define XIMAGE_INSTANCE_WIDGET_TEXT(i) \
IMAGE_INSTANCE_WIDGET_TEXT (XIMAGE_INSTANCE (i))
#ifdef HAVE_WINDOW_SYSTEM
Lisp_Object bitmap_to_lisp_data (Lisp_Object name, int *xhot, int *yhot,
int ok_if_data_invalid);
-int read_bitmap_data_from_file (CONST char *filename, unsigned int *width,
+int read_bitmap_data_from_file (const char *filename, unsigned int *width,
unsigned int *height, unsigned char **datap,
int *x_hot, int *y_hot);
Lisp_Object xbm_mask_file_munging (Lisp_Object alist, Lisp_Object file,
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 Q_items, Q_properties, Q_image, Qimage_conversion_error;
+extern Lisp_Object Q_orientation, Qupdate_widget_instances;
+extern Lisp_Object Qwidget_callback_current_channel;
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;
+
unsigned short glyph_width (Lisp_Object glyph, Lisp_Object domain);
unsigned short glyph_ascent (Lisp_Object glyph, Lisp_Object domain);
unsigned short glyph_descent (Lisp_Object glyph, Lisp_Object domain);
void unmap_subwindow (Lisp_Object subwindow);
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);
+void update_widget (Lisp_Object widget);
+void update_subwindow (Lisp_Object subwindow);
+Lisp_Object image_instance_parent_glyph (struct Lisp_Image_Instance*);
+int image_instance_changed (Lisp_Object image);
struct expose_ignore
{
# define STDC_HEADERS
#endif
-#define __const const
-
\f
/* DO NOT EDIT THIS FILE -- it is automagically generated. -*- C -*- */
/* Bwaa-haa-haa! Not a chance that this is actually true! */
/* Call WARNFUN with a warning message when memory usage is high. */
extern void memory_warnings __P ((__ptr_t __start,
- void (*__warnfun) __P ((__const char *))));
+ void (*__warnfun) __P ((const char *))));
#if 0 /* unused in this file, and conflicting prototypes anyway */
#endif
/* How to really get more memory. */
-#ifdef HEAP_IN_DATA
+#if defined (HEAP_IN_DATA) && !defined(PDUMP)
/* once dumped, free() & realloc() on static heap space will fail */
#define PURE_DATA(x) \
((static_heap_dumped && (char*)x >= static_heap_base \
static int
initialize ()
{
-#ifdef HEAP_IN_DATA
+#if defined (HEAP_IN_DATA) && !defined(PDUMP)
if (static_heap_dumped && __morecore == more_static_core)
{
__morecore = __default_morecore;
int type;
__malloc_size_t block, blocks, oldlimit;
- if (PURE_DATA(ptr))
+ if (PURE_DATA (ptr))
{
result = malloc (size);
memcpy(result, ptr, size);
/* 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.modifiers & 1) modifiers |= XEMACS_MOD_SHIFT;
+ if (ev.modifiers & 2) modifiers |= XEMACS_MOD_META;
+ if (ev.modifiers & 4) modifiers |= XEMACS_MOD_CONTROL;
+ if (ev.modifiers & 8) modifiers |= XEMACS_MOD_META;
if (ev.buttons & GPM_B_LEFT)
{
#include <config.h>
#include "lisp.h"
-#include "gui.h"
#include "redisplay.h"
+#include "gui.h"
+#include "glyphs.h"
#include "frame.h"
+#include "events.h"
#include "elhash.h"
#include "console-msw.h"
#include "buffer.h"
* command if we return nil
*/
Lisp_Object
-mswindows_handle_gui_wm_command (struct frame* f, HWND ctrl, DWORD id)
+mswindows_handle_gui_wm_command (struct frame* f, HWND ctrl, LPARAM id)
{
/* Try to map the command id through the proper hash table */
- Lisp_Object data, fn, arg, frame;
+ Lisp_Object callback, callback_ex, image_instance, frame, event;
+
+ XSETFRAME (frame, f);
/* #### make_int should assert that --kkm */
assert (XINT (make_int (id)) == id);
- data = Fgethash (make_int (id),
- FRAME_MSWINDOWS_WIDGET_HASH_TABLE (f), Qnil);
-
- if (NILP (data) || UNBOUNDP (data))
+ image_instance = Fgethash (make_int (id),
+ FRAME_MSWINDOWS_WIDGET_HASH_TABLE1 (f), Qnil);
+ callback = Fgethash (make_int (id),
+ FRAME_MSWINDOWS_WIDGET_HASH_TABLE2 (f), Qnil);
+ callback_ex = Fgethash (make_int (id),
+ FRAME_MSWINDOWS_WIDGET_HASH_TABLE3 (f), Qnil);
+
+ if (!NILP (callback_ex) && !UNBOUNDP (callback_ex))
+ {
+ event = Fmake_event (Qnil, Qnil);
+
+ XEVENT (event)->event_type = misc_user_event;
+ XEVENT (event)->channel = frame;
+ XEVENT (event)->timestamp = GetTickCount ();
+ XEVENT (event)->event.eval.function = Qeval;
+ XEVENT (event)->event.eval.object =
+ list4 (Qfuncall, callback_ex, image_instance, event);
+ }
+ else if (NILP (callback) || UNBOUNDP (callback))
return Qnil;
-
- MARK_SUBWINDOWS_STATE_CHANGED;
- /* Ok, this is our one. Enqueue it. */
- get_gui_callback (data, &fn, &arg);
- XSETFRAME (frame, f);
- mswindows_enqueue_misc_user_event (frame, fn, arg);
-
+ else
+ {
+ Lisp_Object fn, arg;
+
+ event = Fmake_event (Qnil, Qnil);
+
+ get_gui_callback (callback, &fn, &arg);
+ XEVENT (event)->event_type = misc_user_event;
+ XEVENT (event)->channel = frame;
+ XEVENT (event)->timestamp = GetTickCount ();
+ XEVENT (event)->event.eval.function = fn;
+ XEVENT (event)->event.eval.object = arg;
+ }
+
+ mswindows_enqueue_dispatch_event (event);
+ /* The result of this evaluation could cause other instances to change so
+ enqueue an update callback to check this. We also have to make sure that
+ the function does not appear in the command history.
+ #### I'm sure someone can tell me how to optimize this. */
+ mswindows_enqueue_misc_user_event
+ (frame, Qeval,
+ list3 (Qlet,
+ list2 (Qthis_command,
+ Qlast_command),
+ list2 (Qupdate_widget_instances, frame)));
return Qt;
}
*/
(operation, document, parameters, show_flag))
{
- Lisp_Object current_dir;
+ /* Encode filename and current directory. */
+ Lisp_Object current_dir = Ffile_name_directory (document);
+ char* path = NULL;
+ char* doc = NULL;
+ Extbyte* f=0;
+ int ret;
+ struct gcpro gcpro1, gcpro2;
CHECK_STRING (document);
- /* Encode filename and current directory. */
- current_dir = current_buffer->directory;
- if ((int) ShellExecute (NULL,
- (STRINGP (operation) ?
- XSTRING (operation)->data : NULL),
- XSTRING (document)->data,
- (STRINGP (parameters) ?
- XSTRING (parameters)->data : NULL),
- XSTRING (current_dir)->data,
- (INTP (show_flag) ?
- XINT (show_flag) : SW_SHOWDEFAULT))
- > 32)
+ if (NILP (current_dir))
+ current_dir = current_buffer->directory;
+
+ GCPRO2 (current_dir, document);
+
+ /* Use mule and cygwin-safe APIs top get at file data. */
+ if (STRINGP (current_dir))
+ {
+ TO_EXTERNAL_FORMAT (LISP_STRING, current_dir,
+ C_STRING_ALLOCA, f,
+ Qfile_name);
+#ifdef __CYGWIN32__
+ CYGWIN_WIN32_PATH (f, path);
+#else
+ path = f;
+#endif
+ }
+
+ if (STRINGP (document))
+ {
+ TO_EXTERNAL_FORMAT (LISP_STRING, document,
+ C_STRING_ALLOCA, f,
+ Qfile_name);
+#ifdef __CYGWIN32__
+ CYGWIN_WIN32_PATH (f, doc);
+#else
+ doc = f;
+#endif
+ }
+
+ UNGCPRO;
+
+ ret = (int) ShellExecute (NULL,
+ (STRINGP (operation) ?
+ XSTRING_DATA (operation) : NULL),
+ doc,
+ (STRINGP (parameters) ?
+ XSTRING_DATA (parameters) : NULL),
+ path,
+ (INTP (show_flag) ?
+ XINT (show_flag) : SW_SHOWDEFAULT));
+
+ if (ret > 32)
return Qt;
+
+ if (ret == ERROR_FILE_NOT_FOUND)
+ signal_simple_error ("file not found", document);
+ else if (ret == ERROR_PATH_NOT_FOUND)
+ signal_simple_error ("path not found", current_dir);
+ else if (ret == ERROR_BAD_FORMAT)
+ signal_simple_error ("bad executable format", document);
+ else
+ error ("internal error");
- error ("ShellExecute failed");
return Qnil;
}
#include "gui-x.h"
#include "buffer.h"
#include "device.h"
+#include "events.h"
#include "frame.h"
#include "gui.h"
+#include "glyphs.h"
#include "redisplay.h"
#include "opaque.h"
popup_selection_callback (Widget widget, LWLIB_ID ignored_id,
XtPointer client_data)
{
- Lisp_Object fn, arg;
- Lisp_Object data;
- Lisp_Object frame;
+ Lisp_Object data, image_instance, callback, callback_ex;
+ Lisp_Object frame, event;
+ int update_subwindows_p = 0;
struct device *d = get_device_from_display (XtDisplay (widget));
struct frame *f = x_any_widget_or_parent_to_frame (d, widget);
VOID_TO_LISP (data, client_data);
XSETFRAME (frame, f);
+ image_instance = XCAR (data);
+ callback = XCAR (XCDR (data));
+ callback_ex = XCDR (XCDR (data));
+
#if 0
/* #### What the hell? I can't understand why this call is here,
and doing it is really courting disaster in the new event
if (((EMACS_INT) client_data) == -1)
{
- fn = Qrun_hooks;
- arg = Qmenu_no_selection_hook;
+ event = Fmake_event (Qnil, Qnil);
+
+ XEVENT (event)->event_type = misc_user_event;
+ XEVENT (event)->channel = frame;
+ XEVENT (event)->event.eval.function = Qrun_hooks;
+ XEVENT (event)->event.eval.object = Qmenu_no_selection_hook;
}
else
{
- MARK_SUBWINDOWS_STATE_CHANGED;
- get_gui_callback (data, &fn, &arg);
+ update_subwindows_p = 1;
+
+ if (!NILP (callback_ex) && !UNBOUNDP (callback_ex))
+ {
+ event = Fmake_event (Qnil, Qnil);
+
+ XEVENT (event)->event_type = misc_user_event;
+ XEVENT (event)->channel = frame;
+ XEVENT (event)->event.eval.function = Qeval;
+ XEVENT (event)->event.eval.object =
+ list4 (Qfuncall, callback_ex, image_instance, event);
+ }
+ else if (NILP (callback) || UNBOUNDP (callback))
+ event = Qnil;
+ else
+ {
+ Lisp_Object fn, arg;
+
+ event = Fmake_event (Qnil, Qnil);
+
+ get_gui_callback (callback, &fn, &arg);
+ XEVENT (event)->event_type = misc_user_event;
+ XEVENT (event)->channel = frame;
+ XEVENT (event)->event.eval.function = fn;
+ XEVENT (event)->event.eval.object = arg;
+ }
}
/* This is the timestamp used for asserting focus so we need to get an
#else
DEVICE_X_MOUSE_TIMESTAMP (d) = DEVICE_X_GLOBAL_MOUSE_TIMESTAMP (d);
#endif
- signal_special_Xt_user_event (frame, fn, arg);
+ if (!NILP (event))
+ enqueue_Xt_dispatch_event (event);
+ /* The result of this evaluation could cause other instances to change so
+ enqueue an update callback to check this. We also have to make sure that
+ the function does not appear in the command history.
+ #### I'm sure someone can tell me how to optimize this. */
+ if (update_subwindows_p && !NILP (event))
+ signal_special_Xt_user_event (frame, Qeval,
+ list3 (Qlet,
+ list2 (Qthis_command,
+ Qlast_command),
+ list2 (Qupdate_widget_instances,
+ frame)));
}
#if 1
#endif
char *
-menu_separator_style (CONST char *s)
+menu_separator_style (const char *s)
{
- CONST char *p;
+ const char *p;
char first;
if (!s || s[0] == '\0')
return NULL;
}
+char *
+strdup_and_add_accel (char *name)
+{
+ int i;
+ int found_accel = 0;
+
+ for (i=0; name[i]; ++i)
+ if (name[i] == '%' && name[i+1] == '_')
+ {
+ found_accel = 1;
+ break;
+ }
+
+ if (found_accel)
+ return xstrdup (name);
+ else
+ {
+ char *chars = (char *) alloca (strlen (name) + 3);
+ chars[0] = '%';
+ chars[1] = '_';
+ memcpy (chars+2, name, strlen (name) + 1);
+ return xstrdup (chars);
+ }
+}
/* This does the dirty work. gc_currently_forbidden is 1 when this is called.
*/
int
-button_item_to_widget_value (Lisp_Object gui_item, widget_value *wv,
- int allow_text_field_p, int no_keys_p)
+button_item_to_widget_value (Lisp_Object gui_object_instance,
+ Lisp_Object gui_item, widget_value *wv,
+ int allow_text_field_p, int no_keys_p,
+ int menu_entry_p)
{
/* !!#### This function has not been Mule-ized */
/* This function cannot GC because gc_currently_forbidden is set when
{
wv->type = TEXT_TYPE;
wv->name = (char *) XSTRING_DATA (gui_item);
- wv->name = xstrdup (wv->name);
+ wv->name = strdup_and_add_accel (wv->name);
return 1;
}
else if (!GUI_ITEMP (gui_item))
signal_simple_error(":filter keyword not permitted on leaf nodes", gui_item);
#ifdef HAVE_MENUBARS
- if (!gui_item_included_p (gui_item, Vmenubar_configuration))
+ if (menu_entry_p && !gui_item_included_p (gui_item, Vmenubar_configuration))
{
/* the include specification says to ignore this item. */
return 0;
}
#endif /* HAVE_MENUBARS */
+ if (!STRINGP (pgui->name))
+ pgui->name = Feval (pgui->name);
+
CHECK_STRING (pgui->name);
wv->name = (char *) XSTRING_DATA (pgui->name);
wv->name = xstrdup (wv->name);
if (!NILP (pgui->suffix))
{
- CONST char *const_bogosity;
+ const char *const_bogosity;
Lisp_Object suffix2;
/* Shortcut to avoid evaluating suffix each time */
wv_set_evalable_slot (wv->enabled, pgui->active);
wv_set_evalable_slot (wv->selected, pgui->selected);
- if (!NILP (pgui->callback))
- wv->call_data = LISP_TO_VOID (pgui->callback);
+ if (!NILP (pgui->callback) || !NILP (pgui->callback_ex))
+ wv->call_data = LISP_TO_VOID (cons3 (gui_object_instance,
+ pgui->callback,
+ pgui->callback_ex));
if (no_keys_p
#ifdef HAVE_MENUBARS
- || !menubar_show_keybindings
+ || (menu_entry_p && !menubar_show_keybindings)
#endif
)
wv->key = 0;
}
else if (SYMBOLP (pgui->callback)) /* Show the binding of this command. */
{
- char buf [1024];
+ char buf[1024]; /* #### */
/* #### Warning, dependency here on current_buffer and point */
where_is_to_char (pgui->callback, buf);
if (buf [0])
}
/* 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 void gui_item_children_to_widget_values (Lisp_Object gui_object_instance,
+ Lisp_Object items,
+ widget_value* parent);
static widget_value *
-gui_items_to_widget_values_1 (Lisp_Object items, widget_value* parent,
+gui_items_to_widget_values_1 (Lisp_Object gui_object_instance,
+ Lisp_Object items, widget_value* parent,
widget_value* prev)
{
widget_value* wv = 0;
parent->contents = wv;
else
prev->next = wv;
- if (!button_item_to_widget_value (items, wv, 0, 1))
+ if (!button_item_to_widget_value (gui_object_instance,
+ items, wv, 0, 1, 0))
{
free_widget_value_tree (wv);
if (parent)
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);
+ wv = gui_items_to_widget_values_1 (gui_object_instance,
+ XCAR (items), parent, 0);
else
- wv = gui_items_to_widget_values_1 (XCAR (items), 0, prev);
+ wv = gui_items_to_widget_values_1 (gui_object_instance,
+ XCAR (items), 0, prev);
/* the rest are the children */
- gui_item_children_to_widget_values (XCDR (items), wv);
+ gui_item_children_to_widget_values (gui_object_instance,
+ XCDR (items), wv);
}
return wv;
}
static void
-gui_item_children_to_widget_values (Lisp_Object items, widget_value* parent)
+gui_item_children_to_widget_values (Lisp_Object gui_object_instance,
+ 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);
+ prev = gui_items_to_widget_values_1 (gui_object_instance, 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);
+ wv = gui_items_to_widget_values_1 (gui_object_instance, tab, 0, prev);
prev = wv;
}
}
widget_value *
-gui_items_to_widget_values (Lisp_Object items)
+gui_items_to_widget_values (Lisp_Object gui_object_instance, Lisp_Object items)
{
/* !!#### This function has not been Mule-ized */
/* This function can GC */
wv_closure = make_opaque_ptr (control);
record_unwind_protect (widget_value_unwind, wv_closure);
- gui_items_to_widget_values_1 (items, control, 0);
+ gui_items_to_widget_values_1 (gui_object_instance, items, control, 0);
/* mess about getting the data we really want */
tmp = control;
void
syms_of_gui_x (void)
{
+ INIT_LRECORD_IMPLEMENTATION (popup_data);
+
defsymbol (&Qmenu_no_selection_hook, "menu-no-selection-hook");
}
void free_popup_widget_value_tree (widget_value *wv);
void popup_selection_callback (Widget widget, LWLIB_ID ignored_id,
XtPointer client_data);
-int button_item_to_widget_value (Lisp_Object desc, widget_value *wv,
- int allow_text_field_p, int no_keys_p);
-widget_value * gui_items_to_widget_values (Lisp_Object items);
+char *strdup_and_add_accel (char *name);
+int button_item_to_widget_value (Lisp_Object gui_object_instance,
+ Lisp_Object gui_item, widget_value *wv,
+ int allow_text_field_p, int no_keys_p,
+ int menu_entry_p);
+widget_value * gui_items_to_widget_values (Lisp_Object gui_object_instance,
+ Lisp_Object items);
Lisp_Object menu_name_to_accelerator (char *name);
-char *menu_separator_style (CONST char *s);
+char *menu_separator_style (const char *s);
Lisp_Object widget_value_unwind (Lisp_Object closure);
#endif /* INCLUDED_gui_x_h_ */
#include "lisp.h"
#include "gui.h"
#include "elhash.h"
+#include "buffer.h"
#include "bytecode.h"
Lisp_Object Q_active, Q_suffix, Q_keys, Q_style, Q_selected;
Lisp_Object Q_filter, Q_config, Q_included, Q_key_sequence;
-Lisp_Object Q_accelerator, Q_label, Q_callback;
+Lisp_Object Q_accelerator, Q_label, Q_callback, Q_callback_ex, Q_value;
Lisp_Object Qtoggle, Qradio;
static Lisp_Object parse_gui_item_tree_list (Lisp_Object list);
#endif /* HAVE_POPUPS */
int
-separator_string_p (CONST char *s)
+separator_string_p (const char *s)
{
- CONST char *p;
+ const char *p;
char first;
if (!s || s[0] == '\0')
void
get_gui_callback (Lisp_Object data, Lisp_Object *fn, Lisp_Object *arg)
{
- if (SYMBOLP (data)
+ if (EQ (data, Qquit))
+ {
+ *fn = Qeval;
+ *arg = list3 (Qsignal, list2 (Qquote, Qquit), Qnil);
+ Vquit_flag = Qt;
+ }
+ else if (SYMBOLP (data)
|| (COMPILED_FUNCTIONP (data)
&& XCOMPILED_FUNCTION (data)->flags.interactivep)
|| (CONSP (data) && (EQ (XCAR (data), Qlambda))
Lisp_Object key, Lisp_Object val,
Error_behavior errb)
{
- Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+ Lisp_Gui_Item *pgui_item = XGUI_ITEM (gui_item);
if (!KEYWORDP (key))
signal_simple_error_2 ("Non-keyword in gui item", key, pgui_item->name);
else if (EQ (key, Q_style)) pgui_item->style = val;
else if (EQ (key, Q_selected)) pgui_item->selected = val;
else if (EQ (key, Q_keys)) pgui_item->keys = val;
- else if (EQ (key, Q_callback)) pgui_item->callback = val;
+ else if (EQ (key, Q_callback)) pgui_item->callback = val;
+ else if (EQ (key, Q_callback_ex)) pgui_item->callback_ex = val;
+ else if (EQ (key, Q_value)) pgui_item->value = val;
else if (EQ (key, Q_key_sequence)) ; /* ignored for FSF compatibility */
else if (EQ (key, Q_label)) ; /* ignored for 21.0 implement in 21.2 */
else if (EQ (key, Q_accelerator))
signal_simple_error ("Bad keyboard accelerator", val);
}
else if (ERRB_EQ (errb, ERROR_ME))
- signal_simple_error_2 ("Unknown keyword in gui item", key, pgui_item->name);
+ signal_simple_error_2 ("Unknown keyword in gui item", key,
+ pgui_item->name);
}
void
lp->name = Qnil;
lp->callback = Qnil;
+ lp->callback_ex = Qnil;
lp->suffix = Qnil;
lp->active = Qt;
lp->included = Qt;
lp->selected = Qnil;
lp->keys = Qnil;
lp->accelerator = Qnil;
+ lp->value = Qnil;
}
Lisp_Object
int length, plist_p, start;
Lisp_Object *contents;
Lisp_Object gui_item = allocate_gui_item ();
- Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+ Lisp_Gui_Item *pgui_item = XGUI_ITEM (gui_item);
CHECK_VECTOR (item);
length = XVECTOR_LENGTH (item);
void
gui_add_item_keywords_to_plist (Lisp_Object plist, Lisp_Object gui_item)
{
- Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+ Lisp_Gui_Item *pgui_item = XGUI_ITEM (gui_item);
if (!NILP (pgui_item->callback))
Fplist_put (plist, Q_callback, pgui_item->callback);
+ if (!NILP (pgui_item->callback_ex))
+ Fplist_put (plist, Q_callback_ex, pgui_item->callback_ex);
if (!NILP (pgui_item->suffix))
Fplist_put (plist, Q_suffix, pgui_item->suffix);
if (!NILP (pgui_item->active))
Fplist_put (plist, Q_keys, pgui_item->keys);
if (!NILP (pgui_item->accelerator))
Fplist_put (plist, Q_accelerator, pgui_item->accelerator);
+ if (!NILP (pgui_item->value))
+ Fplist_put (plist, Q_value, pgui_item->value);
}
/*
Lisp_Object
gui_item_accelerator (Lisp_Object gui_item)
{
- Lisp_Gui_Item* pgui = XGUI_ITEM (gui_item);
+ Lisp_Gui_Item *pgui = XGUI_ITEM (gui_item);
if (!NILP (pgui->accelerator))
return pgui->accelerator;
else
- return pgui->name;
+ return gui_name_accelerator (pgui->name);
}
Lisp_Object
gui_name_accelerator (Lisp_Object nm)
{
- /* !!#### This function has not been Mule-ized */
- char* name = (char*)XSTRING_DATA (nm);
-
- while (*name) {
- if (*name=='%') {
- ++name;
- if (!(*name))
- return Qnil;
- if (*name=='_' && *(name+1))
+ Bufbyte *name = XSTRING_DATA (nm);
+
+ while (*name)
+ {
+ if (*name == '%')
{
- int accelerator = (int) (unsigned char) (*(name+1));
- return make_char (tolower (accelerator));
+ ++name;
+ if (!(*name))
+ return Qnil;
+ if (*name == '_' && *(name + 1))
+ {
+ Emchar accelerator = charptr_emchar (name + 1);
+ /* #### bogus current_buffer dependency */
+ return make_char (DOWNCASE (current_buffer, accelerator));
+ }
}
+ INC_CHARPTR (name);
}
- ++name;
- }
- return Qnil;
+ return make_char (DOWNCASE (current_buffer,
+ charptr_emchar (XSTRING_DATA (nm))));
}
/*
gui_item_included_p (Lisp_Object gui_item, Lisp_Object conflist)
{
/* This function can call lisp */
- Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+ Lisp_Gui_Item *pgui_item = XGUI_ITEM (gui_item);
/* Evaluate :included first. Shortcut to avoid evaluating Qt each time */
if (!EQ (pgui_item->included, Qt)
* buffer.
*/
unsigned int
-gui_item_display_flush_left (Lisp_Object gui_item,
- char* buf, Bytecount buf_len)
+gui_item_display_flush_left (Lisp_Object gui_item,
+ char *buf, Bytecount buf_len)
{
/* This function can call lisp */
char *p = buf;
Bytecount len;
- Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+ Lisp_Gui_Item *pgui_item = XGUI_ITEM (gui_item);
/* Copy item name first */
CHECK_STRING (pgui_item->name);
*/
unsigned int
gui_item_display_flush_right (Lisp_Object gui_item,
- char* buf, Bytecount buf_len)
+ char *buf, Bytecount buf_len)
{
- Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+ Lisp_Gui_Item *pgui_item = XGUI_ITEM (gui_item);
*buf = 0;
#ifdef HAVE_MENUBARS
if (!NILP (pgui_item->keys))
{
CHECK_STRING (pgui_item->keys);
- if (XSTRING_LENGTH (pgui_item->keys) > buf_len)
+ if (XSTRING_LENGTH (pgui_item->keys) + 1 > buf_len)
signal_too_long_error (pgui_item->name);
- strcpy (buf, (CONST char *) XSTRING_DATA (pgui_item->keys));
+ memcpy (buf, XSTRING_DATA (pgui_item->keys),
+ XSTRING_LENGTH (pgui_item->keys) + 1);
return XSTRING_LENGTH (pgui_item->keys);
}
/* See if we can derive keys out of callback symbol */
if (SYMBOLP (pgui_item->callback))
{
- char buf2 [1024];
+ char buf2[1024]; /* #### */
Bytecount len;
where_is_to_char (pgui_item->callback, buf2);
mark_object (p->name);
mark_object (p->callback);
+ mark_object (p->callback_ex);
mark_object (p->config);
mark_object (p->suffix);
mark_object (p->active);
mark_object (p->selected);
mark_object (p->keys);
mark_object (p->accelerator);
+ mark_object (p->value);
return Qnil;
}
{
Lisp_Gui_Item *p = XGUI_ITEM (obj);
- return HASH2 (HASH5 (internal_hash (p->name, depth + 1),
+ return HASH2 (HASH6 (internal_hash (p->name, depth + 1),
internal_hash (p->callback, depth + 1),
+ internal_hash (p->callback_ex, depth + 1),
internal_hash (p->suffix, depth + 1),
internal_hash (p->active, depth + 1),
internal_hash (p->included, depth + 1)),
- HASH5 (internal_hash (p->config, depth + 1),
+ HASH6 (internal_hash (p->config, depth + 1),
internal_hash (p->filter, depth + 1),
internal_hash (p->style, depth + 1),
internal_hash (p->selected, depth + 1),
- internal_hash (p->keys, depth + 1)));
+ internal_hash (p->keys, depth + 1),
+ internal_hash (p->value, depth + 1)));
}
int
&&
internal_equal (p1->callback, p2->callback, depth + 1)
&&
+ internal_equal (p1->callback_ex, p2->callback_ex, depth + 1)
+ &&
EQ (p1->suffix, p2->suffix)
&&
EQ (p1->active, p2->active)
&&
EQ (p1->accelerator, p2->accelerator)
&&
- EQ (p1->keys, p2->keys)))
+ EQ (p1->keys, p2->keys)
+ &&
+ EQ (p1->value, p2->value)))
return 0;
return 1;
}
write_c_string (buf, printcharfun);
}
+static Lisp_Object
+copy_gui_item (Lisp_Object gui_item)
+{
+ Lisp_Object ret = allocate_gui_item ();
+ Lisp_Gui_Item *lp, *g = XGUI_ITEM (gui_item);
+
+ lp = XGUI_ITEM (ret);
+ lp->name = g->name;
+ lp->callback = g->callback;
+ lp->callback_ex = g->callback_ex;
+ lp->suffix = g->suffix;
+ lp->active = g->active;
+ lp->included = g->included;
+ lp->config = g->config;
+ lp->filter = g->filter;
+ lp->style = g->style;
+ lp->selected = g->selected;
+ lp->keys = g->keys;
+ lp->accelerator = g->accelerator;
+ lp->value = g->value;
+
+ return ret;
+}
+
+Lisp_Object
+copy_gui_item_tree (Lisp_Object arg)
+{
+ if (CONSP (arg))
+ {
+ Lisp_Object rest = arg = Fcopy_sequence (arg);
+ while (CONSP (rest))
+ {
+ XCAR (rest) = copy_gui_item_tree (XCAR (rest));
+ rest = XCDR (rest);
+ }
+ return arg;
+ }
+ else if (GUI_ITEMP (arg))
+ return copy_gui_item (arg);
+ else
+ return arg;
+}
+
/* 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)
+static Lisp_Object
+parse_gui_item_tree_item (Lisp_Object entry)
{
Lisp_Object ret = entry;
+ struct gcpro gcpro1;
+
+ GCPRO1 (ret);
+
if (VECTORP (entry))
{
- ret = gui_parse_item_keywords_no_errors (entry);
+ ret = gui_parse_item_keywords_no_errors (entry);
}
else if (STRINGP (entry))
{
else
signal_simple_error ("item must be a vector or a string", entry);
- return ret;
+ RETURN_UNGCPRO (ret);
}
-Lisp_Object parse_gui_item_tree_children (Lisp_Object list)
+Lisp_Object
+parse_gui_item_tree_children (Lisp_Object list)
{
- Lisp_Object rest, ret = Qnil;
+ Lisp_Object rest, ret = Qnil, sub = Qnil;
+ struct gcpro gcpro1, gcpro2;
+
+ GCPRO2 (ret, sub);
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
ret = Fcons (sub, ret);
}
/* make the order the same as the items we have parsed */
- return Fnreverse (ret);
+ RETURN_UNGCPRO (Fnreverse (ret));
}
-static Lisp_Object parse_gui_item_tree_list (Lisp_Object list)
+static Lisp_Object
+parse_gui_item_tree_list (Lisp_Object list)
{
Lisp_Object ret;
+ struct gcpro gcpro1;
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)));
+ GCPRO1 (ret);
+ ret = Fcons (ret, parse_gui_item_tree_children (XCDR (list)));
+ RETURN_UNGCPRO (ret);
+}
+
+static void
+finalize_gui_item (void* header, int for_disksave)
+{
}
DEFINE_LRECORD_IMPLEMENTATION ("gui-item", gui_item,
mark_gui_item, print_gui_item,
- 0, gui_item_equal,
+ finalize_gui_item, gui_item_equal,
gui_item_hash,
0,
Lisp_Gui_Item);
void
syms_of_gui (void)
{
+ INIT_LRECORD_IMPLEMENTATION (gui_item);
+
defkeyword (&Q_active, ":active");
defkeyword (&Q_suffix, ":suffix");
defkeyword (&Q_keys, ":keys");
defkeyword (&Q_accelerator, ":accelerator");
defkeyword (&Q_label, ":label");
defkeyword (&Q_callback, ":callback");
+ defkeyword (&Q_callback_ex, ":callback-ex");
+ defkeyword (&Q_value, ":value");
defsymbol (&Qtoggle, "toggle");
defsymbol (&Qradio, "radio");
#ifndef INCLUDED_gui_h_
#define INCLUDED_gui_h_
-int separator_string_p (CONST char *s);
+int separator_string_p (const char *s);
void get_gui_callback (Lisp_Object, Lisp_Object *, Lisp_Object *);
extern int popup_up_p;
struct lcrecord_header header;
Lisp_Object name; /* String */
Lisp_Object callback; /* Symbol or form */
+ Lisp_Object callback_ex; /* Form taking context arguments */
Lisp_Object suffix; /* String */
Lisp_Object active; /* Form */
Lisp_Object included; /* Form */
Lisp_Object selected; /* Form */
Lisp_Object keys; /* String */
Lisp_Object accelerator; /* Char or Symbol */
+ Lisp_Object value; /* Anything you like */
};
DECLARE_LRECORD (gui_item, Lisp_Gui_Item);
extern Lisp_Object Q_accelerator, Q_active, Q_config, Q_filter, Q_included;
extern Lisp_Object Q_keys, Q_selected, Q_suffix, Qradio, Qtoggle;
-extern Lisp_Object Q_key_sequence, Q_label, Q_callback;
+extern Lisp_Object Q_key_sequence, Q_label, Q_callback, Q_callback_ex, Q_value;
void gui_item_add_keyval_pair (Lisp_Object,
Lisp_Object key, Lisp_Object val,
Lisp_Object allocate_gui_item (void);
void gui_item_init (Lisp_Object gui_item);
Lisp_Object parse_gui_item_tree_children (Lisp_Object list);
+Lisp_Object copy_gui_item_tree (Lisp_Object arg);
/* this is mswindows biased but reasonably safe I think */
#define GUI_ITEM_ID_SLOTS 8
/* Gutter implementation.
- Copyright (C) 1999 Andy Piper.
+ Copyright (C) 1999, 2000 Andy Piper.
This file is part of XEmacs.
Lisp_Object Vdefault_gutter_position;
Lisp_Object Qgutter_size;
+Lisp_Object Qgutter_visible;
+Lisp_Object Qdefault_gutter_position_changed_hook;
+
+static void
+update_gutter_geometry (struct frame *f, enum gutter_pos pos);
#define SET_GUTTER_WAS_VISIBLE_FLAG(frame, pos, flag) \
do { \
return frame->right_gutter_was_visible;
default:
abort ();
+ return 0; /* To keep the compiler happy */
}
}
+#if 0
static Lisp_Object
frame_topmost_window (struct frame *f)
{
return w;
}
+#endif
static Lisp_Object
frame_bottommost_window (struct frame *f)
int *width, int *height)
{
struct window
- * top = XWINDOW (frame_topmost_window (f)),
* bot = XWINDOW (frame_bottommost_window (f));
/* The top and bottom gutters take precedence over the left and
right. */
case BOTTOM_GUTTER:
*x = FRAME_LEFT_BORDER_END (f);
- *y = WINDOW_BOTTOM (bot)
- - FRAME_BOTTOM_GUTTER_BOUNDS (f);
+ *y = WINDOW_BOTTOM (bot);
*width = FRAME_RIGHT_BORDER_START (f)
- FRAME_LEFT_BORDER_END (f);
*height = FRAME_BOTTOM_GUTTER_BOUNDS (f);
case LEFT_GUTTER:
*x = FRAME_LEFT_BORDER_END (f);
- *y = WINDOW_TEXT_TOP (top);
+ *y = FRAME_TOP_BORDER_END (f) + FRAME_TOP_GUTTER_BOUNDS (f);
*width = FRAME_LEFT_GUTTER_BOUNDS (f);
*height = WINDOW_BOTTOM (bot)
- - (WINDOW_TEXT_TOP (top)
- + FRAME_BOTTOM_GUTTER_BOUNDS (f));
+ - (FRAME_TOP_BORDER_END (f) + FRAME_TOP_GUTTER_BOUNDS (f));
break;
case RIGHT_GUTTER:
*x = FRAME_RIGHT_BORDER_START (f)
- FRAME_RIGHT_GUTTER_BOUNDS (f);
- *y = WINDOW_TEXT_TOP (top);
+ *y = FRAME_TOP_BORDER_END (f) + FRAME_TOP_GUTTER_BOUNDS (f);
*width = FRAME_RIGHT_GUTTER_BOUNDS (f);
*height = WINDOW_BOTTOM (bot)
- - (WINDOW_TEXT_TOP (top)
- + FRAME_BOTTOM_GUTTER_BOUNDS (f));
+ - (FRAME_TOP_BORDER_END (f) + FRAME_TOP_GUTTER_BOUNDS (f));
break;
default:
}
}
+/* Convert the gutter specifier into something we can actually
+ display. */
+static Lisp_Object construct_window_gutter_spec (struct window* w,
+ enum gutter_pos pos)
+{
+ Lisp_Object rest, *args;
+ int nargs = 0;
+ Lisp_Object gutter = RAW_WINDOW_GUTTER (w, pos);
+
+ if (STRINGP (gutter) || NILP (gutter))
+ return gutter;
+
+ GET_LIST_LENGTH (gutter, nargs);
+ args = alloca_array (Lisp_Object, nargs >> 1);
+ nargs = 0;
+
+ for (rest = gutter; !NILP (rest); rest = XCDR (XCDR (rest)))
+ {
+ /* We only put things in the real gutter that are declared to be
+ visible. */
+ if (!CONSP (WINDOW_GUTTER_VISIBLE (w, pos))
+ ||
+ !NILP (Fmemq (XCAR (rest), WINDOW_GUTTER_VISIBLE (w, pos))))
+ {
+ args [nargs++] = XCAR (XCDR (rest));
+ }
+ }
+
+ return Fconcat (nargs, args);
+}
+
static void
-output_gutter (struct frame *f, enum gutter_pos pos)
+output_gutter (struct frame *f, enum gutter_pos pos, int force)
{
Lisp_Object frame;
Lisp_Object window = FRAME_LAST_NONMINIBUF_WINDOW (f);
int line, border_width;
face_index findex;
display_line_dynarr* ddla, *cdla;
- struct display_line *dl;
+ struct display_line *dl = 0;
int cdla_len;
if (!WINDOW_LIVE_P (w))
return;
border_width = FRAME_GUTTER_BORDER_WIDTH (f, pos);
- findex = get_builtin_face_cache_index (w, Vgui_element_face);
+ findex = get_builtin_face_cache_index (w, Vwidget_face);
- 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);
+ if (!f->current_display_lines[pos])
+ f->current_display_lines[pos] = Dynarr_new (display_line);
+ if (!f->desired_display_lines[pos])
+ f->desired_display_lines[pos] = Dynarr_new (display_line);
- ddla = f->desired_display_lines;
- cdla = f->current_display_lines;
+ ddla = f->desired_display_lines[pos];
+ cdla = f->current_display_lines[pos];
cdla_len = Dynarr_length (cdla);
XSETFRAME (frame, f);
x + border_width, y + border_width,
width - 2 * border_width,
height - 2 * border_width, ddla, 0, findex);
- /* Output each line. */
- for (line = 0; line < Dynarr_length (ddla); line++)
- {
- output_display_line (w, cdla, ddla, line, -1, -1);
- }
- /* If the number of display lines has shrunk, adjust. */
- if (cdla_len > Dynarr_length (ddla))
+ /* We only output the gutter if we think something of significance
+ has changed. This is, for example, because redisplay can cause
+ new face cache elements to get added causing compare_runes to
+ fail because the findex for a particular face has changed. */
+ if (force || f->faces_changed || f->frame_changed ||
+ f->gutter_changed || f->glyphs_changed ||
+ f->size_changed || f->subwindows_changed ||
+ w->windows_changed || f->windows_structure_changed ||
+ cdla_len != Dynarr_length (ddla) ||
+ (f->extents_changed && w->gutter_extent_modiff[pos]))
{
- Dynarr_length (cdla) = Dynarr_length (ddla);
- }
+#ifdef DEBUG_GUTTERS
+ printf ("gutter redisplay triggered by %s\n", force ? "force" :
+ f->faces_changed ? "f->faces_changed" :
+ f->frame_changed ? "f->frame_changed" :
+ f->gutter_changed ? "f->gutter_changed" :
+ f->glyphs_changed ? "f->glyphs_changed" :
+ f->size_changed ? "f->size_changed" :
+ f->subwindows_changed ? "f->subwindows_changed" :
+ w->windows_changed ? "w->windows_changed" :
+ f->windows_structure_changed ? "f->windows_structure_changed" :
+ cdla_len != Dynarr_length (ddla) ? "different display structures" :
+ f->extents_changed && w->gutter_extent_modiff[pos] ?
+ "f->extents_changed && w->gutter_extent_modiff[pos]" : "<null>");
+#endif
+ /* Output each line. */
+ for (line = 0; line < Dynarr_length (ddla); line++)
+ {
+ output_display_line (w, cdla, ddla, line, -1, -1);
+ }
+
+ /* If the number of display lines has shrunk, adjust. */
+ if (cdla_len > Dynarr_length (ddla))
+ {
+ Dynarr_length (cdla) = Dynarr_length (ddla);
+ }
+
+ /* grab coordinates of last line and blank after it. */
+ if (Dynarr_length (ddla) > 0)
+ {
+ dl = Dynarr_atp (ddla, Dynarr_length (ddla) - 1);
+ ypos = dl->ypos + dl->descent - dl->clip;
+ }
+ else
+ ypos = y;
+
+ redisplay_clear_region (window, findex, x + border_width , ypos,
+ width - 2 * border_width, height - (ypos - y) - border_width);
+ /* If, for some reason, we have more to display than we have
+ room for, and we are allowed to resize the gutter, then make
+ sure this happens before the next time we try and
+ output. This can happen when face font sizes change. */
+ if (dl && dl->clip > 0 && EQ (w->gutter_size[pos], Qautodetect))
+ {
+ /* #### Ideally we would just mark the specifier as dirty
+ and everything else would "just work". Unfortunately we have
+ two problems with this. One is that the specifier cache
+ won't be recalculated unless the specifier code thinks the
+ cached value has actually changed, even though we have
+ marked the specifier as dirty. Additionally, although doing
+ this results in a gutter size change, we never seem to get
+ back into redisplay so that the frame size can be updated. I
+ think this is because we are already in redisplay and later
+ on the frame will be marked as clean. Thus we also have to
+ force a pending recalculation of the frame size. */
+ w->gutter_size[pos] = Qnil;
+ Fset_specifier_dirty_flag (Vgutter_size[pos]);
+ update_gutter_geometry (f, pos);
+ }
- /* 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) - border_width);
- /* bevel the gutter area if so desired */
- if (border_width != 0)
+ /* bevel the gutter area if so desired */
+ if (border_width != 0)
+ {
+ MAYBE_DEVMETH (d, bevel_area,
+ (w, findex, x, y, width, height, border_width,
+ EDGE_ALL, EDGE_BEVEL_OUT));
+ }
+ }
+ else
{
- MAYBE_DEVMETH (d, bevel_area,
- (w, findex, x, y, width, height, border_width,
- EDGE_ALL, EDGE_BEVEL_OUT));
+ /* Nothing of significance happened so sync the display line
+ structs. */
+ for (line = 0; line < Dynarr_length (ddla); line++)
+ {
+ sync_display_line_structs (w, line, 1, cdla, ddla);
+ }
}
+
+ w->gutter_extent_modiff [pos] = 0;
}
-/* sizing gutters is a pain so we try and help the user by detemining
+/* Sizing gutters is a pain so we try and help the user by detemining
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)
{
struct frame* f = XFRAME (WINDOW_FRAME (w));
- int ypos;
+ int ypos, count;
display_line_dynarr* ddla;
struct display_line *dl;
is no reasonable metric to use */
assert (pos == TOP_GUTTER || pos == BOTTOM_GUTTER);
/* degenerate case */
- if (NILP (WINDOW_GUTTER (w, pos))
+ if (NILP (RAW_WINDOW_GUTTER (w, pos))
||
!FRAME_VISIBLE_P (f)
||
NILP (w->buffer))
return Qnil;
+ /* Redisplay code that we use relies on GC not happening. Make it
+ so. */
+ count = specpdl_depth ();
+ record_unwind_protect (restore_gc_inhibit,
+ make_int (gc_currently_forbidden));
+ gc_currently_forbidden = 1;
+
ddla = Dynarr_new (display_line);
/* generate some display lines */
generate_displayable_area (w, WINDOW_GUTTER (w, pos),
- FRAME_LEFT_BORDER_END (f),
200,
ddla, 0, 0);
+
+ /* Let GC happen again. */
+ unbind_to (count, Qnil);
+
/* grab coordinates of last line */
if (Dynarr_length (ddla))
{
int x, y, width, height;
Lisp_Object window = FRAME_LAST_NONMINIBUF_WINDOW (f);
face_index findex = get_builtin_face_cache_index (XWINDOW (window),
- Vgui_element_face);
+ Vwidget_face);
get_gutter_coords (f, pos, &x, &y, &width, &height);
SET_GUTTER_WAS_VISIBLE_FLAG (f, pos, 0);
redisplay_clear_region (window, findex, x, y, width, height);
}
+/* #### I don't currently believe that redisplay needs to mark the
+ glyphs in its structures since these will always be referenced from
+ somewhere else. However, I'm not sure enough to stake my life on it
+ at this point, so we do the safe thing. */
+
+/* See the comment in image_instantiate_cache_result as to why marking
+ the glyph will also mark the image_instance. */
+void
+mark_gutters (struct frame* f)
+{
+ enum gutter_pos pos;
+ GUTTER_POS_LOOP (pos)
+ {
+ if (f->current_display_lines[pos])
+ mark_redisplay_structs (f->current_display_lines[pos]);
+ /* #### Do we really need to mark the desired lines? */
+ if (f->desired_display_lines[pos])
+ mark_redisplay_structs (f->desired_display_lines[pos]);
+ }
+}
+
+/* This is called by extent_changed_for_redisplay, so that redisplay
+ knows exactly what extents have changed. */
+void
+gutter_extent_signal_changed_region_maybe (Lisp_Object obj,
+ Bufpos start, Bufpos end)
+{
+ /* #### Start and end are currently ignored but could be used by a
+ more optimal gutter redisplay. We currently loop over all frames
+ here, this could be optimized. */
+ Lisp_Object frmcons, devcons, concons;
+
+ FRAME_LOOP_NO_BREAK (frmcons, devcons, concons)
+ {
+ struct frame *f = XFRAME (XCAR (frmcons));
+ enum gutter_pos pos;
+ Lisp_Object window = FRAME_LAST_NONMINIBUF_WINDOW (f);
+ struct window* w = XWINDOW (window);
+
+ GUTTER_POS_LOOP (pos)
+ {
+ if (EQ (WINDOW_GUTTER (w, pos), obj))
+ {
+ w->gutter_extent_modiff[pos]++;
+ }
+ }
+ }
+}
+
+/* We have to change the gutter geometry separately to the gutter
+ update since it needs to occur outside of redisplay proper. */
+static void
+update_gutter_geometry (struct frame *f, enum gutter_pos pos)
+{
+ /* If the gutter geometry has changed then re-layout the
+ frame. If we are in display there is almost no point in doing
+ anything else since the frame size changes will be delayed
+ until we are out of redisplay proper. */
+ if (FRAME_GUTTER_BOUNDS (f, pos) != f->current_gutter_bounds[pos])
+ {
+ int width, height;
+ pixel_to_char_size (f, FRAME_PIXWIDTH (f), FRAME_PIXHEIGHT (f),
+ &width, &height);
+ change_frame_size (f, height, width, 0);
+ }
+
+ /* Mark sizes as up-to-date. */
+ f->current_gutter_bounds[pos] = FRAME_GUTTER_BOUNDS (f, pos);
+}
+
+void
+update_frame_gutter_geometry (struct frame *f)
+{
+ if (f->gutter_changed || f->windows_structure_changed)
+ {
+ enum gutter_pos pos;
+
+ /* If the gutter geometry has changed then re-layout the
+ frame. If we are in display there is almost no point in doing
+ anything else since the frame size changes will be delayed
+ until we are out of redisplay proper. */
+ GUTTER_POS_LOOP (pos)
+ {
+ update_gutter_geometry (f, pos);
+ }
+ }
+}
+
void
update_frame_gutters (struct frame *f)
{
- 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)
+ if (f->faces_changed || f->frame_changed ||
+ f->gutter_changed || f->glyphs_changed ||
+ f->size_changed || f->subwindows_changed ||
+ f->windows_changed || f->windows_structure_changed ||
+ f->extents_changed)
{
enum gutter_pos pos;
GUTTER_POS_LOOP (pos)
{
if (FRAME_GUTTER_VISIBLE (f, pos))
- output_gutter (f, pos);
+ output_gutter (f, pos, 0);
+
else if (gutter_was_visible (f, pos))
- clear_gutter (f, pos);
+ clear_gutter (f, pos);
}
+
f->clip_changed = local_clip_changed;
f->buffers_changed = local_buffers_changed;
f->gutter_changed = 0;
void
reset_gutter_display_lines (struct frame* f)
{
- if (f->current_display_lines)
- Dynarr_reset (f->current_display_lines);
+ enum gutter_pos pos;
+ GUTTER_POS_LOOP (pos)
+ {
+ if (f->current_display_lines[pos])
+ Dynarr_reset (f->current_display_lines[pos]);
+ }
}
static void
if (((x + width) < g_x) || (x > (g_x + g_width)))
return;
+#ifdef DEBUG_WIDGETS
+ printf ("redrawing gutter after expose %d+%d, %dx%d\n",
+ x, y, width, height);
+#endif
/* #### 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. */
/* 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
that some portion of the gutter is in the exposed region. */
- output_gutter (f, pos);
+ output_gutter (f, pos, 1);
}
void
int height)
{
enum gutter_pos pos;
+
+ /* We have to be "in display" when we output the gutter - make it
+ so. */
+ hold_frame_size_changes ();
GUTTER_POS_LOOP (pos)
{
if (FRAME_GUTTER_VISIBLE (f, pos))
redraw_exposed_gutter (f, pos, x, y, width, height);
}
+ unhold_one_frame_size_changes (f);
}
void
free_frame_gutters (struct frame *f)
{
- if (f->current_display_lines)
- {
- free_display_lines (f->current_display_lines);
- f->current_display_lines = 0;
- }
- if (f->desired_display_lines)
+ enum gutter_pos pos;
+ GUTTER_POS_LOOP (pos)
{
- free_display_lines (f->desired_display_lines);
- f->desired_display_lines = 0;
+ if (f->current_display_lines[pos])
+ {
+ free_display_lines (f->current_display_lines[pos]);
+ f->current_display_lines[pos] = 0;
+ }
+ if (f->desired_display_lines[pos])
+ {
+ free_display_lines (f->desired_display_lines[pos]);
+ f->desired_display_lines[pos] = 0;
+ }
}
}
list1 (Fcons (Qnil, Qzero)));
set_specifier_fallback (Vgutter_border_width[new],
Vdefault_gutter_border_width);
+ /* We don't realy want the left and right gutters to default to
+ visible. */
set_specifier_fallback (Vgutter_visible_p[cur],
- list1 (Fcons (Qnil, Qt)));
+ cur == TOP_GUTTER || cur == BOTTOM_GUTTER ?
+ list1 (Fcons (Qnil, Qt))
+ : list1 (Fcons (Qnil, Qnil)));
set_specifier_fallback (Vgutter_visible_p[new],
Vdefault_gutter_visible_p);
+
Vdefault_gutter_position = position;
unhold_frame_size_changes ();
}
+ run_hook (Qdefault_gutter_position_changed_hook);
+
return position;
}
{
if (NILP (instantiator))
return;
+
+ /* Must be a string or a plist. */
+ if (!STRINGP (instantiator) && NILP (Fvalid_plist_p (instantiator)))
+ signal_simple_error ("Gutter spec must be string, plist or nil", instantiator);
if (!STRINGP (instantiator))
- signal_simple_error ("Gutter spec must be string or nil", instantiator);
+ {
+ Lisp_Object rest;
+
+ for (rest = instantiator; !NILP (rest); rest = XCDR (XCDR (rest)))
+ {
+ if (!SYMBOLP (XCAR (rest))
+ || !STRINGP (XCAR (XCDR (rest))))
+ signal_simple_error ("Gutter plist spec must contain strings", instantiator);
+ }
+ }
}
DEFUN ("gutter-specifier-p", Fgutter_specifier_p, 1, 1, 0, /*
`left-gutter', `right-gutter', and `bottom-gutter' are always
gutter specifiers.
-Valid gutter instantiators are called "gutter descriptors"
-and are lists of vectors. See `default-gutter' for a description
-of the exact format.
+Valid gutter instantiators are called "gutter descriptors" and are
+either strings or property-lists of strings. See `default-gutter' for
+a description of the exact format.
*/
(object))
{
static void
gutter_specs_changed (Lisp_Object specifier, struct window *w,
- Lisp_Object oldval)
+ Lisp_Object oldval, enum gutter_pos pos)
{
- enum gutter_pos pos;
- GUTTER_POS_LOOP (pos)
+ w->real_gutter[pos] = construct_window_gutter_spec (w, pos);
+ w->real_gutter_size[pos] = w->gutter_size[pos];
+
+ if (EQ (w->real_gutter_size[pos], Qautodetect)
+ && !NILP (w->gutter_visible_p[pos]))
{
- w->real_gutter_size[pos] = w->gutter_size[pos];
- if (EQ (w->real_gutter_size[pos], Qautodetect)
- && !NILP (w->gutter_visible_p[pos]))
- {
- w->real_gutter_size [pos] = calculate_gutter_size (w, pos);
- }
+ w->real_gutter_size [pos] = calculate_gutter_size (w, pos);
}
MARK_GUTTER_CHANGED;
+ MARK_MODELINE_CHANGED;
MARK_WINDOWS_CHANGED (w);
}
+/* We define all of these so we can access which actual gutter changed. */
+static void
+top_gutter_specs_changed (Lisp_Object specifier, struct window *w,
+ Lisp_Object oldval)
+{
+ gutter_specs_changed (specifier, w, oldval, TOP_GUTTER);
+}
+
+static void
+bottom_gutter_specs_changed (Lisp_Object specifier, struct window *w,
+ Lisp_Object oldval)
+{
+ gutter_specs_changed (specifier, w, oldval, BOTTOM_GUTTER);
+}
+
+static void
+left_gutter_specs_changed (Lisp_Object specifier, struct window *w,
+ Lisp_Object oldval)
+{
+ gutter_specs_changed (specifier, w, oldval, LEFT_GUTTER);
+}
+
+static void
+right_gutter_specs_changed (Lisp_Object specifier, struct window *w,
+ Lisp_Object oldval)
+{
+ gutter_specs_changed (specifier, w, oldval, RIGHT_GUTTER);
+}
+
static void
default_gutter_specs_changed (Lisp_Object specifier, struct window *w,
Lisp_Object oldval)
}
MARK_GUTTER_CHANGED;
+ MARK_MODELINE_CHANGED;
MARK_WINDOWS_CHANGED (w);
}
Lisp_Object oldval)
{
recompute_overlaying_specifier (Vgutter_visible_p);
+ /* Need to reconstruct the gutter specifier as it is affected by the
+ visibility. */
+ recompute_overlaying_specifier (Vgutter);
}
DEFUN ("gutter-size-specifier-p", Fgutter_size_specifier_p, 1, 1, 0, /*
Return non-nil if OBJECT is a gutter-size specifier.
+
+Gutter-size specifiers are used to specify the size of a gutter. The
+values of the variables `default-gutter-size', `top-gutter-size',
+`left-gutter-size', `right-gutter-size', and `bottom-gutter-size' are
+always gutter-size specifiers.
+
+Valid gutter-size instantiators are either integers or the special
+symbol 'autodetect. If a gutter-size is set to 'autodetect them the
+size of the gutter will be adjusted to just accomodate the gutters
+contents. 'autodetect only works for top and bottom gutters.
*/
(object))
{
return GUTTER_SIZE_SPECIFIERP (object) ? Qt : Qnil;
}
+DECLARE_SPECIFIER_TYPE (gutter_visible);
+#define GUTTER_VISIBLE_SPECIFIERP(x) SPECIFIER_TYPEP (x, gutter_visible)
+DEFINE_SPECIFIER_TYPE (gutter_visible);
+
+static void
+gutter_visible_validate (Lisp_Object instantiator)
+{
+ if (NILP (instantiator))
+ return;
+
+ if (!NILP (instantiator) && !EQ (instantiator, Qt) && !CONSP (instantiator))
+ signal_simple_error ("Gutter visibility must be a boolean or list of symbols",
+ instantiator);
+
+ if (CONSP (instantiator))
+ {
+ Lisp_Object rest;
+
+ EXTERNAL_LIST_LOOP (rest, instantiator)
+ {
+ if (!SYMBOLP (XCAR (rest)))
+ signal_simple_error ("Gutter visibility must be a boolean or list of symbols",
+ instantiator);
+ }
+ }
+}
+
+DEFUN ("gutter-visible-specifier-p", Fgutter_visible_specifier_p, 1, 1, 0, /*
+Return non-nil if OBJECT is a gutter-visible specifier.
+
+Gutter-visible specifiers are used to specify the visibility of a
+gutter. The values of the variables `default-gutter-visible-p',
+`top-gutter-visible-p', `left-gutter-visible-p',
+`right-gutter-visible-p', and `bottom-gutter-visible-p' are always
+gutter-visible specifiers.
+
+Valid gutter-visible instantiators are t, nil or a list of symbols.
+If a gutter-visible instantiator is set to a list of symbols, and the
+correspondong gutter specification is a property-list strings, then
+elements of the gutter specification will only be visible if the
+corresponding symbol occurs in the gutter-visible instantiator.
+*/
+ (object))
+{
+ return GUTTER_VISIBLE_SPECIFIERP (object) ? Qt : Qnil;
+}
+
DEFUN ("redisplay-gutter-area", Fredisplay_gutter_area, 0, 0, 0, /*
Ensure that all gutters are correctly showing their gutter specifier.
*/
DEVICE_FRAME_LOOP (frmcons, d)
{
struct frame *f = XFRAME (XCAR (frmcons));
-
- if (FRAME_REPAINT_P (f))
+
+ /* Sequence is quite important here. We not only want to
+ redisplay the gutter area but we also want to flush any
+ frame size changes out so that the gutter redisplay happens
+ in a kosha environment.
+
+ This is not only so that things look right but so that
+ glyph redisplay optimization kicks in, by default display
+ lines will be completely re-output if
+ f->windows_structure_changed is 1, and this is true if
+ frame size changes haven't been flushed out. Once frame
+ size changes have been flushed out we then need to
+ redisplay the frame in order to flush out pending window
+ size changes. */
+ update_frame_gutter_geometry (f);
+
+ if (f->windows_structure_changed)
+ redisplay_frame (f, 1);
+ else if (FRAME_REPAINT_P (f))
{
+ /* We have to be "in display" when we output the gutter
+ - make it so. */
+ hold_frame_size_changes ();
update_frame_gutters (f);
+ unhold_one_frame_size_changes (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));
+
+ d->gutter_changed = 0;
}
+ /* This is so that further changes to the gutters will trigger redisplay. */
+ gutter_changed_set = 0;
+ gutter_changed = 0;
+
return Qnil;
}
initialization. We need to recalculate autodetected gutters. */
GUTTER_POS_LOOP (pos)
{
+ w->real_gutter[pos] = construct_window_gutter_spec (w, pos);
w->real_gutter_size[pos] = w->gutter_size[pos];
if (EQ (w->gutter_size[pos], Qautodetect)
&& !NILP (w->gutter_visible_p[pos]))
MARK_WINDOWS_CHANGED (w);
}
}
+
+ /* Keep a record of the current sizes of things. */
+ GUTTER_POS_LOOP (pos)
+ {
+ f->current_gutter_bounds[pos] = FRAME_GUTTER_BOUNDS (f, pos);
+ }
}
void
{
DEFSUBR (Fgutter_specifier_p);
DEFSUBR (Fgutter_size_specifier_p);
+ DEFSUBR (Fgutter_visible_specifier_p);
DEFSUBR (Fset_default_gutter_position);
DEFSUBR (Fdefault_gutter_position);
DEFSUBR (Fgutter_pixel_height);
DEFSUBR (Fredisplay_gutter_area);
defsymbol (&Qgutter_size, "gutter-size");
+ defsymbol (&Qgutter_visible, "gutter-visible");
+ defsymbol (&Qdefault_gutter_position_changed_hook,
+ "default-gutter-position-changed-hook");
}
void
specifier_type_create_gutter (void)
{
INITIALIZE_SPECIFIER_TYPE (gutter, "gutter", "gutter-specifier-p");
-
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);
+
+ INITIALIZE_SPECIFIER_TYPE (gutter_visible, "gutter-visible", "gutter-visible-specifier-p");
+ SPECIFIER_HAS_METHOD (gutter_visible, validate);
}
void
{
REINITIALIZE_SPECIFIER_TYPE (gutter);
REINITIALIZE_SPECIFIER_TYPE (gutter_size);
+ REINITIALIZE_SPECIFIER_TYPE (gutter_visible);
}
void
using position-specific specifiers. That way, you will get sane
behavior if the user changes the default gutter position.
-The gutter value should be a string or nil. You can attach extents and
-glyphs to the string and hence display glyphs and text in other fonts
-in the gutter area.
-
-*/ );
+The gutter value should be a string, a property list of strings or
+nil. You can attach extents and glyphs to the string and hence display
+glyphs and text in other fonts in the gutter area. If the gutter value
+is a property list then the strings will be concatenated together
+before being displayed. */ );
Vdefault_gutter = Fmake_specifier (Qgutter);
/* #### It would be even nicer if the specifier caching
Vgutter[TOP_GUTTER] = Fmake_specifier (Qgutter);
set_specifier_caching (Vgutter[TOP_GUTTER],
offsetof (struct window, gutter[TOP_GUTTER]),
- gutter_specs_changed,
+ top_gutter_specs_changed,
0, 0);
DEFVAR_SPECIFIER ("bottom-gutter",
Vgutter[BOTTOM_GUTTER] = Fmake_specifier (Qgutter);
set_specifier_caching (Vgutter[BOTTOM_GUTTER],
offsetof (struct window, gutter[BOTTOM_GUTTER]),
- gutter_specs_changed,
+ bottom_gutter_specs_changed,
0, 0);
DEFVAR_SPECIFIER ("left-gutter",
Vgutter[LEFT_GUTTER] = Fmake_specifier (Qgutter);
set_specifier_caching (Vgutter[LEFT_GUTTER],
offsetof (struct window, gutter[LEFT_GUTTER]),
- gutter_specs_changed,
+ left_gutter_specs_changed,
0, 0);
DEFVAR_SPECIFIER ("right-gutter",
Vgutter[RIGHT_GUTTER] = Fmake_specifier (Qgutter);
set_specifier_caching (Vgutter[RIGHT_GUTTER],
offsetof (struct window, gutter[RIGHT_GUTTER]),
- gutter_specs_changed,
+ right_gutter_specs_changed,
0, 0);
/* initially, top inherits from default; this can be
Vgutter_size[TOP_GUTTER] = Fmake_specifier (Qgutter_size);
set_specifier_caching (Vgutter_size[TOP_GUTTER],
offsetof (struct window, gutter_size[TOP_GUTTER]),
- gutter_geometry_changed_in_window,
- 0, 0);
+ gutter_geometry_changed_in_window, 0, 0);
DEFVAR_SPECIFIER ("bottom-gutter-height",
&Vgutter_size[BOTTOM_GUTTER] /*
Vgutter_size[BOTTOM_GUTTER] = Fmake_specifier (Qgutter_size);
set_specifier_caching (Vgutter_size[BOTTOM_GUTTER],
offsetof (struct window, gutter_size[BOTTOM_GUTTER]),
- gutter_geometry_changed_in_window,
- 0, 0);
+ gutter_geometry_changed_in_window, 0, 0);
DEFVAR_SPECIFIER ("left-gutter-width",
&Vgutter_size[LEFT_GUTTER] /*
Vgutter_size[LEFT_GUTTER] = Fmake_specifier (Qnatnum);
set_specifier_caching (Vgutter_size[LEFT_GUTTER],
offsetof (struct window, gutter_size[LEFT_GUTTER]),
- gutter_geometry_changed_in_window,
- 0, 0);
+ gutter_geometry_changed_in_window, 0, 0);
DEFVAR_SPECIFIER ("right-gutter-width",
&Vgutter_size[RIGHT_GUTTER] /*
Vgutter_size[RIGHT_GUTTER] = Fmake_specifier (Qnatnum);
set_specifier_caching (Vgutter_size[RIGHT_GUTTER],
offsetof (struct window, gutter_size[RIGHT_GUTTER]),
- gutter_geometry_changed_in_window,
- 0, 0);
+ gutter_geometry_changed_in_window, 0, 0);
fb = Qnil;
#ifdef HAVE_TTY
set_specifier_caching (Vgutter_border_width[TOP_GUTTER],
offsetof (struct window,
gutter_border_width[TOP_GUTTER]),
- gutter_geometry_changed_in_window,
- 0, 0);
+ gutter_geometry_changed_in_window, 0, 0);
DEFVAR_SPECIFIER ("bottom-gutter-border-width",
&Vgutter_border_width[BOTTOM_GUTTER] /*
set_specifier_caching (Vgutter_border_width[BOTTOM_GUTTER],
offsetof (struct window,
gutter_border_width[BOTTOM_GUTTER]),
- gutter_geometry_changed_in_window,
- 0, 0);
+ gutter_geometry_changed_in_window, 0, 0);
DEFVAR_SPECIFIER ("left-gutter-border-width",
&Vgutter_border_width[LEFT_GUTTER] /*
set_specifier_caching (Vgutter_border_width[LEFT_GUTTER],
offsetof (struct window,
gutter_border_width[LEFT_GUTTER]),
- gutter_geometry_changed_in_window,
- 0, 0);
+ gutter_geometry_changed_in_window, 0, 0);
DEFVAR_SPECIFIER ("right-gutter-border-width",
&Vgutter_border_width[RIGHT_GUTTER] /*
set_specifier_caching (Vgutter_border_width[RIGHT_GUTTER],
offsetof (struct window,
gutter_border_width[RIGHT_GUTTER]),
- gutter_geometry_changed_in_window,
- 0, 0);
+ gutter_geometry_changed_in_window, 0, 0);
fb = Qnil;
#ifdef HAVE_TTY
`default-gutter-visible-p' and all of the position-specific gutter
visibility specifiers have a fallback value of true.
*/ );
- Vdefault_gutter_visible_p = Fmake_specifier (Qboolean);
+ Vdefault_gutter_visible_p = Fmake_specifier (Qgutter_visible);
set_specifier_caching (Vdefault_gutter_visible_p,
offsetof (struct window,
default_gutter_visible_p),
See `default-gutter-visible-p' for more information.
*/ );
- Vgutter_visible_p[TOP_GUTTER] = Fmake_specifier (Qboolean);
+ Vgutter_visible_p[TOP_GUTTER] = Fmake_specifier (Qgutter_visible);
set_specifier_caching (Vgutter_visible_p[TOP_GUTTER],
offsetof (struct window,
gutter_visible_p[TOP_GUTTER]),
- gutter_geometry_changed_in_window,
- 0, 0);
+ top_gutter_specs_changed, 0, 0);
DEFVAR_SPECIFIER ("bottom-gutter-visible-p",
&Vgutter_visible_p[BOTTOM_GUTTER] /*
See `default-gutter-visible-p' for more information.
*/ );
- Vgutter_visible_p[BOTTOM_GUTTER] = Fmake_specifier (Qboolean);
+ Vgutter_visible_p[BOTTOM_GUTTER] = Fmake_specifier (Qgutter_visible);
set_specifier_caching (Vgutter_visible_p[BOTTOM_GUTTER],
offsetof (struct window,
gutter_visible_p[BOTTOM_GUTTER]),
- gutter_geometry_changed_in_window,
- 0, 0);
+ bottom_gutter_specs_changed, 0, 0);
DEFVAR_SPECIFIER ("left-gutter-visible-p",
&Vgutter_visible_p[LEFT_GUTTER] /*
See `default-gutter-visible-p' for more information.
*/ );
- Vgutter_visible_p[LEFT_GUTTER] = Fmake_specifier (Qboolean);
+ Vgutter_visible_p[LEFT_GUTTER] = Fmake_specifier (Qgutter_visible);
set_specifier_caching (Vgutter_visible_p[LEFT_GUTTER],
offsetof (struct window,
gutter_visible_p[LEFT_GUTTER]),
- gutter_geometry_changed_in_window,
- 0, 0);
+ left_gutter_specs_changed, 0, 0);
DEFVAR_SPECIFIER ("right-gutter-visible-p",
&Vgutter_visible_p[RIGHT_GUTTER] /*
See `default-gutter-visible-p' for more information.
*/ );
- Vgutter_visible_p[RIGHT_GUTTER] = Fmake_specifier (Qboolean);
+ Vgutter_visible_p[RIGHT_GUTTER] = Fmake_specifier (Qgutter_visible);
set_specifier_caching (Vgutter_visible_p[RIGHT_GUTTER],
offsetof (struct window,
gutter_visible_p[RIGHT_GUTTER]),
- gutter_geometry_changed_in_window,
- 0, 0);
+ right_gutter_specs_changed, 0, 0);
/* initially, top inherits from default; this can be
changed with `set-default-gutter-position'. */
extern Lisp_Object Vgutter_size[4];
extern Lisp_Object Vgutter_border_width[4];
void update_frame_gutters (struct frame *f);
+void update_frame_gutter_geometry (struct frame *f);
+void mark_gutters (struct frame* f);
void init_frame_gutters (struct frame *f);
void init_device_gutters (struct device *d);
void init_global_gutters (struct device *d);
void redraw_exposed_gutters (struct frame *f, int x, int y, int width,
int height);
void reset_gutter_display_lines (struct frame* f);
+void gutter_extent_signal_changed_region_maybe (Lisp_Object obj,
+ Bufpos start, Bufpos end);
#define WINDOW_GUTTER_BORDER_WIDTH(w, pos) \
-(NILP ((w)->gutter_border_width[pos]) ? 0 : XINT ((w)->gutter_border_width[pos]))
+ (INTP ((w)->gutter_border_width[pos]) ? XINT ((w)->gutter_border_width[pos]) : 0)
#define WINDOW_GUTTER_SIZE(w, pos) \
-(NILP ((w)->gutter_size[pos]) ? 0 : XINT ((w)->gutter_size[pos]))
+ (INTP ((w)->gutter_size[pos]) ? XINT ((w)->gutter_size[pos]) : 0)
#define WINDOW_GUTTER_SIZE_INTERNAL(w, pos) \
-(NILP ((w)->real_gutter_size[pos]) ? 0 : XINT ((w)->real_gutter_size[pos]))
+ (INTP ((w)->real_gutter_size[pos]) ? XINT ((w)->real_gutter_size[pos]) : 0)
#define WINDOW_GUTTER_VISIBLE(w, pos) \
-((w)->gutter_visible_p[pos])
+ ((w)->gutter_visible_p[pos])
#define WINDOW_GUTTER(w, pos) \
-((w)->gutter[pos])
+ ((w)->real_gutter[pos])
+#define RAW_WINDOW_GUTTER(w, pos) \
+ ((w)->gutter[pos])
#define WINDOW_REAL_GUTTER_SIZE(w, pos) \
(!NILP (WINDOW_GUTTER_VISIBLE (w, pos)) \
/* these macros predicate size on position and type of window */
#define WINDOW_REAL_TOP_GUTTER_BOUNDS(w) \
- ((!MINI_WINDOW_P (w) && window_is_highest (w)) ? \
- WINDOW_REAL_GUTTER_BOUNDS (w,TOP_GUTTER) : 0)
+ WINDOW_REAL_GUTTER_BOUNDS (w,TOP_GUTTER)
#define WINDOW_REAL_BOTTOM_GUTTER_BOUNDS(w) \
- ((!MINI_WINDOW_P (w) && window_is_lowest (w)) ? \
- WINDOW_REAL_GUTTER_BOUNDS (w,BOTTOM_GUTTER) : 0)
+ WINDOW_REAL_GUTTER_BOUNDS (w,BOTTOM_GUTTER)
#define WINDOW_REAL_LEFT_GUTTER_BOUNDS(w) \
- ((!MINI_WINDOW_P (w) && window_is_leftmost (w)) ? \
- WINDOW_REAL_GUTTER_BOUNDS (w,LEFT_GUTTER) : 0)
+ WINDOW_REAL_GUTTER_BOUNDS (w,LEFT_GUTTER)
#define WINDOW_REAL_RIGHT_GUTTER_BOUNDS(w) \
- ((!MINI_WINDOW_P (w) && window_is_rightmost (w)) ? \
- WINDOW_REAL_GUTTER_BOUNDS (w,RIGHT_GUTTER) : 0)
+ WINDOW_REAL_GUTTER_BOUNDS (w,RIGHT_GUTTER)
#define FRAME_GUTTER_VISIBLE(f, pos) \
WINDOW_REAL_GUTTER_VISIBLE (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f)), pos)
static void rehash (hentry *harray, struct hash_table *ht, hash_size_t size);
unsigned long
-memory_hash (CONST void *xv, size_t size)
+memory_hash (const void *xv, size_t size)
{
unsigned int h = 0;
- unsigned CONST char *x = (unsigned CONST char *) xv;
+ unsigned const char *x = (unsigned const char *) xv;
if (!x) return 0;
/* Return some prime near, but greater than or equal to, SIZE.
Decades from the time of writing, someone will have a system large
enough that the list below will be too short... */
- static CONST size_t primes [] =
+ static const size_t primes [] =
{
19, 29, 41, 59, 79, 107, 149, 197, 263, 347, 457, 599, 787, 1031,
1361, 1777, 2333, 3037, 3967, 5167, 6719, 8737, 11369, 14783,
return primes [high];
}
-CONST void *
-gethash (CONST void *key, struct hash_table *hash_table, CONST void **ret_value)
+const void *
+gethash (const void *key, struct hash_table *hash_table, const void **ret_value)
{
if (!key)
{
(unsigned long) key;
unsigned int hcode = hcode_initial % size;
hentry *e = &harray [hcode];
- CONST void *e_key = e->key;
+ const void *e_key = e->key;
if (e_key ?
KEYS_DIFFER_P (e_key, key, test_function) :
}
void
-puthash (CONST void *key, void *contents, struct hash_table *hash_table)
+puthash (const void *key, void *contents, struct hash_table *hash_table)
{
if (!key)
{
unsigned int hcode = hcode_initial % size;
size_t h2 = size - 2;
unsigned int incr = 1 + (hcode_initial % h2);
- CONST void *e_key = harray [hcode].key;
- CONST void *oldcontents;
+ const void *e_key = harray [hcode].key;
+ const void *oldcontents;
if (e_key && KEYS_DIFFER_P (e_key, key, test_function))
{
}
void
-remhash (CONST void *key, struct hash_table *hash_table)
+remhash (const void *key, struct hash_table *hash_table)
{
if (!key)
{
((unsigned long) key);
unsigned int hcode = hcode_initial % size;
hentry *e = &harray [hcode];
- CONST void *e_key = e->key;
+ const void *e_key = e->key;
if (e_key ?
KEYS_DIFFER_P (e_key, key, test_function) :
typedef struct
{
- CONST void *key;
+ const void *key;
void *contents;
} hentry;
-typedef int (*hash_table_test_function) (CONST void *, CONST void *);
-typedef unsigned long (*hash_table_hash_function) (CONST void *);
+typedef int (*hash_table_test_function) (const void *, const void *);
+typedef unsigned long (*hash_table_hash_function) (const void *);
typedef size_t hash_size_t;
struct hash_table
void free_hash_table (struct hash_table *hash_table);
/* Returns a hentry whose key is 0 if the entry does not exist in HASH-TABLE */
-CONST void *gethash (CONST void *key, struct hash_table *hash_table,
- CONST void **ret_value);
+const void *gethash (const void *key, struct hash_table *hash_table,
+ const void **ret_value);
/* KEY should be different from 0 */
-void puthash (CONST void *key, void *contents, struct hash_table *hash_table);
+void puthash (const void *key, void *contents, struct hash_table *hash_table);
/* delete the entry with key KEY */
-void remhash (CONST void *key, struct hash_table *hash_table);
+void remhash (const void *key, struct hash_table *hash_table);
-typedef int (*maphash_function) (CONST void* key, void* contents, void* arg);
+typedef int (*maphash_function) (const void* key, void* contents, void* arg);
-typedef int (*remhash_predicate) (CONST void* key, CONST void* contents,
+typedef int (*remhash_predicate) (const void* key, const void* contents,
void* arg);
/* Call MF (key, contents, arg) for every entry in HASH-TABLE */
#include <config.h>
#include "lisp.h"
+#include "nativesound.h"
+
#include <stdlib.h>
#include <stdio.h>
#ifdef HPUX10
#include <audio/CUlib.h>
#endif /* !HPUX 10 */
+
Lisp_Object Vhp_play_server;
Lisp_Object Vhp_play_speaker;
int hp_play_gain;
play_bucket_internal(audio, pSBucket, volume);
- ASetErrorHandler(prevHandler);
+ ASetErrorHandler(prevHandler);
}
-void
+int
play_sound_data (data, length, volume)
unsigned char * data;
int length;
SunHeader *header;
long status;
char *server;
+ int result;
+
+ /* #### Finish this to return an error code.
+ This function signal a lisp error. How consistent with the rest.
+ What if this function is needed in doing the beep for the error?
+ Apparently the author of this didn't read the comment in
+ Fplay_sound.
+ */
+
+
if (STRINGP (Vhp_play_server))
server = (char *) XSTRING_DATA (Vhp_play_server);
server = "";
ASetErrorHandler(prevHandler);
if (status)
player_error_internal( audio, "Audio data copy failed", status );
+
+ return 1;
}
void
/* The purpose of this file is so that there is at least one actual
definition of each inline function. This is needed under GCC. The
- reason is that under GCC we declare our inline functions `extern
- inline', which causes the inlined version to get used only for
+ reason is that under GCC we declare our inline functions `inline
+ extern', which causes the inlined version to get used only for
inlining, and in other cases to generate an external reference to
the function. This is more efficient than declaring our inline
- functions `static inline', which (in many cases) would cause a separate
+ functions `inline static', which (in many cases) would cause a separate
version of the function to get inserted into every source file that
- included the corresponding header file.
+ included the corresponding header file. See internals.texi.
Some compilers that recognize `inline' may not do the same
- `extern inline' business, so on those we just do `static inline'.
+ `inline extern' business, so on those we just do `inline static'.
*/
/* Note to maintainers: This file contains a list of all header files
that use the INLINE macro, either directly, or by using DECLARE_LRECORD.
- i.e. the output of ``grep -l -w 'DECLARE_LRECORD|INLINE' *.h'' */
+ i.e. the output of ``grep -l -w 'DECLARE_LRECORD|INLINE_HEADER' *.h'' */
-#define DONT_EXTERN_INLINE_FUNCTIONS
+#define DONT_EXTERN_INLINE_HEADER_FUNCTIONS
#include <config.h>
#include "lisp.h"
#include "faces.h"
#include "frame.h"
#include "glyphs.h"
+#include "gui.h"
#include "keymap.h"
#include "lstream.h"
#include "objects.h"
#include "eldap.h"
#endif
+#ifdef HAVE_POSTGRESQL
+#include POSTGRES_INCLUDE (libpq-fe.h)
+#include "postgresql.h"
+#endif
+
#ifdef HAVE_TOOLBARS
#include "toolbar.h"
#endif
if (!xim)
{
- xim_info ("X Input Method open failed. Waiting for an XIM to be enabled.\n");
return;
}
#define STYLE_INFO(style) { style, #style, sizeof(#style) }
static struct XIMStyleInfo
{
- CONST XIMStyle style;
- CONST char * CONST name;
- CONST int namelen;
+ const XIMStyle style;
+ const char * const name;
+ const int namelen;
} emacs_XIMStyleInfo[] = {
STYLE_INFO (XIMPreeditPosition|XIMStatusArea),
STYLE_INFO (XIMPreeditPosition|XIMStatusNothing),
char *s = (char *) fromVal->addr;
char *end = s + fromVal->size;
- XIMStyles * CONST p = (XIMStyles *) toVal->addr;
- CONST char * CONST delimiter = " \t\n\r:;," ;
- CONST int max_styles = XtNumber(emacs_XIMStyleInfo);
+ XIMStyles * const p = (XIMStyles *) toVal->addr;
+ const char * const delimiter = " \t\n\r:;," ;
+ const int max_styles = XtNumber(emacs_XIMStyleInfo);
int i;
char *c;
the equivalent length in characters. */
Charcount
-bytecount_to_charcount (CONST Bufbyte *ptr, Bytecount len)
+bytecount_to_charcount (const Bufbyte *ptr, Bytecount len)
{
Charcount count = 0;
- CONST Bufbyte *end = ptr + len;
-
-#if (LONGBITS == 32 || LONGBITS == 64)
-
-# if (LONGBITS == 32)
-# define LONG_BYTES 4
-# define ALIGN_MASK 0xFFFFFFFCU
-# define HIGH_BIT_MASK 0x80808080U
-# else
-# define LONG_BYTES 8
-# define ALIGN_MASK 0xFFFFFFFFFFFFFFF8UL
- /* I had a dream, I was being overrun with early Intel processors ... */
-# define HIGH_BIT_MASK 0x8080808080808080UL
-# endif
-
- /* When we have a large number of bytes to scan, we can be trickier
- and significantly faster by scanning them in chunks of the CPU word
- size (assuming that they're all ASCII -- we cut out as soon as
- we find something non-ASCII). */
- if (len >= 12)
- {
- /* Determine the section in the middle of the string that's
- amenable to this treatment. Everything has to be aligned
- on CPU word boundaries. */
- CONST Bufbyte *aligned_ptr =
- (CONST Bufbyte *) (((unsigned long) (ptr + LONG_BYTES - 1)) &
- ALIGN_MASK);
- CONST Bufbyte *aligned_end =
- (CONST Bufbyte *) (((unsigned long) end) & ALIGN_MASK);
-
- /* Handle unaligned stuff at the beginning. */
- while (ptr < aligned_ptr)
+ const Bufbyte *end = ptr + len;
+
+#if SIZEOF_LONG == 8
+# define STRIDE_TYPE long
+# define HIGH_BIT_MASK 0x8080808080808080UL
+#elif SIZEOF_LONG_LONG == 8 && !(defined (i386) || defined (__i386__))
+# define STRIDE_TYPE long long
+# define HIGH_BIT_MASK 0x8080808080808080ULL
+#elif SIZEOF_LONG == 4
+# define STRIDE_TYPE long
+# define HIGH_BIT_MASK 0x80808080UL
+#else
+# error Add support for 128-bit systems here
+#endif
+
+#define ALIGN_BITS ((EMACS_UINT) (ALIGNOF (STRIDE_TYPE) - 1))
+#define ALIGN_MASK (~ ALIGN_BITS)
+#define ALIGNED(ptr) ((((EMACS_UINT) ptr) & ALIGN_BITS) == 0)
+#define STRIDE sizeof (STRIDE_TYPE)
+
+ while (ptr < end)
+ {
+ if (BYTE_ASCII_P (*ptr))
{
- if (!BYTE_ASCII_P (*ptr))
- goto bail;
- count++, ptr++;
+ /* optimize for long stretches of ASCII */
+ if (! ALIGNED (ptr))
+ ptr++, count++;
+ else
+ {
+ const unsigned STRIDE_TYPE *ascii_end =
+ (const unsigned STRIDE_TYPE *) ptr;
+ /* This loop screams, because we can typically
+ detect ASCII characters 8 at a time. */
+ while ((const Bufbyte *) ascii_end + STRIDE <= end
+ && !(*ascii_end & HIGH_BIT_MASK))
+ ascii_end++;
+ if ((Bufbyte *) ascii_end == ptr)
+ ptr++, count++;
+ else
+ {
+ count += (Bufbyte *) ascii_end - ptr;
+ ptr = (Bufbyte *) ascii_end;
+ }
+ }
}
- /* Now do it. */
- while (ptr < aligned_end)
+ else
{
-
- if ((* (unsigned long *) ptr) & HIGH_BIT_MASK)
- goto bail;
- ptr += LONG_BYTES;
- count += LONG_BYTES;
+ /* optimize for successive characters from the same charset */
+ Bufbyte leading_byte = *ptr;
+ size_t bytes = REP_BYTES_BY_FIRST_BYTE (leading_byte);
+ while ((ptr < end) && (*ptr == leading_byte))
+ ptr += bytes, count++;
}
}
-#endif /* LONGBITS == 32 || LONGBITS == 64 */
-
- bail:
- while (ptr < end)
- {
- count++;
- INC_CHARPTR (ptr);
- }
#ifdef ERROR_CHECK_BUFPOS
/* Bomb out if the specified substring ends in the middle
of a character. Note that we might have already gotten
the equivalent length in bytes. */
Bytecount
-charcount_to_bytecount (CONST Bufbyte *ptr, Charcount len)
+charcount_to_bytecount (const Bufbyte *ptr, Charcount len)
{
- CONST Bufbyte *newptr = ptr;
+ const Bufbyte *newptr = ptr;
while (len > 0)
{
/************************************************************************/
void
-fixup_internal_substring (CONST Bufbyte *nonreloc, Lisp_Object reloc,
+fixup_internal_substring (const Bufbyte *nonreloc, Lisp_Object reloc,
Bytecount offset, Bytecount *len)
{
assert ((nonreloc && NILP (reloc)) || (!nonreloc && STRINGP (reloc)));
if (*len < 0)
{
if (nonreloc)
- *len = strlen ((CONST char *) nonreloc) - offset;
+ *len = strlen ((const char *) nonreloc) - offset;
else
*len = XSTRING_LENGTH (reloc) - offset;
}
Charcount
buffer_insert_string_1 (struct buffer *buf, Bufpos pos,
- CONST Bufbyte *nonreloc, Lisp_Object reloc,
+ const Bufbyte *nonreloc, Lisp_Object reloc,
Bytecount offset, Bytecount length,
int flags)
{
Charcount
buffer_insert_raw_string_1 (struct buffer *buf, Bufpos pos,
- CONST Bufbyte *nonreloc, Bytecount length,
+ const Bufbyte *nonreloc, Bytecount length,
int flags)
{
/* This function can GC */
/* Insert the null-terminated string S (in external format). */
Charcount
-buffer_insert_c_string_1 (struct buffer *buf, Bufpos pos, CONST char *s,
+buffer_insert_c_string_1 (struct buffer *buf, Bufpos pos, const char *s,
int flags)
{
/* This function can GC */
- CONST char *translated = GETTEXT (s);
- return buffer_insert_string_1 (buf, pos, (CONST Bufbyte *) translated, Qnil,
+ const char *translated = GETTEXT (s);
+ return buffer_insert_string_1 (buf, pos, (const Bufbyte *) translated, Qnil,
0, strlen (translated), flags);
}
}
void
-find_charsets_in_bufbyte_string (Charset_ID *charsets, CONST Bufbyte *str,
+find_charsets_in_bufbyte_string (Charset_ID *charsets, const Bufbyte *str,
Bytecount len)
{
#ifndef MULE
/* Telescope this. */
charsets[0] = 1;
#else
- CONST Bufbyte *strend = str + len;
+ const Bufbyte *strend = str + len;
memset (charsets, 0, NUM_LEADING_BYTES * sizeof(Charset_ID));
+ /* #### SJT doesn't like this. */
+ if (len == 0)
+ {
+ charsets[XCHARSET_LEADING_BYTE (Vcharset_ascii) - MIN_LEADING_BYTE] = 1;
+ return;
+ }
+
while (str < strend)
{
#ifdef UTF2000
}
void
-find_charsets_in_emchar_string (Charset_ID *charsets, CONST Emchar *str,
+find_charsets_in_emchar_string (Charset_ID *charsets, const Emchar *str,
Charcount len)
{
#ifndef MULE
int i;
memset (charsets, 0, NUM_LEADING_BYTES * sizeof(Charset_ID));
+
+ /* #### SJT doesn't like this. */
+ if (len == 0)
+ {
+ charsets[XCHARSET_LEADING_BYTE (Vcharset_ascii) - MIN_LEADING_BYTE] = 1;
+ return;
+ }
+
for (i = 0; i < len; i++)
{
#ifdef UTF2000
}
int
-bufbyte_string_displayed_columns (CONST Bufbyte *str, Bytecount len)
+bufbyte_string_displayed_columns (const Bufbyte *str, Bytecount len)
{
int cols = 0;
- CONST Bufbyte *end = str + len;
+ const Bufbyte *end = str + len;
while (str < end)
{
}
int
-emchar_string_displayed_columns (CONST Emchar *str, Charcount len)
+emchar_string_displayed_columns (const Emchar *str, Charcount len)
{
#ifdef MULE
int cols = 0;
/* NOTE: Does not reset the Dynarr. */
void
-convert_bufbyte_string_into_emchar_dynarr (CONST Bufbyte *str, Bytecount len,
+convert_bufbyte_string_into_emchar_dynarr (const Bufbyte *str, Bytecount len,
Emchar_dynarr *dyn)
{
- CONST Bufbyte *strend = str + len;
+ const Bufbyte *strend = str + len;
while (str < strend)
{
}
Charcount
-convert_bufbyte_string_into_emchar_string (CONST Bufbyte *str, Bytecount len,
+convert_bufbyte_string_into_emchar_string (const Bufbyte *str, Bytecount len,
Emchar *arr)
{
- CONST Bufbyte *strend = str + len;
+ const Bufbyte *strend = str + len;
Charcount newlen = 0;
while (str < strend)
{
#define INSDEL_NO_LOCKING 2
Charcount buffer_insert_string_1 (struct buffer *buf, Bufpos pos,
- CONST Bufbyte *nonreloc, Lisp_Object reloc,
+ const Bufbyte *nonreloc, Lisp_Object reloc,
Bytecount offset, Bytecount length,
int flags);
Charcount buffer_insert_raw_string_1 (struct buffer *buf, Bufpos pos,
- CONST Bufbyte *nonreloc,
+ const Bufbyte *nonreloc,
Bytecount length, int flags);
Charcount buffer_insert_lisp_string_1 (struct buffer *buf, Bufpos pos,
Lisp_Object str, int flags);
Charcount buffer_insert_c_string_1 (struct buffer *buf, Bufpos pos,
- CONST char *s, int flags);
+ const char *s, int flags);
Charcount buffer_insert_emacs_char_1 (struct buffer *buf, Bufpos pos,
Emchar ch, int flags);
Charcount buffer_insert_c_char_1 (struct buffer *buf, Bufpos pos, char c,
Memind do_marker_adjustment (Memind mpos, Memind from,
Memind to, Bytecount amount);
-void fixup_internal_substring (CONST Bufbyte *nonreloc,
+void fixup_internal_substring (const Bufbyte *nonreloc,
Lisp_Object reloc,
Bytecount offset, Bytecount *len);
/* init_input -- Set things up for i18n level 4 input.
*/
void
-init_input (CONST char *res_name, CONST char *res_class, Display *display)
+init_input (const char *res_name, const char *res_class, Display *display)
{
XIMStyles *styles;
unsigned short i;
#include "insdel.h"
#include "keymap.h"
#include "window.h"
-
-#ifdef WINDOWSNT
-/* Hmm, under unix we want X modifiers, under NT we want X modifiers if
- we are running X and Windows modifiers otherwise.
- gak. This is a kludge until we support multiple native GUIs!
-*/
-#undef MOD_ALT
-#undef MOD_CONTROL
-#undef MOD_SHIFT
-#endif
-
#include "events-mod.h"
\f
If the key `C-a' was bound to some command, the hierarchy would look like
- keymap-1: associates the integer MOD_CONTROL with keymap-2
+ keymap-1: associates the integer XEMACS_MOD_CONTROL with keymap-2
keymap-2: associates "a" with the command
Similarly, if the key `C-H-a' was bound to some command, the hierarchy
would look like
- keymap-1: associates the integer (MOD_CONTROL | MOD_HYPER)
+ keymap-1: associates the integer (XEMACS_MOD_CONTROL | XEMACS_MOD_HYPER)
with keymap-2
keymap-2: associates "a" with the command
Note that a special exception is made for the meta modifier, in order
to deal with ESC/meta lossage. Any key combination containing the
meta modifier is first indexed off of the main map into the meta
- submap (with hash key MOD_META) and then indexed off of the
+ submap (with hash key XEMACS_MOD_META) and then indexed off of the
meta submap with the meta modifier removed from the key combination.
For example, when associating a command with C-M-H-a, we'd have
- keymap-1: associates the integer MOD_META with keymap-2
- keymap-2: associates the integer (MOD_CONTROL | MOD_HYPER)
+ keymap-1: associates the integer XEMACS_MOD_META with keymap-2
+ keymap-2: associates the integer (XEMACS_MOD_CONTROL | XEMACS_MOD_HYPER)
with keymap-3
keymap-3: associates "a" with the command
Note that this new model of keymaps takes much of the magic away from
the Escape key: the value of the variable `esc-map' is no longer indexed
in the `global-map' under the ESC key. It's indexed under the integer
- MOD_META. This is not user-visible, however; none of the "bucky"
+ XEMACS_MOD_META. This is not user-visible, however; none of the "bucky"
maps are.
There is a hack in Flookup_key() that makes (lookup-key global-map "\^[")
/* Some low-level functions */
/************************************************************************/
-static unsigned int
+static int
bucky_sym_to_bucky_bit (Lisp_Object sym)
{
- if (EQ (sym, Qcontrol)) return MOD_CONTROL;
- if (EQ (sym, Qmeta)) return MOD_META;
- if (EQ (sym, Qsuper)) return MOD_SUPER;
- if (EQ (sym, Qhyper)) return MOD_HYPER;
- if (EQ (sym, Qalt)) return MOD_ALT;
- if (EQ (sym, Qsymbol)) return MOD_ALT; /* #### - reverse compat */
- if (EQ (sym, Qshift)) return MOD_SHIFT;
+ if (EQ (sym, Qcontrol)) return XEMACS_MOD_CONTROL;
+ if (EQ (sym, Qmeta)) return XEMACS_MOD_META;
+ if (EQ (sym, Qsuper)) return XEMACS_MOD_SUPER;
+ if (EQ (sym, Qhyper)) return XEMACS_MOD_HYPER;
+ if (EQ (sym, Qalt)) return XEMACS_MOD_ALT;
+ if (EQ (sym, Qsymbol)) return XEMACS_MOD_ALT; /* #### - reverse compat */
+ if (EQ (sym, Qshift)) return XEMACS_MOD_SHIFT;
return 0;
}
static Lisp_Object
-control_meta_superify (Lisp_Object frob, unsigned int modifiers)
+control_meta_superify (Lisp_Object frob, int modifiers)
{
if (modifiers == 0)
return frob;
frob = Fcons (frob, Qnil);
- if (modifiers & MOD_SHIFT) frob = Fcons (Qshift, frob);
- if (modifiers & MOD_ALT) frob = Fcons (Qalt, frob);
- if (modifiers & MOD_HYPER) frob = Fcons (Qhyper, frob);
- if (modifiers & MOD_SUPER) frob = Fcons (Qsuper, frob);
- if (modifiers & MOD_CONTROL) frob = Fcons (Qcontrol, frob);
- if (modifiers & MOD_META) frob = Fcons (Qmeta, frob);
+ if (modifiers & XEMACS_MOD_SHIFT) frob = Fcons (Qshift, frob);
+ if (modifiers & XEMACS_MOD_ALT) frob = Fcons (Qalt, frob);
+ if (modifiers & XEMACS_MOD_HYPER) frob = Fcons (Qhyper, frob);
+ if (modifiers & XEMACS_MOD_SUPER) frob = Fcons (Qsuper, frob);
+ if (modifiers & XEMACS_MOD_CONTROL) frob = Fcons (Qcontrol, frob);
+ if (modifiers & XEMACS_MOD_META) frob = Fcons (Qmeta, frob);
return frob;
}
static Lisp_Object
-make_key_description (CONST struct key_data *key, int prettify)
+make_key_description (const struct key_data *key, int prettify)
{
Lisp_Object keysym = key->keysym;
- unsigned int modifiers = key->modifiers;
+ int modifiers = key->modifiers;
if (prettify && CHARP (keysym))
{
static Lisp_Object
raw_lookup_key (Lisp_Object keymap,
- CONST struct key_data *raw_keys, int raw_keys_count,
+ const struct key_data *raw_keys, int raw_keys_count,
int keys_so_far, int accept_default);
/* Relies on caller to gc-protect args */
static Lisp_Object
keymap_lookup_directly (Lisp_Object keymap,
- Lisp_Object keysym, unsigned int modifiers)
+ Lisp_Object keysym, int modifiers)
{
Lisp_Keymap *k;
- if ((modifiers & ~(MOD_CONTROL | MOD_META | MOD_SUPER | MOD_HYPER
- | MOD_ALT | MOD_SHIFT)) != 0)
+ if ((modifiers & ~(XEMACS_MOD_CONTROL | XEMACS_MOD_META | XEMACS_MOD_SUPER | XEMACS_MOD_HYPER
+ | XEMACS_MOD_ALT | XEMACS_MOD_SHIFT)) != 0)
abort ();
k = XKEYMAP (keymap);
keysym = i_fart_on_gcc;
}
- if (modifiers & MOD_META) /* Utterly hateful ESC lossage */
+ if (modifiers & XEMACS_MOD_META) /* Utterly hateful ESC lossage */
{
- Lisp_Object submap = Fgethash (MAKE_MODIFIER_HASH_KEY (MOD_META),
+ Lisp_Object submap = Fgethash (MAKE_MODIFIER_HASH_KEY (XEMACS_MOD_META),
k->table, Qnil);
if (NILP (submap))
return Qnil;
k = XKEYMAP (submap);
- modifiers &= ~MOD_META;
+ modifiers &= ~XEMACS_MOD_META;
}
if (modifiers != 0)
static Lisp_Object
-create_bucky_submap (Lisp_Keymap *k, unsigned int modifiers,
+create_bucky_submap (Lisp_Keymap *k, int modifiers,
Lisp_Object parent_for_debugging_info)
{
Lisp_Object submap = Fmake_sparse_keymap (Qnil);
/* Relies on caller to gc-protect keymap, keysym, value */
static void
-keymap_store (Lisp_Object keymap, CONST struct key_data *key,
+keymap_store (Lisp_Object keymap, const struct key_data *key,
Lisp_Object value)
{
Lisp_Object keysym = key->keysym;
- unsigned int modifiers = key->modifiers;
+ int modifiers = key->modifiers;
Lisp_Keymap *k = XKEYMAP (keymap);
- assert ((modifiers & ~(MOD_CONTROL | MOD_META | MOD_SUPER | MOD_HYPER
- | MOD_ALT | MOD_SHIFT)) == 0);
+ assert ((modifiers & ~(XEMACS_MOD_CONTROL | XEMACS_MOD_META
+ | XEMACS_MOD_SUPER | XEMACS_MOD_HYPER
+ | XEMACS_MOD_ALT | XEMACS_MOD_SHIFT)) == 0);
/* If the keysym is a one-character symbol, use the char code instead. */
if (SYMBOLP (keysym) && string_char_length (XSYMBOL (keysym)->name) == 1)
keysym = make_char (string_char (XSYMBOL (keysym)->name, 0));
- if (modifiers & MOD_META) /* Utterly hateful ESC lossage */
+ if (modifiers & XEMACS_MOD_META) /* Utterly hateful ESC lossage */
{
- Lisp_Object submap = Fgethash (MAKE_MODIFIER_HASH_KEY (MOD_META),
+ Lisp_Object submap = Fgethash (MAKE_MODIFIER_HASH_KEY (XEMACS_MOD_META),
k->table, Qnil);
if (NILP (submap))
- submap = create_bucky_submap (k, MOD_META, keymap);
+ submap = create_bucky_submap (k, XEMACS_MOD_META, keymap);
k = XKEYMAP (submap);
- modifiers &= ~MOD_META;
+ modifiers &= ~XEMACS_MOD_META;
}
if (modifiers != 0)
if (!INTP (XCDR (idx)))
return Qnil;
indirection.keysym = XCAR (idx);
- indirection.modifiers = XINT (XCDR (idx));
+ indirection.modifiers = (unsigned char) XINT (XCDR (idx));
}
else if (SYMBOLP (idx))
{
}
static Lisp_Object
-keymap_lookup_1 (Lisp_Object keymap, CONST struct key_data *key,
+keymap_lookup_1 (Lisp_Object keymap, const struct key_data *key,
int accept_default)
{
/* This function can GC */
static void
define_key_check_and_coerce_keysym (Lisp_Object spec,
Lisp_Object *keysym,
- unsigned int modifiers)
+ int modifiers)
{
/* Now, check and massage the trailing keysym specifier. */
if (SYMBOLP (*keysym))
problems ... */
signal_simple_error ("keysym char must be printable", *keysym);
/* #### This bites! I want to be able to write (control shift a) */
- if (modifiers & MOD_SHIFT)
+ if (modifiers & XEMACS_MOD_SHIFT)
signal_simple_error
("The `shift' modifier may not be applied to ASCII keysyms",
spec);
}
else if (CONSP (spec))
{
- unsigned int modifiers = 0;
+ int modifiers = 0;
Lisp_Object keysym = Qnil;
Lisp_Object rest = spec;
/* First, parse out the leading modifier symbols. */
while (CONSP (rest))
{
- unsigned int modifier;
+ int modifier;
keysym = XCAR (rest);
modifier = bucky_sym_to_bucky_bit (keysym);
}
static int
-meta_prefix_char_p (CONST struct key_data *key)
+meta_prefix_char_p (const struct key_data *key)
{
Lisp_Event event;
struct key_data *returned_value)
{
Lisp_Object keysym = key->keysym;
- unsigned int modifiers = key->modifiers;
- unsigned int modifiers_sans_control = (modifiers & (~MOD_CONTROL));
- unsigned int modifiers_sans_meta = (modifiers & (~MOD_META));
+ int modifiers = key->modifiers;
+ int modifiers_sans_control = (modifiers & (~XEMACS_MOD_CONTROL));
+ int modifiers_sans_meta = (modifiers & (~XEMACS_MOD_META));
returned_value->keysym = Qnil; /* By default, no "alternate" key */
returned_value->modifiers = 0;
- if (modifiers_sans_meta == MOD_CONTROL)
+ if (modifiers_sans_meta == XEMACS_MOD_CONTROL)
{
if EQ (keysym, QKspace)
MACROLET (make_char ('@'), modifiers);
else if (modifiers_sans_meta != 0)
return;
else if (EQ (keysym, QKbackspace)) /* backspace => c-h */
- MACROLET (make_char ('h'), (modifiers | MOD_CONTROL));
+ MACROLET (make_char ('h'), (modifiers | XEMACS_MOD_CONTROL));
else if (EQ (keysym, QKtab)) /* tab => c-i */
- MACROLET (make_char ('i'), (modifiers | MOD_CONTROL));
+ MACROLET (make_char ('i'), (modifiers | XEMACS_MOD_CONTROL));
else if (EQ (keysym, QKlinefeed)) /* linefeed => c-j */
- MACROLET (make_char ('j'), (modifiers | MOD_CONTROL));
+ MACROLET (make_char ('j'), (modifiers | XEMACS_MOD_CONTROL));
else if (EQ (keysym, QKreturn)) /* return => c-m */
- MACROLET (make_char ('m'), (modifiers | MOD_CONTROL));
+ MACROLET (make_char ('m'), (modifiers | XEMACS_MOD_CONTROL));
else if (EQ (keysym, QKescape)) /* escape => c-[ */
- MACROLET (make_char ('['), (modifiers | MOD_CONTROL));
+ MACROLET (make_char ('['), (modifiers | XEMACS_MOD_CONTROL));
else
return;
#undef MACROLET
struct gcpro ngcpro1;
NGCPRO1 (c);
- meta_map = Fgethash (MAKE_MODIFIER_HASH_KEY (MOD_META),
+ meta_map = Fgethash (MAKE_MODIFIER_HASH_KEY (XEMACS_MOD_META),
XKEYMAP (keymap)->table, Qnil);
if (!NILP (meta_map)
&& keymap_fullness (meta_map) != 0)
if (metized)
{
- raw_key1.modifiers |= MOD_META;
- raw_key2.modifiers |= MOD_META;
+ raw_key1.modifiers |= XEMACS_MOD_META;
+ raw_key2.modifiers |= XEMACS_MOD_META;
metized = 0;
}
/* This crap is to make sure that someone doesn't bind something like
"C-x M-a" while "C-x ESC" has a non-keymap binding. */
- if (raw_key1.modifiers & MOD_META)
+ if (raw_key1.modifiers & XEMACS_MOD_META)
ensure_meta_prefix_char_keymapp (keys, idx, keymap);
if (++idx == len)
struct raw_lookup_key_mapper_closure
{
int remaining;
- CONST struct key_data *raw_keys;
+ const struct key_data *raw_keys;
int raw_keys_count;
int keys_so_far;
int accept_default;
/* Caller should gc-protect args (keymaps may autoload) */
static Lisp_Object
raw_lookup_key (Lisp_Object keymap,
- CONST struct key_data *raw_keys, int raw_keys_count,
+ const struct key_data *raw_keys, int raw_keys_count,
int keys_so_far, int accept_default)
{
/* This function can GC */
int accept_default = c->accept_default;
int remaining = c->remaining;
int keys_so_far = c->keys_so_far;
- CONST struct key_data *raw_keys = c->raw_keys;
+ const struct key_data *raw_keys = c->raw_keys;
Lisp_Object cmd;
if (! meta_prefix_char_p (&(raw_keys[0])))
if (NILP (cmd))
{
/* Do kludgy return of the meta-map */
- cmd = Fgethash (MAKE_MODIFIER_HASH_KEY (MOD_META),
+ cmd = Fgethash (MAKE_MODIFIER_HASH_KEY (XEMACS_MOD_META),
XKEYMAP (k)->table, Qnil);
}
}
if (!NILP (cmd))
cmd = raw_lookup_key (cmd, raw_keys + 1, remaining,
keys_so_far + 1, accept_default);
- else if ((raw_keys[1].modifiers & MOD_META) == 0)
+ else if ((raw_keys[1].modifiers & XEMACS_MOD_META) == 0)
{
struct key_data metified;
metified.keysym = raw_keys[1].keysym;
- metified.modifiers = raw_keys[1].modifiers | MOD_META;
+ metified.modifiers = raw_keys[1].modifiers |
+ (unsigned char) XEMACS_MOD_META;
/* Search for meta-next-char sequence directly */
cmd = keymap_lookup_1 (k, &metified, accept_default);
struct map_keymap_unsorted_closure
{
- void (*fn) (CONST struct key_data *, Lisp_Object binding, void *arg);
+ void (*fn) (const struct key_data *, Lisp_Object binding, void *arg);
void *arg;
- unsigned int modifiers;
+ int modifiers;
};
/* used by map_keymap() */
/* This function can GC */
struct map_keymap_unsorted_closure *closure =
(struct map_keymap_unsorted_closure *) map_keymap_unsorted_closure;
- unsigned int modifiers = closure->modifiers;
- unsigned int mod_bit;
+ int modifiers = closure->modifiers;
+ int mod_bit;
mod_bit = MODIFIER_HASH_KEY_BITS (keysym);
if (mod_bit != 0)
{
{
/* obj1 and obj2 are conses with keysyms in their cars. Cdrs are ignored.
*/
- unsigned int bit1, bit2;
+ int bit1, bit2;
int sym1_p = 0;
int sym2_p = 0;
obj1 = XCAR (obj1);
/* used by map_keymap() */
static void
map_keymap_sorted (Lisp_Object keymap_table,
- unsigned int modifiers,
- void (*function) (CONST struct key_data *key,
+ int modifiers,
+ void (*function) (const struct key_data *key,
Lisp_Object binding,
void *map_keymap_sorted_closure),
void *map_keymap_sorted_closure)
{
Lisp_Object keysym = XCAR (XCAR (contents));
Lisp_Object binding = XCDR (XCAR (contents));
- unsigned int sub_bits = MODIFIER_HASH_KEY_BITS (keysym);
+ int sub_bits = MODIFIER_HASH_KEY_BITS (keysym);
if (sub_bits != 0)
map_keymap_sorted (XKEYMAP (get_keymap (binding,
1, 1))->table,
/* used by Fmap_keymap() */
static void
-map_keymap_mapper (CONST struct key_data *key,
+map_keymap_mapper (const struct key_data *key,
Lisp_Object binding,
void *function)
{
static void
map_keymap (Lisp_Object keymap_table, int sort_first,
- void (*function) (CONST struct key_data *key,
+ void (*function) (const struct key_data *key,
Lisp_Object binding,
void *fn_arg),
void *fn_arg)
static void
accessible_keymaps_mapper_1 (Lisp_Object keysym, Lisp_Object contents,
- unsigned int modifiers,
+ int modifiers,
struct accessible_keymaps_closure *closure)
{
/* This function can GC */
- unsigned int subbits = MODIFIER_HASH_KEY_BITS (keysym);
+ int subbits = MODIFIER_HASH_KEY_BITS (keysym);
if (subbits != 0)
{
keys_so_far and modifiers_so_far describe which map we're looking in;
If we're in the "meta" submap of the map that "C-x 4" is bound to,
then keys_so_far will be {(control x), \4}, and modifiers_so_far
- will be MOD_META. That is, keys_so_far is the chain of keys that we
+ will be XEMACS_MOD_META. That is, keys_so_far is the chain of keys that we
have followed, and modifiers_so_far_so_far is the bits (partial keys)
beyond that.
int shadow_count;
int firstonly;
int keys_count;
- unsigned int modifiers_so_far;
+ int modifiers_so_far;
char *target_buffer;
struct key_data *keys_so_far;
int keys_so_far_total_size;
/* This function can GC */
struct where_is_closure *c = (struct where_is_closure *) arg;
Lisp_Object definition = c->definition;
- CONST int firstonly = c->firstonly;
- CONST unsigned int keys_count = c->keys_count;
- CONST unsigned int modifiers_so_far = c->modifiers_so_far;
+ const int firstonly = c->firstonly;
+ const int keys_count = c->keys_count;
+ const int modifiers_so_far = c->modifiers_so_far;
char *target_buffer = c->target_buffer;
Lisp_Object keys = Fgethash (definition,
XKEYMAP (map)->inverse_table,
{
Lisp_Object key = XCAR (XCAR (submaps));
Lisp_Object submap = XCDR (XCAR (submaps));
- unsigned int lower_modifiers;
+ int lower_modifiers;
int lower_keys_count = keys_count;
- unsigned int bucky;
+ int bucky;
submap = get_keymap (submap, 0, 0);
if (! c->keys_so_far_malloced)
{
struct key_data *new = xnew_array (struct key_data, size);
- memcpy ((void *)new, (CONST void *)c->keys_so_far,
+ memcpy ((void *)new, (const void *)c->keys_so_far,
c->keys_so_far_total_size * sizeof (struct key_data));
}
else
struct describe_map_shadow_closure
{
- CONST struct key_data *raw_key;
+ const struct key_data *raw_key;
Lisp_Object self;
};
static void
-describe_map_mapper (CONST struct key_data *key,
+describe_map_mapper (const struct key_data *key,
Lisp_Object binding,
void *describe_map_closure)
{
struct describe_map_closure *closure =
(struct describe_map_closure *) describe_map_closure;
Lisp_Object keysym = key->keysym;
- unsigned int modifiers = key->modifiers;
+ int modifiers = key->modifiers;
/* Don't mention suppressed commands. */
if (SYMBOLP (binding)
( ( <keysym> . <modifiers> ) . <binding> )
keysym and modifiers are used, binding is ignored.
*/
- unsigned int bit1, bit2;
+ int bit1, bit2;
obj1 = XCAR (obj1);
obj2 = XCAR (obj2);
bit1 = XINT (XCDR (obj1));
{
Lisp_Object elt = XCAR (XCAR (list));
Lisp_Object keysym = XCAR (elt);
- unsigned int modifiers = XINT (XCDR (elt));
+ int modifiers = XINT (XCDR (elt));
if (!NILP (elt_prefix))
buffer_insert_lisp_string (buf, elt_prefix);
- if (modifiers & MOD_META) buffer_insert_c_string (buf, "M-");
- if (modifiers & MOD_CONTROL) buffer_insert_c_string (buf, "C-");
- if (modifiers & MOD_SUPER) buffer_insert_c_string (buf, "S-");
- if (modifiers & MOD_HYPER) buffer_insert_c_string (buf, "H-");
- if (modifiers & MOD_ALT) buffer_insert_c_string (buf, "Alt-");
- if (modifiers & MOD_SHIFT) buffer_insert_c_string (buf, "Sh-");
+ if (modifiers & XEMACS_MOD_META) buffer_insert_c_string (buf, "M-");
+ if (modifiers & XEMACS_MOD_CONTROL) buffer_insert_c_string (buf, "C-");
+ if (modifiers & XEMACS_MOD_SUPER) buffer_insert_c_string (buf, "S-");
+ if (modifiers & XEMACS_MOD_HYPER) buffer_insert_c_string (buf, "H-");
+ if (modifiers & XEMACS_MOD_ALT) buffer_insert_c_string (buf, "Alt-");
+ if (modifiers & XEMACS_MOD_SHIFT) buffer_insert_c_string (buf, "Sh-");
if (SYMBOLP (keysym))
{
Lisp_Object code = Fget (keysym, Vcharacter_set_property, Qnil);
void
syms_of_keymap (void)
{
+ INIT_LRECORD_IMPLEMENTATION (keymap);
+
defsymbol (&Qminor_mode_map_alist, "minor-mode-map-alist");
defsymbol (&Qkeymapp, "keymapp");
staticpro (&Vcurrent_global_map);
- Vsingle_space_string = make_string ((CONST Bufbyte *) " ", 1);
+ Vsingle_space_string = make_string ((const Bufbyte *) " ", 1);
staticpro (&Vsingle_space_string);
}
meta_disgustitute = Fmake_keymap (Qnil);
Ffset (ESC_prefix, meta_disgustitute);
/* no need to protect meta_disgustitute, though */
- keymap_store_internal (MAKE_MODIFIER_HASH_KEY (MOD_META),
+ keymap_store_internal (MAKE_MODIFIER_HASH_KEY (XEMACS_MOD_META),
XKEYMAP (Vcurrent_global_map),
meta_disgustitute);
XKEYMAP (Vcurrent_global_map)->sub_maps_cache = Qt;
This will do nothing if the cache is uninitialized. */
void
insert_invalidate_line_number_cache (struct buffer *b, Bufpos pos,
- CONST Bufbyte *nonreloc, Bytecount length)
+ const Bufbyte *nonreloc, Bytecount length)
{
if (NILP (b->text->line_number_cache))
return;
void narrow_line_number_cache (struct buffer *);
void insert_invalidate_line_number_cache (struct buffer *, Bufpos,
- CONST Bufbyte *, Bytecount);
+ const Bufbyte *, Bytecount);
void delete_invalidate_line_number_cache (struct buffer *, Bufpos, Bufpos);
EMACS_INT buffer_line_number (struct buffer *, Bufpos, int);
#endif
#include "miscplay.h"
+#include "nativesound.h"
#include <errno.h>
#include <fcntl.h>
-#include SOUNDCARD_H_PATH /* Path computed by configure */
+#include SOUNDCARD_H_FILE /* Path computed by configure */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define warn(str) message("audio: %s ",GETTEXT(str))
#endif
-static void (*sighup_handler)(int);
-static void (*sigint_handler)(int);
+static SIGTYPE (*sighup_handler) (int);
+static SIGTYPE (*sigint_handler) (int);
static int mix_fd;
static int audio_vol;
/* 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" */
-static void sighandler(int sig)
+static SIGTYPE
+sighandler (int sig)
{
if (mix_fd > 0) {
if (audio_vol >= 0) {
}
/* XEmacs requires code both for playback of pre-loaded data and for playback
- from a soundfile; we use one function for both cases */
-static void linux_play_data_or_file(int fd,unsigned char *data,
+ from a soundfile; we use one function for both cases.
+
+ Returns 1 on succes. 0 otherwise.
+*/
+static int linux_play_data_or_file(int fd,unsigned char *data,
int length,int volume)
{
size_t (*parsesndfile)(void **dayta,size_t *sz,void **outbuf);
/* We need to read at least the header information before we can start
doing anything */
if (!data || length < HEADERSZ) {
- if (fd < 0) return;
+ if (fd < 0) return 0;
else {
length = read(fd,sndbuf,SNDBUFSZ);
if (length < HEADERSZ)
- return;
+ return 0;
data = sndbuf;
length = SNDBUFSZ; }
}
if (ffmt != fmtRaw && ffmt != fmtSunAudio && ffmt != fmtWave) {
warn("Unsupported file format (neither RAW, nor Sun/DECAudio, nor WAVE)");
- return; }
+ return 0; }
/* The VoxWare-SDK discourages opening /dev/audio; opening /dev/dsp and
properly initializing it via ioctl() is preferred */
if ((audio_fd=open(audio_dev, O_WRONLY | O_NONBLOCK, 0)) < 0) {
- perror(audio_dev);
+ /* JV. Much too verbose. In addition this can crash. See NOTE: in
+ Fplay_sound
+ perror(audio_dev); */
if (mix_fd > 0 && mix_fd != audio_fd) { close(mix_fd); mix_fd = -1; }
- return; }
+ return 0; }
/* The VoxWare-SDK discourages direct manipulation of the mixer device as
this could lead to problems, when multiple sound cards are installed */
if (ffmt == fmtWave)
parse_wave_complete();
-
+
END_OF_PLAY:
/* Now cleanup all used resources */
close(audio_fd);
audio_fd = -1;
- return;
+ return 1;
}
/* Call "linux_play_data_or_file" with the appropriate parameters for
playing a soundfile */
-void play_sound_file (char *sound_file, int volume);
void play_sound_file (char *sound_file, int volume)
{
int fd;
/* Call "linux_play_data_or_file" with the appropriate parameters for
playing pre-loaded data */
-void play_sound_data (unsigned char *data, int length, int volume);
-void play_sound_data (unsigned char *data, int length, int volume)
+int play_sound_data (unsigned char *data, int length, int volume)
{
- linux_play_data_or_file(-1,data,length,volume);
- return;
+ return linux_play_data_or_file(-1,data,length,volume);
}
#define VOID_TO_LISP(larg,varg) ((void) ((larg) = ((Lisp_Object) (varg))))
#define CVOID_TO_LISP VOID_TO_LISP
#define LISP_TO_VOID(larg) ((void *) (larg))
-#define LISP_TO_CVOID(varg) ((CONST void *) (larg))
+#define LISP_TO_CVOID(varg) ((const void *) (larg))
/* Convert a Lisp_Object into something that can't be used as an
lvalue. Useful for type-checking. */
union Lisp_Object
{
/* if non-valbits are at lower addresses */
-#if defined(WORDS_BIGENDIAN)
+#ifdef WORDS_BIGENDIAN
struct
{
EMACS_UINT val : VALBITS;
GCC to accept any (yes, any) pointer as the argument of
a function declared to accept a Lisp_Object. */
struct nosuchstruct *v;
- CONST struct nosuchstruct *cv;
+ const struct nosuchstruct *cv;
}
Lisp_Object;
} while (0)
# define XPNTRVAL(x) ((x).ui)
-INLINE Lisp_Object make_int (EMACS_INT val);
-INLINE Lisp_Object
+INLINE_HEADER Lisp_Object make_int (EMACS_INT val);
+INLINE_HEADER Lisp_Object
make_int (EMACS_INT val)
{
Lisp_Object obj;
return obj;
}
-INLINE Lisp_Object make_char (Emchar val);
-INLINE Lisp_Object
+INLINE_HEADER Lisp_Object make_char (Emchar val);
+INLINE_HEADER Lisp_Object
make_char (Emchar val)
{
Lisp_Object obj;
#define VOID_TO_LISP(larg,varg) \
((void) ((larg).v = (struct nosuchstruct *) (varg)))
#define CVOID_TO_LISP(larg,varg) \
- ((void) ((larg).cv = (CONST struct nosuchstruct *) (varg)))
+ ((void) ((larg).cv = (const struct nosuchstruct *) (varg)))
#define LISP_TO_VOID(larg) ((void *) ((larg).v))
-#define LISP_TO_CVOID(larg) ((CONST void *) ((larg).cv))
+#define LISP_TO_CVOID(larg) ((const void *) ((larg).cv))
/* Convert a Lisp_Object into something that can't be used as an
lvalue. Useful for type-checking. */
void *Dynarr_newf (int elsize);
void Dynarr_resize (void *dy, int size);
-void Dynarr_insert_many (void *d, CONST void *el, int len, int start);
+void Dynarr_insert_many (void *d, const void *el, int len, int start);
void Dynarr_delete_many (void *d, int start, int len);
void Dynarr_free (void *d);
#endif
/* Memory allocation */
-void malloc_warning (CONST char *);
+void malloc_warning (const char *);
void *xmalloc (size_t size);
void *xmalloc_and_zero (size_t size);
void *xrealloc (void *, size_t size);
-char *xstrdup (CONST char *);
+char *xstrdup (const char *);
/* generally useful */
#define countof(x) ((int) (sizeof(x)/sizeof((x)[0])))
#define xnew(type) ((type *) xmalloc (sizeof (type)))
#ifndef DOESNT_RETURN
# if defined __GNUC__
# if ((__GNUC__ > 2) || (__GNUC__ == 2) && (__GNUC_MINOR__ >= 5))
-# define DOESNT_RETURN void volatile
+# define DOESNT_RETURN void
# define DECLARE_DOESNT_RETURN(decl) \
- extern void volatile decl __attribute__ ((noreturn))
+ extern void decl __attribute__ ((noreturn))
# define DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS(decl,str,idx) \
/* Should be able to state multiple independent __attribute__s, but \
the losing syntax doesn't work that way, and screws losing cpp */ \
- extern void volatile decl \
+ extern void decl \
__attribute__ ((noreturn, format (printf, str, idx)))
# else
# define DOESNT_RETURN void volatile
#ifdef USE_ASSERTIONS
/* Highly dubious kludge */
/* (thanks, Jamie, I feel better now -- ben) */
-DECLARE_DOESNT_RETURN (assert_failed (CONST char *, int, CONST char *));
+DECLARE_DOESNT_RETURN (assert_failed (const char *, int, const char *));
# define abort() (assert_failed (__FILE__, __LINE__, "abort()"))
# define assert(x) ((x) ? (void) 0 : assert_failed (__FILE__, __LINE__, #x))
#else
#define INT_VALBITS (BITS_PER_EMACS_INT - INT_GCBITS)
#define VALBITS (BITS_PER_EMACS_INT - GCBITS)
-#define EMACS_INT_MAX ((1UL << INT_VALBITS) -1UL)
+#define EMACS_INT_MAX ((EMACS_INT) ((1UL << INT_VALBITS) -1UL))
+#define EMACS_INT_MIN (-(EMACS_INT_MAX) - 1)
#ifdef USE_UNION_TYPE
# include "lisp-union.h"
#define EXTERNAL_LIST_LOOP_1(list) \
Lisp_Object ELL1_elt, ELL1_hare, ELL1_tortoise; \
-EMACS_INT ELL1_len; \
+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; \
-EMACS_INT len_##elt; \
+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; \
-EMACS_INT len_##elt; \
+EMACS_INT len_##elt; \
EXTERNAL_LIST_LOOP_6 (elt, list, len_##elt, tail, \
tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH)
/* Optimized and safe macros for looping over external property lists. */
#define EXTERNAL_PROPERTY_LIST_LOOP_3(key, value, list) \
Lisp_Object key, value, hare_##key, tortoise_##key; \
-EMACS_INT len_##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; \
-EMACS_INT len_##key; \
+EMACS_INT len_##key; \
EXTERNAL_PROPERTY_LIST_LOOP_7 (key, value, list, len_##key, tail, \
tortoise_##key, CIRCULAR_LIST_SUSPICION_LENGTH)
)
/* Return 1 if LIST is properly acyclic and nil-terminated, else 0. */
-INLINE int TRUE_LIST_P (Lisp_Object object);
-INLINE int
+INLINE_HEADER int TRUE_LIST_P (Lisp_Object object);
+INLINE_HEADER int
TRUE_LIST_P (Lisp_Object object)
{
Lisp_Object hare, tortoise;
#ifdef MULE
-Charcount bytecount_to_charcount (CONST Bufbyte *ptr, Bytecount len);
-Bytecount charcount_to_bytecount (CONST Bufbyte *ptr, Charcount len);
+Charcount bytecount_to_charcount (const Bufbyte *ptr, Bytecount len);
+Bytecount charcount_to_bytecount (const Bufbyte *ptr, Charcount len);
#else /* not MULE */
#ifdef MULE
-INLINE Charcount string_char_length (Lisp_String *s);
-INLINE Charcount
+INLINE_HEADER Charcount string_char_length (Lisp_String *s);
+INLINE_HEADER Charcount
string_char_length (Lisp_String *s)
{
return bytecount_to_charcount (string_data (s), string_length (s));
#endif /* not MULE */
+/* Return the true size of a struct with a variable-length array field. */
+#define FLEXIBLE_ARRAY_STRUCT_SIZEOF(flexible_array_structtype, \
+ flexible_array_field, \
+ flexible_array_length) \
+ (offsetof (flexible_array_structtype, flexible_array_field) + \
+ (offsetof (flexible_array_structtype, flexible_array_field[1]) - \
+ offsetof (flexible_array_structtype, flexible_array_field[0])) * \
+ (flexible_array_length))
+
/*********** vector ***********/
struct Lisp_Vector
#define bit_vector_length(v) ((v)->size)
#define bit_vector_next(v) ((v)->next)
-INLINE int bit_vector_bit (Lisp_Bit_Vector *v, size_t n);
-INLINE int
+INLINE_HEADER int bit_vector_bit (Lisp_Bit_Vector *v, size_t n);
+INLINE_HEADER int
bit_vector_bit (Lisp_Bit_Vector *v, size_t n)
{
return ((v->bits[n >> LONGBITS_LOG2] >> (n & (LONGBITS_POWER_OF_2 - 1)))
& 1);
}
-INLINE void set_bit_vector_bit (Lisp_Bit_Vector *v, size_t n, int value);
-INLINE void
+INLINE_HEADER void set_bit_vector_bit (Lisp_Bit_Vector *v, size_t n, int value);
+INLINE_HEADER void
set_bit_vector_bit (Lisp_Bit_Vector *v, size_t n, int value)
{
if (value)
struct Lisp_Subr
{
struct lrecord_header lheader;
- short min_args, max_args;
- CONST char *prompt;
- CONST char *doc;
- CONST char *name;
+ short min_args;
+ short max_args;
+ const char *prompt;
+ const char *doc;
+ const char *name;
lisp_fn_t subr_fn;
};
typedef struct Lisp_Subr Lisp_Subr;
#ifdef ERROR_CHECK_TYPECHECK
-INLINE Emchar XCHAR (Lisp_Object obj);
-INLINE Emchar
+INLINE_HEADER Emchar XCHAR (Lisp_Object obj);
+INLINE_HEADER Emchar
XCHAR (Lisp_Object obj)
{
assert (CHARP (obj));
#ifdef ERROR_CHECK_TYPECHECK
-INLINE EMACS_INT XINT (Lisp_Object obj);
-INLINE EMACS_INT
+INLINE_HEADER EMACS_INT XINT (Lisp_Object obj);
+INLINE_HEADER EMACS_INT
XINT (Lisp_Object obj)
{
assert (INTP (obj));
return XREALINT (obj);
}
-INLINE EMACS_INT XCHAR_OR_INT (Lisp_Object obj);
-INLINE EMACS_INT
+INLINE_HEADER EMACS_INT XCHAR_OR_INT (Lisp_Object obj);
+INLINE_HEADER EMACS_INT
XCHAR_OR_INT (Lisp_Object obj)
{
assert (INTP (obj) || CHARP (obj));
struct lcrecord_header header;
Lisp_Object free;
size_t size;
- CONST struct lrecord_implementation *implementation;
+ const struct lrecord_implementation *implementation;
};
DECLARE_LRECORD (lcrecord_list, struct lcrecord_list);
functions should not be doing this. */
Lisp_Object make_lcrecord_list (size_t size,
- CONST struct lrecord_implementation
+ const struct lrecord_implementation
*implementation);
Lisp_Object allocate_managed_lcrecord (Lisp_Object lcrecord_list);
void free_managed_lcrecord (Lisp_Object lcrecord_list, Lisp_Object lcrecord);
/* Can't be const, because then subr->doc is read-only and
Snarf_documentation chokes */
-#define subr_lheader_initializer { 0, 0, 0, 0 }
-
#define DEFUN(lname, Fname, min_args, max_args, prompt, arglist) \
Lisp_Object Fname (EXFUN_##max_args); \
- static struct Lisp_Subr S##Fname = { subr_lheader_initializer, \
- min_args, max_args, prompt, 0, lname, (lisp_fn_t) Fname }; \
+ static struct Lisp_Subr S##Fname = \
+ { \
+ { /* struct lrecord_header */ \
+ lrecord_type_subr, /* lrecord_type_index */ \
+ 1, /* mark bit */ \
+ 1, /* c_readonly bit */ \
+ 1 /* lisp_readonly bit */ \
+ }, \
+ min_args, \
+ max_args, \
+ prompt, \
+ 0, /* doc string */ \
+ lname, \
+ (lisp_fn_t) Fname \
+ }; \
Lisp_Object Fname (DEFUN_##max_args arglist)
/* Heavy ANSI C preprocessor hackery to get DEFUN to declare a
#define HASH9(a,b,c,d,e,f,g,h,i) (GOOD_HASH * HASH8 (a,b,c,d,e,f,g,h) + (i))
#define LISP_HASH(obj) ((unsigned long) LISP_TO_VOID (obj))
-unsigned long string_hash (CONST void *xv);
-unsigned long memory_hash (CONST void *xv, size_t size);
+unsigned long string_hash (const void *xv);
+unsigned long memory_hash (const void *xv, size_t size);
unsigned long internal_hash (Lisp_Object obj, int depth);
unsigned long internal_array_hash (Lisp_Object *arr, int size, int depth);
#ifdef HAVE_LIBINTL_H
#include <libintl.h>
#else
-char *dgettext (CONST char *, CONST char *);
-char *gettext (CONST char *);
-char *textdomain (CONST char *);
-char *bindtextdomain (CONST char *, CONST char *);
+char *dgettext (const char *, const char *);
+char *gettext (const char *);
+char *textdomain (const char *);
+char *bindtextdomain (const char *, const char *);
#endif /* HAVE_LIBINTL_H */
#define GETTEXT(x) gettext(x)
/* Call dumpstruct(&var, &desc) to dump the structure pointed to by `var'. */
void dumpstruct (void *, const struct struct_description *);
+/* Call dumpopaque(&var, size) to dump the opaque static structure `var'. */
+void dumpopaque (void *, size_t);
+
/* Call pdump_wire(&var) to ensure that var is properly updated after pdump. */
void pdump_wire (Lisp_Object *);
extern EMACS_INT gc_generation_number[1];
int c_readonly (Lisp_Object);
int lisp_readonly (Lisp_Object);
-Lisp_Object build_string (CONST char *);
-Lisp_Object build_ext_string (CONST char *, Lisp_Object);
-Lisp_Object build_translated_string (CONST char *);
-Lisp_Object make_string (CONST Bufbyte *, Bytecount);
-Lisp_Object make_ext_string (CONST Extbyte *, EMACS_INT, Lisp_Object);
+Lisp_Object build_string (const char *);
+Lisp_Object build_ext_string (const char *, Lisp_Object);
+Lisp_Object build_translated_string (const char *);
+Lisp_Object make_string (const Bufbyte *, Bytecount);
+Lisp_Object make_ext_string (const Extbyte *, EMACS_INT, Lisp_Object);
Lisp_Object make_uninit_string (Bytecount);
Lisp_Object make_float (double);
-Lisp_Object make_string_nocopy (CONST Bufbyte *, Bytecount);
+Lisp_Object make_string_nocopy (const Bufbyte *, Bytecount);
void free_cons (Lisp_Cons *);
void free_list (Lisp_Object);
void free_alist (Lisp_Object);
#endif
#ifdef PDUMP
void pdump (void);
-int pdump_load (void);
+int pdump_load (const char *);
extern char *pdump_start, *pdump_end;
#define DUMPEDP(adr) ((((char *)(adr)) < pdump_end) && (((char *)(adr)) >= pdump_start))
extern int find_file_use_truenames;
/* Defined in callproc.c */
-char *egetenv (CONST char *);
+char *egetenv (const char *);
/* Defined in console.c */
void stuff_buffered_input (Lisp_Object);
unsigned int lisp_to_word (Lisp_Object);
/* Defined in dired.c */
-Lisp_Object make_directory_hash_table (CONST char *);
+Lisp_Object make_directory_hash_table (const char *);
Lisp_Object wasteful_word_to_lisp (unsigned int);
/* Defined in doc.c */
Lisp_Object read_doc_string (Lisp_Object);
/* Defined in doprnt.c */
-Bytecount emacs_doprnt_c (Lisp_Object, CONST Bufbyte *, Lisp_Object,
+Bytecount emacs_doprnt_c (Lisp_Object, const Bufbyte *, Lisp_Object,
Bytecount, ...);
-Bytecount emacs_doprnt_va (Lisp_Object, CONST Bufbyte *, Lisp_Object,
+Bytecount emacs_doprnt_va (Lisp_Object, const Bufbyte *, Lisp_Object,
Bytecount, va_list);
-Bytecount emacs_doprnt_lisp (Lisp_Object, CONST Bufbyte *, Lisp_Object,
- Bytecount, int, CONST Lisp_Object *);
-Bytecount emacs_doprnt_lisp_2 (Lisp_Object, CONST Bufbyte *, Lisp_Object,
+Bytecount emacs_doprnt_lisp (Lisp_Object, const Bufbyte *, Lisp_Object,
+ Bytecount, int, const Lisp_Object *);
+Bytecount emacs_doprnt_lisp_2 (Lisp_Object, const Bufbyte *, Lisp_Object,
Bytecount, int, ...);
-Lisp_Object emacs_doprnt_string_c (CONST Bufbyte *, Lisp_Object,
+Lisp_Object emacs_doprnt_string_c (const Bufbyte *, Lisp_Object,
Bytecount, ...);
-Lisp_Object emacs_doprnt_string_va (CONST Bufbyte *, Lisp_Object,
+Lisp_Object emacs_doprnt_string_va (const Bufbyte *, Lisp_Object,
Bytecount, va_list);
-Lisp_Object emacs_doprnt_string_lisp (CONST Bufbyte *, Lisp_Object,
- Bytecount, int, CONST Lisp_Object *);
-Lisp_Object emacs_doprnt_string_lisp_2 (CONST Bufbyte *, Lisp_Object,
+Lisp_Object emacs_doprnt_string_lisp (const Bufbyte *, Lisp_Object,
+ Bytecount, int, const Lisp_Object *);
+Lisp_Object emacs_doprnt_string_lisp_2 (const Bufbyte *, Lisp_Object,
Bytecount, int, ...);
/* Defined in editfns.c */
Lisp_Object save_current_buffer_restore (Lisp_Object);
/* Defined in emacs.c */
-DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (fatal (CONST char *,
+DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (fatal (const char *,
...), 1, 2);
-int stderr_out (CONST char *, ...) PRINTF_ARGS (1, 2);
-int stdout_out (CONST char *, ...) PRINTF_ARGS (1, 2);
+int stderr_out (const char *, ...) PRINTF_ARGS (1, 2);
+int stdout_out (const char *, ...) PRINTF_ARGS (1, 2);
SIGTYPE fatal_error_signal (int);
Lisp_Object make_arg_list (int, char **);
void make_argc_argv (Lisp_Object, int *, char ***);
void free_argc_argv (char **);
-Lisp_Object decode_env_path (CONST char *, CONST char *);
-Lisp_Object decode_path (CONST char *);
+Lisp_Object decode_env_path (const char *, const char *);
+Lisp_Object decode_path (const char *);
/* Nonzero means don't do interactive redisplay and don't change tty modes */
-extern int noninteractive;
+extern int noninteractive, noninteractive1;
extern int preparing_for_armageddon;
extern int emacs_priority;
extern int running_asynch_code;
void maybe_signal_error (Lisp_Object, Lisp_Object, Lisp_Object, Error_behavior);
Lisp_Object maybe_signal_continuable_error (Lisp_Object, Lisp_Object,
Lisp_Object, Error_behavior);
-DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (error (CONST char *,
+DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (error (const char *,
...), 1, 2);
-void maybe_error (Lisp_Object, Error_behavior, CONST char *,
+void maybe_error (Lisp_Object, Error_behavior, const char *,
...) PRINTF_ARGS (3, 4);
-Lisp_Object continuable_error (CONST char *, ...) PRINTF_ARGS (1, 2);
+Lisp_Object continuable_error (const char *, ...) PRINTF_ARGS (1, 2);
Lisp_Object maybe_continuable_error (Lisp_Object, Error_behavior,
- CONST char *, ...) PRINTF_ARGS (3, 4);
-DECLARE_DOESNT_RETURN (signal_simple_error (CONST char *, Lisp_Object));
-void maybe_signal_simple_error (CONST char *, Lisp_Object,
+ const char *, ...) PRINTF_ARGS (3, 4);
+DECLARE_DOESNT_RETURN (signal_simple_error (const char *, Lisp_Object));
+void maybe_signal_simple_error (const char *, Lisp_Object,
Lisp_Object, Error_behavior);
-Lisp_Object signal_simple_continuable_error (CONST char *, Lisp_Object);
-Lisp_Object maybe_signal_simple_continuable_error (CONST char *, Lisp_Object,
+Lisp_Object signal_simple_continuable_error (const char *, Lisp_Object);
+Lisp_Object maybe_signal_simple_continuable_error (const char *, Lisp_Object,
Lisp_Object, Error_behavior);
DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (error_with_frob
- (Lisp_Object, CONST char *,
+ (Lisp_Object, const char *,
...), 2, 3);
void maybe_error_with_frob (Lisp_Object, Lisp_Object, Error_behavior,
- CONST char *, ...) PRINTF_ARGS (4, 5);
-Lisp_Object continuable_error_with_frob (Lisp_Object, CONST char *,
+ const char *, ...) PRINTF_ARGS (4, 5);
+Lisp_Object continuable_error_with_frob (Lisp_Object, const char *,
...) PRINTF_ARGS (2, 3);
Lisp_Object maybe_continuable_error_with_frob
-(Lisp_Object, Lisp_Object, Error_behavior, CONST char *, ...) PRINTF_ARGS (4, 5);
-DECLARE_DOESNT_RETURN (signal_simple_error_2 (CONST char *,
+(Lisp_Object, Lisp_Object, Error_behavior, const char *, ...) PRINTF_ARGS (4, 5);
+DECLARE_DOESNT_RETURN (signal_simple_error_2 (const char *,
Lisp_Object, Lisp_Object));
-void maybe_signal_simple_error_2 (CONST char *, Lisp_Object, Lisp_Object,
+void maybe_signal_simple_error_2 (const char *, Lisp_Object, Lisp_Object,
Lisp_Object, Error_behavior);
-Lisp_Object signal_simple_continuable_error_2 (CONST char *,
+Lisp_Object signal_simple_continuable_error_2 (const char *,
Lisp_Object, Lisp_Object);
-Lisp_Object maybe_signal_simple_continuable_error_2 (CONST char *, Lisp_Object,
+Lisp_Object maybe_signal_simple_continuable_error_2 (const char *, Lisp_Object,
Lisp_Object, Lisp_Object,
Error_behavior);
DECLARE_DOESNT_RETURN (signal_malformed_list_error (Lisp_Object));
Lisp_Object eval_in_buffer (struct buffer *, Lisp_Object);
Lisp_Object call0_with_handler (Lisp_Object, Lisp_Object);
Lisp_Object call1_with_handler (Lisp_Object, Lisp_Object, Lisp_Object);
-Lisp_Object eval_in_buffer_trapping_errors (CONST char *, struct buffer *,
+Lisp_Object eval_in_buffer_trapping_errors (const char *, struct buffer *,
Lisp_Object);
-Lisp_Object run_hook_trapping_errors (CONST char *, Lisp_Object);
-Lisp_Object safe_run_hook_trapping_errors (CONST char *, Lisp_Object, int);
-Lisp_Object call0_trapping_errors (CONST char *, Lisp_Object);
-Lisp_Object call1_trapping_errors (CONST char *, Lisp_Object, Lisp_Object);
-Lisp_Object call2_trapping_errors (CONST char *,
+Lisp_Object run_hook_trapping_errors (const char *, Lisp_Object);
+Lisp_Object safe_run_hook_trapping_errors (const char *, Lisp_Object, int);
+Lisp_Object call0_trapping_errors (const char *, Lisp_Object);
+Lisp_Object call1_trapping_errors (const char *, Lisp_Object, Lisp_Object);
+Lisp_Object call2_trapping_errors (const char *,
Lisp_Object, Lisp_Object, Lisp_Object);
Lisp_Object call_with_suspended_errors (lisp_fn_t, volatile Lisp_Object, Lisp_Object,
Error_behavior, int, ...);
void do_autoload (Lisp_Object, Lisp_Object);
Lisp_Object un_autoload (Lisp_Object);
void warn_when_safe_lispobj (Lisp_Object, Lisp_Object, Lisp_Object);
-void warn_when_safe (Lisp_Object, Lisp_Object, CONST char *,
+void warn_when_safe (Lisp_Object, Lisp_Object, const char *,
...) PRINTF_ARGS (3, 4);
Lisp_Object, int, int, int, int);
/* Defined in event-Xt.c */
+void enqueue_Xt_dispatch_event (Lisp_Object event);
void signal_special_Xt_user_event (Lisp_Object, Lisp_Object, Lisp_Object);
/* Defined in fileio.c */
void record_auto_save (void);
void force_auto_save_soon (void);
-DECLARE_DOESNT_RETURN (report_file_error (CONST char *, Lisp_Object));
-void maybe_report_file_error (CONST char *, Lisp_Object,
+DECLARE_DOESNT_RETURN (report_file_error (const char *, Lisp_Object));
+void maybe_report_file_error (const char *, Lisp_Object,
Lisp_Object, Error_behavior);
-DECLARE_DOESNT_RETURN (signal_file_error (CONST char *, Lisp_Object));
-void maybe_signal_file_error (CONST char *, Lisp_Object,
+DECLARE_DOESNT_RETURN (signal_file_error (const char *, Lisp_Object));
+void maybe_signal_file_error (const char *, Lisp_Object,
Lisp_Object, Error_behavior);
-DECLARE_DOESNT_RETURN (signal_double_file_error (CONST char *, CONST char *,
+DECLARE_DOESNT_RETURN (signal_double_file_error (const char *, const char *,
Lisp_Object));
-void maybe_signal_double_file_error (CONST char *, CONST char *,
+void maybe_signal_double_file_error (const char *, const char *,
Lisp_Object, Lisp_Object, Error_behavior);
-DECLARE_DOESNT_RETURN (signal_double_file_error_2 (CONST char *, CONST char *,
+DECLARE_DOESNT_RETURN (signal_double_file_error_2 (const char *, const char *,
Lisp_Object, Lisp_Object));
-void maybe_signal_double_file_error_2 (CONST char *, CONST char *,
+void maybe_signal_double_file_error_2 (const char *, const char *,
Lisp_Object, Lisp_Object, Lisp_Object,
Error_behavior);
Lisp_Object lisp_strerror (int);
Lisp_Object expand_and_dir_to_file (Lisp_Object, Lisp_Object);
ssize_t read_allowing_quit (int, void *, size_t);
-ssize_t write_allowing_quit (int, CONST 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 vconcat3 (Lisp_Object, Lisp_Object, Lisp_Object);
Lisp_Object nconc2 (Lisp_Object, Lisp_Object);
Lisp_Object bytecode_nconc2 (Lisp_Object *);
-void check_losing_bytecode (CONST char *, Lisp_Object);
+void check_losing_bytecode (const char *, Lisp_Object);
/* Defined in getloadavg.c */
int getloadavg (double[], int);
void close_load_descs (void);
int locate_file (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object *, int);
EXFUN (Flocate_file_clear_hashing, 1);
-int isfloat_string (CONST char *);
+int isfloat_string (const char *);
/* Well, I've decided to enable this. -- ben */
/* And I've decided to make it work right. -- sb */
/* Defined in minibuf.c */
extern int minibuf_level;
-Charcount scmp_1 (CONST Bufbyte *, CONST Bufbyte *, Charcount, int);
+Charcount scmp_1 (const Bufbyte *, const Bufbyte *, Charcount, int);
#define scmp(s1, s2, len) scmp_1 (s1, s2, len, completion_ignore_case)
extern int completion_ignore_case;
-int regexp_ignore_completion_p (CONST Bufbyte *, Lisp_Object,
+int regexp_ignore_completion_p (const Bufbyte *, Lisp_Object,
Bytecount, Bytecount);
Lisp_Object clear_echo_area (struct frame *, Lisp_Object, int);
Lisp_Object clear_echo_area_from_print (struct frame *, Lisp_Object, int);
-void echo_area_append (struct frame *, CONST Bufbyte *, Lisp_Object,
+void echo_area_append (struct frame *, const Bufbyte *, Lisp_Object,
Bytecount, Bytecount, Lisp_Object);
-void echo_area_message (struct frame *, CONST Bufbyte *, Lisp_Object,
+void echo_area_message (struct frame *, const Bufbyte *, Lisp_Object,
Bytecount, Bytecount, Lisp_Object);
Lisp_Object echo_area_status (struct frame *);
int echo_area_active (struct frame *);
Lisp_Object echo_area_contents (struct frame *);
-void message_internal (CONST Bufbyte *, Lisp_Object, Bytecount, Bytecount);
-void message_append_internal (CONST Bufbyte *, Lisp_Object,
+void message_internal (const Bufbyte *, Lisp_Object, Bytecount, Bytecount);
+void message_append_internal (const Bufbyte *, Lisp_Object,
Bytecount, Bytecount);
-void message (CONST char *, ...) PRINTF_ARGS (1, 2);
-void message_append (CONST char *, ...) PRINTF_ARGS (1, 2);
-void message_no_translate (CONST char *, ...) PRINTF_ARGS (1, 2);
+void message (const char *, ...) PRINTF_ARGS (1, 2);
+void message_append (const char *, ...) PRINTF_ARGS (1, 2);
+void message_no_translate (const char *, ...) PRINTF_ARGS (1, 2);
void clear_message (void);
/* Defined in print.c */
void write_string_to_stdio_stream (FILE *, struct console *,
- CONST Bufbyte *, Bytecount, Bytecount,
- Lisp_Object);
+ const Bufbyte *, Bytecount, Bytecount,
+ Lisp_Object, int);
void debug_print (Lisp_Object);
void debug_short_backtrace (int);
void temp_output_buffer_setup (Lisp_Object);
/* NOTE: Do not call this with the data of a Lisp_String. Use princ.
* Note: stream should be defaulted before calling
* (eg Qnil means stdout, not Vstandard_output, etc) */
-void write_c_string (CONST char *, Lisp_Object);
+void write_c_string (const char *, Lisp_Object);
/* Same goes for this function. */
-void write_string_1 (CONST Bufbyte *, Bytecount, Lisp_Object);
+void write_string_1 (const Bufbyte *, Bytecount, Lisp_Object);
void print_cons (Lisp_Object, Lisp_Object, int);
void print_vector (Lisp_Object, Lisp_Object, int);
void print_string (Lisp_Object, Lisp_Object, 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);
-Bytecount fast_string_match (Lisp_Object, CONST Bufbyte *,
+Bytecount fast_string_match (Lisp_Object, const Bufbyte *,
Lisp_Object, Bytecount,
Bytecount, int, Error_behavior, int);
Bytecount fast_lisp_string_match (Lisp_Object, Lisp_Object);
Error_behavior, int, Lisp_Object);
/* Defined in symbols.c */
-int hash_string (CONST Bufbyte *, Bytecount);
-Lisp_Object intern (CONST char *);
-Lisp_Object oblookup (Lisp_Object, CONST Bufbyte *, Bytecount);
+int hash_string (const Bufbyte *, Bytecount);
+Lisp_Object intern (const char *);
+Lisp_Object oblookup (Lisp_Object, const Bufbyte *, Bytecount);
void map_obarray (Lisp_Object, int (*) (Lisp_Object, void *), void *);
Lisp_Object indirect_function (Lisp_Object, int);
Lisp_Object symbol_value_in_buffer (Lisp_Object, Lisp_Object);
#endif
/* Defined in vm-limit.c */
-void memory_warnings (void *, void (*) (CONST char *));
+void memory_warnings (void *, void (*) (const char *));
/* Defined in window.c */
Lisp_Object save_window_excursion_unwind (Lisp_Object);
EXFUN (Fchar_after, 2);
EXFUN (Fchar_to_string, 1);
EXFUN (Fcheck_valid_plist, 1);
+EXFUN (Fvalid_plist_p, 1);
EXFUN (Fclear_range_table, 1);
EXFUN (Fcoding_category_list, 0);
EXFUN (Fcoding_category_system, 1);
EXFUN (Freally_free, 1);
EXFUN (Frem, 2);
EXFUN (Fremassq, 2);
+EXFUN (Freplace_list, 2);
EXFUN (Fselected_frame, 1);
EXFUN (Fset, 2);
EXFUN (Fset_coding_category_system, 2);
extern Lisp_Object Qcrlf, Qctext, Qcurrent_menubar, Qctext, Qcursor;
extern Lisp_Object Qcyclic_variable_indirection, Qdata, Qdead, Qdecode;
extern Lisp_Object Qdefault, Qdefun, Qdelete, Qdelq, Qdevice, Qdevice_live_p;
+extern Lisp_Object Qdialog;
extern Lisp_Object Qdim, Qdimension, Qdisabled, Qdisplay, Qdisplay_table;
extern Lisp_Object Qdoc_string, Qdomain_error, Qduplex, Qdynarr_overhead;
extern Lisp_Object Qempty, Qencode, Qend_of_buffer, Qend_of_file, Qend_open;
extern Lisp_Object Qfile_name, Qfile_error;
extern Lisp_Object Qfont, Qforce_g0_on_output, Qforce_g1_on_output;
extern Lisp_Object Qforce_g2_on_output, Qforce_g3_on_output, Qforeground;
-extern Lisp_Object Qformat, Qframe, Qframe_live_p, Qfunction, Qgap_overhead;
-extern Lisp_Object Qgeneric, Qgeometry, Qglobal, Qheight;
+extern Lisp_Object Qformat, Qframe, Qframe_live_p, Qfuncall, Qfunction;
+extern Lisp_Object Qgap_overhead, Qgeneric, Qgeometry, Qglobal, Qheight;
extern Lisp_Object 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 Qinteger_or_marker_p, Qintegerp, Qinteractive, Qinternal;
extern Lisp_Object Qinvalid_function, Qinvalid_read_syntax, Qio_error;
extern Lisp_Object Qiso2022, Qkey, Qkey_assoc, Qkeyboard, Qkeymap;
-extern Lisp_Object Qlambda, Qlayout, Qlandscape, Qleft, Qleft_margin, Qlf;
+extern Lisp_Object Qlambda, Qlast_command, Qlayout, Qlandscape;
+extern Lisp_Object Qleft, Qleft_margin, Qlet, Qlf;
extern Lisp_Object Qlist, Qlistp, Qload, Qlock_shift, Qmacro, Qmagic;
extern Lisp_Object Qmakunbound, Qmalformed_list, Qmalformed_property_list;
extern Lisp_Object Qmalloc_overhead, Qmark, Qmarkers;
+extern Lisp_Object Qmenubar;
extern Lisp_Object Qmax, Qmemory, Qmessage, Qminus, Qmnemonic, Qmodifiers;
extern Lisp_Object Qmono_pixmap_image_instance_p, Qmotion;
extern Lisp_Object Qmouse_leave_buffer_hook, Qmsprinter, Qmswindows;
extern Lisp_Object Qorientation, Qoutput_charset_conversion;
extern Lisp_Object Qoverflow_error, Qpoint, Qpointer, Qpointer_glyph_p;
extern Lisp_Object Qpointer_image_instance_p, Qportrait, Qpost_read_conversion;
-extern Lisp_Object Qpre_write_conversion, Qprint, Qprint_length;
+extern Lisp_Object Qpre_write_conversion, Qprint, Qprinter, Qprint_length;
extern Lisp_Object Qprint_string_length, Qprocess, Qprogn, Qprovide, Qquit;
extern Lisp_Object Qquote, Qrange_error, Qrassoc, Qrassq, Qread_char;
extern Lisp_Object Qread_from_minibuffer, Qreally_early_error_handler;
extern Lisp_Object Qspecifier, Qstandard_input, Qstandard_output, Qstart_open;
extern Lisp_Object Qstream, Qstring, Qstring_lessp, Qsubwindow;
extern Lisp_Object Qsubwindow_image_instance_p;
-extern Lisp_Object Qsymbol, Qsyntax, Qt, Qterminal, Qtest;
-extern Lisp_Object Qtext, Qtext_image_instance_p, Qtimeout, Qtimestamp;
+extern Lisp_Object Qsymbol, Qsyntax, Qt, Qterminal, Qtest, Qtext;
+extern Lisp_Object Qtext_image_instance_p, Qthis_command, Qtimeout, Qtimestamp;
extern Lisp_Object Qtoolbar, Qtop, Qtop_margin, Qtop_level;
extern Lisp_Object Qtrue_list_p, Qtty, Qtype;
extern Lisp_Object Qunbound, Qundecided, Qundefined, Qunderflow_error;
\f
static DOESNT_RETURN
-syntax_error (CONST char *string)
+syntax_error (const char *string)
{
signal_error (Qinvalid_read_syntax,
list1 (build_translated_string (string)));
}
static Lisp_Object
-continuable_syntax_error (CONST char *string)
+continuable_syntax_error (const char *string)
{
return Fsignal (Qinvalid_read_syntax,
list1 (build_translated_string (string)));
#ifdef DEBUG_XEMACS /* testing Mule */
static int testing_mule = 0; /* Change via debugger */
if (testing_mule) {
- if (c >= 0x20 && c <= 0x7E) fprintf (stderr, "%c", c);
- else if (c == '\n') fprintf (stderr, "\\n\n");
- else fprintf (stderr, "\\%o ", c);
+ if (c >= 0x20 && c <= 0x7E) stderr_out ("%c", c);
+ else if (c == '\n') stderr_out ("\\n\n");
+ else stderr_out ("\\%o ", c);
}
#endif
return c;
{
/* Lisp_Object's must be malloc'ed, not stack-allocated */
Lisp_Object lispstream = Qnil;
- CONST int block_size = 8192;
+ const int block_size = 8192;
struct gcpro ngcpro1;
NGCPRO1 (lispstream);
else
{
/* Case c) */
- CONST char *nsuffix = (CONST char *) XSTRING_DATA (suffixes);
+ const char *nsuffix = (const char *) XSTRING_DATA (suffixes);
while (1)
{
char *esuffix = (char *) strchr (nsuffix, ':');
- int lsuffix = ((esuffix) ? (esuffix - nsuffix) : strlen (nsuffix));
+ int lsuffix = esuffix ? esuffix - nsuffix : strlen (nsuffix);
/* Concatenate path element/specified name with the suffix. */
strncpy (fn + fn_len, nsuffix, lsuffix);
return Lstream_byte_count (XLSTREAM (Vread_buffer_stream)) - 1;
}
-static Lisp_Object parse_integer (CONST Bufbyte *buf, Bytecount len, int base);
+static Lisp_Object parse_integer (const Bufbyte *buf, Bytecount len, int base);
static Lisp_Object
read_atom (Lisp_Object readcharfun,
static Lisp_Object
-parse_integer (CONST Bufbyte *buf, Bytecount len, int base)
+parse_integer (const Bufbyte *buf, Bytecount len, int base)
{
- CONST Bufbyte *lim = buf + len;
- CONST Bufbyte *p = buf;
+ const Bufbyte *lim = buf + len;
+ const Bufbyte *p = buf;
EMACS_UINT num = 0;
int negativland = 0;
#define EXP_INT 16
int
-isfloat_string (CONST char *cp)
+isfloat_string (const char *cp)
{
int state = 0;
- CONST Bufbyte *ucp = (CONST Bufbyte *) cp;
+ const Bufbyte *ucp = (const Bufbyte *) cp;
if (*ucp == '+' || *ucp == '-')
ucp++;
/* The "lrecord" type of Lisp object is used for all object types
other than a few simple ones. This allows many types to be
- implemented but only a few bits required in a Lisp object for
- type information. (The tradeoff is that each object has its
- type marked in it, thereby increasing its size.) The first
- four bytes of all lrecords is either a pointer to a struct
- lrecord_implementation, which contains methods describing how
- to process this object, or an index into an array of pointers
- to struct lrecord_implementations plus some other data bits.
+ implemented but only a few bits required in a Lisp object for type
+ information. (The tradeoff is that each object has its type marked
+ in it, thereby increasing its size.) All lrecords begin with a
+ `struct lrecord_header', which identifies the lisp object type, by
+ providing an index into a table of `struct lrecord_implementation',
+ which describes the behavior of the lisp object. It also contains
+ some other data bits.
Lrecords are of two types: straight lrecords, and lcrecords.
Straight lrecords are used for those types of objects that have
the lrecord_implementation for the object. There are special
routines in alloc.c to deal with each such object type.
- Lcrecords are used for less common sorts of objects that don't
- do their own allocation. Each such object is malloc()ed
- individually, and the objects are chained together through
- a `next' pointer. Lcrecords have a `struct lcrecord_header'
- at the top, which contains a `struct lrecord_header' and
- a `next' pointer, and are allocated using alloc_lcrecord().
+ Lcrecords are used for less common sorts of objects that don't do
+ their own allocation. Each such object is malloc()ed individually,
+ and the objects are chained together through a `next' pointer.
+ Lcrecords have a `struct lcrecord_header' at the top, which
+ contains a `struct lrecord_header' and a `next' pointer, and are
+ allocated using alloc_lcrecord().
Creating a new lcrecord type is fairly easy; just follow the
lead of some existing type (e.g. hash tables). Note that you
struct lrecord_header
{
/* index into lrecord_implementations_table[] */
- unsigned type :8;
- /* 1 if the object is marked during GC. */
- unsigned mark :1;
- /* 1 if the object resides in read-only space */
- unsigned c_readonly : 1;
+ unsigned int type :8;
+
+ /* If `mark' is 0 after the GC mark phase, the object will be freed
+ during the GC sweep phase. There are 2 ways that `mark' can be 1:
+ - by being referenced from other objects during the GC mark phase
+ - because it is permanently on, for c_readonly objects */
+ unsigned int mark :1;
+
+ /* 1 if the object resides in logically read-only space, and does not
+ reference other non-c_readonly objects.
+ Invariant: if (c_readonly == 1), then (mark == 1 && lisp_readonly == 1) */
+ unsigned int c_readonly :1;
+
/* 1 if the object is readonly from lisp */
- unsigned lisp_readonly : 1;
+ unsigned int lisp_readonly :1;
};
struct lrecord_implementation;
-int lrecord_type_index (CONST struct lrecord_implementation *implementation);
+int lrecord_type_index (const struct lrecord_implementation *implementation);
#define set_lheader_implementation(header,imp) do { \
struct lrecord_header* SLI_header = (header); \
- SLI_header->type = lrecord_type_index (imp); \
+ SLI_header->type = (imp)->lrecord_type_index; \
SLI_header->mark = 0; \
SLI_header->c_readonly = 0; \
SLI_header->lisp_readonly = 0; \
{
struct lrecord_header lheader;
- /* The `next' field is normally used to chain all lrecords together
+ /* The `next' field is normally used to chain all lcrecords together
so that the GC can find (and free) all of them.
- `alloc_lcrecord' threads records together.
+ `alloc_lcrecord' threads lcrecords together.
The `next' field may be used for other purposes as long as some
other mechanism is provided for letting the GC do its work.
Lisp_Object chain;
};
-/* see alloc.c for an explanation */
-Lisp_Object this_one_is_unmarkable (Lisp_Object obj);
+enum lrecord_type
+{
+ /* Symbol value magic types come first to make SYMBOL_VALUE_MAGIC_P fast.
+ #### This should be replaced by a symbol_value_magic_p flag
+ in the Lisp_Symbol lrecord_header. */
+ lrecord_type_symbol_value_forward,
+ lrecord_type_symbol_value_varalias,
+ lrecord_type_symbol_value_lisp_magic,
+ lrecord_type_symbol_value_buffer_local,
+ lrecord_type_max_symbol_value_magic = lrecord_type_symbol_value_buffer_local,
+
+ lrecord_type_symbol,
+ lrecord_type_subr,
+ lrecord_type_cons,
+ lrecord_type_vector,
+ lrecord_type_string,
+ lrecord_type_lcrecord_list,
+ lrecord_type_compiled_function,
+ lrecord_type_weak_list,
+ lrecord_type_bit_vector,
+ lrecord_type_float,
+ lrecord_type_hash_table,
+ lrecord_type_lstream,
+ lrecord_type_process,
+ lrecord_type_charset,
+ lrecord_type_coding_system,
+ lrecord_type_char_table,
+ lrecord_type_char_table_entry,
+ lrecord_type_char_code_table,
+ lrecord_type_char_byte_table,
+ lrecord_type_range_table,
+ lrecord_type_opaque,
+ lrecord_type_opaque_ptr,
+ lrecord_type_buffer,
+ lrecord_type_extent,
+ lrecord_type_extent_info,
+ lrecord_type_extent_auxiliary,
+ lrecord_type_marker,
+ lrecord_type_event,
+ lrecord_type_keymap,
+ lrecord_type_command_builder,
+ lrecord_type_timeout,
+ lrecord_type_specifier,
+ lrecord_type_console,
+ lrecord_type_device,
+ lrecord_type_frame,
+ lrecord_type_window,
+ lrecord_type_window_configuration,
+ lrecord_type_gui_item,
+ lrecord_type_popup_data,
+ lrecord_type_toolbar_button,
+ lrecord_type_color_instance,
+ lrecord_type_font_instance,
+ lrecord_type_image_instance,
+ lrecord_type_glyph,
+ lrecord_type_face,
+ lrecord_type_database,
+ lrecord_type_tooltalk_message,
+ lrecord_type_tooltalk_pattern,
+ lrecord_type_ldap,
+ lrecord_type_pgconn,
+ lrecord_type_pgresult,
+ lrecord_type_count /* must be last */
+};
struct lrecord_implementation
{
- CONST char *name;
- /* This function is called at GC time, to make sure that all Lisp_Objects
+ const char *name;
+
+ /* `marker' is called at GC time, to make sure that all Lisp_Objects
pointed to by this object get properly marked. It should call
the mark_object function on all Lisp_Objects in the object. If
the return value is non-nil, it should be a Lisp_Object to be
with the deepest level of Lisp_Object pointers. This function
can be NULL, meaning no GC marking is necessary. */
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. */
+
+ /* `printer' converts the object to a printed representation.
+ This can be NULL; in this case default_object_printer() will be
+ used instead. */
void (*printer) (Lisp_Object, Lisp_Object printcharfun, int escapeflag);
- /* This function is called at GC time when the object is about to
+
+ /* `finalizer' is called at GC time when the object is about to
be freed, and at dump time (FOR_DISKSAVE will be non-zero in this
case). It should perform any necessary cleanup (e.g. freeing
- malloc()ed memory. This can be NULL, meaning no special
+ malloc()ed memory). This can be NULL, meaning no special
finalization is necessary.
- WARNING: remember that the finalizer is called at dump time even
+ WARNING: remember that `finalizer' is called at dump time even
though the object is not being freed. */
void (*finalizer) (void *header, int for_disksave);
+
/* This can be NULL, meaning compare objects with EQ(). */
int (*equal) (Lisp_Object obj1, Lisp_Object obj2, int depth);
- /* This can be NULL, meaning use the Lisp_Object itself as the hash;
- but *only* if the `equal' function is EQ (if two objects are
- `equal', they *must* hash to the same value or the hashing won't
- work). */
+
+ /* `hash' generates hash values for use with hash tables that have
+ `equal' as their test function. This can be NULL, meaning use
+ the Lisp_Object itself as the hash. But, you must still satisfy
+ the constraint that if two objects are `equal', then they *must*
+ hash to the same value in order for hash tables to work properly.
+ This means that `hash' can be NULL only if the `equal' method is
+ also NULL. */
unsigned long (*hash) (Lisp_Object, int);
/* External data layout description */
const struct lrecord_description *description;
+ /* These functions allow any object type to have builtin property
+ lists that can be manipulated from the lisp level with
+ `get', `put', `remprop', and `object-plist'. */
Lisp_Object (*getprop) (Lisp_Object obj, Lisp_Object prop);
int (*putprop) (Lisp_Object obj, Lisp_Object prop, Lisp_Object val);
int (*remprop) (Lisp_Object obj, Lisp_Object prop);
Lisp_Object (*plist) (Lisp_Object obj);
- /* Only one of these is non-0. If both are 0, it means that this type
- is not instantiable by alloc_lcrecord(). */
+ /* Only one of `static_size' and `size_in_bytes_method' is non-0.
+ If both are 0, this type is not instantiable by alloc_lcrecord(). */
size_t static_size;
- size_t (*size_in_bytes_method) (CONST void *header);
- /* A unique subtag-code (dynamically) assigned to this datatype. */
- /* (This is a pointer so the rest of this structure can be read-only.) */
- int *lrecord_type_index;
+ size_t (*size_in_bytes_method) (const void *header);
+
+ /* The (constant) index into lrecord_implementations_table */
+ enum lrecord_type lrecord_type_index;
+
/* A "basic" lrecord is any lrecord that's not an lcrecord, i.e.
one that does not have an lcrecord_header at the front and which
is (usually) allocated in frob blocks. We only use this flag for
some consistency checking, and that only when error-checking is
enabled. */
- int basic_p;
+ unsigned int basic_p :1;
};
-extern CONST struct lrecord_implementation *lrecord_implementations_table[];
+extern const struct lrecord_implementation *lrecord_implementations_table[];
#define XRECORD_LHEADER_IMPLEMENTATION(obj) \
- (lrecord_implementations_table[XRECORD_LHEADER (obj)->type])
-#define LHEADER_IMPLEMENTATION(lh) (lrecord_implementations_table[(lh)->type])
+ LHEADER_IMPLEMENTATION (XRECORD_LHEADER (obj))
+#define LHEADER_IMPLEMENTATION(lh) lrecord_implementations_table[(lh)->type]
extern int gc_in_progress;
-#define MARKED_RECORD_P(obj) (gc_in_progress && XRECORD_LHEADER (obj)->mark)
+#define MARKED_RECORD_P(obj) (XRECORD_LHEADER (obj)->mark)
#define MARKED_RECORD_HEADER_P(lheader) ((lheader)->mark)
#define MARK_RECORD_HEADER(lheader) ((void) ((lheader)->mark = 1))
#define UNMARK_RECORD_HEADER(lheader) ((void) ((lheader)->mark = 0))
-#define UNMARKABLE_RECORD_HEADER_P(lheader) \
- (LHEADER_IMPLEMENTATION (lheader)->marker == this_one_is_unmarkable)
-
#define C_READONLY_RECORD_HEADER_P(lheader) ((lheader)->c_readonly)
#define LISP_READONLY_RECORD_HEADER_P(lheader) ((lheader)->lisp_readonly)
-#define SET_C_READONLY_RECORD_HEADER(lheader) \
- ((void) ((lheader)->c_readonly = (lheader)->lisp_readonly = 1))
+#define SET_C_READONLY_RECORD_HEADER(lheader) do { \
+ struct lrecord_header *SCRRH_lheader = (lheader); \
+ SCRRH_lheader->c_readonly = 1; \
+ SCRRH_lheader->lisp_readonly = 1; \
+ SCRRH_lheader->mark = 1; \
+} while (0)
#define SET_LISP_READONLY_RECORD_HEADER(lheader) \
((void) ((lheader)->lisp_readonly = 1))
+#define RECORD_MARKER(lheader) lrecord_markers[(lheader)->type]
/* External description stuff
An array of Lisp objects or pointers to lrecords.
The third element is the count.
- XD_LO_RESET_NIL
+ XD_LO_RESET_NIL
Lisp objects which will be reset to Qnil when dumping. Useful for cleaning
up caches.
{ 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
- because this segment is not mapped when processing a core-
- dump file */
-
-#ifdef DEBUG_XEMACS
-#define CONST_IF_NOT_DEBUG
-#else
-#define CONST_IF_NOT_DEBUG CONST
-#endif
-
/* DEFINE_LRECORD_IMPLEMENTATION is for objects with constant size.
DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION is for objects whose size varies.
*/
#define DEFINE_BASIC_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,structtype) \
DEFINE_BASIC_LRECORD_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,0,0,0,0,structtype)
-#define DEFINE_BASIC_LRECORD_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,props,structtype) \
-MAKE_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,props,sizeof(structtype),0,1,structtype)
+#define DEFINE_BASIC_LRECORD_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,structtype) \
+MAKE_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,sizeof(structtype),0,1,structtype)
#define DEFINE_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,structtype) \
DEFINE_LRECORD_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,0,0,0,0,structtype)
-#define DEFINE_LRECORD_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,props,structtype) \
-MAKE_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,props,sizeof (structtype),0,0,structtype)
+#define DEFINE_LRECORD_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,structtype) \
+MAKE_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,sizeof (structtype),0,0,structtype)
#define DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,sizer,structtype) \
DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,0,0,0,0,sizer,structtype)
-#define DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,props,sizer,structtype) \
-MAKE_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,props,0,sizer,0,structtype) \
+#define DEFINE_BASIC_LRECORD_SEQUENCE_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,sizer,structtype) \
+MAKE_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,0,0,0,0,0,sizer,1,structtype)
+
+#define DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION_WITH_PROPS(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,sizer,structtype) \
+MAKE_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,0,sizer,0,structtype) \
-#define MAKE_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,props,size,sizer,basic_p,structtype) \
+#define MAKE_LRECORD_IMPLEMENTATION(name,c_name,marker,printer,nuker,equal,hash,desc,getprop,putprop,remprop,plist,size,sizer,basic_p,structtype) \
DECLARE_ERROR_CHECK_TYPECHECK(c_name, structtype) \
-static int lrecord_##c_name##_lrecord_type_index; \
-CONST_IF_NOT_DEBUG struct lrecord_implementation lrecord_##c_name = \
+const struct lrecord_implementation lrecord_##c_name = \
{ name, marker, printer, nuker, equal, hash, desc, \
- getprop, putprop, remprop, props, size, sizer, \
- &(lrecord_##c_name##_lrecord_type_index), basic_p } \
+ getprop, putprop, remprop, plist, size, sizer, \
+ lrecord_type_##c_name, basic_p }
+
+extern Lisp_Object (*lrecord_markers[]) (Lisp_Object);
+
+#define INIT_LRECORD_IMPLEMENTATION(type) do { \
+ lrecord_implementations_table[lrecord_type_##type] = &lrecord_##type; \
+ lrecord_markers[lrecord_type_##type] = \
+ lrecord_implementations_table[lrecord_type_##type]->marker; \
+} while (0)
#define LRECORDP(a) (XTYPE (a) == Lisp_Type_Record)
#define XRECORD_LHEADER(a) ((struct lrecord_header *) XPNTR (a))
#define RECORD_TYPEP(x, ty) \
- (LRECORDP (x) && \
- lrecord_implementations_table[XRECORD_LHEADER (x)->type] == (ty))
+ (LRECORDP (x) && XRECORD_LHEADER (x)->type == (ty))
/* NOTE: the DECLARE_LRECORD() must come before the associated
DEFINE_LRECORD_*() or you will get compile errors.
#ifdef ERROR_CHECK_TYPECHECK
# define DECLARE_LRECORD(c_name, structtype) \
-extern CONST_IF_NOT_DEBUG struct lrecord_implementation \
- lrecord_##c_name; \
-INLINE structtype *error_check_##c_name (Lisp_Object obj); \
-INLINE structtype * \
+extern const struct lrecord_implementation lrecord_##c_name; \
+INLINE_HEADER structtype * \
+error_check_##c_name (Lisp_Object obj); \
+INLINE_HEADER structtype * \
error_check_##c_name (Lisp_Object obj) \
{ \
- assert (RECORD_TYPEP (obj, &lrecord_##c_name)); \
+ assert (RECORD_TYPEP (obj, lrecord_type_##c_name)); \
return (structtype *) XPNTR (obj); \
} \
extern Lisp_Object Q##c_name##p
# define DECLARE_NONRECORD(c_name, type_enum, structtype) \
-INLINE structtype *error_check_##c_name (Lisp_Object obj); \
-INLINE structtype * \
+INLINE_HEADER structtype * \
+error_check_##c_name (Lisp_Object obj); \
+INLINE_HEADER structtype * \
error_check_##c_name (Lisp_Object obj) \
{ \
assert (XTYPE (obj) == type_enum); \
# define XSETRECORD(var, p, c_name) do \
{ \
XSETOBJ (var, Lisp_Type_Record, p); \
- assert (RECORD_TYPEP (var, &lrecord_##c_name)); \
+ assert (RECORD_TYPEP (var, lrecord_type_##c_name)); \
} while (0)
#else /* not ERROR_CHECK_TYPECHECK */
# define DECLARE_LRECORD(c_name, structtype) \
extern Lisp_Object Q##c_name##p; \
-extern CONST_IF_NOT_DEBUG struct lrecord_implementation \
- lrecord_##c_name
+extern const struct lrecord_implementation lrecord_##c_name
# define DECLARE_NONRECORD(c_name, type_enum, structtype) \
extern Lisp_Object Q##c_name##p
# define XRECORD(x, c_name, structtype) ((structtype *) XPNTR (x))
#endif /* not ERROR_CHECK_TYPECHECK */
-#define RECORDP(x, c_name) RECORD_TYPEP (x, &lrecord_##c_name)
+#define RECORDP(x, c_name) RECORD_TYPEP (x, lrecord_type_##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
way out and disabled returning from a signal entirely. */
#define CONCHECK_RECORD(x, c_name) do { \
- if (!RECORD_TYPEP (x, &lrecord_##c_name)) \
+ if (!RECORD_TYPEP (x, lrecord_type_##c_name)) \
x = wrong_type_argument (Q##c_name##p, x); \
} while (0)
#define CONCHECK_NONRECORD(x, lisp_enum, predicate) do {\
x = wrong_type_argument (predicate, x); \
} while (0)
#define CHECK_RECORD(x, c_name) do { \
- if (!RECORD_TYPEP (x, &lrecord_##c_name)) \
+ if (!RECORD_TYPEP (x, lrecord_type_##c_name)) \
dead_wrong_type_argument (Q##c_name##p, x); \
} while (0)
#define CHECK_NONRECORD(x, lisp_enum, predicate) do { \
dead_wrong_type_argument (predicate, x); \
} while (0)
-void *alloc_lcrecord (size_t size, CONST struct lrecord_implementation *);
+void *alloc_lcrecord (size_t size, const struct lrecord_implementation *);
#define alloc_lcrecord_type(type, lrecord_implementation) \
((type *) alloc_lcrecord (sizeof (type), lrecord_implementation))
/* Functions are as follows:
-Lstream *Lstream_new (Lstream_implementation *imp, CONST char *mode)
+Lstream *Lstream_new (Lstream_implementation *imp, const char *mode)
Allocate and return a new Lstream. This function is not
really meant to be called directly; rather, each stream type
should provide its own stream creation function, which
}
static size_t
-sizeof_lstream (CONST void *header)
+sizeof_lstream (const void *header)
{
- CONST Lstream *lstr = (CONST Lstream *) header;
+ const Lstream *lstr = (const Lstream *) header;
return sizeof (*lstr) + lstr->imp->size - 1;
}
}
}
-static CONST Lstream_implementation *lstream_types[32];
+static const Lstream_implementation *lstream_types[32];
static Lisp_Object Vlstream_free_list[32];
static int lstream_type_count;
Lstream *
-Lstream_new (CONST Lstream_implementation *imp, CONST char *mode)
+Lstream_new (const Lstream_implementation *imp, const char *mode)
{
Lstream *p;
int i;
#define Lstream_internal_error(reason, lstr) \
Lstream_signal_simple_error ("Internal error: " reason, lstr)
-static void Lstream_signal_simple_error (CONST char *reason, Lstream *lstr)
+static void Lstream_signal_simple_error (const char *reason, Lstream *lstr)
{
Lisp_Object obj;
XSETLSTREAM (obj, lstr);
character at the end. We need to spit back that
incomplete character. */
{
- CONST unsigned char *data = lstr->out_buffer;
- CONST unsigned char *dataend = data + size - 1;
+ const unsigned char *data = lstr->out_buffer;
+ const unsigned char *dataend = data + size - 1;
assert (size > 0); /* safety check ... */
/* Optimize the most common case. */
if (!BYTE_ASCII_P (*dataend))
/* Like Lstream_write(), but does not handle line-buffering correctly. */
static ssize_t
-Lstream_write_1 (Lstream *lstr, CONST void *data, size_t size)
+Lstream_write_1 (Lstream *lstr, const void *data, size_t size)
{
- CONST unsigned char *p = (CONST unsigned char *) data;
+ const unsigned char *p = (const unsigned char *) data;
ssize_t off = 0;
if (! (lstr->flags & LSTREAM_FL_IS_OPEN))
Lstream_internal_error ("lstream not open", lstr);
line buffering. Returns number of bytes written. */
ssize_t
-Lstream_write (Lstream *lstr, CONST void *data, size_t size)
+Lstream_write (Lstream *lstr, const void *data, size_t size)
{
size_t i;
- CONST unsigned char *p = (CONST unsigned char *) data;
+ const unsigned char *p = (const unsigned char *) data;
if (size == 0)
return size;
/* It's quite possible for us to get passed an incomplete
character at the end. We need to spit back that
incomplete character. */
- CONST unsigned char *dataend = p + off - 1;
+ const unsigned char *dataend = p + off - 1;
/* Optimize the most common case. */
if (!BYTE_ASCII_P (*dataend))
{
}
void
-Lstream_unread (Lstream *lstr, CONST void *data, size_t size)
+Lstream_unread (Lstream *lstr, const void *data, size_t size)
{
- CONST unsigned char *p = (CONST 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,
sizeof (struct stdio_stream));
static Lisp_Object
-make_stdio_stream_1 (FILE *stream, int flags, CONST char *mode)
+make_stdio_stream_1 (FILE *stream, int flags, const char *mode)
{
Lisp_Object obj;
Lstream *lstr = Lstream_new (lstream_stdio, mode);
}
static ssize_t
-stdio_writer (Lstream *stream, CONST unsigned char *data, size_t size)
+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);
ignored when writing); -1 for unlimited. */
static Lisp_Object
make_filedesc_stream_1 (int filedesc, int offset, int count, int flags,
- CONST char *mode)
+ const char *mode)
{
Lisp_Object obj;
Lstream *lstr = Lstream_new (lstream_filedesc, mode);
}
static ssize_t
-filedesc_writer (Lstream *stream, CONST unsigned char *data, size_t size)
+filedesc_writer (Lstream *stream, const unsigned char *data, size_t size)
{
struct filedesc_stream *str = FILEDESC_STREAM_DATA (stream);
ssize_t retval;
if (str->pty_flushing)
{
/* To make life easy, only send out one line at the most. */
- CONST unsigned char *ptr;
+ const unsigned char *ptr;
- ptr = (CONST unsigned char *) memchr (data, '\n', size);
+ ptr = (const unsigned char *) memchr (data, '\n', size);
if (ptr)
need_newline = 1;
else
struct fixed_buffer_stream
{
- CONST unsigned char *inbuf;
+ const unsigned char *inbuf;
unsigned char *outbuf;
size_t size;
size_t offset;
sizeof (struct fixed_buffer_stream));
Lisp_Object
-make_fixed_buffer_input_stream (CONST void *buf, size_t size)
+make_fixed_buffer_input_stream (const void *buf, size_t size)
{
Lisp_Object obj;
Lstream *lstr = Lstream_new (lstream_fixed_buffer, "r");
}
static ssize_t
-fixed_buffer_writer (Lstream *stream, CONST unsigned char *data, size_t size)
+fixed_buffer_writer (Lstream *stream, const unsigned char *data, size_t size)
{
struct fixed_buffer_stream *str = FIXED_BUFFER_STREAM_DATA (stream);
if (str->offset == str->size)
return 0;
}
-CONST unsigned char *
+const unsigned char *
fixed_buffer_input_stream_ptr (Lstream *stream)
{
assert (stream->imp == lstream_fixed_buffer);
}
static ssize_t
-resizing_buffer_writer (Lstream *stream, CONST unsigned char *data, size_t size)
+resizing_buffer_writer (Lstream *stream, const unsigned char *data, size_t size)
{
struct resizing_buffer_stream *str = RESIZING_BUFFER_STREAM_DATA (stream);
DO_REALLOC (str->buf, str->allocked, str->stored + size, unsigned char);
}
static ssize_t
-dynarr_writer (Lstream *stream, CONST unsigned char *data, size_t size)
+dynarr_writer (Lstream *stream, const unsigned char *data, size_t size)
{
struct dynarr_stream *str = DYNARR_STREAM_DATA (stream);
Dynarr_add_many (str->dyn, data, size);
static Lisp_Object
make_lisp_buffer_stream_1 (struct buffer *buf, Bufpos start, Bufpos end,
- int flags, CONST char *mode)
+ int flags, const char *mode)
{
Lisp_Object obj;
Lstream *lstr;
}
static ssize_t
-lisp_buffer_writer (Lstream *stream, CONST unsigned char *data, size_t size)
+lisp_buffer_writer (Lstream *stream, const unsigned char *data, size_t size)
{
struct lisp_buffer_stream *str = LISP_BUFFER_STREAM_DATA (stream);
Bufpos pos;
void
vars_of_lstream (void)
{
+ INIT_LRECORD_IMPLEMENTATION (lstream);
+
reinit_vars_of_lstream ();
}
typedef struct lstream_implementation
{
- CONST char *name;
+ const char *name;
size_t size; /* Number of additional bytes to be allocated with this
stream. Access this data using Lstream_data(). */
/* Read some data from the stream's end and store it into DATA, which
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. */
- ssize_t (*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 */
struct lstream
{
struct lcrecord_header header;
- CONST Lstream_implementation *imp; /* methods for this stream */
+ const Lstream_implementation *imp; /* methods for this stream */
Lstream_buffering buffering; /* type of buffering in use */
size_t buffering_size; /* number of bytes buffered */
((lstr)->imp == lstream_##type)
#ifdef ERROR_CHECK_TYPECHECK
-INLINE struct lstream *
+INLINE_HEADER struct lstream *
error_check_lstream_type (struct lstream *stream,
- CONST Lstream_implementation *imp);
-INLINE struct lstream *
+ const Lstream_implementation *imp);
+INLINE_HEADER struct lstream *
error_check_lstream_type (struct lstream *stream,
- CONST Lstream_implementation *imp)
+ const Lstream_implementation *imp)
{
assert (stream->imp == imp);
return stream;
(lstream_##type->m = type##_##m)
-Lstream *Lstream_new (CONST Lstream_implementation *imp,
- CONST char *mode);
+Lstream *Lstream_new (const Lstream_implementation *imp,
+ const char *mode);
void Lstream_reopen (Lstream *lstr);
void Lstream_set_buffering (Lstream *lstr, Lstream_buffering buffering,
int buffering_size);
int Lstream_fgetc (Lstream *lstr);
void Lstream_fungetc (Lstream *lstr, int c);
ssize_t Lstream_read (Lstream *lstr, void *data, size_t size);
-ssize_t Lstream_write (Lstream *lstr, CONST 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);
+void Lstream_unread (Lstream *lstr, const void *data, size_t size);
int Lstream_rewind (Lstream *lstr);
int Lstream_seekable_p (Lstream *lstr);
int Lstream_close (Lstream *lstr);
#include "character.h"
#endif
-INLINE Emchar Lstream_get_emchar (Lstream *stream);
-INLINE Emchar
+INLINE_HEADER Emchar Lstream_get_emchar (Lstream *stream);
+INLINE_HEADER Emchar
Lstream_get_emchar (Lstream *stream)
{
int c = Lstream_getc (stream);
Lstream_get_emchar_1 (stream, c);
}
-INLINE int Lstream_put_emchar (Lstream *stream, Emchar ch);
-INLINE int
+INLINE_HEADER int Lstream_put_emchar (Lstream *stream, Emchar ch);
+INLINE_HEADER int
Lstream_put_emchar (Lstream *stream, Emchar ch)
{
return CHAR_ASCII_P (ch) ?
Lstream_fput_emchar (stream, ch);
}
-INLINE void Lstream_unget_emchar (Lstream *stream, Emchar ch);
-INLINE void
+INLINE_HEADER void Lstream_unget_emchar (Lstream *stream, Emchar ch);
+INLINE_HEADER void
Lstream_unget_emchar (Lstream *stream, Emchar ch)
{
if (CHAR_ASCII_P (ch))
Lisp_Object make_lisp_string_input_stream (Lisp_Object string,
Bytecount offset,
Bytecount len);
-Lisp_Object make_fixed_buffer_input_stream (CONST void *buf, size_t size);
+Lisp_Object make_fixed_buffer_input_stream (const void *buf, size_t size);
Lisp_Object make_fixed_buffer_output_stream (void *buf, size_t size);
-CONST unsigned char *fixed_buffer_input_stream_ptr (Lstream *stream);
+const unsigned char *fixed_buffer_input_stream_ptr (Lstream *stream);
unsigned char *fixed_buffer_output_stream_ptr (Lstream *stream);
Lisp_Object make_resizing_buffer_output_stream (void);
unsigned char *resizing_buffer_stream_ptr (Lstream *stream);
operating system this machine is likely to run.
USUAL-OPSYS="usg5-2-2" */
-/* XINT must explicitly sign-extend */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
vax, m68000, ns16000 are the ones defined so far. */
/* Synched up with: FSF 19.31. */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#undef WORD_MACHINE
-
-/* Define how to take a char and sign-extend into an int.
- On machines where char is signed, this is a no-op. */
-
-/* ARM note - The RISCiX Norcroft C Compiler has ALL
- non-32-bit types as unsigned */
-
-#define SIGN_EXTEND_CHAR(c) (((int)(c) << 24) >> 24)
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
/* ARM note - this is done by the Norcroft compiler - symbol is `__arm' */
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
#ifdef LDAV_SYMBOL
#undef LDAV_SYMBOL
#endif
operating system this machine is likely to run.
USUAL-OPSYS="bsd4-3" */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#undef WORD_MACHINE
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
vax, m68000, ns16000, pyramid, orion, tahoe and APOLLO
#define sun /* Use X support for Sun keyboard stuff. */
#define C_OPTIMIZE_SWITCH "-Og" /* No concurrent code allowed here. */
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-/* On Alliants, bitfields are unsigned. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Concentrix uses a different kernel symbol for load average. */
#undef LDAV_SYMBOL /* Undo definition in s-bsd4-2.h */
operating system this machine is likely to run.
USUAL-OPSYS="bsd4-2" */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#undef WORD_MACHINE
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
vax, m68000, ns16000, pyramid, orion, tahoe and APOLLO
#define ALLIANT
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-/* On Alliants, bitfields are unsigned. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* No load average information available for Alliants. */
#undef LOAD_AVE_TYPE
operating system this machine is likely to run.
USUAL-OPSYS="usg5-2" */
-#define EXPLICIT_SIGN_EXTEND
-
#define LIB_STANDARD "-lc"
#ifdef __GNUC__
compiler is so brain damaged that it is not even worth trying to use it.
*/
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#define WORD_MACHINE /* not actually used anywhere yet! */
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
vax, m68000, ns16000, pyramid, orion, tahoe and APOLLO
/* However for clarity define amdahl_uts */
#define amdahl_uts
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
/* #define LOAD_AVE_TYPE long*/
/* Synched up with: FSF 19.31. */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#undef WORD_MACHINE
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
#endif /* USG */
-#ifdef USG5_4
-#define DATA_SEG_BITS 0x08000000
-#endif
-
#ifdef MSDOS
#define NO_REMAP
#endif
#define SEGMENT_MASK ((SEGMENT_SIZE)-1)
#endif
-#if 0
-#ifdef __GNUC__
-/* GCC's alloca() is semi-broken. See lisp.h.
-
- This brokenness has been confirmed under both Linux and NetBSD.
- It may also exist on non-Intel architectures. */
-#define BROKEN_ALLOCA_IN_FUNCTION_CALLS
-#endif
-#endif
-
-
/* XEmacs change: John Hughes <john@AtlanTech.COM> says using vfork
under i386-unknown-sysv4.2 makes C-g sometimes cause a SIGSEGV
in TTY mode; the problem goes away if you use fork */
operating system this machine is likely to run.
USUAL-OPSYS="usg5-2-2" */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-/* #define WORD_MACHINE */
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically */
#define ATT3B
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
/* #define LOAD_AVE_TYPE long */
/* Synched up with: FSF 19.31. */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#define WORD_MACHINE
-
-/* Define DATA_SEG_BITS if pointers need to be corrected with
- a segment field. */
-
-#ifdef FIX_ADDRESS
-#define DATA_SEG_BITS 0xef000000
-#endif
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
/*#define m88k*/
/*#endif*/
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
/* #define LOAD_AVE_TYPE long */
operating system this machine is likely to run.
USUAL-OPSYS="bsd4-2" */
-/* XINT must explicitly sign extend */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* celerity preprocessor defines "accel", however the following is clearer */
#define celerity
/* Synched up with: FSF 19.31. */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-/* #define WORD_MACHINE */
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically */
#define DOT_GLOBAL_START
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-/* #define EXPLICIT_SIGN_EXTEND */
-
/* USG systems I know of running on Vaxes do not actually
support the load average, so disable it for them. */
/* Synched up with: FSF 19.31. */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-/* #define WORD_MACHINE */
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically. */
#define m68000
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem.
These are commented out since it is not supported by this machine. */
operating system this machine is likely to run.
USUAL-OPSYS="bsd4-3" */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-/* #define WORD_MACHINE */
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically. */
#ifndef convex /* The compiler doesn't always do this. */
/* #define NO_REMAP */
\f
-/* Addresses on the Convex have the high bit set. */
-#define DATA_SEG_BITS (1 << (INTBITS-1))
-
/* Right shift is logical shift.
And the usual way of handling such machines, which involves
copying the number into sign_extend_temp, does not work
operating system this machine is likely to run.
USUAL-OPSYS="usg5-3" */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#undef WORD_MACHINE
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
orion, tahoe, APOLLO and many others */
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE long
#define C_ALLOCA
#undef HAVE_ALLOCA
-/* The data segment in this machine always starts at address 0x10000000.
- An address of data cannot be stored correctly in a Lisp object;
- we always lose the high bits. We must tell XPNTR to add them back. */
-
-#define DATA_SEG_BITS 0x20000000
#define DATA_START 0x20000000
/* Define NO_REMAP if memory segmentation makes it not work well
operating system this machine is likely to run.
USUAL-OPSYS="usg5-3" */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-/* #define WORD_MACHINE */
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
#define m68000
#define MOTOROLA_DELTA
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
/* #define LOAD_AVE_TYPE long */
operating system this machine is likely to run.
USUAL-OPSYS="usg5-3" */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-/* #define WORD_MACHINE */
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
does not define it automatically. */
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-/* #define EXPLICIT_SIGN_EXTEND */
-
/* Data type of load average, as read out of kmem. */
/* No load average on Motorola machines. */
/* #define LOAD_AVE_TYPE double */
/* #define ncl_el /* DPX/2 210,220 etc */
/* #define ncl_mr 1 /* DPX/2 320,340 (and 360,380 ?) */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-/* #define WORD_MACHINE /**/
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
/* /bin/cc on ncl_el and ncl_mr define m68k and mc68000 */
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE long
NOTE-END */
-/* XINT must explicitly sign-extend */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
vax, m68000, ns16000 are the ones defined so far. */
/* This file was modified by Matt Crawford <matt@tank.uchicago.edu>
to work under Elxsi's 12.0 release of BSD unix. */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-/*#define WORD_MACHINE */
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
vax, m68000, ns16000, pyramid, orion, tahoe and APOLLO
#define elxsi
#endif
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
-
/* Name of kernel load average variable */
#undef LDAV_SYMBOL
/* Synched up with: Mule 2.0. Not in FSF. */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#undef WORD_MACHINE
-
-/* Define how to take a char and sign-extend into an int.
- On machines where char is signed, this is a no-op. */
-
-#define SIGN_EXTEND_CHAR(c) ((signed char)(c))
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
# define mips
#endif
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE long
#define C_DEBUG_SWITCH "-g"
#define LIBS_DEBUG "-lg"
-
-/* The data segment in this machine always starts at address 0x1000000 = 16M.
- An address of data cannot be stored correctly in a Lisp object;
- we always lose the high bits. We must tell XPNTR to add them back. */
-
-#define DATA_SEG_BITS 0x1000000
#define DATA_START 0x1000000
/* The text segment always starts at 0.
A site running a pre-release of 2.1 should #define RELEASE2_1 in config.h.
NOTE-END */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-/* #define WORD_MACHINE */
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically */
- it is no longer needed and interferes with a variable in xmenu.c */
#undef sel
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE double
#define HAVE_ALLOCA
-/* XINT must explicitly sign-extend */
-
-#define EXPLICIT_SIGN_EXTEND
-
#define LOAD_AVE_TYPE long
#define LOAD_AVE_CVT(x) ((int) (((double) (x)) / 2048.0 * 100.0))
operating system this machine is likely to run.
USUAL-OPSYS="hpux" */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#undef WORD_MACHINE
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
# define hp9000s800
#endif
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
\f
#ifdef __hpux
/* Now define a symbol for the cpu type, if your compiler
\f
/* the data segment on this machine always starts at address 0x40000000. */
-#define DATA_SEG_BITS 0x40000000
-
#ifdef DATA_START
#undef DATA_START
#endif
/* #define HPUX_5 */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-/* #define WORD_MACHINE */
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically. */
#define hp9000s300
#endif
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Define CANNOT_DUMP on machines where unexec does not work.
Then the function dump-emacs will not be defined
and temacs will do (load "loadup") automatically unless told otherwise. */
operating system this machine is likely to run.
USUAL-OPSYS="<name of system .h file here, without the s- or .h>" */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-/* #define WORD_MACHINE */
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
#define INTEL860
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE long
work with certain new X window managers, and may be suboptimal.
NOTE-END */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-/* #define WORD_MACHINE */
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
#define DATA_START 0x00800000
#define DATA_END 0
-/* The data segment in this machine always starts at address 0x00800000.
- An address of data cannot be stored correctly in a Lisp object;
- we always lose the high bits. We must tell XPNTR to add them back. */
-
-#define DATA_SEG_BITS 0x00800000
#endif
#if 0 /* I refuse to promulgate a recommendation that would make
#define DATA_END 0
#endif
-/* The data segment in this machine always starts at address 0x20000000.
- An address of data cannot be stored correctly in a Lisp object;
- we always lose the high bits. We must tell XPNTR to add them back. */
-
-#ifndef USG5_4
-#define DATA_SEG_BITS 0x20000000
-#else
-#define DATA_SEG_BITS 0
-#endif
-
-#ifdef CANNOT_DUMP
-/* Define shared memory segment symbols */
-
-#define PURE_SEG_BITS 0x30000000
-
-/* Use shared memory. */
-/* This is turned off because it does not always work. See etc/AIX.DUMP. */
-/* #define HAVE_SHM */
-#define SHMKEY 5305035 /* used for shared memory code segments */
-#endif /* CANNOT_DUMP */
-
#define N_BADMAG(x) BADMAG(x)
#define N_TXTOFF(x) A_TEXTPOS(x)
#define N_SYMOFF(x) A_SYMPOS(x)
#define DATA_START 0x20000000
#define DATA_END 0
-/* The data segment in this machine always starts at address 0x20000000.
- An address of data cannot be stored correctly in a Lisp object;
- we always lose the high bits. We must tell XPNTR to add them back. */
-
-#define DATA_SEG_BITS 0x20000000
-
#define N_BADMAG(x) BADMAG(x)
#define N_TXTOFF(x) A_TEXTPOS(x)
#define N_SYMOFF(x) A_SYMPOS(x)
operating system this machine is likely to run.
USUAL-OPSYS="bsd4-2" */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#define WORD_MACHINE
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically. */
#define romp /* unfortunately old include files are hanging around. */
#endif
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE double /* For AIS (sysV) */
#define HAVE_ALLOCA
\f
-/* The data segment in this machine starts at a fixed address.
- An address of data cannot be stored correctly in a Lisp object;
- we always lose the high bits. We must tell XPNTR to add them back. */
-
-#define DATA_SEG_BITS 0x10000000
#define DATA_START 0x10000000
/* The text segment always starts at a fixed address.
Minor changes merged in 19.1.
NOTE-END */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-/* #define WORD_MACHINE */
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
#ifdef USG
-#if 0 /* ALLOCA is now autodetected */
-#define HAVE_ALLOCA
-#endif
#define NO_REMAP
#define TEXT_START 0
#endif /* USG */
#endif /* not XENIX */
-#ifdef USG5_4
-#define DATA_SEG_BITS 0x08000000
-#endif
-
#ifdef MSDOS
#define NO_REMAP
#endif
/* Synched up with: FSF 19.31. */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#undef WORD_MACHINE
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
#define IRIS_4D
#endif
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* jg@genmagic.genmagic.com (John Giannandrea) says this is unnecessary. */
#if 0
/* Data type of load average, as read out of kmem. */
#endif
#define TEXT_START 0x400000
-
-/*
- * DATA_SEG_BITS forces extra bits to be or'd in with any pointers which
- * were stored in a Lisp_Object (as Emacs uses fewer than 32 bits for
- * the value field of a LISP_OBJECT).
- */
-
#define DATA_START 0x10000000
-#define DATA_SEG_BITS 0x10000000
#undef LIBS_MACHINE
/* -lsun in case using Yellow Pages for passwords. */
operating system this machine is likely to run.
USUAL-OPSYS="irix3-3" */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#undef WORD_MACHINE
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
#define IRIS_4D
#endif
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE long /* This doesn't quite work on the 4D */
#define TEXT_START 0x400000
-/*
- * DATA_SEG_BITS forces extra bits to be or'd in with any pointers which
- * were stored in a Lisp_Object (as Emacs uses fewer than 32 bits for
- * the value field of a LISP_OBJECT).
- */
-
#define DATA_START 0x10000000
-#define DATA_SEG_BITS 0x10000000
#undef LIBS_MACHINE
/* -lsun in case using Yellow Pages for passwords. */
/* Synched up with: FSF 19.31. */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#undef WORD_MACHINE
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
#define IRIS_4D
#endif
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* jg@genmagic.genmagic.com (John Giannandrea) says this is unnecessary. */
#if 0
/* Data type of load average, as read out of kmem. */
#endif
#define TEXT_START 0x400000
-
-/*
- * DATA_SEG_BITS forces extra bits to be or'd in with any pointers which
- * were stored in a Lisp_Object (as Emacs uses fewer than 32 bits for
- * the value field of a LISP_OBJECT).
- */
-
#define DATA_START 0x10000000
-#define DATA_SEG_BITS 0x10000000
#undef LIBS_MACHINE
/* -lsun in case using Yellow Pages for passwords. */
(copy-file), it would say that it is non-critical...
#endif /* 0 */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-/* #define WORD_MACHINE */
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
#define m68000
#endif
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE long
#define m68000
-/* XINT must explicitly sign-extend */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
#ifdef BSD4_3
/* Synched up with: Mule 2.0. Not in FSF. */
-/* Define how to take a char and sign-extend into an int.
- On machines where char is signed, this is a no-op. */
-
-#define SIGN_EXTEND_CHAR(c) (c)
-
-/* XINT must explicitly sign-extend */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE long
/* Synched up with: FSF 19.31. */
-/* The following symbol gives information on
- the size of various data types. */
-
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-/* #define WORD_MACHINE */
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically. */
#define m68k
#endif
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the 24-bit bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Define CANNOT_DUMP on machines where unexec does not work.
Then the function dump-emacs will not be defined
and temacs will do (load "loadup") automatically unless told otherwise. */
/* #define VIRT_ADDR_VARIES */
#ifdef linux
-#ifdef __ELF__
-#define DATA_SEG_BITS 0x80000000
-#endif
#define NO_REMAP
#define TEXT_START 0
operating system this machine is likely to run.
USUAL-OPSYS="rtu" */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#undef WORD_MACHINE
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
vax, m68000, ns16000, pyramid, orion, tahoe and APOLLO
/* Masscomp predefines mc68000. */
#define m68000 mc68000
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#undef EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE double
operating system this machine is likely to run.
USUAL-OPSYS="bsd4-2" */
-/* XINT must explicitly sign-extend */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Say this machine is a 68000 */
#define m68000
your work; we'd like to distribute this information.
NOTE-END */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-/* ns16000 addresses are byte addresses */
-#undef WORD_MACHINE
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
vax, m68000, ns16000, pyramid, orion, tahoe and APOLLO
#define ns16000
#define mg1
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
/* mg1 its an unsigned long */
#define LOAD_AVE_TYPE unsigned long
With this the file mips-siemens.h is obsolete.
NOTE-END */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#undef WORD_MACHINE
-
-/* Define how to take a char and sign-extend into an int.
- On machines where char is signed, this is a no-op. */
-
-#define SIGN_EXTEND_CHAR(c) ((signed char)(c))
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
# define mips
#endif
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the 24-bit bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE long
/* MARCO ???
*/
#define TEXT_START 0x400000
-/*
-#define DATA_START 0x10000000
-#define DATA_SEG_BITS 0x10000000
-*/
#undef ORDINARY_LINK
With this the file mips-siemens.h is obsolete.
NOTE-END */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#undef WORD_MACHINE
-
-/* Define how to take a char and sign-extend into an int.
- On machines where char is signed, this is a no-op. */
-
-#define SIGN_EXTEND_CHAR(c) ((signed char)(c))
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
# define mips
#endif
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the 24-bit bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE long
/* MARCO ???
*/
#define TEXT_START 0x400000
-/*
-#define DATA_START 0x10000000
-#define DATA_SEG_BITS 0x10000000
-*/
+
#ifdef UNEXEC
#undef UNEXEC
#endif
Note that the proper m- file for the Decstation is m-pmax.h.
NOTE-END */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#undef WORD_MACHINE
-
-/* Define how to take a char and sign-extend into an int.
- On machines where char is signed, this is a no-op. */
-
-#define SIGN_EXTEND_CHAR(c) ((signed char)(c))
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
# define mips
#endif
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE long
#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
#define NeXT
#endif
-/* Define how to take a char and sign-extend into an int.
- On machines where char is signed, this is a no-op. */
-
-#define SIGN_EXTEND_CHAR(c) (c)
-
-/* XINT must explicitly sign-extend */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Say that the text segment of a.out includes the header;
the header actually occupies the first few bytes of the text segment
and is counted in hdr.a_text. */
operating system this machine is likely to run.
USUAL-OPSYS="<name of system .h file here, without the s- or .h>" */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-/* #define WORD_MACHINE */
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
#define gcx
#endif
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-/* #define EXPLICIT_SIGN_EXTEND */
-
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE long
operating system this machine is likely to run.
USUAL-OPSYS="<name of system .h file here, without the s- or .h>" */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-/* #define WORD_MACHINE */
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
#define m88000
#endif
-#define VALBITS 26
-
-#define GCTYPEBITS 5
-
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-/* #define EXPLICIT_SIGN_EXTEND */
-
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE long
operating system this machine is likely to run.
USUAL-OPSYS="usg5-2" */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-/* #define WORD_MACHINE */
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
orion, tahoe, APOLLO and many others */
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
/* #define LOAD_AVE_TYPE long */
operating system this machine is likely to run.
USUAL-OPSYS="usg5-2" */
-/* XINT must explicitly sign-extend */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
vax, m68000, ns16000 are the ones defined so far. */
#define orion
#endif
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#define WORD_MACHINE
-
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE double
operating system this machine is likely to run.
USUAL-OPSYS="bsd4-2" */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
/* Data type of load average, as read out of kmem. */
/* This used to be `double'. */
#define m68000
#define mc68000 1
-/* XINT must explicitly sign-extend */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Define NO_REMAP if memory segmentation makes it not work well
to change the boundary between the text section and data section
when Emacs is dumped. If you define this, the preloaded Lisp
#define LD_SWITCH_MACHINE "-e __start"
-#if pfa50 || pfa70
-
-/* On A-50/60/70/80, data space has high order byte use. */
-#define VALBITS 26
-#define VALMASK (((1<<VALBITS) - 1) | 0x60000000)
-/* XEmacs: markbit is between type bits and value bits */
-/* #define XTYPE(a) ((enum Lisp_Type) (((a) >> VALBITS) & GCTYPEMASK)) */
-#define XTYPE(a) ((enum Lisp_Type) (((a) >> ((VALBITS) + 1)) & GCTYPEMASK))
-
-#endif /* pfa50, pfa70 */
-
/* SX/A has alloca in the PW library. */
#define LIB_STANDARD "-lPW -lc"
operating system this machine is likely to run.
USUAL-OPSYS="usg5-2" */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#undef WORD_MACHINE
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
vax, m68000, ns16000, pyramid, orion, tahoe and APOLLO
/* Plexus predefines m68 instead of m68000. */
#define m68000 m68
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#undef EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
#undef LOAD_AVE_TYPE
#undef LD_SWITCH_MACHINE
#undef DATA_START
#define DATA_START 0x10000000
-#define DATA_SEG_BITS 0x10000000
#if 0
/* I don't see any such conflict in Ultrix 4.2, 4.2a, or 4.3. And
# endif
#endif
-/* XINT must explicitly sign-extend */
-
-#define EXPLICIT_SIGN_EXTEND
-
#ifndef __linux__
/* Data type of load average, as read out of kmem. */
#define NO_REMAP
-#if 0
-#define TEXT_START 0x00001000
-#define TEXT_END 0
-#define DATA_START 0x01000000
-#define DATA_END 0
-
-/* The data segment in this machine always starts at address 0x10000000.
- An address of data cannot be stored correctly in a Lisp object;
- we always lose the high bits. We must tell XPNTR to add them back. */
-
-#define DATA_SEG_BITS 0x10000000
-#endif
-
/* Use type int rather than a union, to represent Lisp_Object */
/* #define NO_UNION_TYPE */
#ifdef CANNOT_DUMP
-/* Define shared memory segment symbols */
-
-#define PURE_SEG_BITS 0x30000000
-/* Use shared memory. */
-/* This is turned off because it does not always work. See etc/AIX.DUMP. */
-/* #define HAVE_SHM */
-#define SHMKEY 5305035 /* used for shared memory code segments */
#endif /* CANNOT_DUMP */
#define N_BADMAG(x) BADMAG(x)
operating system this machine is likely to run.
USUAL-OPSYS="bsd4-2" */
-/* XINT must explicitly sign extend */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* pyramid preprocessor defines "pyr", however the following is clearer */
#define pyramid
#include "intel386.h"
-/* Define how to take a char and sign-extend into an int.
- On machines where char is signed, this is a no-op. */
-/* CHECK THIS */
-#define SIGN_EXTEND_CHAR(c) (c)
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
#define CRT0_DUMMIES dummy1, dummy2, dummy3,
#endif
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the 24-bit bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE unsigned long
/* NOTE: this file works for DYNIX release 2.0
(not tested on 1.3) on NS32000's */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-/* #define WORD_MACHINE */
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
vax, m68000, ns16000, pyramid, orion, tahoe and APOLLO
#define DOT_GLOBAL_START
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE unsigned long
operating system this machine is likely to run.
USUAL-OPSYS="irix3-3" */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#undef WORD_MACHINE
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
#undef HAVE_NATIVE_SOUND
#endif
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE long /* This doesn't quite work on the 4D */
#define UNEXEC "unexelfsgi.o"
#define TEXT_START 0x400000
-
-/*
- * DATA_SEG_BITS forces that bit to be or'd in with any pointers which
- * are trying to access pure strings (as gnu-emacs only allows 24 bits
- * for the value field of a LISP_OBJECT).
- */
-
#define DATA_START 0x10000000
-#define DATA_SEG_BITS 0x10000000
#undef LIBS_MACHINE
/* -lsun in case using Yellow Pages for passwords. */
# endif
#endif
-/* XINT must explicitly sign-extend */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Mask for address bits within a memory segment */
#define SEGMENT_MASK (SEGSIZ - 1)
#define sps7
-/* XINT must explicitly sign-extend */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
/* Suspect there is something weird about this machine, so turn it off. */
operating system this machine is likely to run.
USUAL-OPSYS="usg5-2" */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#undef WORD_MACHINE
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
vax, m68000, ns16000, pyramid, orion, tahoe, APOLLO and STRIDE
#define STRIDE
#endif
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE double
/* Sun can't write competent compilers */
#define COMPILER_REGISTER_BUG
-/* XINT must explicitly sign-extend */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE long
/* Sun can't write competent compilers */
#define COMPILER_REGISTER_BUG
-/* XINT must explicitly sign-extend */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE long
operating system this machine is likely to run.
USUAL-OPSYS="usg5-3" */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-/* #define WORD_MACHINE */
-
-/* Now define a symbol for the cpu type, if your compiler
- does not define it automatically */
-
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-/* #define EXPLICIT_SIGN_EXTEND */
-
/* Data type of load average, as read out of kmem. */
/* #define LOAD_AVE_TYPE long */
Berkeley you are running.
NOTE-END */
-/* XINT must explicitly sign-extend */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Say this machine is a tahoe */
#ifndef tahoe
operating system this machine is likely to run.
USUAL-OPSYS="usg5-2-2" */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#define WORD_MACHINE
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
vax, m68000, ns16000, pyramid, orion, tahoe and APOLLO
/* #define m68k is defined by the Compiler */
/* #define m68000 */
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
/* #define LOAD_AVE_TYPE double */
operating system this machine is likely to run.
USUAL-OPSYS="bsd4-3" */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#undef WORD_MACHINE
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically. */
/* Synched up with: FSF 19.31. */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-/* #define WORD_MACHINE */
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
#define m88000
#endif
-/* Define how to take a char and sign-extend into an int.
- On machines where char is signed, this is a no-op. */
-#define SIGN_EXTEND_CHAR(c) (c)
-
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-/* #define EXPLICIT_SIGN_EXTEND */
-
/* Data type of load average, as read out of kmem. */
/* #define LOAD_AVE_TYPE double */ /* No load average on XD88. */
/* Convert that into an integer that is 100 for a load average of 1.0 */
operating system this machine is likely to run.
USUAL-OPSYS="<name of system .h file here, without the .h>" */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#define WORD_MACHINE
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
orion, tahoe, APOLLO and many others */
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE long
operating system this machine is likely to run.
USUAL-OPSYS="usg5-2-2" */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-/* #define WORD_MACHINE */
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
vax, m68000, ns16000, pyramid, orion, tahoe and APOLLO
are the ones defined so far. */
#define m68000
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
/* #define LOAD_AVE_TYPE long */
operating system this machine is likely to run.
USUAL-OPSYS="usg5-3" */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-/* #define WORD_MACHINE */
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
vax, m68000, ns16000, pyramid, orion, tahoe and APOLLO
are the ones defined so far. */
#define m68000
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
/* #define LOAD_AVE_TYPE long */
operating system this machine is likely to run.
USUAL-OPSYS="usg5-3" */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#undef WORD_MACHINE
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
vax, m68000, ns16000, pyramid, orion, tahoe and APOLLO
#define m68000 mc68000
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#undef EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE double
operating system this machine is likely to run.
USUAL-OPSYS="usg5-2" */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#undef WORD_MACHINE
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
vax, m68000, ns16000 are the ones defined so far. */
/* This flag is used only in alloca.s. */
#define WICAT
-/* XINT must explicitly sign-extend */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
#undef LOAD_AVE_TYPE
#define NO_ARG_ARRAY
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#define WORD_MACHINE
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
#define NO_UNION_TYPE
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the 24-bit bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE long
operating system this machine is likely to run.
USUAL-OPSYS="usg5-2" */
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-/* #define WORD_MACHINE */
-
/* Now define a symbol for the cpu type, if your compiler
does not define it automatically:
Ones defined so far include vax, m68000, ns16000, pyramid,
orion, tahoe, APOLLO and many others */
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
/* #define LOAD_AVE_TYPE long */
s/[ \t]+//g;
# Find include dependencies
for (/^\#include([^\n]+)/gm) {
- if (m@^\"([A-Za-z0-9_-]+\.h)\"@) {
+ if (m@^\"([A-Za-z0-9._-]+\.h)\"@) {
$uses{$file}{$1} = 1 if exists $exists{$1};
- } elsif (m@<([A-Za-z0-9_-]+\.h)>@) {
+ } elsif (m@<([A-Za-z0-9._-]+\.h)>@) {
$uses{$file}{$1} = 1 if exists $generated_header{$1};
- } elsif (m@\"../lwlib/([A-Za-z0-9_-]+\.h)\"@) {
+ } elsif (m@\"../lwlib/([A-Za-z0-9._-]+\.h)\"@) {
$uses{$file}{"\$(LWLIB_SRCDIR)/lwlib.h"} = 1;
}
}
extern char *start_of_data (void);
#ifdef BSD
-#ifndef DATA_SEG_BITS
#define start_of_data() &etext
#endif
-#endif
#ifndef emacs
#define start_of_data() &etext
return v;
}
int
-malloc_mem_used ()
+malloc_mem_used (void)
{
int i;
int size_used;
}
int
-malloc_mem_free ()
+malloc_mem_free (void)
{
int i;
int size_unused;
#ifdef USG
static void
-get_lim_data ()
+get_lim_data (void)
{
#ifdef ULIMIT_BREAK_VALUE
lim_data = ULIMIT_BREAK_VALUE;
#ifndef BSD4_2
static void
-get_lim_data ()
+get_lim_data (void)
{
lim_data = vlimit (LIM_DATA, -1);
}
#else /* BSD4_2 */
static void
-get_lim_data ()
+get_lim_data (void)
{
struct rlimit XXrlimit;
void
syms_of_marker (void)
{
+ INIT_LRECORD_IMPLEMENTATION (marker);
+
DEFSUBR (Fmarker_position);
DEFSUBR (Fmarker_buffer);
DEFSUBR (Fset_marker);
#define simple_set_charptr_emchar(ptr, x) ((ptr)[0] = (Bufbyte) (x), 1)
#define simple_charptr_copy_char(ptr, ptr2) ((ptr2)[0] = *(ptr), 1)
-Emchar non_ascii_charptr_emchar (CONST Bufbyte *ptr);
+Emchar non_ascii_charptr_emchar (const Bufbyte *ptr);
Bytecount non_ascii_set_charptr_emchar (Bufbyte *ptr, Emchar c);
-Bytecount non_ascii_charptr_copy_char (CONST Bufbyte *ptr, Bufbyte *ptr2);
+Bytecount non_ascii_charptr_copy_char (const Bufbyte *ptr, Bufbyte *ptr2);
-INLINE Emchar charptr_emchar (CONST Bufbyte *ptr);
-INLINE Emchar
-charptr_emchar (CONST Bufbyte *ptr)
+INLINE_HEADER Emchar charptr_emchar (const Bufbyte *ptr);
+INLINE_HEADER Emchar
+charptr_emchar (const Bufbyte *ptr)
{
return BYTE_ASCII_P (*ptr) ?
simple_charptr_emchar (ptr) :
non_ascii_charptr_emchar (ptr);
}
-INLINE Bytecount set_charptr_emchar (Bufbyte *ptr, Emchar x);
-INLINE Bytecount
+INLINE_HEADER Bytecount set_charptr_emchar (Bufbyte *ptr, Emchar x);
+INLINE_HEADER Bytecount
set_charptr_emchar (Bufbyte *ptr, Emchar x)
{
return !CHAR_MULTIBYTE_P (x) ?
non_ascii_set_charptr_emchar (ptr, x);
}
-INLINE Bytecount charptr_copy_char (CONST Bufbyte *ptr, Bufbyte *ptr2);
-INLINE Bytecount
-charptr_copy_char (CONST Bufbyte *ptr, Bufbyte *ptr2)
+INLINE_HEADER Bytecount
+charptr_copy_char (const Bufbyte *ptr, Bufbyte *ptr2);
+INLINE_HEADER Bytecount
+charptr_copy_char (const Bufbyte *ptr, Bufbyte *ptr2)
{
return BYTE_ASCII_P (*ptr) ?
simple_charptr_copy_char (ptr, ptr2) :
int Lstream_fput_emchar (Lstream *stream, Emchar ch);
void Lstream_funget_emchar (Lstream *stream, Emchar ch);
-int copy_internal_to_external (CONST Bufbyte *internal, Bytecount len,
+int copy_internal_to_external (const Bufbyte *internal, Bytecount len,
unsigned char *external);
-Bytecount copy_external_to_internal (CONST unsigned char *external,
+Bytecount copy_external_to_internal (const unsigned char *external,
int len, Bufbyte *internal);
#endif /* _XEMACS_MB_MULTIBYTE_H */
/* Does this byte represent the first byte of a character? */
-INLINE int BUFBYTE_FIRST_BYTE_P(Bufbyte c);
-INLINE int
+INLINE_HEADER int BUFBYTE_FIRST_BYTE_P(Bufbyte c);
+INLINE_HEADER int
BUFBYTE_FIRST_BYTE_P(Bufbyte c)
{
return (c <= 0x7f) || (0xc0 <= c);
#define CHAR_MULTIBYTE_P(c) ((c) >= 0x80)
-INLINE int REP_BYTES_BY_FIRST_BYTE (int fb);
-INLINE int
+INLINE_HEADER int REP_BYTES_BY_FIRST_BYTE (int fb);
+INLINE_HEADER int
REP_BYTES_BY_FIRST_BYTE (int fb)
{
if ( fb < 0xc0 )
#include <sys/types.h>
#include <string.h>
#include <stdio.h>
-
-#if defined HAVE_LIMITS_H || _LIBC
-# include <limits.h>
-#endif
+#include <limits.h>
/* The following contortions are an attempt to use the C preprocessor
to determine an unsigned integral type that is 32 bits wide. An
static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ };
-static void md5_process_block (CONST void *, size_t, struct md5_ctx *);
+static void md5_process_block (const void *, size_t, struct md5_ctx *);
/* Initialize structure containing state of computation.
IMPORTANT: On some systems it is required that RESBUF is correctly
aligned for a 32 bits value. */
static void *
-md5_read_ctx (CONST struct md5_ctx *ctx, void *resbuf)
+md5_read_ctx (const struct md5_ctx *ctx, void *resbuf)
{
((md5_uint32 *) resbuf)[0] = SWAP (ctx->A);
((md5_uint32 *) resbuf)[1] = SWAP (ctx->B);
static void
-md5_process_bytes (CONST void *buffer, size_t len, struct md5_ctx *ctx)
+md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx)
{
/* When we already have some bits in our internal buffer concatenate
both inputs first. */
It is assumed that LEN % 64 == 0. */
static void
-md5_process_block (CONST void *buffer, size_t len, struct md5_ctx *ctx)
+md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx)
{
md5_uint32 correct_words[16];
const md5_uint32 *words = (const md5_uint32 *) buffer;
#define EXCEEDS_LISP_PTR(ptr) 0
#ifdef BSD
-#ifndef DATA_SEG_BITS
extern int etext;
#define start_of_data() &etext
#endif
-#endif
#else /* not emacs */
extern char etext;
/* Number of bytes of writable memory we can expect to be able to get */
extern unsigned int lim_data;
-#ifdef HEAP_IN_DATA
+#if defined (HEAP_IN_DATA) && !defined(PDUMP)
extern unsigned long static_heap_size;
extern int initialized;
static void
/* Implements an elisp-programmable menubar -- Win32
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
Copyright (C) 1995 Tinker Systems and INS Engineering Corp.
- Copyright (C) 1997 Kirill M. Katsnelson <kkm@kis.ru>
+ Copyright (C) 1997 Kirill M. Katsnelson <kkm@kis.ru>.
+ Copyright (C) 2000 Ben Wing.
This file is part of XEmacs.
* particular knowledge is bad because this may break in Windows NT
* 5.0, or Windows 98, or other future version. Instead, I allow the
* hash tables to hang around, and not clear them, unless WM_COMMAND is
- * received. This is worthy some memory but more safe. Hacks welcome,
+ * received. This is worth some memory but more safe. Hacks welcome,
* anyways!
*
*/
#include "window.h"
/* #### */
-#define REPLACE_ME_WITH_GLOBAL_VARIABLE_WHICH_CONTROLS_RIHGT_FLUSH 0
+#define REPLACE_ME_WITH_GLOBAL_VARIABLE_WHICH_CONTROLS_RIGHT_FLUSH 0
#define EMPTY_ITEM_ID ((UINT)LISP_TO_VOID (Qunbound))
#define EMPTY_ITEM_NAME "(empty)"
#define MENU_ITEM_ID_BITS(x) (((x) & 0x7FFF) | 0x8000)
static HMENU top_level_menu;
+/* Translate (in place) %_ to &, %% to %.
+ Return new length, and (through accel) the accelerator character.
+ (If there is no accelerator, it will be added on the first character.)
+ len = number of bytes (not including zero terminator).
+ maxlen = size of buffer.
+ We assume and maintain zero-termination. To be absolutely sure
+ of not hitting an error, maxlen should be >= 2*len + 3. */
+
+Bytecount
+msw_translate_menu_or_dialog_item (Bufbyte *item, Bytecount len,
+ Bytecount maxlen, Emchar *accel,
+ Lisp_Object error_name)
+{
+ Bufbyte *ptr;
+
+ *accel = '\0';
+
+ /* Escape '&' as '&&' */
+
+ ptr = item;
+ while ((ptr = (Bufbyte *) memchr (ptr, '&', len - (ptr - item))) != NULL)
+ {
+ if (len + 2 > maxlen)
+ signal_simple_error ("Menu item produces too long displayable string",
+ error_name);
+ memmove (ptr + 1, ptr, (len - (ptr - item)) + 1);
+ len++;
+ ptr += 2;
+ }
+
+ /* Replace XEmacs accelerator '%_' with Windows accelerator '&'
+ and `%%' with `%'. */
+ ptr = item;
+ while ((ptr = memchr (ptr, '%', len - (ptr - item))) != NULL)
+ {
+ if (*(ptr + 1) == '_')
+ {
+ *ptr = '&';
+ if (!*accel)
+ /* #### urk ! We need a reference translation table for
+ case changes that aren't buffer-specific. */
+ *accel = DOWNCASE (current_buffer, charptr_emchar (ptr + 2));
+ memmove (ptr + 1, ptr + 2, len - (ptr - item + 2) + 1);
+ len--;
+ }
+ else if (*(ptr + 1) == '%')
+ {
+ memmove (ptr + 1, ptr + 2, len - (ptr - item + 2) + 1);
+ len--;
+ }
+ ptr++;
+ }
+
+ if (!*accel)
+ {
+ if (len + 2 > maxlen)
+ signal_simple_error ("Menu item produces too long displayable string",
+ error_name);
+ ptr = item;
+ memmove (ptr + 1, ptr, len + 1);
+ /* #### urk ! We need a reference translation table for
+ case changes that aren't buffer-specific. */
+ *accel = DOWNCASE (current_buffer, charptr_emchar (ptr + 1));
+ *ptr = '&';
+
+ len++;
+ }
+
+ return len;
+}
+
/*
* This returns Windows-style menu item string:
* "Left Flush\tRight Flush"
*/
+
+/* #### This is junk. Need correct handling of sizes. Use a Bufbyte_dynarr,
+ not a static buffer. */
static char*
-displayable_menu_item (Lisp_Object gui_item, int bar_p)
+displayable_menu_item (Lisp_Object gui_item, int bar_p, Emchar *accel)
{
+ unsigned int ll;
+
/* We construct the name in a static buffer. That's fine, because
menu items longer than 128 chars are probably programming errors,
and better be caught than displayed! */
static char buf[MAX_MENUITEM_LENGTH+2];
- char *ptr;
- unsigned int ll, lr;
/* Left flush part of the string */
ll = gui_item_display_flush_left (gui_item, buf, MAX_MENUITEM_LENGTH);
- /* Escape '&' as '&&' */
- ptr = buf;
- while ((ptr=memchr (ptr, '&', ll-(ptr-buf))) != NULL)
- {
- if (ll+2 >= MAX_MENUITEM_LENGTH)
- signal_simple_error ("Menu item produces too long displayable string",
- XGUI_ITEM (gui_item)->name);
- memmove (ptr+1, ptr, (ll-(ptr-buf))+1);
- ll++;
- ptr+=2;
- }
-
- /* Replace XEmacs accelerator '%_' with Windows accelerator '&' */
- ptr = buf;
- while ((ptr=memchr (ptr, '%', ll-(ptr-buf))) != NULL)
- {
- if (*(ptr+1) == '_')
- {
- *ptr = '&';
- memmove (ptr+1, ptr+2, ll-(ptr-buf+2));
- ll--;
- }
- ptr++;
- }
+ ll = msw_translate_menu_or_dialog_item ((Bufbyte *) buf, ll,
+ MAX_MENUITEM_LENGTH, accel,
+ XGUI_ITEM (gui_item)->name);
/* Right flush part, unless we're at the top-level where it's not allowed */
if (!bar_p)
{
+ unsigned int lr;
+
assert (MAX_MENUITEM_LENGTH > ll + 1);
lr = gui_item_display_flush_right (gui_item, buf + ll + 1,
MAX_MENUITEM_LENGTH - ll - 1);
static void
populate_menu_add_item (HMENU menu, Lisp_Object path,
Lisp_Object hash_tab, Lisp_Object item,
+ Lisp_Object *accel_list,
int flush_right, int bar_p)
{
MENUITEMINFO item_info;
/* Submenu */
HMENU submenu;
Lisp_Object gui_item = allocate_gui_item ();
- Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
- struct gcpro gcpro1;
+ Lisp_Gui_Item *pgui_item = XGUI_ITEM (gui_item);
+ struct gcpro gcpro1, gcpro2, gcpro3;
+ Emchar accel;
- GCPRO1 (gui_item);
+ GCPRO3 (gui_item, path, *accel_list);
menu_parse_submenu_keywords (item, gui_item);
if (!STRINGP (pgui_item->name))
- signal_simple_error ("Menu name (first element) must be a string", item);
+ signal_simple_error ("Menu name (first element) must be a string",
+ item);
if (!gui_item_included_p (gui_item, Vmenubar_configuration))
- return;
+ {
+ UNGCPRO;
+ goto done;
+ }
if (!gui_item_active_p (gui_item))
item_info.fState = MFS_GRAYED;
/* Temptation is to put 'else' right here. Although, the
displayed item won't have an arrow indicating that it is a
popup. So we go ahead a little bit more and create a popup */
- submenu = create_empty_popup_menu();
+ submenu = create_empty_popup_menu ();
item_info.fMask |= MIIM_SUBMENU;
- item_info.dwTypeData = displayable_menu_item (gui_item, bar_p);
+ item_info.dwTypeData = displayable_menu_item (gui_item, bar_p, &accel);
item_info.hSubMenu = submenu;
+ if (accel && bar_p)
+ *accel_list = Fcons (make_char (accel), *accel_list);
+
if (!(item_info.fState & MFS_GRAYED))
{
/* Now add the full submenu path as a value to the hash table,
keyed by menu handle */
if (NILP(path))
- /* list1 cannot GC */
path = list1 (pgui_item->name);
else
{
Lisp_Object arg[2];
arg[0] = path;
arg[1] = list1 (pgui_item->name);
- /* Fappend gcpro'es its arg */
path = Fappend (2, arg);
}
- /* Fputhash GCPRO'es PATH */
Fputhash (hmenu_to_lisp_object (submenu), path, hash_tab);
}
- UNGCPRO; /* gui_item */
+ UNGCPRO;
}
else if (VECTORP (item))
{
/* An ordinary item */
Lisp_Object style, id;
Lisp_Object gui_item = gui_parse_item_keywords (item);
- Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
- struct gcpro gcpro1;
+ Lisp_Gui_Item *pgui_item = XGUI_ITEM (gui_item);
+ struct gcpro gcpro1, gcpro2;
+ Emchar accel;
- GCPRO1 (gui_item);
+ GCPRO2 (gui_item, *accel_list);
if (!gui_item_included_p (gui_item, Vmenubar_configuration))
- return;
+ {
+ UNGCPRO;
+ goto done;
+ }
+
+ if (!STRINGP (pgui_item->name))
+ pgui_item->name = Feval (pgui_item->name);
if (!gui_item_active_p (gui_item))
item_info.fState = MFS_GRAYED;
pgui_item->suffix);
Fputhash (id, pgui_item->callback, hash_tab);
- item_info.wID = (UINT) XINT(id);
+ item_info.wID = (UINT) XINT (id);
item_info.fType |= MFT_STRING;
- item_info.dwTypeData = displayable_menu_item (gui_item, bar_p);
+ item_info.dwTypeData = displayable_menu_item (gui_item, bar_p, &accel);
+
+ if (accel && bar_p)
+ *accel_list = Fcons (make_char (accel), *accel_list);
- UNGCPRO; /* gui_item */
+ UNGCPRO;
}
else
{
item_info.fType |= MFT_RIGHTJUSTIFY;
InsertMenuItem (menu, UINT_MAX, TRUE, &item_info);
+
+done:;
}
/*
{
Lisp_Object item_desc;
int deep_p, flush_right;
- struct gcpro gcpro1;
+ struct gcpro gcpro1, gcpro2, gcpro3;
unsigned long checksum;
Lisp_Object gui_item = allocate_gui_item ();
- Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
- GCPRO1 (gui_item);
+ Lisp_Object accel_list = Qnil;
+ Lisp_Gui_Item *pgui_item = XGUI_ITEM (gui_item);
+
+ GCPRO3 (gui_item, accel_list, desc);
/* We are sometimes called with the menubar unchanged, and with changed
right flush. We have to update the menubar in this case,
so account for the compliance setting in the hash value */
- checksum = REPLACE_ME_WITH_GLOBAL_VARIABLE_WHICH_CONTROLS_RIHGT_FLUSH;
+ checksum = REPLACE_ME_WITH_GLOBAL_VARIABLE_WHICH_CONTROLS_RIGHT_FLUSH;
/* Will initially contain only "(empty)" */
if (populate_p)
if (NILP (XCAR (item_desc)))
{
/* Do not flush right menubar items when MS style compliant */
- if (bar_p && !REPLACE_ME_WITH_GLOBAL_VARIABLE_WHICH_CONTROLS_RIHGT_FLUSH)
+ if (bar_p && !REPLACE_ME_WITH_GLOBAL_VARIABLE_WHICH_CONTROLS_RIGHT_FLUSH)
flush_right = 1;
if (!populate_p)
checksum = HASH2 (checksum, LISP_HASH (Qnil));
}
else if (populate_p)
populate_menu_add_item (menu, path, hash_tab,
- XCAR (item_desc), flush_right, bar_p);
+ XCAR (item_desc), &accel_list,
+ flush_right, bar_p);
else
checksum = HASH2 (checksum,
checksum_menu_item (XCAR (item_desc)));
/* Add the header to the popup, if told so. The same as in X - an
insensitive item, and a separator (Seems to me, there were
- two separators in X... In Windows this looks ugly, anyways. */
- if (!bar_p && !deep_p && popup_menu_titles && !NILP(pgui_item->name))
+ two separators in X... In Windows this looks ugly, anyways.) */
+ if (!bar_p && !deep_p && popup_menu_titles && !NILP (pgui_item->name))
{
CHECK_STRING (pgui_item->name);
InsertMenu (menu, 0, MF_BYPOSITION | MF_STRING | MF_DISABLED,
SetMenuDefaultItem (menu, 0, MF_BYPOSITION);
}
}
- UNGCPRO; /* gui_item */
+
+ if (bar_p)
+ Fputhash (Qt, accel_list, hash_tab);
+
+ UNGCPRO;
return checksum;
}
static void
populate_menu (HMENU menu, Lisp_Object path, Lisp_Object desc,
- Lisp_Object hash_tab, int bar_p)
+ Lisp_Object hash_tab, int bar_p)
{
populate_or_checksum_helper (menu, path, desc, hash_tab, bar_p, 1);
}
}
static void
-update_frame_menubar_maybe (struct frame* f)
+update_frame_menubar_maybe (struct frame *f)
{
HMENU menubar = GetMenu (FRAME_MSWINDOWS_HANDLE (f));
struct window *w = XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f));
Lisp_Object desc = (!NILP (w->menubar_visible_p)
? symbol_value_in_buffer (Qcurrent_menubar, w->buffer)
: Qnil);
+ struct gcpro gcpro1;
+
+ GCPRO1 (desc); /* it's safest to do this, just in case some filter
+ or something changes the value of current-menubar */
top_level_menu = menubar;
if (NILP (desc) && menubar != NULL)
{
/* Menubar has gone */
- FRAME_MSWINDOWS_MENU_HASH_TABLE(f) = Qnil;
+ FRAME_MSWINDOWS_MENU_HASH_TABLE (f) = Qnil;
SetMenu (FRAME_MSWINDOWS_HANDLE (f), NULL);
DestroyMenu (menubar);
DrawMenuBar (FRAME_MSWINDOWS_HANDLE (f));
+ UNGCPRO;
return;
}
if (NILP (desc))
{
/* We did not have the bar and are not going to */
+ UNGCPRO;
return;
}
/* Now we bail out if the menubar has not changed */
- if (FRAME_MSWINDOWS_MENU_CHECKSUM(f) == checksum_menu (desc))
- return;
+ if (FRAME_MSWINDOWS_MENU_CHECKSUM (f) == checksum_menu (desc))
+ {
+ UNGCPRO;
+ return;
+ }
populate:
/* Come with empty hash table */
- if (NILP (FRAME_MSWINDOWS_MENU_HASH_TABLE(f)))
- FRAME_MSWINDOWS_MENU_HASH_TABLE(f) =
+ if (NILP (FRAME_MSWINDOWS_MENU_HASH_TABLE (f)))
+ FRAME_MSWINDOWS_MENU_HASH_TABLE (f) =
make_lisp_hash_table (50, HASH_TABLE_NON_WEAK, HASH_TABLE_EQUAL);
else
- Fclrhash (FRAME_MSWINDOWS_MENU_HASH_TABLE(f));
+ Fclrhash (FRAME_MSWINDOWS_MENU_HASH_TABLE (f));
Fputhash (hmenu_to_lisp_object (menubar), Qnil,
- FRAME_MSWINDOWS_MENU_HASH_TABLE(f));
+ FRAME_MSWINDOWS_MENU_HASH_TABLE (f));
populate_menu (menubar, Qnil, desc,
- FRAME_MSWINDOWS_MENU_HASH_TABLE(f), 1);
+ FRAME_MSWINDOWS_MENU_HASH_TABLE (f), 1);
SetMenu (FRAME_MSWINDOWS_HANDLE (f), menubar);
DrawMenuBar (FRAME_MSWINDOWS_HANDLE (f));
- FRAME_MSWINDOWS_MENU_CHECKSUM(f) = checksum_menu (desc);
+ FRAME_MSWINDOWS_MENU_CHECKSUM (f) = checksum_menu (desc);
+
+ UNGCPRO;
}
static void
{
HMENU menubar = GetMenu (FRAME_MSWINDOWS_HANDLE (f));
Lisp_Object desc = current_frame_menubar (f);
+ struct gcpro gcpro1;
+
if (menubar == NULL)
return;
triggers. To resolve, we must prevent filters explicitly from
mangling with the active menu. In apply_filter probably?
Is copy-tree on the whole menu too expensive? */
- if (NILP(desc))
+ if (NILP (desc))
/* abort(); */
return;
+ GCPRO1 (desc); /* just to be safe -- see above */
/* We do the trick by removing all items and re-populating top level */
empty_menu (menubar, 0);
- assert (HASH_TABLEP (FRAME_MSWINDOWS_MENU_HASH_TABLE(f)));
- Fclrhash (FRAME_MSWINDOWS_MENU_HASH_TABLE(f));
+ assert (HASH_TABLEP (FRAME_MSWINDOWS_MENU_HASH_TABLE (f)));
+ Fclrhash (FRAME_MSWINDOWS_MENU_HASH_TABLE (f));
Fputhash (hmenu_to_lisp_object (menubar), Qnil,
- FRAME_MSWINDOWS_MENU_HASH_TABLE(f));
+ FRAME_MSWINDOWS_MENU_HASH_TABLE (f));
populate_menu (menubar, Qnil, desc,
- FRAME_MSWINDOWS_MENU_HASH_TABLE(f), 1);
+ FRAME_MSWINDOWS_MENU_HASH_TABLE (f), 1);
+ UNGCPRO;
}
/*
current_hash_table = Qnil;
prune_menubar (f);
}
+
+int
+msw_char_is_accelerator (struct frame *f, Emchar ch)
+{
+ Lisp_Object hash = FRAME_MSWINDOWS_MENU_HASH_TABLE (f);
+
+ assert (HASH_TABLEP (hash));
+ /* !!#### not Mule-ized */
+ return !NILP (memq_no_quit (make_char (tolower (ch)),
+ Fgethash (Qt, hash, Qnil)));
+}
\f
/*------------------------------------------------------------------------*/
/* Message handlers */
/*------------------------------------------------------------------------*/
static Lisp_Object
-unsafe_handle_wm_initmenupopup_1 (HMENU menu, struct frame* f)
+unsafe_handle_wm_initmenupopup_1 (HMENU menu, struct frame *f)
{
/* This function can call lisp, beat dogs and stick chewing gum to
everything! */
}
static Lisp_Object
-unsafe_handle_wm_initmenu_1 (struct frame* f)
+unsafe_handle_wm_initmenu_1 (struct frame *f)
{
/* This function can call lisp */
update_frame_menubar_maybe (f);
current_menudesc = current_frame_menubar (f);
- current_hash_table = FRAME_MSWINDOWS_MENU_HASH_TABLE(f);
+ current_hash_table = FRAME_MSWINDOWS_MENU_HASH_TABLE (f);
assert (HASH_TABLEP (current_hash_table));
return Qt;
* command if we return nil
*/
Lisp_Object
-mswindows_handle_wm_command (struct frame* f, WORD id)
+mswindows_handle_wm_command (struct frame *f, WORD id)
{
/* Try to map the command id through the proper hash table */
Lisp_Object data, fn, arg, frame;
/*------------------------------------------------------------------------*/
static HMENU wm_initmenu_menu;
-static struct frame* wm_initmenu_frame;
+static struct frame *wm_initmenu_frame;
static Lisp_Object
unsafe_handle_wm_initmenupopup (Lisp_Object u_n_u_s_e_d)
}
Lisp_Object
-mswindows_handle_wm_initmenupopup (HMENU hmenu, struct frame* frm)
+mswindows_handle_wm_initmenupopup (HMENU hmenu, struct frame *frm)
{
/* We cannot pass hmenu as a lisp object. Use static var */
wm_initmenu_menu = hmenu;
}
Lisp_Object
-mswindows_handle_wm_initmenu (HMENU hmenu, struct frame* f)
+mswindows_handle_wm_initmenu (HMENU hmenu, struct frame *f)
{
/* Handle only frame menubar, ignore if from popup or system menu */
- if (GetMenu (FRAME_MSWINDOWS_HANDLE(f)) == hmenu)
+ if (GetMenu (FRAME_MSWINDOWS_HANDLE (f)) == hmenu)
{
wm_initmenu_frame = f;
return mswindows_protect_modal_loop (unsafe_handle_wm_initmenu, Qnil);
/*------------------------------------------------------------------------*/
static void
-mswindows_update_frame_menubars (struct frame* f)
+mswindows_update_frame_menubars (struct frame *f)
{
update_frame_menubar_maybe (f);
}
static void
-mswindows_free_frame_menubars (struct frame* f)
+mswindows_free_frame_menubars (struct frame *f)
{
- FRAME_MSWINDOWS_MENU_HASH_TABLE(f) = Qnil;
+ FRAME_MSWINDOWS_MENU_HASH_TABLE (f) = Qnil;
}
static void
HMENU menu;
POINT pt;
int ok;
+ struct gcpro gcpro1;
+
+ GCPRO1 (menu_desc); /* to be safe -- see above */
if (!NILP (event))
{
current_menudesc = menu_desc;
current_hash_table =
make_lisp_hash_table (10, HASH_TABLE_NON_WEAK, HASH_TABLE_EQUAL);
- menu = create_empty_popup_menu();
+ menu = create_empty_popup_menu ();
Fputhash (hmenu_to_lisp_object (menu), Qnil, current_hash_table);
top_level_menu = menu;
mswindows_unmodalize_signal_maybe ();
/* This is probably the only real reason for failure */
- if (!ok) {
- menu_cleanup (f);
- signal_simple_error ("Cannot track popup menu while in menu",
- menu_desc);
- }
+ if (!ok)
+ {
+ menu_cleanup (f);
+ signal_simple_error ("Cannot track popup menu while in menu",
+ menu_desc);
+ }
+ UNGCPRO;
}
\f
/* Synched up with: Not in FSF. */
-/* created 16-dec-91 by jwz */
+/* Authorship:
+
+ Created 16-dec-91 by Jamie Zawinski.
+ Menu filters and many other keywords added by Stig for 19.12.
+ Original device-abstraction work and GC cleanup work by Ben Wing for 19.13.
+ Menu accelerators c. 1997? by ??. Moved here from event-stream.c.
+ Other work post-1996 by ??.
+*/
#include <config.h>
#include "lisp.h"
#include "console-x.h"
#include "EmacsFrame.h"
#include "gui-x.h"
+#include "../lwlib/lwlib.h"
#include "buffer.h"
#include "commands.h" /* zmacs_regions */
-#include "gui.h"
#include "events.h"
#include "frame.h"
+#include "gui.h"
+#include "keymap.h"
+#include "menubar.h"
#include "opaque.h"
#include "window.h"
else if (VECTORP (desc))
{
Lisp_Object gui_item = gui_parse_item_keywords (desc);
- if (!button_item_to_widget_value (gui_item, wv, 1,
+ if (!button_item_to_widget_value (Qmenubar,
+ gui_item, wv, 1,
(menu_type == MENUBAR_TYPE
- && depth <= 1)))
+ && depth <= 1), 1))
{
/* :included form was nil */
wv = NULL;
wv->type = CASCADE_TYPE;
wv->enabled = 1;
wv->name = (char *) XSTRING_DATA (LISP_GETTEXT (XCAR (desc)));
- wv->name = xstrdup (wv->name);
+ wv->name = strdup_and_add_accel (wv->name);
accel = gui_name_accelerator (LISP_GETTEXT (XCAR (desc)));
wv->accel = LISP_TO_VOID (accel);
dummy->next = NULL;
goto menu_item_done;
- }
+ }
}
else if (menubar_root_p)
{
if (partition_seen)
error (
- "More than one partition (nil) in menubar description");
+ "More than one partition (nil) in menubar description");
partition_seen = 1;
next = xmalloc_widget_value ();
next->type = PUSHRIGHT_TYPE;
else
signal_simple_error ("Unrecognized menu descriptor", desc);
-menu_item_done:
+ menu_item_done:
if (wv)
{
static widget_value *
menu_item_descriptor_to_widget_value (Lisp_Object desc,
int menu_type, /* if this is a menubar,
- popup or sub menu */
+ popup or sub menu */
int deep_p, /* */
int filter_p) /* if :filter forms
should run now */
static Lisp_Object
restore_in_menu_callback (Lisp_Object val)
{
- in_menu_callback = XINT (val);
- return Qnil;
+ in_menu_callback = XINT (val);
+ return Qnil;
}
#endif /* LWLIB_MENUBARS_LUCID || LWLIB_MENUBARS_MOTIF */
them. We don't want the *first* command event to alter the state of the
region, so that the region can be available as an argument for the second
command.
- */
+ */
if (zmacs_regions)
zmacs_region_stays = 1;
}
\f
+
+#if defined(LWLIB_MENUBARS_LUCID)
+static void
+menu_move_up (void)
+{
+ widget_value *current = lw_get_entries (False);
+ widget_value *entries = lw_get_entries (True);
+ widget_value *prev = NULL;
+
+ while (entries != current)
+ {
+ if (entries->name /*&& entries->enabled*/) prev = entries;
+ entries = entries->next;
+ assert (entries);
+ }
+
+ if (!prev)
+ /* move to last item */
+ {
+ while (entries->next)
+ {
+ if (entries->name /*&& entries->enabled*/) prev = entries;
+ entries = entries->next;
+ }
+ if (prev)
+ {
+ if (entries->name /*&& entries->enabled*/)
+ prev = entries;
+ }
+ else
+ {
+ /* no selectable items in this menu, pop up to previous level */
+ lw_pop_menu ();
+ return;
+ }
+ }
+ lw_set_item (prev);
+}
+
+static void
+menu_move_down (void)
+{
+ widget_value *current = lw_get_entries (False);
+ widget_value *new = current;
+
+ while (new->next)
+ {
+ new = new->next;
+ if (new->name /*&& new->enabled*/) break;
+ }
+
+ if (new==current||!(new->name/*||new->enabled*/))
+ {
+ new = lw_get_entries (True);
+ while (new!=current)
+ {
+ if (new->name /*&& new->enabled*/) break;
+ new = new->next;
+ }
+ if (new==current&&!(new->name /*|| new->enabled*/))
+ {
+ lw_pop_menu ();
+ return;
+ }
+ }
+
+ lw_set_item (new);
+}
+
+static void
+menu_move_left (void)
+{
+ int level = lw_menu_level ();
+ int l = level;
+ widget_value *current;
+
+ while (level-- >= 3)
+ lw_pop_menu ();
+
+ menu_move_up ();
+ current = lw_get_entries (False);
+ if (l > 2 && current->contents)
+ lw_push_menu (current->contents);
+}
+
+static void
+menu_move_right (void)
+{
+ int level = lw_menu_level ();
+ int l = level;
+ widget_value *current;
+
+ while (level-- >= 3)
+ lw_pop_menu ();
+
+ menu_move_down ();
+ current = lw_get_entries (False);
+ if (l > 2 && current->contents)
+ lw_push_menu (current->contents);
+}
+
+static void
+menu_select_item (widget_value *val)
+{
+ if (val == NULL)
+ val = lw_get_entries (False);
+
+ /* is match a submenu? */
+
+ if (val->contents)
+ {
+ /* enter the submenu */
+
+ lw_set_item (val);
+ lw_push_menu (val->contents);
+ }
+ else
+ {
+ /* Execute the menu entry by calling the menu's `select'
+ callback function
+ */
+ lw_kill_menus (val);
+ }
+}
+
+Lisp_Object
+command_builder_operate_menu_accelerator (struct command_builder *builder)
+{
+ /* this function can GC */
+
+ struct console *con = XCONSOLE (Vselected_console);
+ Lisp_Object evee = builder->most_current_event;
+ Lisp_Object binding;
+ widget_value *entries;
+
+ extern int lw_menu_accelerate; /* lwlib.c */
+
+#if 0
+ {
+ int i;
+ Lisp_Object t;
+ char buf[50];
+
+ t = builder->current_events;
+ i = 0;
+ while (!NILP (t))
+ {
+ i++;
+ sprintf (buf,"OPERATE (%d): ",i);
+ write_c_string (buf, Qexternal_debugging_output);
+ print_internal (t, Qexternal_debugging_output, 1);
+ write_c_string ("\n", Qexternal_debugging_output);
+ t = XEVENT_NEXT (t);
+ }
+ }
+#endif /* 0 */
+
+ /* menu accelerator keys don't go into keyboard macros */
+ if (!NILP (con->defining_kbd_macro) && NILP (Vexecuting_macro))
+ con->kbd_macro_ptr = con->kbd_macro_end;
+
+ /* don't echo menu accelerator keys */
+ /*reset_key_echo (builder, 1);*/
+
+ if (!lw_menu_accelerate)
+ {
+ /* `convert' mouse display to keyboard display
+ by entering the open submenu
+ */
+ entries = lw_get_entries (False);
+ if (entries->contents)
+ {
+ lw_push_menu (entries->contents);
+ lw_display_menu (CurrentTime);
+ }
+ }
+
+ /* compare event to the current menu accelerators */
+
+ entries=lw_get_entries (True);
+
+ while (entries)
+ {
+ Lisp_Object accel;
+ VOID_TO_LISP (accel, entries->accel);
+ if (entries->name && !NILP (accel))
+ {
+ if (event_matches_key_specifier_p (XEVENT (evee), accel))
+ {
+ /* a match! */
+
+ menu_select_item (entries);
+
+ if (lw_menu_active) lw_display_menu (CurrentTime);
+
+ reset_this_command_keys (Vselected_console, 1);
+ /*reset_command_builder_event_chain (builder);*/
+ return Vmenu_accelerator_map;
+ }
+ }
+ entries = entries->next;
+ }
+
+ /* try to look up event in menu-accelerator-map */
+
+ binding = event_binding_in (evee, Vmenu_accelerator_map, 1);
+
+ if (NILP (binding))
+ {
+ /* beep at user for undefined key */
+ return Qnil;
+ }
+ else
+ {
+ if (EQ (binding, Qmenu_quit))
+ {
+ /* turn off menus and set quit flag */
+ lw_kill_menus (NULL);
+ Vquit_flag = Qt;
+ }
+ else if (EQ (binding, Qmenu_up))
+ {
+ int level = lw_menu_level ();
+ if (level > 2)
+ menu_move_up ();
+ }
+ else if (EQ (binding, Qmenu_down))
+ {
+ int level = lw_menu_level ();
+ if (level > 2)
+ menu_move_down ();
+ else
+ menu_select_item (NULL);
+ }
+ else if (EQ (binding, Qmenu_left))
+ {
+ int level = lw_menu_level ();
+ if (level > 3)
+ {
+ lw_pop_menu ();
+ lw_display_menu (CurrentTime);
+ }
+ else
+ menu_move_left ();
+ }
+ else if (EQ (binding, Qmenu_right))
+ {
+ int level = lw_menu_level ();
+ if (level > 2 &&
+ lw_get_entries (False)->contents)
+ {
+ widget_value *current = lw_get_entries (False);
+ if (current->contents)
+ menu_select_item (NULL);
+ }
+ else
+ menu_move_right ();
+ }
+ else if (EQ (binding, Qmenu_select))
+ menu_select_item (NULL);
+ else if (EQ (binding, Qmenu_escape))
+ {
+ int level = lw_menu_level ();
+
+ if (level > 2)
+ {
+ lw_pop_menu ();
+ lw_display_menu (CurrentTime);
+ }
+ else
+ {
+ /* turn off menus quietly */
+ lw_kill_menus (NULL);
+ }
+ }
+ else if (KEYMAPP (binding))
+ {
+ /* prefix key */
+ reset_this_command_keys (Vselected_console, 1);
+ /*reset_command_builder_event_chain (builder);*/
+ return binding;
+ }
+ else
+ {
+ /* turn off menus and execute binding */
+ lw_kill_menus (NULL);
+ reset_this_command_keys (Vselected_console, 1);
+ /*reset_command_builder_event_chain (builder);*/
+ return binding;
+ }
+ }
+
+ if (lw_menu_active) lw_display_menu (CurrentTime);
+
+ reset_this_command_keys (Vselected_console, 1);
+ /*reset_command_builder_event_chain (builder);*/
+
+ return Vmenu_accelerator_map;
+}
+
+static Lisp_Object
+menu_accelerator_junk_on_error (Lisp_Object errordata, Lisp_Object ignored)
+{
+ Vmenu_accelerator_prefix = Qnil;
+ Vmenu_accelerator_modifiers = Qnil;
+ Vmenu_accelerator_enabled = Qnil;
+ if (!NILP (errordata))
+ {
+ Lisp_Object args[2];
+
+ args[0] = build_string ("Error in menu accelerators (setting to nil)");
+ /* #### This should call
+ (with-output-to-string (display-error errordata))
+ but that stuff is all in Lisp currently. */
+ args[1] = errordata;
+ warn_when_safe_lispobj
+ (Qerror, Qwarning,
+ emacs_doprnt_string_lisp ((const Bufbyte *) "%s: %s",
+ Qnil, -1, 2, args));
+ }
+
+ return Qnil;
+}
+
+static Lisp_Object
+menu_accelerator_safe_compare (Lisp_Object event0)
+{
+ if (CONSP (Vmenu_accelerator_prefix))
+ {
+ Lisp_Object t;
+ t=Vmenu_accelerator_prefix;
+ while (!NILP (t)
+ && !NILP (event0)
+ && event_matches_key_specifier_p (XEVENT (event0), Fcar (t)))
+ {
+ t = Fcdr (t);
+ event0 = XEVENT_NEXT (event0);
+ }
+ if (!NILP (t))
+ return Qnil;
+ }
+ else if (NILP (event0))
+ return Qnil;
+ else if (event_matches_key_specifier_p (XEVENT (event0), Vmenu_accelerator_prefix))
+ event0 = XEVENT_NEXT (event0);
+ else
+ return Qnil;
+ return event0;
+}
+
+static Lisp_Object
+menu_accelerator_safe_mod_compare (Lisp_Object cons)
+{
+ return (event_matches_key_specifier_p (XEVENT (XCAR (cons)), XCDR (cons))
+ ? Qt
+ : Qnil);
+}
+
+Lisp_Object
+command_builder_find_menu_accelerator (struct command_builder *builder)
+{
+ /* this function can GC */
+ Lisp_Object event0 = builder->current_events;
+ struct console *con = XCONSOLE (Vselected_console);
+ struct frame *f = XFRAME (CONSOLE_SELECTED_FRAME (con));
+ Widget menubar_widget;
+
+ /* compare entries in event0 against the menu prefix */
+
+ if ((!CONSOLE_X_P (XCONSOLE (builder->console))) || NILP (event0) ||
+ XEVENT (event0)->event_type != key_press_event)
+ return Qnil;
+
+ if (!NILP (Vmenu_accelerator_prefix))
+ {
+ event0 = condition_case_1 (Qerror,
+ menu_accelerator_safe_compare,
+ event0,
+ menu_accelerator_junk_on_error,
+ Qnil);
+ }
+
+ if (NILP (event0))
+ return Qnil;
+
+ menubar_widget = FRAME_X_MENUBAR_WIDGET (f);
+ if (menubar_widget
+ && CONSP (Vmenu_accelerator_modifiers))
+ {
+ Lisp_Object fake;
+ Lisp_Object last = Qnil;
+ struct gcpro gcpro1;
+ Lisp_Object matchp;
+
+ widget_value *val;
+ LWLIB_ID id = XPOPUP_DATA (f->menubar_data)->id;
+
+ val = lw_get_all_values (id);
+ if (val)
+ {
+ val = val->contents;
+
+ fake = Fcopy_sequence (Vmenu_accelerator_modifiers);
+ last = fake;
+
+ while (!NILP (Fcdr (last)))
+ last = Fcdr (last);
+
+ Fsetcdr (last, Fcons (Qnil, Qnil));
+ last = Fcdr (last);
+ }
+
+ fake = Fcons (Qnil, fake);
+
+ GCPRO1 (fake);
+
+ while (val)
+ {
+ Lisp_Object accel;
+ VOID_TO_LISP (accel, val->accel);
+ if (val->name && !NILP (accel))
+ {
+ Fsetcar (last, accel);
+ Fsetcar (fake, event0);
+ matchp = condition_case_1 (Qerror,
+ menu_accelerator_safe_mod_compare,
+ fake,
+ menu_accelerator_junk_on_error,
+ Qnil);
+ if (!NILP (matchp))
+ {
+ /* we found one! */
+
+ lw_set_menu (menubar_widget, val);
+ /* yah - yet another hack.
+ pretend emacs timestamp is the same as an X timestamp,
+ which for the moment it is. (read events.h)
+ */
+ lw_map_menu (XEVENT (event0)->timestamp);
+
+ if (val->contents)
+ lw_push_menu (val->contents);
+
+ lw_display_menu (CurrentTime);
+
+ /* menu accelerator keys don't go into keyboard macros */
+ if (!NILP (con->defining_kbd_macro)
+ && NILP (Vexecuting_macro))
+ con->kbd_macro_ptr = con->kbd_macro_end;
+
+ /* don't echo menu accelerator keys */
+ /*reset_key_echo (builder, 1);*/
+ reset_this_command_keys (Vselected_console, 1);
+ UNGCPRO;
+
+ return Vmenu_accelerator_map;
+ }
+ }
+
+ val = val->next;
+ }
+
+ UNGCPRO;
+ }
+ return Qnil;
+}
+
+int
+x_kludge_lw_menu_active (void)
+{
+ return lw_menu_active;
+}
+
+DEFUN ("accelerate-menu", Faccelerate_menu, 0, 0, "_", /*
+Make the menubar active. Menu items can be selected using menu accelerators
+or by actions defined in menu-accelerator-map.
+*/
+ ())
+{
+ struct console *con = XCONSOLE (Vselected_console);
+ struct frame *f = XFRAME (CONSOLE_SELECTED_FRAME (con));
+ LWLIB_ID id;
+ widget_value *val;
+
+ if (NILP (f->menubar_data))
+ error ("Frame has no menubar.");
+
+ id = XPOPUP_DATA (f->menubar_data)->id;
+ val = lw_get_all_values (id);
+ val = val->contents;
+ lw_set_menu (FRAME_X_MENUBAR_WIDGET (f), val);
+ lw_map_menu (CurrentTime);
+
+ lw_display_menu (CurrentTime);
+
+ /* menu accelerator keys don't go into keyboard macros */
+ if (!NILP (con->defining_kbd_macro) && NILP (Vexecuting_macro))
+ con->kbd_macro_ptr = con->kbd_macro_end;
+
+ return Qnil;
+}
+#endif /* LWLIB_MENUBARS_LUCID */
+
+\f
void
syms_of_menubar_x (void)
{
+#if defined(LWLIB_MENUBARS_LUCID)
+ DEFSUBR (Faccelerate_menu);
+#endif
}
void
/* Synched up with: Not in FSF. */
-/* #### There ain't much here because menubars have not been
- properly abstracted yet. */
+/* Authorship:
+
+ Created by Ben Wing as part of device-abstraction work for 19.12.
+ Menu filters and many other keywords added by Stig for 19.12.
+ Menu accelerators c. 1997? by ??. Moved here from event-stream.c.
+ Much other work post-1996 by ??.
+*/
#include <config.h>
#include "lisp.h"
#include "device.h"
#include "frame.h"
#include "gui.h"
+#include "keymap.h"
#include "menubar.h"
#include "redisplay.h"
#include "window.h"
Lisp_Object Vmenubar_pointer_glyph;
+/* prefix key(s) that must match in order to activate menu.
+ This is ugly. fix me.
+ */
+Lisp_Object Vmenu_accelerator_prefix;
+
+/* list of modifier keys to match accelerator for top level menus */
+Lisp_Object Vmenu_accelerator_modifiers;
+
+/* whether menu accelerators are enabled */
+Lisp_Object Vmenu_accelerator_enabled;
+
+/* keymap for auxiliary menu accelerator functions */
+Lisp_Object Vmenu_accelerator_map;
+
+Lisp_Object Qmenu_force;
+Lisp_Object Qmenu_fallback;
+Lisp_Object Qmenu_quit;
+Lisp_Object Qmenu_up;
+Lisp_Object Qmenu_down;
+Lisp_Object Qmenu_left;
+Lisp_Object Qmenu_right;
+Lisp_Object Qmenu_select;
+Lisp_Object Qmenu_escape;
+
static int
menubar_variable_changed (Lisp_Object sym, Lisp_Object *val,
Lisp_Object in_object, int flags)
}
Lisp_Object
-current_frame_menubar (CONST struct frame* f)
+current_frame_menubar (const struct frame* f)
{
struct window *w = XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f));
return symbol_value_in_buffer (Qcurrent_menubar, w->buffer);
Lisp_Object
menu_parse_submenu_keywords (Lisp_Object desc, Lisp_Object gui_item)
{
- Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+ Lisp_Gui_Item *pgui_item = XGUI_ITEM (gui_item);
/* Menu descriptor should be a list */
CHECK_CONS (desc);
(desc, path))
{
Lisp_Object path_entry, submenu_desc, submenu;
- struct gcpro gcpro1;
+ struct gcpro gcpro1, gcpro2;
Lisp_Object gui_item = allocate_gui_item ();
Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
- GCPRO1 (gui_item);
+ GCPRO2 (gui_item, desc);
EXTERNAL_LIST_LOOP (path_entry, path)
{
DEFUN ("normalize-menu-item-name", Fnormalize_menu_item_name, 1, 2, 0, /*
Convert a menu item name string into normal form, and return the new string.
Menu item names should be converted to normal form before being compared.
+This removes %_'s (accelerator indications) and converts %% to %.
*/
(name, buffer))
{
syms_of_menubar (void)
{
defsymbol (&Qcurrent_menubar, "current-menubar");
+
+ defsymbol (&Qmenu_force, "menu-force");
+ defsymbol (&Qmenu_fallback, "menu-fallback");
+
+ defsymbol (&Qmenu_quit, "menu-quit");
+ defsymbol (&Qmenu_up, "menu-up");
+ defsymbol (&Qmenu_down, "menu-down");
+ defsymbol (&Qmenu_left, "menu-left");
+ defsymbol (&Qmenu_right, "menu-right");
+ defsymbol (&Qmenu_select, "menu-select");
+ defsymbol (&Qmenu_escape, "menu-escape");
+
DEFSUBR (Fpopup_menu);
DEFSUBR (Fnormalize_menu_item_name);
DEFSUBR (Fmenu_find_real_submenu);
toplevel menus, it is ignored. This string is not displayed in the menu
itself.
-Immediately following the name string of the menu, any of three
-optional keyword-value pairs is permitted.
+Menu accelerators can be indicated in the string by putting the
+sequence "%_" before the character corresponding to the key that will
+invoke the menu or menu item. Uppercase and lowercase accelerators
+are equivalent. The sequence "%%" is also special, and is translated
+into a single %.
+
+If no menu accelerator is present in the string, XEmacs will act as if
+the first character has been tagged as an accelerator.
+
+Immediately following the name string of the menu, various optional
+keyword-value pairs are permitted: currently, :filter, :active, :included,
+and :config. (See below.)
If an element of a menu (or menubar) is a string, then that string will be
presented as unselectable text.
If an element of a menu is a string consisting solely of hyphens, then that
item will be presented as a solid horizontal line.
+If an element of a menu is a string beginning with "--:", it will be
+presented as a line whose appearance is controlled by the rest of the
+text in the string. The allowed line specs are system-dependent, and
+currently work only under X Windows (with Lucid and Motif menubars);
+otherwise, a solid horizontal line is presented, as if the string were
+all hyphens.
+
+The possibilities are:
+
+ "--:singleLine"
+ "--:doubleLine"
+ "--:singleDashedLine"
+ "--:doubleDashedLine"
+ "--:noLine"
+ "--:shadowEtchedIn"
+ "--:shadowEtchedOut"
+ "--:shadowEtchedInDash"
+ "--:shadowEtchedOutDash"
+ "--:shadowDoubleEtchedIn" (Lucid menubars only)
+ "--:shadowDoubleEtchedOut" (Lucid menubars only)
+ "--:shadowDoubleEtchedInDash" (Lucid menubars only)
+ "--:shadowDoubleEtchedOutDash" (Lucid menubars only)
+
If an element of a menu is a list, it is treated as a submenu. The name of
that submenu (the first element in the list) will be used as the name of the
item representing this menu on the parent.
which are flushright.
Otherwise, the element must be a vector, which describes a menu item.
-A menu item can have any of the following forms:
+A menu item is of the following form:
+
+ [ "name" callback :<keyword> <value> :<keyword> <value> ... ]
+
+The following forms are also accepted for compatibility, but deprecated:
[ "name" callback <active-p> ]
[ "name" callback <active-p> <suffix> ]
- [ "name" callback :<keyword> <value> :<keyword> <value> ... ]
The name is the string to display on the menu; it is filtered through the
resource database, so it is possible for resources to override what string
-is actually displayed.
+is actually displayed. Menu accelerator indicators (the sequence `%_') are
+also processed; see above. If the name is not a string, it will be
+evaluated with `eval', and the result should be a string.
If the `callback' of a menu item is a symbol, then it must name a command.
It will be invoked with `call-interactively'. If it is a list, then it is
evaluated with `eval'.
-The possible keywords are this:
+In the deprecated forms, <active-p> is equivalent to using the :active
+keyword, and <suffix> is equivalent to using the :suffix keyword.
- :active <form> Same as <active-p> in the first two forms: the
- expression is evaluated just before the menu is
+The possible keywords are:
+
+ :active <form> The expression is evaluated just before the menu is
displayed, and the menu will be selectable only if
the result is non-nil.
- :suffix <form> Same as <suffix> in the second form: the expression
- is evaluated just before the menu is displayed and
- resulting string is appended to the displayed name,
- providing a convenient way of adding the name of a
- command's ``argument'' to the menu, like
- ``Kill Buffer NAME''.
+ :suffix <form> The expression is evaluated just before the menu is
+ displayed and the resulting string is appended to
+ the displayed name, providing a convenient way of
+ adding the name of a command's ``argument'' to the
+ menu, like ``Kill Buffer NAME''.
:keys "string" Normally, the keyboard equivalents of commands in
menus are displayed when the `callback' is a symbol.
See the variable `menubar-configuration'.
:filter <function> A menu filter can only be used in a menu item list.
- (i.e.: not in a menu item itself). It is used to
- sensitize or incrementally create a submenu only when
- it is selected by the user and not every time the
- menubar is activated. The filter function is passed
- the list of menu items in the submenu and must return a
- list of menu items to be used for the menu. It is
- called only when the menu is about to be displayed, so
- other menus may already be displayed. Vile and
- terrible things will happen if a menu filter function
- changes the current buffer, window, or frame. It
- also should not raise, lower, or iconify any frames.
- Basically, the filter function should have no
- side-effects.
+ (i.e. not in a menu item itself). It is used to
+ incrementally create a submenu only when it is selected
+ by the user and not every time the menubar is activated.
+ The filter function is passed the list of menu items in
+ the submenu and must return a list of menu items to be
+ used for the menu. It must not destructively modify
+ the list of menu items passed to it. It is called only
+ when the menu is about to be displayed, so other menus
+ may already be displayed. Vile and terrible things will
+ happen if a menu filter function changes the current
+ buffer, window, or frame. It also should not raise,
+ lower, or iconify any frames. Basically, the filter
+ function should have no side-effects.
:key-sequence keys Used in FSF Emacs as an hint to an equivalent keybinding.
- Ignored by XEnacs for easymenu.el compatibility.
-
- :label <form> (unimplemented!) Like :suffix, but replaces label
- completely.
- (might be added in 21.2).
+ Ignored by XEmacs for easymenu.el compatibility.
For example:
- ("File"
+ ("%_File"
:filter file-menu-filter ; file-menu-filter is a function that takes
; one argument (a list of menu items) and
; returns a list of menu items
- [ "Save As..." write-file t ]
- [ "Revert Buffer" revert-buffer (buffer-modified-p) ]
- [ "Read Only" toggle-read-only :style toggle
+ [ "Save %_As..." write-file t ]
+ [ "%_Revert Buffer" revert-buffer (buffer-modified-p) ]
+ [ "R%_ead Only" toggle-read-only :style toggle
:selected buffer-read-only ]
)
-See x-menubar.el for many more examples.
+See menubar-items.el for many more examples.
After the menubar is clicked upon, but before any menus are popped up,
the functions on the `activate-menubar-hook' are invoked to make top-level
changes to the menus and menubar. Note, however, that the use of menu
filters (using the :filter keyword) is usually a more efficient way to
-dynamically alter or sensitize menus.
-*/, menubar_variable_changed);
+dynamically alter or sensitize menus. */, menubar_variable_changed);
Vcurrent_menubar = Qnil;
default pointer is used.
*/ );
+ DEFVAR_LISP ("menu-accelerator-prefix", &Vmenu_accelerator_prefix /*
+Prefix key(s) that must be typed before menu accelerators will be activated.
+Set this to a value acceptable by define-key.
+
+NOTE: This currently only has any effect under X Windows.
+*/ );
+ Vmenu_accelerator_prefix = Qnil;
+
+ DEFVAR_LISP ("menu-accelerator-modifiers", &Vmenu_accelerator_modifiers /*
+Modifier keys which must be pressed to get to the top level menu accelerators.
+This is a list of modifier key symbols. All modifier keys must be held down
+while a valid menu accelerator key is pressed in order for the top level
+menu to become active.
+
+NOTE: This currently only has any effect under X Windows.
+
+See also menu-accelerator-enabled and menu-accelerator-prefix.
+*/ );
+ Vmenu_accelerator_modifiers = list1 (Qmeta);
+
+ DEFVAR_LISP ("menu-accelerator-enabled", &Vmenu_accelerator_enabled /*
+Whether menu accelerator keys can cause the menubar to become active.
+If 'menu-force or 'menu-fallback, then menu accelerator keys can
+be used to activate the top level menu. Once the menubar becomes active, the
+accelerator keys can be used regardless of the value of this variable.
+
+menu-force is used to indicate that the menu accelerator key takes
+precedence over bindings in the current keymap(s). menu-fallback means
+that bindings in the current keymap take precedence over menu accelerator keys.
+Thus a top level menu with an accelerator of "T" would be activated on a
+keypress of Meta-t if menu-accelerator-enabled is menu-force.
+However, if menu-accelerator-enabled is menu-fallback, then
+Meta-t will not activate the menubar and will instead run the function
+transpose-words, to which it is normally bound.
+
+See also menu-accelerator-modifiers and menu-accelerator-prefix.
+*/ );
+ Vmenu_accelerator_enabled = Qnil;
+
+ DEFVAR_LISP ("menu-accelerator-map", &Vmenu_accelerator_map /*
+Keymap for use when the menubar is active.
+The actions menu-quit, menu-up, menu-down, menu-left, menu-right,
+menu-select and menu-escape can be mapped to keys in this map.
+NOTE: This currently only has any effect under X Windows.
+
+menu-quit Immediately deactivate the menubar and any open submenus without
+ selecting an item.
+menu-up Move the menu cursor up one row in the current menu. If the
+ move extends past the top of the menu, wrap around to the bottom.
+menu-down Move the menu cursor down one row in the current menu. If the
+ move extends past the bottom of the menu, wrap around to the top.
+ If executed while the cursor is in the top level menu, move down
+ into the selected menu.
+menu-left Move the cursor from a submenu into the parent menu. If executed
+ while the cursor is in the top level menu, move the cursor to the
+ left. If the move extends past the left edge of the menu, wrap
+ around to the right edge.
+menu-right Move the cursor into a submenu. If the cursor is located in the
+ top level menu or is not currently on a submenu heading, then move
+ the cursor to the next top level menu entry. If the move extends
+ past the right edge of the menu, wrap around to the left edge.
+menu-select Activate the item under the cursor. If the cursor is located on
+ a submenu heading, then move the cursor into the submenu.
+menu-escape Pop up to the next level of menus. Moves from a submenu into its
+ parent menu. From the top level menu, this deactivates the
+ menubar.
+
+This keymap can also contain normal key-command bindings, in which case the
+menubar is deactivated and the corresponding command is executed.
+
+The action bindings used by the menu accelerator code are designed to mimic
+the actions of menu traversal keys in a commonly used PC operating system.
+*/ );
+
Fprovide (intern ("menubar"));
}
complex_vars_of_menubar (void)
{
Vmenubar_pointer_glyph = Fmake_glyph_internal (Qpointer);
+
+ Vmenu_accelerator_map = Fmake_keymap (Qnil);
}
/* Synched up with: Not in FSF. */
-/* #### Not properly abstracted for device-independence. */
+/* #### Still needs some device-abstraction work. */
#ifndef INCLUDED_menubar_h_
#define INCLUDED_menubar_h_
void free_frame_menubars (struct frame *f);
Lisp_Object menu_parse_submenu_keywords (Lisp_Object desc,
Lisp_Object gui_item);
-Lisp_Object current_frame_menubar (CONST struct frame* f);
+Lisp_Object current_frame_menubar (const struct frame* f);
EXFUN (Fmenu_find_real_submenu, 2);
+extern Lisp_Object Vmenu_accelerator_prefix;
+extern Lisp_Object Vmenu_accelerator_modifiers;
+extern Lisp_Object Vmenu_accelerator_enabled;
+extern Lisp_Object Vmenu_accelerator_map;
+
+extern Lisp_Object Qmenu_force;
+extern Lisp_Object Qmenu_fallback;
+
+extern Lisp_Object Qmenu_quit;
+extern Lisp_Object Qmenu_up;
+extern Lisp_Object Qmenu_down;
+extern Lisp_Object Qmenu_left;
+extern Lisp_Object Qmenu_right;
+extern Lisp_Object Qmenu_select;
+extern Lisp_Object Qmenu_escape;
+
+
+/* #### kluuuuuuuuuuuuuuuuuuuuuuuuuuuudge!
+ The author of the accelerator code didn't know what the hell he was doing.
+ Someone needs to abstract this properly. */
+#if defined(HAVE_X_WINDOWS) && defined(LWLIB_MENUBARS_LUCID)
+extern int x_kludge_lw_menu_active (void);
+struct command_builder;
+Lisp_Object command_builder_find_menu_accelerator (struct command_builder
+ *builder);
+Lisp_Object command_builder_operate_menu_accelerator (struct command_builder
+ *builder);
+
+extern int in_menu_callback;
+#endif
+
#endif /* HAVE_MENUBARS */
#endif /* INCLUDED_menubar_h_ */
if IGNORE_CASE is true. */
Charcount
-scmp_1 (CONST Bufbyte *s1, CONST Bufbyte *s2, Charcount len,
+scmp_1 (const Bufbyte *s1, const Bufbyte *s2, Charcount len,
int ignore_case)
{
Charcount l = len;
int
-regexp_ignore_completion_p (CONST Bufbyte *nonreloc,
+regexp_ignore_completion_p (const Bufbyte *nonreloc,
Lisp_Object reloc, Bytecount offset,
Bytecount length)
{
}
else
{
- write_string_to_stdio_stream (stderr, 0, (CONST Bufbyte *) "\n", 0, 1,
- Qterminal);
+ write_string_to_stdio_stream (stderr, 0, (const Bufbyte *) "\n", 0, 1,
+ Qterminal, 0);
return Qnil;
}
}
}
void
-echo_area_append (struct frame *f, CONST Bufbyte *nonreloc, Lisp_Object reloc,
+echo_area_append (struct frame *f, const Bufbyte *nonreloc, Lisp_Object reloc,
Bytecount offset, Bytecount length,
Lisp_Object label)
{
if (STRINGP (reloc))
nonreloc = XSTRING_DATA (reloc);
write_string_to_stdio_stream (stderr, 0, nonreloc, offset, length,
- Qterminal);
+ Qterminal, 0);
}
}
void
-echo_area_message (struct frame *f, CONST Bufbyte *nonreloc,
+echo_area_message (struct frame *f, const Bufbyte *nonreloc,
Lisp_Object reloc, Bytecount offset, Bytecount length,
Lisp_Object label)
{
/* Dump an informative message to the echo area. This function takes a
string in internal format. */
void
-message_internal (CONST Bufbyte *nonreloc, Lisp_Object reloc,
+message_internal (const Bufbyte *nonreloc, Lisp_Object reloc,
Bytecount offset, Bytecount length)
{
/* This function can call lisp */
}
void
-message_append_internal (CONST Bufbyte *nonreloc, Lisp_Object reloc,
+message_append_internal (const Bufbyte *nonreloc, Lisp_Object reloc,
Bytecount offset, Bytecount length)
{
/* This function can call lisp */
on the format string; message_no_translate() does not. */
static void
-message_1 (CONST char *fmt, va_list args)
+message_1 (const char *fmt, va_list args)
{
/* This function can call lisp */
if (fmt)
struct gcpro gcpro1;
/* message_internal() might GC, e.g. if there are after-change-hooks
on the echo area buffer */
- Lisp_Object obj = emacs_doprnt_string_va ((CONST Bufbyte *) fmt, Qnil,
+ Lisp_Object obj = emacs_doprnt_string_va ((const Bufbyte *) fmt, Qnil,
-1, args);
GCPRO1 (obj);
message_internal (0, obj, 0, -1);
}
static void
-message_append_1 (CONST char *fmt, va_list args)
+message_append_1 (const char *fmt, va_list args)
{
/* This function can call lisp */
if (fmt)
struct gcpro gcpro1;
/* message_internal() might GC, e.g. if there are after-change-hooks
on the echo area buffer */
- Lisp_Object obj = emacs_doprnt_string_va ((CONST Bufbyte *) fmt, Qnil,
+ Lisp_Object obj = emacs_doprnt_string_va ((const Bufbyte *) fmt, Qnil,
-1, args);
GCPRO1 (obj);
message_append_internal (0, obj, 0, -1);
}
void
-message (CONST char *fmt, ...)
+message (const char *fmt, ...)
{
/* This function can call lisp */
/* I think it's OK to pass the data of Lisp strings as arguments to
}
void
-message_append (CONST char *fmt, ...)
+message_append (const char *fmt, ...)
{
/* This function can call lisp */
va_list args;
}
void
-message_no_translate (CONST char *fmt, ...)
+message_no_translate (const char *fmt, ...)
{
/* This function can call lisp */
/* I think it's OK to pass the data of Lisp strings as arguments to
#define UNUSED(x) ((void)(x))
#else
#define UNUSED(x)
-#define __inline__
#endif
/* Maintain global variable for keeping parser state information; this struct
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)
+static inline int waverequire(void **data,size_t *sz,size_t rq)
{
int rc = 1;
}
/* ...and next we remove this many bytes from the buffer */
-static __inline__ void waveremove(size_t rq)
+static inline void waveremove(size_t rq)
{
if (parsestate.wave.left <= rq)
parsestate.wave.left = 0;
/* 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)
+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] = {
}
DEFUN ("canna-henkan-begin", Fcanna_henkan_begin, 1, 1, 0, /*
-¤«¤Ê´Á»úÊÑ´¹¤·¤¿·ë²Ì¤òÊÖ´Ô¤¹¤ë¡£Ê¸ÀáÀڤ꤬¤·¤Æ¤¢¤ë¡£
+Return the result of kana-to-kanji conversion.
+Clause separator is set.
*/
(yomi))
{
}
DEFUN ("canna-henkan-next", Fcanna_henkan_next, 1, 1, 0, /*
-¸õÊä°ìÍ÷¤òµá¤á¤ë¡£
+Return the list of candidates.
*/
(bunsetsu))
{
}
else
{
- endp = XCDR (endp) = Fcons (make_string (p, slen), Qnil);
+ endp = XCDR (res) = Fcons (make_string (p, slen), Qnil);
}
p += slen + 1;
}
}
DEFUN ("canna-bunsetu-henkou", Fcanna_bunsetu_henkou, 2, 2, 0, /*
-ʸÀá¤ÎŤµ¤ò»ØÄꤹ¤ë¡£
+Specify the length of a clause.
*/
(bunsetsu, bunlen))
{
}
DEFUN ("canna-henkan-kakutei", Fcanna_henkan_kakutei, 2, 2, 0, /*
-¸õÊäÁªÂò¡£
+Select a candidate.
*/
(bun, kouho))
{
}
DEFUN ("canna-henkan-end", Fcanna_henkan_end, 0, 0, 0, /*
-ÊÑ´¹½ªÎ»¡£
+End conversion.
*/
())
{
}
DEFUN ("canna-henkan-quit", Fcanna_henkan_quit, 0, 0, 0, /*
-ÊÑ´¹½ªÎ»¡£
+Quit conversion.
*/
())
{
/* EUC multibyte string to MULE internal string */
-#ifdef UTF2000
static void
c2mu (unsigned char *cp, int l, unsigned char *mp)
{
- Emchar chr;
unsigned char ch, *ep = cp+l;
+#ifdef UTF2000
+ Emchar chr;
while ((cp < ep) && (ch = *cp++))
{
*mp++ = (chr & 0x3f) | 0x80;
}
}
- *mp = 0;
-}
#else
-static void
-c2mu (char *cp, int l, char *mp)
-{
- char ch, *ep = cp+l;
-
while ((cp < ep) && (ch = *cp))
{
if ((unsigned char) ch == ISO_CODE_SS2)
}
*mp++ = *cp++;
}
+#endif
*mp = 0;
}
-#endif
/* MULE internal string to EUC multibyte string */
#define CCL_WriteConstJump 0x08 /* Write constant and jump:
1:A--D--D--R--E--S--S-000XXXXX
- 2:CONST
+ 2:const
------------------------------
- write (CONST);
+ write (const);
IC += ADDRESS;
*/
#define CCL_WriteConstReadJump 0x09 /* Write constant, read, and jump:
1:A--D--D--R--E--S--S-rrrXXXXX
- 2:CONST
+ 2:const
3:A--D--D--R--E--S--S-rrrYYYYY
-----------------------------
- write (CONST);
+ write (const);
IC += 2;
read (reg[rrr]);
IC += ADDRESS;
static struct ccl_prog_stack ccl_prog_stack_struct[256];
int
-ccl_driver (struct ccl_program *ccl, CONST unsigned char *source,
+ccl_driver (struct ccl_program *ccl, const unsigned char *source,
unsigned_char_dynarr *destination, int src_bytes,
int *consumed, int conversion_mode)
{
int code = -1; /* init to illegal value, */
int field1, field2;
Lisp_Object *ccl_prog = ccl->prog;
- CONST unsigned char *src = source, *src_end = src + src_bytes;
+ const unsigned char *src = source, *src_end = src + src_bytes;
int jump_address = 0; /* shut up the compiler */
int i, j, op;
int stack_idx = ccl->stack_idx;
? XINT (XVECTOR_DATA (reg)[i])
: 0);
- ccl_driver (&ccl, (CONST unsigned char *)0, (unsigned_char_dynarr *)0,
+ ccl_driver (&ccl, (const unsigned char *)0, (unsigned_char_dynarr *)0,
0, (int *)0, CCL_MODE_ENCODING);
QUIT;
if (ccl.status != CCL_STAT_SUCCESS)
#define CCL_MODE_ENCODING 0
#define CCL_MODE_DECODING 1
-int ccl_driver (struct ccl_program *ccl, CONST unsigned char *source,
+int ccl_driver (struct ccl_program *ccl, const unsigned char *source,
unsigned_char_dynarr *destination, int src_bytes,
int *consumed, int conversion_mode);
void setup_ccl_program (struct ccl_program *ccl, Lisp_Object val);
Lisp_Object Vcharset_hash_table;
-#ifdef UTF2000
-static Charset_ID next_allocated_leading_byte;
-#else
-static Charset_ID next_allocated_1_byte_leading_byte;
-static Charset_ID next_allocated_2_byte_leading_byte;
-#endif
-
/* Composite characters are characters constructed by overstriking two
or more regular characters.
Use the macro charptr_emchar() instead. */
Emchar
-non_ascii_charptr_emchar (CONST Bufbyte *str)
+non_ascii_charptr_emchar (const Bufbyte *str)
{
#ifdef UTF2000
Bufbyte b;
charptr_copy_char() instead. */
Bytecount
-non_ascii_charptr_copy_char (CONST Bufbyte *ptr, Bufbyte *str)
+non_ascii_charptr_copy_char (const Bufbyte *ptr, Bufbyte *str)
{
Bufbyte *strptr = str;
*strptr = *ptr++;
Charset_ID lb;
#ifdef UTF2000
- if (next_allocated_leading_byte > MAX_LEADING_BYTE_PRIVATE)
+ if (chlook->next_allocated_leading_byte > MAX_LEADING_BYTE_PRIVATE)
lb = 0;
else
- lb = next_allocated_leading_byte++;
+ lb = chlook->next_allocated_leading_byte++;
#else
if (dimension == 1)
{
- if (next_allocated_1_byte_leading_byte > MAX_LEADING_BYTE_PRIVATE_1)
+ if (chlook->next_allocated_1_byte_leading_byte > MAX_LEADING_BYTE_PRIVATE_1)
lb = 0;
else
- lb = next_allocated_1_byte_leading_byte++;
+ lb = chlook->next_allocated_1_byte_leading_byte++;
}
else
{
- if (next_allocated_2_byte_leading_byte > MAX_LEADING_BYTE_PRIVATE_2)
+ if (chlook->next_allocated_2_byte_leading_byte > MAX_LEADING_BYTE_PRIVATE_2)
lb = 0;
else
- lb = next_allocated_2_byte_leading_byte++;
+ lb = chlook->next_allocated_2_byte_leading_byte++;
}
#endif
void
syms_of_mule_charset (void)
{
+#ifdef UTF2000
+ INIT_LRECORD_IMPLEMENTATION (char_byte_table);
+ INIT_LRECORD_IMPLEMENTATION (char_code_table);
+#endif
+ INIT_LRECORD_IMPLEMENTATION (charset);
+
DEFSUBR (Fcharsetp);
DEFSUBR (Ffind_charset);
DEFSUBR (Fget_charset);
#endif
#ifdef UTF2000
- next_allocated_leading_byte = MIN_LEADING_BYTE_PRIVATE;
+ chlook->next_allocated_leading_byte = MIN_LEADING_BYTE_PRIVATE;
#else
- next_allocated_1_byte_leading_byte = MIN_LEADING_BYTE_PRIVATE_1;
- next_allocated_2_byte_leading_byte = MIN_LEADING_BYTE_PRIVATE_2;
+ chlook->next_allocated_1_byte_leading_byte = MIN_LEADING_BYTE_PRIVATE_1;
+ chlook->next_allocated_2_byte_leading_byte = MIN_LEADING_BYTE_PRIVATE_2;
#endif
#ifndef UTF2000
/* Is this a prefix for a private leading byte? */
-INLINE int LEADING_BYTE_PREFIX_P (unsigned char lb);
-INLINE int
+INLINE_HEADER int LEADING_BYTE_PREFIX_P (unsigned char lb);
+INLINE_HEADER int
LEADING_BYTE_PREFIX_P (unsigned char lb)
{
return (lb == PRE_LEADING_BYTE_PRIVATE_1 ||
/* Table of charsets indexed by type/final-byte/direction. */
Lisp_Object charset_by_attributes[4][128][2];
+
+ Charset_ID next_allocated_1_byte_leading_byte;
+ Charset_ID next_allocated_2_byte_leading_byte;
};
extern struct charset_lookup *chlook;
/* int not Bufbyte even though that is the actual type of a leading byte.
This way, out-ot-range values will get caught rather than automatically
truncated. */
-INLINE Lisp_Object CHARSET_BY_LEADING_BYTE (int lb);
-INLINE Lisp_Object
+INLINE_HEADER Lisp_Object CHARSET_BY_LEADING_BYTE (int lb);
+INLINE_HEADER Lisp_Object
CHARSET_BY_LEADING_BYTE (int lb)
{
assert (lb >= MIN_LEADING_BYTE &&
extern const Bytecount rep_bytes_by_first_byte[0xA0];
/* Number of bytes in the string representation of a character. */
-INLINE int REP_BYTES_BY_FIRST_BYTE (int fb);
-INLINE int
+INLINE_HEADER int REP_BYTES_BY_FIRST_BYTE (int fb);
+INLINE_HEADER int
REP_BYTES_BY_FIRST_BYTE (int fb)
{
#ifdef ERROR_CHECK_TYPECHECK
FIELD2_TO_PRIVATE_LEADING_BYTE are the same.
*/
-INLINE Bufbyte CHAR_LEADING_BYTE (Emchar c);
-INLINE Bufbyte
+INLINE_HEADER Bufbyte CHAR_LEADING_BYTE (Emchar c);
+INLINE_HEADER Bufbyte
CHAR_LEADING_BYTE (Emchar c)
{
if (CHAR_ASCII_P (c))
FIELD2_TO_PRIVATE_LEADING_BYTE are the same.
*/
-INLINE Emchar MAKE_CHAR (Lisp_Object charset, int c1, int c2);
-INLINE Emchar
+INLINE_HEADER Emchar MAKE_CHAR (Lisp_Object charset, int c1, int c2);
+INLINE_HEADER Emchar
MAKE_CHAR (Lisp_Object charset, int c1, int c2)
{
if (EQ (charset, Vcharset_ascii))
: ((c1) = CHAR_FIELD2 (c), \
(c2) = CHAR_FIELD3 (c))
-INLINE void breakup_char_1 (Emchar c, Lisp_Object *charset, int *c1, int *c2);
-INLINE void
+INLINE_HEADER void breakup_char_1 (Emchar c, Lisp_Object *charset, int *c1, int *c2);
+INLINE_HEADER void
breakup_char_1 (Emchar c, Lisp_Object *charset, int *c1, int *c2)
{
*charset = CHAR_CHARSET (c);
int Lstream_fput_emchar (Lstream *stream, Emchar ch);
void Lstream_funget_emchar (Lstream *stream, Emchar ch);
-int copy_internal_to_external (CONST Bufbyte *internal, Bytecount len,
+int copy_internal_to_external (const Bufbyte *internal, Bytecount len,
unsigned char *external);
-Bytecount copy_external_to_internal (CONST unsigned char *external,
+Bytecount copy_external_to_internal (const unsigned char *external,
int len, Bufbyte *internal);
#endif /* INCLUDED_mule_charset_h_ */
} while (0)
#define DEC_CHARPTR(ptr) do { \
- CONST Bufbyte *dc_ptr1 = (ptr); \
- CONST Bufbyte *dc_ptr2 = dc_ptr1; \
+ const Bufbyte *dc_ptr1 = (ptr); \
+ const Bufbyte *dc_ptr2 = dc_ptr1; \
REAL_DEC_CHARPTR (dc_ptr2); \
assert (dc_ptr1 - dc_ptr2 == \
REP_BYTES_BY_FIRST_BYTE (*dc_ptr2)); \
/* section of internally-formatted text */
/* -------------------------------------------------------------- */
-INLINE CONST Bufbyte *charptr_n_addr (CONST Bufbyte *ptr, Charcount offset);
-INLINE CONST Bufbyte *
-charptr_n_addr (CONST Bufbyte *ptr, Charcount offset)
+INLINE_HEADER const Bufbyte *
+charptr_n_addr (const Bufbyte *ptr, Charcount offset);
+INLINE_HEADER const Bufbyte *
+charptr_n_addr (const Bufbyte *ptr, Charcount offset)
{
return ptr + charcount_to_bytecount (ptr, offset);
}
#else /* !emacs */
# define warn(str) fprintf (stderr, "%s\n", (str))
-# define CONST const
#endif /* emacs */
#ifdef XTOOLKIT
/* Create a name from the sound. */
static char *
-NameFromData (CONST char *buf,
+NameFromData (const char *buf,
int len)
{
*/
static SndInfo *
-SndOpenDataForReading (CONST char *data,
+SndOpenDataForReading (const char *data,
int length)
{
/* The length of the "file" */
static size_t file_len;
/* The actual "file" data. */
-static CONST void* file_data;
+static const void* file_data;
/* Like fopen, but for a buffer in memory */
static void
-dopen (CONST void* data, size_t length)
+dopen (const void* data, size_t length)
{
file_data = data;
file_len = length;
read the wave data from a buffer in memory. */
static WaveInfo *
-WaveOpenDataForReading (CONST char *data,
+WaveOpenDataForReading (const char *data,
int length)
{
RiffChunk ck;
char dd_buf[DIRBLKSIZ]; /* directory block */
} DIR; /* stream data from opendir() */
-DIR *opendir (CONST char *filename);
+DIR *opendir (const char *filename);
int closedir (DIR *dirp);
struct direct *readdir (DIR *dirp);
struct direct *readdirver (DIR *dirp);
#include <stdio.h>
#include <windows.h>
-#ifndef __MINGW32__
#include <mmsystem.h>
-#else
-typedef void (CALLBACK TIMECALLBACK)(UINT uTimerID, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2);
-
-typedef TIMECALLBACK FAR *LPTIMECALLBACK;
-DWORD WINAPI timeGetTime(void);
-MMRESULT WINAPI timeSetEvent(UINT uDelay, UINT uResolution,
- LPTIMECALLBACK fptc, DWORD dwUser, UINT fuEvent);
-MMRESULT WINAPI timeKillEvent(UINT uTimerID);
-MMRESULT WINAPI timeGetDevCaps(TIMECAPS* ptc, UINT cbtc);
-MMRESULT WINAPI timeBeginPeriod(UINT uPeriod);
-MMRESULT WINAPI timeEndPeriod(UINT uPeriod);
-#endif
#include "nt.h"
#include <sys/dir.h>
};
uid_t
-getuid ()
+getuid (void)
{
return nt_fake_unix_uid;
}
uid_t
-geteuid ()
+geteuid (void)
{
return nt_fake_unix_uid;
}
gid_t
-getgid ()
+getgid (void)
{
return the_passwd.pw_gid;
}
gid_t
-getegid ()
+getegid (void)
{
return getgid ();
}
}
void
-init_user_info ()
+init_user_info (void)
{
/* This code is pretty much of ad hoc nature. There is no unix-like
UIDs under Windows NT. There is no concept of root user, because
putenv ((GetVersion () & 0x80000000) ? "SHELL=command" : "SHELL=cmd");
/* Set dir and shell from environment variables. */
- strcpy (the_passwd.pw_dir, get_home_directory());
+ strcpy (the_passwd.pw_dir, (char *)get_home_directory());
strcpy (the_passwd.pw_shell, getenv ("SHELL"));
}
case path name components to lower case. */
static void
-normalize_filename (fp, path_sep)
- REGISTER char *fp;
- char path_sep;
+normalize_filename (char *fp, char path_sep)
{
char sep;
char *elem;
/* Destructively turn backslashes into slashes. */
void
-dostounix_filename (p)
- REGISTER char *p;
+dostounix_filename (char *p)
{
normalize_filename (p, '/');
}
/* Destructively turn slashes into backslashes. */
void
-unixtodos_filename (p)
- REGISTER char *p;
+unixtodos_filename (char *p)
{
normalize_filename (p, '\\');
}
(From msdos.c...probably should figure out a way to share it,
although this code isn't going to ever change.) */
int
-crlf_to_lf (n, buf, lf_count)
- REGISTER int n;
- REGISTER unsigned char *buf;
- REGISTER unsigned *lf_count;
+crlf_to_lf (int n, unsigned char *buf, unsigned *lf_count)
{
unsigned char *np = buf;
unsigned char *startp = buf;
#define REG_ROOT "SOFTWARE\\GNU\\XEmacs"
LPBYTE
-nt_get_resource (key, lpdwtype)
- char *key;
- LPDWORD lpdwtype;
+nt_get_resource (char *key, LPDWORD lpdwtype)
{
LPBYTE lpvalue;
HKEY hrootkey = NULL;
}
void
-init_environment ()
+init_environment (void)
{
/* Check for environment variables and use registry if they don't exist */
{
"EMACSLOCKDIR",
"INFOPATH"
};
-#ifdef HEAP_IN_DATA
+#if defined (HEAP_IN_DATA) && !defined(PDUMP)
cache_system_info ();
#endif
for (i = 0; i < countof (env_vars); i++)
}
#else
+#if defined(__MINGW32__) && CYGWIN_VERSION_DLL_MAJOR <= 21
+#define LowPart u.LowPart
+#define HighPart u.HighPart
+#endif
+
static LARGE_INTEGER utc_base_li;
time_t
return ret;
}
#endif
+#if defined(__MINGW32__) && CYGWIN_VERSION_DLL_MAJOR <= 21
+#undef LowPart
+#undef HighPart
+#endif
#if 0
/* in case we ever have need of this */
Oh, and do not encapsulater stat for non-MS compilers, too */
/* #### popineau@ese-metz.fr says they still might be broken.
Oh well... Let's add that `1 ||' condition.... --kkm */
+/* #### aichner@ecf.teradyne.com reported that with the library
+ provided stat/fstat, (file-exist "d:\\tmp\\") =>> nil,
+ (file-exist "d:\\tmp") =>> t, when d:\tmp exists. Whenever
+ we opt to use non-encapsulated stat(), this should serve as
+ a compatibility test. --kkm */
+
#if 1 || defined(_MSC_VER) && _MSC_VER < 1100
/* Since stat is encapsulated on Windows NT, we need to encapsulate
len = strlen (name);
rootdir = (path >= name + len - 1
&& (IS_DIRECTORY_SEP (*path) || *path == 0));
- name = strcpy (alloca (len + 2), name);
+ name = strcpy ((char *)alloca (len + 2), name);
if (rootdir)
{
}
void
-init_ntproc ()
+init_ntproc (void)
{
/* Initial preparation for subprocess support: replace our standard
handles with non-inheritable versions. */
}
int
-open_input_file (file_data *p_file, CONST char *filename)
+open_input_file (file_data *p_file, const char *filename)
{
HANDLE file;
HANDLE file_mapping;
if (file_base == 0)
return FALSE;
- p_file->name = (char*)filename;
+ p_file->name = (char *)filename;
p_file->size = size;
p_file->file = file;
p_file->file_mapping = file_mapping;
- p_file->file_base = file_base;
+ p_file->file_base = (char *)file_base;
return TRUE;
}
time_t convert_time (FILETIME ft);
extern void init_ntproc ();
-extern void term_ntproc ();
+extern void term_ntproc (int unused);
#endif /* INCLUDED_nt_h_ */
return data_region_end;
}
-static char *
+static unsigned char *
allocate_heap (void)
{
/* The base address for our GNU malloc heap is chosen in conjunction
PAGE_NOACCESS);
#endif
- return ptr;
+ return (unsigned char*) ptr;
}
void
recreate_heap (char *executable_path)
{
- unsigned char *tmp;
+ void *tmp;
/* First reserve the upper part of our heap. (We reserve first
because there have been problems in the past where doing the
/* To prevent zero-initialized variables from being placed into the bss
section, use non-zero values to represent an uninitialized state. */
-#define UNINIT_PTR ((void *) 0xF0A0F0A0)
+#define UNINIT_PTR ((unsigned char*) 0xF0A0F0A0)
#define UNINIT_LONG (0xF0A0F0A0L)
/* Emulation of Unix sbrk(). */
/* Useful routines for manipulating memory-mapped files. */
typedef struct file_data {
- CONST char *name;
- unsigned long size;
- HANDLE file;
- HANDLE file_mapping;
- unsigned char *file_base;
+ const char *name;
+ unsigned long size;
+ HANDLE file;
+ HANDLE file_mapping;
+ char *file_base;
} file_data;
#define OFFSET_TO_RVA(var,section) \
#define RVA_TO_PTR(var,section,filedata) \
((void *)(RVA_TO_OFFSET(var,section) + (filedata).file_base))
-int open_input_file (file_data *p_file, CONST char *name);
-int open_output_file (file_data *p_file, CONST char *name, unsigned long size);
+int open_input_file (file_data *p_file, const char *name);
+int open_output_file (file_data *p_file, const char *name, unsigned long size);
void close_file_data (file_data *p_file);
#endif /* INCLUDED_ntheap_h_ */
02111-1307, USA.*/
#include <windows.h>
-#undef CONST
#include <config.h>
#include <stdio.h>
#include "sysfile.h"
#include "lisp.h"
+#include "nativesound.h"
#if (defined (__CYGWIN32__) || defined(__MINGW32__)) && \
CYGWIN_VERSION_DLL_MAJOR < 21
#else
#include <mmsystem.h>
#endif
-static void play_sound_data_1 (unsigned char *data, int length,
+static int play_sound_data_1 (unsigned char *data, int length,
int volume, int convert);
void play_sound_file (char *sound_file, int volume)
return;
size = lseek (ofd, 0, SEEK_END);
- data = xmalloc (size);
+ data = (unsigned char *)xmalloc (size);
lseek (ofd, 0, SEEK_SET);
if (!data)
/* mswindows can't cope with playing a sound from alloca space so we
have to convert if necessary */
-static void play_sound_data_1 (unsigned char *data, int length, int volume,
+static int play_sound_data_1 (unsigned char *data, int length, int volume,
int convert_to_malloc)
{
DWORD flags = SND_ASYNC | SND_MEMORY | SND_NODEFAULT;
if (convert_to_malloc)
{
- sound_data = xmalloc (length);
+ sound_data = (unsigned char *)xmalloc (length);
memcpy (sound_data, data, length);
}
else
PlaySound(sound_data, NULL, flags);
- return;
+ /* #### Error handling? */
+ return 1;
}
-void play_sound_data (unsigned char *data, int length, int volume)
+int play_sound_data (unsigned char *data, int length, int volume)
{
- play_sound_data_1 (data, length, volume, TRUE);
+ return play_sound_data_1 (data, length, volume, TRUE);
}
#include "syswait.h"
#include "buffer.h"
#include "process.h"
+
+#include "console-msw.h"
+
/*#include "w32term.h"*/ /* From 19.34.6: sync in ? --marcpa */
/* #### I'm not going to play with shit. */
DWORD WINAPI reader_thread (void *arg);
-/* Determine if running on Windows 9x and not NT */
-static int
-windows9x_p (void)
-{
- return GetVersion () & 0x80000000;
-}
-
/* Find an unused process slot. */
child_process *
new_child (void)
static const char * process_dir;
static BOOL
-create_child (CONST char *exe, char *cmdline, char *env,
+create_child (const char *exe, char *cmdline, char *env,
int * pPid, child_process *cp)
{
STARTUPINFO start;
xzero (start);
start.cb = sizeof (start);
-#ifdef HAVE_NTGUI
if (NILP (Vwin32_start_process_show_window))
start.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
else
start.hStdInput = GetStdHandle (STD_INPUT_HANDLE);
start.hStdOutput = GetStdHandle (STD_OUTPUT_HANDLE);
start.hStdError = GetStdHandle (STD_ERROR_HANDLE);
-#endif /* HAVE_NTGUI */
/* Explicitly specify no security */
if (!InitializeSecurityDescriptor (&sec_desc, SECURITY_DESCRIPTOR_REVISION))
#endif
void
-win32_executable_type (CONST char * filename, int * is_dos_app, int * is_cygnus_app)
+win32_executable_type (const char * filename, int * is_dos_app, int * is_cygnus_app)
{
file_data executable;
char * p;
if (exe_header->e_magic != DOSMAGIC)
goto unwind;
- if ((char *) exe_header->e_lfanew > (char *) executable.size)
+ if ((char*) exe_header->e_lfanew > (char*) executable.size)
{
/* Some dos headers (pkunzip) have bogus e_lfanew fields. */
*is_dos_app = TRUE;
if (dos_header->e_magic != IMAGE_DOS_SIGNATURE)
goto unwind;
- nt_header = (PIMAGE_NT_HEADERS) ((char *) dos_header + dos_header->e_lfanew);
+ nt_header = (PIMAGE_NT_HEADERS) ((char*) dos_header + dos_header->e_lfanew);
- if ((char *) nt_header > (char *) dos_header + executable.size)
+ if ((char*) nt_header > (char*) dos_header + executable.size)
{
/* Some dos headers (pkunzip) have bogus e_lfanew fields. */
*is_dos_app = TRUE;
IMAGE_SECTION_HEADER * section;
section = rva_to_section (import_dir.VirtualAddress, nt_header);
- imports = RVA_TO_PTR (import_dir.VirtualAddress, section, executable);
+ imports = (IMAGE_IMPORT_DESCRIPTOR *) RVA_TO_PTR (import_dir.VirtualAddress,
+ section, executable);
for ( ; imports->Name; imports++)
{
- char * dllname = RVA_TO_PTR (imports->Name, section, executable);
+ char *dllname = (char*) RVA_TO_PTR (imports->Name, section, executable);
if (strcmp (dllname, "cygwin.dll") == 0)
{
*nptr++ = *optr++;
num += optr - envp2;
- qsort (new_envp, num, sizeof (char *), compare_env);
+ qsort (new_envp, num, sizeof (char*), compare_env);
*nptr = NULL;
}
/* When a new child process is created we need to register it in our list,
so intercept spawn requests. */
int
-sys_spawnve (int mode, CONST char *cmdname,
- CONST char * CONST *argv, CONST char *CONST *envp)
+sys_spawnve (int mode, const char *cmdname,
+ const char * const *argv, const char *const *envp)
{
Lisp_Object program, full;
char *cmdline, *env, *parg, **targ;
}
else
{
- (char*)cmdname = alloca (strlen (argv[0]) + 1);
+ cmdname = (char*)alloca (strlen (argv[0]) + 1);
strcpy ((char*)cmdname, argv[0]);
}
UNGCPRO;
/* make sure argv[0] and cmdname are both in DOS format */
unixtodos_filename ((char*)cmdname);
/* #### KLUDGE */
- ((CONST char**)argv)[0] = cmdname;
+ ((const char**)argv)[0] = cmdname;
/* Determine whether program is a 16-bit DOS executable, or a Win32
executable that is implicitly linked to the Cygnus dll (implying it
while leaving the real app name as argv[0]. */
if (is_dos_app)
{
- cmdname = alloca (MAXPATHLEN);
+ cmdname = (char*) alloca (MAXPATHLEN);
if (egetenv ("CMDPROXY"))
strcpy ((char*)cmdname, egetenv ("CMDPROXY"));
else
/* Override escape char by binding win32-quote-process-args to
desired character, or use t for auto-selection. */
if (INTP (Vwin32_quote_process_args))
- escape_char = XINT (Vwin32_quote_process_args);
+ escape_char = (char) XINT (Vwin32_quote_process_args);
else
escape_char = is_cygnus_app ? '"' : '\\';
}
}
arglen += strlen (*targ++) + 1;
}
- cmdline = alloca (arglen);
+ cmdline = (char*) alloca (arglen);
targ = (char**)argv;
parg = cmdline;
while (*targ)
/* and envp... */
arglen = 1;
- targ = (char**)envp;
+ targ = (char**) envp;
numenv = 1; /* for end null */
while (*targ)
{
numenv++;
/* merge env passed in and extra env into one, and sort it. */
- targ = (char **) alloca (numenv * sizeof (char *));
- merge_and_sort_env ((char**)envp, extra_env, targ);
+ targ = (char **) alloca (numenv * sizeof (char*));
+ merge_and_sort_env ((char**) envp, extra_env, targ);
/* concatenate env entries. */
- env = alloca (arglen);
+ env = (char*) alloca (arglen);
parg = env;
while (*targ)
{
GetClassName (hwnd, window_class, sizeof (window_class));
if (strcmp (window_class,
- windows9x_p()
+ msw_windows9x_p()
? "tty"
: "ConsoleWindowClass") == 0)
{
if (NILP (Vwin32_start_process_share_console) && cp && cp->hwnd)
{
#if 1
- if (windows9x_p())
+ if (msw_windows9x_p())
{
/*
Another possibility is to try terminating the VDM out-right by
#if 0
/* Sync with FSF Emacs 19.34.6 note: ifdef'ed out in XEmacs */
-extern int report_file_error (CONST char *, Lisp_Object);
+extern int report_file_error (const char *, Lisp_Object);
#endif
/* The following two routines are used to manipulate stdin, stdout, and
stderr of our child processes.
\f
void
-syms_of_ntproc ()
+syms_of_ntproc (void)
{
DEFSUBR (Fwin32_short_file_name);
DEFSUBR (Fwin32_long_file_name);
typedef struct colormap_t
{
- CONST char *name;
- CONST COLORREF colorref;
+ const char *name;
+ COLORREF colorref;
} colormap_t;
/* Colors from X11R6 "XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp" */
-static CONST colormap_t mswindows_X_color_map[] =
+/* MSWindows tends to round up the numbers in it's palette, ie where X uses
+ * 127, MSWindows uses 128. Colors commented as "Adjusted" are tweaked to
+ * match the Windows standard palette to increase the likelyhood of
+ * mswindows_color_to_string() finding a named match.
+ */
+static const colormap_t mswindows_X_color_map[] =
{
- {"snow" , PALETTERGB (255, 250, 250) },
- {"GhostWhite" , PALETTERGB (248, 248, 255) },
- {"WhiteSmoke" , PALETTERGB (245, 245, 245) },
- {"gainsboro" , PALETTERGB (220, 220, 220) },
- {"FloralWhite" , PALETTERGB (255, 250, 240) },
- {"OldLace" , PALETTERGB (253, 245, 230) },
- {"linen" , PALETTERGB (250, 240, 230) },
- {"AntiqueWhite" , PALETTERGB (250, 235, 215) },
- {"PapayaWhip" , PALETTERGB (255, 239, 213) },
- {"BlanchedAlmond" , PALETTERGB (255, 235, 205) },
- {"bisque" , PALETTERGB (255, 228, 196) },
- {"PeachPuff" , PALETTERGB (255, 218, 185) },
- {"NavajoWhite" , PALETTERGB (255, 222, 173) },
- {"moccasin" , PALETTERGB (255, 228, 181) },
- {"cornsilk" , PALETTERGB (255, 248, 220) },
- {"ivory" , PALETTERGB (255, 255, 240) },
- {"LemonChiffon" , PALETTERGB (255, 250, 205) },
- {"seashell" , PALETTERGB (255, 245, 238) },
- {"honeydew" , PALETTERGB (240, 255, 240) },
- {"MintCream" , PALETTERGB (245, 255, 250) },
- {"azure" , PALETTERGB (240, 255, 255) },
- {"AliceBlue" , PALETTERGB (240, 248, 255) },
- {"lavender" , PALETTERGB (230, 230, 250) },
- {"LavenderBlush" , PALETTERGB (255, 240, 245) },
- {"MistyRose" , PALETTERGB (255, 228, 225) },
- {"white" , PALETTERGB (255, 255, 255) },
- {"black" , PALETTERGB (0, 0, 0) },
- {"DarkSlateGray" , PALETTERGB (47, 79, 79) },
- {"DarkSlateGrey" , PALETTERGB (47, 79, 79) },
- {"DimGray" , PALETTERGB (105, 105, 105) },
- {"DimGrey" , PALETTERGB (105, 105, 105) },
- {"SlateGray" , PALETTERGB (112, 128, 144) },
- {"SlateGrey" , PALETTERGB (112, 128, 144) },
- {"LightSlateGray" , PALETTERGB (119, 136, 153) },
- {"LightSlateGrey" , PALETTERGB (119, 136, 153) },
- {"gray" , PALETTERGB (190, 190, 190) },
- {"grey" , PALETTERGB (190, 190, 190) },
- {"LightGrey" , PALETTERGB (211, 211, 211) },
- {"LightGray" , PALETTERGB (211, 211, 211) },
- {"MidnightBlue" , PALETTERGB (25, 25, 112) },
- {"navy" , PALETTERGB (0, 0, 128) },
- {"NavyBlue" , PALETTERGB (0, 0, 128) },
- {"CornflowerBlue" , PALETTERGB (100, 149, 237) },
- {"DarkSlateBlue" , PALETTERGB (72, 61, 139) },
- {"SlateBlue" , PALETTERGB (106, 90, 205) },
- {"MediumSlateBlue" , PALETTERGB (123, 104, 238) },
- {"LightSlateBlue" , PALETTERGB (132, 112, 255) },
- {"MediumBlue" , PALETTERGB (0, 0, 205) },
- {"RoyalBlue" , PALETTERGB (65, 105, 225) },
- {"blue" , PALETTERGB (0, 0, 255) },
- {"DodgerBlue" , PALETTERGB (30, 144, 255) },
- {"DeepSkyBlue" , PALETTERGB (0, 191, 255) },
- {"SkyBlue" , PALETTERGB (135, 206, 235) },
- {"LightSkyBlue" , PALETTERGB (135, 206, 250) },
- {"SteelBlue" , PALETTERGB (70, 130, 180) },
- {"LightSteelBlue" , PALETTERGB (176, 196, 222) },
- {"LightBlue" , PALETTERGB (173, 216, 230) },
- {"PowderBlue" , PALETTERGB (176, 224, 230) },
- {"PaleTurquoise" , PALETTERGB (175, 238, 238) },
- {"DarkTurquoise" , PALETTERGB (0, 206, 209) },
- {"MediumTurquoise" , PALETTERGB (72, 209, 204) },
- {"turquoise" , PALETTERGB (64, 224, 208) },
- {"cyan" , PALETTERGB (0, 255, 255) },
- {"LightCyan" , PALETTERGB (224, 255, 255) },
- {"CadetBlue" , PALETTERGB (95, 158, 160) },
- {"MediumAquamarine" , PALETTERGB (102, 205, 170) },
- {"aquamarine" , PALETTERGB (127, 255, 212) },
- {"DarkGreen" , PALETTERGB (0, 100, 0) },
- {"DarkOliveGreen" , PALETTERGB (85, 107, 47) },
- {"DarkSeaGreen" , PALETTERGB (143, 188, 143) },
- {"SeaGreen" , PALETTERGB (46, 139, 87) },
- {"MediumSeaGreen" , PALETTERGB (60, 179, 113) },
- {"LightSeaGreen" , PALETTERGB (32, 178, 170) },
- {"PaleGreen" , PALETTERGB (152, 251, 152) },
- {"SpringGreen" , PALETTERGB (0, 255, 127) },
- {"LawnGreen" , PALETTERGB (124, 252, 0) },
- {"green" , PALETTERGB (0, 255, 0) },
- {"chartreuse" , PALETTERGB (127, 255, 0) },
- {"MediumSpringGreen" , PALETTERGB (0, 250, 154) },
- {"GreenYellow" , PALETTERGB (173, 255, 47) },
- {"LimeGreen" , PALETTERGB (50, 205, 50) },
- {"YellowGreen" , PALETTERGB (154, 205, 50) },
- {"ForestGreen" , PALETTERGB (34, 139, 34) },
- {"OliveDrab" , PALETTERGB (107, 142, 35) },
- {"DarkKhaki" , PALETTERGB (189, 183, 107) },
- {"khaki" , PALETTERGB (240, 230, 140) },
- {"PaleGoldenrod" , PALETTERGB (238, 232, 170) },
- {"LightGoldenrodYellow" , PALETTERGB (250, 250, 210) },
- {"LightYellow" , PALETTERGB (255, 255, 224) },
- {"yellow" , PALETTERGB (255, 255, 0) },
- {"gold" , PALETTERGB (255, 215, 0) },
- {"LightGoldenrod" , PALETTERGB (238, 221, 130) },
- {"goldenrod" , PALETTERGB (218, 165, 32) },
- {"DarkGoldenrod" , PALETTERGB (184, 134, 11) },
- {"RosyBrown" , PALETTERGB (188, 143, 143) },
- {"IndianRed" , PALETTERGB (205, 92, 92) },
- {"SaddleBrown" , PALETTERGB (139, 69, 19) },
- {"sienna" , PALETTERGB (160, 82, 45) },
- {"peru" , PALETTERGB (205, 133, 63) },
- {"burlywood" , PALETTERGB (222, 184, 135) },
- {"beige" , PALETTERGB (245, 245, 220) },
- {"wheat" , PALETTERGB (245, 222, 179) },
- {"SandyBrown" , PALETTERGB (244, 164, 96) },
- {"tan" , PALETTERGB (210, 180, 140) },
- {"chocolate" , PALETTERGB (210, 105, 30) },
- {"firebrick" , PALETTERGB (178, 34, 34) },
- {"brown" , PALETTERGB (165, 42, 42) },
- {"DarkSalmon" , PALETTERGB (233, 150, 122) },
- {"salmon" , PALETTERGB (250, 128, 114) },
- {"LightSalmon" , PALETTERGB (255, 160, 122) },
- {"orange" , PALETTERGB (255, 165, 0) },
- {"DarkOrange" , PALETTERGB (255, 140, 0) },
- {"coral" , PALETTERGB (255, 127, 80) },
- {"LightCoral" , PALETTERGB (240, 128, 128) },
- {"tomato" , PALETTERGB (255, 99, 71) },
- {"OrangeRed" , PALETTERGB (255, 69, 0) },
- {"red" , PALETTERGB (255, 0, 0) },
- {"HotPink" , PALETTERGB (255, 105, 180) },
- {"DeepPink" , PALETTERGB (255, 20, 147) },
- {"pink" , PALETTERGB (255, 192, 203) },
- {"LightPink" , PALETTERGB (255, 182, 193) },
- {"PaleVioletRed" , PALETTERGB (219, 112, 147) },
- {"maroon" , PALETTERGB (176, 48, 96) },
- {"MediumVioletRed" , PALETTERGB (199, 21, 133) },
- {"VioletRed" , PALETTERGB (208, 32, 144) },
- {"magenta" , PALETTERGB (255, 0, 255) },
- {"violet" , PALETTERGB (238, 130, 238) },
- {"plum" , PALETTERGB (221, 160, 221) },
- {"orchid" , PALETTERGB (218, 112, 214) },
- {"MediumOrchid" , PALETTERGB (186, 85, 211) },
- {"DarkOrchid" , PALETTERGB (153, 50, 204) },
- {"DarkViolet" , PALETTERGB (148, 0, 211) },
- {"BlueViolet" , PALETTERGB (138, 43, 226) },
- {"purple" , PALETTERGB (160, 32, 240) },
- {"MediumPurple" , PALETTERGB (147, 112, 219) },
- {"thistle" , PALETTERGB (216, 191, 216) },
- {"snow1" , PALETTERGB (255, 250, 250) },
- {"snow2" , PALETTERGB (238, 233, 233) },
- {"snow3" , PALETTERGB (205, 201, 201) },
- {"snow4" , PALETTERGB (139, 137, 137) },
- {"seashell1" , PALETTERGB (255, 245, 238) },
- {"seashell2" , PALETTERGB (238, 229, 222) },
- {"seashell3" , PALETTERGB (205, 197, 191) },
- {"seashell4" , PALETTERGB (139, 134, 130) },
- {"AntiqueWhite1" , PALETTERGB (255, 239, 219) },
- {"AntiqueWhite2" , PALETTERGB (238, 223, 204) },
- {"AntiqueWhite3" , PALETTERGB (205, 192, 176) },
- {"AntiqueWhite4" , PALETTERGB (139, 131, 120) },
- {"bisque1" , PALETTERGB (255, 228, 196) },
- {"bisque2" , PALETTERGB (238, 213, 183) },
- {"bisque3" , PALETTERGB (205, 183, 158) },
- {"bisque4" , PALETTERGB (139, 125, 107) },
- {"PeachPuff1" , PALETTERGB (255, 218, 185) },
- {"PeachPuff2" , PALETTERGB (238, 203, 173) },
- {"PeachPuff3" , PALETTERGB (205, 175, 149) },
- {"PeachPuff4" , PALETTERGB (139, 119, 101) },
- {"NavajoWhite1" , PALETTERGB (255, 222, 173) },
- {"NavajoWhite2" , PALETTERGB (238, 207, 161) },
- {"NavajoWhite3" , PALETTERGB (205, 179, 139) },
- {"NavajoWhite4" , PALETTERGB (139, 121, 94) },
- {"LemonChiffon1" , PALETTERGB (255, 250, 205) },
- {"LemonChiffon2" , PALETTERGB (238, 233, 191) },
- {"LemonChiffon3" , PALETTERGB (205, 201, 165) },
- {"LemonChiffon4" , PALETTERGB (139, 137, 112) },
- {"cornsilk1" , PALETTERGB (255, 248, 220) },
- {"cornsilk2" , PALETTERGB (238, 232, 205) },
- {"cornsilk3" , PALETTERGB (205, 200, 177) },
- {"cornsilk4" , PALETTERGB (139, 136, 120) },
- {"ivory1" , PALETTERGB (255, 255, 240) },
- {"ivory2" , PALETTERGB (238, 238, 224) },
- {"ivory3" , PALETTERGB (205, 205, 193) },
- {"ivory4" , PALETTERGB (139, 139, 131) },
- {"honeydew1" , PALETTERGB (240, 255, 240) },
- {"honeydew2" , PALETTERGB (224, 238, 224) },
- {"honeydew3" , PALETTERGB (193, 205, 193) },
- {"honeydew4" , PALETTERGB (131, 139, 131) },
- {"LavenderBlush1" , PALETTERGB (255, 240, 245) },
- {"LavenderBlush2" , PALETTERGB (238, 224, 229) },
- {"LavenderBlush3" , PALETTERGB (205, 193, 197) },
- {"LavenderBlush4" , PALETTERGB (139, 131, 134) },
- {"MistyRose1" , PALETTERGB (255, 228, 225) },
- {"MistyRose2" , PALETTERGB (238, 213, 210) },
- {"MistyRose3" , PALETTERGB (205, 183, 181) },
- {"MistyRose4" , PALETTERGB (139, 125, 123) },
- {"azure1" , PALETTERGB (240, 255, 255) },
- {"azure2" , PALETTERGB (224, 238, 238) },
- {"azure3" , PALETTERGB (193, 205, 205) },
- {"azure4" , PALETTERGB (131, 139, 139) },
- {"SlateBlue1" , PALETTERGB (131, 111, 255) },
- {"SlateBlue2" , PALETTERGB (122, 103, 238) },
- {"SlateBlue3" , PALETTERGB (105, 89, 205) },
- {"SlateBlue4" , PALETTERGB (71, 60, 139) },
- {"RoyalBlue1" , PALETTERGB (72, 118, 255) },
- {"RoyalBlue2" , PALETTERGB (67, 110, 238) },
- {"RoyalBlue3" , PALETTERGB (58, 95, 205) },
- {"RoyalBlue4" , PALETTERGB (39, 64, 139) },
- {"blue1" , PALETTERGB (0, 0, 255) },
- {"blue2" , PALETTERGB (0, 0, 238) },
- {"blue3" , PALETTERGB (0, 0, 205) },
- {"blue4" , PALETTERGB (0, 0, 139) },
- {"DodgerBlue1" , PALETTERGB (30, 144, 255) },
- {"DodgerBlue2" , PALETTERGB (28, 134, 238) },
- {"DodgerBlue3" , PALETTERGB (24, 116, 205) },
- {"DodgerBlue4" , PALETTERGB (16, 78, 139) },
- {"SteelBlue1" , PALETTERGB (99, 184, 255) },
- {"SteelBlue2" , PALETTERGB (92, 172, 238) },
- {"SteelBlue3" , PALETTERGB (79, 148, 205) },
- {"SteelBlue4" , PALETTERGB (54, 100, 139) },
- {"DeepSkyBlue1" , PALETTERGB (0, 191, 255) },
- {"DeepSkyBlue2" , PALETTERGB (0, 178, 238) },
- {"DeepSkyBlue3" , PALETTERGB (0, 154, 205) },
- {"DeepSkyBlue4" , PALETTERGB (0, 104, 139) },
- {"SkyBlue1" , PALETTERGB (135, 206, 255) },
- {"SkyBlue2" , PALETTERGB (126, 192, 238) },
- {"SkyBlue3" , PALETTERGB (108, 166, 205) },
- {"SkyBlue4" , PALETTERGB (74, 112, 139) },
- {"LightSkyBlue1" , PALETTERGB (176, 226, 255) },
- {"LightSkyBlue2" , PALETTERGB (164, 211, 238) },
- {"LightSkyBlue3" , PALETTERGB (141, 182, 205) },
- {"LightSkyBlue4" , PALETTERGB (96, 123, 139) },
- {"SlateGray1" , PALETTERGB (198, 226, 255) },
- {"SlateGray2" , PALETTERGB (185, 211, 238) },
- {"SlateGray3" , PALETTERGB (159, 182, 205) },
- {"SlateGray4" , PALETTERGB (108, 123, 139) },
- {"LightSteelBlue1" , PALETTERGB (202, 225, 255) },
- {"LightSteelBlue2" , PALETTERGB (188, 210, 238) },
- {"LightSteelBlue3" , PALETTERGB (162, 181, 205) },
- {"LightSteelBlue4" , PALETTERGB (110, 123, 139) },
- {"LightBlue1" , PALETTERGB (191, 239, 255) },
- {"LightBlue2" , PALETTERGB (178, 223, 238) },
- {"LightBlue3" , PALETTERGB (154, 192, 205) },
- {"LightBlue4" , PALETTERGB (104, 131, 139) },
- {"LightCyan1" , PALETTERGB (224, 255, 255) },
- {"LightCyan2" , PALETTERGB (209, 238, 238) },
- {"LightCyan3" , PALETTERGB (180, 205, 205) },
- {"LightCyan4" , PALETTERGB (122, 139, 139) },
- {"PaleTurquoise1" , PALETTERGB (187, 255, 255) },
- {"PaleTurquoise2" , PALETTERGB (174, 238, 238) },
- {"PaleTurquoise3" , PALETTERGB (150, 205, 205) },
- {"PaleTurquoise4" , PALETTERGB (102, 139, 139) },
- {"CadetBlue1" , PALETTERGB (152, 245, 255) },
- {"CadetBlue2" , PALETTERGB (142, 229, 238) },
- {"CadetBlue3" , PALETTERGB (122, 197, 205) },
- {"CadetBlue4" , PALETTERGB (83, 134, 139) },
- {"turquoise1" , PALETTERGB (0, 245, 255) },
- {"turquoise2" , PALETTERGB (0, 229, 238) },
- {"turquoise3" , PALETTERGB (0, 197, 205) },
- {"turquoise4" , PALETTERGB (0, 134, 139) },
- {"cyan1" , PALETTERGB (0, 255, 255) },
- {"cyan2" , PALETTERGB (0, 238, 238) },
- {"cyan3" , PALETTERGB (0, 205, 205) },
- {"cyan4" , PALETTERGB (0, 139, 139) },
- {"DarkSlateGray1" , PALETTERGB (151, 255, 255) },
- {"DarkSlateGray2" , PALETTERGB (141, 238, 238) },
- {"DarkSlateGray3" , PALETTERGB (121, 205, 205) },
- {"DarkSlateGray4" , PALETTERGB (82, 139, 139) },
- {"aquamarine1" , PALETTERGB (127, 255, 212) },
- {"aquamarine2" , PALETTERGB (118, 238, 198) },
- {"aquamarine3" , PALETTERGB (102, 205, 170) },
- {"aquamarine4" , PALETTERGB (69, 139, 116) },
- {"DarkSeaGreen1" , PALETTERGB (193, 255, 193) },
- {"DarkSeaGreen2" , PALETTERGB (180, 238, 180) },
- {"DarkSeaGreen3" , PALETTERGB (155, 205, 155) },
- {"DarkSeaGreen4" , PALETTERGB (105, 139, 105) },
- {"SeaGreen1" , PALETTERGB (84, 255, 159) },
- {"SeaGreen2" , PALETTERGB (78, 238, 148) },
- {"SeaGreen3" , PALETTERGB (67, 205, 128) },
- {"SeaGreen4" , PALETTERGB (46, 139, 87) },
- {"PaleGreen1" , PALETTERGB (154, 255, 154) },
- {"PaleGreen2" , PALETTERGB (144, 238, 144) },
- {"PaleGreen3" , PALETTERGB (124, 205, 124) },
- {"PaleGreen4" , PALETTERGB (84, 139, 84) },
- {"SpringGreen1" , PALETTERGB (0, 255, 127) },
- {"SpringGreen2" , PALETTERGB (0, 238, 118) },
- {"SpringGreen3" , PALETTERGB (0, 205, 102) },
- {"SpringGreen4" , PALETTERGB (0, 139, 69) },
- {"green1" , PALETTERGB (0, 255, 0) },
- {"green2" , PALETTERGB (0, 238, 0) },
- {"green3" , PALETTERGB (0, 205, 0) },
- {"green4" , PALETTERGB (0, 139, 0) },
- {"chartreuse1" , PALETTERGB (127, 255, 0) },
- {"chartreuse2" , PALETTERGB (118, 238, 0) },
- {"chartreuse3" , PALETTERGB (102, 205, 0) },
- {"chartreuse4" , PALETTERGB (69, 139, 0) },
- {"OliveDrab1" , PALETTERGB (192, 255, 62) },
- {"OliveDrab2" , PALETTERGB (179, 238, 58) },
- {"OliveDrab3" , PALETTERGB (154, 205, 50) },
- {"OliveDrab4" , PALETTERGB (105, 139, 34) },
- {"DarkOliveGreen1" , PALETTERGB (202, 255, 112) },
- {"DarkOliveGreen2" , PALETTERGB (188, 238, 104) },
- {"DarkOliveGreen3" , PALETTERGB (162, 205, 90) },
- {"DarkOliveGreen4" , PALETTERGB (110, 139, 61) },
- {"khaki1" , PALETTERGB (255, 246, 143) },
- {"khaki2" , PALETTERGB (238, 230, 133) },
- {"khaki3" , PALETTERGB (205, 198, 115) },
- {"khaki4" , PALETTERGB (139, 134, 78) },
- {"LightGoldenrod1" , PALETTERGB (255, 236, 139) },
- {"LightGoldenrod2" , PALETTERGB (238, 220, 130) },
- {"LightGoldenrod3" , PALETTERGB (205, 190, 112) },
- {"LightGoldenrod4" , PALETTERGB (139, 129, 76) },
- {"LightYellow1" , PALETTERGB (255, 255, 224) },
- {"LightYellow2" , PALETTERGB (238, 238, 209) },
- {"LightYellow3" , PALETTERGB (205, 205, 180) },
- {"LightYellow4" , PALETTERGB (139, 139, 122) },
- {"yellow1" , PALETTERGB (255, 255, 0) },
- {"yellow2" , PALETTERGB (238, 238, 0) },
- {"yellow3" , PALETTERGB (205, 205, 0) },
- {"yellow4" , PALETTERGB (139, 139, 0) },
- {"gold1" , PALETTERGB (255, 215, 0) },
- {"gold2" , PALETTERGB (238, 201, 0) },
- {"gold3" , PALETTERGB (205, 173, 0) },
- {"gold4" , PALETTERGB (139, 117, 0) },
- {"goldenrod1" , PALETTERGB (255, 193, 37) },
- {"goldenrod2" , PALETTERGB (238, 180, 34) },
- {"goldenrod3" , PALETTERGB (205, 155, 29) },
- {"goldenrod4" , PALETTERGB (139, 105, 20) },
- {"DarkGoldenrod1" , PALETTERGB (255, 185, 15) },
- {"DarkGoldenrod2" , PALETTERGB (238, 173, 14) },
- {"DarkGoldenrod3" , PALETTERGB (205, 149, 12) },
- {"DarkGoldenrod4" , PALETTERGB (139, 101, 8) },
- {"RosyBrown1" , PALETTERGB (255, 193, 193) },
- {"RosyBrown2" , PALETTERGB (238, 180, 180) },
- {"RosyBrown3" , PALETTERGB (205, 155, 155) },
- {"RosyBrown4" , PALETTERGB (139, 105, 105) },
- {"IndianRed1" , PALETTERGB (255, 106, 106) },
- {"IndianRed2" , PALETTERGB (238, 99, 99) },
- {"IndianRed3" , PALETTERGB (205, 85, 85) },
- {"IndianRed4" , PALETTERGB (139, 58, 58) },
- {"sienna1" , PALETTERGB (255, 130, 71) },
- {"sienna2" , PALETTERGB (238, 121, 66) },
- {"sienna3" , PALETTERGB (205, 104, 57) },
- {"sienna4" , PALETTERGB (139, 71, 38) },
- {"burlywood1" , PALETTERGB (255, 211, 155) },
- {"burlywood2" , PALETTERGB (238, 197, 145) },
- {"burlywood3" , PALETTERGB (205, 170, 125) },
- {"burlywood4" , PALETTERGB (139, 115, 85) },
- {"wheat1" , PALETTERGB (255, 231, 186) },
- {"wheat2" , PALETTERGB (238, 216, 174) },
- {"wheat3" , PALETTERGB (205, 186, 150) },
- {"wheat4" , PALETTERGB (139, 126, 102) },
- {"tan1" , PALETTERGB (255, 165, 79) },
- {"tan2" , PALETTERGB (238, 154, 73) },
- {"tan3" , PALETTERGB (205, 133, 63) },
- {"tan4" , PALETTERGB (139, 90, 43) },
- {"chocolate1" , PALETTERGB (255, 127, 36) },
- {"chocolate2" , PALETTERGB (238, 118, 33) },
- {"chocolate3" , PALETTERGB (205, 102, 29) },
- {"chocolate4" , PALETTERGB (139, 69, 19) },
- {"firebrick1" , PALETTERGB (255, 48, 48) },
- {"firebrick2" , PALETTERGB (238, 44, 44) },
- {"firebrick3" , PALETTERGB (205, 38, 38) },
- {"firebrick4" , PALETTERGB (139, 26, 26) },
- {"brown1" , PALETTERGB (255, 64, 64) },
- {"brown2" , PALETTERGB (238, 59, 59) },
- {"brown3" , PALETTERGB (205, 51, 51) },
- {"brown4" , PALETTERGB (139, 35, 35) },
- {"salmon1" , PALETTERGB (255, 140, 105) },
- {"salmon2" , PALETTERGB (238, 130, 98) },
- {"salmon3" , PALETTERGB (205, 112, 84) },
- {"salmon4" , PALETTERGB (139, 76, 57) },
- {"LightSalmon1" , PALETTERGB (255, 160, 122) },
- {"LightSalmon2" , PALETTERGB (238, 149, 114) },
- {"LightSalmon3" , PALETTERGB (205, 129, 98) },
- {"LightSalmon4" , PALETTERGB (139, 87, 66) },
- {"orange1" , PALETTERGB (255, 165, 0) },
- {"orange2" , PALETTERGB (238, 154, 0) },
- {"orange3" , PALETTERGB (205, 133, 0) },
- {"orange4" , PALETTERGB (139, 90, 0) },
- {"DarkOrange1" , PALETTERGB (255, 127, 0) },
- {"DarkOrange2" , PALETTERGB (238, 118, 0) },
- {"DarkOrange3" , PALETTERGB (205, 102, 0) },
- {"DarkOrange4" , PALETTERGB (139, 69, 0) },
- {"coral1" , PALETTERGB (255, 114, 86) },
- {"coral2" , PALETTERGB (238, 106, 80) },
- {"coral3" , PALETTERGB (205, 91, 69) },
- {"coral4" , PALETTERGB (139, 62, 47) },
- {"tomato1" , PALETTERGB (255, 99, 71) },
- {"tomato2" , PALETTERGB (238, 92, 66) },
- {"tomato3" , PALETTERGB (205, 79, 57) },
- {"tomato4" , PALETTERGB (139, 54, 38) },
- {"OrangeRed1" , PALETTERGB (255, 69, 0) },
- {"OrangeRed2" , PALETTERGB (238, 64, 0) },
- {"OrangeRed3" , PALETTERGB (205, 55, 0) },
- {"OrangeRed4" , PALETTERGB (139, 37, 0) },
- {"red1" , PALETTERGB (255, 0, 0) },
- {"red2" , PALETTERGB (238, 0, 0) },
- {"red3" , PALETTERGB (205, 0, 0) },
- {"red4" , PALETTERGB (139, 0, 0) },
- {"DeepPink1" , PALETTERGB (255, 20, 147) },
- {"DeepPink2" , PALETTERGB (238, 18, 137) },
- {"DeepPink3" , PALETTERGB (205, 16, 118) },
- {"DeepPink4" , PALETTERGB (139, 10, 80) },
- {"HotPink1" , PALETTERGB (255, 110, 180) },
- {"HotPink2" , PALETTERGB (238, 106, 167) },
- {"HotPink3" , PALETTERGB (205, 96, 144) },
- {"HotPink4" , PALETTERGB (139, 58, 98) },
- {"pink1" , PALETTERGB (255, 181, 197) },
- {"pink2" , PALETTERGB (238, 169, 184) },
- {"pink3" , PALETTERGB (205, 145, 158) },
- {"pink4" , PALETTERGB (139, 99, 108) },
- {"LightPink1" , PALETTERGB (255, 174, 185) },
- {"LightPink2" , PALETTERGB (238, 162, 173) },
- {"LightPink3" , PALETTERGB (205, 140, 149) },
- {"LightPink4" , PALETTERGB (139, 95, 101) },
- {"PaleVioletRed1" , PALETTERGB (255, 130, 171) },
- {"PaleVioletRed2" , PALETTERGB (238, 121, 159) },
- {"PaleVioletRed3" , PALETTERGB (205, 104, 137) },
- {"PaleVioletRed4" , PALETTERGB (139, 71, 93) },
- {"maroon1" , PALETTERGB (255, 52, 179) },
- {"maroon2" , PALETTERGB (238, 48, 167) },
- {"maroon3" , PALETTERGB (205, 41, 144) },
- {"maroon4" , PALETTERGB (139, 28, 98) },
- {"VioletRed1" , PALETTERGB (255, 62, 150) },
- {"VioletRed2" , PALETTERGB (238, 58, 140) },
- {"VioletRed3" , PALETTERGB (205, 50, 120) },
- {"VioletRed4" , PALETTERGB (139, 34, 82) },
- {"magenta1" , PALETTERGB (255, 0, 255) },
- {"magenta2" , PALETTERGB (238, 0, 238) },
- {"magenta3" , PALETTERGB (205, 0, 205) },
- {"magenta4" , PALETTERGB (139, 0, 139) },
- {"orchid1" , PALETTERGB (255, 131, 250) },
- {"orchid2" , PALETTERGB (238, 122, 233) },
- {"orchid3" , PALETTERGB (205, 105, 201) },
- {"orchid4" , PALETTERGB (139, 71, 137) },
- {"plum1" , PALETTERGB (255, 187, 255) },
- {"plum2" , PALETTERGB (238, 174, 238) },
- {"plum3" , PALETTERGB (205, 150, 205) },
- {"plum4" , PALETTERGB (139, 102, 139) },
- {"MediumOrchid1" , PALETTERGB (224, 102, 255) },
- {"MediumOrchid2" , PALETTERGB (209, 95, 238) },
- {"MediumOrchid3" , PALETTERGB (180, 82, 205) },
- {"MediumOrchid4" , PALETTERGB (122, 55, 139) },
- {"DarkOrchid1" , PALETTERGB (191, 62, 255) },
- {"DarkOrchid2" , PALETTERGB (178, 58, 238) },
- {"DarkOrchid3" , PALETTERGB (154, 50, 205) },
- {"DarkOrchid4" , PALETTERGB (104, 34, 139) },
- {"purple1" , PALETTERGB (155, 48, 255) },
- {"purple2" , PALETTERGB (145, 44, 238) },
- {"purple3" , PALETTERGB (125, 38, 205) },
- {"purple4" , PALETTERGB (85, 26, 139) },
- {"MediumPurple1" , PALETTERGB (171, 130, 255) },
- {"MediumPurple2" , PALETTERGB (159, 121, 238) },
- {"MediumPurple3" , PALETTERGB (137, 104, 205) },
- {"MediumPurple4" , PALETTERGB (93, 71, 139) },
- {"thistle1" , PALETTERGB (255, 225, 255) },
- {"thistle2" , PALETTERGB (238, 210, 238) },
- {"thistle3" , PALETTERGB (205, 181, 205) },
- {"thistle4" , PALETTERGB (139, 123, 139) },
- {"gray0" , PALETTERGB (0, 0, 0) },
- {"grey0" , PALETTERGB (0, 0, 0) },
- {"gray1" , PALETTERGB (3, 3, 3) },
- {"grey1" , PALETTERGB (3, 3, 3) },
- {"gray2" , PALETTERGB (5, 5, 5) },
- {"grey2" , PALETTERGB (5, 5, 5) },
- {"gray3" , PALETTERGB (8, 8, 8) },
- {"grey3" , PALETTERGB (8, 8, 8) },
- {"gray4" , PALETTERGB (10, 10, 10) },
- {"grey4" , PALETTERGB (10, 10, 10) },
- {"gray5" , PALETTERGB (13, 13, 13) },
- {"grey5" , PALETTERGB (13, 13, 13) },
- {"gray6" , PALETTERGB (15, 15, 15) },
- {"grey6" , PALETTERGB (15, 15, 15) },
- {"gray7" , PALETTERGB (18, 18, 18) },
- {"grey7" , PALETTERGB (18, 18, 18) },
- {"gray8" , PALETTERGB (20, 20, 20) },
- {"grey8" , PALETTERGB (20, 20, 20) },
- {"gray9" , PALETTERGB (23, 23, 23) },
- {"grey9" , PALETTERGB (23, 23, 23) },
- {"gray10" , PALETTERGB (26, 26, 26) },
- {"grey10" , PALETTERGB (26, 26, 26) },
- {"gray11" , PALETTERGB (28, 28, 28) },
- {"grey11" , PALETTERGB (28, 28, 28) },
- {"gray12" , PALETTERGB (31, 31, 31) },
- {"grey12" , PALETTERGB (31, 31, 31) },
- {"gray13" , PALETTERGB (33, 33, 33) },
- {"grey13" , PALETTERGB (33, 33, 33) },
- {"gray14" , PALETTERGB (36, 36, 36) },
- {"grey14" , PALETTERGB (36, 36, 36) },
- {"gray15" , PALETTERGB (38, 38, 38) },
- {"grey15" , PALETTERGB (38, 38, 38) },
- {"gray16" , PALETTERGB (41, 41, 41) },
- {"grey16" , PALETTERGB (41, 41, 41) },
- {"gray17" , PALETTERGB (43, 43, 43) },
- {"grey17" , PALETTERGB (43, 43, 43) },
- {"gray18" , PALETTERGB (46, 46, 46) },
- {"grey18" , PALETTERGB (46, 46, 46) },
- {"gray19" , PALETTERGB (48, 48, 48) },
- {"grey19" , PALETTERGB (48, 48, 48) },
- {"gray20" , PALETTERGB (51, 51, 51) },
- {"grey20" , PALETTERGB (51, 51, 51) },
- {"gray21" , PALETTERGB (54, 54, 54) },
- {"grey21" , PALETTERGB (54, 54, 54) },
- {"gray22" , PALETTERGB (56, 56, 56) },
- {"grey22" , PALETTERGB (56, 56, 56) },
- {"gray23" , PALETTERGB (59, 59, 59) },
- {"grey23" , PALETTERGB (59, 59, 59) },
- {"gray24" , PALETTERGB (61, 61, 61) },
- {"grey24" , PALETTERGB (61, 61, 61) },
- {"gray25" , PALETTERGB (64, 64, 64) },
- {"grey25" , PALETTERGB (64, 64, 64) },
- {"gray26" , PALETTERGB (66, 66, 66) },
- {"grey26" , PALETTERGB (66, 66, 66) },
- {"gray27" , PALETTERGB (69, 69, 69) },
- {"grey27" , PALETTERGB (69, 69, 69) },
- {"gray28" , PALETTERGB (71, 71, 71) },
- {"grey28" , PALETTERGB (71, 71, 71) },
- {"gray29" , PALETTERGB (74, 74, 74) },
- {"grey29" , PALETTERGB (74, 74, 74) },
- {"gray30" , PALETTERGB (77, 77, 77) },
- {"grey30" , PALETTERGB (77, 77, 77) },
- {"gray31" , PALETTERGB (79, 79, 79) },
- {"grey31" , PALETTERGB (79, 79, 79) },
- {"gray32" , PALETTERGB (82, 82, 82) },
- {"grey32" , PALETTERGB (82, 82, 82) },
- {"gray33" , PALETTERGB (84, 84, 84) },
- {"grey33" , PALETTERGB (84, 84, 84) },
- {"gray34" , PALETTERGB (87, 87, 87) },
- {"grey34" , PALETTERGB (87, 87, 87) },
- {"gray35" , PALETTERGB (89, 89, 89) },
- {"grey35" , PALETTERGB (89, 89, 89) },
- {"gray36" , PALETTERGB (92, 92, 92) },
- {"grey36" , PALETTERGB (92, 92, 92) },
- {"gray37" , PALETTERGB (94, 94, 94) },
- {"grey37" , PALETTERGB (94, 94, 94) },
- {"gray38" , PALETTERGB (97, 97, 97) },
- {"grey38" , PALETTERGB (97, 97, 97) },
- {"gray39" , PALETTERGB (99, 99, 99) },
- {"grey39" , PALETTERGB (99, 99, 99) },
- {"gray40" , PALETTERGB (102, 102, 102) },
- {"grey40" , PALETTERGB (102, 102, 102) },
- {"gray41" , PALETTERGB (105, 105, 105) },
- {"grey41" , PALETTERGB (105, 105, 105) },
- {"gray42" , PALETTERGB (107, 107, 107) },
- {"grey42" , PALETTERGB (107, 107, 107) },
- {"gray43" , PALETTERGB (110, 110, 110) },
- {"grey43" , PALETTERGB (110, 110, 110) },
- {"gray44" , PALETTERGB (112, 112, 112) },
- {"grey44" , PALETTERGB (112, 112, 112) },
- {"gray45" , PALETTERGB (115, 115, 115) },
- {"grey45" , PALETTERGB (115, 115, 115) },
- {"gray46" , PALETTERGB (117, 117, 117) },
- {"grey46" , PALETTERGB (117, 117, 117) },
- {"gray47" , PALETTERGB (120, 120, 120) },
- {"grey47" , PALETTERGB (120, 120, 120) },
- {"gray48" , PALETTERGB (122, 122, 122) },
- {"grey48" , PALETTERGB (122, 122, 122) },
- {"gray49" , PALETTERGB (125, 125, 125) },
- {"grey49" , PALETTERGB (125, 125, 125) },
- {"gray50" , PALETTERGB (127, 127, 127) },
- {"grey50" , PALETTERGB (127, 127, 127) },
- {"gray51" , PALETTERGB (130, 130, 130) },
- {"grey51" , PALETTERGB (130, 130, 130) },
- {"gray52" , PALETTERGB (133, 133, 133) },
- {"grey52" , PALETTERGB (133, 133, 133) },
- {"gray53" , PALETTERGB (135, 135, 135) },
- {"grey53" , PALETTERGB (135, 135, 135) },
- {"gray54" , PALETTERGB (138, 138, 138) },
- {"grey54" , PALETTERGB (138, 138, 138) },
- {"gray55" , PALETTERGB (140, 140, 140) },
- {"grey55" , PALETTERGB (140, 140, 140) },
- {"gray56" , PALETTERGB (143, 143, 143) },
- {"grey56" , PALETTERGB (143, 143, 143) },
- {"gray57" , PALETTERGB (145, 145, 145) },
- {"grey57" , PALETTERGB (145, 145, 145) },
- {"gray58" , PALETTERGB (148, 148, 148) },
- {"grey58" , PALETTERGB (148, 148, 148) },
- {"gray59" , PALETTERGB (150, 150, 150) },
- {"grey59" , PALETTERGB (150, 150, 150) },
- {"gray60" , PALETTERGB (153, 153, 153) },
- {"grey60" , PALETTERGB (153, 153, 153) },
- {"gray61" , PALETTERGB (156, 156, 156) },
- {"grey61" , PALETTERGB (156, 156, 156) },
- {"gray62" , PALETTERGB (158, 158, 158) },
- {"grey62" , PALETTERGB (158, 158, 158) },
- {"gray63" , PALETTERGB (161, 161, 161) },
- {"grey63" , PALETTERGB (161, 161, 161) },
- {"gray64" , PALETTERGB (163, 163, 163) },
- {"grey64" , PALETTERGB (163, 163, 163) },
- {"gray65" , PALETTERGB (166, 166, 166) },
- {"grey65" , PALETTERGB (166, 166, 166) },
- {"gray66" , PALETTERGB (168, 168, 168) },
- {"grey66" , PALETTERGB (168, 168, 168) },
- {"gray67" , PALETTERGB (171, 171, 171) },
- {"grey67" , PALETTERGB (171, 171, 171) },
- {"gray68" , PALETTERGB (173, 173, 173) },
- {"grey68" , PALETTERGB (173, 173, 173) },
- {"gray69" , PALETTERGB (176, 176, 176) },
- {"grey69" , PALETTERGB (176, 176, 176) },
- {"gray70" , PALETTERGB (179, 179, 179) },
- {"grey70" , PALETTERGB (179, 179, 179) },
- {"gray71" , PALETTERGB (181, 181, 181) },
- {"grey71" , PALETTERGB (181, 181, 181) },
- {"gray72" , PALETTERGB (184, 184, 184) },
- {"grey72" , PALETTERGB (184, 184, 184) },
- {"gray73" , PALETTERGB (186, 186, 186) },
- {"grey73" , PALETTERGB (186, 186, 186) },
- {"gray74" , PALETTERGB (189, 189, 189) },
- {"grey74" , PALETTERGB (189, 189, 189) },
- {"gray75" , PALETTERGB (191, 191, 191) },
- {"grey75" , PALETTERGB (191, 191, 191) },
- {"gray76" , PALETTERGB (194, 194, 194) },
- {"grey76" , PALETTERGB (194, 194, 194) },
- {"gray77" , PALETTERGB (196, 196, 196) },
- {"grey77" , PALETTERGB (196, 196, 196) },
- {"gray78" , PALETTERGB (199, 199, 199) },
- {"grey78" , PALETTERGB (199, 199, 199) },
- {"gray79" , PALETTERGB (201, 201, 201) },
- {"grey79" , PALETTERGB (201, 201, 201) },
- {"gray80" , PALETTERGB (204, 204, 204) },
- {"grey80" , PALETTERGB (204, 204, 204) },
- {"gray81" , PALETTERGB (207, 207, 207) },
- {"grey81" , PALETTERGB (207, 207, 207) },
- {"gray82" , PALETTERGB (209, 209, 209) },
- {"grey82" , PALETTERGB (209, 209, 209) },
- {"gray83" , PALETTERGB (212, 212, 212) },
- {"grey83" , PALETTERGB (212, 212, 212) },
- {"gray84" , PALETTERGB (214, 214, 214) },
- {"grey84" , PALETTERGB (214, 214, 214) },
- {"gray85" , PALETTERGB (217, 217, 217) },
- {"grey85" , PALETTERGB (217, 217, 217) },
- {"gray86" , PALETTERGB (219, 219, 219) },
- {"grey86" , PALETTERGB (219, 219, 219) },
- {"gray87" , PALETTERGB (222, 222, 222) },
- {"grey87" , PALETTERGB (222, 222, 222) },
- {"gray88" , PALETTERGB (224, 224, 224) },
- {"grey88" , PALETTERGB (224, 224, 224) },
- {"gray89" , PALETTERGB (227, 227, 227) },
- {"grey89" , PALETTERGB (227, 227, 227) },
- {"gray90" , PALETTERGB (229, 229, 229) },
- {"grey90" , PALETTERGB (229, 229, 229) },
- {"gray91" , PALETTERGB (232, 232, 232) },
- {"grey91" , PALETTERGB (232, 232, 232) },
- {"gray92" , PALETTERGB (235, 235, 235) },
- {"grey92" , PALETTERGB (235, 235, 235) },
- {"gray93" , PALETTERGB (237, 237, 237) },
- {"grey93" , PALETTERGB (237, 237, 237) },
- {"gray94" , PALETTERGB (240, 240, 240) },
- {"grey94" , PALETTERGB (240, 240, 240) },
- {"gray95" , PALETTERGB (242, 242, 242) },
- {"grey95" , PALETTERGB (242, 242, 242) },
- {"gray96" , PALETTERGB (245, 245, 245) },
- {"grey96" , PALETTERGB (245, 245, 245) },
- {"gray97" , PALETTERGB (247, 247, 247) },
- {"grey97" , PALETTERGB (247, 247, 247) },
- {"gray98" , PALETTERGB (250, 250, 250) },
- {"grey98" , PALETTERGB (250, 250, 250) },
- {"gray99" , PALETTERGB (252, 252, 252) },
- {"grey99" , PALETTERGB (252, 252, 252) },
- {"gray100" , PALETTERGB (255, 255, 255) },
- {"grey100" , PALETTERGB (255, 255, 255) },
- {"DarkGrey" , PALETTERGB (169, 169, 169) },
- {"DarkGray" , PALETTERGB (169, 169, 169) },
- {"DarkBlue" , PALETTERGB (0, 0, 139) },
- {"DarkCyan" , PALETTERGB (0, 139, 139) },
- {"DarkMagenta" , PALETTERGB (139, 0, 139) },
- {"DarkRed" , PALETTERGB (139, 0, 0) },
- {"LightGreen" , PALETTERGB (144, 238, 144) }
+ {"white" , PALETTERGB (255, 255, 255) },
+ {"black" , PALETTERGB (0, 0, 0) },
+ {"snow" , PALETTERGB (255, 250, 250) },
+ {"GhostWhite" , PALETTERGB (248, 248, 255) },
+ {"WhiteSmoke" , PALETTERGB (245, 245, 245) },
+ {"gainsboro" , PALETTERGB (220, 220, 220) },
+ {"FloralWhite" , PALETTERGB (255, 250, 240) },
+ {"OldLace" , PALETTERGB (253, 245, 230) },
+ {"linen" , PALETTERGB (250, 240, 230) },
+ {"AntiqueWhite" , PALETTERGB (250, 235, 215) },
+ {"PapayaWhip" , PALETTERGB (255, 239, 213) },
+ {"BlanchedAlmond" , PALETTERGB (255, 235, 205) },
+ {"bisque" , PALETTERGB (255, 228, 196) },
+ {"PeachPuff" , PALETTERGB (255, 218, 185) },
+ {"NavajoWhite" , PALETTERGB (255, 222, 173) },
+ {"moccasin" , PALETTERGB (255, 228, 181) },
+ {"cornsilk" , PALETTERGB (255, 248, 220) },
+ {"ivory" , PALETTERGB (255, 255, 240) },
+ {"LemonChiffon" , PALETTERGB (255, 250, 205) },
+ {"seashell" , PALETTERGB (255, 245, 238) },
+ {"honeydew" , PALETTERGB (240, 255, 240) },
+ {"MintCream" , PALETTERGB (245, 255, 250) },
+ {"azure" , PALETTERGB (240, 255, 255) },
+ {"AliceBlue" , PALETTERGB (240, 248, 255) },
+ {"lavender" , PALETTERGB (230, 230, 250) },
+ {"LavenderBlush" , PALETTERGB (255, 240, 245) },
+ {"MistyRose" , PALETTERGB (255, 228, 225) },
+ {"DarkSlateGray" , PALETTERGB (47, 79, 79) },
+ {"DarkSlateGrey" , PALETTERGB (47, 79, 79) },
+ {"DimGray" , PALETTERGB (105, 105, 105) },
+ {"DimGrey" , PALETTERGB (105, 105, 105) },
+ {"SlateGray" , PALETTERGB (112, 128, 144) },
+ {"SlateGrey" , PALETTERGB (112, 128, 144) },
+ {"LightSlateGray" , PALETTERGB (119, 136, 153) },
+ {"LightSlateGrey" , PALETTERGB (119, 136, 153) },
+ {"gray" , PALETTERGB (190, 190, 190) },
+ {"grey" , PALETTERGB (190, 190, 190) },
+ {"LightGrey" , PALETTERGB (211, 211, 211) },
+ {"LightGray" , PALETTERGB (211, 211, 211) },
+ {"MidnightBlue" , PALETTERGB (25, 25, 112) },
+ {"navy" , PALETTERGB (0, 0, 128) },
+ {"NavyBlue" , PALETTERGB (0, 0, 128) },
+ {"CornflowerBlue" , PALETTERGB (100, 149, 237) },
+ {"DarkSlateBlue" , PALETTERGB (72, 61, 139) },
+ {"SlateBlue" , PALETTERGB (106, 90, 205) },
+ {"MediumSlateBlue" , PALETTERGB (123, 104, 238) },
+ {"LightSlateBlue" , PALETTERGB (132, 112, 255) },
+ {"MediumBlue" , PALETTERGB (0, 0, 205) },
+ {"RoyalBlue" , PALETTERGB (65, 105, 225) },
+ {"blue" , PALETTERGB (0, 0, 255) },
+ {"DodgerBlue" , PALETTERGB (30, 144, 255) },
+ {"DeepSkyBlue" , PALETTERGB (0, 191, 255) },
+ {"SkyBlue" , PALETTERGB (135, 206, 235) },
+ {"LightSkyBlue" , PALETTERGB (135, 206, 250) },
+ {"SteelBlue" , PALETTERGB (70, 130, 180) },
+ {"LightSteelBlue" , PALETTERGB (176, 196, 222) },
+ {"LightBlue" , PALETTERGB (173, 216, 230) },
+ {"PowderBlue" , PALETTERGB (176, 224, 230) },
+ {"PaleTurquoise" , PALETTERGB (175, 238, 238) },
+ {"DarkTurquoise" , PALETTERGB (0, 206, 209) },
+ {"MediumTurquoise" , PALETTERGB (72, 209, 204) },
+ {"turquoise" , PALETTERGB (64, 224, 208) },
+ {"cyan" , PALETTERGB (0, 255, 255) },
+ {"LightCyan" , PALETTERGB (224, 255, 255) },
+ {"CadetBlue" , PALETTERGB (95, 158, 160) },
+ {"MediumAquamarine" , PALETTERGB (102, 205, 170) },
+ {"aquamarine" , PALETTERGB (127, 255, 212) },
+ {"DarkGreen" , PALETTERGB (0, 128, 0) }, /* Adjusted */
+ {"DarkOliveGreen" , PALETTERGB (85, 107, 47) },
+ {"DarkSeaGreen" , PALETTERGB (143, 188, 143) },
+ {"SeaGreen" , PALETTERGB (46, 139, 87) },
+ {"MediumSeaGreen" , PALETTERGB (60, 179, 113) },
+ {"LightSeaGreen" , PALETTERGB (32, 178, 170) },
+ {"PaleGreen" , PALETTERGB (152, 251, 152) },
+ {"SpringGreen" , PALETTERGB (0, 255, 127) },
+ {"LawnGreen" , PALETTERGB (124, 252, 0) },
+ {"green" , PALETTERGB (0, 255, 0) },
+ {"chartreuse" , PALETTERGB (127, 255, 0) },
+ {"MediumSpringGreen" , PALETTERGB (0, 250, 154) },
+ {"GreenYellow" , PALETTERGB (173, 255, 47) },
+ {"LimeGreen" , PALETTERGB (50, 205, 50) },
+ {"YellowGreen" , PALETTERGB (154, 205, 50) },
+ {"ForestGreen" , PALETTERGB (34, 139, 34) },
+ {"OliveDrab" , PALETTERGB (107, 142, 35) },
+ {"DarkKhaki" , PALETTERGB (189, 183, 107) },
+ {"khaki" , PALETTERGB (240, 230, 140) },
+ {"PaleGoldenrod" , PALETTERGB (238, 232, 170) },
+ {"LightGoldenrodYellow", PALETTERGB (250, 250, 210) },
+ {"LightYellow" , PALETTERGB (255, 255, 224) },
+ {"LightYellow" , PALETTERGB (255, 255, 225) }, /* Adjusted */
+ {"yellow" , PALETTERGB (255, 255, 0) },
+ {"gold" , PALETTERGB (255, 215, 0) },
+ {"LightGoldenrod" , PALETTERGB (238, 221, 130) },
+ {"goldenrod" , PALETTERGB (218, 165, 32) },
+ {"DarkGoldenrod" , PALETTERGB (184, 134, 11) },
+ {"RosyBrown" , PALETTERGB (188, 143, 143) },
+ {"IndianRed" , PALETTERGB (205, 92, 92) },
+ {"SaddleBrown" , PALETTERGB (139, 69, 19) },
+ {"sienna" , PALETTERGB (160, 82, 45) },
+ {"peru" , PALETTERGB (205, 133, 63) },
+ {"burlywood" , PALETTERGB (222, 184, 135) },
+ {"beige" , PALETTERGB (245, 245, 220) },
+ {"wheat" , PALETTERGB (245, 222, 179) },
+ {"SandyBrown" , PALETTERGB (244, 164, 96) },
+ {"tan" , PALETTERGB (210, 180, 140) },
+ {"chocolate" , PALETTERGB (210, 105, 30) },
+ {"firebrick" , PALETTERGB (178, 34, 34) },
+ {"brown" , PALETTERGB (165, 42, 42) },
+ {"DarkSalmon" , PALETTERGB (233, 150, 122) },
+ {"salmon" , PALETTERGB (250, 128, 114) },
+ {"LightSalmon" , PALETTERGB (255, 160, 122) },
+ {"orange" , PALETTERGB (255, 165, 0) },
+ {"DarkOrange" , PALETTERGB (255, 140, 0) },
+ {"coral" , PALETTERGB (255, 127, 80) },
+ {"LightCoral" , PALETTERGB (240, 128, 128) },
+ {"tomato" , PALETTERGB (255, 99, 71) },
+ {"OrangeRed" , PALETTERGB (255, 69, 0) },
+ {"red" , PALETTERGB (255, 0, 0) },
+ {"HotPink" , PALETTERGB (255, 105, 180) },
+ {"DeepPink" , PALETTERGB (255, 20, 147) },
+ {"pink" , PALETTERGB (255, 192, 203) },
+ {"LightPink" , PALETTERGB (255, 182, 193) },
+ {"PaleVioletRed" , PALETTERGB (219, 112, 147) },
+ {"maroon" , PALETTERGB (176, 48, 96) },
+ {"MediumVioletRed" , PALETTERGB (199, 21, 133) },
+ {"VioletRed" , PALETTERGB (208, 32, 144) },
+ {"magenta" , PALETTERGB (255, 0, 255) },
+ {"violet" , PALETTERGB (238, 130, 238) },
+ {"plum" , PALETTERGB (221, 160, 221) },
+ {"orchid" , PALETTERGB (218, 112, 214) },
+ {"MediumOrchid" , PALETTERGB (186, 85, 211) },
+ {"DarkOrchid" , PALETTERGB (153, 50, 204) },
+ {"DarkViolet" , PALETTERGB (148, 0, 211) },
+ {"BlueViolet" , PALETTERGB (138, 43, 226) },
+ {"purple" , PALETTERGB (160, 32, 240) },
+ {"MediumPurple" , PALETTERGB (147, 112, 219) },
+ {"thistle" , PALETTERGB (216, 191, 216) },
+ {"snow1" , PALETTERGB (255, 250, 250) },
+ {"snow2" , PALETTERGB (238, 233, 233) },
+ {"snow3" , PALETTERGB (205, 201, 201) },
+ {"snow4" , PALETTERGB (139, 137, 137) },
+ {"seashell1" , PALETTERGB (255, 245, 238) },
+ {"seashell2" , PALETTERGB (238, 229, 222) },
+ {"seashell3" , PALETTERGB (205, 197, 191) },
+ {"seashell4" , PALETTERGB (139, 134, 130) },
+ {"AntiqueWhite1" , PALETTERGB (255, 239, 219) },
+ {"AntiqueWhite2" , PALETTERGB (238, 223, 204) },
+ {"AntiqueWhite3" , PALETTERGB (205, 192, 176) },
+ {"AntiqueWhite4" , PALETTERGB (139, 131, 120) },
+ {"bisque1" , PALETTERGB (255, 228, 196) },
+ {"bisque2" , PALETTERGB (238, 213, 183) },
+ {"bisque3" , PALETTERGB (205, 183, 158) },
+ {"bisque4" , PALETTERGB (139, 125, 107) },
+ {"PeachPuff1" , PALETTERGB (255, 218, 185) },
+ {"PeachPuff2" , PALETTERGB (238, 203, 173) },
+ {"PeachPuff3" , PALETTERGB (205, 175, 149) },
+ {"PeachPuff4" , PALETTERGB (139, 119, 101) },
+ {"NavajoWhite1" , PALETTERGB (255, 222, 173) },
+ {"NavajoWhite2" , PALETTERGB (238, 207, 161) },
+ {"NavajoWhite3" , PALETTERGB (205, 179, 139) },
+ {"NavajoWhite4" , PALETTERGB (139, 121, 94) },
+ {"LemonChiffon1" , PALETTERGB (255, 250, 205) },
+ {"LemonChiffon2" , PALETTERGB (238, 233, 191) },
+ {"LemonChiffon3" , PALETTERGB (205, 201, 165) },
+ {"LemonChiffon4" , PALETTERGB (139, 137, 112) },
+ {"cornsilk1" , PALETTERGB (255, 248, 220) },
+ {"cornsilk2" , PALETTERGB (238, 232, 205) },
+ {"cornsilk3" , PALETTERGB (205, 200, 177) },
+ {"cornsilk4" , PALETTERGB (139, 136, 120) },
+ {"ivory1" , PALETTERGB (255, 255, 240) },
+ {"ivory2" , PALETTERGB (240, 240, 208) }, /* Adjusted */
+ {"ivory3" , PALETTERGB (205, 205, 193) },
+ {"ivory4" , PALETTERGB (139, 139, 131) },
+ {"honeydew1" , PALETTERGB (240, 255, 240) },
+ {"honeydew2" , PALETTERGB (224, 238, 224) },
+ {"honeydew3" , PALETTERGB (193, 205, 193) },
+ {"honeydew4" , PALETTERGB (131, 139, 131) },
+ {"LavenderBlush1" , PALETTERGB (255, 240, 245) },
+ {"LavenderBlush2" , PALETTERGB (238, 224, 229) },
+ {"LavenderBlush3" , PALETTERGB (205, 193, 197) },
+ {"LavenderBlush4" , PALETTERGB (139, 131, 134) },
+ {"MistyRose1" , PALETTERGB (255, 228, 225) },
+ {"MistyRose2" , PALETTERGB (238, 213, 210) },
+ {"MistyRose3" , PALETTERGB (205, 183, 181) },
+ {"MistyRose4" , PALETTERGB (139, 125, 123) },
+ {"azure1" , PALETTERGB (240, 255, 255) },
+ {"azure2" , PALETTERGB (224, 238, 238) },
+ {"azure3" , PALETTERGB (193, 205, 205) },
+ {"azure4" , PALETTERGB (131, 139, 139) },
+ {"SlateBlue1" , PALETTERGB (131, 111, 255) },
+ {"SlateBlue2" , PALETTERGB (122, 103, 238) },
+ {"SlateBlue3" , PALETTERGB (105, 89, 205) },
+ {"SlateBlue4" , PALETTERGB (71, 60, 139) },
+ {"RoyalBlue1" , PALETTERGB (72, 118, 255) },
+ {"RoyalBlue2" , PALETTERGB (67, 110, 238) },
+ {"RoyalBlue3" , PALETTERGB (58, 95, 205) },
+ {"RoyalBlue4" , PALETTERGB (39, 64, 139) },
+ {"blue1" , PALETTERGB (0, 0, 255) },
+ {"blue2" , PALETTERGB (0, 0, 238) },
+ {"blue3" , PALETTERGB (0, 0, 205) },
+ {"blue4" , PALETTERGB (0, 0, 139) },
+ {"DodgerBlue1" , PALETTERGB (30, 144, 255) },
+ {"DodgerBlue2" , PALETTERGB (28, 134, 238) },
+ {"DodgerBlue3" , PALETTERGB (24, 116, 205) },
+ {"DodgerBlue4" , PALETTERGB (16, 78, 139) },
+ {"SteelBlue1" , PALETTERGB (99, 184, 255) },
+ {"SteelBlue2" , PALETTERGB (92, 172, 238) },
+ {"SteelBlue3" , PALETTERGB (79, 148, 205) },
+ {"SteelBlue4" , PALETTERGB (54, 100, 139) },
+ {"DeepSkyBlue1" , PALETTERGB (0, 191, 255) },
+ {"DeepSkyBlue2" , PALETTERGB (0, 178, 238) },
+ {"DeepSkyBlue3" , PALETTERGB (0, 154, 205) },
+ {"DeepSkyBlue4" , PALETTERGB (0, 104, 139) },
+ {"SkyBlue1" , PALETTERGB (135, 206, 255) },
+ {"SkyBlue2" , PALETTERGB (126, 192, 238) },
+ {"SkyBlue3" , PALETTERGB (108, 166, 205) },
+ {"SkyBlue4" , PALETTERGB (74, 112, 139) },
+ {"LightSkyBlue1" , PALETTERGB (176, 226, 255) },
+ {"LightSkyBlue2" , PALETTERGB (164, 211, 238) },
+ {"LightSkyBlue3" , PALETTERGB (141, 182, 205) },
+ {"LightSkyBlue4" , PALETTERGB (96, 123, 139) },
+ {"SlateGray1" , PALETTERGB (198, 226, 255) },
+ {"SlateGray2" , PALETTERGB (185, 211, 238) },
+ {"SlateGray3" , PALETTERGB (159, 182, 205) },
+ {"SlateGray4" , PALETTERGB (108, 123, 139) },
+ {"LightSteelBlue1" , PALETTERGB (202, 225, 255) },
+ {"LightSteelBlue2" , PALETTERGB (188, 210, 238) },
+ {"LightSteelBlue3" , PALETTERGB (162, 181, 205) },
+ {"LightSteelBlue4" , PALETTERGB (110, 123, 139) },
+ {"LightBlue1" , PALETTERGB (191, 239, 255) },
+ {"LightBlue2" , PALETTERGB (178, 223, 238) },
+ {"LightBlue3" , PALETTERGB (154, 192, 205) },
+ {"LightBlue4" , PALETTERGB (104, 131, 139) },
+ {"LightCyan1" , PALETTERGB (224, 255, 255) },
+ {"LightCyan2" , PALETTERGB (209, 238, 238) },
+ {"LightCyan3" , PALETTERGB (180, 205, 205) },
+ {"LightCyan4" , PALETTERGB (122, 139, 139) },
+ {"PaleTurquoise1" , PALETTERGB (187, 255, 255) },
+ {"PaleTurquoise2" , PALETTERGB (174, 238, 238) },
+ {"PaleTurquoise3" , PALETTERGB (150, 205, 205) },
+ {"PaleTurquoise4" , PALETTERGB (102, 139, 139) },
+ {"CadetBlue1" , PALETTERGB (152, 245, 255) },
+ {"CadetBlue2" , PALETTERGB (144, 220, 240) }, /* Adjusted */
+ {"CadetBlue3" , PALETTERGB (122, 197, 205) },
+ {"CadetBlue4" , PALETTERGB (83, 134, 139) },
+ {"turquoise1" , PALETTERGB (0, 245, 255) },
+ {"turquoise2" , PALETTERGB (0, 229, 238) },
+ {"turquoise3" , PALETTERGB (0, 197, 205) },
+ {"turquoise4" , PALETTERGB (0, 134, 139) },
+ {"cyan1" , PALETTERGB (0, 255, 255) },
+ {"cyan2" , PALETTERGB (0, 238, 238) },
+ {"cyan3" , PALETTERGB (0, 205, 205) },
+ {"cyan4" , PALETTERGB (0, 139, 139) },
+ {"DarkSlateGray1" , PALETTERGB (151, 255, 255) },
+ {"DarkSlateGray2" , PALETTERGB (141, 238, 238) },
+ {"DarkSlateGray3" , PALETTERGB (121, 205, 205) },
+ {"DarkSlateGray4" , PALETTERGB (82, 139, 139) },
+ {"aquamarine1" , PALETTERGB (127, 255, 212) },
+ {"aquamarine2" , PALETTERGB (118, 238, 198) },
+ {"aquamarine3" , PALETTERGB (102, 205, 170) },
+ {"aquamarine4" , PALETTERGB (69, 139, 116) },
+ {"DarkSeaGreen1" , PALETTERGB (193, 255, 193) },
+ {"DarkSeaGreen2" , PALETTERGB (180, 238, 180) },
+ {"DarkSeaGreen3" , PALETTERGB (155, 205, 155) },
+ {"DarkSeaGreen4" , PALETTERGB (105, 139, 105) },
+ {"SeaGreen1" , PALETTERGB (84, 255, 159) },
+ {"SeaGreen2" , PALETTERGB (78, 238, 148) },
+ {"SeaGreen3" , PALETTERGB (67, 205, 128) },
+ {"SeaGreen4" , PALETTERGB (46, 139, 87) },
+ {"PaleGreen1" , PALETTERGB (154, 255, 154) },
+ {"PaleGreen2" , PALETTERGB (144, 238, 144) },
+ {"PaleGreen3" , PALETTERGB (124, 205, 124) },
+ {"PaleGreen4" , PALETTERGB (84, 139, 84) },
+ {"SpringGreen1" , PALETTERGB (0, 255, 127) },
+ {"SpringGreen2" , PALETTERGB (0, 238, 118) },
+ {"SpringGreen3" , PALETTERGB (0, 205, 102) },
+ {"SpringGreen4" , PALETTERGB (0, 139, 69) },
+ {"green1" , PALETTERGB (0, 255, 0) },
+ {"green2" , PALETTERGB (0, 238, 0) },
+ {"green3" , PALETTERGB (0, 205, 0) },
+ {"green4" , PALETTERGB (0, 139, 0) },
+ {"chartreuse1" , PALETTERGB (127, 255, 0) },
+ {"chartreuse2" , PALETTERGB (118, 238, 0) },
+ {"chartreuse3" , PALETTERGB (102, 205, 0) },
+ {"chartreuse4" , PALETTERGB (69, 139, 0) },
+ {"OliveDrab1" , PALETTERGB (192, 255, 62) },
+ {"OliveDrab2" , PALETTERGB (179, 238, 58) },
+ {"OliveDrab3" , PALETTERGB (154, 205, 50) },
+ {"OliveDrab4" , PALETTERGB (105, 139, 34) },
+ {"DarkOliveGreen1" , PALETTERGB (202, 255, 112) },
+ {"DarkOliveGreen2" , PALETTERGB (188, 238, 104) },
+ {"DarkOliveGreen3" , PALETTERGB (162, 205, 90) },
+ {"DarkOliveGreen4" , PALETTERGB (110, 139, 61) },
+ {"khaki1" , PALETTERGB (255, 246, 143) },
+ {"khaki2" , PALETTERGB (238, 230, 133) },
+ {"khaki3" , PALETTERGB (205, 198, 115) },
+ {"khaki4" , PALETTERGB (139, 134, 78) },
+ {"LightGoldenrod1" , PALETTERGB (255, 236, 139) },
+ {"LightGoldenrod2" , PALETTERGB (238, 220, 130) },
+ {"LightGoldenrod3" , PALETTERGB (205, 190, 112) },
+ {"LightGoldenrod4" , PALETTERGB (139, 129, 76) },
+ {"LightYellow1" , PALETTERGB (255, 255, 224) },
+ {"LightYellow2" , PALETTERGB (238, 238, 209) },
+ {"LightYellow3" , PALETTERGB (205, 205, 180) },
+ {"LightYellow4" , PALETTERGB (139, 139, 122) },
+ {"yellow1" , PALETTERGB (255, 255, 0) },
+ {"yellow2" , PALETTERGB (238, 238, 0) },
+ {"yellow3" , PALETTERGB (205, 205, 0) },
+ {"yellow4" , PALETTERGB (139, 139, 0) },
+ {"gold1" , PALETTERGB (255, 215, 0) },
+ {"gold2" , PALETTERGB (238, 201, 0) },
+ {"gold3" , PALETTERGB (205, 173, 0) },
+ {"gold4" , PALETTERGB (139, 117, 0) },
+ {"goldenrod1" , PALETTERGB (255, 193, 37) },
+ {"goldenrod2" , PALETTERGB (238, 180, 34) },
+ {"goldenrod3" , PALETTERGB (205, 155, 29) },
+ {"goldenrod4" , PALETTERGB (139, 105, 20) },
+ {"DarkGoldenrod1" , PALETTERGB (255, 185, 15) },
+ {"DarkGoldenrod2" , PALETTERGB (238, 173, 14) },
+ {"DarkGoldenrod3" , PALETTERGB (205, 149, 12) },
+ {"DarkGoldenrod4" , PALETTERGB (139, 101, 8) },
+ {"RosyBrown1" , PALETTERGB (255, 193, 193) },
+ {"RosyBrown2" , PALETTERGB (238, 180, 180) },
+ {"RosyBrown3" , PALETTERGB (205, 155, 155) },
+ {"RosyBrown4" , PALETTERGB (139, 105, 105) },
+ {"IndianRed1" , PALETTERGB (255, 106, 106) },
+ {"IndianRed2" , PALETTERGB (238, 99, 99) },
+ {"IndianRed3" , PALETTERGB (205, 85, 85) },
+ {"IndianRed4" , PALETTERGB (139, 58, 58) },
+ {"sienna1" , PALETTERGB (255, 130, 71) },
+ {"sienna2" , PALETTERGB (238, 121, 66) },
+ {"sienna3" , PALETTERGB (205, 104, 57) },
+ {"sienna4" , PALETTERGB (139, 71, 38) },
+ {"burlywood1" , PALETTERGB (255, 211, 155) },
+ {"burlywood2" , PALETTERGB (238, 197, 145) },
+ {"burlywood3" , PALETTERGB (205, 170, 125) },
+ {"burlywood4" , PALETTERGB (139, 115, 85) },
+ {"wheat1" , PALETTERGB (255, 231, 186) },
+ {"wheat2" , PALETTERGB (238, 216, 174) },
+ {"wheat3" , PALETTERGB (205, 186, 150) },
+ {"wheat4" , PALETTERGB (139, 126, 102) },
+ {"tan1" , PALETTERGB (255, 165, 79) },
+ {"tan2" , PALETTERGB (238, 154, 73) },
+ {"tan3" , PALETTERGB (205, 133, 63) },
+ {"tan4" , PALETTERGB (139, 90, 43) },
+ {"chocolate1" , PALETTERGB (255, 127, 36) },
+ {"chocolate2" , PALETTERGB (238, 118, 33) },
+ {"chocolate3" , PALETTERGB (205, 102, 29) },
+ {"chocolate4" , PALETTERGB (139, 69, 19) },
+ {"firebrick1" , PALETTERGB (255, 48, 48) },
+ {"firebrick2" , PALETTERGB (238, 44, 44) },
+ {"firebrick3" , PALETTERGB (205, 38, 38) },
+ {"firebrick4" , PALETTERGB (139, 26, 26) },
+ {"brown1" , PALETTERGB (255, 64, 64) },
+ {"brown2" , PALETTERGB (238, 59, 59) },
+ {"brown3" , PALETTERGB (205, 51, 51) },
+ {"brown4" , PALETTERGB (139, 35, 35) },
+ {"salmon1" , PALETTERGB (255, 140, 105) },
+ {"salmon2" , PALETTERGB (238, 130, 98) },
+ {"salmon3" , PALETTERGB (205, 112, 84) },
+ {"salmon4" , PALETTERGB (139, 76, 57) },
+ {"LightSalmon1" , PALETTERGB (255, 160, 122) },
+ {"LightSalmon2" , PALETTERGB (238, 149, 114) },
+ {"LightSalmon3" , PALETTERGB (205, 129, 98) },
+ {"LightSalmon4" , PALETTERGB (139, 87, 66) },
+ {"orange1" , PALETTERGB (255, 165, 0) },
+ {"orange2" , PALETTERGB (238, 154, 0) },
+ {"orange3" , PALETTERGB (205, 133, 0) },
+ {"orange4" , PALETTERGB (139, 90, 0) },
+ {"DarkOrange1" , PALETTERGB (255, 127, 0) },
+ {"DarkOrange2" , PALETTERGB (238, 118, 0) },
+ {"DarkOrange3" , PALETTERGB (205, 102, 0) },
+ {"DarkOrange4" , PALETTERGB (139, 69, 0) },
+ {"coral1" , PALETTERGB (255, 114, 86) },
+ {"coral2" , PALETTERGB (238, 106, 80) },
+ {"coral3" , PALETTERGB (205, 91, 69) },
+ {"coral4" , PALETTERGB (139, 62, 47) },
+ {"tomato1" , PALETTERGB (255, 99, 71) },
+ {"tomato2" , PALETTERGB (238, 92, 66) },
+ {"tomato3" , PALETTERGB (205, 79, 57) },
+ {"tomato4" , PALETTERGB (139, 54, 38) },
+ {"OrangeRed1" , PALETTERGB (255, 69, 0) },
+ {"OrangeRed2" , PALETTERGB (238, 64, 0) },
+ {"OrangeRed3" , PALETTERGB (205, 55, 0) },
+ {"OrangeRed4" , PALETTERGB (139, 37, 0) },
+ {"red1" , PALETTERGB (255, 0, 0) },
+ {"red2" , PALETTERGB (238, 0, 0) },
+ {"red3" , PALETTERGB (205, 0, 0) },
+ {"red4" , PALETTERGB (139, 0, 0) },
+ {"DeepPink1" , PALETTERGB (255, 20, 147) },
+ {"DeepPink2" , PALETTERGB (238, 18, 137) },
+ {"DeepPink3" , PALETTERGB (205, 16, 118) },
+ {"DeepPink4" , PALETTERGB (139, 10, 80) },
+ {"HotPink1" , PALETTERGB (255, 110, 180) },
+ {"HotPink2" , PALETTERGB (238, 106, 167) },
+ {"HotPink3" , PALETTERGB (205, 96, 144) },
+ {"HotPink4" , PALETTERGB (139, 58, 98) },
+ {"pink1" , PALETTERGB (255, 181, 197) },
+ {"pink2" , PALETTERGB (238, 169, 184) },
+ {"pink3" , PALETTERGB (205, 145, 158) },
+ {"pink4" , PALETTERGB (139, 99, 108) },
+ {"LightPink1" , PALETTERGB (255, 174, 185) },
+ {"LightPink2" , PALETTERGB (238, 162, 173) },
+ {"LightPink3" , PALETTERGB (205, 140, 149) },
+ {"LightPink4" , PALETTERGB (139, 95, 101) },
+ {"PaleVioletRed1" , PALETTERGB (255, 130, 171) },
+ {"PaleVioletRed2" , PALETTERGB (238, 121, 159) },
+ {"PaleVioletRed3" , PALETTERGB (205, 104, 137) },
+ {"PaleVioletRed4" , PALETTERGB (139, 71, 93) },
+ {"maroon1" , PALETTERGB (255, 52, 179) },
+ {"maroon2" , PALETTERGB (238, 48, 167) },
+ {"maroon3" , PALETTERGB (205, 41, 144) },
+ {"maroon4" , PALETTERGB (139, 28, 98) },
+ {"VioletRed1" , PALETTERGB (255, 62, 150) },
+ {"VioletRed2" , PALETTERGB (238, 58, 140) },
+ {"VioletRed3" , PALETTERGB (205, 50, 120) },
+ {"VioletRed4" , PALETTERGB (139, 34, 82) },
+ {"magenta1" , PALETTERGB (255, 0, 255) },
+ {"magenta2" , PALETTERGB (238, 0, 238) },
+ {"magenta3" , PALETTERGB (205, 0, 205) },
+ {"magenta4" , PALETTERGB (139, 0, 139) },
+ {"orchid1" , PALETTERGB (255, 131, 250) },
+ {"orchid2" , PALETTERGB (238, 122, 233) },
+ {"orchid3" , PALETTERGB (205, 105, 201) },
+ {"orchid4" , PALETTERGB (139, 71, 137) },
+ {"plum1" , PALETTERGB (255, 187, 255) },
+ {"plum2" , PALETTERGB (238, 174, 238) },
+ {"plum3" , PALETTERGB (205, 150, 205) },
+ {"plum4" , PALETTERGB (139, 102, 139) },
+ {"MediumOrchid1" , PALETTERGB (224, 102, 255) },
+ {"MediumOrchid2" , PALETTERGB (209, 95, 238) },
+ {"MediumOrchid3" , PALETTERGB (180, 82, 205) },
+ {"MediumOrchid4" , PALETTERGB (122, 55, 139) },
+ {"DarkOrchid1" , PALETTERGB (191, 62, 255) },
+ {"DarkOrchid2" , PALETTERGB (178, 58, 238) },
+ {"DarkOrchid3" , PALETTERGB (154, 50, 205) },
+ {"DarkOrchid4" , PALETTERGB (104, 34, 139) },
+ {"purple1" , PALETTERGB (155, 48, 255) },
+ {"purple2" , PALETTERGB (145, 44, 238) },
+ {"purple3" , PALETTERGB (125, 38, 205) },
+ {"purple4" , PALETTERGB (85, 26, 139) },
+ {"MediumPurple1" , PALETTERGB (171, 130, 255) },
+ {"MediumPurple2" , PALETTERGB (159, 121, 238) },
+ {"MediumPurple3" , PALETTERGB (137, 104, 205) },
+ {"MediumPurple4" , PALETTERGB (93, 71, 139) },
+ {"thistle1" , PALETTERGB (255, 225, 255) },
+ {"thistle2" , PALETTERGB (238, 210, 238) },
+ {"thistle3" , PALETTERGB (205, 181, 205) },
+ {"thistle4" , PALETTERGB (139, 123, 139) },
+ {"gray0" , PALETTERGB (0, 0, 0) },
+ {"grey0" , PALETTERGB (0, 0, 0) },
+ {"gray1" , PALETTERGB (3, 3, 3) },
+ {"grey1" , PALETTERGB (3, 3, 3) },
+ {"gray2" , PALETTERGB (5, 5, 5) },
+ {"grey2" , PALETTERGB (5, 5, 5) },
+ {"gray3" , PALETTERGB (8, 8, 8) },
+ {"grey3" , PALETTERGB (8, 8, 8) },
+ {"gray4" , PALETTERGB (10, 10, 10) },
+ {"grey4" , PALETTERGB (10, 10, 10) },
+ {"gray5" , PALETTERGB (13, 13, 13) },
+ {"grey5" , PALETTERGB (13, 13, 13) },
+ {"gray6" , PALETTERGB (15, 15, 15) },
+ {"grey6" , PALETTERGB (15, 15, 15) },
+ {"gray7" , PALETTERGB (18, 18, 18) },
+ {"grey7" , PALETTERGB (18, 18, 18) },
+ {"gray8" , PALETTERGB (20, 20, 20) },
+ {"grey8" , PALETTERGB (20, 20, 20) },
+ {"gray9" , PALETTERGB (23, 23, 23) },
+ {"grey9" , PALETTERGB (23, 23, 23) },
+ {"gray10" , PALETTERGB (26, 26, 26) },
+ {"grey10" , PALETTERGB (26, 26, 26) },
+ {"gray11" , PALETTERGB (28, 28, 28) },
+ {"grey11" , PALETTERGB (28, 28, 28) },
+ {"gray12" , PALETTERGB (31, 31, 31) },
+ {"grey12" , PALETTERGB (31, 31, 31) },
+ {"gray13" , PALETTERGB (33, 33, 33) },
+ {"grey13" , PALETTERGB (33, 33, 33) },
+ {"gray14" , PALETTERGB (36, 36, 36) },
+ {"grey14" , PALETTERGB (36, 36, 36) },
+ {"gray15" , PALETTERGB (38, 38, 38) },
+ {"grey15" , PALETTERGB (38, 38, 38) },
+ {"gray16" , PALETTERGB (41, 41, 41) },
+ {"grey16" , PALETTERGB (41, 41, 41) },
+ {"gray17" , PALETTERGB (43, 43, 43) },
+ {"grey17" , PALETTERGB (43, 43, 43) },
+ {"gray18" , PALETTERGB (46, 46, 46) },
+ {"grey18" , PALETTERGB (46, 46, 46) },
+ {"gray19" , PALETTERGB (48, 48, 48) },
+ {"grey19" , PALETTERGB (48, 48, 48) },
+ {"gray20" , PALETTERGB (51, 51, 51) },
+ {"grey20" , PALETTERGB (51, 51, 51) },
+ {"gray21" , PALETTERGB (54, 54, 54) },
+ {"grey21" , PALETTERGB (54, 54, 54) },
+ {"gray22" , PALETTERGB (56, 56, 56) },
+ {"grey22" , PALETTERGB (56, 56, 56) },
+ {"gray23" , PALETTERGB (59, 59, 59) },
+ {"grey23" , PALETTERGB (59, 59, 59) },
+ {"gray24" , PALETTERGB (61, 61, 61) },
+ {"grey24" , PALETTERGB (61, 61, 61) },
+ {"gray25" , PALETTERGB (64, 64, 64) },
+ {"grey25" , PALETTERGB (64, 64, 64) },
+ {"gray26" , PALETTERGB (66, 66, 66) },
+ {"grey26" , PALETTERGB (66, 66, 66) },
+ {"gray27" , PALETTERGB (69, 69, 69) },
+ {"grey27" , PALETTERGB (69, 69, 69) },
+ {"gray28" , PALETTERGB (71, 71, 71) },
+ {"grey28" , PALETTERGB (71, 71, 71) },
+ {"gray29" , PALETTERGB (74, 74, 74) },
+ {"grey29" , PALETTERGB (74, 74, 74) },
+ {"gray30" , PALETTERGB (77, 77, 77) },
+ {"grey30" , PALETTERGB (77, 77, 77) },
+ {"gray31" , PALETTERGB (79, 79, 79) },
+ {"grey31" , PALETTERGB (79, 79, 79) },
+ {"gray32" , PALETTERGB (82, 82, 82) },
+ {"grey32" , PALETTERGB (82, 82, 82) },
+ {"gray33" , PALETTERGB (84, 84, 84) },
+ {"grey33" , PALETTERGB (84, 84, 84) },
+ {"gray34" , PALETTERGB (87, 87, 87) },
+ {"grey34" , PALETTERGB (87, 87, 87) },
+ {"gray35" , PALETTERGB (89, 89, 89) },
+ {"grey35" , PALETTERGB (89, 89, 89) },
+ {"gray36" , PALETTERGB (92, 92, 92) },
+ {"grey36" , PALETTERGB (92, 92, 92) },
+ {"gray37" , PALETTERGB (94, 94, 94) },
+ {"grey37" , PALETTERGB (94, 94, 94) },
+ {"gray38" , PALETTERGB (97, 97, 97) },
+ {"grey38" , PALETTERGB (97, 97, 97) },
+ {"gray39" , PALETTERGB (99, 99, 99) },
+ {"grey39" , PALETTERGB (99, 99, 99) },
+ {"gray40" , PALETTERGB (102, 102, 102) },
+ {"grey40" , PALETTERGB (102, 102, 102) },
+ {"gray41" , PALETTERGB (105, 105, 105) },
+ {"grey41" , PALETTERGB (105, 105, 105) },
+ {"gray42" , PALETTERGB (107, 107, 107) },
+ {"grey42" , PALETTERGB (107, 107, 107) },
+ {"gray43" , PALETTERGB (110, 110, 110) },
+ {"grey43" , PALETTERGB (110, 110, 110) },
+ {"gray44" , PALETTERGB (112, 112, 112) },
+ {"grey44" , PALETTERGB (112, 112, 112) },
+ {"gray45" , PALETTERGB (115, 115, 115) },
+ {"grey45" , PALETTERGB (115, 115, 115) },
+ {"gray46" , PALETTERGB (117, 117, 117) },
+ {"grey46" , PALETTERGB (117, 117, 117) },
+ {"gray47" , PALETTERGB (120, 120, 120) },
+ {"grey47" , PALETTERGB (120, 120, 120) },
+ {"gray48" , PALETTERGB (122, 122, 122) },
+ {"grey48" , PALETTERGB (122, 122, 122) },
+ {"gray49" , PALETTERGB (125, 125, 125) },
+ {"grey49" , PALETTERGB (125, 125, 125) },
+ {"gray50" , PALETTERGB (128, 128, 128) }, /* Adjusted */
+ {"grey50" , PALETTERGB (128, 128, 128) }, /* Adjusted */
+ {"gray51" , PALETTERGB (130, 130, 130) },
+ {"grey51" , PALETTERGB (130, 130, 130) },
+ {"gray52" , PALETTERGB (133, 133, 133) },
+ {"grey52" , PALETTERGB (133, 133, 133) },
+ {"gray53" , PALETTERGB (135, 135, 135) },
+ {"grey53" , PALETTERGB (135, 135, 135) },
+ {"gray54" , PALETTERGB (138, 138, 138) },
+ {"grey54" , PALETTERGB (138, 138, 138) },
+ {"gray55" , PALETTERGB (140, 140, 140) },
+ {"grey55" , PALETTERGB (140, 140, 140) },
+ {"gray56" , PALETTERGB (143, 143, 143) },
+ {"grey56" , PALETTERGB (143, 143, 143) },
+ {"gray57" , PALETTERGB (145, 145, 145) },
+ {"grey57" , PALETTERGB (145, 145, 145) },
+ {"gray58" , PALETTERGB (148, 148, 148) },
+ {"grey58" , PALETTERGB (148, 148, 148) },
+ {"gray59" , PALETTERGB (150, 150, 150) },
+ {"grey59" , PALETTERGB (150, 150, 150) },
+ {"gray60" , PALETTERGB (153, 153, 153) },
+ {"grey60" , PALETTERGB (153, 153, 153) },
+ {"gray61" , PALETTERGB (156, 156, 156) },
+ {"grey61" , PALETTERGB (156, 156, 156) },
+ {"gray62" , PALETTERGB (158, 158, 158) },
+ {"grey62" , PALETTERGB (158, 158, 158) },
+ {"gray63" , PALETTERGB (161, 161, 161) },
+ {"grey63" , PALETTERGB (161, 161, 161) },
+ {"gray64" , PALETTERGB (163, 163, 163) },
+ {"grey64" , PALETTERGB (163, 163, 163) },
+ {"gray65" , PALETTERGB (166, 166, 166) },
+ {"grey65" , PALETTERGB (166, 166, 166) },
+ {"gray66" , PALETTERGB (168, 168, 168) },
+ {"grey66" , PALETTERGB (168, 168, 168) },
+ {"gray67" , PALETTERGB (171, 171, 171) },
+ {"grey67" , PALETTERGB (171, 171, 171) },
+ {"gray68" , PALETTERGB (173, 173, 173) },
+ {"grey68" , PALETTERGB (173, 173, 173) },
+ {"gray69" , PALETTERGB (176, 176, 176) },
+ {"grey69" , PALETTERGB (176, 176, 176) },
+ {"gray70" , PALETTERGB (179, 179, 179) },
+ {"grey70" , PALETTERGB (179, 179, 179) },
+ {"gray71" , PALETTERGB (181, 181, 181) },
+ {"grey71" , PALETTERGB (181, 181, 181) },
+ {"gray72" , PALETTERGB (184, 184, 184) },
+ {"grey72" , PALETTERGB (184, 184, 184) },
+ {"gray73" , PALETTERGB (186, 186, 186) },
+ {"grey73" , PALETTERGB (186, 186, 186) },
+ {"gray74" , PALETTERGB (189, 189, 189) },
+ {"grey74" , PALETTERGB (189, 189, 189) },
+ {"gray75" , PALETTERGB (192, 192, 192) }, /* Adjusted */
+ {"grey75" , PALETTERGB (192, 192, 192) }, /* Adjusted */
+ {"gray76" , PALETTERGB (194, 194, 194) },
+ {"grey76" , PALETTERGB (194, 194, 194) },
+ {"gray77" , PALETTERGB (196, 196, 196) },
+ {"grey77" , PALETTERGB (196, 196, 196) },
+ {"gray78" , PALETTERGB (199, 199, 199) },
+ {"grey78" , PALETTERGB (199, 199, 199) },
+ {"gray79" , PALETTERGB (201, 201, 201) },
+ {"grey79" , PALETTERGB (201, 201, 201) },
+ {"gray80" , PALETTERGB (204, 204, 204) },
+ {"grey80" , PALETTERGB (204, 204, 204) },
+ {"gray81" , PALETTERGB (207, 207, 207) },
+ {"grey81" , PALETTERGB (207, 207, 207) },
+ {"gray82" , PALETTERGB (209, 209, 209) },
+ {"grey82" , PALETTERGB (209, 209, 209) },
+ {"gray83" , PALETTERGB (212, 212, 212) },
+ {"grey83" , PALETTERGB (212, 212, 212) },
+ {"gray84" , PALETTERGB (214, 214, 214) },
+ {"grey84" , PALETTERGB (214, 214, 214) },
+ {"gray85" , PALETTERGB (217, 217, 217) },
+ {"grey85" , PALETTERGB (217, 217, 217) },
+ {"gray86" , PALETTERGB (219, 219, 219) },
+ {"grey86" , PALETTERGB (219, 219, 219) },
+ {"gray87" , PALETTERGB (222, 222, 222) },
+ {"grey87" , PALETTERGB (222, 222, 222) },
+ {"gray88" , PALETTERGB (224, 224, 224) },
+ {"grey88" , PALETTERGB (224, 224, 224) },
+ {"gray89" , PALETTERGB (227, 227, 227) },
+ {"grey89" , PALETTERGB (227, 227, 227) },
+ {"gray90" , PALETTERGB (229, 229, 229) },
+ {"grey90" , PALETTERGB (229, 229, 229) },
+ {"gray91" , PALETTERGB (232, 232, 232) },
+ {"grey91" , PALETTERGB (232, 232, 232) },
+ {"gray92" , PALETTERGB (235, 235, 235) },
+ {"grey92" , PALETTERGB (235, 235, 235) },
+ {"gray93" , PALETTERGB (237, 237, 237) },
+ {"grey93" , PALETTERGB (237, 237, 237) },
+ {"gray94" , PALETTERGB (240, 240, 240) },
+ {"grey94" , PALETTERGB (240, 240, 240) },
+ {"gray95" , PALETTERGB (242, 242, 242) },
+ {"grey95" , PALETTERGB (242, 242, 242) },
+ {"gray96" , PALETTERGB (245, 245, 245) },
+ {"grey96" , PALETTERGB (245, 245, 245) },
+ {"gray97" , PALETTERGB (247, 247, 247) },
+ {"grey97" , PALETTERGB (247, 247, 247) },
+ {"gray98" , PALETTERGB (250, 250, 250) },
+ {"grey98" , PALETTERGB (250, 250, 250) },
+ {"gray99" , PALETTERGB (252, 252, 252) },
+ {"grey99" , PALETTERGB (252, 252, 252) },
+ {"gray100" , PALETTERGB (255, 255, 255) },
+ {"grey100" , PALETTERGB (255, 255, 255) },
+ {"DarkGrey" , PALETTERGB (169, 169, 169) },
+ {"DarkGray" , PALETTERGB (169, 169, 169) },
+ {"DarkBlue" , PALETTERGB (0, 0, 128) }, /* Adjusted == Navy */
+ {"DarkCyan" , PALETTERGB (0, 128, 128) }, /* Adjusted */
+ {"DarkMagenta" , PALETTERGB (128, 0, 128) }, /* Adjusted */
+ {"DarkRed" , PALETTERGB (128, 0, 0) }, /* Adjusted */
+ {"LightGreen" , PALETTERGB (144, 238, 144) },
+ /* Added to match values in the default Windows palette: */
+ {"DarkYellow" , PALETTERGB (128, 128, 0) },
+ {"PaleYellow" , PALETTERGB (255, 255, 128) }
};
typedef struct fontmap_t
{
- CONST char *name;
- CONST int value;
+ const char *name;
+ int value;
} fontmap_t;
/* Default weight first, preferred names listed before synonyms */
-static CONST fontmap_t fontweight_map[] =
+static const fontmap_t fontweight_map[] =
{
{"Regular" , FW_REGULAR}, /* The standard font weight */
{"Thin" , FW_THIN},
/* Default charset first, no synonyms allowed because these names are
* matched against the names reported by win32 by match_font() */
-static CONST fontmap_t charset_map[] =
+static const fontmap_t charset_map[] =
{
{"Western" , ANSI_CHARSET},
{"Symbol" , SYMBOL_CHARSET},
}
COLORREF
-mswindows_string_to_color(CONST char *name)
+mswindows_string_to_color(const char *name)
{
int i;
}
else if (*name) /* Can't be an empty string */
{
- char *nospaces = alloca (strlen (name)+1);
- char *c=nospaces;
+ char *nospaces = (char*) alloca (strlen (name)+1);
+ char *c = nospaces;
while (*name)
if (*name != ' ')
- *(c++) = *(name++);
+ *c++ = *name++;
else
name++;
*c = '\0';
- for (i=0; i< countof (mswindows_X_color_map); i++)
+ for (i = 0; i < countof (mswindows_X_color_map); i++)
if (!stricmp (nospaces, mswindows_X_color_map[i].name))
return (mswindows_X_color_map[i].colorref);
}
return (COLORREF) -1;
}
+Lisp_Object
+mswindows_color_to_string (COLORREF color)
+{
+ int i;
+ char buf[8];
+ COLORREF pcolor = PALETTERGB (GetRValue (color), GetGValue (color),
+ GetBValue (color));
+
+ for (i=0; i < countof (mswindows_X_color_map); i++)
+ if (pcolor == (mswindows_X_color_map[i].colorref))
+ return build_string (mswindows_X_color_map[i].name);
+
+ sprintf (buf, "#%02X%02X%02X",
+ GetRValue (color), GetGValue (color), GetBValue (color));
+ return build_string (buf);
+}
+
/*
* Returns non-zero if the two supplied font patterns match.
* If they match and fontname is not NULL, copies the logical OR of the
return font_enum.list;
}
-static void
+static HFONT
mswindows_create_font_variant (Lisp_Font_Instance* f,
int under, int strike)
{
}
FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, under, strike) = hfont;
+ return hfont;
}
HFONT
int under, int strike)
{
/* Cannot GC */
- HFONT hfont;
-
- if (FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, under, strike) == NULL)
- mswindows_create_font_variant (f, under, strike);
+ HFONT hfont = FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, under, strike);
- assert (FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, under, strike) != NULL);
-
- hfont = FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, under, strike);
+ if (hfont == NULL)
+ hfont = mswindows_create_font_variant (f, under, strike);
/* If strikeout/underline variant of the font could not be
created, then use the base version of the font */
mswindows_initialize_color_instance (Lisp_Color_Instance *c, Lisp_Object name,
Lisp_Object device, Error_behavior errb)
{
- CONST char *extname;
+ const char *extname;
COLORREF color;
TO_EXTERNAL_FORMAT (LISP_STRING, name,
static int
mswindows_valid_color_name_p (struct device *d, Lisp_Object color)
{
- CONST char *extname;
+ const char *extname;
TO_EXTERNAL_FORMAT (LISP_STRING, color,
C_STRING_ALLOCA, extname,
Lisp_Object device_font_list, HDC hdc,
Error_behavior errb)
{
- CONST char *extname;
+ const char *extname;
LOGFONT logfont;
int fields, i;
int pt;
char fontname[LF_FACESIZE], weight[LF_FACESIZE], *style, points[8];
char effects[LF_FACESIZE], charset[LF_FACESIZE];
char *c;
- HFONT hfont, holdfont;
+ HFONT hfont, hfont2;
TEXTMETRIC metrics;
extname = XSTRING_DATA (name);
/* Default to monospaced if the specified fontname doesn't exist. */
logfont.lfPitchAndFamily = FF_MODERN;
- /* Windows will silently substitute a default font if the fontname
- specifies a non-existent font. So we check the font against the
- device's list of font patterns to make sure that at least one of
- them matches.
-
- Personally, I do not like the idea - it is better to come out with
- some font than completely without one. The diversity of printer
- fonts is much greater than that of screen font. We can tread on
- that. -- kkm. */
+ /* Windows will silently substitute a default font if the fontname specifies
+ a non-existent font. This is bad for screen fonts because it doesn't
+ allow higher-level code to see the error and to act appropriately.
+ For instance complex_vars_of_faces() sets up a fallback list of fonts
+ for the default face. */
if (!NILP (device_font_list))
{
f->data = xnew_and_zero (struct mswindows_font_instance_data);
FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f,0,0) = hfont;
- holdfont = SelectObject(hdc, hfont);
- if (!holdfont)
+ /* Some underlined fonts have the descent of one pixel more than their
+ non-underlined counterparts. Font variants though are assumed to have
+ identical metrics. So get the font metrics from the underlined variant
+ of the font */
+ hfont2 = mswindows_create_font_variant (f, 1, 0);
+ if (hfont2 != MSWINDOWS_BAD_HFONT)
+ hfont = hfont2;
+
+ hfont2 = (HFONT) SelectObject (hdc, hfont);
+ if (!hfont2)
{
mswindows_finalize_font_instance (f);
maybe_signal_simple_error ("Couldn't map font", name, Qfont, errb);
return 0;
}
-
GetTextMetrics (hdc, &metrics);
- SelectObject(hdc, holdfont);
+ SelectObject(hdc, hfont2);
f->width = (unsigned short) metrics.tmAveCharWidth;
f->height = (unsigned short) metrics.tmHeight;
- /* Font variant metrics hack. The problem is that in Windows
- some underlined fonts have the descent of one pixel more
- than their non-underlined counterparts. Font variants
- though are assumed to have identical metrics. Lowering
- the font's baseline one pixel down cures the problem, and
- is visually undetectable. - kkm */
- f->ascent = (unsigned short) metrics.tmAscent - 1;
- f->descent = (unsigned short) metrics.tmDescent + 1;
+ f->ascent = (unsigned short) metrics.tmAscent;
+ f->descent = (unsigned short) metrics.tmDescent;
f->proportional_p = (metrics.tmPitchAndFamily & TMPF_FIXED_PITCH);
return 1;
int nsep=0;
char *name = (char *) XSTRING_DATA (f->name);
char* ptr = name;
- char* extname = alloca (strlen (name) + 19);
+ char* extname = (char*) alloca (strlen (name) + 19);
strcpy (extname, name);
while ((ptr = strchr (ptr, ':')) != 0)
static int
mswindows_font_spec_matches_charset (struct device *d, Lisp_Object charset,
- CONST Bufbyte *nonreloc, Lisp_Object reloc,
+ const Bufbyte *nonreloc, Lisp_Object reloc,
Bytecount offset, Bytecount length)
{
/* #### Implement me */
/* If font creation during redisplay fails, then the following
value is used to prevent future attempts to create this font.
Redisplay uses the "main" font when encounters this value */
-#define MSWINDOWS_BAD_HFONT INVALID_HANDLE_VALUE
+#define MSWINDOWS_BAD_HFONT ((HFONT)INVALID_HANDLE_VALUE)
HFONT mswindows_get_hfont (Lisp_Font_Instance* f, int under, int strike);
+Lisp_Object mswindows_color_to_string (COLORREF color);
+
#endif /* INCLUDED_objects_msw_h_ */
Bufbyte *str = XSTRING_DATA (name);
Lisp_Object charset = Qnil;
- if (strncmp ((CONST char *) str, "normal", 6))
+ if (strncmp ((const char *) str, "normal", 6))
return 0;
str += 6;
if (*str)
if (*str != '/')
return 0;
str++;
- charset = Ffind_charset (intern ((CONST char *) str));
+ charset = Ffind_charset (intern ((const char *) str));
if (NILP (charset))
return 0;
#else
static int
tty_font_spec_matches_charset (struct device *d, Lisp_Object charset,
- CONST Bufbyte *nonreloc, Lisp_Object reloc,
+ const Bufbyte *nonreloc, Lisp_Object reloc,
Bytecount offset, Bytecount length)
{
- CONST Bufbyte *the_nonreloc = nonreloc;
+ const Bufbyte *the_nonreloc = nonreloc;
if (!the_nonreloc)
the_nonreloc = XSTRING_DATA (reloc);
if (UNBOUNDP (charset))
return !memchr (the_nonreloc, '/', length);
- the_nonreloc = (CONST Bufbyte *) memchr (the_nonreloc, '/', length);
+ the_nonreloc = (const Bufbyte *) memchr (the_nonreloc, '/', length);
if (!the_nonreloc)
return 0;
the_nonreloc++;
{
Lisp_String *s = symbol_name (XSYMBOL (XCHARSET_NAME (charset)));
- return !strcmp ((CONST char *) the_nonreloc,
- (CONST char *) string_data (s));
+ return !strcmp ((const char *) the_nonreloc,
+ (const char *) string_data (s));
}
}
{
Bufbyte *fontname = XSTRING_DATA (font);
- if (strchr ((CONST char *) fontname, '/'))
+ if (strchr ((const char *) fontname, '/'))
{
if (tty_font_spec_matches_charset (XDEVICE (device), charset, 0,
font, 0, -1))
xzero (*color);
{
- CONST Extbyte *extname;
+ const Extbyte *extname;
Extcount extnamelen;
TO_EXTERNAL_FORMAT (DATA, (name, len),
Display *dpy = DEVICE_X_DISPLAY (d);
Colormap cmap = DEVICE_X_COLORMAP (d);
- CONST char *extname;
+ const char *extname;
TO_EXTERNAL_FORMAT (LISP_STRING, color, C_STRING_ALLOCA, extname, Qctext);
{
Display *dpy = DEVICE_X_DISPLAY (XDEVICE (device));
XFontStruct *xf;
- CONST char *extname;
+ const char *extname;
TO_EXTERNAL_FORMAT (LISP_STRING, f->name, C_STRING_ALLOCA, extname, Qctext);
xf = XLoadQueryFont (dpy, extname);
char **names;
int count = 0;
Lisp_Object result = Qnil;
- CONST char *patternext;
+ const char *patternext;
TO_EXTERNAL_FORMAT (LISP_STRING, pattern,
C_STRING_ALLOCA, patternext,
static int
x_font_spec_matches_charset (struct device *d, Lisp_Object charset,
- CONST Bufbyte *nonreloc, Lisp_Object reloc,
+ const Bufbyte *nonreloc, Lisp_Object reloc,
Bytecount offset, Bytecount length)
{
if (UNBOUNDP (charset))
*/
if (EQ (charset, Vcharset_ascii))
{
- CONST Bufbyte *the_nonreloc = nonreloc;
+ const Bufbyte *the_nonreloc = nonreloc;
int i;
Bytecount the_length = length;
{
for (i = 0;; i++)
{
- CONST Bufbyte *new_nonreloc = (CONST Bufbyte *)
+ const Bufbyte *new_nonreloc = (const Bufbyte *)
memchr (the_nonreloc, '-', the_length);
if (!new_nonreloc)
break;
char **names;
int count = 0;
Lisp_Object result = Qnil;
- CONST char *patternext;
+ const char *patternext;
int i;
TO_EXTERNAL_FORMAT (LISP_STRING, font,
/* #### This code seems awfully bogus -- mrb */
for (i = 0; i < count; i ++)
{
- CONST char *intname;
+ const char *intname;
TO_INTERNAL_FORMAT (C_STRING, names[i],
C_STRING_ALLOCA, intname,
int
font_spec_matches_charset (struct device *d, Lisp_Object charset,
- CONST Bufbyte *nonreloc, Lisp_Object reloc,
+ const Bufbyte *nonreloc, Lisp_Object reloc,
Bytecount offset, Bytecount length)
{
return DEVMETH_OR_GIVEN (d, font_spec_matches_charset,
void
syms_of_objects (void)
{
+ INIT_LRECORD_IMPLEMENTATION (color_instance);
+ INIT_LRECORD_IMPLEMENTATION (font_instance);
+
DEFSUBR (Fcolor_specifier_p);
DEFSUBR (Ffont_specifier_p);
DEFSUBR (Fface_boolean_specifier_p);
#ifdef MULE
int font_spec_matches_charset (struct device *d, Lisp_Object charset,
- CONST Bufbyte *nonreloc,
+ const Bufbyte *nonreloc,
Lisp_Object reloc, Bytecount offset,
Bytecount length);
#endif
static void
print_opaque (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
{
- CONST Lisp_Opaque *p = XOPAQUE (obj);
+ const Lisp_Opaque *p = XOPAQUE (obj);
char buf[200];
sprintf (buf, "#<INTERNAL OBJECT (XEmacs bug?) (opaque, size=%lu) 0x%lx>",
}
static size_t
-sizeof_opaque (CONST void *header)
+sizeof_opaque (const void *header)
{
- CONST Lisp_Opaque *p = (CONST Lisp_Opaque *) header;
+ const Lisp_Opaque *p = (const Lisp_Opaque *) header;
return offsetof (Lisp_Opaque, data) + p->size;
}
If DATA is OPAQUE_UNINIT, the object's data is uninitialized.
Else the object's data is initialized by copying from DATA. */
Lisp_Object
-make_opaque (CONST void *data, size_t size)
+make_opaque (const void *data, size_t size)
{
Lisp_Opaque *p = (Lisp_Opaque *)
alloc_lcrecord (offsetof (Lisp_Opaque, data) + size, &lrecord_opaque);
static void
print_opaque_ptr (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
{
- CONST Lisp_Opaque_Ptr *p = XOPAQUE_PTR (obj);
+ const Lisp_Opaque_Ptr *p = XOPAQUE_PTR (obj);
char buf[200];
- sprintf (buf, "#<INTERNAL OBJECT (XEmacs bug?) (opaque_ptr, adr=0x%lx) 0x%lx>",
+ sprintf (buf, "#<INTERNAL OBJECT (XEmacs bug?) (opaque-ptr, adr=0x%lx) 0x%lx>",
(long)(p->ptr), (unsigned long) p);
write_c_string (buf, printcharfun);
}
return (unsigned long) XOPAQUE_PTR (obj)->ptr;
}
-DEFINE_LRECORD_IMPLEMENTATION ("opaque_ptr", opaque_ptr,
+DEFINE_LRECORD_IMPLEMENTATION ("opaque-ptr", opaque_ptr,
0, print_opaque_ptr, 0,
equal_opaque_ptr, hash_opaque_ptr, 0,
Lisp_Opaque_Ptr);
void
init_opaque_once_early (void)
{
+ INIT_LRECORD_IMPLEMENTATION (opaque);
+ INIT_LRECORD_IMPLEMENTATION (opaque_ptr);
+
reinit_opaque_once_early ();
}
#ifndef INCLUDED_opaque_h_
#define INCLUDED_opaque_h_
-typedef union {
+typedef union
+{
struct { Lisp_Object obj; } obj;
struct { void *p; } p;
struct { double d; } d;
functions should not be doing this. */
/* Alternative DATA arguments to make_opaque() */
-#define OPAQUE_CLEAR ((CONST void *) 0)
-#define OPAQUE_UNINIT ((CONST void *) -1)
+#define OPAQUE_CLEAR ((const void *) 0)
+#define OPAQUE_UNINIT ((const void *) -1)
#define OPAQUE_SIZE(op) ((op)->size)
#define OPAQUE_DATA(op) ((void *) ((op)->data))
#define XOPAQUE_DATA(op) OPAQUE_DATA (XOPAQUE (op))
#define XOPAQUE_MARKFUN(op) OPAQUE_MARKFUN (XOPAQUE (op))
-Lisp_Object make_opaque (CONST void *data, size_t size);
+Lisp_Object make_opaque (const void *data, size_t size);
typedef struct Lisp_Opaque_Ptr
{
PQgetlineAsync (copy in/out Asynch.)
PQputnbytes (copy in/out Asynch.)
PQendcopy (copy in/out)
- PQsetenvStart (Asynch. Queries)
- PQsetenvPoll (Asynch. Queries)
- PQsetenvHandle (Asynch. Queries)
Unsupported functions:
PQsetdbLogin -- This function is deprecated, has a subset of the
*/
#if (EMACS_MAJOR_VERSION == 21) && (EMACS_MINOR_VERSION < 2)
#define RUNNING_XEMACS_21_1 1
+#define POSTGRES_INCLUDE(file) <file>
#endif
/* #define POSTGRES_LO_IMPORT_IS_VOID 1 */
#include "sysdep.h"
#include "buffer.h"
-#include <libpq-fe.h>
-/* Undefine the following when asynchronous setenvs are fixed in libpq. */
-/* #define LIBPQ_7_0_IS_FIXED */
+#include POSTGRES_INCLUDE (libpq-fe.h)
#include "postgresql.h"
#ifdef RUNNING_XEMACS_21_1 /* handle interface changes */
Lisp_PGresult);
#endif
-/****/
-#ifdef HAVE_POSTGRESQLV7
-/* PGsetenvHandle is an opaque object and we need to be able to store them in
- Lisp code so we can make asynchronous environmental calls.
-
- Asynchronous setenv calls were introduced in libpq-7.0.
-*/
-#ifdef LIBPQ_7_0_IS_FIXED
-
-Lisp_Object Qpgsetenvp;
-
-static Lisp_Object
-make_pgsetenv (Lisp_PGsetenvHandle *pgsetenv)
-{
- Lisp_Object lisp_pgsetenv;
- XSETPGSETENV (lisp_pgsetenv, pgsetenv);
- return lisp_pgsetenv;
-}
-
-static Lisp_Object
-#ifdef RUNNING_XEMACS_21_1
-mark_pgsetenv (Lisp_Object obj, void (*markobj) (Lisp_Object))
-#else
-mark_pgsetenv (Lisp_Object obj)
-#endif
-{
- return Qnil;
-}
-
-static void
-print_pgsetenv (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
-{
- char *fmt = "#<PGsetenvHandle %s>";
- char buf[1024];
- PGsetenvHandle *h;
-
- h = (XPGSETENV (obj))->pgsetenv;
-
- sprintf (buf, fmt, h ? "live" : "DEAD");
-
- /* There are no accessor functions to retrieve any fields, so we must */
- /* treat this as being completely opaque. */
- if (print_readably)
- error ("printing unreadable object %s", buf);
- else
- write_c_string (buf, printcharfun);
-}
-
-static Lisp_PGsetenvHandle *
-allocate_pgresult (void)
-{
-#ifdef RUNNING_XEMACS_21_1
- Lisp_PGsetenvHandle *pgsetenv =
- alloc_lcrecord_type (Lisp_PGsetenvHandle, lrecord_pgsetenv);
-#else
- Lisp_PGsetenvHandle *pgsetenv =
- alloc_lcrecord_type (Lisp_PGsetenvHandle, &lrecord_pgsetenv);
-#endif
- pgsetenv->pgsetenv = (PGsetenvState *)NULL;
- return pgsetenv;
-}
-
-static void
-finalize_pgsetenv (void *header, int for_disksave)
-{
- Lisp_PGsetenvHandle *pgsetenv = (Lisp_PGsetenvHandle *)header;
-
- if (for_disksave)
- signal_simple_error ("Can't dump an emacs containing PGsetenvHandle objects",
- make_pgsetenv (pgsetenv));
-
- /* #### PGsetenvHandle's are allocated with malloc(), however in
- libpq-7.0 the treatment of them is little short of disastrous.
- We don't dare attempt to free it, because there are many code
- paths which lead to the handle being freed internally. The
- connection routines leak setenv handles and so will we until
- libpq gets cleaned up.
- Actually, in 7.0b1 asynchronous setenv cannot work outside libpq, so
- these functions are disabled in this API.
- */
- if (pgsetenv->pgsetenv)
- {
- free (pgsetenv->pgsetenv);
- pgsetenv->pgsetenv = (PGsetenvHandle *)NULL;
- }
-}
-
-#ifdef RUNNING_XEMACS_21_1
-DEFINE_LRECORD_IMPLEMENTATION ("pgresult", pgresult,
- mark_pgresult, print_pgresult, finalize_pgresult,
- NULL, NULL,
- Lisp_PGresult);
-#else
-DEFINE_LRECORD_IMPLEMENTATION ("pgresult", pgresult,
- mark_pgresult, print_pgresult, finalize_pgresult,
- NULL, NULL,
- 0,
- Lisp_PGresult);
-#endif /* RUNNING_XEMACS_21_1 */
-
-#endif /* LIBPQ_7_0_IS_FIXED */
-#endif /* HAVE_POSTGRESQLV7 */
-
/***********************/
/* notices */
return PQendcopy (P) ? Qt : Qnil;
}
-/* The setenv suite of functions. The author of the libpq manual doesn't
- know a whole lot about them, and neither do I.
-*/
-#if !defined (HAVE_POSTGRESQLV7) || defined (LIBPQ_7_0_IS_FIXED)
-DEFUN ("pq-setenv", Fpq_setenv, 1, 1, 0, /*
-Set environmental parameters on the backend synchronously.
-Returns t if the operation was successful, nil otherwise.
-*/
- (conn))
-{
- PGconn *P;
-
- CHECK_PGCONN (conn);
- P = (XPGCONN (conn))->pgconn;
- CHECK_LIVE_CONNECTION (P);
-
- return PQsetenv (P) ? Qt : Qnil;
-}
-#endif
-
-#ifdef LIBPQ_7_0_IS_FIXED
-
-DEFUN ("pq-setenv-start", Fpq_setenv_start, 1, 1, 0, /*
-Set environmental parameters on the backend asynchronously.
-A PGsetenvHandle is returned on success, nil otherwise.
-*/
- (conn))
-{
- PGconn *P;
- PGsetenvHandle *handle;
- Lisp_setenvHandle *lseh;
-
- CHECK_PGCONN (conn);
- P = (XPGCONN (conn))->pgconn;
- CHECK_LIVE_CONNECTION (P);
-
- handle = PQsetenvStart (P);
- if (!handle) error ("out of memory?");
-
- lseh = allocate_pgsetenv ();
- lseh->setenv = handle;
-
- return make_pgsetenv (lseh);
-}
-
-DEFUN ("pq-setenv-poll", Fpq_setenv_poll, 1, 1, 0, /*
-Poll an asynchronous setenv operation for completion.
-*/
- (conn))
-{
- PGconn *P;
- PostgresPollingStatusType pst;
-
- CHECK_PGCONN (conn);
- P = (XPGCONN (conn))->pgconn;
- CHECK_LIVE_CONNECTION (P);
-
- pst = PQsetenvPoll (P);
- switch (pst)
- {
- case PGRES_POLLING_FAILED:
- /* Something Bad has happened */
- {
- char *e = PQerrorMessage (P);
- error ("libpq: %s", e);
- }
- case PGRES_POLLING_OK:
- return Qpgres_polling_ok;
- case PGRES_POLLING_READING:
- return Qpgres_polling_reading;
- case PGRES_POLLING_WRITING:
- return Qpgres_polling_writing;
- case PGRES_POLLING_ACTIVE:
- return Qpgres_polling_active;
- default:
- /* they've added a new field we don't know about */
- error ("Help! Unknown status code %08x from backend!", PS);
- }
-}
-
-DEFUN ("pq-setenv-abort", Fpq_setenv_abort, 1, 1, 0, /*
-Attempt to abort an in-progress asynchronous setenv operation.
-*/
- (handle))
-{
- PGsetenvHandle *h;
-
- CHECK_PGSETENV (handle);
- h = (XPGSETENV (handle))->pgsetenv;
- PUKE_IF_NULL (h);
-
- PQsetenvAbort (h);
- /* PQsetenvAbort usually free(3)'s the handle, don't take any chances. */
- (XSETENV (handle))->pgsetenv = (PGsetenvHandle *)NULL;
-
- return Qt;
-}
-#endif /* LIBPQ_7_0_IS_FIXED */
-
void
syms_of_postgresql(void)
{
#ifndef RUNNING_XEMACS_21_1
INIT_LRECORD_IMPLEMENTATION (pgconn);
INIT_LRECORD_IMPLEMENTATION (pgresult);
-#ifdef LIBPQ_7_0_IS_FIXED
- INIT_LRECORD_IMPLEMENTATION (pgsetenv);
-#endif
#endif
defsymbol (&Qpostgresql, "postgresql");
DEFSUBR (Fpq_get_line_async);
DEFSUBR (Fpq_put_nbytes);
DEFSUBR (Fpq_end_copy);
-
- /* The value of the setenv functions is questioned in the libpq manual. */
-#if !defined (HAVE_POSTGRESQLV7) || defined (LIBPQ_7_0_IS_FIXED)
- DEFSUBR (Fpq_setenv);
-#endif
-#ifdef LIBPQ_7_0_IS_FIXED
- DEFSUBR (Fpq_setenv_start);
- DEFSUBR (Fpq_setenv_poll);
- DEFSUBR (Fpq_setenv_abort);
-#endif /* LIBPQ_7_0_IS_FIXED */
}
void
#define CHECK_PGRESULT(x) CHECK_RECORD (x, pgresult)
#define CONCHECK_PGRESULT(x) CONCHECK_RECORD (x, pgresult)
-/****/
-#ifdef HAVE_POSTGRESQLV7
-
-#ifdef LIBPQ_7_0_IS_FIXED /* this is broken in released 7.0b1 */
-
-/* PGsetenvHandle is an opaque object and we need to be able to store
- them in Lisp code in order to make asynchronous environment calls.
-*/
-struct Lisp_PGsetenvHandle
-{
- struct lcrecord_header header;
- PGsetenvHandle *pgsetenv;
-};
-typedef struct Lisp_PGsetenvHandle Lisp_PGsetenvHandle;
-
-DECLARE_LRECORD (pgsetenv, Lisp_PGsetenvHandle);
-
-#define XPGSETENV(x) XRECORD (x, pgsetenv, Lisp_PGsetenvHandle)
-#define XSETPGSETENV(x, p) XSETRECORD (x, p, pgsetenv)
-#define PGSETENVP(x) RECORDP (x, pgsetenv)
-#define CHECK_PGSETENV(x) CHECK_RECORD (x, pgsetenv)
-#define CONCHECK_PGSETENV(x) CONCHECK_RECORD (x, pgsetenv)
-
-#endif /* LIBPQ_7_0_IS_FIXED */
-
-#endif /* HAVE_POSTGRESQLV7 */
-
#endif /* XEMACS_POSTGRESQL_H__ */
/* Lisp object printing and output streams.
Copyright (C) 1985, 1986, 1988, 1992-1995 Free Software Foundation, Inc.
- Copyright (C) 1995, 1996 Ben Wing.
+ Copyright (C) 1995, 1996, 2000 Ben Wing.
This file is part of XEmacs.
#include "insdel.h"
#include "lstream.h"
#include "sysfile.h"
+#ifdef WINDOWSNT
+#include "console-msw.h"
+#endif
#include <limits.h>
#include <float.h>
int stdout_needs_newline;
-/* Write a string (in internal format) to stdio stream STREAM. */
-
-void
-write_string_to_stdio_stream (FILE *stream, struct console *con,
- CONST Bufbyte *str,
- Bytecount offset, Bytecount len,
- Lisp_Object coding_system)
+static void
+std_handle_out_external (FILE *stream, Lisp_Object lstream,
+ const Extbyte *extptr, Extcount extlen,
+ /* is this really stdout/stderr?
+ (controls termscript writing) */
+ int output_is_std_handle,
+ int must_flush)
{
- Extcount extlen;
- CONST Extbyte *extptr;
-
- TO_EXTERNAL_FORMAT (DATA, (str + offset, len),
- ALLOCA, (extptr, extlen),
- coding_system);
if (stream)
{
- fwrite (extptr, 1, extlen, stream);
#ifdef WINDOWSNT
- /* Q122442 says that pipes are "treated as files, not as
- devices", and that this is a feature. Before I found that
- article, I thought it was a bug. Thanks MS, I feel much
- better now. - kkm */
- if (stream == stdout || stream == stderr)
- fflush (stream);
+ /* we typically have no useful stdout/stderr under windows if we're
+ being invoked graphically. */
+ if (!noninteractive)
+ msw_output_console_string (extptr, extlen);
+ else
+#endif
+ {
+ fwrite (extptr, 1, extlen, stream);
+#ifdef WINDOWSNT
+ /* Q122442 says that pipes are "treated as files, not as
+ devices", and that this is a feature. Before I found that
+ article, I thought it was a bug. Thanks MS, I feel much
+ better now. - kkm */
+ must_flush = 1;
#endif
+ if (must_flush)
+ fflush (stream);
+ }
}
else
- {
- assert (CONSOLE_TTY_P (con));
- Lstream_write (XLSTREAM (CONSOLE_TTY_DATA (con)->outstream),
- extptr, extlen);
- }
- if (stream == stdout || stream == stderr ||
- (!stream && CONSOLE_TTY_DATA (con)->is_stdio))
+ Lstream_write (XLSTREAM (lstream), extptr, extlen);
+
+ if (output_is_std_handle)
{
if (termscript)
{
}
}
+/* #### The following function should be replaced a call to the
+ emacs_doprnt_*() functions. This is the only way to ensure that
+ I18N3 works properly (many implementations of the *printf()
+ functions, including the ones included in glibc, do not implement
+ the %###$ argument-positioning syntax).
+
+ Note, however, that to do this, we'd have to
+
+ 1) pre-allocate all the lstreams and do whatever else was necessary
+ to make sure that no allocation occurs, since these functions may be
+ called from fatal_error_signal().
+
+ 2) (to be really correct) make a new lstream that outputs using
+ msw_output_console_string(). */
+
+static int
+std_handle_out_va (FILE *stream, const char *fmt, va_list args)
+{
+ Bufbyte kludge[8192];
+ Extbyte *extptr;
+ Extcount extlen;
+ int retval;
+
+ retval = vsprintf ((char *) kludge, fmt, args);
+ TO_EXTERNAL_FORMAT (DATA, (kludge, strlen ((char *) kludge)),
+ ALLOCA, (extptr, extlen),
+ Qnative);
+ std_handle_out_external (stream, Qnil, extptr, extlen, 1, 1);
+ return retval;
+}
+
+/* Output portably to stderr or its equivalent; call GETTEXT on the
+ format string. Automatically flush when done. */
+
+int
+stderr_out (const char *fmt, ...)
+{
+ int retval;
+ va_list args;
+ va_start (args, fmt);
+ retval = std_handle_out_va (stderr, GETTEXT (fmt), args);
+ va_end (args);
+ return retval;
+}
+
+/* Output portably to stdout or its equivalent; call GETTEXT on the
+ format string. Automatically flush when done. */
+
+int
+stdout_out (const char *fmt, ...)
+{
+ int retval;
+ va_list args;
+ va_start (args, fmt);
+ retval = std_handle_out_va (stdout, GETTEXT (fmt), args);
+ va_end (args);
+ return retval;
+}
+
+DOESNT_RETURN
+fatal (const char *fmt, ...)
+{
+ va_list args;
+ va_start (args, fmt);
+
+ stderr_out ("\nXEmacs: ");
+ std_handle_out_va (stderr, GETTEXT (fmt), args);
+ stderr_out ("\n");
+
+ va_end (args);
+ exit (1);
+}
+
+/* Write a string (in internal format) to stdio stream STREAM. */
+
+void
+write_string_to_stdio_stream (FILE *stream, struct console *con,
+ const Bufbyte *str,
+ Bytecount offset, Bytecount len,
+ Lisp_Object coding_system,
+ int must_flush)
+{
+ Extcount extlen;
+ const Extbyte *extptr;
+
+ /* #### yuck! sometimes this function is called with string data,
+ and the following call may gc. */
+ {
+ Bufbyte *puta = (Bufbyte *) alloca (len);
+ memcpy (puta, str + offset, len);
+ TO_EXTERNAL_FORMAT (DATA, (puta, len),
+ ALLOCA, (extptr, extlen),
+ coding_system);
+ }
+
+ if (stream)
+ std_handle_out_external (stream, Qnil, extptr, extlen,
+ stream == stdout || stream == stderr, must_flush);
+ else
+ {
+ assert (CONSOLE_TTY_P (con));
+ std_handle_out_external (0, CONSOLE_TTY_DATA (con)->outstream,
+ extptr, extlen,
+ CONSOLE_TTY_DATA (con)->is_stdio, must_flush);
+ }
+}
+
/* Write a string to the output location specified in FUNCTION.
Arguments NONRELOC, RELOC, OFFSET, and LEN are as in
buffer_insert_string_1() in insdel.c. */
static void
-output_string (Lisp_Object function, CONST Bufbyte *nonreloc,
+output_string (Lisp_Object function, const Bufbyte *nonreloc,
Lisp_Object reloc, Bytecount offset, Bytecount len)
{
/* This function can GC */
other functions that take both a nonreloc and a reloc, or things
may get confused and an assertion failure in
fixup_internal_substring() may get triggered. */
- CONST Bufbyte *newnonreloc = nonreloc;
+ const Bufbyte *newnonreloc = nonreloc;
struct gcpro gcpro1, gcpro2;
/* Emacs won't print while GCing, but an external debugger might */
else if (EQ (function, Qt) || EQ (function, Qnil))
{
write_string_to_stdio_stream (stdout, 0, newnonreloc, offset, len,
- Qterminal);
+ Qterminal, print_unbuffered);
}
else
{
\f
/* Used for printing a single-byte character (*not* any Emchar). */
#define write_char_internal(string_of_length_1, stream) \
- output_string (stream, (CONST Bufbyte *) (string_of_length_1), \
+ output_string (stream, (const Bufbyte *) (string_of_length_1), \
Qnil, 0, 1)
/* NOTE: Do not call this with the data of a Lisp_String, as
canonicalize_printcharfun() (i.e. Qnil means stdout, not
Vstandard_output, etc.) */
void
-write_string_1 (CONST Bufbyte *str, Bytecount size, Lisp_Object stream)
+write_string_1 (const Bufbyte *str, Bytecount size, Lisp_Object stream)
{
/* This function can GC */
#ifdef ERROR_CHECK_BUFPOS
}
void
-write_c_string (CONST char *str, Lisp_Object stream)
+write_c_string (const char *str, Lisp_Object stream)
{
/* This function can GC */
- write_string_1 ((CONST Bufbyte *) str, strlen (str), stream);
+ write_string_1 ((const Bufbyte *) str, strlen (str), stream);
}
\f
}
\f
static void
-print_vector_internal (CONST char *start, CONST char *end,
+print_vector_internal (const char *start, const char *end,
Lisp_Object obj,
Lisp_Object printcharfun, int escapeflag)
{
Bufbyte str[MAX_EMCHAR_LEN];
Bytecount len;
int extlen;
- CONST Extbyte *extptr;
+ const Extbyte *extptr;
CHECK_CHAR_COERCE_INT (character);
len = set_charptr_emchar (str, XCHAR (character));
to stderr. You can use this function to write directly to the terminal.
This function can be used as the STREAM argument of Fprint() or the like.
+Under MS Windows, this writes output to the console window (which is
+created, if necessary), unless XEmacs is being run noninteractively
+(i.e. using the `-batch' argument).
+
If you have opened a termscript file (using `open-termscript'), then
the output also will be logged to this file.
*/
write_string_to_stdio_stream (file, con,
XSTRING_DATA (char_or_string),
0, XSTRING_LENGTH (char_or_string),
- Qterminal);
+ Qterminal, 1);
else
{
Bufbyte str[MAX_EMCHAR_LEN];
CHECK_CHAR_COERCE_INT (char_or_string);
len = set_charptr_emchar (str, XCHAR (char_or_string));
- write_string_to_stdio_stream (file, con, str, 0, len, Qterminal);
+ write_string_to_stdio_stream (file, con, str, 0, len, Qterminal, 1);
}
return char_or_string;
{
debug_print_no_newline (debug_print_obj);
stderr_out ("\n");
- fflush (stderr);
}
/* Debugging kludge -- unbuffered */
Fbacktrace (Qexternal_debugging_output, Qt);
stderr_out ("\n");
- fflush (stderr);
Vinhibit_quit = old_inhibit_quit;
Vprint_level = old_print_level;
int first = 1;
struct backtrace *bt = backtrace_list;
stderr_out (" [");
- fflush (stderr);
while (length > 0 && bt)
{
if (!first)
{
stderr_out (", ");
- fflush (stderr);
}
if (COMPILED_FUNCTIONP (*bt->function))
{
if (!NILP (ann))
{
stderr_out ("<compiled-function from ");
- fflush (stderr);
debug_print_no_newline (ann);
stderr_out (">");
- fflush (stderr);
}
else
{
stderr_out ("<compiled-function of unknown origin>");
- fflush (stderr);
}
}
else
bt = bt->next;
}
stderr_out ("]\n");
- fflush (stderr);
}
#endif /* debugging kludge */
Copyright (C) 1985, 1986, 1987, 1988, 1992, 1993, 1994, 1995
Free Software Foundation, Inc.
Copyright (C) 1995 Sun Microsystems, Inc.
- Copyright (C) 1995, 1996 Ben Wing.
+ Copyright (C) 1995, 1996, 2000 Ben Wing.
This file is part of XEmacs.
#include <config.h>
#include "lisp.h"
+#include "console-msw.h"
#include "hash.h"
#include "lstream.h"
#include "process.h"
#include "procimpl.h"
#include "sysdep.h"
-#ifndef __MINGW32__
#include <shellapi.h>
-#else
+#ifdef __MINGW32__
#include <errno.h>
#endif
#include <signal.h>
struct nt_process_data
{
HANDLE h_process;
+ DWORD dwProcessId;
+ HWND hwnd; /* console window */
int need_enable_child_signals;
};
+/* Control whether create_child causes the process to inherit Emacs'
+ console window, or be given a new one of its own. The default is
+ nil, to allow multiple DOS programs to run on Win95. Having separate
+ consoles also allows Emacs to cleanly terminate process groups. */
+Lisp_Object Vmswindows_start_process_share_console;
+
+/* Control whether create_child cause the process to inherit Emacs'
+ error mode setting. The default is t, to minimize the possibility of
+ subprocesses blocking when accessing unmounted drives. */
+Lisp_Object Vmswindows_start_process_inherit_error_mode;
+
#define NT_DATA(p) ((struct nt_process_data*)((p)->process_data))
\f
/*-----------------------------------------------------------------------*/
{
return (NT_DATA (p)->h_process);
}
+
+static struct Lisp_Process *
+find_process_from_pid (DWORD pid)
+{
+ Lisp_Object tail, proc;
+
+ for (tail = Vprocess_list; CONSP (tail); tail = XCDR (tail))
+ {
+ proc = XCAR (tail);
+ if (NT_DATA (XPROCESS (proc))->dwProcessId == pid)
+ return XPROCESS (proc);
+ }
+ return 0;
+}
+
\f
/*-----------------------------------------------------------------------*/
/* Running remote threads. See Microsoft Systems Journal 1994 Number 5 */
LPVOID data, size_t data_size)
{
process_memory pm;
- CONST size_t code_size = FRAGMENT_CODE_SIZE;
+ const size_t code_size = FRAGMENT_CODE_SIZE;
/* Need at most 3 extra bytes of memory, for data alignment */
size_t total_size = code_size + data_size + 3;
LPVOID remote_data;
/* Sending signals */
/*-----------------------------------------------------------------------*/
+/* ---------------------------- the NT way ------------------------------- */
+
/*
* We handle the following signals:
*
* Return nonzero if successful.
*/
-/* This code assigns a return value of GetProcAddress to function pointers
- of many different types. Instead of heavy obscure casts, we just disable
- warnings about assignments to different function pointer types. */
-#pragma warning (disable : 4113)
-
static int
-send_signal (HANDLE h_process, int signo)
+send_signal_the_nt_way (struct nt_process_data *cp, int pid, int signo)
{
+ HANDLE h_process;
HMODULE h_kernel = GetModuleHandle ("kernel32");
+ int close_process = 0;
DWORD retval;
assert (h_kernel != NULL);
+ if (cp)
+ {
+ pid = cp->dwProcessId;
+ h_process = cp->h_process;
+ }
+ else
+ {
+ close_process = 1;
+ /* Try to open the process with required privileges */
+ h_process = OpenProcess (PROCESS_CREATE_THREAD
+ | PROCESS_QUERY_INFORMATION
+ | PROCESS_VM_OPERATION
+ | PROCESS_VM_WRITE,
+ FALSE, pid);
+ if (!h_process)
+ return 0;
+ }
+
switch (signo)
{
case SIGKILL:
case SIGHUP:
{
sigkill_data d;
- d.adr_ExitProcess = GetProcAddress (h_kernel, "ExitProcess");
+
+ d.adr_ExitProcess =
+ (void (WINAPI *) (UINT)) GetProcAddress (h_kernel, "ExitProcess");
assert (d.adr_ExitProcess);
retval = run_in_other_process (h_process,
(LPTHREAD_START_ROUTINE)sigkill_proc,
{
sigint_data d;
d.adr_GenerateConsoleCtrlEvent =
+ (BOOL (WINAPI *) (DWORD, DWORD))
GetProcAddress (h_kernel, "GenerateConsoleCtrlEvent");
assert (d.adr_GenerateConsoleCtrlEvent);
d.event = CTRL_C_EVENT;
assert (0);
}
+ if (close_process)
+ CloseHandle (h_process);
return (int)retval > 0 ? 1 : 0;
}
assert (h_kernel != NULL);
d.adr_SetConsoleCtrlHandler =
+ (BOOL (WINAPI *) (LPVOID, BOOL))
GetProcAddress (h_kernel, "SetConsoleCtrlHandler");
assert (d.adr_SetConsoleCtrlHandler);
run_in_other_process (h_process, (LPTHREAD_START_ROUTINE)sig_enable_proc,
#pragma warning (default : 4113)
+/* ---------------------------- the 95 way ------------------------------- */
+
+static BOOL CALLBACK
+find_child_console (HWND hwnd, struct nt_process_data *cp)
+{
+ DWORD thread_id;
+ DWORD process_id;
+
+ thread_id = GetWindowThreadProcessId (hwnd, &process_id);
+ if (process_id == cp->dwProcessId)
+ {
+ char window_class[32];
+
+ GetClassName (hwnd, window_class, sizeof (window_class));
+ if (strcmp (window_class,
+ msw_windows9x_p ()
+ ? "tty"
+ : "ConsoleWindowClass") == 0)
+ {
+ cp->hwnd = hwnd;
+ return FALSE;
+ }
+ }
+ /* keep looking */
+ return TRUE;
+}
+
+static int
+send_signal_the_95_way (struct nt_process_data *cp, int pid, int signo)
+{
+ HANDLE h_process;
+ int close_process = 0;
+ int rc = 1;
+
+ if (cp)
+ {
+ pid = cp->dwProcessId;
+ h_process = cp->h_process;
+
+ /* Try to locate console window for process. */
+ EnumWindows (find_child_console, (LPARAM) cp);
+ }
+ else
+ {
+ close_process = 1;
+ /* Try to open the process with required privileges */
+ h_process = OpenProcess (PROCESS_TERMINATE, FALSE, pid);
+ if (!h_process)
+ return 0;
+ }
+
+ if (signo == SIGINT)
+ {
+ if (NILP (Vmswindows_start_process_share_console) && cp && cp->hwnd)
+ {
+ BYTE control_scan_code = (BYTE) MapVirtualKey (VK_CONTROL, 0);
+ BYTE vk_break_code = VK_CANCEL;
+ BYTE break_scan_code = (BYTE) MapVirtualKey (vk_break_code, 0);
+ HWND foreground_window;
+
+ if (break_scan_code == 0)
+ {
+ /* Fake Ctrl-C if we can't manage Ctrl-Break. */
+ vk_break_code = 'C';
+ break_scan_code = (BYTE) MapVirtualKey (vk_break_code, 0);
+ }
+
+ foreground_window = GetForegroundWindow ();
+ if (foreground_window)
+ {
+ /* NT 5.0, and apparently also Windows 98, will not allow
+ a Window to be set to foreground directly without the
+ user's involvement. The workaround is to attach
+ ourselves to the thread that owns the foreground
+ window, since that is the only thread that can set the
+ foreground window. */
+ DWORD foreground_thread, child_thread;
+ foreground_thread =
+ GetWindowThreadProcessId (foreground_window, NULL);
+ if (foreground_thread == GetCurrentThreadId ()
+ || !AttachThreadInput (GetCurrentThreadId (),
+ foreground_thread, TRUE))
+ foreground_thread = 0;
+
+ child_thread = GetWindowThreadProcessId (cp->hwnd, NULL);
+ if (child_thread == GetCurrentThreadId ()
+ || !AttachThreadInput (GetCurrentThreadId (),
+ child_thread, TRUE))
+ child_thread = 0;
+
+ /* Set the foreground window to the child. */
+ if (SetForegroundWindow (cp->hwnd))
+ {
+ /* Generate keystrokes as if user had typed Ctrl-Break or
+ Ctrl-C. */
+ keybd_event (VK_CONTROL, control_scan_code, 0, 0);
+ keybd_event (vk_break_code, break_scan_code,
+ (vk_break_code == 'C' ? 0 : KEYEVENTF_EXTENDEDKEY), 0);
+ keybd_event (vk_break_code, break_scan_code,
+ (vk_break_code == 'C' ? 0 : KEYEVENTF_EXTENDEDKEY)
+ | KEYEVENTF_KEYUP, 0);
+ keybd_event (VK_CONTROL, control_scan_code,
+ KEYEVENTF_KEYUP, 0);
+
+ /* Sleep for a bit to give time for Emacs frame to respond
+ to focus change events (if Emacs was active app). */
+ Sleep (100);
+
+ SetForegroundWindow (foreground_window);
+ }
+ /* Detach from the foreground and child threads now that
+ the foreground switching is over. */
+ if (foreground_thread)
+ AttachThreadInput (GetCurrentThreadId (),
+ foreground_thread, FALSE);
+ if (child_thread)
+ AttachThreadInput (GetCurrentThreadId (),
+ child_thread, FALSE);
+ }
+ }
+ /* Ctrl-Break is NT equivalent of SIGINT. */
+ else if (!GenerateConsoleCtrlEvent (CTRL_BREAK_EVENT, pid))
+ {
+#if 0 /* FSF Emacs */
+ DebPrint (("sys_kill.GenerateConsoleCtrlEvent return %d "
+ "for pid %lu\n", GetLastError (), pid));
+ errno = EINVAL;
+#endif
+ rc = 0;
+ }
+ }
+ else
+ {
+ if (NILP (Vmswindows_start_process_share_console) && cp && cp->hwnd)
+ {
+#if 1
+ if (msw_windows9x_p ())
+ {
+/*
+ Another possibility is to try terminating the VDM out-right by
+ calling the Shell VxD (id 0x17) V86 interface, function #4
+ "SHELL_Destroy_VM", ie.
+
+ mov edx,4
+ mov ebx,vm_handle
+ call shellapi
+
+ First need to determine the current VM handle, and then arrange for
+ the shellapi call to be made from the system vm (by using
+ Switch_VM_and_callback).
+
+ Could try to invoke DestroyVM through CallVxD.
+
+*/
+#if 0
+ /* On Win95, posting WM_QUIT causes the 16-bit subsystem
+ to hang when cmdproxy is used in conjunction with
+ command.com for an interactive shell. Posting
+ WM_CLOSE pops up a dialog that, when Yes is selected,
+ does the same thing. TerminateProcess is also less
+ than ideal in that subprocesses tend to stick around
+ until the machine is shutdown, but at least it
+ doesn't freeze the 16-bit subsystem. */
+ PostMessage (cp->hwnd, WM_QUIT, 0xff, 0);
+#endif
+ if (!TerminateProcess (h_process, 0xff))
+ {
+#if 0 /* FSF Emacs */
+ DebPrint (("sys_kill.TerminateProcess returned %d "
+ "for pid %lu\n", GetLastError (), pid));
+ errno = EINVAL;
+#endif
+ rc = 0;
+ }
+ }
+ else
+#endif
+ PostMessage (cp->hwnd, WM_CLOSE, 0, 0);
+ }
+ /* Kill the process. On W32 this doesn't kill child processes
+ so it doesn't work very well for shells which is why it's not
+ used in every case. */
+ else if (!TerminateProcess (h_process, 0xff))
+ {
+#if 0 /* FSF Emacs */
+ DebPrint (("sys_kill.TerminateProcess returned %d "
+ "for pid %lu\n", GetLastError (), pid));
+ errno = EINVAL;
+#endif
+ rc = 0;
+ }
+ }
+
+ if (close_process)
+ CloseHandle (h_process);
+
+ return rc;
+}
+
+/* -------------------------- all-OS functions ---------------------------- */
+
+static int
+send_signal (struct nt_process_data *cp, int pid, int signo)
+{
+ return send_signal_the_nt_way (cp, pid, signo)
+ || send_signal_the_95_way (cp, pid, signo);
+}
+
/*
* Signal error if SIGNO is not supported
*/
nt_finalize_process_data (Lisp_Process *p, int for_disksave)
{
assert (!for_disksave);
- if (NT_DATA(p)->h_process)
- CloseHandle (NT_DATA(p)->h_process);
+ if (NT_DATA (p)->h_process)
+ CloseHandle (NT_DATA (p)->h_process);
}
/*
signal_simple_error_2 ("Error starting", image_file, lisp_strerror (errno));
}
+static void
+ensure_console_window_exists ()
+{
+ if (msw_windows9x_p ())
+ msw_hide_console ();
+}
+
static int
nt_create_process (Lisp_Process *p,
Lisp_Object *argv, int nargv,
new_space++;
/* Allocate space and copy variables into it */
- penv = proc_env = alloca(new_space);
+ penv = proc_env = (char*) alloca(new_space);
for (i = 0; i < new_length; i++)
{
strcpy(penv, env[i]);
STARTUPINFO si;
PROCESS_INFORMATION pi;
DWORD err;
+ DWORD flags;
xzero (si);
si.dwFlags = STARTF_USESHOWWINDOW;
si.dwFlags |= STARTF_USESTDHANDLES;
}
- err = (CreateProcess (NULL, command_line, NULL, NULL, TRUE,
- CREATE_NEW_CONSOLE | CREATE_NEW_PROCESS_GROUP
- | CREATE_SUSPENDED,
+ flags = CREATE_SUSPENDED;
+ if (msw_windows9x_p ())
+ flags |= (!NILP (Vmswindows_start_process_share_console)
+ ? CREATE_NEW_PROCESS_GROUP
+ : CREATE_NEW_CONSOLE);
+ else
+ flags |= CREATE_NEW_CONSOLE | CREATE_NEW_PROCESS_GROUP;
+ if (NILP (Vmswindows_start_process_inherit_error_mode))
+ flags |= CREATE_DEFAULT_ERROR_MODE;
+
+ ensure_console_window_exists ();
+
+ err = (CreateProcess (NULL, command_line, NULL, NULL, TRUE, flags,
proc_env, (char *) XSTRING_DATA (cur_dir), &si, &pi)
? 0 : GetLastError ());
if (do_io)
{
NT_DATA(p)->h_process = pi.hProcess;
+ NT_DATA(p)->dwProcessId = pi.dwProcessId;
init_process_io_handles (p, (void*)hmyslurp, (void*)hmyshove, 0);
}
else
/* use a reasonable-sized buffer (somewhere around the size of the
stream buffer) so as to avoid inundating the stream with blocked
data. */
- Bufbyte chunkbuf[128];
+ Bufbyte chunkbuf[512];
Bytecount chunklen;
while (1)
{
ssize_t writeret;
- chunklen = Lstream_read (lstream, chunkbuf, 128);
+ chunklen = Lstream_read (lstream, chunkbuf, 512);
if (chunklen <= 0)
break; /* perhaps should abort() if < 0?
This should never happen. */
/* 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)
+ 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;
+ 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);
/* Send signal */
- if (!send_signal (NT_DATA(p)->h_process, signo))
- error ("Cannot send signal to process");
+ if (!send_signal (NT_DATA (p), 0, signo))
+ signal_simple_error ("Cannot send signal to process", proc);
}
/*
static int
nt_kill_process_by_pid (int pid, int signo)
{
- HANDLE h_process;
- int send_result;
-
+ struct Lisp_Process *p;
+
/* Signal error if SIGNO cannot be sent */
validate_signal_number (signo);
- /* Try to open the process with required privileges */
- h_process = OpenProcess (PROCESS_CREATE_THREAD
- | PROCESS_QUERY_INFORMATION
- | PROCESS_VM_OPERATION
- | PROCESS_VM_WRITE,
- FALSE, pid);
- if (h_process == NULL)
- return -1;
-
- send_result = send_signal (h_process, signo);
-
- CloseHandle (h_process);
-
- return send_result ? 0 : -1;
+ p = find_process_from_pid (pid);
+ return send_signal (p ? NT_DATA (p) : 0, pid, signo) ? 0 : -1;
}
\f
/*-----------------------------------------------------------------------*/
deactivate and close it via delete-process */
static void
-nt_open_network_stream (Lisp_Object name, Lisp_Object host, Lisp_Object service,
+nt_open_network_stream (Lisp_Object name, Lisp_Object host,
+ Lisp_Object service,
Lisp_Object protocol, void** vinfd, void** voutfd)
{
+ /* !!#### not Mule-ized */
struct sockaddr_in address;
SOCKET s;
int port;
CHECK_STRING (host);
if (!EQ (protocol, Qtcp))
- error ("Unsupported protocol \"%s\"",
- string_data (symbol_name (XSYMBOL (protocol))));
+ signal_simple_error ("Unsupported protocol", protocol);
if (INTP (service))
port = htons ((unsigned short) XINT (service));
CHECK_STRING (service);
svc_info = getservbyname ((char *) XSTRING_DATA (service), "tcp");
if (svc_info == 0)
- error ("Unknown service \"%s\"", XSTRING_DATA (service));
+ signal_simple_error ("Unknown service", service);
port = svc_info->s_port;
}
connect_failed:
closesocket (s);
- if (INTP (service)) {
- warn_when_safe(Qstream, Qwarning,
- "failure to open network stream to host \"%s\" for service \"%d\"",
- XSTRING_DATA (host),
- (unsigned short) XINT (service));
- }
- else {
- warn_when_safe(Qstream, Qwarning,
- "failure to open network stream to host \"%s\" for service \"%s\"",
- XSTRING_DATA (host),
- XSTRING_DATA (service));
- }
+ if (INTP (service))
+ {
+ warn_when_safe (Qstream, Qwarning,
+ "failure to open network stream to host \"%s\" for service \"%d\"",
+ XSTRING_DATA (host),
+ (unsigned short) XINT (service));
+ }
+ else
+ {
+ 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));
}
void
vars_of_process_nt (void)
{
+ DEFVAR_LISP ("mswindows-start-process-share-console",
+ &Vmswindows_start_process_share_console /*
+When nil, new child processes are given a new console.
+When non-nil, they share the Emacs console; this has the limitation of
+allowing only only DOS subprocess to run at a time (whether started directly
+or indirectly by Emacs), and preventing Emacs from cleanly terminating the
+subprocess group, but may allow Emacs to interrupt a subprocess that doesn't
+otherwise respond to interrupts from Emacs.
+*/ );
+ Vmswindows_start_process_share_console = Qnil;
+
+ DEFVAR_LISP ("mswindows-start-process-inherit-error-mode",
+ &Vmswindows_start_process_inherit_error_mode /*
+ "When nil, new child processes revert to the default error mode.
+When non-nil, they inherit their error mode setting from Emacs, which stops
+them blocking when trying to access unmounted drives etc.
+*/ );
+ Vmswindows_start_process_inherit_error_mode = Qt;
}
to get rid of irrelevant descriptors. */
static int
-close_process_descs_mapfun (CONST void* key, void* contents, void* arg)
+close_process_descs_mapfun (const void* key, void* contents, void* arg)
{
Lisp_Object proc;
CVOID_TO_LISP (proc, contents);
#endif /* !(HAVE_GETADDRINFO && HAVE_GETNAMEINFO) */
static void
-set_socket_nonblocking_maybe (int fd, int port, CONST char* proto)
+set_socket_nonblocking_maybe (int fd, int port, const char* proto)
{
#ifdef PROCESS_IO_BLOCKING
Lisp_Object tail;
volatile Lisp_Object vol_proc = proc;
Lisp_Process *volatile p = XPROCESS (proc);
+ /* #### JV: layering violation?
+
+ This function knows too much about the relation between the encodingstream
+ (DATA_OUTSTREAM) and te actual output stream p->output_stream.
+
+ If encoding streams properly forwarded all calls, we could simply
+ use DATA_OUTSTREAM everywhere. */
+
if (!SETJMP (send_process_frame))
{
/* use a reasonable-sized buffer (somewhere around the size of the
that may allow the program
to finish doing output and read more. */
Faccept_process_output (Qnil, make_int (1), Qnil);
+ /* It could have *really* finished, deleting the process */
+ if (NILP(p->pipe_outstream))
+ return;
old_sigpipe =
(SIGTYPE (*) (int)) signal (SIGPIPE, send_process_trap);
Lstream_flush (XLSTREAM (p->pipe_outstream));
Bufbyte eof_char = get_eof_char (XPROCESS (proc));
send_process (proc, Qnil, &eof_char, 0, 1);
#else
- send_process (proc, Qnil, (CONST Bufbyte *) "\004", 0, 1);
+ send_process (proc, Qnil, (const Bufbyte *) "\004", 0, 1);
#endif
return 1;
}
#ifdef HAVE_MULTICAST
-/* Didier Verna <verna@inf.enst.fr> Nov. 28 1997.
+/* Didier Verna <didier@xemacs.org> Nov. 28 1997.
This function is similar to open-network-stream-internal, but provides a
mean to open an UDP multicast connection instead of a TCP one. Like in the
Lisp_Process *
get_process_from_usid (USID usid)
{
- CONST void *vval;
+ const void *vval;
assert (usid != USID_ERROR && usid != USID_DONTHASH);
- if (gethash ((CONST void*)usid, usid_to_process, &vval))
+ if (gethash ((const void*)usid, usid_to_process, &vval))
{
Lisp_Object proc;
CVOID_TO_LISP (proc, vval);
{
Lisp_Object proc = Qnil;
XSETPROCESS (proc, p);
- puthash ((CONST void*)usid, LISP_TO_VOID (proc), usid_to_process);
+ puthash ((const void*)usid, LISP_TO_VOID (proc), usid_to_process);
}
MAYBE_PROCMETH (init_process_io_handles, (p, in, out, flags));
void
send_process (Lisp_Object proc,
- Lisp_Object relocatable, CONST Bufbyte *nonrelocatable,
+ Lisp_Object relocatable, const Bufbyte *nonrelocatable,
int start, int len)
{
/* This function can GC */
}
\f
-CONST char *
+const char *
signal_name (int signum)
{
if (signum >= 0 && signum < NSIG)
- return (CONST char *) sys_siglist[signum];
+ return (const char *) sys_siglist[signum];
- return (CONST char *) GETTEXT ("unknown signal");
+ return (const char *) GETTEXT ("unknown signal");
}
void
name = string_data (XSYMBOL (sigcode)->name);
#define handle_signal(signal) \
- else if (!strcmp ((CONST char *) name, #signal)) \
+ else if (!strcmp ((const char *) name, #signal)) \
XSETINT (sigcode, signal)
if (0)
p->pipe_outstream);
if (usid != USID_DONTHASH)
- remhash ((CONST void*)usid, usid_to_process);
+ remhash ((const void*)usid, usid_to_process);
p->pipe_instream = Qnil;
p->pipe_outstream = Qnil;
void
syms_of_process (void)
{
+ INIT_LRECORD_IMPLEMENTATION (process);
+
defsymbol (&Qprocessp, "processp");
defsymbol (&Qprocess_live_p, "process-live-p");
defsymbol (&Qrun, "run");
#else /* not NO_SUBPROCESSES */
-/* Only process.c needs to know about the guts of this */
+/* struct Lisp_Process is defined in procimpl.h; only process-*.c need
+ to know about the guts of it. */
DECLARE_LRECORD (process, Lisp_Process);
#define XPROCESS(x) XRECORD (x, process, Lisp_Process)
extern volatile int synch_process_alive;
/* Nonzero => this is a string explaining death of synchronous subprocess. */
-extern CONST char *synch_process_death;
+extern const char *synch_process_death;
/* If synch_process_death is zero,
this is exit code of synchronous subprocess. */
void
#endif
child_setup (int in, int out, int err,
- char **new_argv, CONST char *current_dir);
+ char **new_argv, const char *current_dir);
Charcount read_process_output (Lisp_Object proc);
-CONST char *signal_name (int signum);
+const char *signal_name (int signum);
Lisp_Object canonicalize_host_name (Lisp_Object host);
void* out, int flags);
void send_process (Lisp_Object proc,
Lisp_Object relocatable,
- CONST Bufbyte *nonrelocatable,
+ const Bufbyte *nonrelocatable,
int start, int len);
#endif /* INCLUDED_procimpl_h_ */
lose because of this. Even worse, if the memory allocation
fails, the `error' generated whacks everything hard. */
long count;
- CONST void *vval;
+ const void *vval;
if (gethash (LISP_TO_VOID (fun), big_profile_table, &vval))
count = (long) vval;
else
count = 0;
count++;
- vval = (CONST void *) count;
+ vval = (const void *) count;
puthash (LISP_TO_VOID (fun), (void *) vval, big_profile_table);
}
};
static int
-get_profiling_info_maphash (CONST void *void_key,
+get_profiling_info_maphash (const void *void_key,
void *void_val,
void *void_closure)
{
}
static int
-mark_profiling_info_maphash (CONST void *void_key,
+mark_profiling_info_maphash (const void *void_key,
void *void_val,
void *void_closure)
{
#include <stdio.h>
typedef void *VM_ADDR; /* VM addresses */
-static CONST VM_ADDR VM_FAILURE_ADDR = (VM_ADDR) -1; /* mmap returns this when it fails. */
+static const VM_ADDR VM_FAILURE_ADDR = (VM_ADDR) -1; /* mmap returns this when it fails. */
/* Configuration for relocating allocator. */
addr_chain = (ADDRESS_CHAIN) UNDERLYING_MALLOC( sizeof( ADDRESS_BLOCK ));
addr_chain->next = 0; /* Last block in chain */
addr_chain->sz = 0x0c000000; /* Size */
- addr_chain->addr = (POINTER) (0x04000000 | DATA_SEG_BITS);
+ addr_chain->addr = (POINTER) (0x04000000);
addr_chain->flag = empty;
}
void
syms_of_rangetab (void)
{
+ INIT_LRECORD_IMPLEMENTATION (range_table);
+
defsymbol (&Qrange_tablep, "range-table-p");
defsymbol (&Qrange_table, "range-table");
#include <stdio.h>
#include <string.h>
#include <errno.h>
+#include <limits.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 */
+
+#if defined (HAVE_SYS_PARAM_H)
+#include <sys/param.h>
#endif
#ifdef WINDOWSNT
#endif
/* Make a copy of the source path since we may need to modify it. */
- strcpy(copy_path, path);
+ strcpy (copy_path, path);
path = copy_path;
max_path = copy_path + PATH_MAX - 2;
#ifdef WINDOWSNT
continue;
}
- if (path[1] == '.')
+ /* Handle ".." */
+ if (path[1] == '.' &&
+ (path[2] == '\0' || path[2] == '/'))
{
- if (path[2] == '\0' || path[2] == '/')
- {
- path += 2;
-
- /* Ignore ".." at root. */
- if (new_path == resolved_path + 1)
- continue;
-
- /* Handle ".." by backing up. */
- while ((--new_path)[-1] != '/')
- ;
- continue;
- }
+ path += 2;
+
+ /* Ignore ".." at root. */
+ if (new_path == resolved_path + 1)
+ continue;
+
+ /* Handle ".." by backing up. */
+ while ((--new_path)[-1] != '/')
+ ;
+ continue;
}
}
#ifdef S_IFLNK
/* See if latest pathname component is a symlink. */
*new_path = '\0';
- n = readlink(resolved_path, link_path, PATH_MAX - 1);
+ n = readlink (resolved_path, link_path, PATH_MAX - 1);
if (n < 0)
{
Chuck Thompson
Lots of work done by Ben Wing for Mule
- Partially rewritten for mswindows by Jonathan Harris, November 1997 for 21.0.
- */
+
+ Partially rewritten for mswindows by Jonathan Harris, November 1997
+ for 21.0. */
#include <config.h>
#include "lisp.h"
static int
separate_textual_runs (unsigned char *text_storage,
textual_run *run_storage,
- CONST Emchar *str, Charcount len)
+ const Emchar *str, Charcount len)
{
Lisp_Object prev_charset = Qunbound; /* not Qnil because that is a
possible valid charset when
/*
* Given F, retrieve device context. F can be a display frame, or
- * a print job.
+ * a print job. For a print job, page is also started when printer's
+ * device context is first time requested.
*/
static HDC
-get_frame_dc (struct frame *f)
+get_frame_dc (struct frame *f, int start_page_p)
{
if (FRAME_MSWINDOWS_P (f))
return FRAME_MSWINDOWS_DC (f);
else
- return DEVICE_MSPRINTER_HDC (XDEVICE (FRAME_DEVICE (f)));
+ {
+ if (start_page_p && !FRAME_MSPRINTER_PAGE_STARTED (f))
+ msprinter_start_page (f);
+ return DEVICE_MSPRINTER_HDC (XDEVICE (FRAME_DEVICE (f)));
+ }
}
/*
static HDC
get_frame_compdc (struct frame *f)
{
- if (FRAME_MSWINDOWS_P (f))
- return FRAME_MSWINDOWS_CDC (f);
+ struct device *d = XDEVICE (FRAME_DEVICE (f));
+ if (DEVICE_MSWINDOWS_P (d))
+ return DEVICE_MSWINDOWS_HCDC (d);
else
- return FRAME_MSPRINTER_CDC (f);
+ return DEVICE_MSPRINTER_HCDC (d);
}
/*****************************************************************************
struct rune *rb, int start_pixpos)
{
struct frame *f = XFRAME (w->frame);
- HDC hdc = get_frame_dc (f);
+ HDC hdc = get_frame_dc (f, 1);
RECT rect = { rb->xpos, DISPLAY_LINE_YPOS (dl),
rb->xpos+rb->width,
DISPLAY_LINE_YEND (dl) };
struct face_cachel *cachel=0;
Lisp_Object font = Qnil;
int focus = EQ (w->frame, DEVICE_FRAME_WITH_FOCUS_REAL (d));
- HDC hdc = get_frame_dc (f);
+ HDC hdc = get_frame_dc (f, 1);
unsigned int local_face_index=0;
char *p_char = NULL;
int n_char = 0;
struct frame *f = XFRAME (w->frame);
/* struct device *d = XDEVICE (f->device);*/
Lisp_Object window;
- HDC hdc = get_frame_dc (f);
+ HDC hdc = get_frame_dc (f, 1);
int clip_end;
Lisp_Object bg_pmap;
int len = Dynarr_length (buf);
struct display_box* db,
struct display_glyph_area* dga)
{
- HDC hdc = get_frame_dc (f);
+ HDC hdc = get_frame_dc (f, 1);
HDC hcompdc = get_frame_compdc (f);
HGDIOBJ old=NULL;
COLORREF bgcolor = GetBkColor (hdc);
+ const int real_x = IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_WIDTH (p);
+ const int real_y = IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_HEIGHT (p);
+ const int surface_x = IMAGE_INSTANCE_PIXMAP_WIDTH (p);
+ const int surface_y = IMAGE_INSTANCE_PIXMAP_HEIGHT (p);
- /* first blt the mask */
+ /* first blit the mask */
if (IMAGE_INSTANCE_MSWINDOWS_MASK (p))
{
RGBQUAD col;
SetDIBColorTable (hcompdc, 1, 1, &col);
- BitBlt (hdc,
- db->xpos, db->ypos,
- dga->width, dga->height,
- hcompdc,
- dga->xoffset, dga->yoffset,
- SRCCOPY);
+ StretchBlt (hdc,
+ db->xpos, db->ypos,
+ dga->width, dga->height,
+ hcompdc,
+ MulDiv (dga->xoffset, real_x, surface_x),
+ MulDiv (dga->yoffset, real_y, surface_y),
+ MulDiv (dga->width, real_x, surface_x),
+ MulDiv (dga->height, real_y, surface_y),
+ SRCCOPY);
SelectObject (hcompdc, old);
}
- /* Now blt the bitmap itself, or one of its slices. */
+ /* Now blit the bitmap itself, or one of its slices. */
old = SelectObject (hcompdc,
IMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICE
(p, IMAGE_INSTANCE_PIXMAP_SLICE (p)));
- BitBlt (hdc,
- db->xpos, db->ypos,
- dga->width, dga->height,
- hcompdc,
- dga->xoffset, dga->yoffset,
- IMAGE_INSTANCE_MSWINDOWS_MASK (p) ? SRCINVERT : SRCCOPY);
+ StretchBlt (hdc,
+ db->xpos, db->ypos,
+ dga->width, dga->height,
+ hcompdc,
+ MulDiv (dga->xoffset, real_x, surface_x),
+ MulDiv (dga->yoffset, real_y, surface_y),
+ MulDiv (dga->width, real_x, surface_x),
+ MulDiv (dga->height, real_y, surface_y),
+ IMAGE_INSTANCE_MSWINDOWS_MASK (p) ? SRCINVERT : SRCCOPY);
SelectObject (hcompdc, old);
}
int cursor_height, int bg_pixmap)
{
struct frame *f = XFRAME (w->frame);
- HDC hdc = get_frame_dc (f);
+ HDC hdc = get_frame_dc (f, 1);
Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance);
Lisp_Object window;
* to by PRC, and paints only the intersection
*/
static void
-mswindows_redisplay_deadbox_maybe (struct window *w, CONST RECT* prc)
+mswindows_redisplay_deadbox_maybe (struct window *w, const RECT* prc)
{
int sbh = window_scrollbar_height (w);
int sbw = window_scrollbar_width (w);
if (IntersectRect (&rect_paint, &rect_dead, prc))
{
struct frame *f = XFRAME (WINDOW_FRAME (w));
- FillRect (get_frame_dc (f), &rect_paint,
+ FillRect (get_frame_dc (f, 1), &rect_paint,
(HBRUSH) (COLOR_BTNFACE+1));
}
}
{
RECT rect = { x, y, x + width, y + height };
Lisp_Object color = WINDOW_FACE_CACHEL_BACKGROUND (w, findex);
- HDC hdc = get_frame_dc (f);
+ HDC hdc = get_frame_dc (f, 1);
mswindows_update_dc (hdc, Qnil, color, Qnil);
DrawEdge (hdc, &rect, edge, border);
mswindows_flash (struct device *d)
{
struct frame *f = device_selected_frame (d);
- HDC hdc = get_frame_dc (f);
+ HDC hdc = get_frame_dc (f, 1);
RECT rc;
GetClientRect (FRAME_MSWINDOWS_HANDLE (f), &rc);
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);
findex = rb->findex;
if (IMAGE_INSTANCEP (instance))
- switch (XIMAGE_INSTANCE_TYPE (instance))
- {
- case IMAGE_TEXT:
+ {
+ switch (XIMAGE_INSTANCE_TYPE (instance))
{
- /* #### This is way losing. See the comment in
- add_glyph_rune(). */
- Lisp_Object string =
- XIMAGE_INSTANCE_TEXT_STRING (instance);
- convert_bufbyte_string_into_emchar_dynarr
- (XSTRING_DATA (string), XSTRING_LENGTH (string), buf);
-
+ case IMAGE_MONO_PIXMAP:
+ case IMAGE_COLOR_PIXMAP:
+ redisplay_output_pixmap (w, instance, &dbox, &dga, findex,
+ cursor_start, cursor_width,
+ cursor_height, 0);
if (rb->cursor_type == CURSOR_ON)
mswindows_output_cursor (w, dl, xpos, cursor_width,
- findex, Dynarr_at (buf, 0), 0);
- 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,
- 0, 0, 0, 0);
- Dynarr_reset (buf);
+ findex, 0, 1);
+ break;
+
+ case IMAGE_SUBWINDOW:
+ case IMAGE_WIDGET:
+ redisplay_output_subwindow (w, instance, &dbox, &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, &dbox, &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_NOTHING:
+ /* nothing is as nothing does */
+ break;
+
+ case IMAGE_TEXT:
+ case IMAGE_POINTER:
+ default:
+ abort ();
}
- break;
-
- case IMAGE_MONO_PIXMAP:
- case IMAGE_COLOR_PIXMAP:
- redisplay_output_pixmap (w, instance, &dbox, &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);
- break;
-
- case IMAGE_POINTER:
- abort ();
-
- case IMAGE_SUBWINDOW:
- case IMAGE_WIDGET:
- redisplay_output_subwindow (w, instance, &dbox, &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, &dbox, &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_NOTHING:
- /* nothing is as nothing does */
- break;
-
- default:
- abort ();
- }
-
+ IMAGE_INSTANCE_OPTIMIZE_OUTPUT
+ (XIMAGE_INSTANCE (instance)) = 0;
+ }
xpos += rb->width;
elt++;
}
mswindows_output_vertical_divider (struct window *w, int clear_unused)
{
struct frame *f = XFRAME (w->frame);
- HDC hdc = get_frame_dc (f);
+ HDC hdc = get_frame_dc (f, 1);
RECT rect;
int spacing = XINT (w->vertical_divider_spacing);
int shadow = XINT (w->vertical_divider_shadow_thickness);
int abs_shadow = abs (shadow);
int line_width = XINT (w->vertical_divider_line_width);
int div_left = WINDOW_RIGHT (w) - window_divider_width (w);
- int y1 = WINDOW_TOP (w) + FRAME_TOP_GUTTER_BOUNDS (f);
- int y2 = WINDOW_BOTTOM (w) + FRAME_BOTTOM_GUTTER_BOUNDS (f);
+ int y1 = WINDOW_TOP (w);
+ int y2 = WINDOW_BOTTOM (w);
/* Clear left and right spacing areas */
if (spacing)
****************************************************************************/
static int
mswindows_text_width (struct frame *f, struct face_cachel *cachel,
- CONST Emchar *str, Charcount len)
+ const Emchar *str, Charcount len)
{
- HDC hdc = get_frame_dc (f);
+ HDC hdc = get_frame_dc (f, 0);
int width_so_far = 0;
unsigned char *text_storage = (unsigned char *) alloca (2 * len);
textual_run *runs = alloca_array (textual_run, len);
Lisp_Object background_pixmap)
{
RECT rect = { x, y, x+width, y+height };
- HDC hdc = get_frame_dc (f);
+ HDC hdc = get_frame_dc (f, 1);
if (!NILP (background_pixmap))
{
For the given LINE in window W, make the current display line equal
the desired display line.
****************************************************************************/
-static void
+void
sync_display_line_structs (struct window *w, int line, int do_blocks,
display_line_dynarr *cdla,
display_line_dynarr *ddla)
#### 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->xpos != drb->xpos)
+ if (crb->xpos != drb->xpos)
return 0;
else if (crb->width != drb->width)
return 0;
return 0;
/* Only check dirtiness if we know something has changed. */
else if (crb->type == RUNE_DGLYPH &&
- XFRAME (w->frame)->glyphs_changed)
+ (XGLYPH_DIRTYP (crb->object.dglyph.glyph) ||
+ crb->findex != drb->findex))
{
- 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))
+ /* We need some way of telling redisplay_output_layout () that the
+ only reason we are outputting it is because something has
+ changed internally. That way we can optimize whether we need
+ to clear the layout first and also only output the components
+ that have changed. The image_instance dirty flag and
+ display_hash are no good to us because these will invariably
+ have been set anyway if the layout has changed. So it looks
+ like we need yet another change flag that we can set here and
+ then clear in redisplay_output_layout (). */
+ Lisp_Object window, image;
+ Lisp_Image_Instance* ii;
+ XSETWINDOW (window, w);
+ image = glyph_image_instance (crb->object.dglyph.glyph,
+ window, ERROR_ME_NOT, 1);
+ ii = XIMAGE_INSTANCE (image);
+
+ if (TEXT_IMAGE_INSTANCEP (image) &&
+ (crb->findex != drb->findex ||
+ WINDOW_FACE_CACHEL_DIRTY (w, drb->findex)))
return 0;
+
+ /* It is quite common of the two glyphs to be EQ since in many
+ cases they will actually be the same object. This does not
+ mean, however, that nothing has changed. We therefore need to
+ check the current hash of the glyph against the last recorded
+ display hash and the pending display items. See
+ update_subwindow (). */
+ if (image_instance_changed (image) ||
+ crb->findex != drb->findex ||
+ WINDOW_FACE_CACHEL_DIRTY (w, drb->findex))
+ {
+ /* We now now we are going to re-output the glyph, but since
+ this is for some internal reason not related to geometry
+ changes, send a hint to the output routines that they can
+ take some short cuts. This is most useful for
+ layouts. This flag should get reset by the output
+ routines.
+
+ #### It is possible for us to get here when the
+ face_cachel is dirty. I do not know what the implications
+ of this are.*/
+ IMAGE_INSTANCE_OPTIMIZE_OUTPUT (ii) = 1;
+ return 0;
+ }
else
- return 1;
+ {
+#ifdef DEBUG_WIDGET_OUTPUT
+ if (XIMAGE_INSTANCE_TYPE (image) == IMAGE_LAYOUT)
+ printf ("glyph layout %p considered unchanged\n", ii);
+#endif
+ return 1;
+ }
}
+ /* We now do this last so that glyph checks can do their own thing
+ for face changes. Face changes quite often happen when we are
+ trying to output something in the gutter, this would normally
+ lead to a lot of flashing. The indices can quite often be
+ different and yet the faces are the same, we do not want to
+ re-output in this instance. */
+ else if (crb->findex != drb->findex ||
+ WINDOW_FACE_CACHEL_DIRTY (w, drb->findex))
+ return 0;
else
return 1;
}
else
{
DEVMETH (d, output_begin, (d));
-
- /* #### This is a gross kludge. Cursor handling is such a royal
- pain in the ass. */
- if (rb->type == RUNE_DGLYPH &&
- (EQ (rb->object.dglyph.glyph, Vtruncation_glyph) ||
- EQ (rb->object.dglyph.glyph, Vcontinuation_glyph)))
- rb->cursor_type = NO_CURSOR;
- else
- rb->cursor_type = CURSOR_OFF;
+ rb->cursor_type = CURSOR_OFF;
dl->cursor_elt = -1;
output_display_line (w, 0, cla, y, rb->xpos, rb->xpos + rb->width);
}
{
struct frame *f = XFRAME (w->frame);
struct device *d = XDEVICE (f->device);
+ /* Temporarily disabled until generalization is done. */
+#if 0
struct display_block *db = Dynarr_atp (dl->display_blocks, block);
rune_dynarr *rba = db->runes;
struct rune *rb;
rb = Dynarr_atp (rba, end - 1);
width = rb->xpos + rb->width - xpos;
+#endif
/* now actually output the block. */
DEVMETH (d, output_display_block, (w, dl, block, start,
end, start_pixpos,
Lisp_Object window;
struct display_glyph_area sdga;
- dga->height = IMAGE_INSTANCE_SUBWINDOW_HEIGHT (p);
- dga->width = IMAGE_INSTANCE_SUBWINDOW_WIDTH (p);
+ dga->height = IMAGE_INSTANCE_HEIGHT (p);
+ dga->width = IMAGE_INSTANCE_WIDTH (p);
+
+ /* The first thing we are going to do is update the display
+ characteristics of the subwindow. This also clears the dirty
+ flags as a side effect. */
+ update_subwindow (image_instance);
/* This makes the glyph area fit into the display area. */
if (!redisplay_normalize_glyph_area (db, dga))
cases.*/
sdga.xoffset = -dga->xoffset;
sdga.yoffset = -dga->yoffset;
- sdga.height = IMAGE_INSTANCE_SUBWINDOW_HEIGHT (p);
- sdga.width = IMAGE_INSTANCE_SUBWINDOW_WIDTH (p);
+ sdga.height = IMAGE_INSTANCE_HEIGHT (p);
+ sdga.width = IMAGE_INSTANCE_WIDTH (p);
if (redisplay_display_boxes_in_window_p (w, db, &sdga) < 0)
{
redisplay_output_layout
Output a widget hierarchy. This can safely call itself recursively.
+
+ The complexity of outputting layouts is deciding whether to do it or
+ not. Consider a layout enclosing some text, the text changes and is
+ marked as dirty, but the enclosing layout has not been marked as
+ dirty so no updates occur and the text will potentially be truncated.
+ Alternatively we hold a back pointer in the image instance to the
+ parent and mark the parent as dirty. But the layout code assumes that
+ if the layout is dirty then the whole layout should be redisplayed,
+ so we then get lots of flashing even though only the text has changed
+ size. Of course if the text shrinks in size then we do actually need
+ to redisplay the layout to repaint the exposed area. So what happens
+ if we make a non-structural change like changing color? Either we
+ redisplay everything, or we redisplay nothing. These are exactly the
+ issues lwlib has to grapple with. We really need to know what has
+ actually changed and make a layout decision based on that. We also
+ really need to know what has changed so that we can only make the
+ neccessary changes in update_subwindow. This has all now been
+ implemented, Viva la revolution!
****************************************************************************/
void
redisplay_output_layout (struct window *w,
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 so 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);
XSETWINDOW (window, w);
dga->height = layout_height;
dga->width = layout_width;
-
+#ifdef DEBUG_WIDGET_OUTPUT
+ printf ("outputing layout glyph %p\n", p);
+#endif
/* 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))
+ if (!IMAGE_INSTANCE_OPTIMIZE_OUTPUT (p)
+ || IMAGE_INSTANCE_LAYOUT_CHANGED (p)
+ || IMAGE_INSTANCE_WIDGET_FACE_CHANGED (p)
+ || IMAGE_INSTANCE_SIZE_CHANGED (p)
+ || IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (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
if (IMAGE_INSTANCEP (child))
{
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.width = glyph_width (child, window);
cdga.height = glyph_height (child, window);
+ IMAGE_INSTANCE_OPTIMIZE_OUTPUT (childii) =
+ IMAGE_INSTANCE_OPTIMIZE_OUTPUT (p);
+
/* 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. */
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. */
+ routines will treat as a truly +ve offset. */
cdga.xoffset = -cdga.xoffset;
cdga.yoffset = -cdga.yoffset;
generalisation.*/
if (redisplay_normalize_glyph_area (&cdb, &cdga)
&&
- (frame_really_changed || IMAGE_INSTANCE_DIRTYP (childii)))
+ (!IMAGE_INSTANCE_OPTIMIZE_OUTPUT (childii) ||
+ IMAGE_INSTANCE_DIRTYP (childii)))
{
struct display_line dl; /* this is fake */
Lisp_Object string =
IMAGE_INSTANCE_TEXT_STRING (childii);
+ unsigned char charsets[NUM_LEADING_BYTES];
+ struct face_cachel *cachel = WINDOW_FACE_CACHEL (w, findex);
+
+ find_charsets_in_bufbyte_string (charsets,
+ XSTRING_DATA (string),
+ XSTRING_LENGTH (string));
+ ensure_face_cachel_complete (cachel, window, charsets);
+
convert_bufbyte_string_into_emchar_dynarr
(XSTRING_DATA (string), XSTRING_LENGTH (string), buf);
case IMAGE_MONO_PIXMAP:
case IMAGE_COLOR_PIXMAP:
- if (frame_really_changed || IMAGE_INSTANCE_DIRTYP (childii))
+ if (!IMAGE_INSTANCE_OPTIMIZE_OUTPUT (childii)
+ || 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))
+ if (!IMAGE_INSTANCE_OPTIMIZE_OUTPUT (childii) ||
+ IMAGE_INSTANCE_DIRTYP (childii))
redisplay_output_subwindow (w, child, &cdb, &cdga, findex,
0, 0, 0);
break;
abort ();
}
}
+ IMAGE_INSTANCE_OPTIMIZE_OUTPUT (childii) = 0;
}
}
+
+ /* Update any display properties. I'm not sure whether this actually
+ does anything for layouts except clear the changed flags. */
+ update_subwindow (image_instance);
+
Dynarr_free (buf);
}
#ifdef __cplusplus
extern "C" {
#endif
-extern int tgetent (CONST char *, CONST char *);
-extern int tgetflag (CONST char *);
-extern int tgetnum (CONST char *);
-extern char *tgetstr (CONST char *, char **);
-extern void tputs (CONST char *, int, void (*)(int));
+extern int tgetent (const char *, const char *);
+extern int tgetflag (const char *);
+extern int tgetnum (const char *);
+extern char *tgetstr (const char *, char **);
+extern void tputs (const char *, int, void (*)(int));
#ifdef __cplusplus
}
#endif
column, so we use emchar_string_displayed_columns().
****************************************************************************/
static int
-tty_text_width (struct frame *f, struct face_cachel *cachel, CONST Emchar *str,
+tty_text_width (struct frame *f, struct face_cachel *cachel, const Emchar *str,
Charcount len)
{
return emchar_string_displayed_columns (str, len);
window, ERROR_ME_NOT, 1);
if (IMAGE_INSTANCEP (instance))
- switch (XIMAGE_INSTANCE_TYPE (instance))
- {
- case IMAGE_TEXT:
+ {
+ switch (XIMAGE_INSTANCE_TYPE (instance))
{
- Bufbyte *temptemp;
- Lisp_Object string =
- XIMAGE_INSTANCE_TEXT_STRING (instance);
- Bytecount len = XSTRING_LENGTH (string);
-
- /* In the unlikely instance that a garbage-collect
- occurs during encoding, we at least need to
- copy the string.
- */
- temptemp = (Bufbyte *) alloca (len);
- memcpy (temptemp, XSTRING_DATA (string), len);
- {
- int i;
-
- /* Now truncate the first rb->object.dglyph.xoffset
- columns. */
- for (i = 0; i < rb->object.dglyph.xoffset;)
- {
-#ifdef MULE
- Emchar ch = charptr_emchar (temptemp);
- i += CHAR_COLUMNS (ch);
-#else
- i++; /* telescope this */
-#endif
- INC_CHARPTR (temptemp);
- }
-
- /* If we truncated one column too many, then
- add a space at the beginning. */
- if (i > rb->object.dglyph.xoffset)
- {
- assert (i > 0);
- *--temptemp = ' ';
- i--;
- }
- len -= i;
- }
-
- tty_output_bufbyte_string (w, dl, temptemp, len,
- xpos, findex, 0);
-
- if (xpos >= cursor_start
- && (cursor_start <
- xpos + (bufbyte_string_displayed_columns
- (temptemp, len))))
- {
- cmgoto (f, dl->ypos - 1, cursor_start);
- }
+ case IMAGE_MONO_PIXMAP:
+ case IMAGE_COLOR_PIXMAP:
+ case IMAGE_SUBWINDOW:
+ case IMAGE_WIDGET:
+ case IMAGE_LAYOUT:
+ /* just do nothing here */
+ break;
+
+ case IMAGE_NOTHING:
+ /* nothing is as nothing does */
+ break;
+
+ case IMAGE_TEXT:
+ case IMAGE_POINTER:
+ default:
+ abort ();
}
- break;
-
- case IMAGE_MONO_PIXMAP:
- case IMAGE_COLOR_PIXMAP:
- case IMAGE_SUBWINDOW:
- case IMAGE_WIDGET:
- case IMAGE_LAYOUT:
- /* just do nothing here */
- break;
-
- case IMAGE_POINTER:
- abort ();
-
- case IMAGE_NOTHING:
- /* nothing is as nothing does */
- break;
-
- default:
- abort ();
- }
+ IMAGE_INSTANCE_OPTIMIZE_OUTPUT
+ (XIMAGE_INSTANCE (instance)) = 0;
+ }
xpos += rb->width;
elt++;
clear_to_end (f);
#else
/* #### Not implemented. */
- fprintf (stderr, "Not yet.\n");
+ stderr_out ("Not yet.\n");
#endif
}
tty_turn_off_frame_face (f, Vdefault_face);
\f
struct fkey_table
{
- CONST char *cap;
- CONST char *name;
+ const char *cap;
+ const char *name;
};
/* Termcap capability names that correspond directly to X keysyms.
"k;", and if it is present, assuming that "k0" denotes F0, otherwise F10.
*/
{
- CONST char *k_semi = tgetstr ("k;", address);
- CONST char *k0 = tgetstr ("k0", address);
+ 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, Qbinary),
static int
separate_textual_runs (unsigned char *text_storage,
struct textual_run *run_storage,
- CONST Emchar *str, Charcount len)
+ const Emchar *str, Charcount len)
{
Lisp_Object prev_charset = Qunbound; /* not Qnil because that is a
possible valid charset when
*/
static int
-x_text_width (struct frame *f, struct face_cachel *cachel, CONST Emchar *str,
+x_text_width (struct frame *f, struct face_cachel *cachel, const Emchar *str,
Charcount len)
{
int width_so_far = 0;
findex = rb->findex;
if (IMAGE_INSTANCEP (instance))
- switch (XIMAGE_INSTANCE_TYPE (instance))
- {
- case IMAGE_TEXT:
+ {
+ switch (XIMAGE_INSTANCE_TYPE (instance))
{
- /* #### This is way losing. See the comment in
- add_glyph_rune(). */
- Lisp_Object string =
- XIMAGE_INSTANCE_TEXT_STRING (instance);
- convert_bufbyte_string_into_emchar_dynarr
- (XSTRING_DATA (string), XSTRING_LENGTH (string), buf);
-
- x_output_string (w, dl, buf, xpos,
- rb->object.dglyph.xoffset,
- start_pixpos, -1, findex,
- (rb->cursor_type == CURSOR_ON),
- cursor_start, cursor_width,
- cursor_height);
- Dynarr_reset (buf);
+ case IMAGE_MONO_PIXMAP:
+ case IMAGE_COLOR_PIXMAP:
+ redisplay_output_pixmap (w, instance, &dbox, &dga, findex,
+ cursor_start, cursor_width,
+ cursor_height, 0);
+ break;
+
+ case IMAGE_WIDGET:
+ case IMAGE_SUBWINDOW:
+ 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_TEXT:
+ case IMAGE_POINTER:
+ default:
+ abort ();
}
- break;
-
- case IMAGE_MONO_PIXMAP:
- case IMAGE_COLOR_PIXMAP:
- redisplay_output_pixmap (w, instance, &dbox, &dga, findex,
- cursor_start, cursor_width,
- cursor_height, 0);
- break;
-
- case IMAGE_WIDGET:
- case IMAGE_SUBWINDOW:
- 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 ();
- }
+ IMAGE_INSTANCE_OPTIMIZE_OUTPUT
+ (XIMAGE_INSTANCE (instance)) = 0;
+ }
xpos += rb->width;
elt++;
{
/* #### I fixed once case where this was getting it. It was a
bad macro expansion (compiler bug). */
- fprintf (stderr, "Help! x_get_gc got a bogus fg value! fg = ");
+ stderr_out ("Help! x_get_gc got a bogus fg value! fg = ");
debug_print (fg);
fg = Qnil;
}
spacing = XINT (w->vertical_divider_spacing);
line_width = XINT (w->vertical_divider_line_width);
x = WINDOW_RIGHT (w) - width;
- y1 = WINDOW_TOP (w) + FRAME_TOP_GUTTER_BOUNDS (f);
- y2 = WINDOW_BOTTOM (w) + FRAME_BOTTOM_GUTTER_BOUNDS (f);
+ y1 = WINDOW_TOP (w);
+ y2 = WINDOW_BOTTOM (w);
memset (&gcv, ~0, sizeof (XGCValues));
struct frame *f = device_selected_frame (d);
struct window *w = XWINDOW (FRAME_ROOT_WINDOW (f));
Widget shell = FRAME_X_SHELL_WIDGET (f);
+ int flash_height;
XSETFRAME (frame, f);
gcv.graphics_exposures = False;
gc = gc_cache_lookup (DEVICE_X_GC_CACHE (XDEVICE (f->device)), &gcv,
(GCForeground | GCFunction | GCGraphicsExposures));
- XFillRectangle (dpy, win, gc, w->pixel_left, w->pixel_top,
- w->pixel_width, w->pixel_height);
+ default_face_height_and_width (frame, &flash_height, 0);
+
+ /* If window is tall, flash top and bottom line. */
+ if (EQ (Vvisible_bell, Qtop_bottom) && w->pixel_height > 3 * flash_height)
+ {
+ XFillRectangle (dpy, win, gc, w->pixel_left, w->pixel_top,
+ w->pixel_width, flash_height);
+ XFillRectangle (dpy, win, gc, w->pixel_left,
+ w->pixel_top + w->pixel_height - flash_height,
+ w->pixel_width, flash_height);
+ }
+ else
+ /* If it is short, flash it all. */
+ XFillRectangle (dpy, win, gc, w->pixel_left, w->pixel_top,
+ w->pixel_width, w->pixel_height);
+
XSync (dpy, False);
#ifdef HAVE_SELECT
#endif /* HAVE_POLL */
#endif /* HAVE_SELECT */
- XFillRectangle (dpy, win, gc, w->pixel_left, w->pixel_top,
- w->pixel_width, w->pixel_height);
+ /* If window is tall, flash top and bottom line. */
+ if (EQ (Vvisible_bell, Qtop_bottom) && w->pixel_height > 3 * flash_height)
+ {
+ XFillRectangle (dpy, win, gc, w->pixel_left, w->pixel_top,
+ w->pixel_width, flash_height);
+ XFillRectangle (dpy, win, gc, w->pixel_left,
+ w->pixel_top + w->pixel_height - flash_height,
+ w->pixel_width, flash_height);
+ }
+ else
+ /* If it is short, flash it all. */
+ XFillRectangle (dpy, win, gc, w->pixel_left, w->pixel_top,
+ w->pixel_width, w->pixel_height);
+
XSync (dpy, False);
return 1;
int glyphs_changed;
int glyphs_changed_set;
-/* non-zero if any displayed subwindow is in need of updating
- somewhere. */
+/* non-zero if any subwindow has been deleted. */
int subwindows_changed;
int subwindows_changed_set;
Lisp_Object Vbar_cursor;
Lisp_Object Qbar_cursor;
-int visible_bell; /* If true and the terminal will support it
- then the frame will flash instead of
- beeping when an error occurs */
+Lisp_Object Vvisible_bell; /* If true and the terminal will support it
+ then the frame will flash instead of
+ beeping when an error occurs */
/* Nonzero means no need to redraw the entire frame on resuming
a suspended Emacs. This is useful on terminals with multiple pages,
Lisp_Object Vwindow_scroll_functions;
Lisp_Object Qredisplay_end_trigger_functions, Vredisplay_end_trigger_functions;
+Lisp_Object Qbuffer_list_changed_hook, Vbuffer_list_changed_hook;
+
+
#define INHIBIT_REDISPLAY_HOOKS /* #### Until we've thought about
this more. */
#ifndef INHIBIT_REDISPLAY_HOOKS
int column_number_start_at_one;
+Lisp_Object Qtop_bottom;
+
#define WINDOW_SCROLLED(w) \
(w->hscroll > 0 || w->left_xoffset)
gb.glyph = Vhscroll_glyph;
{
int oldpixpos = data->pixpos;
- retval = add_glyph_rune (data, &gb, BEGIN_GLYPHS, 1,
+ retval = add_glyph_rune (data, &gb, BEGIN_GLYPHS, 0,
GLYPH_CACHEL (XWINDOW (data->window),
HSCROLL_GLYPH_INDEX));
data->hscroll_glyph_width_adjust =
else if (data->is_modeline)
crb->bufpos = data->modeline_charpos;
else
- /* fuckme if this shouldn't be an abort. */
- /* abort (); fuckme harder, this abort gets tripped quite often,
- in propagation and whatnot. #### fixme */
+ /* Text but not in buffer */
crb->bufpos = 0;
crb->type = RUNE_CHAR;
crb->object.chr.ch = data->font_is_bogus ? '~' : data->ch;
glyph sizes might have changed too */
invalidate_glyph_geometry_maybe (gb->glyph, w);
+ /* This makes sure the glyph is in the cachels.
+
+ #### We do this to make sure the glyph is in the glyph cachels,
+ so that the dirty flag can be reset after redisplay has
+ finished. We should do this some other way, maybe by iterating
+ over the window cache of subwindows. */
+ get_glyph_cachel_index (w, gb->glyph);
+
/* A nil extent indicates a special glyph (ex. truncator). */
if (NILP (gb->extent)
|| (pos_type == BEGIN_GLYPHS &&
extent_begin_glyph_layout (XEXTENT (gb->extent)) == GL_TEXT)
|| (pos_type == END_GLYPHS &&
- extent_end_glyph_layout (XEXTENT (gb->extent)) == GL_TEXT))
+ extent_end_glyph_layout (XEXTENT (gb->extent)) == GL_TEXT)
+ || pos_type == LEFT_GLYPHS || pos_type == RIGHT_GLYPHS)
{
struct rune rb;
int width;
int ascent, descent;
Lisp_Object baseline;
Lisp_Object face;
+ Lisp_Object instance;
+ face_index findex;
if (cachel)
width = cachel->width;
face = glyph_face (gb->glyph, data->window);
if (NILP (face))
- rb.findex = data->findex;
+ findex = data->findex;
else
- rb.findex = get_builtin_face_cache_index (w, face);
+ findex = get_builtin_face_cache_index (w, face);
+ instance = glyph_image_instance (gb->glyph, data->window,
+ ERROR_ME_NOT, 1);
+ if (TEXT_IMAGE_INSTANCEP (instance))
+ {
+ Lisp_Object string = XIMAGE_INSTANCE_TEXT_STRING (instance);
+ face_index orig_findex = data->findex;
+ Bytind orig_bufpos = data->bi_bufpos;
+ Bytind orig_start_col_enabled = data->bi_start_col_enabled;
+
+ data->findex = findex;
+ data->bi_start_col_enabled = 0;
+ if (!allow_cursor)
+ data->bi_bufpos = 0;
+ add_bufbyte_string_runes (data, XSTRING_DATA (string),
+ XSTRING_LENGTH (string), 0);
+ data->findex = orig_findex;
+ data->bi_bufpos = orig_bufpos;
+ data->bi_start_col_enabled = orig_start_col_enabled;
+ return NULL;
+ }
+
+ rb.findex = findex;
rb.xpos = data->pixpos;
rb.width = width;
rb.bufpos = 0; /* glyphs are never "at" anywhere */
else
rb.endpos = 0;
rb.type = RUNE_DGLYPH;
- /* #### Ben sez: this is way bogus if the glyph is a string.
- You should not make the output routines have to cope with
- this. The string could contain Mule characters, or non-
- printable characters, or characters to be passed through
- the display table, or non-character objects (when this gets
- implemented), etc. Instead, this routine here should parse
- the string into a series of runes. */
rb.object.dglyph.glyph = gb->glyph;
rb.object.dglyph.extent = gb->extent;
rb.object.dglyph.xoffset = xoffset;
dl->used_prop_data = 0;
dl->num_chars = 0;
+ dl->line_continuation = 0;
xzero (data);
data.ef = extent_fragment_new (w->buffer, f);
/* data.bi_bufpos is already at the start of the next line. */
+ dl->line_continuation = 1;
gb.glyph = Vcontinuation_glyph;
cachel = GLYPH_CACHEL (w, CONT_GLYPH_INDEX);
}
- add_glyph_rune (&data, &gb, BEGIN_GLYPHS, 1, cachel);
+ add_glyph_rune (&data, &gb, BEGIN_GLYPHS, 0, cachel);
if (truncate_win && data.bi_bufpos == BI_BUF_ZV (b)
&& BI_BUF_FETCH_CHAR (b, prev_bytind (b, BI_BUF_ZV (b))) != '\n')
? dl->left_glyphs
: dl->right_glyphs);
int elt, end;
- int xpos = start;
int reverse;
+ struct window *w = XWINDOW (window);
+ struct frame *f = XFRAME (w->frame);
+ struct device *d = XDEVICE (f->device);
+ pos_data data;
+
+ xzero (data);
+ data.d = d;
+ data.window = window;
+ data.db = db;
+ data.dl = dl;
+ data.pixpos = start;
+ data.cursor_type = NO_CURSOR;
+ data.cursor_x = -1;
+ data.last_charset = Qunbound;
+ data.last_findex = DEFAULT_INDEX;
+ data.result_str = Qnil;
+ data.string = Qnil;
+ data.new_ascent = dl->ascent;
+ data.new_descent = dl->descent;
if ((layout == GL_WHITESPACE && side == LEFT_GLYPHS)
|| (layout == GL_INSIDE_MARGIN && side == RIGHT_GLYPHS))
|| (side == RIGHT_GLYPHS &&
extent_end_glyph_layout (XEXTENT (gb->extent)) == layout)))
{
- struct rune rb;
-
- rb.width = gb->width;
- rb.findex = gb->findex;
- rb.xpos = xpos;
- rb.bufpos = -1;
- rb.endpos = 0;
- rb.type = RUNE_DGLYPH;
- rb.object.dglyph.glyph = gb->glyph;
- rb.object.dglyph.extent = gb->extent;
- rb.object.dglyph.xoffset = 0;
- rb.cursor_type = CURSOR_OFF;
-
- Dynarr_add (db->runes, rb);
- xpos += rb.width;
+ data.findex = gb->findex;
+ data.max_pixpos = data.pixpos + gb->width;
+ add_glyph_rune (&data, gb, side, 0, NULL);
count--;
gb->active = 0;
-
- if (glyph_contrib_p (gb->glyph, window))
- {
- unsigned short ascent, descent;
- Lisp_Object baseline = glyph_baseline (gb->glyph, window);
-
- ascent = glyph_ascent (gb->glyph, window);
- descent = glyph_descent (gb->glyph, window);
-
- /* A pixmap that has not had a baseline explicitly set.
- We use the existing ascent / descent ratio of the
- line. */
- if (NILP (baseline))
- {
- int gheight = ascent + descent;
- int line_height = dl->ascent + dl->descent;
- int pix_ascent, pix_descent;
-
- pix_descent = (int) (gheight * dl->descent) / line_height;
- pix_ascent = gheight - pix_descent;
-
- dl->ascent = max ((int) dl->ascent, pix_ascent);
- dl->descent = max ((int) dl->descent, pix_descent);
- }
-
- /* A string so determine contribution normally. */
- else if (EQ (baseline, Qt))
- {
- dl->ascent = max (dl->ascent, ascent);
- dl->descent = max (dl->descent, descent);
- }
-
- /* A pixmap with an explicitly set baseline. We determine the
- contribution here. */
- else if (INTP (baseline))
- {
- int height = ascent + descent;
- int pix_ascent, pix_descent;
-
- pix_ascent = height * XINT (baseline) / 100;
- pix_descent = height - pix_ascent;
-
- dl->ascent = max ((int) dl->ascent, pix_ascent);
- dl->descent = max ((int) dl->descent, pix_descent);
- }
-
- /* Otherwise something is screwed up. */
- else
- abort ();
- }
}
(reverse ? elt-- : elt++);
}
- return xpos;
+ if (data.max_pixmap_height)
+ {
+ int height = data.new_ascent + data.new_descent;
+ int pix_ascent, pix_descent;
+
+ pix_descent = data.max_pixmap_height * data.new_descent / height;
+ pix_ascent = data.max_pixmap_height - pix_descent;
+ data.new_ascent = max (data.new_ascent, pix_ascent);
+ data.new_descent = max (data.new_descent, pix_descent);
+ }
+
+ dl->ascent = data.new_ascent;
+ dl->descent = data.new_descent;
+
+ return data.pixpos;
}
/* Add a blank to a margin display block. */
Bufbyte *strdata;
struct buffer *buf = XBUFFER (WINDOW_BUFFER (w));
+ in_modeline_generation = 1;
+
detach_all_extents (result_str);
resize_string (XSTRING (result_str), -1,
data.bytepos - XSTRING_LENGTH (result_str));
Dynarr_at (formatted_string_extent_end_dynarr, elt),
result_str);
}
+
+ in_modeline_generation = 0;
}
}
/* The modeline is at the bottom of the gutters. */
dl->ypos = WINDOW_BOTTOM (w);
- /* adjust for the bottom gutter */
- if (window_is_lowest (w))
- dl->ypos -= FRAME_BOTTOM_GUTTER_BOUNDS (f);
-
rb.findex = MODELINE_INDEX;
rb.xpos = dl->bounds.left_out;
rb.width = dl->bounds.right_out - dl->bounds.left_out;
set this until we've generated the modeline in order to account
for any embedded faces. */
dl->ypos = WINDOW_BOTTOM (w) - dl->descent - ypos_adj;
- /* adjust for the bottom gutter */
- if (window_is_lowest (w))
- dl->ypos -= FRAME_BOTTOM_GUTTER_BOUNDS (f);
}
static Charcount
-add_string_to_fstring_db_runes (pos_data *data, CONST Bufbyte *str,
+add_string_to_fstring_db_runes (pos_data *data, const Bufbyte *str,
Charcount pos, Charcount min_pos, Charcount max_pos)
{
/* This function has been Mule-ized. */
Charcount end;
- CONST Bufbyte *cur_pos = str;
+ const Bufbyte *cur_pos = str;
struct display_block *db = data->db;
data->blank_width = space_width (XWINDOW (data->window));
add_blank_rune (data, NULL, 0);
end = (Dynarr_length (db->runes) +
- bytecount_to_charcount (str, strlen ((CONST char *) str)));
+ bytecount_to_charcount (str, strlen ((const char *) str)));
if (max_pos != -1)
end = min (max_pos, end);
while (pos < end && *cur_pos)
{
- CONST Bufbyte *old_cur_pos = cur_pos;
+ const Bufbyte *old_cur_pos = cur_pos;
int succeeded;
data->ch = charptr_emchar (cur_pos);
{
Charcount tmp_max = (max_pos == -1 ? pos + size - *offset :
min (pos + size - *offset, max_pos));
- CONST Bufbyte *tmp_last = charptr_n_addr (last, *offset);
+ const Bufbyte *tmp_last = charptr_n_addr (last, *offset);
pos = add_string_to_fstring_db_runes (data, tmp_last,
pos, pos, tmp_max);
while (num_to_add--)
pos = add_string_to_fstring_db_runes
- (data, (CONST Bufbyte *) "-", pos, pos, max_pos);
+ (data, (const Bufbyte *) "-", pos, pos, max_pos);
}
else if (*this != 0)
{
*offset -= size;
else
{
- CONST Bufbyte *tmp_str = charptr_n_addr (str, *offset);
+ const Bufbyte *tmp_str = charptr_n_addr (str, *offset);
/* #### NOTE: I don't understand why a tmp_max is not
computed and used here as in the plain string case
*offset -= size;
else
{
- CONST Bufbyte *tmp_str = charptr_n_addr (str, *offset);
+ const Bufbyte *tmp_str = charptr_n_addr (str, *offset);
/* #### NOTE: I don't understand why a tmp_max is not
computed and used here as in the plain string case
*offset -= size;
else
{
- CONST Bufbyte *tmp_str =
- charptr_n_addr ((CONST Bufbyte *) str, *offset);
+ const Bufbyte *tmp_str =
+ charptr_n_addr ((const Bufbyte *) str, *offset);
/* #### NOTE: I don't understand why a tmp_max is not computed and
used here as in the plain string case above. -- dv */
if (min_pos > pos)
{
- add_string_to_fstring_db_runes (data, (CONST Bufbyte *) "", pos,
+ add_string_to_fstring_db_runes (data, (const Bufbyte *) "", pos,
min_pos, -1);
}
dl->used_prop_data = 0;
dl->num_chars = 0;
+ dl->line_continuation = 0;
/* set up faces to use for clearing areas, used by
output_display_line */
/* data.bi_bufpos is already at the start of the next line. */
+ dl->line_continuation = 1;
gb.glyph = Vcontinuation_glyph;
cachel = GLYPH_CACHEL (w, CONT_GLYPH_INDEX);
}
if (truncate_win && data.bi_bufpos == bi_string_zv)
{
- CONST Bufbyte* endb = charptr_n_addr (string_data (s), bi_string_zv);
+ const Bufbyte* endb = charptr_n_addr (string_data (s), bi_string_zv);
DEC_CHARPTR (endb);
if (charptr_emchar (endb) != '\n')
{
else
prop = 0;
+ /* Make sure this is set always */
+ /* Note the conversion at end */
+ w->window_end_pos[type] = start_pos;
while (ypos < yend)
{
struct display_line dl;
Dynarr_free (prop);
/* #### More not quite right, but close enough. */
- /* #### Ben sez: apparently window_end_pos[] is measured
+ /* Ben sez: apparently window_end_pos[] is measured
as the number of characters between the window end and the
end of the buffer? This seems rather weirdo. What's
- the justification for this? */
+ the justification for this?
+
+ JV sez: Because BUF_Z (b) would be a good initial value, however
+ that can change. This representation allows initalizing with 0.
+ */
w->window_end_pos[type] = BUF_Z (b) - w->window_end_pos[type];
if (need_modeline)
assert (cdl->end_bufpos == ddl->end_bufpos);
assert (cdl->offset == ddl->offset);
- /* If the last rune is already a continuation glyph, fail.
- #### We should be able to handle this better. */
- {
- struct display_block *db = get_display_block_from_line (ddl, TEXT);
- if (Dynarr_length (db->runes))
- {
- struct rune *rb =
- Dynarr_atp (db->runes, Dynarr_length (db->runes) - 1);
-
- if (rb->type == RUNE_DGLYPH
- && EQ (rb->object.dglyph.glyph, Vcontinuation_glyph))
- return 0;
- }
- }
+ /* If the line continues to next display line, fail. */
+ if (ddl->line_continuation)
+ return 0;
/* If the line was generated using propagation data, fail. */
if (ddl->used_prop_data)
return 0;
}
- /* If the last rune is now a continuation glyph, fail. */
- {
- struct display_block *db = get_display_block_from_line (ddl, TEXT);
- if (Dynarr_length (db->runes))
- {
- struct rune *rb =
- Dynarr_atp (db->runes, Dynarr_length (db->runes) - 1);
-
- if (rb->type == RUNE_DGLYPH
- && EQ (rb->object.dglyph.glyph, Vcontinuation_glyph))
- return 0;
- }
- }
+ /* If the line continues to next display line, fail. */
+ if (ddl->line_continuation)
+ return 0;
/* If any line position parameters have changed or a
cursor has disappeared or disappeared, fail. */
&& !f->faces_changed
&& !f->glyphs_changed
&& !f->subwindows_changed
- && !f->subwindows_state_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->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->subwindows_state_changed*/
&& !f->windows_structure_changed
&& !f->frame_changed
&& !truncation_changed
/* Ensure that all windows on the given frame are correctly displayed. */
-static int
+int
redisplay_frame (struct frame *f, int preemption_check)
{
struct device *d = XDEVICE (f->device);
return 1;
}
+ if (!internal_equal (f->old_buffer_alist, f->buffer_alist, 0))
+ {
+ Lisp_Object frame;
+
+ f->old_buffer_alist = Freplace_list (f->old_buffer_alist,
+ f->buffer_alist);
+ XSETFRAME (frame, f);
+ va_run_hook_with_args (Qbuffer_list_changed_hook, 1, frame);
+ }
+
/* Before we put a hold on frame size changes, attempt to process
any which are already pending. */
if (f->size_change_pending)
being handled. */
update_frame_menubars (f);
#endif /* HAVE_MENUBARS */
- /* 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
- radio buttons. */
- update_frame_subwindows (f);
#ifdef HAVE_TOOLBARS
/* Update the toolbars. */
update_frame_toolbars (f);
#endif /* HAVE_TOOLBARS */
+ /* Gutter update proper has to be done inside display when no frame
+ size changes can occur, thus we separately update the gutter
+ geometry here if it needs it. */
+ update_frame_gutter_geometry (f);
/* 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
+ /* 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->faces_changed
- || f->frame_changed)
+ if (f->frame_changed || f->subwindows_changed)
{
reset_subwindow_cachels (f);
/* we have to do this so the gutter gets regenerated. */
}
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 ();
#### If a frame-size change does occur we should probably
actually be preempting redisplay. */
+ /* We can now update the gutters, safe in the knowledge that our
+ efforts won't get undone. */
+
+ /* This can call lisp, but redisplay is protected by binding
+ inhibit_quit. More importantly the code involving display lines
+ *assumes* that GC will not happen and so does not GCPRO
+ anything. Since we use this code the whole time with the gutters
+ we cannot allow GC to happen when manipulating the gutters. */
+ update_frame_gutters (f);
+
/* Erase the frame before outputting its contents. */
if (f->clear)
{
decode_mode_spec (struct window *w, Emchar spec, int type)
{
Lisp_Object obj = Qnil;
- CONST char *str = NULL;
+ const char *str = NULL;
struct buffer *b = XBUFFER (w->buffer);
Dynarr_reset (mode_spec_bufbyte_string);
long_to_string (buf, col);
Dynarr_add_many (mode_spec_bufbyte_string,
- (CONST Bufbyte *) buf, strlen (buf));
+ (const Bufbyte *) buf, strlen (buf));
goto decode_mode_spec_done;
}
}
}
-static void
+/* See the comment in image_instantiate_cache_result as to why marking
+ the glyph will also mark the image_instance. */
+void
mark_redisplay_structs (display_line_dynarr *dla)
{
display_line *dl = Dynarr_atp (dla, 0);
struct frame *f = XFRAME (XCAR (frmcons));
update_frame_window_mirror (f);
mark_window_mirror (f->root_mirror);
+ mark_gutters (f);
}
}
\f
displayed. The end of the last line is also know as the window end
position.
+ WARNING: It is possible that rediplay failed to layout any lines for the
+ windows. Under normal circumstances this is rare. However it seems that it
+ does occur in the following situation: A mouse event has come in and we
+ need to compute its location in a window. That code (in
+ pixel_to_glyph_translation) already can handle 0 as an error return value.
+
#### With a little work this could probably be reworked as just a
call to start_with_line_at_pixpos. */
static Bufpos
-start_end_of_last_line (struct window *w, Bufpos startp, int end)
+start_end_of_last_line (struct window *w, Bufpos startp, int end,
+ int may_error)
{
struct buffer *b = XBUFFER (w->buffer);
line_start_cache_dynarr *cache = w->line_start_cache;
start_elt = point_in_line_start_cache (w, cur_start, 0);
if (start_elt == -1)
- abort (); /* this had better never happen */
+ return may_error ? 0 : startp;
while (1)
{
Bufpos
start_of_last_line (struct window *w, Bufpos startp)
{
- return start_end_of_last_line (w, startp, 0);
+ return start_end_of_last_line (w, startp, 0 , 0);
}
/* For the given window W, if display starts at STARTP, what will be
Bufpos
end_of_last_line (struct window *w, Bufpos startp)
{
- return start_end_of_last_line (w, startp, 1);
+ return start_end_of_last_line (w, startp, 1, 0);
+}
+
+static Bufpos
+end_of_last_line_may_error (struct window *w, Bufpos startp)
+{
+ return start_end_of_last_line (w, startp, 1, 1);
}
+
/* For window W, what does the starting position have to be so that
the line containing POINT will cover pixel position PIXPOS. */
if (!MARKERP ((*w)->start[CURRENT_DISP]))
*closest = 0;
else
- *closest = end_of_last_line (*w,
+ *closest = end_of_last_line_may_error (*w,
marker_position ((*w)->start[CURRENT_DISP]));
*col = 0;
UPDATE_CACHE_RETURN;
f->clear = 1;
redisplay_frame (f, 1);
+ /* See the comment in Fredisplay_frame. */
+ RESET_CHANGED_SET_FLAGS;
+
return unbind_to (count, Qnil);
}
redisplay_frame (f, 1);
+ /* If we don't reset the global redisplay flafs here, subsequent
+ changes to the display will not get registered by redisplay
+ because it thinks it already has registered changes. If you
+ really knew what you were doing you could confuse redisplay by
+ calling Fredisplay_frame while updating another frame. We assume
+ that if you know what you are doing you will not be that
+ stupid. */
+ RESET_CHANGED_SET_FLAGS;
+
return unbind_to (count, Qnil);
}
}
redisplay_device (d, 0);
+ /* See the comment in Fredisplay_frame. */
+ RESET_CHANGED_SET_FLAGS;
+
return unbind_to (count, Qnil);
}
redisplay_device (d, 0);
+ /* See the comment in Fredisplay_frame. */
+ RESET_CHANGED_SET_FLAGS;
+
return unbind_to (count, Qnil);
}
defsymbol (&Qbar_cursor, "bar-cursor");
defsymbol (&Qredisplay_end_trigger_functions,
"redisplay-end-trigger-functions");
+ defsymbol (&Qtop_bottom, "top-bottom");
+ defsymbol (&Qbuffer_list_changed_hook, "buffer-list-changed-hook");
DEFSUBR (Fredisplay_echo_area);
DEFSUBR (Fredraw_frame);
redisplay_variable_changed);
truncate_partial_width_windows = 1;
- DEFVAR_BOOL ("visible-bell", &visible_bell /*
-*Non-nil means try to flash the frame to represent a bell.
+ DEFVAR_LISP ("visible-bell", &Vvisible_bell /*
+*Non-nil substitutes a visual signal for the audible bell.
+
+Default behavior is to flash the whole screen. On some platforms,
+special effects are available using the following values:
+
+'display Flash the whole screen (ie, the default behavior).
+'top-bottom Flash only the top and bottom lines of the selected frame.
+
+When effects are unavailable on a platform, the visual bell is the
+default, whole screen. (Currently only X supports any special effects.)
*/ );
- visible_bell = 0;
+ Vvisible_bell = Qnil;
DEFVAR_BOOL ("no-redraw-on-reenter", &no_redraw_on_reenter /*
*Non-nil means no need to redraw entire frame after suspending.
#ifndef INHIBIT_REDISPLAY_HOOKS
xxDEFVAR_LISP ("pre-redisplay-hook", &Vpre_redisplay_hook /*
Function or functions to run before every redisplay.
-Functions on this hook must be careful to avoid signalling errors!
*/ );
Vpre_redisplay_hook = Qnil;
xxDEFVAR_LISP ("post-redisplay-hook", &Vpost_redisplay_hook /*
Function or functions to run after every redisplay.
-Functions on this hook must be careful to avoid signalling errors!
*/ );
Vpost_redisplay_hook = Qnil;
#endif /* INHIBIT_REDISPLAY_HOOKS */
+ DEFVAR_LISP ("buffer-list-changed-hook", &Vbuffer_list_changed_hook /*
+Function or functions to call when a frame's buffer list has changed.
+This is called during redisplay, before redisplaying each frame.
+Functions on this hook are called with one argument, the frame.
+*/ );
+ Vbuffer_list_changed_hook = Qnil;
+
DEFVAR_INT ("display-warning-tick", &display_warning_tick /*
Bump this to tell the C code to call `display-warning-buffer'
at next redisplay. You should not normally change this; the function
char modeline; /* t if this line is a modeline */
+ char line_continuation; /* t if this line continues to
+ next display line. */
+
/* Dynamic array of display blocks */
display_block_dynarr *display_blocks;
If any of these flags are set, redisplay will look more carefully
to see if anything has really changed. */
-/* non-nil if the contents of a buffer have changed since the last time
- redisplay completed */
+/* Nonzero if the contents of a buffer have changed since the last time
+ redisplay completed. */
extern int buffers_changed;
extern int buffers_changed_set;
/* Nonzero if head_clip or tail_clip of a buffer has changed
- since last redisplay that finished */
+ since last redisplay that finished. */
extern int clip_changed;
extern int clip_changed_set;
-/* non-nil if any extent has changed since the last time redisplay completed */
+/* Nonzero if any extent has changed since the last time redisplay completed. */
extern int extents_changed;
extern int extents_changed_set;
-/* non-nil if any face has changed since the last time redisplay completed */
+/* Nonzero if any face has changed since the last time redisplay completed. */
extern int faces_changed;
-/* Nonzero means one or more frames have been marked as garbaged */
+/* Nonzero means one or more frames have been marked as garbaged. */
extern int frame_changed;
/* True if any of the builtin display glyphs (continuation,
extern int menubar_changed;
extern int menubar_changed_set;
-/* true iff we should redraw the modelines on the next redisplay */
+/* True iff we should redraw the modelines on the next redisplay. */
extern int modeline_changed;
extern int modeline_changed_set;
-/* non-nil if point has changed in some buffer since the last time
- redisplay completed */
+/* Nonzero if point has changed in some buffer since the last time
+ redisplay completed. */
extern int point_changed;
extern int point_changed_set;
-/* non-nil if some frame has changed its size */
+/* Nonzero if some frame has changed its size. */
extern int size_changed;
-/* non-nil if some device has signaled that it wants to change size */
+/* Nonzero if some device has signaled that it wants to change size. */
extern int asynch_device_change_pending;
-/* non-nil if any toolbar has changed */
+/* Nonzero if any toolbar has changed. */
extern int toolbar_changed;
extern int toolbar_changed_set;
-/* non-nil if any gutter has changed */
+/* Nonzero if any gutter has changed. */
extern int gutter_changed;
extern int gutter_changed_set;
-/* non-nil if any window has changed since the last time redisplay completed */
+/* Nonzero if any window has changed since the last time redisplay completed */
extern int windows_changed;
-/* non-nil if any frame's window structure has changed since the last
- time redisplay completed */
+/* Nonzero if any frame's window structure has changed since the last
+ time redisplay completed. */
extern int windows_structure_changed;
/* These macros can be relatively expensive. Since they are often
buffers_changed = 0; \
clip_changed = 0; \
extents_changed = 0; \
- faces_changed = 0; \
frame_changed = 0; \
icon_changed = 0; \
menubar_changed = 0; \
gutter_changed = 0; \
glyphs_changed = 0; \
subwindows_changed = 0; \
- subwindows_state_changed = 0; \
+ subwindows_state_changed = 0; \
windows_changed = 0; \
windows_structure_changed = 0; \
} while (0)
(p)->toolbar_changed || \
(p)->gutter_changed || \
(p)->glyphs_changed || \
- (p)->size_changed || \
+ (p)->size_changed || \
(p)->subwindows_changed || \
(p)->subwindows_state_changed || \
(p)->windows_changed || \
where one page is used for Emacs and another for all else. */
extern int no_redraw_on_reenter;
-/* Nonzero means flash the frame instead of ringing the bell. */
-extern int visible_bell;
+/* Non-nil means flash the frame instead of ringing the bell. */
+extern Lisp_Object Vvisible_bell;
/* Thickness of shadow border around 3D modelines. */
extern Lisp_Object Vmodeline_shadow_thickness;
extern int display_arg;
/* Type of display specified. Defined in emacs.c. */
-extern CONST char *display_use;
+extern const char *display_use;
/* Nonzero means reading single-character input with prompt
so put cursor on minibuffer after the prompt. */
extern Lisp_Object Qbar_cursor, Qcursor_in_echo_area, Vwindow_system;
+extern Lisp_Object Qtop_bottom;
+
\f
/*************************************************************************/
/* redisplay exported functions */
Bufbyte *nonreloc,
Lisp_Object reloc,
Bytecount offset, Bytecount len);
+int redisplay_frame (struct frame *f, int preemption_check);
void redisplay (void);
struct display_block *get_display_block_from_line (struct display_line *dl,
enum display_type type);
void redisplay_echo_area (void);
void free_display_structs (struct window_mirror *mir);
void free_display_lines (display_line_dynarr *dla);
+void mark_redisplay_structs (display_line_dynarr *dla);
void generate_displayable_area (struct window *w, Lisp_Object disp_string,
int xpos, int ypos, int width, int height,
display_line_dynarr* dl,
void output_display_line (struct window *w, display_line_dynarr *cdla,
display_line_dynarr *ddla, int line,
int force_start, int force_end);
+void sync_display_line_structs (struct window *w, int line, int do_blocks,
+ display_line_dynarr *cdla,
+ display_line_dynarr *ddla);
#endif /* INCLUDED_redisplay_h_ */
if (!done)
{
- CONST char *word_syntax_chars =
+ const char *word_syntax_chars =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";
memset (re_syntax_table, 0, sizeof (re_syntax_table));
static void
-print_double_string (CONST char *where, CONST char *string1, int size1,
- CONST char *string2, int size2)
+print_double_string (const char *where, const char *string1, int size1,
+ const char *string2, int size2)
{
if (where == NULL)
printf ("(null)");
POSIX doesn't require that we do anything for REG_NOERROR,
but why not be nice? */
-static CONST char *re_error_msgid[] =
+static const char *re_error_msgid[] =
{
"Success", /* REG_NOERROR */
"No match", /* REG_NOMATCH */
{ \
DEBUG_STATEMENT (fail_stack_elt_t ffailure_id;) \
int this_reg; \
- CONST unsigned char *string_temp; \
+ const unsigned char *string_temp; \
\
assert (!FAIL_STACK_EMPTY ()); \
\
saved NULL, thus retaining our current position in the string. */ \
string_temp = POP_FAILURE_POINTER (); \
if (string_temp != NULL) \
- str = (CONST char *) string_temp; \
+ str = (const char *) string_temp; \
\
DEBUG_PRINT2 (" Popping string 0x%lx: `", (long) str); \
DEBUG_PRINT_DOUBLE_STRING (str, string1, size1, string2, size2); \
DEBUG_PRINT2 (" info: 0x%lx\n", \
* (long *) ®_info[this_reg]); \
\
- regend[this_reg] = (CONST char *) POP_FAILURE_POINTER (); \
+ regend[this_reg] = (const char *) POP_FAILURE_POINTER (); \
DEBUG_PRINT2 (" end: 0x%lx\n", (long) regend[this_reg]); \
\
- regstart[this_reg] = (CONST char *) POP_FAILURE_POINTER (); \
+ regstart[this_reg] = (const char *) POP_FAILURE_POINTER (); \
DEBUG_PRINT2 (" start: 0x%lx\n", (long) regstart[this_reg]); \
} \
\
#define PATFETCH_EXTENDED(emch) \
do {if (p == pend) return REG_EEND; \
assert (p < pend); \
- emch = charptr_emchar ((CONST Bufbyte *) p); \
+ emch = charptr_emchar ((const Bufbyte *) p); \
INC_CHARPTR (p); \
if (translate && emch < 0x80) \
emch = (Emchar) (unsigned char) translate[emch]; \
#define PATFETCH_RAW_EXTENDED(emch) \
do {if (p == pend) return REG_EEND; \
assert (p < pend); \
- emch = charptr_emchar ((CONST Bufbyte *) p); \
+ emch = charptr_emchar ((const Bufbyte *) p); \
INC_CHARPTR (p); \
} while (0)
unsigned char *end);
static void insert_op2 (re_opcode_t op, unsigned char *loc, int arg1, int arg2,
unsigned char *end);
-static boolean at_begline_loc_p (CONST char *pattern, CONST char *p,
+static boolean at_begline_loc_p (const char *pattern, const char *p,
reg_syntax_t syntax);
-static boolean at_endline_loc_p (CONST char *p, CONST char *pend, int syntax);
+static boolean at_endline_loc_p (const char *p, const char *pend, int syntax);
static boolean group_in_compile_stack (compile_stack_type compile_stack,
regnum_t regnum);
-static reg_errcode_t compile_range (CONST char **p_ptr, CONST char *pend,
+static reg_errcode_t compile_range (const char **p_ptr, const char *pend,
char *translate, reg_syntax_t syntax,
unsigned char *b);
#ifdef MULE
-static reg_errcode_t compile_extended_range (CONST char **p_ptr,
- CONST char *pend,
+static reg_errcode_t compile_extended_range (const char **p_ptr,
+ const char *pend,
char *translate,
reg_syntax_t syntax,
Lisp_Object rtab);
static boolean common_op_match_null_string_p (unsigned char **p,
unsigned char *end,
register_info_type *reg_info);
-static int bcmp_translate (CONST unsigned char *s1, CONST unsigned char *s2,
+static int bcmp_translate (const unsigned char *s1, const unsigned char *s2,
REGISTER int len, char *translate);
static int re_match_2_internal (struct re_pattern_buffer *bufp,
- CONST char *string1, int size1,
- CONST char *string2, int size2, int pos,
+ const char *string1, int size1,
+ const char *string2, int size2, int pos,
struct re_registers *regs, int stop);
\f
#ifndef MATCH_MAY_ALLOCATE
but never make them smaller. */
static int regs_allocated_size;
-static CONST char ** regstart, ** regend;
-static CONST char ** old_regstart, ** old_regend;
-static CONST char **best_regstart, **best_regend;
+static const char ** regstart, ** regend;
+static const char ** old_regstart, ** old_regend;
+static const char **best_regstart, **best_regend;
static register_info_type *reg_info;
-static CONST char **reg_dummy;
+static const char **reg_dummy;
static register_info_type *reg_info_dummy;
/* Make the register vectors big enough for NUM_REGS registers,
{
if (num_regs > regs_allocated_size)
{
- RETALLOC_IF (regstart, num_regs, CONST char *);
- RETALLOC_IF (regend, num_regs, CONST char *);
- RETALLOC_IF (old_regstart, num_regs, CONST char *);
- RETALLOC_IF (old_regend, num_regs, CONST char *);
- RETALLOC_IF (best_regstart, num_regs, CONST char *);
- RETALLOC_IF (best_regend, num_regs, CONST char *);
+ RETALLOC_IF (regstart, num_regs, const char *);
+ RETALLOC_IF (regend, num_regs, const char *);
+ RETALLOC_IF (old_regstart, num_regs, const char *);
+ RETALLOC_IF (old_regend, num_regs, const char *);
+ RETALLOC_IF (best_regstart, num_regs, const char *);
+ RETALLOC_IF (best_regend, num_regs, const char *);
RETALLOC_IF (reg_info, num_regs, register_info_type);
- RETALLOC_IF (reg_dummy, num_regs, CONST char *);
+ RETALLOC_IF (reg_dummy, num_regs, const char *);
RETALLOC_IF (reg_info_dummy, num_regs, register_info_type);
regs_allocated_size = num_regs;
return (free (compile_stack.stack), value)
static reg_errcode_t
-regex_compile (CONST char *pattern, int size, reg_syntax_t syntax,
+regex_compile (const char *pattern, int size, reg_syntax_t syntax,
struct re_pattern_buffer *bufp)
{
/* We fetch characters from PATTERN here. We declare these as int
REGISTER EMACS_INT c, c1;
/* A random temporary spot in PATTERN. */
- CONST char *p1;
+ const char *p1;
/* Points to the end of the buffer, where we should append. */
REGISTER unsigned char *b;
compile_stack_type compile_stack;
/* Points to the current (ending) position in the pattern. */
- CONST char *p = pattern;
- CONST char *pend = pattern + size;
+ const char *p = pattern;
+ const char *pend = pattern + size;
/* How to translate the characters in the pattern. */
char *translate = bufp->translate;
/* Place in the uncompiled pattern (i.e., the {) to
which to go back if the interval is invalid. */
- CONST char *beg_interval;
+ const char *beg_interval;
/* Address of the place where a forward jump should go to the end of
the containing expression. Each alternative of an `or' -- except the
if (c == ':' || c == ']' || p == pend
|| c1 == CHAR_CLASS_MAX_LENGTH)
break;
- str[c1++] = c;
+ str[c1++] = (char) c;
}
str[c1] = '\0';
{
/* XEmacs: modifications here for Mule. */
/* `q' points to the beginning of the next char. */
- CONST char *q = p - 1;
+ const char *q = p - 1;
INC_CHARPTR (q);
/* If no exactn currently being built. */
least one character before the ^. */
static boolean
-at_begline_loc_p (CONST char *pattern, CONST char *p, reg_syntax_t syntax)
+at_begline_loc_p (const char *pattern, const char *p, reg_syntax_t syntax)
{
- CONST char *prev = p - 2;
+ const char *prev = p - 2;
boolean prev_prev_backslash = prev > pattern && prev[-1] == '\\';
return
at least one character after the $, i.e., `P < PEND'. */
static boolean
-at_endline_loc_p (CONST char *p, CONST char *pend, int syntax)
+at_endline_loc_p (const char *p, const char *pend, int syntax)
{
- CONST char *next = p;
+ const char *next = p;
boolean next_backslash = *next == '\\';
- CONST char *next_next = p + 1 < pend ? p + 1 : 0;
+ const char *next_next = p + 1 < pend ? p + 1 : 0;
return
/* Before a subexpression? */
`regex_compile' itself. */
static reg_errcode_t
-compile_range (CONST char **p_ptr, CONST char *pend, char *translate,
+compile_range (const char **p_ptr, const char *pend, char *translate,
reg_syntax_t syntax, unsigned char *b)
{
unsigned this_char;
- CONST char *p = *p_ptr;
+ const char *p = *p_ptr;
int range_start, range_end;
if (p == pend)
We also want to fetch the endpoints without translating them; the
appropriate translation is done in the bit-setting loop below. */
- /* The SVR4 compiler on the 3B2 had trouble with unsigned CONST char *. */
- range_start = ((CONST unsigned char *) p)[-2];
- range_end = ((CONST unsigned char *) p)[0];
+ /* The SVR4 compiler on the 3B2 had trouble with unsigned const char *. */
+ range_start = ((const unsigned char *) p)[-2];
+ range_end = ((const unsigned char *) p)[0];
/* Have to increment the pointer into the pattern string, so the
caller isn't still at the ending character. */
#ifdef MULE
static reg_errcode_t
-compile_extended_range (CONST char **p_ptr, CONST char *pend, char *translate,
+compile_extended_range (const char **p_ptr, const char *pend, char *translate,
reg_syntax_t syntax, Lisp_Object rtab)
{
Emchar this_char, range_start, range_end;
- CONST Bufbyte *p;
+ const Bufbyte *p;
if (*p_ptr == pend)
return REG_ERANGE;
- p = (CONST Bufbyte *) *p_ptr;
+ p = (const Bufbyte *) *p_ptr;
range_end = charptr_emchar (p);
p--; /* back to '-' */
DEC_CHARPTR (p); /* back to start of range */
doesn't let you say where to stop matching. */
int
-re_search (struct re_pattern_buffer *bufp, CONST char *string, int size,
+re_search (struct re_pattern_buffer *bufp, const char *string, int size,
int startpos, int range, struct re_registers *regs)
{
return re_search_2 (bufp, NULL, 0, string, size, startpos, range,
stack overflow). */
int
-re_search_2 (struct re_pattern_buffer *bufp, CONST char *string1,
- int size1, CONST char *string2, int size2, int startpos,
+re_search_2 (struct re_pattern_buffer *bufp, const char *string1,
+ int size1, const char *string2, int size2, int startpos,
int range, struct re_registers *regs, int stop)
{
int val;
#ifdef REGEX_BEGLINE_CHECK
int anchored_at_begline = 0;
#endif
- CONST unsigned char *d;
+ const unsigned char *d;
Charcount d_size;
/* Check for out-of-range STARTPOS. */
return -1;
else
{
- d = ((CONST unsigned char *)
+ d = ((const unsigned char *)
(startpos >= size1 ? string2 - size1 : string1) + startpos);
range = charcount_to_bytecount (d, 1);
}
if (startpos < size1 && startpos + range >= size1)
lim = range - (size1 - startpos);
- d = ((CONST unsigned char *)
+ d = ((const unsigned char *)
(startpos >= size1 ? string2 - size1 : string1) + startpos);
DEC_CHARPTR(d); /* Ok, since startpos != size1. */
d_size = charcount_to_bytecount (d, 1);
if (startpos < size1 && startpos + range >= size1)
lim = range - (size1 - startpos);
- d = ((CONST unsigned char *)
+ d = ((const unsigned char *)
(startpos >= size1 ? string2 - size1 : string1) + startpos);
/* Written out as an if-else to avoid testing `translate'
break;
else if (range > 0)
{
- d = ((CONST unsigned char *)
+ d = ((const unsigned char *)
(startpos >= size1 ? string2 - size1 : string1) + startpos);
d_size = charcount_to_bytecount (d, 1);
range -= d_size;
{
/* Note startpos > size1 not >=. If we are on the
string1/string2 boundary, we want to backup into string1. */
- d = ((CONST unsigned char *)
+ d = ((const unsigned char *)
(startpos > size1 ? string2 - size1 : string1) + startpos);
DEC_CHARPTR(d);
d_size = charcount_to_bytecount (d, 1);
/* re_match is like re_match_2 except it takes only a single string. */
int
-re_match (struct re_pattern_buffer *bufp, CONST char *string, int size,
+re_match (struct re_pattern_buffer *bufp, const char *string, int size,
int pos, struct re_registers *regs)
{
int result = re_match_2_internal (bufp, NULL, 0, string, size,
matched substring. */
int
-re_match_2 (struct re_pattern_buffer *bufp, CONST char *string1,
- int size1, CONST char *string2, int size2, int pos,
+re_match_2 (struct re_pattern_buffer *bufp, const char *string1,
+ int size1, const char *string2, int size2, int pos,
struct re_registers *regs, int stop)
{
int result = re_match_2_internal (bufp, string1, size1, string2, size2,
/* This is a separate function so that we can force an alloca cleanup
afterwards. */
static int
-re_match_2_internal (struct re_pattern_buffer *bufp, CONST char *string1,
- int size1, CONST char *string2, int size2, int pos,
+re_match_2_internal (struct re_pattern_buffer *bufp, const char *string1,
+ int size1, const char *string2, int size2, int pos,
struct re_registers *regs, int stop)
{
/* General temporaries. */
int should_succeed; /* XEmacs change */
/* Just past the end of the corresponding string. */
- CONST char *end1, *end2;
+ const char *end1, *end2;
/* Pointers into string1 and string2, just past the last characters in
each to consider matching. */
- CONST char *end_match_1, *end_match_2;
+ const char *end_match_1, *end_match_2;
/* Where we are in the data, and the end of the current string. */
- CONST char *d, *dend;
+ const char *d, *dend;
/* Where we are in the pattern, and the end of the pattern. */
unsigned char *p = bufp->buffer;
stopped matching the regnum-th subexpression. (The zeroth register
keeps track of what the whole pattern matches.) */
#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */
- CONST char **regstart, **regend;
+ const char **regstart, **regend;
#endif
/* If a group that's operated upon by a repetition operator fails to
are when we last see its open-group operator. Similarly for a
register's end. */
#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */
- CONST char **old_regstart, **old_regend;
+ const char **old_regstart, **old_regend;
#endif
/* The is_active field of reg_info helps us keep track of which (possibly
turn happens only if we have not yet matched the entire string. */
unsigned best_regs_set = false;
#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */
- CONST char **best_regstart, **best_regend;
+ const char **best_regstart, **best_regend;
#endif
/* Logically, this is `best_regend[0]'. But we don't want to have to
the end of the best match so far in a separate variable. We
initialize this to NULL so that when we backtrack the first time
and need to test it, it's not garbage. */
- CONST char *match_end = NULL;
+ const char *match_end = NULL;
/* This helps SET_REGS_MATCHED avoid doing redundant work. */
int set_regs_matched_done = 0;
/* Used when we pop values we don't care about. */
#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */
- CONST char **reg_dummy;
+ const char **reg_dummy;
register_info_type *reg_info_dummy;
#endif
array indexing. We should fix this. */
if (bufp->re_nsub)
{
- regstart = REGEX_TALLOC (num_regs, CONST char *);
- regend = REGEX_TALLOC (num_regs, CONST char *);
- old_regstart = REGEX_TALLOC (num_regs, CONST char *);
- old_regend = REGEX_TALLOC (num_regs, CONST char *);
- best_regstart = REGEX_TALLOC (num_regs, CONST char *);
- best_regend = REGEX_TALLOC (num_regs, CONST char *);
+ regstart = REGEX_TALLOC (num_regs, const char *);
+ regend = REGEX_TALLOC (num_regs, const char *);
+ old_regstart = REGEX_TALLOC (num_regs, const char *);
+ old_regend = REGEX_TALLOC (num_regs, const char *);
+ best_regstart = REGEX_TALLOC (num_regs, const char *);
+ best_regend = REGEX_TALLOC (num_regs, const char *);
reg_info = REGEX_TALLOC (num_regs, register_info_type);
- reg_dummy = REGEX_TALLOC (num_regs, CONST char *);
+ reg_dummy = REGEX_TALLOC (num_regs, const char *);
reg_info_dummy = REGEX_TALLOC (num_regs, register_info_type);
if (!(regstart && regend && old_regstart && old_regend && reg_info
DEBUG_PRINT2 ("EXECUTING charset_mule%s.\n", not ? "_not" : "");
PREFETCH ();
- c = charptr_emchar ((CONST Bufbyte *) d);
+ c = charptr_emchar ((const Bufbyte *) d);
c = TRANSLATE_EXTENDED_UNSAFE (c); /* The character to match. */
if (EQ (Qt, unified_range_table_lookup (p, c, Qnil)))
followed by the numeric value of <digit> as the register number. */
case duplicate:
{
- REGISTER CONST char *d2, *dend2;
+ REGISTER const char *d2, *dend2;
int regno = *p++; /* Get which register to match against. */
DEBUG_PRINT2 ("EXECUTING duplicate %d.\n", regno);
`pop_failure_point'. */
unsigned dummy_low_reg, dummy_high_reg;
unsigned char *pdummy;
- CONST char *sdummy = NULL;
+ const char *sdummy = NULL;
DEBUG_PRINT1 ("EXECUTING pop_failure_jump.\n");
POP_FAILURE_POINT (sdummy, pdummy,
result = 1;
else
{
- CONST unsigned char *d_before =
- (CONST unsigned char *) POS_BEFORE_GAP_UNSAFE (d);
- CONST unsigned char *d_after =
- (CONST unsigned char *) POS_AFTER_GAP_UNSAFE (d);
+ const unsigned char *d_before =
+ (const unsigned char *) POS_BEFORE_GAP_UNSAFE (d);
+ const unsigned char *d_after =
+ (const unsigned char *) POS_AFTER_GAP_UNSAFE (d);
Emchar emch1, emch2;
DEC_CHARPTR (d_before);
break;
*/
- CONST unsigned char *dtmp =
- (CONST unsigned char *) POS_AFTER_GAP_UNSAFE (d);
+ const unsigned char *dtmp =
+ (const unsigned char *) POS_AFTER_GAP_UNSAFE (d);
Emchar emch = charptr_emchar (dtmp);
if (!WORDCHAR_P_UNSAFE (emch))
goto fail;
if (AT_STRINGS_BEG (d))
break;
- dtmp = (CONST unsigned char *) POS_BEFORE_GAP_UNSAFE (d);
+ dtmp = (const unsigned char *) POS_BEFORE_GAP_UNSAFE (d);
DEC_CHARPTR (dtmp);
emch = charptr_emchar (dtmp);
if (!WORDCHAR_P_UNSAFE (emch))
The or condition is incorrect (reversed).
*/
- CONST unsigned char *dtmp;
+ const unsigned char *dtmp;
Emchar emch;
if (AT_STRINGS_BEG (d))
goto fail;
- dtmp = (CONST unsigned char *) POS_BEFORE_GAP_UNSAFE (d);
+ dtmp = (const unsigned char *) POS_BEFORE_GAP_UNSAFE (d);
DEC_CHARPTR (dtmp);
emch = charptr_emchar (dtmp);
if (!WORDCHAR_P_UNSAFE (emch))
goto fail;
if (AT_STRINGS_END (d))
break;
- dtmp = (CONST unsigned char *) POS_AFTER_GAP_UNSAFE (d);
+ dtmp = (const unsigned char *) POS_AFTER_GAP_UNSAFE (d);
emch = charptr_emchar (dtmp);
if (!WORDCHAR_P_UNSAFE (emch))
break;
Emchar emch;
PREFETCH ();
- emch = charptr_emchar ((CONST Bufbyte *) d);
+ emch = charptr_emchar ((const Bufbyte *) d);
matches = (SYNTAX_UNSAFE
(XCHAR_TABLE (regex_emacs_buffer->mirror_syntax_table),
emch) == (enum syntaxcode) mcnt);
mcnt = *p++;
PREFETCH ();
- emch = charptr_emchar ((CONST Bufbyte *) d);
+ emch = charptr_emchar ((const Bufbyte *) d);
INC_CHARPTR (d);
if (check_category_char(emch, regex_emacs_buffer->category_table,
mcnt, should_succeed))
bytes; nonzero otherwise. */
static int
-bcmp_translate (CONST unsigned char *s1, CONST unsigned char *s2,
+bcmp_translate (const unsigned char *s1, const unsigned char *s2,
REGISTER int len, char *translate)
{
- REGISTER CONST unsigned char *p1 = s1, *p2 = s2;
+ REGISTER const unsigned char *p1 = s1, *p2 = s2;
while (len)
{
if (translate[*p1++] != translate[*p2++]) return 1;
We call regex_compile to do the actual compilation. */
-CONST char *
-re_compile_pattern (CONST char *pattern, int length,
+const char *
+re_compile_pattern (const char *pattern, int length,
struct re_pattern_buffer *bufp)
{
reg_errcode_t ret;
static struct re_pattern_buffer re_comp_buf;
char *
-re_comp (CONST char *s)
+re_comp (const char *s)
{
reg_errcode_t ret;
if (!ret)
return NULL;
- /* Yes, we're discarding `CONST' here if !HAVE_LIBINTL. */
+ /* Yes, we're discarding `const' here if !HAVE_LIBINTL. */
return (char *) gettext (re_error_msgid[(int) ret]);
}
int
-re_exec (CONST char *s)
+re_exec (const char *s)
{
- CONST int len = strlen (s);
+ const int len = strlen (s);
return
0 <= re_search (&re_comp_buf, s, len, 0, len, (struct re_registers *) 0);
}
the return codes and their meanings.) */
int
-regcomp (regex_t *preg, CONST char *pattern, int cflags)
+regcomp (regex_t *preg, const char *pattern, int cflags)
{
reg_errcode_t ret;
unsigned syntax
We return 0 if we find a match and REG_NOMATCH if not. */
int
-regexec (CONST regex_t *preg, CONST char *string, size_t nmatch,
+regexec (const regex_t *preg, const char *string, size_t nmatch,
regmatch_t pmatch[], int eflags)
{
int ret;
from either regcomp or regexec. We don't use PREG here. */
size_t
-regerror (int errcode, CONST regex_t *preg, char *errbuf, size_t errbuf_size)
+regerror (int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size)
{
- CONST char *msg;
+ const char *msg;
size_t msg_size;
if (errcode < 0
/* Compile the regular expression PATTERN, with length LENGTH
and syntax given by the global `re_syntax_options', into the buffer
BUFFER. Return NULL if successful, and an error string if not. */
-CONST char *re_compile_pattern (CONST char *pattern, int length,
+const char *re_compile_pattern (const char *pattern, int length,
struct re_pattern_buffer *buffer);
characters. Return the starting position of the match, -1 for no
match, or -2 for an internal error. Also return register
information in REGS (if REGS and BUFFER->no_sub are nonzero). */
-int re_search (struct re_pattern_buffer *buffer, CONST char *string,
+int re_search (struct re_pattern_buffer *buffer, const char *string,
int length, int start, int range,
struct re_registers *regs);
/* Like `re_search', but search in the concatenation of STRING1 and
STRING2. Also, stop searching at index START + STOP. */
-int re_search_2 (struct re_pattern_buffer *buffer, CONST char *string1,
- int length1, CONST char *string2, int length2, int start,
+int re_search_2 (struct re_pattern_buffer *buffer, const char *string1,
+ int length1, const char *string2, int length2, int start,
int range, struct re_registers *regs, int stop);
/* Like `re_search', but return how many characters in STRING the regexp
in BUFFER matched, starting at position START. */
-int re_match (struct re_pattern_buffer *buffer, CONST char *string,
+int re_match (struct re_pattern_buffer *buffer, const char *string,
int length, int start, struct re_registers *regs);
/* Relates to `re_match' as `re_search_2' relates to `re_search'. */
-int re_match_2 (struct re_pattern_buffer *buffer, CONST char *string1,
- int length1, CONST char *string2, int length2,
+int re_match_2 (struct re_pattern_buffer *buffer, const char *string1,
+ int length1, const char *string2, int length2,
int start, struct re_registers *regs, int stop);
#ifdef _REGEX_RE_COMP
/* 4.2 bsd compatibility. */
-char *re_comp (CONST char *);
-int re_exec (CONST char *);
+char *re_comp (const char *);
+int re_exec (const char *);
#endif
/* POSIX compatibility. */
-int regcomp (regex_t *preg, CONST char *pattern, int cflags);
-int regexec (CONST regex_t *preg, CONST char *string, size_t nmatch,
+int regcomp (regex_t *preg, const char *pattern, int cflags);
+int regexec (const regex_t *preg, const char *string, size_t nmatch,
regmatch_t pmatch[], int eflags);
-size_t regerror (int errcode, CONST regex_t *preg, char *errbuf,
+size_t regerror (int errcode, const regex_t *preg, char *errbuf,
size_t errbuf_size);
void regfree (regex_t *preg);
#ifndef NOT_C_CODE
#define _XFUNCS_H_ 1
+
+/* AIX is happier when bzero and strcasecmp are declared */
+#include "strings.h"
+
+/* AIX 4.2's sys/mman.h doesn't seem to define MAP_FAILED,
+ although Unix98 claims it must. */
+#ifdef HAVE_MMAP
+#include <sys/mman.h>
+# ifndef MAP_FAILED
+# define MAP_FAILED ((void *) -1)
+# endif
+#endif
+
/* Forward declarations for xlc warning suppressions */
struct ether_addr;
struct sockaddr_dl;
-#endif
+#endif /* C code */
+
+/* getaddrinfo is broken in AIX 4.3 as per IY04165.
+ At this time (2/21/2000), there's no PTF available.
+ -- Mike Sperber <mike@xemacs.org> */
+
+#undef HAVE_GETADDRINFO
/* cheesy way to determine cygwin version */
#ifndef NOT_C_CODE
-#include <signal.h>
-#ifdef HAVE_CYGWIN_VERSION_H
-#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
+# include <signal.h>
+# ifdef HAVE_CYGWIN_VERSION_H
+# 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 void cygwin32_win32_to_posix_path_list(const char*, char*);
extern int cygwin32_win32_to_posix_path_list_buf_size(const char*);
extern void cygwin32_posix_to_win32_path_list(const char*, char*);
extern int cygwin32_posix_to_win32_path_list_buf_size(const char*);
-#if CYGWIN_VERSION_DLL_MAJOR < 20
+# if CYGWIN_VERSION_DLL_MAJOR < 20
struct timeval;
struct timezone;
struct itimerval;
extern int srandom( unsigned seed);
extern long random();
-#define SND_ASYNC 1
-#define SND_NODEFAULT 2
-#define SND_MEMORY 4
-#define SND_FILENAME 0x2000L
-#define VK_APPS 0x5D
-#define SIF_TRACKPOS 0x0010
-#define ICC_BAR_CLASSES 4
-#define FW_BLACK FW_HEAVY
-#define FW_ULTRABOLD FW_EXTRABOLD
-#define FW_DEMIBOLD FW_SEMIBOLD
-#define FW_ULTRALIGHT FW_EXTRALIGHT
-#define APPCMD_FILTERINITS 0x20L
-#define CBF_FAIL_SELFCONNECTIONS 0x1000
-#define CBF_SKIP_ALLNOTIFICATIONS 0x3C0000
-#define CBF_FAIL_ADVISES 0x4000
-#define CBF_FAIL_POKES 0x10000
-#define CBF_FAIL_REQUESTS 0x20000
-#define SZDDESYS_TOPIC "System"
-#define JOHAB_CHARSET 130
-#define MAC_CHARSET 77
-
-#endif
+# define SND_ASYNC 1
+# define SND_NODEFAULT 2
+# define SND_MEMORY 4
+# define SND_FILENAME 0x2000L
+# define VK_APPS 0x5D
+# define SIF_TRACKPOS 0x0010
+# define ICC_BAR_CLASSES 4
+# define FW_BLACK FW_HEAVY
+# define FW_ULTRABOLD FW_EXTRABOLD
+# define FW_DEMIBOLD FW_SEMIBOLD
+# define FW_ULTRALIGHT FW_EXTRALIGHT
+# define APPCMD_FILTERINITS 0x20L
+# define CBF_FAIL_SELFCONNECTIONS 0x1000
+# define CBF_SKIP_ALLNOTIFICATIONS 0x3C0000
+# define CBF_FAIL_ADVISES 0x4000
+# define CBF_FAIL_POKES 0x10000
+# define CBF_FAIL_REQUESTS 0x20000
+# define SZDDESYS_TOPIC "System"
+# define JOHAB_CHARSET 130
+# define MAC_CHARSET 77
+# endif
#endif
#ifndef SPI_GETWHEELSCROLLLINES
#define TEXT_END -1
#define DATA_END -1
#define HEAP_IN_DATA
+#define NO_LIM_DATA
#define UNEXEC "unexcw.o"
#ifdef CYGWIN_VERSION_DLL_MAJOR
#define NO_ARG_ARRAY
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#define WORD_MACHINE
-
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the 24-bit bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
-
/* Data type of load average, as read out of kmem. */
#define LOAD_AVE_TYPE long
/* Text does precede data space, but this is never a safe assumption. */
#define VIRT_ADDR_VARIES
-/* set this if you have a new version of cygwin
-#define DATA_SEG_BITS 0x10000000
-*/
-
/* If you are compiling with a non-C calling convention but need to
declare vararg routines differently, put it here */
#define _VARARGS_ __cdecl
#define DOS_NT /* MSDOS or WINDOWSNT */
#endif
-#define PBS_SMOOTH 0x01
-
#ifdef HAVE_MS_WINDOWS
#define HAVE_NTGUI
#define HAVE_FACES
#define TIME_ONESHOT 0
#define TIME_PERIODIC 1
#define LOCALE_USE_CP_ACP 0x40000000
-#define SHGFI_EXETYPE 0x2000
#define NSIG 23
#ifndef SPI_GETWHEELSCROLLLINES
#ifndef WHEEL_DELTA
#define WHEEL_DELTA 120
#endif
+
+/* this is necessary to get the TCS_* definitions in <commctrl.h> */
+#define _WIN32_IE 0x0400
+
#ifndef WM_MOUSEWHEEL
#define WM_MOUSEWHEEL 0x20A
#endif
+#ifndef TCS_BOTTOM
+#define TCS_BOTTOM 0x0002
+#endif
+#ifndef TCS_VERTICAL
+#define TCS_VERTICAL 0x0080
+#endif
+#ifndef PHYSICALWIDTH
+#define PHYSICALWIDTH 110
+#endif
+#ifndef PHYSICALHEIGHT
+#define PHYSICALHEIGHT 111
+#endif
+#ifndef PHYSICALOFFSETX
+#define PHYSICALOFFSETX 112
+#endif
+#ifndef PHYSICALOFFSETY
+#define PHYSICALOFFSETY 113
+#endif
+#ifndef PBS_SMOOTH
+#define PBS_SMOOTH 0x01
+#endif
/* translate NT world unexec stuff to our a.out definitions */
#define NO_ARG_ARRAY
-/* Define WORD_MACHINE if addresses and such have
- * to be corrected before they can be used as byte counts. */
-
-#define WORD_MACHINE
-
-/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
- the 24-bit bit field into an int. In other words, if bit fields
- are always unsigned.
-
- If you use NO_UNION_TYPE, this flag does not matter. */
-
-#define EXPLICIT_SIGN_EXTEND
/* System calls that are encapsulated */
#define ENCAPSULATE_RENAME
#define ENCAPSULATE_OPEN
/* Text does precede data space, but this is never a safe assumption. */
#define VIRT_ADDR_VARIES
-/* set this if you have a new version of cygwin
-#define DATA_SEG_BITS 0x10000000
-*/
-
/* If you are compiling with a non-C calling convention but need to
declare vararg routines differently, put it here */
#define _VARARGS_ __cdecl
#include <cygwin/version.h>
#endif
-typedef unsigned int MMRESULT;
-typedef struct timecaps_tag {
- unsigned int wPeriodMin;
- unsigned int wPeriodMax;
-} TIMECAPS;
-
/* IO calls that are emulated or shadowed */
#define pipe sys_pipe
int sys_pipe (int * phandles);
/* subprocess calls that are emulated */
#define spawnve sys_spawnve
-int spawnve (int mode, CONST char *cmdname,
- CONST char * CONST *argv, CONST char *CONST *envp);
+int spawnve (int mode, const char *cmdname,
+ const char * const *argv, const char *const *envp);
#define wait sys_wait
int wait (int *status);
#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
uid_t geteuid (void);
gid_t getgid (void);
gid_t getegid (void);
+
+#if CYGWIN_VERSION_DLL_MAJOR <= 21
+#define _ftime ftime
#define _timeb timeb
+#endif
/* Stuff that gets set wrongly or otherwise */
#define HAVE_SETITIMER
#define HAVE_GETTIMEOFDAY
#define HAVE_SELECT
/*#define HAVE_STRUCT_UTIMBUF*/
+#ifndef HAVE_H_ERRNO
+#define HAVE_H_ERRNO
+#endif
+#ifndef HAVE_TZNAME
+#define HAVE_TZNAME
+#endif
#undef GETTIMEOFDAY_ONE_ARGUMENT
#undef HAVE_SYS_WAIT_H
#define USG5_4
#endif
-#undef _POSIX_C_SOURCE
-
-#if OS_RELEASE > 54
-/* There were some bugs with preprocessor symbol interaction, which
- were not fixed until 2.5. */
-#define __EXTENSIONS__ 1
-
-#undef _XOPEN_SOURCE
-#define _XOPEN_SOURCE 1
-
-#undef _XOPEN_SOURCE_EXTENDED
-#define _XOPEN_SOURCE_EXTENDED 1
-#endif /* > Solaris 2.4 */
-
#if OS_RELEASE >= 57
#define HAVE_GETLOADAVG
#endif
#define SIZEOF_SHORT 2
#define SIZEOF_INT 4
#define SIZEOF_LONG 4
-#define SIZEOF_LONG_LONG 8
+#define SIZEOF_LONG_LONG 0
#define SIZEOF_VOID_P 4
/* NOMULTIPLEJOBS should be defined if your system's shell
/* subprocess calls that are emulated */
#ifndef DONT_ENCAPSULATE
#define spawnve sys_spawnve
-int spawnve (int mode, CONST char *cmdname,
- CONST char * CONST *argv, CONST char *CONST *envp);
+int spawnve (int mode, const char *cmdname,
+ const char * const *argv, const char *const *envp);
#endif
/* IO calls that are emulated or shadowed */
#define _WIN32_WINNT 0x0400
#endif
#endif
+
+/* MSVC 6.0 has a mechanism to declare functions which never return */
+#if (_MSC_VER >= 1200)
+#define DOESNT_RETURN __declspec(noreturn) void
+#define DECLARE_DOESNT_RETURN(decl) __declspec(noreturn) extern void decl
+#define DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS(decl,str,idx) \
+ __declspec(noreturn) extern void decl PRINTF_ARGS(str,idx)
+#endif /* MSVC 6.0 */
return;
mirror = find_scrollbar_window_mirror (f, id);
+ if (!mirror)
+ return;
+
win = real_window (mirror, 1);
if (NILP (win))
return;
mirror = find_scrollbar_window_mirror (f, id);
+ if (!mirror)
+ return;
+
win = real_window (mirror, 1);
if (NILP (win))
if (!NILP (w->scrollbar_on_left_p))
{
x_offset = WINDOW_LEFT (w);
- if (window_is_leftmost (w))
- x_offset += FRAME_LEFT_GUTTER_BOUNDS (f);
}
else
{
x_offset = WINDOW_RIGHT (w) - scrollbar_width;
- if (window_is_rightmost (w))
- x_offset -= FRAME_RIGHT_GUTTER_BOUNDS (f);
if (window_needs_vertical_divider (w))
x_offset -= window_divider_width (w);
}
if (!NILP (w->scrollbar_on_top_p))
{
y_offset += WINDOW_TOP (w);
- if (window_is_highest (w))
- y_offset += FRAME_TOP_GUTTER_BOUNDS (f);
}
else
{
char *translate, struct re_registers *regp, int posix,
Error_behavior errb)
{
- CONST char *val;
+ const char *val;
reg_syntax_t old;
cp->regexp = Qnil;
cp->posix = posix;
old = re_set_syntax (RE_SYNTAX_EMACS
| (posix ? 0 : RE_NO_POSIX_BACKTRACKING));
- val = (CONST char *)
+ val = (const char *)
re_compile_pattern ((char *) XSTRING_DATA (pattern),
XSTRING_LENGTH (pattern), &cp->buf);
re_set_syntax (old);
This does not clobber the match data. */
Bytecount
-fast_string_match (Lisp_Object regexp, CONST Bufbyte *nonreloc,
+fast_string_match (Lisp_Object regexp, const Bufbyte *nonreloc,
Lisp_Object reloc, Bytecount offset,
Bytecount length, int case_fold_search,
Error_behavior errb, int no_quit)
#include "console-msw.h"
-DEFUN ("mswindows-set-clipboard", Fmswindows_set_clipboard, 1, 1, 0, /*
-Copy STRING to the mswindows clipboard.
-*/
- (string))
-{
- int rawsize, size, i;
- unsigned char *src, *dst, *next;
- HGLOBAL h = NULL;
- struct frame *f = NULL;
-
- CHECK_STRING (string);
-
- /* Calculate size with LFs converted to CRLFs because
- * CF_TEXT format uses CRLF delimited ASCIIZ */
- src = XSTRING_DATA (string);
- size = rawsize = XSTRING_LENGTH (string) + 1;
- for (i=0; i<rawsize; i++)
- if (src[i] == '\n')
- size++;
-
- f = selected_frame ();
- if (!OpenClipboard (FRAME_MSWINDOWS_HANDLE (f)))
- return Qnil;
-
- if (!EmptyClipboard () ||
- (h = GlobalAlloc (GMEM_MOVEABLE | GMEM_DDESHARE, size)) == NULL ||
- (dst = (unsigned char *) GlobalLock (h)) == NULL)
- {
- if (h != NULL) GlobalFree (h);
- CloseClipboard ();
- return Qnil;
- }
-
- /* Convert LFs to CRLFs */
- do
- {
- /* copy next line or remaining bytes including '\0' */
- next = memccpy (dst, src, '\n', rawsize);
- if (next)
- {
- /* copied one line ending with '\n' */
- int copied = next - dst;
- rawsize -= copied;
- src += copied;
- /* insert '\r' before '\n' */
- next[-1] = '\r';
- next[0] = '\n';
- dst = next+1;
- }
- }
- while (next);
-
- GlobalUnlock (h);
-
- i = (SetClipboardData (CF_TEXT, h) != NULL);
-
- CloseClipboard ();
-
- return i ? Qt : Qnil;
-}
/* Do protocol to assert ourself as a selection owner. Under mswindows
this is easy, we just set the clipboard. */
static Lisp_Object
-mswindows_own_selection (Lisp_Object selection_name, Lisp_Object selection_value)
+mswindows_own_selection (Lisp_Object selection_name,
+ Lisp_Object selection_value)
{
Lisp_Object converted_value = get_local_selection (selection_name, QSTRING);
+
if (!NILP (converted_value) &&
CONSP (converted_value) &&
EQ (XCAR (converted_value), QSTRING) &&
/* pure mswindows behaviour only says we can own the selection
if it is the clipboard */
EQ (selection_name, QCLIPBOARD))
- Fmswindows_set_clipboard (XCDR (converted_value));
+ {
+ int rawsize, size, i;
+ unsigned char *src, *dst, *next;
+ HGLOBAL h = NULL;
+ struct frame *f = NULL;
+ struct gcpro gcpro1, gcpro2;
+ Lisp_Object string = XCDR (converted_value);
- return Qnil;
-}
+ GCPRO2 (converted_value, string);
-DEFUN ("mswindows-get-clipboard", Fmswindows_get_clipboard, 0, 0, 0, /*
-Return the contents of the mswindows clipboard.
-*/
- ())
-{
- HANDLE h;
- unsigned char *src, *dst, *next;
- Lisp_Object ret = Qnil;
+ CHECK_STRING (string);
- if (!OpenClipboard (NULL))
- return Qnil;
+ /* Calculate size with LFs converted to CRLFs because
+ * CF_TEXT format uses CRLF delimited ASCIIZ */
+ src = XSTRING_DATA (string);
+ size = rawsize = XSTRING_LENGTH (string) + 1;
+ for (i=0; i<rawsize; i++)
+ if (src[i] == '\n')
+ size++;
- if ((h = GetClipboardData (CF_TEXT)) != NULL &&
- (src = (unsigned char *) GlobalLock (h)) != NULL)
- {
- int i;
- int size, rawsize;
- size = rawsize = strlen (src);
+ f = selected_frame ();
+ if (!OpenClipboard (FRAME_MSWINDOWS_HANDLE (f)))
+ {
+ UNGCPRO;
+ return Qnil;
+ }
- for (i=0; i<rawsize; i++)
- if (src[i] == '\r' && src[i+1] == '\n')
- size--;
+ /* This call to EmptyClipboard may post an event back to us if
+ we already own the clipboard (to tell us we lost it) and this
+ event may execute random lisp code. Hence we must protect
+ the string and get its address again after the call. */
+ if (!EmptyClipboard () ||
+ (h = GlobalAlloc (GMEM_MOVEABLE | GMEM_DDESHARE, size)) == NULL ||
+ (dst = (unsigned char *) GlobalLock (h)) == NULL)
+ {
+ if (h != NULL) GlobalFree (h);
+ CloseClipboard ();
+ UNGCPRO;
+ return Qnil;
+ }
+ src = XSTRING_DATA (string);
- /* Convert CRLFs to LFs */
- ret = make_uninit_string (size);
- dst = XSTRING_DATA (ret);
+ /* Convert LFs to CRLFs */
do
{
- /* copy next line or remaining bytes excluding '\0' */
- next = memccpy (dst, src, '\r', rawsize);
+ /* copy next line or remaining bytes including '\0' */
+ next = (char*) memccpy (dst, src, '\n', rawsize);
if (next)
{
- /* copied one line ending with '\r' */
+ /* copied one line ending with '\n' */
int copied = next - dst;
rawsize -= copied;
src += copied;
- if (*src == '\n')
- dst += copied - 1; /* overwrite '\r' */
- else
- dst += copied;
+ /* insert '\r' before '\n' */
+ next[-1] = '\r';
+ next[0] = '\n';
+ dst = next+1;
}
}
while (next);
-
+
GlobalUnlock (h);
- }
+
+ i = (SetClipboardData (CF_TEXT, h) != NULL);
+
+ CloseClipboard ();
- CloseClipboard ();
+ UNGCPRO;
+ /* #### we are supposed to return a time! */
+ /* return i ? Qt : Qnil; */
+ return Qnil;
+ }
- return ret;
+ return Qnil;
}
static Lisp_Object
-mswindows_get_foreign_selection (Lisp_Object selection_symbol, Lisp_Object target_type)
+mswindows_get_foreign_selection (Lisp_Object selection_symbol,
+ Lisp_Object target_type)
{
if (EQ (selection_symbol, QCLIPBOARD))
- return Fmswindows_get_clipboard ();
+ {
+ HANDLE h;
+ unsigned char *src, *dst, *next;
+ Lisp_Object ret = Qnil;
+
+ if (!OpenClipboard (NULL))
+ return Qnil;
+
+ if ((h = GetClipboardData (CF_TEXT)) != NULL &&
+ (src = (unsigned char *) GlobalLock (h)) != NULL)
+ {
+ int i;
+ int size, rawsize;
+ size = rawsize = strlen (src);
+
+ for (i=0; i<rawsize; i++)
+ if (src[i] == '\r' && src[i+1] == '\n')
+ size--;
+
+ /* Convert CRLFs to LFs */
+ ret = make_uninit_string (size);
+ dst = XSTRING_DATA (ret);
+ do
+ {
+ /* copy next line or remaining bytes excluding '\0' */
+ next = (unsigned char *) memccpy (dst, src, '\r', rawsize);
+ if (next)
+ {
+ /* copied one line ending with '\r' */
+ int copied = next - dst;
+ rawsize -= copied;
+ src += copied;
+ if (*src == '\n')
+ dst += copied - 1; /* overwrite '\r' */
+ else
+ dst += copied;
+ }
+ }
+ while (next);
+
+ GlobalUnlock (h);
+ }
+
+ CloseClipboard ();
+
+ return ret;
+ }
else
return Qnil;
}
-DEFUN ("mswindows-selection-exists-p", Fmswindows_selection_exists_p, 0, 0, 0, /*
-Whether there is an MS-Windows selection.
-*/
- ())
-{
- return IsClipboardFormatAvailable (CF_TEXT) ? Qt : Qnil;
-}
-
-DEFUN ("mswindows-delete-selection", Fmswindows_delete_selection, 0, 0, 0, /*
-Remove the current MS-Windows selection from the clipboard.
-*/
- ())
+static void
+mswindows_disown_selection (Lisp_Object selection, Lisp_Object timeval)
{
- BOOL success = OpenClipboard (NULL);
- if (success)
+ if (EQ (selection, QCLIPBOARD))
{
- success = EmptyClipboard ();
- /* Close it regardless of whether empty worked. */
- if (!CloseClipboard ())
- success = FALSE;
- }
+ BOOL success = OpenClipboard (NULL);
+ if (success)
+ {
+ success = EmptyClipboard ();
+ /* Close it regardless of whether empty worked. */
+ if (!CloseClipboard ())
+ success = FALSE;
+ }
- return success ? Qt : Qnil;
+ /* #### return success ? Qt : Qnil; */
+ }
}
-static void
-mswindows_disown_selection (Lisp_Object selection, Lisp_Object timeval)
+static Lisp_Object
+mswindows_selection_exists_p (Lisp_Object selection)
{
if (EQ (selection, QCLIPBOARD))
- Fmswindows_delete_selection ();
+ return IsClipboardFormatAvailable (CF_TEXT) ? Qt : Qnil;
+ else
+ return Qnil;
}
\f
{
CONSOLE_HAS_METHOD (mswindows, own_selection);
CONSOLE_HAS_METHOD (mswindows, disown_selection);
+ CONSOLE_HAS_METHOD (mswindows, selection_exists_p);
CONSOLE_HAS_METHOD (mswindows, get_foreign_selection);
}
void
syms_of_select_mswindows (void)
{
- DEFSUBR (Fmswindows_set_clipboard);
- DEFSUBR (Fmswindows_get_clipboard);
- DEFSUBR (Fmswindows_selection_exists_p);
- DEFSUBR (Fmswindows_delete_selection);
}
void
#endif /* CUT_BUFFER_SUPPORT */
{
- CONST char *nameext;
+ const char *nameext;
TO_EXTERNAL_FORMAT (LISP_STRING, Fsymbol_name (sym),
C_STRING_ALLOCA, nameext,
Qctext);
#endif
XmString fmh;
String encoding = "STRING";
- CONST Extbyte *data = XSTRING_DATA (selection_value);
+ const Extbyte *data = XSTRING_DATA (selection_value);
Extcount bytes = XSTRING_LENGTH (selection_value);
#ifdef MULE
{
enum { ASCII, LATIN_1, WORLD } chartypes = ASCII;
- CONST Bufbyte *ptr = data, *end = ptr + bytes;
+ const Bufbyte *ptr = data, *end = ptr + bytes;
/* Optimize for the common ASCII case */
while (ptr <= end)
{
}
else if (STRINGP (obj))
{
- CONST Extbyte *extval;
+ const Extbyte *extval;
Extcount extvallen;
TO_EXTERNAL_FORMAT (LISP_STRING, obj,
{
Bufbyte buf[MAX_EMCHAR_LEN];
Bytecount len;
- CONST Extbyte *extval;
+ const Extbyte *extval;
Extcount extvallen;
*format_ret = 8;
static void
initialize_cut_buffers (Display *display, Window window)
{
- static unsigned CONST char * CONST data = (unsigned CONST char *) "";
+ static unsigned const char * const data = (unsigned const char *) "";
#define FROB(atom) XChangeProperty (display, window, atom, XA_STRING, 8, \
PropModeAppend, data, 0)
FROB (XA_CUT_BUFFER0);
Display *display = DEVICE_X_DISPLAY (d);
Window window = RootWindow (display, 0); /* Cutbuffers are on frame 0 */
Atom cut_buffer_atom;
- CONST Extbyte *data = XSTRING_DATA (string);
+ const Extbyte *data = XSTRING_DATA (string);
Extcount bytes = XSTRING_LENGTH (string);
Extcount bytes_remaining;
int max_bytes = SELECTION_QUANTUM (display);
#ifdef MULE
- CONST Bufbyte *ptr, *end;
+ const Bufbyte *ptr, *end;
enum { ASCII, LATIN_1, WORLD } chartypes = ASCII;
#endif
static int
st_ulaw_to_linear (int u)
{
- static CONST short table[] = {0,132,396,924,1980,4092,8316,16764};
+ static const short table[] = {0,132,396,924,1980,4092,8316,16764};
int u1 = ~u;
short exponent = (u1 >> 4) & 0x07;
int mantissa = u1 & 0x0f;
stdout_out ("you can continue or abort.\n");
#endif /* not SIGTSTP */
stdout_out ("Auto-save? (y or n) ");
- fflush (stdout);
if (((c = getc (stdin)) & ~040) == 'Y')
Fdo_auto_save (Qnil, Qnil);
while (c != '\n')
c = getc (stdin);
stdout_out ("Abort (and dump core)? (y or n) ");
- fflush (stdout);
if (((c = getc (stdin)) & ~040) == 'Y')
abort ();
while (c != '\n')
c = getc (stdin);
stdout_out ("Continuing...\n");
- fflush (stdout);
reinit_initial_console ();
MARK_FRAME_CHANGED (XFRAME (DEVICE_SELECTED_FRAME
(XDEVICE (CONSOLE_SELECTED_DEVICE
#ifdef HAVE_NATIVE_SOUND
# include <netdb.h>
+# include "nativesound.h"
#endif
#ifdef HAVE_ESD_SOUND
Lisp_Object Vnative_sound_only_on_console;
Lisp_Object Q_volume, Q_pitch, Q_duration, Q_sound;
-/* These are defined in the appropriate file (sunplay.c, sgiplay.c,
- or hpplay.c). */
-
-extern void play_sound_file (char *name, int volume);
-extern void play_sound_data (unsigned char *data, int length, int volume);
#ifdef HAVE_NAS_SOUND
extern int nas_play_sound_file (char *name, int volume);
if (DEVICE_CONNECTED_TO_ESD_P (d))
{
char *fileext;
+ int result;
TO_EXTERNAL_FORMAT (LISP_STRING, file,
C_STRING_ALLOCA, fileext,
Qfile_name);
- if (esd_play_sound_file (fileext, vol))
+
+ /* #### ESD uses alarm(). But why should we also stop SIGIO? */
+ stop_interrupts ();
+ result = esd_play_sound_file (fileext, vol);
+ start_interrupts ();
+ if (result)
return Qnil;
}
#endif /* HAVE_ESD_SOUND */
#ifdef HAVE_NATIVE_SOUND
if (NILP (Vnative_sound_only_on_console) || DEVICE_ON_CONSOLE_P (d))
{
- CONST char *fileext;
+ const char *fileext;
TO_EXTERNAL_FORMAT (LISP_STRING, file,
C_STRING_ALLOCA, fileext,
/* variable `sound' is anything that can be a cdr in sound-alist */
Lisp_Object new_volume, pitch, duration, data;
int loop_count = 0;
- int vol, pit, dur;
+ int vol, pit, dur, succes;
struct device *d = decode_device (device);
/* NOTE! You'd better not signal an error in here. */
#ifdef HAVE_NAS_SOUND
if (DEVICE_CONNECTED_TO_NAS_P (d) && STRINGP (sound))
{
- CONST Extbyte *soundext;
+ const Extbyte *soundext;
Extcount soundextlen;
TO_EXTERNAL_FORMAT (LISP_STRING, sound,
TO_EXTERNAL_FORMAT (LISP_STRING, sound, ALLOCA, (soundext, soundextlen),
Qbinary);
- if (esd_play_sound_data (soundext, soundextlen, vol))
- return Qnil;
+
+ /* #### ESD uses alarm(). But why should we also stop SIGIO? */
+ stop_interrupts ();
+ succes = esd_play_sound_data (soundext, soundextlen, vol);
+ start_interrupts ();
+ QUIT;
+ if(succes)
+ return Qnil;
}
#endif /* HAVE_ESD_SOUND */
if ((NILP (Vnative_sound_only_on_console) || DEVICE_ON_CONSOLE_P (d))
&& STRINGP (sound))
{
- CONST Extbyte *soundext;
+ const Extbyte *soundext;
Extcount soundextlen;
TO_EXTERNAL_FORMAT (LISP_STRING, sound,
Qbinary);
/* The sound code doesn't like getting SIGIO interrupts. Unix sucks! */
stop_interrupts ();
- play_sound_data ((unsigned char*)soundext, soundextlen, vol);
+ succes = play_sound_data ((unsigned char*)soundext, soundextlen, vol);
start_interrupts ();
QUIT;
- return Qnil;
+ if (succes)
+ return Qnil;
}
#endif /* HAVE_NATIVE_SOUND */
if (d == last_bell_device && now-last_bell_time < bell_inhibit_time)
return Qnil;
- else if (visible_bell && DEVMETH (d, flash, (d)))
+ else if (!NILP (Vvisible_bell) && DEVMETH (d, flash, (d)))
;
else
Fplay_sound (sound, Qnil, device);
static void
init_nas_sound (struct device *d)
{
- char *error;
-
#ifdef HAVE_X_WINDOWS
if (DEVICE_X_P (d))
{
- error = nas_init_play (DEVICE_X_DISPLAY (d));
- DEVICE_CONNECTED_TO_NAS_P (d) = !error;
+ char *err_message = nas_init_play (DEVICE_X_DISPLAY (d));
+ DEVICE_CONNECTED_TO_NAS_P (d) = !err_message;
/* Print out the message? */
}
#endif /* HAVE_X_WINDOWS */
}
static size_t
-sizeof_specifier (CONST void *header)
+sizeof_specifier (const void *header)
{
if (GHOST_SPECIFIER_P ((Lisp_Specifier *) header))
return offsetof (Lisp_Specifier, data);
else
{
- CONST Lisp_Specifier *p = (CONST Lisp_Specifier *) header;
+ const Lisp_Specifier *p = (const Lisp_Specifier *) header;
return offsetof (Lisp_Specifier, data) + p->methods->extra_data_size;
}
}
TYPE specifies the particular type of specifier, and should be one of
the symbols 'generic, 'integer, 'boolean, 'color, 'font, 'image,
-'face-boolean, or 'toolbar.
-
-For more information on particular types of specifiers, see the functions
-`generic-specifier-p', `integer-specifier-p', `boolean-specifier-p',
-`color-specifier-p', `font-specifier-p', `image-specifier-p',
-`face-boolean-specifier-p', and `toolbar-specifier-p'.
+'face-boolean, 'gutter, 'gutter-size, 'gutter-visible or 'toolbar.
+
+For more information on particular types of specifiers, see the
+functions `generic-specifier-p', `integer-specifier-p',
+`boolean-specifier-p', `color-specifier-p', `font-specifier-p',
+`image-specifier-p', `face-boolean-specifier-p', `gutter-specifier-p,
+`gutter-size-specifier-p, `gutter-visible-specifier-p and
+`toolbar-specifier-p'.
*/
(type))
{
method. */
location = (Lisp_Object *)
((char *) w + XSPECIFIER (specifier)->caching->offset_into_struct_window);
+ /* #### What's the point of this check, other than to optimize image
+ instance instantiation? Unless you specify a caching instantiate
+ method the instantiation that specifier_instance will do will
+ always create a new copy. Thus EQ will always fail. Unfortunately
+ calling equal is no good either as this doesn't take into account
+ things attached to the specifier - for instance strings on
+ extents. --andyp */
if (!EQ (newval, *location))
{
Lisp_Object oldval = *location;
void
syms_of_specifier (void)
{
+ INIT_LRECORD_IMPLEMENTATION (specifier);
+
defsymbol (&Qspecifierp, "specifierp");
defsymbol (&Qconsole_type, "console-type");
struct specifier_methods
{
- CONST char *name;
+ const char *name;
Lisp_Object predicate_symbol;
/* Implementation specific methods: */
#ifdef ERROR_CHECK_TYPECHECK
#define DECLARE_SPECIFIER_TYPE(type) \
extern struct specifier_methods * type##_specifier_methods; \
-INLINE struct type##_specifier * \
+INLINE_HEADER struct type##_specifier * \
error_check_##type##_specifier_data (Lisp_Specifier *sp); \
-INLINE struct type##_specifier * \
+INLINE_HEADER struct type##_specifier * \
error_check_##type##_specifier_data (Lisp_Specifier *sp) \
{ \
if (SPECIFIERP (sp->magic_parent)) \
assert (SPECIFIER_TYPE_P (sp, type)); \
return (struct type##_specifier *) sp->data; \
} \
-INLINE Lisp_Specifier * \
+INLINE_HEADER Lisp_Specifier * \
error_check_##type##_specifier_type (Lisp_Object obj); \
-INLINE Lisp_Specifier * \
+INLINE_HEADER Lisp_Specifier * \
error_check_##type##_specifier_type (Lisp_Object obj) \
{ \
Lisp_Specifier *sp = XSPECIFIER (obj); \
} \
DECLARE_NOTHING
#else
-#define DECLARE_SPECIFIER_TYPE(type) \
+#define DECLARE_SPECIFIER_TYPE(type) \
extern struct specifier_methods * type##_specifier_methods
#endif /* ERROR_CHECK_TYPECHECK */
-#define DEFINE_SPECIFIER_TYPE(type) \
+#define DEFINE_SPECIFIER_TYPE(type) \
struct specifier_methods * type##_specifier_methods
#define INITIALIZE_SPECIFIER_TYPE(type, obj_name, pred_sym) do { \
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); \
+ 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 { \
+#define REINITIALIZE_SPECIFIER_TYPE(type) do { \
staticpro_nodump (&type##_specifier_methods->predicate_symbol); \
} while (0)
# define XSETSPECIFIER_TYPE(x, p, type) XSETSPECIFIER (x, p)
#endif /* ERROR_CHECK_TYPE_CHECK */
-#define SPECIFIER_TYPEP(x, type) \
+#define SPECIFIER_TYPEP(x, type) \
(SPECIFIERP (x) && SPECIFIER_TYPE_P (XSPECIFIER (x), type))
#define CHECK_SPECIFIER_TYPE(x, type) do { \
CHECK_SPECIFIER (x); \
the string! This will core dump if the memory following the last byte is
not mapped.
- Here is a correct version from glibc 1.09.
+ Here is a correct version from, glibc 1.09.
*/
char *strcat (char *dest, const char *src);
/* Append SRC on the end of DEST. */
-/* CONST IS LOSING, but const is part of the interface of strcat */
char *
strcat (char *dest, const char *src)
{
REGISTER char *s1 = dest;
- REGISTER CONST char *s2 = src;
+ REGISTER const char *s2 = src;
char c;
/* Find the end of the string. */
#define HIGH_BIT_P(c) ((c) & hi_bit)
#define HAS_ZERO(c) (((((c) + magic) ^ (c)) & not_magic) != not_magic)
-/* CONST IS LOSING, but const is part of the interface of strcmp */
int
strcmp (const char *x, const char *y)
{
return 0;
else if (ALIGNED (x) && ALIGNED (y))
{
- CONST unsigned long *x1 = (CONST unsigned long *) x;
- CONST unsigned long *y1 = (CONST unsigned long *) y;
+ const unsigned long *x1 = (const unsigned long *) x;
+ const unsigned long *y1 = (const unsigned long *) y;
unsigned long c;
unsigned long magic = MAGIC;
unsigned long not_magic = ~magic;
return 0;
else
{
- x = (CONST char *) x1;
- y = (CONST char *) y1;
+ x = (const char *) x1;
+ y = (const char *) y1;
goto slow_loop;
}
}
y1++;
}
- x = (CONST char *) x1;
- y = (CONST char *) y1;
+ x = (const char *) x1;
+ y = (const char *) y1;
goto slow_loop;
}
else
int
-strncmp (CONST char *x, CONST char *y, size_t n)
+strncmp (const char *x, const char *y, size_t n)
{
if ((x == y) || (n <= 0))
return 0;
else if (ALIGNED (x) && ALIGNED (y))
{
- CONST unsigned long *x1 = (CONST unsigned long *) x;
- CONST unsigned long *y1 = (CONST unsigned long *) y;
+ const unsigned long *x1 = (const unsigned long *) x;
+ const unsigned long *y1 = (const unsigned long *) y;
unsigned long c;
unsigned long magic = MAGIC;
unsigned long not_magic = ~magic;
return 0;
else
{
- x = (CONST char *) x1;
- y = (CONST char *) y1;
+ x = (const char *) x1;
+ y = (const char *) y1;
goto slow_loop;
}
}
y1++;
}
- x = (CONST char *) x1;
- y = (CONST char *) y1;
+ x = (const char *) x1;
+ y = (const char *) y1;
goto slow_loop;
}
else
#define HIGH_BIT_P(c) ((c) & hi_bit)
#define HAS_ZERO(c) (((((c) + magic) ^ (c)) & not_magic) != not_magic)
-/* CONST IS LOSING, but const is part of the interface of strcpy */
char *
strcpy (char *to, const char *from)
{
if (HAS_ZERO(c))
{
to = (char *) to1;
- from = (CONST char *) from1;
+ from = (const char *) from1;
goto slow_loop;
}
else
none, blank, zero
};
-static char CONST* CONST days[] =
+static char const* const days[] =
{
"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
};
-static char CONST * CONST months[] =
+static char const * const months[] =
{
"January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"
/* Like strncpy except return the number of characters copied. */
static int
-add_str (char *to, CONST char *from, int max)
+add_str (char *to, const char *from, int max)
{
int i;
starting on Sundays. */
static int
-sun_week (CONST struct tm *tm)
+sun_week (const struct tm *tm)
{
int dl;
starting on Mondays. */
static int
-mon_week (CONST struct tm *tm)
+mon_week (const struct tm *tm)
{
int dl, wday;
#if !defined(HAVE_TM_ZONE) && !defined(HAVE_TZNAME)
char *
-zone_name (CONST struct tm *tp)
+zone_name (const struct tm *tp)
{
char *timezone ();
struct timeval tv;
that were put into STRING, or 0 if the length would have
exceeded MAX. */
-size_t strftime (char *string, size_t max, CONST char *format,
- CONST struct tm *tm);
+size_t strftime (char *string, size_t max, const char *format,
+ const struct tm *tm);
size_t
-strftime (char *string, size_t max, CONST char *format, CONST struct tm *tm)
+strftime (char *string, size_t max, const char *format, const struct tm *tm)
{
enum padding pad; /* Type of padding to apply. */
size_t length = 0; /* Characters put in STRING so far. */
#include <stdlib.h>
-size_t mbstowcs (wchar_t *foo, CONST char *bar, size_t baz)
+size_t mbstowcs (wchar_t *foo, const char *bar, size_t baz)
{
abort ();
return 0;
}
-size_t wcstombs (char *foo, CONST wchar_t *bar, size_t baz)
+size_t wcstombs (char *foo, const wchar_t *bar, size_t baz)
{
abort ();
return 0;
#include <sys/fcntl.h>
#include <sys/file.h>
-/* libaudio.h includes a header which defines CONST. We temporarily
- undefine it in order to eliminate a compiler warning. Yes, this is
- a gross hack. */
-#undef CONST
#include <multimedia/libaudio.h>
#include <multimedia/audio_device.h>
-#undef CONST
-#define CONST const
#ifdef emacs
# include <config.h>
# include "lisp.h"
# include "sysdep.h"
# include <errno.h>
+# include "nativesound.h"
#include "syssignal.h"
# define perror(string) \
message("audio: %s, %s ", string, strerror (errno))
#define audio_open() open ("/dev/audio", (O_WRONLY | O_NONBLOCK), 0)
+static int initialized_device_p;
static int reset_volume_p, reset_device_p;
static double old_volume;
static Audio_hdr dev_hdr;
-void play_sound_file (char *name, int volume);
-void play_sound_data (unsigned char *data, int length, int volume);
-
static int
init_device (int volume, unsigned char *data, int fd,
unsigned int *header_length)
audio_flush_play (audio_fd);
- if (0 != audio_cmp_hdr (&dev_hdr, &file_hdr))
+ if (!initialized_device_p || (0 != audio_cmp_hdr (&dev_hdr, &file_hdr)))
{
Audio_hdr new_hdr;
new_hdr = file_hdr;
reset_device_p = 1;
+ initialized_device_p = 1;
if (AUDIO_SUCCESS != audio_set_play_config (audio_fd, &new_hdr))
{
char buf1 [100], buf2 [100], buf3 [250];
}
-void
+int
play_sound_data (unsigned char *data, int length, int volume)
{
int wrtn, start = 0;
unsigned int ilen;
+ int result = 0;
audio_fd = -1;
- if (length == 0) return;
+ if (length == 0) return 0;
/* this is just to get a better error message */
if (strncmp (".snd\0", (char *) data, 4))
audio_fd = audio_open ();
if (audio_fd < 0)
- {
- perror ("open /dev/audio");
- return;
- }
+ return 0;
/* where to find the proto for signal()... */
sighup_handler = (SIGTYPE (*) (int)) signal (SIGHUP, sighandler);
goto END_OF_PLAY;
}
+ result = 1;
+
END_OF_PLAY:
if (audio_fd > 0)
signal (SIGHUP, sighup_handler);
signal (SIGINT, sigint_handler);
+
+ return result;
}
/* #### sigcontext doesn't exist in Solaris. This should be updated
to be correct for Solaris. */
-static void
+static SIGTYPE
sighandler (int sig)
{
if (audio_fd > 0)
{ XD_END }
};
-DEFINE_BASIC_LRECORD_IMPLEMENTATION ("symbol", symbol,
- mark_symbol, print_symbol, 0, 0, 0,
- symbol_description, Lisp_Symbol);
+/* Symbol plists are directly accessible, so we need to protect against
+ invalid property list structure */
+
+static Lisp_Object
+symbol_getprop (Lisp_Object symbol, Lisp_Object property)
+{
+ return external_plist_get (&XSYMBOL (symbol)->plist, property, 0, ERROR_ME);
+}
+
+static int
+symbol_putprop (Lisp_Object symbol, Lisp_Object property, Lisp_Object value)
+{
+ external_plist_put (&XSYMBOL (symbol)->plist, property, value, 0, ERROR_ME);
+ return 1;
+}
+
+static int
+symbol_remprop (Lisp_Object symbol, Lisp_Object property)
+{
+ return external_remprop (&XSYMBOL (symbol)->plist, property, 0, ERROR_ME);
+}
+
+DEFINE_BASIC_LRECORD_IMPLEMENTATION_WITH_PROPS ("symbol", symbol,
+ mark_symbol, print_symbol,
+ 0, 0, 0, symbol_description,
+ symbol_getprop,
+ symbol_putprop,
+ symbol_remprop,
+ Fsymbol_plist,
+ Lisp_Symbol);
\f
/**********************************************************************/
}
Lisp_Object
-intern (CONST char *str)
+intern (const char *str)
{
Bytecount len = strlen (str);
- CONST Bufbyte *buf = (CONST Bufbyte *) str;
+ const Bufbyte *buf = (const Bufbyte *) str;
Lisp_Object obarray = Vobarray;
if (!VECTORP (obarray) || XVECTOR_LENGTH (obarray) == 0)
Also store the bucket number in oblookup_last_bucket_number. */
Lisp_Object
-oblookup (Lisp_Object obarray, CONST Bufbyte *ptr, Bytecount size)
+oblookup (Lisp_Object obarray, const Bufbyte *ptr, Bytecount size)
{
int hash, obsize;
Lisp_Symbol *tail;
#if 0 /* Emacs 19.34 */
int
-hash_string (CONST Bufbyte *ptr, Bytecount len)
+hash_string (const Bufbyte *ptr, Bytecount len)
{
- CONST Bufbyte *p = ptr;
- CONST Bufbyte *end = p + len;
+ const Bufbyte *p = ptr;
+ const Bufbyte *end = p + len;
Bufbyte c;
int hash = 0;
/* derived from hashpjw, Dragon Book P436. */
int
-hash_string (CONST Bufbyte *ptr, Bytecount len)
+hash_string (const Bufbyte *ptr, Bytecount len)
{
int hash = 0;
DEFINE_LRECORD_IMPLEMENTATION ("symbol-value-forward",
symbol_value_forward,
- this_one_is_unmarkable,
+ 0,
print_symbol_value_magic, 0, 0, 0,
symbol_value_forward_description,
struct symbol_value_forward);
do_symval_forwarding (Lisp_Object valcontents, struct buffer *buffer,
struct console *console)
{
- CONST struct symbol_value_forward *fwd;
+ const struct symbol_value_forward *fwd;
if (!SYMBOL_VALUE_MAGIC_P (valcontents))
return valcontents;
or symbol-value-buffer-local, and if there's a handler, we should
have already called it. */
Lisp_Object valcontents = fetch_value_maybe_past_magic (sym, Qt);
- CONST struct symbol_value_forward *fwd
+ const struct symbol_value_forward *fwd
= XSYMBOL_VALUE_FORWARD (valcontents);
int offset = ((char *) symbol_value_forward_forward (fwd)
- (char *) &buffer_local_flags);
or symbol-value-buffer-local, and if there's a handler, we should
have already called it. */
Lisp_Object valcontents = fetch_value_maybe_past_magic (sym, Qt);
- CONST struct symbol_value_forward *fwd
+ const struct symbol_value_forward *fwd
= XSYMBOL_VALUE_FORWARD (valcontents);
int offset = ((char *) symbol_value_forward_forward (fwd)
- (char *) &console_local_flags);
}
else
{
- CONST struct symbol_value_forward *fwd = XSYMBOL_VALUE_FORWARD (ovalue);
+ const struct symbol_value_forward *fwd = XSYMBOL_VALUE_FORWARD (ovalue);
int (*magicfun) (Lisp_Object simm, Lisp_Object *val,
Lisp_Object in_object, int flags)
= symbol_value_forward_magicfun (fwd);
case SYMVAL_CURRENT_BUFFER_FORWARD:
{
- CONST struct symbol_value_forward *fwd
+ const struct symbol_value_forward *fwd
= XSYMBOL_VALUE_FORWARD (valcontents);
int mask = XINT (*((Lisp_Object *)
symbol_value_forward_forward (fwd)));
case SYMVAL_SELECTED_CONSOLE_FORWARD:
{
- CONST struct symbol_value_forward *fwd
+ const struct symbol_value_forward *fwd
= XSYMBOL_VALUE_FORWARD (valcontents);
int mask = XINT (*((Lisp_Object *)
symbol_value_forward_forward (fwd)));
case SYMVAL_CURRENT_BUFFER_FORWARD:
{
- CONST struct symbol_value_forward *fwd
+ const struct symbol_value_forward *fwd
= XSYMBOL_VALUE_FORWARD (valcontents);
return (*((Lisp_Object *)((char *) XBUFFER (Vbuffer_defaults)
+ ((char *)symbol_value_forward_forward (fwd)
case SYMVAL_SELECTED_CONSOLE_FORWARD:
{
- CONST struct symbol_value_forward *fwd
+ const struct symbol_value_forward *fwd
= XSYMBOL_VALUE_FORWARD (valcontents);
return (*((Lisp_Object *)((char *) XCONSOLE (Vconsole_defaults)
+ ((char *)symbol_value_forward_forward (fwd)
case SYMVAL_CURRENT_BUFFER_FORWARD:
{
- CONST struct symbol_value_forward *fwd
+ const struct symbol_value_forward *fwd
= XSYMBOL_VALUE_FORWARD (valcontents);
int offset = ((char *) symbol_value_forward_forward (fwd)
- (char *) &buffer_local_flags);
case SYMVAL_SELECTED_CONSOLE_FORWARD:
{
- CONST struct symbol_value_forward *fwd
+ const struct symbol_value_forward *fwd
= XSYMBOL_VALUE_FORWARD (valcontents);
int offset = ((char *) symbol_value_forward_forward (fwd)
- (char *) &console_local_flags);
case SYMVAL_CURRENT_BUFFER_FORWARD:
{
- CONST struct symbol_value_forward *fwd
+ const struct symbol_value_forward *fwd
= XSYMBOL_VALUE_FORWARD (valcontents);
int mask = XINT (*((Lisp_Object *)
symbol_value_forward_forward (fwd)));
#endif
/* some losing systems can't have static vars at function scope... */
-static struct symbol_value_magic guts_of_unbound_marker =
- { { symbol_value_forward_lheader_initializer, 0, 69},
- SYMVAL_UNBOUND_MARKER };
+static const struct symbol_value_magic guts_of_unbound_marker =
+{ /* struct symbol_value_magic */
+ { /* struct lcrecord_header */
+ { /* struct lrecord_header */
+ lrecord_type_symbol_value_forward, /* lrecord_type_index */
+ 1, /* mark bit */
+ 1, /* c_readonly bit */
+ 1, /* lisp_readonly bit */
+ },
+ 0, /* next */
+ 0, /* uid */
+ 0, /* free */
+ },
+ 0, /* value */
+ SYMVAL_UNBOUND_MARKER
+};
void
init_symbols_once_early (void)
{
+ INIT_LRECORD_IMPLEMENTATION (symbol);
+ INIT_LRECORD_IMPLEMENTATION (symbol_value_forward);
+ INIT_LRECORD_IMPLEMENTATION (symbol_value_buffer_local);
+ INIT_LRECORD_IMPLEMENTATION (symbol_value_lisp_magic);
+ INIT_LRECORD_IMPLEMENTATION (symbol_value_varalias);
+
reinit_symbols_once_early ();
/* Bootstrapping problem: Qnil isn't set when make_string_nocopy is
called the first time. */
- Qnil = Fmake_symbol (make_string_nocopy ((CONST Bufbyte *) "nil", 3));
+ Qnil = Fmake_symbol (make_string_nocopy ((const Bufbyte *) "nil", 3));
XSYMBOL (Qnil)->name->plist = Qnil;
XSYMBOL (Qnil)->value = Qnil; /* Nihil ex nihil */
XSYMBOL (Qnil)->plist = Qnil;
{
/* Required to get around a GCC syntax error on certain
architectures */
- struct symbol_value_magic *tem = &guts_of_unbound_marker;
+ const struct symbol_value_magic *tem = &guts_of_unbound_marker;
XSETSYMBOL_VALUE_MAGIC (Qunbound, tem);
}
- if ((CONST void *) XPNTR (Qunbound) !=
- (CONST void *)&guts_of_unbound_marker)
- {
- /* This might happen on DATA_SEG_BITS machines. */
- /* abort (); */
- /* Can't represent a pointer to constant C data using a Lisp_Object.
- So heap-allocate it. */
- struct symbol_value_magic *urk = xnew (struct symbol_value_magic);
- memcpy (urk, &guts_of_unbound_marker, sizeof (*urk));
- XSETSYMBOL_VALUE_MAGIC (Qunbound, urk);
- }
XSYMBOL (Qnil)->function = Qunbound;
}
void
-defsymbol_nodump (Lisp_Object *location, CONST char *name)
+defsymbol_nodump (Lisp_Object *location, const char *name)
{
- *location = Fintern (make_string_nocopy ((CONST Bufbyte *) name,
+ *location = Fintern (make_string_nocopy ((const Bufbyte *) name,
strlen (name)),
Qnil);
staticpro_nodump (location);
}
void
-defsymbol (Lisp_Object *location, CONST char *name)
+defsymbol (Lisp_Object *location, const char *name)
{
- *location = Fintern (make_string_nocopy ((CONST Bufbyte *) name,
+ *location = Fintern (make_string_nocopy ((const Bufbyte *) name,
strlen (name)),
Qnil);
staticpro (location);
}
void
-defkeyword (Lisp_Object *location, CONST char *name)
+defkeyword (Lisp_Object *location, const char *name)
{
defsymbol (location, name);
Fset (*location, *location);
if (initialized) { \
Lisp_Subr *newsubr = (Lisp_Subr *) xmalloc (sizeof (Lisp_Subr)); \
memcpy (newsubr, subr, sizeof (Lisp_Subr)); \
- subr->doc = (CONST char *)newsubr; \
+ subr->doc = (const char *)newsubr; \
subr = newsubr; \
} \
} while (0)
}
void
-deferror (Lisp_Object *symbol, CONST char *name, CONST char *messuhhj,
+deferror (Lisp_Object *symbol, const char *name, const char *messuhhj,
Lisp_Object inherits_from)
{
Lisp_Object conds;
/* Create and initialize a Lisp variable whose value is forwarded to C data */
void
-defvar_magic (CONST char *symbol_name, CONST struct symbol_value_forward *magic)
+defvar_magic (const char *symbol_name, const struct symbol_value_forward *magic)
{
- Lisp_Object sym, kludge;
-
- /* Check that `magic' points somewhere we can represent as a Lisp pointer */
- XSETOBJ (kludge, Lisp_Type_Record, magic);
- if ((void *)magic != (void*) XPNTR (kludge))
- {
- /* This might happen on DATA_SEG_BITS machines. */
- /* abort (); */
- /* Copy it to somewhere which is representable. */
- struct symbol_value_forward *p = xnew (struct symbol_value_forward);
- memcpy (p, magic, sizeof *magic);
- magic = p;
- }
+ Lisp_Object sym;
#if defined(HAVE_SHLIB)
/*
sym = Fintern (build_string (symbol_name), Qnil);
else
#endif
- sym = Fintern (make_string_nocopy ((CONST Bufbyte *) symbol_name,
+ sym = Fintern (make_string_nocopy ((const Bufbyte *) symbol_name,
strlen (symbol_name)), Qnil);
XSETOBJ (XSYMBOL (sym)->value, Lisp_Type_Record, magic);
struct symbol_value_magic
{
struct lcrecord_header lcheader;
+ void *value;
enum symbol_value_type type;
};
-#define SYMBOL_VALUE_MAGIC_P(x) \
- (LRECORDP (x) \
- && (XRECORD_LHEADER_IMPLEMENTATION (x)->printer \
- == print_symbol_value_magic))
+#define SYMBOL_VALUE_MAGIC_P(x) \
+(LRECORDP (x) && \
+ XRECORD_LHEADER (x)->type <= lrecord_type_max_symbol_value_magic)
#define XSYMBOL_VALUE_MAGIC_TYPE(v) \
(((struct symbol_value_magic *) XPNTR (v))->type)
#define XSETSYMBOL_VALUE_MAGIC(s, p) XSETOBJ (s, Lisp_Type_Record, p)
DECLARE_LRECORD (symbol_value_forward, struct symbol_value_forward);
#define XSYMBOL_VALUE_FORWARD(x) \
XRECORD (x, symbol_value_forward, struct symbol_value_forward)
-#define symbol_value_forward_forward(m) ((void *)((m)->magic.lcheader.next))
+#define symbol_value_forward_forward(m) ((void *)((m)->magic.value))
#define symbol_value_forward_magicfun(m) ((m)->magicfun)
/* 2. symbol-value-buffer-local */
void defsubr_macro (Lisp_Subr *);
#define DEFSUBR_MACRO(Fname) defsubr_macro (&S##Fname)
-void defsymbol (Lisp_Object *location, CONST char *name);
-void defsymbol_nodump (Lisp_Object *location, CONST char *name);
+void 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 defkeyword (Lisp_Object *location, const char *name);
-void deferror (Lisp_Object *symbol, CONST char *name,
- CONST char *message, Lisp_Object inherits_from);
+void deferror (Lisp_Object *symbol, const char *name,
+ const char *message, Lisp_Object inherits_from);
/* Macros we use to define forwarded Lisp variables.
These are used in the syms_of_FILENAME functions. */
-void defvar_magic (CONST char *symbol_name, CONST struct symbol_value_forward *magic);
-
-#define symbol_value_forward_lheader_initializer { 1, 0, 0, 0 }
+void defvar_magic (const char *symbol_name, const struct symbol_value_forward *magic);
#define DEFVAR_SYMVAL_FWD(lname, c_location, forward_type, magicfun) do { \
- static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \
- = { { { symbol_value_forward_lheader_initializer, \
- (struct lcrecord_header *) (c_location), 69 }, \
- forward_type }, magicfun }; \
+ static const struct symbol_value_forward I_hate_C = \
+ { /* struct symbol_value_forward */ \
+ { /* struct symbol_value_magic */ \
+ { /* struct lcrecord_header */ \
+ { /* struct lrecord_header */ \
+ lrecord_type_symbol_value_forward, /* lrecord_type_index */ \
+ 1, /* mark bit */ \
+ 1, /* c_readonly bit */ \
+ 1 /* lisp_readonly bit */ \
+ }, \
+ 0, /* next */ \
+ 0, /* uid */ \
+ 0 /* free */ \
+ }, \
+ c_location, \
+ forward_type \
+ }, \
+ magicfun \
+ }; \
defvar_magic ((lname), &I_hate_C); \
} while (0)
+#define DEFVAR_SYMVAL_FWD_INT(lname, c_location, forward_type, magicfun) do{ \
+ DEFVAR_SYMVAL_FWD (lname, c_location, forward_type, magicfun); \
+ dumpopaque (c_location, sizeof(int)); \
+} while (0)
+
#define DEFVAR_SYMVAL_FWD_OBJECT(lname, c_location, forward_type, magicfun) do{ \
DEFVAR_SYMVAL_FWD (lname, c_location, forward_type, magicfun); \
staticpro (c_location); \
#define DEFVAR_SPECIFIER(lname, c_location) \
DEFVAR_SYMVAL_FWD_OBJECT (lname, c_location, SYMVAL_CONST_SPECIFIER_FORWARD, 0)
#define DEFVAR_INT(lname, c_location) \
- DEFVAR_SYMVAL_FWD (lname, c_location, SYMVAL_FIXNUM_FORWARD, 0)
+ DEFVAR_SYMVAL_FWD_INT (lname, c_location, SYMVAL_FIXNUM_FORWARD, 0)
#define DEFVAR_CONST_INT(lname, c_location) \
- DEFVAR_SYMVAL_FWD (lname, c_location, SYMVAL_CONST_FIXNUM_FORWARD, 0)
+ DEFVAR_SYMVAL_FWD_INT (lname, c_location, SYMVAL_CONST_FIXNUM_FORWARD, 0)
#define DEFVAR_BOOL(lname, c_location) \
- DEFVAR_SYMVAL_FWD (lname, c_location, SYMVAL_BOOLEAN_FORWARD, 0)
+ DEFVAR_SYMVAL_FWD_INT (lname, c_location, SYMVAL_BOOLEAN_FORWARD, 0)
#define DEFVAR_CONST_BOOL(lname, c_location) \
- DEFVAR_SYMVAL_FWD (lname, c_location, SYMVAL_CONST_BOOLEAN_FORWARD, 0)
+ DEFVAR_SYMVAL_FWD_INT (lname, c_location, SYMVAL_CONST_BOOLEAN_FORWARD, 0)
#define DEFVAR_LISP_MAGIC(lname, c_location, magicfun) \
DEFVAR_SYMVAL_FWD_OBJECT (lname, c_location, SYMVAL_OBJECT_FORWARD, magicfun)
#define DEFVAR_INT_MAGIC(lname, c_location, magicfun) \
- DEFVAR_SYMVAL_FWD (lname, c_location, SYMVAL_FIXNUM_FORWARD, magicfun)
+ DEFVAR_SYMVAL_FWD_INT (lname, c_location, SYMVAL_FIXNUM_FORWARD, magicfun)
#define DEFVAR_BOOL_MAGIC(lname, c_location, magicfun) \
- DEFVAR_SYMVAL_FWD (lname, c_location, SYMVAL_BOOLEAN_FORWARD, magicfun)
+ DEFVAR_SYMVAL_FWD_INT (lname, c_location, SYMVAL_BOOLEAN_FORWARD, magicfun)
#endif /* INCLUDED_symeval_h_ */
void syms_of_window (void);
void syms_of_select_x (void);
void syms_of_eldap (void);
+void syms_of_postgresql (void);
void syms_of_gpmevent (void);
/* Initialize the console types (dump-time but for reinit_). */
void reinit_vars_of_extents (void);
void vars_of_faces (void);
void vars_of_fileio (void);
+void reinit_vars_of_fileio (void);
void vars_of_filelock (void);
void vars_of_floatfns (void);
void vars_of_font_lock (void);
void vars_of_select_x (void);
void reinit_vars_of_select_x (void);
void vars_of_eldap (void);
+void vars_of_postgresql (void);
void vars_of_gpmevent (void);
/* Initialize specifier variables (dump-time only). */
void init_buffer (void);
void init_callproc (void);
-void init_console_stream (void);
+void init_console_stream (int reinit);
void init_device_tty (void);
void init_dosfns (void);
void init_editfns (void);
into the code it signifies.
This is used by modify-syntax-entry, and other things. */
-CONST unsigned char syntax_spec_code[0400] =
+const unsigned char syntax_spec_code[0400] =
{ 0377, 0377, 0377, 0377, 0377, 0377, 0377, 0377,
0377, 0377, 0377, 0377, 0377, 0377, 0377, 0377,
0377, 0377, 0377, 0377, 0377, 0377, 0377, 0377,
0377, 0377, 0377, 0377, 0377, 0377, 0377, 0377
};
-CONST unsigned char syntax_code_spec[] = " .w_()'\"$\\/<>@";
+const unsigned char syntax_code_spec[] = " .w_()'\"$\\/<>@";
DEFUN ("syntax-designator-chars", Fsyntax_designator_chars, 0, 0, 0, /*
Return a string of the recognized syntax designator chars.
Lisp_Object
syntax_match (Lisp_Object table, Emchar ch)
{
- Lisp_Object code = CHAR_TABLE_VALUE_UNSAFE (XCHAR_TABLE (table), ch);
+ Lisp_Object code = XCHAR_TABLE_VALUE_UNSAFE (table, ch);
Lisp_Object code2 = code;
if (CONSP (code))
code2 = XCAR (code);
if (SYNTAX_FROM_CODE (XINT (code2)) == Sinherit)
- code = CHAR_TABLE_VALUE_UNSAFE (XCHAR_TABLE (Vstandard_syntax_table),
- ch);
+ code = XCHAR_TABLE_VALUE_UNSAFE (Vstandard_syntax_table, ch);
return CONSP (code) ? XCDR (code) : Qnil;
}
ch0 = BUF_FETCH_CHAR (buf, from);
code = SYNTAX_UNSAFE (mirrortab, ch0);
+ from++;
if (words_include_escapes
&& (code == Sescape || code == Scharquote))
break;
if (code == Sword)
break;
-
- from++;
}
QUIT;
ch1 = BUF_FETCH_CHAR (buf, from - 1);
code = SYNTAX_UNSAFE (mirrortab, ch1);
+
+ from--;
if (words_include_escapes
&& (code == Sescape || code == Scharquote))
break;
if (code == Sword)
break;
-
- from--;
}
QUIT;
}
static void
-define_standard_syntax (CONST char *p, enum syntaxcode syn)
+define_standard_syntax (const char *p, enum syntaxcode syn)
{
for (; *p; p++)
Fput_char_table (make_char (*p), make_int (syn), Vstandard_syntax_table);
complex_vars_of_syntax (void)
{
Emchar i;
- CONST char *p;
+ 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 */
#define SYNTAX_CODE_UNSAFE(table, c) \
XINT (CHAR_TABLE_VALUE_UNSAFE (table, c))
-INLINE int SYNTAX_CODE (Lisp_Char_Table *table, Emchar c);
-INLINE int
+INLINE_HEADER int SYNTAX_CODE (Lisp_Char_Table *table, Emchar c);
+INLINE_HEADER int
SYNTAX_CODE (Lisp_Char_Table *table, Emchar c)
{
return SYNTAX_CODE_UNSAFE (table, c);
#define SYNTAX_FROM_CODE(code) ((enum syntaxcode) ((code) & 0177))
#define SYNTAX(table, c) SYNTAX_FROM_CODE (SYNTAX_CODE (table, c))
-INLINE int WORD_SYNTAX_P (Lisp_Char_Table *table, Emchar c);
-INLINE int
+INLINE_HEADER int WORD_SYNTAX_P (Lisp_Char_Table *table, Emchar c);
+INLINE_HEADER int
WORD_SYNTAX_P (Lisp_Char_Table *table, Emchar c)
{
return SYNTAX (table, c) == Sword;
#define SYNTAX_SECOND_CHAR_END 0x03
#define SYNTAX_SECOND_CHAR 0x33
-#define SYNTAX_START_P(table, a, b) \
- ((SYNTAX_COMMENT_BITS (table, a) & SYNTAX_FIRST_CHAR_START) \
- && (SYNTAX_COMMENT_BITS (table, b) & SYNTAX_SECOND_CHAR_START))
-#define SYNTAX_END_P(table, a, b) \
- ((SYNTAX_COMMENT_BITS (table, a) & SYNTAX_FIRST_CHAR_END) \
- && (SYNTAX_COMMENT_BITS (table, b) & SYNTAX_SECOND_CHAR_END))
+/* #### These are now more or less equivalent to
+ SYNTAX_COMMENT_MATCH_START ...*/
+/* a and b must be first and second start chars for a common type */
+#define SYNTAX_START_P(table, a, b) \
+ (((SYNTAX_COMMENT_BITS (table, a) & SYNTAX_FIRST_CHAR_START) >> 2) \
+ & (SYNTAX_COMMENT_BITS (table, b) & SYNTAX_SECOND_CHAR_START))
+
+/* ... and SYNTAX_COMMENT_MATCH_END */
+/* a and b must be first and second end chars for a common type */
+#define SYNTAX_END_P(table, a, b) \
+ (((SYNTAX_COMMENT_BITS (table, a) & SYNTAX_FIRST_CHAR_END) >> 2) \
+ & (SYNTAX_COMMENT_BITS (table, b) & SYNTAX_SECOND_CHAR_END))
#define SYNTAX_STYLES_MATCH_START_P(table, a, b, mask) \
((SYNTAX_COMMENT_BITS (table, a) & SYNTAX_FIRST_CHAR_START & (mask)) \
that character signifies (as a char).
For example, (enum syntaxcode) syntax_spec_code['w'] is Sword. */
-extern CONST unsigned char syntax_spec_code[0400];
+extern const unsigned char syntax_spec_code[0400];
/* Indexed by syntax code, give the letter that describes it. */
-extern CONST unsigned char syntax_code_spec[];
+extern const unsigned char syntax_code_spec[];
Lisp_Object scan_lists (struct buffer *buf, Bufpos from, int count,
int depth, int sexpflag, int no_error);
}
#ifdef WINDOWSNT
+
pid_t
sys_getpid (void)
{
return abs (getpid ());
}
+
#endif /* WINDOWSNT */
/* Fork a subshell. */
static void
sys_subshell (void)
{
-#ifdef WINDOWSNT
- HANDLE pid;
-#else
+#ifndef WINDOWSNT
int pid;
#endif
struct save_signal saved_handlers[5];
str = (unsigned char *) alloca (XSTRING_LENGTH (dir) + 2);
len = XSTRING_LENGTH (dir);
memcpy (str, XSTRING_DATA (dir), len);
- /* #### Unix specific */
- if (str[len - 1] != '/') str[len++] = '/';
+ if (!IS_ANY_SEP (str[len - 1]))
+ str[len++] = DIRECTORY_SEP;
str[len] = 0;
xyzzy:
-#ifdef WINDOWSNT
- pid = NULL;
-#else /* not WINDOWSNT */
-
+#ifndef WINDOWSNT
pid = fork ();
if (pid == -1)
error ("Can't spawn subshell");
if (pid == 0)
-
#endif /* not WINDOWSNT */
{
char *sh = 0;
if (str)
sys_chdir (str);
-#if !defined (NO_SUBPROCESSES) && !defined (WINDOWSNT)
+#ifdef WINDOWSNT
+
+ /* Waits for process completion */
+ if (_spawnlp (_P_WAIT, sh, sh, NULL) != 0)
+ error ("Can't spawn subshell");
+ else
+ return; /* we're done, no need to wait for termination */
+ }
+
+#else
+
+#if !defined (NO_SUBPROCESSES)
close_process_descs (); /* Close Emacs's pipes/ptys */
#endif
nice (-emacs_priority); /* Give the new shell the default priority */
#endif
-#ifdef WINDOWSNT
- /* Waits for process completion */
- pid = _spawnlp (_P_WAIT, sh, sh, NULL);
- if (pid == NULL)
- write (1, "Can't execute subshell", 22);
-
-#else /* not WINDOWSNT */
execlp (sh, sh, 0);
write (1, "Can't execute subshell", 22);
_exit (1);
-#endif /* not WINDOWSNT */
}
save_signal_handlers (saved_handlers);
synch_process_alive = 1;
wait_for_termination (pid);
restore_signal_handlers (saved_handlers);
+
+#endif /* not WINDOWSNT */
+
}
#endif /* !defined (SIGTSTP) && !defined (USG_JOBCTRL) */
\f
/* Given FD, obtain pty buffer size. When no luck, a good guess is made,
- so that the function works even fd is not a pty. */
+ so that the function works even when fd is not a pty. */
int
get_pty_max_bytes (int fd)
{
- int pty_max_bytes;
-
+ /* DEC OSF 4.0 fpathconf returns 255, but xemacs hangs on long shell
+ input lines if we return 253. 252 is OK!. So let's leave a bit
+ of slack for the newline that xemacs will insert, and for those
+ inevitable vendor off-by-one-or-two-or-three bugs. */
+#define MAX_CANON_SLACK 10
+#define SAFE_MAX_CANON (127 - MAX_CANON_SLACK)
#if defined (HAVE_FPATHCONF) && defined (_PC_MAX_CANON)
- pty_max_bytes = fpathconf (fd, _PC_MAX_CANON);
- if (pty_max_bytes < 0)
+ {
+ int max_canon = fpathconf (fd, _PC_MAX_CANON);
+ return (max_canon < 0 ? SAFE_MAX_CANON :
+ max_canon > SAFE_MAX_CANON ? max_canon - MAX_CANON_SLACK :
+ max_canon);
+ }
+#elif defined (_POSIX_MAX_CANON)
+ return (_POSIX_MAX_CANON > SAFE_MAX_CANON ?
+ _POSIX_MAX_CANON - MAX_CANON_SLACK :
+ _POSIX_MAX_CANON);
+#else
+ return SAFE_MAX_CANON;
#endif
- pty_max_bytes = 250;
-
- /* Deduct one, to leave space for the eof. */
- pty_max_bytes--;
-
- return pty_max_bytes;
}
/* Figure out the eof character for the FD. */
Bufbyte
get_eof_char (int fd)
{
- CONST Bufbyte ctrl_d = (Bufbyte) '\004';
+ const Bufbyte ctrl_d = (Bufbyte) '\004';
if (!isatty (fd))
return ctrl_d;
tcgetattr (fd, &t);
#if 0
/* What is the following line designed to do??? -mrb */
- if (strlen ((CONST char *) t.c_cc) < (unsigned int) (VEOF + 1))
+ if (strlen ((const char *) t.c_cc) < (unsigned int) (VEOF + 1))
return ctrl_d;
else
return (Bufbyte) t.c_cc[VEOF];
{
struct termio t;
ioctl (fd, TCGETA, &t);
- if (strlen ((CONST char *) t.c_cc) < (unsigned int) (VINTR + 1))
+ if (strlen ((const char *) t.c_cc) < (unsigned int) (VINTR + 1))
return ctrl_d;
else
return (Bufbyte) t.c_cc[VINTR];
*
*/
-#ifdef ORDINARY_LINK
+#if defined(ORDINARY_LINK) && !defined(__MINGW32__)
extern char **environ;
#endif
* is known to live at or near the start of the system crt0.c, and
* we don't sweat the handful of bytes that might lose.
*/
-#ifdef HEAP_IN_DATA
+#if defined (HEAP_IN_DATA) && !defined(PDUMP)
extern char* static_heap_base;
if (!initialized)
return static_heap_base;
# endif
if (hp)
{
- CONST char *fqdn = (CONST char *) hp->h_name;
+ const char *fqdn = (const char *) hp->h_name;
if (!strchr (fqdn, '.'))
{
/* Linux added here by Raymond L. Toy <toy@alydar.crd.ge.com> for XEmacs. */
/* Irix added here by gparker@sni-usa.com for XEmacs. */
/* NetBSD added here by James R Grinter <jrg@doc.ic.ac.uk> for XEmacs */
-extern CONST char *sys_errlist[];
+extern const char *sys_errlist[];
extern int sys_nerr;
#endif
#endif
-CONST char *
+const char *
strerror (int errnum)
{
if (errnum >= 0 && errnum < sys_nerr)
return sys_errlist[errnum];
- return ((CONST char *) GETTEXT ("Unknown error"));
+ return ((const char *) GETTEXT ("Unknown error"));
}
#endif /* ! HAVE_STRERROR */
#ifdef ENCAPSULATE_OPEN
int
-sys_open (CONST char *path, int oflag, ...)
+sys_open (const char *path, int oflag, ...)
{
int mode;
va_list ap;
mode = va_arg (ap, int);
va_end (ap);
+ PATHNAME_CONVERT_OUT (path);
+
#ifdef WINDOWSNT
/* Make all handles non-inheritable */
oflag |= _O_NOINHERIT;
is not interrupted by C-g. However, the worst that can happen is
the fallback to simple open(). */
int
-interruptible_open (CONST char *path, int oflag, int mode)
+interruptible_open (const char *path, int oflag, int mode)
{
/* This function can GC */
size_t len = strlen (path);
#endif /* ENCAPSULATE_READ */
ssize_t
-sys_write_1 (int fildes, CONST void *buf, size_t nbyte, int allow_quit)
+sys_write_1 (int fildes, const void *buf, size_t nbyte, int allow_quit)
{
ssize_t bytes_written = 0;
- CONST char *b = (CONST char *) buf;
+ const char *b = (const char *) buf;
/* No harm in looping regardless of the INTERRUPTIBLE_IO setting. */
while (nbyte > 0)
#ifdef ENCAPSULATE_WRITE
ssize_t
-sys_write (int fildes, CONST void *buf, size_t nbyte)
+sys_write (int fildes, const void *buf, size_t nbyte)
{
return sys_write_1 (fildes, buf, nbyte, 0);
}
#ifdef ENCAPSULATE_FOPEN
FILE *
-sys_fopen (CONST char *path, CONST char *type)
+sys_fopen (const char *path, const char *type)
{
PATHNAME_CONVERT_OUT (path);
#if defined (WINDOWSNT)
#ifdef ENCAPSULATE_FWRITE
size_t
-sys_fwrite (CONST void *ptr, size_t size, size_t nitem, FILE *stream)
+sys_fwrite (const void *ptr, size_t size, size_t nitem, FILE *stream)
{
#ifdef INTERRUPTIBLE_IO
size_t rtnval;
size_t items_written = 0;
- CONST char *b = (CONST char *) ptr;
+ const char *b = (const char *) ptr;
while (nitem > 0)
{
#ifdef ENCAPSULATE_CHDIR
int
-sys_chdir (CONST char *path)
+sys_chdir (const char *path)
{
PATHNAME_CONVERT_OUT (path);
return chdir (path);
#ifdef ENCAPSULATE_MKDIR
int
-sys_mkdir (CONST char *path, mode_t mode)
+sys_mkdir (const char *path, mode_t mode)
{
PATHNAME_CONVERT_OUT (path);
#ifdef WINDOWSNT
#ifdef ENCAPSULATE_OPENDIR
DIR *
-sys_opendir (CONST char *filename)
+sys_opendir (const char *filename)
{
DIR *rtnval;
PATHNAME_CONVERT_OUT (filename);
{
Extcount external_len;
int ascii_filename_p = 1;
- CONST Extbyte * CONST external_name = (CONST Extbyte *) rtnval->d_name;
+ const Extbyte * const external_name = (const Extbyte *) rtnval->d_name;
/* Optimize for the common all-ASCII case, computing len en passant */
for (external_len = 0; external_name[external_len] ; external_len++)
{ /* Non-ASCII filename */
static Bufbyte_dynarr *internal_DIRENTRY;
- CONST Bufbyte *internal_name;
+ const Bufbyte *internal_name;
Bytecount internal_len;
if (!internal_DIRENTRY)
internal_DIRENTRY = Dynarr_new (Bufbyte);
#ifdef ENCAPSULATE_RMDIR
int
-sys_rmdir (CONST char *path)
+sys_rmdir (const char *path)
{
PATHNAME_CONVERT_OUT (path);
return rmdir (path);
#ifdef ENCAPSULATE_ACCESS
int
-sys_access (CONST char *path, int mode)
+sys_access (const char *path, int mode)
{
PATHNAME_CONVERT_OUT (path);
return access (path, mode);
#ifdef HAVE_EACCESS
#ifdef ENCAPSULATE_EACCESS
int
-sys_eaccess (CONST char *path, int mode)
+sys_eaccess (const char *path, int mode)
{
PATHNAME_CONVERT_OUT (path);
return eaccess (path, mode);
#ifdef ENCAPSULATE_LSTAT
int
-sys_lstat (CONST char *path, struct stat *buf)
+sys_lstat (const char *path, struct stat *buf)
{
PATHNAME_CONVERT_OUT (path);
return lstat (path, buf);
#ifdef ENCAPSULATE_READLINK
int
-sys_readlink (CONST char *path, char *buf, size_t bufsiz)
+sys_readlink (const char *path, char *buf, size_t bufsiz)
{
PATHNAME_CONVERT_OUT (path);
/* #### currently we don't do conversions on the incoming data */
#ifdef ENCAPSULATE_STAT
int
-sys_stat (CONST char *path, struct stat *buf)
+sys_stat (const char *path, struct stat *buf)
{
PATHNAME_CONVERT_OUT (path);
return stat (path, buf);
#ifdef ENCAPSULATE_CHMOD
int
-sys_chmod (CONST char *path, mode_t mode)
+sys_chmod (const char *path, mode_t mode)
{
PATHNAME_CONVERT_OUT (path);
return chmod (path, mode);
#ifdef ENCAPSULATE_CREAT
int
-sys_creat (CONST char *path, mode_t mode)
+sys_creat (const char *path, mode_t mode)
{
PATHNAME_CONVERT_OUT (path);
return creat (path, mode);
#ifdef ENCAPSULATE_LINK
int
-sys_link (CONST char *existing, CONST char *new)
+sys_link (const char *existing, const char *new)
{
PATHNAME_CONVERT_OUT (existing);
PATHNAME_CONVERT_OUT (new);
#ifdef ENCAPSULATE_RENAME
int
-sys_rename (CONST char *old, CONST char *new)
+sys_rename (const char *old, const char *new)
{
PATHNAME_CONVERT_OUT (old);
PATHNAME_CONVERT_OUT (new);
#ifdef ENCAPSULATE_SYMLINK
int
-sys_symlink (CONST char *name1, CONST char *name2)
+sys_symlink (const char *name1, const char *name2)
{
PATHNAME_CONVERT_OUT (name1);
PATHNAME_CONVERT_OUT (name2);
#ifdef ENCAPSULATE_UNLINK
int
-sys_unlink (CONST char *path)
+sys_unlink (const char *path)
{
PATHNAME_CONVERT_OUT (path);
return unlink (path);
#ifdef ENCAPSULATE_EXECVP
int
-sys_execvp (CONST char *path, char * CONST * argv)
+sys_execvp (const char *path, char * const * argv)
{
int i, argc;
char ** new_argv;
#ifndef HAVE_GETCWD
char *
-getcwd (char *pathname, int size)
+getcwd (char *pathname, size_t size)
{
return getwd (pathname);
}
#ifndef HAVE_RENAME
int
-rename (CONST char *from, CONST char *to)
+rename (const char *from, const char *to)
{
if (access (from, 0) == 0)
{
#if !defined (SYS_SIGLIST_DECLARED) && !defined (HAVE_SYS_SIGLIST)
#if defined(WINDOWSNT) || defined(__CYGWIN32__)
-CONST char *sys_siglist[] =
+const char *sys_siglist[] =
{
"bum signal!!",
"hangup",
#ifdef USG
#ifdef AIX
-CONST char *sys_siglist[NSIG + 1] =
+const char *sys_siglist[NSIG + 1] =
{
/* AIX has changed the signals a bit */
DEFER_GETTEXT ("bogus signal"), /* 0 */
0
};
#else /* USG, not AIX */
-CONST char *sys_siglist[NSIG + 1] =
+const char *sys_siglist[NSIG + 1] =
{
DEFER_GETTEXT ("bogus signal"), /* 0 */
DEFER_GETTEXT ("hangup"), /* 1 SIGHUP */
#endif /* not AIX */
#endif /* USG */
#ifdef DGUX
-CONST char *sys_siglist[NSIG + 1] =
+const char *sys_siglist[NSIG + 1] =
{
DEFER_GETTEXT ("null signal"), /* 0 SIGNULL */
DEFER_GETTEXT ("hangup"), /* 1 SIGHUP */
#ifdef NONSYSTEM_DIR_LIBRARY
DIR *
-opendir (CONST char *filename) /* name of directory */
+opendir (const char *filename) /* name of directory */
{
DIR *dirp; /* -> malloc'ed storage */
int fd; /* file descriptor for read */
MKDIR_PROTOTYPE
#else
int
-mkdir (CONST char *dpath, int dmode)
+mkdir (const char *dpath, int dmode)
#endif
{
int cpid, status, fd;
#ifndef HAVE_RMDIR
int
-rmdir (CONST char *dpath)
+rmdir (const char *dpath)
{
int cpid, status, fd;
struct stat statbuf;
extern char **environ;
#endif
+#ifdef PDUMP
+int pdump_read_file (char **pdump_start_pos, size_t *pdump_length);
+#endif
+
int eight_bit_tty (struct device *d);
void stuff_char (struct console *con, int c);
extern JMP_BUF break_system_call_jump;
extern volatile int can_break_system_calls;
-ssize_t sys_write_1 (int fildes, CONST void *buf, size_t nbyte,
+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);
void init_system_name (void);
#ifndef HAVE_GETCWD
-char *getcwd (char *pathname, int size);
+char *getcwd (char *pathname, size_t size);
#endif
#ifndef HAVE_RENAME
-int rename (CONST char *from, CONST char *to);
+int rename (const char *from, const char *to);
#endif
#ifndef HAVE_DUP2
# ifdef strerror
# undef strerror
# endif
-CONST char *strerror (int);
+const char *strerror (int);
#endif
#ifdef WINDOWSNT
void mswindows_set_last_errno (void);
#endif
-int interruptible_open (CONST char *path, int oflag, int mode);
+int interruptible_open (const char *path, int oflag, int mode);
#ifndef HAVE_H_ERRNO
extern int h_errno;
#ifdef HAVE_REALPATH
#define xrealpath realpath
#else
-char *xrealpath(CONST char *path, char resolved_path []);
+char *xrealpath(const char *path, char resolved_path []);
#endif
#endif /* INCLUDED_sysdep_h_ */
/* encapsulation: directory calls */
#ifdef ENCAPSULATE_CHDIR
-int sys_chdir (CONST char *path);
+int sys_chdir (const char *path);
#endif
#if defined (ENCAPSULATE_CHDIR) && !defined (DONT_ENCAPSULATE)
# undef chdir
#endif
#ifdef ENCAPSULATE_MKDIR
-int sys_mkdir (CONST char *path, mode_t mode);
+int sys_mkdir (const char *path, mode_t mode);
#endif
#if defined (ENCAPSULATE_MKDIR) && !defined (DONT_ENCAPSULATE)
# undef mkdir
#endif
#ifdef ENCAPSULATE_OPENDIR
-DIR *sys_opendir (CONST char *filename);
+DIR *sys_opendir (const char *filename);
#endif
#if defined (ENCAPSULATE_OPENDIR) && !defined (DONT_ENCAPSULATE)
# undef opendir
#endif
#ifdef ENCAPSULATE_RMDIR
-int sys_rmdir (CONST char *path);
+int sys_rmdir (const char *path);
#endif
#if defined (ENCAPSULATE_RMDIR) && !defined (DONT_ENCAPSULATE)
# undef rmdir
#endif
int
-dll_init (CONST char *arg)
+dll_init (const char *arg)
{
return 0;
}
dll_handle
-dll_open (CONST char *fname)
+dll_open (const char *fname)
{
return (dll_handle)dlopen (fname, RTLD_LAZY | RTLD_GLOBAL);
}
}
dll_func
-dll_function (dll_handle h, CONST char *n)
+dll_function (dll_handle h, const char *n)
{
#ifdef DLSYM_NEEDS_UNDERSCORE
char *buf = alloca_array (char, strlen (n) + 2);
}
dll_var
-dll_variable (dll_handle h, CONST char *n)
+dll_variable (dll_handle h, const char *n)
{
#ifdef DLSYM_NEEDS_UNDERSCORE
char *buf = alloca_array (char, strlen (n) + 2);
return (dll_var)dlsym ((void *)h, n);
}
-CONST char *
+const char *
dll_error (dll_handle h)
{
#if defined(HAVE_DLERROR) || defined(dlerror)
- return (CONST char *)dlerror ();
+ return (const char *)dlerror ();
#elif defined(HAVE__DLERROR)
return (const char *)_dlerror();
#else
/* This is the HP/UX version */
#include <dl.h>
int
-dll_init (CONST char *arg)
+dll_init (const char *arg)
{
return 0;
}
dll_handle
-dll_open (CONST char *fname)
+dll_open (const char *fname)
{
shl_t h = shl_load (fname, BIND_DEFERRED,0L);
shl_t *hp = NULL;
}
dll_func
-dll_function (dll_handle h, CONST char *n)
+dll_function (dll_handle h, const char *n)
{
long handle = 0L;
}
dll_var
-dll_variable (dll_handle h, CONST char *n)
+dll_variable (dll_handle h, const char *n)
{
long handle = 0L;
return (dll_var)handle;
}
-CONST char *
+const char *
dll_error (dll_handle h)
{
/* #### WTF?! Shouldn't this at least attempt to get strerror or
#elif defined(HAVE_INIT_DLD)
#include <dld.h>
int
-dll_init (CONST char *arg)
+dll_init (const char *arg)
{
char *real_exe = dld_find_executable (arg);
int rc;
}
dll_handle
-dll_open (CONST char *fname)
+dll_open (const char *fname)
{
rc = dld_link (fname);
if (rc)
}
DLL_FUNC
-dll_function (dll_handle h, CONST char *n)
+dll_function (dll_handle h, const char *n)
{
return dld_get_func(n);
}
DLL_FUNC
-dll_variable (dll_handle h, CONST char *n)
+dll_variable (dll_handle h, const char *n)
{
return dld_get_symbol(n);
}
#elif defined(_WINDOWS) || defined(WIN32)
int
-dll_init (CONST char *arg)
+dll_init (const char *arg)
{
return 0;
}
dll_handle
-dll_open (CONST char *fname)
+dll_open (const char *fname)
{
return (dll_handle)LoadLibrary (fname);
}
}
dll_func
-dll_function (dll_handle h, CONST char *n)
+dll_function (dll_handle h, const char *n)
{
return (dll_func)GetProcAddress (h,n);
}
dll_func
-dll_variable (dll_handle h, CONST char *n)
+dll_variable (dll_handle h, const char *n)
{
return (dll_func)GetProcAddress (h,n);
}
-CONST char *
+const char *
dll_error (dll_handle h)
{
return "Windows DLL Error";
#else
/* Catchall if we don't know about this systems method of dynamic loading */
int
-dll_init (CONST char *arg)
+dll_init (const char *arg)
{
return -1;
}
dll_handle
-dll_open (CONST char *fname)
+dll_open (const char *fname)
{
return NULL;
}
}
dll_func
-dll_function (dll_handle h, CONST char *n)
+dll_function (dll_handle h, const char *n)
{
return NULL;
}
dll_func
-dll_variable (dll_handle h, CONST char *n)
+dll_variable (dll_handle h, const char *n)
{
return NULL;
}
-CONST char *
+const char *
dll_error (dll_handle h)
{
return "Shared libraries not implemented on this system";
typedef void * dll_func;
typedef void * dll_var;
-int dll_init(CONST char *);
+int dll_init(const char *);
int dll_shutdown(void);
-dll_handle dll_open(CONST char *);
+dll_handle dll_open(const char *);
int dll_close(dll_handle);
-dll_func dll_function(dll_handle,CONST char *);
-dll_var dll_variable(dll_handle,CONST char *);
-CONST char *dll_error(dll_handle);
+dll_func dll_function(dll_handle,const char *);
+dll_var dll_variable(dll_handle,const char *);
+const char *dll_error(dll_handle);
#ifdef __cplusplus
}
#define INCLUDED_sysfile_h_
#include <errno.h>
+#include <limits.h>
#ifndef WINDOWSNT
#include <sys/errno.h> /* <errno.h> does not always imply this */
#define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
#endif
+/* Client .c files should simply use `PATH_MAX'. */
+#ifndef PATH_MAX
+# if defined (_POSIX_PATH_MAX)
+# define PATH_MAX _POSIX_PATH_MAX
+# elif defined (MAXPATHLEN)
+# define PATH_MAX MAXPATHLEN
+# else
+# define PATH_MAX 1024
+# endif
+#endif
+
+/* MAXPATHLEN is deprecated, but, as of this writing, still used. */
#ifndef MAXPATHLEN
-/* in 4.1, param.h fails to define this. */
-#define MAXPATHLEN 1024
-#endif /* not MAXPATHLEN */
+# define MAXPATHLEN 1024
+#endif
#ifndef X_OK
# define X_OK 01
#endif
#ifdef ENCAPSULATE_WRITE
-ssize_t 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
#endif
#ifdef ENCAPSULATE_OPEN
-int sys_open (CONST char *, int, ...);
+int sys_open (const char *, int, ...);
#endif
#if defined (ENCAPSULATE_OPEN) && !defined (DONT_ENCAPSULATE)
# undef open
#endif
#ifdef ENCAPSULATE_FWRITE
-size_t sys_fwrite (CONST void *, size_t, size_t, FILE *);
+size_t sys_fwrite (const void *, size_t, size_t, FILE *);
#endif
#if defined (ENCAPSULATE_FWRITE) && !defined (DONT_ENCAPSULATE)
# undef fwrite
#endif
#ifdef ENCAPSULATE_FOPEN
-FILE *sys_fopen (CONST char *, CONST char *);
+FILE *sys_fopen (const char *, const char *);
#endif
#if defined (ENCAPSULATE_FOPEN) && !defined (DONT_ENCAPSULATE)
# undef fopen
/* encapsulations: file-information calls */
#ifdef ENCAPSULATE_ACCESS
-int sys_access (CONST char *path, int mode);
+int sys_access (const char *path, int mode);
#endif
#if defined (ENCAPSULATE_ACCESS) && !defined (DONT_ENCAPSULATE)
# undef access
#endif
#ifdef ENCAPSULATE_EACCESS
-int sys_eaccess (CONST char *path, int mode);
+int sys_eaccess (const char *path, int mode);
#endif
#if defined (ENCAPSULATE_EACCESS) && !defined (DONT_ENCAPSULATE)
# undef eaccess
#endif
#ifdef ENCAPSULATE_LSTAT
-int sys_lstat (CONST char *path, struct stat *buf);
+int sys_lstat (const char *path, struct stat *buf);
#endif
#if defined (ENCAPSULATE_LSTAT) && !defined (DONT_ENCAPSULATE)
# undef lstat
#endif
#ifdef ENCAPSULATE_READLINK
-int sys_readlink (CONST char *path, char *buf, size_t bufsiz);
+int sys_readlink (const char *path, char *buf, size_t bufsiz);
#endif
#if defined (ENCAPSULATE_READLINK) && !defined (DONT_ENCAPSULATE)
# undef readlink
#endif
#ifdef ENCAPSULATE_STAT
-int sys_stat (CONST char *path, struct stat *buf);
+int sys_stat (const char *path, struct stat *buf);
#endif
#if defined (ENCAPSULATE_STAT) && !defined (DONT_ENCAPSULATE)
# undef stat
/* encapsulations: file-manipulation calls */
#ifdef ENCAPSULATE_CHMOD
-int sys_chmod (CONST char *path, mode_t mode);
+int sys_chmod (const char *path, mode_t mode);
#endif
#if defined (ENCAPSULATE_CHMOD) && !defined (DONT_ENCAPSULATE)
# undef chmod
#endif
#ifdef ENCAPSULATE_CREAT
-int sys_creat (CONST char *path, mode_t mode);
+int sys_creat (const char *path, mode_t mode);
#endif
#if defined (ENCAPSULATE_CREAT) && !defined (DONT_ENCAPSULATE)
# undef creat
#endif
#ifdef ENCAPSULATE_LINK
-int sys_link (CONST char *existing, CONST char *new);
+int sys_link (const char *existing, const char *new);
#endif
#if defined (ENCAPSULATE_LINK) && !defined (DONT_ENCAPSULATE)
# undef link
#endif
#ifdef ENCAPSULATE_RENAME
-int sys_rename (CONST char *old, CONST char *new);
+int sys_rename (const char *old, const char *new);
#endif
#if defined (ENCAPSULATE_RENAME) && !defined (DONT_ENCAPSULATE)
# undef rename
#endif
#ifdef ENCAPSULATE_SYMLINK
-int sys_symlink (CONST char *name1, CONST char *name2);
+int sys_symlink (const char *name1, const char *name2);
#endif
#if defined (ENCAPSULATE_SYMLINK) && !defined (DONT_ENCAPSULATE)
# undef symlink
#endif
#ifdef ENCAPSULATE_UNLINK
-int sys_unlink (CONST char *path);
+int sys_unlink (const char *path);
#endif
#if defined (ENCAPSULATE_UNLINK) && !defined (DONT_ENCAPSULATE)
# undef unlink
#endif
#ifdef ENCAPSULATE_EXECVP
-int sys_execvp (CONST char *, char * CONST *);
+int sys_execvp (const char *, char * const *);
#endif
#if defined (ENCAPSULATE_EXECVP) && !defined (DONT_ENCAPSULATE)
# undef execvp
configure incorrectly fails to find it, so s/linux.h defines
HAVE_SYS_SIGLIST. */
#if !defined (SYS_SIGLIST_DECLARED) && !defined (HAVE_SYS_SIGLIST)
-extern CONST char *sys_siglist[];
+extern const char *sys_siglist[];
#endif
#ifdef SIGDANGER
#define EMACS_SET_USECS(time, microseconds) ((time).tv_usec = (microseconds))
#if !defined (HAVE_GETTIMEOFDAY)
-struct timezone;
-int gettimeofday (struct timeval *, struct timezone *);
+int gettimeofday (struct timeval *, void *);
#endif
/* On SVR4, the compiler may complain if given this extra BSD arg. */
#ifdef GETTIMEOFDAY_ONE_ARGUMENT
-# ifdef SOLARIS2
-/* Solaris (at least) omits this prototype. IRIX5 has it and chokes if we
- declare it here. */
-int gettimeofday (struct timeval *);
-# endif
+#define EMACS_GETTIMEOFDAY(time) gettimeofday(time)
+#else
+#define EMACS_GETTIMEOFDAY(time) gettimeofday(time,0)
+#endif
+
/* According to the Xt sources, some NTP daemons on some systems may
return non-normalized values. */
#define EMACS_GET_TIME(time) \
do { \
- gettimeofday (&(time)); \
- EMACS_NORMALIZE_TIME (time); \
-} while (0)
-#else /* not GETTIMEOFDAY_ONE_ARGUMENT */
-# ifdef SOLARIS2
-/* Solaris doesn't provide any prototype of this unless a bunch of
- crap we don't define are defined. */
-int gettimeofday (struct timeval *, void *dummy);
-# endif
-#define EMACS_GET_TIME(time) \
-do { \
- struct timezone dummy; \
- gettimeofday (&(time), &dummy); \
+ EMACS_GETTIMEOFDAY (&(time)); \
EMACS_NORMALIZE_TIME (time); \
} while (0)
-#endif /* not GETTIMEOFDAY_ONE_ARGUMENT */
#define EMACS_NORMALIZE_TIME(time) \
do { \
for tgetnum, tgetflag and tgetstr to find. */
static char *term_entry;
-static CONST char *tgetst1 (CONST char *ptr, char **area);
+static const char *tgetst1 (const char *ptr, char **area);
/* Search entry BP for capability CAP.
Return a pointer to the capability (in BP) if found,
0 if not found. */
-static CONST char *
+static const char *
find_capability (bp, cap)
- CONST char *bp;
- CONST char *cap;
+ const char *bp;
+ const char *cap;
{
for (; *bp; bp++)
if (bp[0] == ':'
int
tgetnum (cap)
- CONST char *cap;
+ const char *cap;
{
- CONST char *ptr = find_capability (term_entry, cap);
+ const char *ptr = find_capability (term_entry, cap);
if (!ptr || ptr[-1] != '#')
return -1;
return atoi (ptr);
int
tgetflag (cap)
- CONST char *cap;
+ const char *cap;
{
- CONST char *ptr = find_capability (term_entry, cap);
+ const char *ptr = find_capability (term_entry, cap);
return 0 != ptr && ptr[-1] == ':';
}
to store the string. That pointer is advanced over the space used.
If AREA is zero, space is allocated with `malloc'. */
-CONST char *
+const char *
tgetstr (cap, area)
- CONST char *cap;
+ const char *cap;
char **area;
{
- CONST char *ptr = find_capability (term_entry, cap);
+ const char *ptr = find_capability (term_entry, cap);
if (!ptr || (ptr[-1] != '=' && ptr[-1] != '~'))
return 0;
return tgetst1 (ptr, area);
into the block that *AREA points to,
or to newly allocated storage if AREA is 0. */
-static CONST char *
+static const char *
tgetst1 (ptr, area)
- CONST char *ptr;
+ const char *ptr;
char **area;
{
- CONST char *p;
+ const char *p;
char *r;
int c;
int size;
void
tputs (string, nlines, outfun)
- CONST char *string;
+ const char *string;
int nlines;
void (*outfun) (int);
{
if (string == (char *) 0)
return;
- while (isdigit (* (CONST unsigned char *) string))
+ while (isdigit (* (const unsigned char *) string))
{
padcount += *string++ - '0';
padcount *= 10;
int
tgetent (bp, name)
char *bp;
- CONST char *name;
+ const char *name;
{
char *tem;
int fd;
struct buffer buf;
char *bp1;
char *bp2;
- CONST char *term;
+ const char *term;
int malloc_size = 0;
int c;
char *tcenv; /* TERMCAP value, if it contais :tc=. */
- CONST char *indirect = 0; /* Terminal type in :tc= in TERMCAP value. */
+ const char *indirect = 0; /* Terminal type in :tc= in TERMCAP value. */
tem = getenv ("TERMCAP");
if (tem && *tem == 0) tem = 0;
}
tprint (cap)
- CONST char *cap;
+ const char *cap;
{
char *x = tgetstr (cap, 0);
char *y;
format is different too.
*/
-#include CURSES_H_PATH
+#include CURSES_H_FILE
/* Sun, in their infinite lameness, supplies (possibly) broken headers
even under Solaris. GCC feels it necessary to correct things by
supplying its own headers. Unfortunately, if you build GCC under
but not term.h.) However, it seems to work to just not include
term.h under Solaris, so we try that. KLUDGE! */
#if !(defined (__GNUC__) && defined (SOLARIS2))
-#include TERM_H_PATH
+#include TERM_H_FILE
#endif
extern void *xmalloc (int size);
#if 0 /* If this isn't declared somewhere, too bad */
-extern char * tparm (CONST char *string, int arg1, int arg2, int arg3,
+extern char * tparm (const char *string, int arg1, int arg2, int arg3,
int arg4, int arg5, int arg6, int arg7, int arg8,
int arg9);
#endif
/* XEmacs: renamed this function because just tparam() conflicts with
ncurses (We don't use this function anyway!) */
char *
-emacs_tparam (CONST char *string, char *outstring, int len, int arg1,
+emacs_tparam (const char *string, char *outstring, int len, int arg1,
int arg2, int arg3, int arg4, int arg5, int arg6, int arg7,
int arg8, int arg9)
{
struct detection_state;
static void
-text_encode_generic (Lstream *encoding, CONST unsigned char *src,
+text_encode_generic (Lstream *encoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n);
static int detect_coding_sjis (struct detection_state *st,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned int n);
static void decode_coding_sjis (Lstream *decoding,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned_char_dynarr *dst,
unsigned int n);
void char_encode_shift_jis (struct encoding_stream *str, Emchar c,
unsigned_char_dynarr *dst, unsigned int *flags);
static int detect_coding_big5 (struct detection_state *st,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned int n);
static void decode_coding_big5 (Lstream *decoding,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n);
static void encode_coding_big5 (Lstream *encoding,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n);
static int detect_coding_ucs4 (struct detection_state *st,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned int n);
static void decode_coding_ucs4 (Lstream *decoding,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n);
void char_encode_ucs4 (struct encoding_stream *str, Emchar c,
unsigned_char_dynarr *dst, unsigned int *flags);
unsigned_char_dynarr *dst, unsigned int *flags);
static int detect_coding_utf8 (struct detection_state *st,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned int n);
static void decode_coding_utf8 (Lstream *decoding,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n);
void char_encode_utf8 (struct encoding_stream *str, Emchar c,
unsigned_char_dynarr *dst, unsigned int *flags);
static void reset_iso2022 (Lisp_Object coding_system,
struct iso2022_decoder *iso);
static int detect_coding_iso2022 (struct detection_state *st,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned int n);
static void decode_coding_iso2022 (Lstream *decoding,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n);
void char_encode_iso2022 (struct encoding_stream *str, Emchar c,
unsigned_char_dynarr *dst, unsigned int *flags);
unsigned_char_dynarr *dst, unsigned int *flags);
#endif /* MULE */
static void decode_coding_no_conversion (Lstream *decoding,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned_char_dynarr *dst,
unsigned int n);
static void encode_coding_no_conversion (Lstream *encoding,
- CONST unsigned char *src,
+ const unsigned char *src,
unsigned_char_dynarr *dst,
unsigned int n);
-static void mule_decode (Lstream *decoding, CONST unsigned char *src,
+static void mule_decode (Lstream *decoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n);
-static void mule_encode (Lstream *encoding, CONST unsigned char *src,
+static void mule_encode (Lstream *encoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n);
typedef struct codesys_prop codesys_prop;
}
static eol_type_t
-detect_eol_type (struct detection_state *st, CONST unsigned char *src,
+detect_eol_type (struct detection_state *st, const unsigned char *src,
unsigned int n)
{
int c;
*/
static int
-detect_coding_type (struct detection_state *st, CONST Extbyte *src,
+detect_coding_type (struct detection_state *st, const Extbyte *src,
unsigned int n, int just_do_eol)
{
int c;
} \
} while (0)
-INLINE void DECODE_ADD_UCS_CHAR(Emchar c, unsigned_char_dynarr* dst);
-INLINE void
+INLINE_HEADER void DECODE_ADD_UCS_CHAR(Emchar c, unsigned_char_dynarr* dst);
+INLINE_HEADER void
DECODE_ADD_UCS_CHAR(Emchar c, unsigned_char_dynarr* dst)
{
if ( c <= 0x7f )
#ifdef UTF2000
extern Lisp_Object Vcharacter_composition_table;
-INLINE void COMPOSE_FLUSH_CHARS (struct decoding_stream *str,
- unsigned_char_dynarr* dst);
-INLINE void
+INLINE_HEADER void
+COMPOSE_FLUSH_CHARS (struct decoding_stream *str, unsigned_char_dynarr* dst);
+INLINE_HEADER void
COMPOSE_FLUSH_CHARS (struct decoding_stream *str, unsigned_char_dynarr* dst)
{
unsigned i;
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);
+ 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 ssize_t
-decoding_writer (Lstream *stream, CONST unsigned char *data, size_t size)
+decoding_writer (Lstream *stream, const unsigned char *data, size_t size)
{
struct decoding_stream *str = DECODING_STREAM_DATA (stream);
ssize_t retval;
static Lisp_Object
make_decoding_stream_1 (Lstream *stream, Lisp_Object codesys,
- CONST char *mode)
+ const char *mode)
{
Lstream *lstr = Lstream_new (lstream_decoding, mode);
struct decoding_stream *str = DECODING_STREAM_DATA (lstr);
be used for both reading and writing. */
static void
-mule_decode (Lstream *decoding, CONST unsigned char *src,
+mule_decode (Lstream *decoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n)
{
struct decoding_stream *str = DECODING_STREAM_DATA (decoding);
};
static ssize_t encoding_reader (Lstream *stream, unsigned char *data, size_t size);
-static ssize_t encoding_writer (Lstream *stream, CONST unsigned char *data,
+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 ssize_t
-encoding_writer (Lstream *stream, CONST unsigned char *data, size_t size)
+encoding_writer (Lstream *stream, const unsigned char *data, size_t size)
{
struct encoding_stream *str = ENCODING_STREAM_DATA (stream);
ssize_t retval;
static Lisp_Object
make_encoding_stream_1 (Lstream *stream, Lisp_Object codesys,
- CONST char *mode)
+ const char *mode)
{
Lstream *lstr = Lstream_new (lstream_encoding, mode);
struct encoding_stream *str = ENCODING_STREAM_DATA (lstr);
Store the encoded data into DST. */
static void
-mule_encode (Lstream *encoding, CONST unsigned char *src,
+mule_encode (Lstream *encoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n)
{
struct encoding_stream *str = ENCODING_STREAM_DATA (encoding);
#ifdef MULE
\f
static void
-text_encode_generic (Lstream *encoding, CONST unsigned char *src,
+text_encode_generic (Lstream *encoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n)
{
unsigned char c;
((c) >= 0xA1 && (c) <= 0xDF)
static int
-detect_coding_sjis (struct detection_state *st, CONST unsigned char *src,
+detect_coding_sjis (struct detection_state *st, const unsigned char *src,
unsigned int n)
{
int c;
/* Convert Shift-JIS data to internal format. */
static void
-decode_coding_sjis (Lstream *decoding, CONST unsigned char *src,
+decode_coding_sjis (Lstream *decoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n)
{
unsigned char c;
} while (0)
static int
-detect_coding_big5 (struct detection_state *st, CONST unsigned char *src,
+detect_coding_big5 (struct detection_state *st, const unsigned char *src,
unsigned int n)
{
int c;
/* Convert Big5 data to internal format. */
static void
-decode_coding_big5 (Lstream *decoding, CONST unsigned char *src,
+decode_coding_big5 (Lstream *decoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n)
{
unsigned char c;
/* Convert internally-formatted data to Big5. */
static void
-encode_coding_big5 (Lstream *encoding, CONST unsigned char *src,
+encode_coding_big5 (Lstream *encoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n)
{
#ifndef UTF2000
/************************************************************************/
static int
-detect_coding_ucs4 (struct detection_state *st, CONST unsigned char *src,
+detect_coding_ucs4 (struct detection_state *st, const unsigned char *src,
unsigned int n)
{
while (n--)
}
static void
-decode_coding_ucs4 (Lstream *decoding, CONST unsigned char *src,
+decode_coding_ucs4 (Lstream *decoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n)
{
struct decoding_stream *str = DECODING_STREAM_DATA (decoding);
/************************************************************************/
static int
-detect_coding_utf8 (struct detection_state *st, CONST unsigned char *src,
+detect_coding_utf8 (struct detection_state *st, const unsigned char *src,
unsigned int n)
{
while (n--)
}
static void
-decode_coding_utf8 (Lstream *decoding, CONST unsigned char *src,
+decode_coding_utf8 (Lstream *decoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n)
{
struct decoding_stream *str = DECODING_STREAM_DATA (decoding);
}
static int
-detect_coding_iso2022 (struct detection_state *st, CONST unsigned char *src,
+detect_coding_iso2022 (struct detection_state *st, const unsigned char *src,
unsigned int n)
{
int mask;
/* Convert ISO2022-format data to internal format. */
static void
-decode_coding_iso2022 (Lstream *decoding, CONST unsigned char *src,
+decode_coding_iso2022 (Lstream *decoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n)
{
struct decoding_stream *str = DECODING_STREAM_DATA (decoding);
iso2022_designate (Lisp_Object charset, unsigned char reg,
struct encoding_stream *str, unsigned_char_dynarr *dst)
{
- static CONST char inter94[] = "()*+";
- static CONST char inter96[] = ",-./";
+ static const char inter94[] = "()*+";
+ static const char inter96[] = ",-./";
unsigned short chars;
unsigned char dimension;
unsigned char final;
contain all 256 possible byte values and that are not to be
interpreted as being in any particular decoding. */
static void
-decode_coding_no_conversion (Lstream *decoding, CONST unsigned char *src,
+decode_coding_no_conversion (Lstream *decoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n)
{
unsigned char c;
}
static void
-encode_coding_no_conversion (Lstream *encoding, CONST unsigned char *src,
+encode_coding_no_conversion (Lstream *encoding, const unsigned char *src,
unsigned_char_dynarr *dst, unsigned int n)
{
unsigned char c;
void
syms_of_file_coding (void)
{
+ INIT_LRECORD_IMPLEMENTATION (coding_system);
+
deferror (&Qcoding_system_error, "coding-system-error",
"Coding-system error", Qio_error);
#ifndef TB_SETPADDING
#define TB_SETPADDING (WM_USER + 87)
#endif
+#ifndef TBSTYLE_FLAT
+#define TBSTYLE_FLAT 0x800
+#endif
#define MSWINDOWS_BUTTON_SHADOW_THICKNESS 2
#define MSWINDOWS_BLANK_SIZE 5
#define MSWINDOWS_MINIMUM_TOOLBAR_SIZE 8
ShowWindow(toolbarwnd, SW_HIDE);
}
- FRAME_MSWINDOWS_TOOLBAR_CHECKSUM(f,pos)=0;
+ FRAME_MSWINDOWS_TOOLBAR_CHECKSUM (f, pos) = 0;
SET_TOOLBAR_WAS_VISIBLE_FLAG (f, pos, 0);
}
/* remove the old one */
mswindows_clear_toolbar (f, pos, 0);
- FRAME_MSWINDOWS_TOOLBAR_CHECKSUM(f,pos)=checksum;
+ FRAME_MSWINDOWS_TOOLBAR_CHECKSUM (f, pos)=checksum;
/* build up the data required by win32 fns. */
button_tbl = xnew_array_and_zero (TBBUTTON, nbuttons);
CreateWindowEx ( WS_EX_WINDOWEDGE,
TOOLBARCLASSNAME,
NULL,
- WS_CHILD | WS_VISIBLE
+ WS_CHILD
| (style_3d ? WS_DLGFRAME : 0)
- | TBSTYLE_TOOLTIPS | CCS_NORESIZE
- | CCS_NOPARENTALIGN | CCS_NODIVIDER,
+ | TBSTYLE_TOOLTIPS
+ | CCS_NORESIZE
+ | CCS_NOPARENTALIGN | CCS_NODIVIDER
+ | CCS_ADJUSTABLE,
x, y, bar_width, bar_height,
FRAME_MSWINDOWS_HANDLE (f),
(HMENU)(TOOLBAR_ID_BIAS + pos),
mswindows_free_frame_toolbars (struct frame *f)
{
HWND twnd=NULL;
-#define DELETE_TOOLBAR(pos) \
- mswindows_clear_toolbar(f, 0, pos); \
- if ((twnd=GetDlgItem(FRAME_MSWINDOWS_HANDLE(f), TOOLBAR_ID_BIAS + pos))) \
+#define DELETE_TOOLBAR(pos) \
+ mswindows_clear_toolbar(f, pos, 0); \
+ if ((twnd=GetDlgItem(FRAME_MSWINDOWS_HANDLE(f), \
+ TOOLBAR_ID_BIAS + pos))) \
DestroyWindow(twnd)
DELETE_TOOLBAR(TOP_TOOLBAR);
static void
compute_frame_toolbars_data (struct frame *f)
{
- set_frame_toolbar (f, TOP_TOOLBAR);
- set_frame_toolbar (f, BOTTOM_TOOLBAR);
- set_frame_toolbar (f, LEFT_TOOLBAR);
- set_frame_toolbar (f, RIGHT_TOOLBAR);
+ set_frame_toolbar (f, TOP_TOOLBAR);
+ set_frame_toolbar (f, BOTTOM_TOOLBAR);
+ set_frame_toolbar (f, LEFT_TOOLBAR);
+ set_frame_toolbar (f, RIGHT_TOOLBAR);
}
void
&& (f->toolbar_changed || f->frame_changed || f->clear))
{
int pos;
-
+
/* We're not officially "in redisplay", so we still have a
chance to re-layout toolbars and windows. This is done here,
because toolbar is the only thing which currently might
if (!CONSP (elt[0]))
{
/* We can't check the buffer-local here because we don't know
- which buffer to check in. #### I think this is a bad thing.
- See if we can't get enough information to this function so
- that it can check.
-
+ which buffer to check in. #### I think this is a bad thing.
+ See if we can't get enough information to this function so
+ that it can check.
+
#### Wrong. We shouldn't be checking the value at all here.
The user might set or change the value at any time. */
value = Fsymbol_value (elt[0]);
void
syms_of_toolbar (void)
{
+ INIT_LRECORD_IMPLEMENTATION (toolbar_button);
+
defsymbol (&Qtoolbar_buttonp, "toolbar-button-p");
defsymbol (&Q2D, "2D");
defsymbol (&Q3D, "3D");
fb = Fcons (Fcons (list1 (Qx), make_int (DEFAULT_TOOLBAR_HEIGHT)), fb);
#endif
#ifdef HAVE_MS_WINDOWS
- fb = Fcons (Fcons (list1 (Qmswindows),
+ fb = Fcons (Fcons (list1 (Qmswindows),
make_int (MSWINDOWS_DEFAULT_TOOLBAR_HEIGHT)), fb);
#endif
if (!NILP (fb))
fb = Fcons (Fcons (list1 (Qx), make_int (DEFAULT_TOOLBAR_WIDTH)), fb);
#endif
#ifdef HAVE_MS_WINDOWS
- fb = Fcons (Fcons (list1 (Qmswindows),
+ fb = Fcons (Fcons (list1 (Qmswindows),
make_int (MSWINDOWS_DEFAULT_TOOLBAR_WIDTH)), fb);
#endif
if (!NILP (fb))
}
else if (EQ (attribute, Qtt_arg_val))
{
- CONST char *value_ext;
+ const char *value_ext;
CHECK_STRING (value);
TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
tt_message_arg_val_set (m, n, value_ext);
if (fun_str)
{
- CONST char *value_ext;
+ const char *value_ext;
CHECK_STRING (value);
TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
(*fun_str) (m, value_ext);
if (!VALID_TOOLTALK_MESSAGEP (m))
return Qnil;
{
- CONST char *vtype_ext;
+ const char *vtype_ext;
TO_EXTERNAL_FORMAT (LISP_STRING, vtype, C_STRING_ALLOCA, vtype_ext, Qnative);
if (NILP (value))
tt_message_arg_add (m, n, vtype_ext, NULL);
else if (STRINGP (value))
{
- CONST char *value_ext;
+ const char *value_ext;
TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
tt_message_arg_add (m, n, vtype_ext, value_ext);
}
}
else if (EQ (attribute, Qtt_file))
{
- CONST char *value_ext;
+ const char *value_ext;
CHECK_STRING (value);
TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
tt_pattern_file_add (p, value_ext);
}
else if (EQ (attribute, Qtt_object))
{
- CONST char *value_ext;
+ const char *value_ext;
CHECK_STRING (value);
TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
tt_pattern_object_add (p, value_ext);
}
else if (EQ (attribute, Qtt_op))
{
- CONST char *value_ext;
+ const char *value_ext;
CHECK_STRING (value);
TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
tt_pattern_op_add (p, value_ext);
}
else if (EQ (attribute, Qtt_otype))
{
- CONST char *value_ext;
+ const char *value_ext;
CHECK_STRING (value);
TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
tt_pattern_otype_add (p, value_ext);
}
else if (EQ (attribute, Qtt_sender))
{
- CONST char *value_ext;
+ const char *value_ext;
CHECK_STRING (value);
TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
tt_pattern_sender_add (p, value_ext);
}
else if (EQ (attribute, Qtt_sender_ptype))
{
- CONST char *value_ext;
+ const char *value_ext;
CHECK_STRING (value);
TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
tt_pattern_sender_ptype_add (p, value_ext);
}
else if (EQ (attribute, Qtt_session))
{
- CONST char *value_ext;
+ const char *value_ext;
CHECK_STRING (value);
TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
tt_pattern_session_add (p, value_ext);
return Qnil;
{
- CONST char *vtype_ext;
+ const char *vtype_ext;
TO_EXTERNAL_FORMAT (LISP_STRING, vtype, C_STRING_ALLOCA, vtype_ext, Qnative);
if (NILP (value))
tt_pattern_arg_add (p, n, vtype_ext, NULL);
else if (STRINGP (value))
{
- CONST char *value_ext;
+ const char *value_ext;
TO_EXTERNAL_FORMAT (LISP_STRING, value, C_STRING_ALLOCA, value_ext, Qnative);
tt_pattern_arg_add (p, n, vtype_ext, value_ext);
}
void
syms_of_tooltalk (void)
{
+ INIT_LRECORD_IMPLEMENTATION (tooltalk_message);
+ INIT_LRECORD_IMPLEMENTATION (tooltalk_pattern);
+
defsymbol (&Qtooltalk_messagep, "tooltalk-message-p");
DEFSUBR (Ftooltalk_message_p);
defsymbol (&Qtooltalk_patternp, "tooltalk-pattern-p");
#ifndef INCLUDED_tooltalk_h_
#define INCLUDED_tooltalk_h_
-#include TT_C_H_PATH
+#include TT_C_H_FILE
typedef struct Lisp_Tooltalk_Message Lisp_Tooltalk_Message;
DECLARE_LRECORD (tooltalk_message, Lisp_Tooltalk_Message);
The fourth and following args to tparam serve as the parameter values. */
-static char *tparam1 (CONST char *string, char *outstring, int len,
- CONST char *up, CONST char *left,
+static char *tparam1 (const char *string, char *outstring, int len,
+ const char *up, const char *left,
int *argp);
/* XEmacs: renamed this function because just tparam() conflicts with
ncurses */
-char *emacs_tparam (CONST char *string, char *outstring, int len, int arg0,
+char *emacs_tparam (const char *string, char *outstring, int len, int arg0,
int arg1, int arg2, int arg3);
char *
-emacs_tparam (CONST char *string, char *outstring, int len, int arg0,
+emacs_tparam (const char *string, char *outstring, int len, int arg0,
int arg1, int arg2, int arg3)
{
int arg[4];
return tparam1 (string, outstring, len, 0, 0, arg);
}
-CONST char *BC;
-CONST char *UP;
+const char *BC;
+const char *UP;
static char tgoto_buf[50];
-char *tgoto (CONST char *cm, int hpos, int vpos);
+char *tgoto (const char *cm, int hpos, int vpos);
char *
-tgoto (CONST char *cm, int hpos, int vpos)
+tgoto (const char *cm, int hpos, int vpos)
{
int args[2];
if (!cm)
}
static char *
-tparam1 (CONST char *string, char *outstring, int len, CONST char *up,
- CONST char *left, int *argp)
+tparam1 (const char *string, char *outstring, int len, const char *up,
+ const char *left, int *argp)
{
int c;
- CONST char *p = string;
+ const char *p = string;
char *op = outstring;
char *outend;
int outlen = 0;
}
#else
-#undef CONST
#ifndef MAX_PATH
#define MAX_PATH 260
#endif
static void
report_error_1 (fd, msg, a1, a2)
int fd;
- CONST char *msg;
+ const char *msg;
int a1, a2;
{
close (fd);
#define fatal(a, b, c) fprintf (stderr, a, b, c), exit (1)
#else
#include <config.h>
-extern void fatal (CONST char *, ...);
+extern void fatal (const char *, ...);
#endif
#include <sys/types.h>
/********************** Function Prototypes/Declarations ***********/
-static void unexec_error (CONST char *m, int use_errno, ...);
+static void unexec_error (const char *m, int use_errno, ...);
static int unexec_open (char *filename, int flag, int mode);
static caddr_t unexec_mmap (int fd, size_t len, int prot, int flags);
static long unexec_seek (int fd, long position);
/*******************************************************************/
static void
-unexec_error (CONST char *fmt, int use_errno, ...)
+unexec_error (const char *fmt, int use_errno, ...)
{
- CONST char *err_msg = SYS_ERR;
+ const char *err_msg = SYS_ERR;
va_list args;
fprintf (stderr, "unexec - ");
/********************** Function Prototypes/Declarations ***********/
-static void unexec_error (CONST char *fmt, int use_errno, ...);
+static void unexec_error (const char *fmt, int use_errno, ...);
static int unexec_open (char *filename, int flag, int mode);
static long unexec_seek (int fd, long position);
static void unexec_read (int fd, long position, char *buf, int bytes);
/*******************************************************************/
static void
-unexec_error (CONST char *fmt, int use_errno, ...)
+unexec_error (const char *fmt, int use_errno, ...)
{
- CONST char *err_msg = SYS_ERR;
+ const char *err_msg = SYS_ERR;
va_list args;
fprintf (stderr, "unexec - ");
/* From IMAGEHLP.H which is not installed by default by MSVC < 5 */
/* The IMAGEHLP.DLL library is not distributed by default with Windows95 */
-PIMAGE_NT_HEADERS
-(__stdcall * pfnCheckSumMappedFile) (LPVOID BaseAddress, DWORD FileLength,
- LPDWORD HeaderSum, LPDWORD CheckSum);
+typedef PIMAGE_NT_HEADERS
+(__stdcall * pfnCheckSumMappedFile_t) (LPVOID BaseAddress, DWORD FileLength,
+ LPDWORD HeaderSum, LPDWORD CheckSum);
+
#if 0
extern BOOL ctrl_c_handler (unsigned long type);
char out_filename[MAX_PATH], in_filename[MAX_PATH];
unsigned long size;
char *ptr;
- HANDLE hImagehelp;
+ HINSTANCE hImagehelp;
/* Make sure that the input and output filenames have the
".exe" extension...patch them up if they don't. */
{
PIMAGE_DOS_HEADER dos_header;
PIMAGE_NT_HEADERS nt_header;
+
DWORD headersum;
DWORD checksum;
+ pfnCheckSumMappedFile_t pfnCheckSumMappedFile;
dos_header = (PIMAGE_DOS_HEADER) out_file.file_base;
nt_header = (PIMAGE_NT_HEADERS) ((char *) dos_header + dos_header->e_lfanew);
nt_header->OptionalHeader.CheckSum = 0;
-// nt_header->FileHeader.TimeDateStamp = time (NULL);
-// dos_header->e_cp = size / 512;
-// nt_header->OptionalHeader.SizeOfImage = size;
+#if 0
+ nt_header->FileHeader.TimeDateStamp = time (NULL);
+ dos_header->e_cp = size / 512;
+ nt_header->OptionalHeader.SizeOfImage = size;
+#endif
- pfnCheckSumMappedFile = (void *) GetProcAddress (hImagehelp, "CheckSumMappedFile");
+ pfnCheckSumMappedFile =
+ (pfnCheckSumMappedFile_t) GetProcAddress (hImagehelp,
+ "CheckSumMappedFile");
if (pfnCheckSumMappedFile)
{
-// nt_header->FileHeader.TimeDateStamp = time (NULL);
+#if 0
+ nt_header->FileHeader.TimeDateStamp = time (NULL);
+#endif
pfnCheckSumMappedFile (out_file.file_base,
out_file.size,
&headersum,
int
-open_output_file (file_data *p_file, CONST char *filename, unsigned long size)
+open_output_file (file_data *p_file, const char *filename, unsigned long size)
{
HANDLE file;
HANDLE file_mapping;
return FALSE;
file_base = MapViewOfFile (file_mapping, FILE_MAP_WRITE, 0, 0, size);
- if (file_base == 0)
+ if (file_base == NULL)
return FALSE;
p_file->name = filename;
p_file->size = size;
p_file->file = file;
p_file->file_mapping = file_mapping;
- p_file->file_base = file_base;
+ p_file->file_base = (char*) file_base;
return TRUE;
}
DUMP_MSG (("Dumping data section...\n"));
DUMP_MSG (("\t0x%08x Address in process.\n", data_va));
DUMP_MSG (("\t0x%08x Offset in output file.\n",
- data_file - p_outfile->file_base));
+ (char*)data_file - p_outfile->file_base));
DUMP_MSG (("\t0x%08x Size in bytes.\n", size));
memcpy (data_file, data_va, size);
/********************** Function Prototypes/Declarations ***********/
-static void unexec_error (CONST char *m, int use_errno, ...);
+static void unexec_error (const char *m, int use_errno, ...);
static int unexec_open (char *filename, int flag, int mode);
static caddr_t unexec_mmap (int fd, size_t len, int prot, int flags);
static long unexec_seek (int fd, long position);
/*******************************************************************/
static void
-unexec_error (CONST char *fmt, int use_errno, ...)
+unexec_error (const char *fmt, int use_errno, ...)
{
- CONST char *err_msg = SYS_ERR;
+ const char *err_msg = SYS_ERR;
va_list args;
fprintf (stderr, "unexec - ");
/* Function to call to issue a warning;
0 means don't issue them. */
-static void (*warn_function) (CONST char *);
+static void (*warn_function) (const char *);
/* Get more memory space, complaining if we're near the end. */
also declare where the end of pure storage is. */
void
-memory_warnings (void *start, void (*warnfun) (CONST char *))
+memory_warnings (void *start, void (*warnfun) (const char *))
{
extern void (* __after_morecore_hook) (void); /* From gmalloc.c */
if (start)
- data_space_start = start;
+ data_space_start = (char*) start;
else
data_space_start = start_of_data ();
INIT_DISP_VARIABLE (window_end_pos, 0);
p->redisplay_end_trigger = Qnil;
+ p->gutter_extent_modiff[0] = 0;
+ p->gutter_extent_modiff[1] = 0;
+ p->gutter_extent_modiff[2] = 0;
+ p->gutter_extent_modiff[3] = 0;
+
#define WINDOW_SLOT(slot, compare) p->slot = Qnil
#include "winslots.h"
}
DEFUN ("window-truncated-p", Fwindow_truncated_p, 0, 1, 0, /*
-Returns Non-Nil iff the window is truncated.
+Returns non-nil if text in the window is truncated.
*/
(window))
{
relative to the frame, not the window.
****************************************************************************/
-int
-window_top_gutter_height (struct window *w)
+static int
+window_top_window_gutter_height (struct window *w)
{
- int gutter = WINDOW_REAL_TOP_GUTTER_BOUNDS (w);
-
if (!NILP (w->hchild) || !NILP (w->vchild))
return 0;
-
+
#ifdef HAVE_SCROLLBARS
if (!NILP (w->scrollbar_on_top_p))
- return window_scrollbar_height (w) + gutter;
+ return window_scrollbar_height (w);
else
#endif
- return gutter;
+ return 0;
}
int
-window_bottom_gutter_height (struct window *w)
+window_top_gutter_height (struct window *w)
{
- int gutter = WINDOW_REAL_BOTTOM_GUTTER_BOUNDS (w);
+ return window_top_window_gutter_height (w);
+}
+
+static int
+window_bottom_window_gutter_height (struct window *w)
+{
+ int gutter;
if (!NILP (w->hchild) || !NILP (w->vchild))
return 0;
- gutter += window_modeline_height (w);
+ gutter = window_modeline_height (w);
#ifdef HAVE_SCROLLBARS
if (NILP (w->scrollbar_on_top_p))
}
int
-window_left_gutter_width (struct window *w, int modeline)
+window_bottom_gutter_height (struct window *w)
{
- int gutter = WINDOW_REAL_LEFT_GUTTER_BOUNDS (w);
+ return window_bottom_window_gutter_height (w);
+}
+static int
+window_left_window_gutter_width (struct window *w, int modeline)
+{
if (!NILP (w->hchild) || !NILP (w->vchild))
return 0;
#ifdef HAVE_SCROLLBARS
if (!modeline && !NILP (w->scrollbar_on_left_p))
- gutter += window_scrollbar_width (w);
+ return window_scrollbar_width (w);
#endif
- return gutter;
+ return 0;
}
int
-window_right_gutter_width (struct window *w, int modeline)
+window_left_gutter_width (struct window *w, int modeline)
{
- int gutter = WINDOW_REAL_RIGHT_GUTTER_BOUNDS (w);
+ return window_left_window_gutter_width (w, modeline);
+}
+
+static int
+window_right_window_gutter_width (struct window *w, int modeline)
+{
+ int gutter = 0;
if (!NILP (w->hchild) || !NILP (w->vchild))
return 0;
return gutter;
}
+int
+window_right_gutter_width (struct window *w, int modeline)
+{
+ return window_right_window_gutter_width (w, modeline);
+}
+
+static int
+window_pixel_height (struct window* w)
+{
+ return WINDOW_HEIGHT (w);
+}
+
\f
DEFUN ("windowp", Fwindowp, 1, 1, 0, /*
Return t if OBJ is a window.
Use `window-height' to get consistent results in geometry calculations.
Use `window-displayed-height' to get the actual number of lines
currently displayed in a window.
+
+The names are somewhat confusing; here's a table to help out:
+
+ width height
+-------------------------------------------------------------------------
+w/o gutters
+ (rows/columns) window-width window-text-area-height
+ (pixels) window-text-area-pixel-width window-text-area-pixel-height
+
+with gutters
+ (rows/columns) window-full-width window-height
+ (pixels) window-pixel-width window-pixel-height
+
+actually displayed
+ (rows/columns) ---- window-displayed-height
+ (pixels) ---- window-displayed-text-pixel-height
*/
(window))
{
*/
(window))
{
- return make_int (decode_window (window)->pixel_height);
+ return make_int (window_pixel_height (decode_window (window)));
+}
+
+DEFUN ("window-text-area-height", Fwindow_text_area_height, 0, 1, 0, /*
+Return the number of default lines in the text area of WINDOW.
+This actually works by dividing the window's text area pixel height (i.e.
+excluding the modeline and horizontal scrollbar, if any) by the height of the
+default font; therefore, the number of displayed lines will probably
+be different.
+See also `window-height' and `window-displayed-height'.
+*/
+ (window))
+{
+ return make_int (window_char_height (decode_window (window), 0));
}
DEFUN ("window-text-area-pixel-height",
DEFUN ("window-width", Fwindow_width, 0, 1, 0, /*
Return the number of display columns in WINDOW.
-This is the width that is usable columns available for text in WINDOW.
+This is the width that is usable columns available for text in WINDOW,
+and does not include vertical scrollbars, dividers, or the like. See also
+`window-full-width' and `window-height'.
*/
(window))
{
return make_int (window_char_width (decode_window (window), 0));
}
+DEFUN ("window-full-width", Fwindow_full_width, 0, 1, 0, /*
+Return the total number of columns in WINDOW.
+This is like `window-width' but includes vertical scrollbars, dividers,
+etc.
+*/
+ (window))
+{
+ return make_int (window_char_width (decode_window (window), 1));
+}
+
DEFUN ("window-pixel-width", Fwindow_pixel_width, 0, 1, 0, /*
Return the width of WINDOW in pixels. Defaults to current window.
*/
DEFUN ("window-pixel-edges", Fwindow_pixel_edges, 0, 1, 0, /*
Return a list of the pixel edge coordinates of WINDOW.
\(LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at top left corner of frame.
-The frame toolbars and menubars are considered to be outside of this area.
+The frame toolbars, menubars and gutters are considered to be outside of this area.
*/
(window))
{
struct window *w = decode_window (window);
- struct frame *f = XFRAME (w->frame);
- int left = w->pixel_left - FRAME_LEFT_BORDER_END (f);
- int top = w->pixel_top - FRAME_TOP_BORDER_END (f);
+ int left = w->pixel_left;
+ int top = w->pixel_top;
return list4 (make_int (left),
make_int (top),
}
}
+DEFUN ("window-last-line-visible-height", Fwindow_last_line_visible_height, 0, 1, 0, /*
+Return pixel height of visible part of last window line if it is clipped.
+If the last line is not clipped, return nil.
+*/
+ (window))
+{
+ struct window *w = decode_window (window);
+ display_line_dynarr *dla = window_display_lines (w, CURRENT_DISP);
+ int num_lines = Dynarr_length (dla);
+ struct display_line *dl;
+
+ /* No lines - no clipped lines */
+ if (num_lines == 0 || (num_lines == 1 && Dynarr_atp (dla, 0)->modeline))
+ return Qnil;
+
+ dl = Dynarr_atp (dla, num_lines - 1);
+ if (dl->clip == 0)
+ return Qnil;
+
+ return make_int (dl->ascent + dl->descent - dl->clip);
+}
+
DEFUN ("set-window-point", Fset_window_point, 2, 2, 0, /*
Make point value in WINDOW be at position POS in WINDOW's buffer.
*/
/* we have already caught dead-window errors */
if (!NILP (w->hchild) || !NILP (w->vchild))
error ("Trying to select non-leaf window");
-
+
w->use_time = make_int (++window_select_count);
+
if (EQ (window, old_selected_window))
return window;
p->line_start_cache = Dynarr_new (line_start_cache);
p->face_cachels = Dynarr_new (face_cachel);
p->glyph_cachels = Dynarr_new (glyph_cachel);
+ p->subwindow_instance_cache =
+ make_lisp_hash_table (10,
+ HASH_TABLE_KEY_WEAK,
+ HASH_TABLE_EQ);
/* Put new into window structure in place of window */
replace_window (window, new);
}
static int
-window_pixel_height (Lisp_Object window)
-{
- return WINDOW_HEIGHT (XWINDOW (window));
-}
-
-static int
window_pixel_height_to_char_height (struct window *w, int pixel_height,
int include_gutters_p)
{
avail_height = (pixel_height -
(include_gutters_p ? 0 :
- window_top_gutter_height (w) +
- window_bottom_gutter_height (w)));
+ window_top_window_gutter_height (w) +
+ window_bottom_window_gutter_height (w)));
default_face_height_and_width (window, &defheight, &defwidth);
avail_height = char_height * defheight;
pixel_height = (avail_height +
(include_gutters_p ? 0 :
- window_top_gutter_height (w) +
- window_bottom_gutter_height (w)));
+ window_top_window_gutter_height (w) +
+ window_bottom_window_gutter_height (w)));
/* It's the calling function's responsibility to check these values
and make sure they're not out of range.
/* Return number of default lines of text can fit in the window W.
If INCLUDE_GUTTERS_P is 1, include "gutter" space (modeline plus
horizontal scrollbar) in the space that is used for the calculation.
+ This doesn't include space used by the frame gutters.
*/
int
window_char_height (struct window *w, int include_gutters_p)
{
- return window_pixel_height_to_char_height (w, WINDOW_HEIGHT (w),
+ return window_pixel_height_to_char_height (w, window_pixel_height (w),
include_gutters_p);
}
return WINDOW_WIDTH (XWINDOW (window));
}
+/* Calculate the pixel of a window, optionally including margin space
+ but no vertical gutters. */
static int
window_pixel_width_to_char_width (struct window *w, int pixel_width,
int include_margins_p)
avail_width = char_width * defwidth;
pixel_width = (avail_width +
- window_left_gutter_width (w, 0) +
- window_right_gutter_width (w, 0) +
+ window_left_window_gutter_width (w, 0) +
+ window_right_window_gutter_width (w, 0) +
(include_margins_p ? 0 : window_left_margin_width (w)) +
(include_margins_p ? 0 : window_right_margin_width (w)));
(widthflag ? window_min_width : MINI_WINDOW_P (XWINDOW (window)) \
? 1 : window_min_height)
+static int
+window_pixheight (Lisp_Object w)
+{
+ return window_pixel_height (XWINDOW (w));
+}
+
/* Unlike set_window_pixheight, this function
also changes the heights of the siblings so as to
keep everything consistent. */
int *sizep;
int (*sizefun) (Lisp_Object) = (widthflag
? window_pixel_width
- : window_pixel_height);
+ : window_pixheight);
void (*setsizefun) (Lisp_Object, int, int) = (widthflag
? set_window_pixwidth
: set_window_pixheight);
}
static size_t
-sizeof_window_config (CONST void *h)
+sizeof_window_config (const void *h)
{
- CONST struct window_config *c = (CONST struct window_config *) h;
+ const struct window_config *c = (const struct window_config *) h;
return sizeof_window_config_for_n_windows (c->saved_windows_count);
}
frame "sizes" maybe equal but the windows still should be
resized. This is tickled alot by the new "character size
stays constant" policy in 21.0. It leads to very wierd
- glitches (and possibly craches when asserts are tickled).
+ glitches (and possibly crashes when asserts are tickled).
Just changing the units doens't help because changing the
toolbar configuration can also change the pixel positions.
w->glyph_cachels = Dynarr_new (glyph_cachel);
if (!w->line_start_cache)
w->line_start_cache = Dynarr_new (line_start_cache);
+ w->gutter_extent_modiff[0] = 0;
+ w->gutter_extent_modiff[1] = 0;
+ w->gutter_extent_modiff[2] = 0;
+ w->gutter_extent_modiff[3] = 0;
w->dead = 0;
if (p->parent_index >= 0)
the restored current_window. */
if (f == selected_frame ())
{
+#if 0
/* When using `pop-window-configuration', often the minibuffer
ends up as the selected window even though it's not active ...
I really don't know the cause of this, but it should never
#### Find out why this is really going wrong. */
if (!minibuf_level &&
MINI_WINDOW_P (XWINDOW (config->current_window)))
- Fselect_window (Fnext_window (config->current_window,
- Qnil, Qnil, Qnil),
- Qnil);
+ window_to_select = Fnext_window (config->current_window,
+ Qnil, Qnil, Qnil);
else
- Fselect_window (config->current_window, Qnil);
+ window_to_select = config->current_window;
+#endif
+ /* Do this last so that buffer stacking is calculated
+ correctly. */
+ Fselect_window (config->current_window, Qnil);
+
if (!NILP (new_current_buffer))
- Fset_buffer (new_current_buffer);
+ {
+ Fset_buffer (new_current_buffer);
+ Frecord_buffer (new_current_buffer);
+ }
else
- Fset_buffer (XWINDOW (Fselected_window (Qnil))->buffer);
+ {
+ Fset_buffer (XWINDOW (config->current_window)->buffer);
+ Frecord_buffer (XWINDOW (config->current_window)->buffer);
+ }
}
else
set_frame_selected_window (f, config->current_window);
/*
config->frame_width = FRAME_WIDTH (f);
config->frame_height = FRAME_HEIGHT (f); */
- config->current_window = FRAME_SELECTED_WINDOW (f);
+ /* When using `push-window-configuration', often the minibuffer ends
+ up as the selected window because functions run as the result of
+ user interaction e.g. hyper-apropros. It seems to me the sensible
+ thing to do is not record the minibuffer here. */
+ if (FRAME_MINIBUF_ONLY_P (f) || minibuf_level)
+ config->current_window = FRAME_SELECTED_WINDOW (f);
+ else
+ config->current_window = FRAME_LAST_NONMINIBUF_WINDOW (f);
XSETBUFFER (config->current_buffer, current_buffer);
config->minibuffer_scroll_window = Vminibuffer_scroll_window;
config->root_window = FRAME_ROOT_WINDOW (f);
child = Fwindow_first_hchild (window);
for (i = level; i > 0; i--)
- putc ('\t', stderr);
+ stderr_out ("\t");
- fputs ("#<window", stderr);
+ stderr_out ("#<window");
{
Lisp_Object buffer = XWINDOW (window)->buffer;
if (!NILP (buffer) && BUFFERP (buffer))
- fprintf (stderr, " on %s", XSTRING_DATA (XBUFFER (buffer)->name));
+ stderr_out (" on %s", XSTRING_DATA (XBUFFER (buffer)->name));
}
- fprintf (stderr, " 0x%x>", XWINDOW (window)->header.uid);
+ stderr_out (" 0x%x>", XWINDOW (window)->header.uid);
while (!NILP (child))
{
void
syms_of_window (void)
{
+ INIT_LRECORD_IMPLEMENTATION (window);
+ INIT_LRECORD_IMPLEMENTATION (window_configuration);
+
defsymbol (&Qwindowp, "windowp");
defsymbol (&Qwindow_live_p, "window-live-p");
defsymbol (&Qwindow_configurationp, "window-configuration-p");
DEFSUBR (Fwindow_height);
DEFSUBR (Fwindow_displayed_height);
DEFSUBR (Fwindow_width);
+ DEFSUBR (Fwindow_full_width);
DEFSUBR (Fwindow_pixel_height);
DEFSUBR (Fwindow_pixel_width);
+ DEFSUBR (Fwindow_text_area_height);
DEFSUBR (Fwindow_text_area_pixel_height);
DEFSUBR (Fwindow_displayed_text_pixel_height);
DEFSUBR (Fwindow_text_area_pixel_width);
DEFSUBR (Fwindow_point);
DEFSUBR (Fwindow_start);
DEFSUBR (Fwindow_end);
+ DEFSUBR (Fwindow_last_line_visible_height);
DEFSUBR (Fset_window_point);
DEFSUBR (Fset_window_start);
DEFSUBR (Fwindow_dedicated_p);
must run the redisplay-end-trigger-functions. */
Lisp_Object redisplay_end_trigger;
+ /* Set by the extent code when extents in the gutter are changed. */
+ int gutter_extent_modiff[4];
+
/* Set by redisplay to the last position seen. This is used
to implement the redisplay-end-trigger-functions. */
Bufpos last_redisplay_pos;
This is not a size hog because the value here is not copied,
and will be shared with the specs in the specifier. */
WINDOW_SLOT_ARRAY (gutter, 4, EQUAL_WRAPPED);
+ /* Real (pre-calculated) gutter specification for each of the four positions.
+ This is not a specifier, it is calculated by the specifier change
+ functions. */
+ WINDOW_SLOT_ARRAY (real_gutter, 4, EQUAL_WRAPPED);
/* Gutter size for each of the four positions. */
WINDOW_SLOT_ARRAY (gutter_size, 4, EQUAL_WRAPPED);
/* Real (pre-calculated) gutter size for each of the four positions.
#ifdef GCCACHE_HASH
static unsigned long
-gc_cache_hash (CONST void *arg)
+gc_cache_hash (const void *arg)
{
- CONST struct gcv_and_mask *gcvm = (CONST struct gcv_and_mask *) arg;
+ const struct gcv_and_mask *gcvm = (const struct gcv_and_mask *) arg;
unsigned long *longs = (unsigned long *) &gcvm->gcv;
unsigned long hash = gcvm->mask;
int i;
#endif /* GCCACHE_HASH */
static int
-gc_cache_eql (CONST void *arg1, CONST void *arg2)
+gc_cache_eql (const void *arg1, const void *arg2)
{
/* See comment in gc_cache_hash */
return !memcmp (arg1, arg2, sizeof (struct gcv_and_mask));
#ifdef GCCACHE_HASH
- if (gethash (&gcvm, cache->table, (CONST void **) &cell))
+ if (gethash (&gcvm, cache->table, (const void **) &cell))
#else /* !GCCACHE_HASH */
#ifndef INCLUDED_xintrinsic_h_
#define INCLUDED_xintrinsic_h_
-#undef CONST /* X11R4 header thinks it can define CONST */
-
#include <X11/Intrinsic.h>
-#ifdef CONST_IS_LOSING
-# define CONST
-#else
-# define CONST const
-#endif
-
#endif /* INCLUDED_xintrinsic_h_ */
#ifndef INCLUDED_xintrinsicp_h_
#define INCLUDED_xintrinsicp_h_
-#undef CONST /* X11R4 header thinks it can define CONST */
-
#include <X11/Intrinsic.h>
#include <X11/IntrinsicP.h>
#include <X11/ObjectP.h> /* apparently some IntrinsicP.h don't have this */
-#ifdef CONST_IS_LOSING
-# define CONST
-#else
-# define CONST const
-#endif
-
#endif /* INCLUDED_xintrinsicp_h_ */
#include <ctype.h>
-int XmuCursorNameToIndex (CONST char *name)
+int XmuCursorNameToIndex (const char *name)
{
- static CONST struct _CursorName {
- CONST char *name;
+ static const struct _CursorName {
+ const char *name;
unsigned int shape;
} cursor_names[] = {
{"x_cursor", XC_X_cursor},
{"watch", XC_watch},
{"xterm", XC_xterm},
};
- CONST struct _CursorName *table;
+ const struct _CursorName *table;
int i;
char tmp[40];
}
-int XmuReadBitmapDataFromFile (CONST char *filename,
+int XmuReadBitmapDataFromFile (const char *filename,
/* Remaining args are RETURNED */
unsigned int *width,
unsigned int *height,
return XmuPrintDefaultErrorMessage (dpy, errorp, stderr);
}
-void XmuCopyISOLatin1Lowered(char *dst, CONST char *src)
+void XmuCopyISOLatin1Lowered(char *dst, const char *src)
{
unsigned char *dest = (unsigned char *) dst;
unsigned char *source = (unsigned char *) src;
#else
-int XmuCursorNameToIndex (CONST char *name);
-int XmuReadBitmapDataFromFile (CONST char *filename, unsigned int *width,
+int XmuCursorNameToIndex (const char *name);
+int XmuReadBitmapDataFromFile (const char *filename, unsigned int *width,
unsigned int *height, unsigned char **datap,
int *x_hot, int *y_hot);
int XmuPrintDefaultErrorMessage (Display *dpy, XErrorEvent *event, FILE *fp);
-void XmuCopyISOLatin1Lowered (char *, CONST char *);
+void XmuCopyISOLatin1Lowered (char *, const char *);
#define Max(x, y) (((x) > (y)) ? (x) : (y))
#define Min(x, y) (((x) < (y)) ? (x) : (y))
+2000-05-01 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.33 is released.
+
+2000-03-20 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.32 is released.
+
+2000-03-10 Martin Buchholz <martin@xemacs.org>
+
+ * automated/mule-tests.el: Check that (make-temp-name) returns
+ unique values.
+
+2000-03-06 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * gutter-test.el: Fix name of specifier.
+
+2000-02-23 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.31 is released.
+
+2000-02-21 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.30 is released.
+
+2000-02-17 Martin Buchholz <martin@xemacs.org>
+
+ * automated/mule-tests.el: Added some fileio tests.
+
+2000-02-16 Martin Buchholz <martin@xemacs.org>
+
+ * XEmacs 21.2.29 is released.
+
+2000-02-13 Martin Buchholz <martin@xemacs.org>
+
+ * automated/lisp-tests.el: Add subseq tests.
+
2000-02-07 Martin Buchholz <martin@xemacs.org>
* XEmacs 21.2.28 is released.
(defconst bt-nonbase64-chars (set-difference (mapcar #'identity bt-allchars)
bt-base64-chars))
-(when t
- ;; This code crashes some versions of XEmacs 21.2! This requires
- ;; further investigation. I (hniksic) am running Linux, and for me,
- ;; XEmacs used to crash in Fmapconcat()->mapcar1(), after a GC that
- ;; thrashes the stack. Raymond Toy reported a similar crash under
- ;; Solaris. I can no longer repeat the bug, so I cannot fix it now.
- (loop for (raw encoded) in bt-test-strings do
- (unless (equal raw "")
- (let* ((middlepos (/ (1+ (length encoded)) 2))
- (left (substring encoded 0 middlepos))
- (right (substring encoded middlepos)))
- ;; Whitespace at the beginning, end, and middle.
- (let ((mangled (concat bt-nonbase64-chars left bt-nonbase64-chars right
- bt-nonbase64-chars)))
- (Assert (equal (bt-base64-decode-string mangled) raw)))
-
- ;; Whitespace between every char.
- (let ((mangled (concat bt-nonbase64-chars
- ;; ENCODED with bt-nonbase64-chars
- ;; between every character.
- (mapconcat #'char-to-string encoded
- (apply #'string bt-nonbase64-chars))
- bt-nonbase64-chars)))
- (Assert (equal (bt-base64-decode-string mangled) raw))))))
- )
+(loop for (raw encoded) in bt-test-strings do
+ (unless (equal raw "")
+ (let* ((middlepos (/ (1+ (length encoded)) 2))
+ (left (substring encoded 0 middlepos))
+ (right (substring encoded middlepos)))
+ ;; Whitespace at the beginning, end, and middle.
+ (let ((mangled (concat bt-nonbase64-chars left bt-nonbase64-chars right
+ bt-nonbase64-chars)))
+ (Assert (equal (bt-base64-decode-string mangled) raw)))
+
+ ;; Whitespace between every char.
+ (let ((mangled (concat bt-nonbase64-chars
+ ;; ENCODED with bt-nonbase64-chars
+ ;; between every character.
+ (mapconcat #'char-to-string encoded
+ (apply #'string bt-nonbase64-chars))
+ bt-nonbase64-chars)))
+ (Assert (equal (bt-base64-decode-string mangled) raw))))))
;;-----------------------------------------------------
;; Mixed...
(Assert (eq 'baz (getf '(bar baz) 'bar)))
(Assert (eq 'baz (getf (symbol-plist sym) 'bar)))
(Assert (eq 2 (getf '(1 2) 1)))
+ (Assert (eq 4 (put sym 3 4)))
+ (Assert (eq 4 (get sym 3)))
+ (Assert (eq t (remprop sym 3)))
+ (Assert (eq nil (remprop sym 3)))
+ (Assert (eq 5 (get sym 3 5)))
)
+
+(loop for obj in
+ (list (make-symbol "test-symbol")
+ "test-string"
+ (make-extent nil nil nil)
+ (make-face 'test-face))
+ do
+ (Assert (eq 2 (get obj ?1 2)))
+ (Assert (eq 4 (put obj ?3 4)))
+ (Assert (eq 4 (get obj ?3)))
+ (when (or (stringp obj) (symbolp obj))
+ (Assert (equal '(?3 4) (object-plist obj))))
+ (Assert (eq t (remprop obj ?3)))
+ (when (or (stringp obj) (symbolp obj))
+ (Assert (eq '() (object-plist obj))))
+ (Assert (eq nil (remprop obj ?3)))
+ (when (or (stringp obj) (symbolp obj))
+ (Assert (eq '() (object-plist obj))))
+ (Assert (eq 5 (get obj ?3 5)))
+ )
+
+(Check-Error-Message
+ error "Object type has no properties"
+ (get 2 'property))
+
+(Check-Error-Message
+ error "Object type has no settable properties"
+ (put (current-buffer) 'property 'value))
+
+(Check-Error-Message
+ error "Object type has no removable properties"
+ (remprop ?3 'property))
+
+(Check-Error-Message
+ error "Object type has no properties"
+ (object-plist (symbol-function 'car)))
+
+(Check-Error-Message
+ error "Can't remove property from object"
+ (remprop (make-extent nil nil nil) 'detachable))
+
+;;-----------------------------------------------------
+;; Test subseq
+;;-----------------------------------------------------
+(Assert (equal (subseq nil 0) nil))
+(Assert (equal (subseq [1 2 3] 0) [1 2 3]))
+(Assert (equal (subseq [1 2 3] 1 -1) [2]))
+(Assert (equal (subseq "123" 0) "123"))
+(Assert (equal (subseq "1234" -3 -1) "23"))
+(Assert (equal (subseq #*0011 0) #*0011))
+(Assert (equal (subseq #*0011 -3 3) #*01))
+(Assert (equal (subseq '(1 2 3) 0) '(1 2 3)))
+(Assert (equal (subseq '(1 2 3 4) -3 nil) '(2 3 4)))
+
+(Check-Error 'wrong-type-argument (subseq 3 2))
+(Check-Error 'args-out-of-range (subseq [1 2 3] -42))
+(Check-Error 'args-out-of-range (subseq [1 2 3] 0 42))
;;-----------------------------------------------------------------
(when (featurep 'mule)
+ ;;---------------------------------------------------------------
;; Test fillarray
+ ;;---------------------------------------------------------------
(macrolet
((fillarray-test
(charset1 charset2)
(aset string 0 (make-char 'latin-iso8859-2 42))
(Assert (eq (aref string 1) (make-char 'latin-iso8859-2 69))))
+ ;;---------------------------------------------------------------
;; Test coding system functions
+ ;;---------------------------------------------------------------
;; Create alias for coding system without subsidiaries
(Assert (coding-system-p (find-coding-system 'binary)))
(Assert (not (coding-system-alias-p 'nested-mule-tests-alias)))
(Assert (not (coding-system-alias-p 'nested-mule-tests-alias-dos)))
+ ;;---------------------------------------------------------------
;; Test strings waxing and waning across the 8k BIG_STRING limit (see alloc.c)
+ ;;---------------------------------------------------------------
(defun charset-char-string (charset)
(let (lo hi string n)
(if (= (charset-chars charset) 94)
(loop for k in '(0 1 58 59) do
(Assert (equal (substring string (* 94 k) (* 94 (1+ k))) ascii-string))))
+ ;;---------------------------------------------------------------
+ ;; Test file-system character conversion (and, en passant, file ops)
+ ;;---------------------------------------------------------------
+ (let* ((scaron (make-char 'latin-iso8859-2 57))
+ (latin2-string (make-string 4 scaron))
+ (prefix (concat (file-name-as-directory (temp-directory)) latin2-string))
+ (name1 (make-temp-name prefix))
+ (name2 (make-temp-name prefix))
+ (file-name-coding-system 'iso-8859-2))
+ ;; This is how you suppress output from `message', called by `write-region'
+ (flet ((append-message (&rest args) ()))
+ (Assert (not (equal name1 name2)))
+ (Assert (not (file-exists-p name1)))
+ (write-region (point-min) (point-max) name1)
+ (Assert (file-exists-p name1))
+ (when (fboundp 'make-symbolic-link)
+ (make-symbolic-link name1 name2)
+ (Assert (file-exists-p name2))
+ (Assert (equal (file-truename name2) name1))
+ (Assert (equal (file-truename name1) name1)))
+
+ (ignore-file-errors (delete-file name1) (delete-file name2))))
+
+ ;; Add many more file operation tests here...
+
)
(make-extent (point) (point))
(setq radio-button1
(make-glyph
- [button :descriptor ["ok " (setq ok-select t)
+ [button :face widget
+ :descriptor ["ok1" (setq ok-select t)
:style radio :selected ok-select]])))
;; button in a group
(set-extent-begin-glyph
(make-extent (point) (point))
(setq radio-button2
(make-glyph
- [button :descriptor ["ok" (setq ok-select nil) :style radio
+` [button :descriptor ["ok2" (setq ok-select nil) :style radio
:selected (not ok-select)]])))
;; toggle button
(set-extent-begin-glyph
(make-extent (point) (point))
(setq tbutton
- (make-glyph [button :descriptor ["ok" (setq ok-select nil)
+ (make-glyph [button :descriptor ["ok3" (setq ok-select nil)
:style toggle
:selected (not ok-select)]])))
(set-extent-begin-glyph
(make-extent (point) (point))
(setq toggle-button
- (make-glyph [button :descriptor ["ok" :style toggle
+ (make-glyph [button :descriptor ["ok4" :style toggle
:callback
(setq ok-select (not ok-select))
:selected ok-select]])))
(setq push-button
(make-glyph [button :width 10 :height 2
:face modeline-mousable
- :descriptor "ok" :callback foo
+ :descriptor "ok" :callback foo
:selected t])))
;; tree view
(set-extent-begin-glyph
[tab-control :descriptor "My Tab"
:face highlight
:orientation right
- :properties (:items (["One" foo]
- ["Two" fee]
- ["Three" foo]))])))
+ :properties (:items (["One" foo :selected t]
+ ["Two" fee :selected nil]
+ ["Three" foo :selected nil]))])))
;; progress gauge
(set-extent-begin-glyph
;; progress the progress ...
(let ((x 0))
(while (<= x 100)
- (set-image-instance-property (glyph-image-instance pgauge) :percent x)
+ (set-image-instance-property (glyph-image-instance pgauge) :value x)
(setq x (+ x 5))
(sit-for 0.1)))
;; progress the progress ...
(let ((x 0))
(while (<= x 100)
- (set-image-instance-property (glyph-image-instance pg) :percent x)
+ (set-image-instance-property (glyph-image-instance pg) :value x)
(setq x (+ x 5))
(sit-for 0.1)))
-(setq str "Hello There\nHello Again")
+(setq str "Hello\nAgain")
+(setq str-ext (make-extent 0 5 str))
(set-extent-begin-glyph
- (make-extent 0 0 str)
+ str-ext
(make-glyph [xpm :file "../etc/xemacs-icon.xpm"]))
+(set-extent-property str-ext 'mouse-face 'highlight)
+(setq str2 "Hello\n")
+(setq str2-ext (make-extent 0 1 str2))
(set-extent-begin-glyph
- (make-extent 3 3 str)
+ str2-ext
(make-glyph
[button :width 5 :height 1
:face modeline-mousable
+ :callback (set-specifier bottom-gutter-visible-p '(str2))
:descriptor "ok" :selected t]))
-(set-specifier default-gutter-height 'autodetect)
-(set-specifier default-gutter-width 40)
-(set-specifier default-gutter-border-width 2)
-(set-specifier default-gutter str)
-(set-default-gutter-position 'bottom)
+(set-specifier bottom-gutter-height 'autodetect)
+(set-specifier bottom-gutter-border-width 2)
+(set-gutter-element bottom-gutter 'str str)
+(set-gutter-element bottom-gutter 'str2 str2)
+(set-gutter-element-visible-p bottom-gutter-visible-p 'str t)
+(set-gutter-element-visible-p bottom-gutter-visible-p 'str2 t)
emacs_is_beta=t
emacs_major_version=21
emacs_minor_version=2
-emacs_beta_version=28
-xemacs_codename="Hermes"
+emacs_beta_version=33
+xemacs_codename="Melpomene"
infodock_major_version=4
infodock_minor_version=0
infodock_build_version=8