which included commits to RCS files with non-trunk default branches.
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.
+such as OpenBSD and OSF/Tru64 the default is 2MB which is too low. On
+MacOS/X (Darwin), it's 512kB. 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
XEmacs requires an ANSI C compiler, such as GCC. If you wish to build
the documentation yourself, you will need at least version 1.68 of
-makeinfo (GNU texinfo-3.11).
+makeinfo (GNU texinfo-3.11). GNU Texinfo 4.2 is recommended; it is
+necessary for building packages, and we may move to it for the core.
ADD-ON LIBRARIES
================
directions in README.packages. You can not have a working XEmacs
without downloading some additional packages.
-See the file PROBLEMS in this directory for a list of various
-problems sometimes encountered, and what to do about them.
+See the file PROBLEMS in this directory for a list of various problems
+sometimes encountered, and what to do about them. PROBLEMS is also
+the place where platform-specific build notes can be found.
* Problems with running XEmacs
==============================
** General
+*** At startup I get a warning on stderr about missing charsets:
+
+ Warning: Missing charsets in String to FontSet conversion
+
+You need to specify appropriate charsets for your locale (usually the
+value of the LANG environment variable) in .Xresources. See
+etc/Emacs.ad for the relevant resources (mostly menubar fonts and
+fontsets). Do not edit this file, it's purely informative.
+
+If you have no satisfactory fonts for iso-8859-1, XEmacs will crash.
+
+It looks like XFree86 4.x (the usual server on Linux and *BSD) has
+some braindamage where .UTF-8 locales will always generate this
+message, because the XFree86 (font)server doesn't know that UTF-8 will
+use the ISO10646-1 font registry (or a Cmap or something).
+
+If you are not using a .UTF-8 locale and see this warning for a
+character set not listed in the default in Emacs.ad, please let
+xemacs-beta@xemacs.org know about it, so we can add fonts to the
+appropriate fontsets and stifle this warning. (Unfortunately it's
+buried in Xlib, so we can't easily get rid of it otherwise.)
+
*** Whenever I try to retrieve a remote file, I have problems.
A typical error: FTP Error: USER request failed; 500 AUTH not understood.
Emacs*EmacsFrame.geometry: 81x56--9--1
+** MacOS/X, Darwin
+*** XEmacs crashes on MacOS within font-lock, or when dealing
+with large compilation buffers, or in other regex applications.
+
+The default stack size under MacOS/X is rather small (512k as opposed
+to Solaris 8M), hosing the regexp code, which uses alloca()
+extensively, overflowing the stack when complex regexps are used.
+Workarounds:
+
+1) Increase your stack size, using `ulimit -s 8192' or a (t)csh
+ equivalent;
+
+2) Recompile regex.c with REGEX_MALLOC defined.
+
** AIX
*** Your Delete key sends a Backspace to the terminal, using an AIXterm.
** Digital UNIX/OSF/VMS/Ultrix
*** XEmacs crashes on Digital Unix within font-lock, or when dealing
-with large compilation buffers.
+with large compilation buffers, or in other regex applications.
The default stack size under Digital Unix is rather small (2M as
opposed to Solaris 8M), hosing the regexp code, which uses alloca()
** Cygwin
+*** XEmacs fails to start because cygXpm-noX4.dll was not found.
+
+Andy Piper <andy@xemacs.org> sez:
+
+ cygXpm-noX4 is part of the cygwin distribution under libraries or
+ graphics, but is not installed by default. You need to run the
+ cygwin setup again and select this package.
+
*** Subprocesses do not work.
You do not have "tty" in your CYGWIN environment variable. This must
Set compilation and installation parameters for XEmacs, and report.
-Note that for most of the following options, you can explicitly enable
-them using `--OPTION=yes' and explicitly disable them using `--OPTION=no'.
-This is especially useful for auto-detected options.
-The option `--without-FEATURE' is a synonym for `--with-FEATURE=no'.
-
-Options marked with a (*) are auto-detected.
-
-Many features require external packages to be installed first.
-Get them from ftp://ftp.xemacs.org/pub/xemacs/aux.
+CONFIGURATION is an optional architecture-vendor-os triple, such as
+`sparc-sun-solaris2.7'. When possible, omit it; configure will detect it.
+
+Conventions for options:
+- Boolean options may be explicitly enabled by using `--OPTION=yes' and
+ explicitly disabled by using `--OPTION=no'. `--OPTION' (with no argument)
+ is equivalent to `--OPTION=yes'. `--without-FEATURE' is a synonym for
+ `--with-FEATURE=no'. Denoted `(Bool)' below.
+- Enumerated options accept one type from a specified list. These usually
+ accept `--OPTION=no' to disable it entirely, and `--OPTION=yes' often has a
+ useful default. Denoted `(Enum)'.
+- Set options accept one or more types from a list of implementations of the
+ feature. All specified implementations will be included. Prefix a type
+ with `no' to disable only that implementation (e.g., `--with-sound=noesd'
+ to disable ESD). The special values `none' and `all' must be first in the
+ list if used. They change the defaults for all types individually from
+ autodetect to `no' or `yes' respectively. `--with-sound=none,native' and
+ `--with-sound=noesd,nonas,native' have the same effect. Denoted `(Set)'.
+- Other options have special, option-specific formats.
+
+Options marked with a (*) are auto-detected. If auto-detected and not
+explicitly specified, normally
+- Boolean options default to `yes'.
+- Enumerated options default to the first detected type in an option-specific
+ priority. Possible defaults are marked with (*) and listed in order.
+- Set options default to all detected types.
+
+Some options are provided mainly to disable features which are on by default.
+These are indicated by specifying `--OPTION=no'. Explicitly specifying an
+autodetected option which defaults to `yes' makes a failure to detect signal
+a fatal configure error.
Use colons (or quoted spaces) to separate directory names in option
values which are PATHs (i.e. lists of directories).
+Many features require external packages to be installed. configure will fail
+if an explicitly requested feature depends on an uninstalled package. On many
+Linux systems, you must install -devel versions of the package.
+
The results of configure tests are saved in config.log, which is useful
-for diagnosing problems.
+for diagnosing problems. Caching of configure results is disabled.
+If successful, configure leaves its status in config.status. If
+unsuccessful after disturbing the status quo, it removes config.status.
General options:
Compilation options:
--compiler=PROG C compiler to use
---with-gcc (*) Use GCC to compile XEmacs.
---cflags=FLAGS Compiler flags (such as -O)
---cpp=PROG C preprocessor to use (e.g. /usr/ccs/lib/cpp or cc -E)
---cppflags=FLAGS C preprocessor flags (e.g. -I/foo or -Dfoo=bar)
---libs=LIBS Additional libraries (e.g. -lfoo)
---ldflags=FLAGS Additional linker flags (e.g. -L/foo)
+--with-gcc (*) (Bool) Use GCC to compile XEmacs.
+--cflags=FLAGS Compiler flags (such as `-O')
+--cpp=PROG Set C preprocessor (e.g. `/usr/ccs/lib/cpp', `cc -E')
+--cppflags=FLAGS C preprocessor flags (e.g. `-I/foo' or `-Dfoo=bar')
+--libs=LIBS Additional libraries (e.g. `-lfoo')
+--ldflags=FLAGS Additional linker flags (e.g. `-L/foo')
--site-includes=PATH List of directories to search first for header files
--site-libraries=PATH List of directories to search first for libraries
--site-prefixes=PATH List of directories to search for include/ and lib/
subdirectories, just after 'site-includes' and
'site-libraries'
---site-runtime-libraries=PATH
- List of ALL directories to search for dynamically
- linked libraries at run time
---dynamic=yes Link dynamically if supported by system.
---dynamic=no Force static linking on systems where dynamic
- linking is the default.
---srcdir=DIR Look for the XEmacs source files in DIR.
- Works best when using GNU Make.
+--site-runtime-libraries=PATH List of ALL directories to search for
+ dynamically linked libraries at run time
+--dynamic (*) (Bool) Link dynamically if supported by system.
+ The default is system-dependent.
+--srcdir=DIR Use the XEmacs source files in DIR. Requires a Make
+ with VPATH; GNU Make is recommended.
Installation options:
--prefix=DIR Install files below DIR. Defaults to `/usr/local'.
---with-prefix=no Don't compile the value of --prefix into the
- executable.
+--with-prefix=no (Bool) Compile the value of `--prefix' into XEmacs.
+--infodir=DIR Install XEmacs Info manuals and dir in DIR.
+--moduledir=DIR Install dynamic modules in DIR.
+
+You may also specify any of the `path' variables found in Makefile.in.in,
+including `--bindir', `--libdir', `--docdir', `--lispdir', `--sitelispdir',
+`--datadir', `--mandir' and so on. These options are DEPRECATED; see INSTALL.
+
+
+Runtime search path options:
+
+--with-site-modules=no (Bool) Search directories in the XEmacs hierarchy named
+ `site-modules' before the installed module directories.
+--with-site-lisp (Bool) Search a site-lisp directory in the XEmacs
+ hierarchy before the packaged Lisp. DEPRECATED.
+--package-path=PATH Directories to search for packages to dump with xemacs.
+ PATH splits into three parts separated by double
+ colons (::), an `early', a `late', and a `last' part,
+ corresponding to their position in the various
+ system paths: The `early' part is always first,
+ the `late' part somewhere in the middle, and the
+ `last' part at the very back.
+ Only the `late' part gets seen at dump time.
+ If PATH has only one component, it is `late'. With two
+ components, the first is `early', the second is `late'.
+--infopath=PATH Directories to search for Info documents, info dir
+ and localdir files if run-time searching fails.
Window-system options:
---with-gtk Support GTK on the X Window System. (EXPERIMENTAL)
---with-gnome Support GNOME on the X Window System. (EXPERIMENTAL)
---with-x11 (*) Support the X Window System.
+--with-gtk (Bool) Use GTK on the X Window System. (EXPERIMENTAL)
+--with-gnome (Bool) Use GNOME on the X Window System. (EXPERIMENTAL)
+--with-x11 (*) (Bool) Support the X Window System.
--x-includes=DIR Search for X header files in DIR.
--x-libraries=DIR Search for X libraries in DIR.
---with-msw (*) Support MS Windows as a window system (only under
- Cygwin and MinGW). `--with-msw=no' may be needed on
- *nix systems with Wine installed.
---with-toolbars=no Don't compile with any toolbar support.
---with-wmcommand=no Compile without realized leader window which will
- keep the WM_COMMAND property.
---with-athena=TYPE Use TYPE Athena widgets
- (xaw, 3d, next, 95, or xpm)
---with-menubars=TYPE Use TYPE menubars (lucid, motif, or no). The Lucid
- widgets emulate Motif (mostly) but are faster.
+--with-msw (*) (Bool) Support MS Windows as a window system (only
+ under Cygwin and MinGW). `--with-msw=no' may be needed
+ on *nix systems with Wine installed.
+--with-wmcommand=no (Bool) Compile without realized leader window which
+ will keep the WM_COMMAND property.
+--with-xmu=no (*) (Bool) For systems whose vendors don't ship Xmu.
+
+
+GUI component options:
+
+Select the widget set used to implement components, Lucid, Motif, or Athena.
+If `--with-gtk', `--with-gnome', or `--with-msw' are used or implied, treat
+component options as Bool. The `lucid' widgets are a homebrew set, emulating
+Motif but faster. Lucid toolbars, menubars, and scrollbars are implemented
+in Xt. Lucid dialogs and misc widgets wrap and enhance Athena (maybe Motif;
+platform-dependent). Several enhanced (eg, 3d) Athena libraries may be used,
+but the default is the X11R6 `libXaw' (flat) widgets. Use `--with-athena' to
+explicitly specify which library to link against.
+
+--with-toolbars=no (Bool) Don't compile with any toolbar support.
+--with-menubars=TYPE (Enum) Types: `lucid'(*), `motif', or `no'.
*WARNING* The Motif menubar is currently broken.
---with-scrollbars=TYPE Use TYPE scrollbars
- (lucid, motif, athena, or no).
---with-dialogs=TYPE Use TYPE dialog boxes (lucid, motif, athena, or no).
- Lucid menubars and scrollbars are the default.
- Motif dialog boxes will be used if Motif can be found.
---with-widgets=TYPE Use TYPE widgets (lucid, motif, athena, or no).
- Motif widgets will be used if Motif can be found.
- Other widget types are currently unsupported.
---with-dragndrop Compile in the generic drag and drop API. This is
- automatically added if one of the drag and drop
- protocols is found (currently CDE, OffiX, MSWindows,
- and GTK).
- *WARNING* The Drag'n'drop support is under development
- and is considered experimental.
---with-cde Compile in support for CDE drag and drop.
---with-offix Compile in support for OffiX drag and drop.
- *WARNING* If you compile in OffiX, you may not be
- able to use multiple X displays success-
- fully. If the two servers are from
- different vendors, the results may be
- unpredictable.
---with-xmu=no (*) For those unfortunates whose vendors don't ship Xmu.
---external-widget Compile with external widget support.
+--with-scrollbars=TYPE (Enum) Types: `lucid'(*), `motif', `athena', or `no'.
+--with-dialogs=TYPE (Enum) Types: `motif'(*), `lucid'(*), `athena', or `no'.
+--with-widgets=TYPE (Enum) Types: `motif'(*), `lucid', `athena', or `no'.
+--with-athena=TYPE (Enum) Link with the TYPE Athena library. Types:
+ `xaw' [flat], `3d', `next', `95', or `xpm'.
+--with-dragndrop (*) Support generic drag and drop API. (EXPERIMENTAL)
+--with-cde Support CDE drag and drop API (requires dragndrop).
+--with-offix Support OffiX drag and drop API (requires dragndrop).
+ *WARNING* OffiX support may interfere with use of
+ multiple X displays. If the two servers are from
+ different vendors, the results may be unpredictable.
TTY (character terminal) options:
--with-tty=no Don't support ttys.
--with-ncurses (*) Use the ncurses library for tty support.
---with-gpm (*) Compile in GPM mouse support for ttys.
+--with-gpm (*) Support the GPM mouse library for ttys.
Image options:
---with-xpm (*) Compile with support for XPM images. PRACTICALLY
- REQUIRED. Although this library is nonstandard and
- a real hassle to build, many basic things (e.g.
- toolbars) depend on it, and you will run into
- many problems without it.
---with-png (*) Compile with support for PNG images. Recommended
- because the images on the About page are not viewable
- without it.
---with-jpeg (*) Compile with support for JPEG images. Useful if
- you are using a mail, news reader, or web browser
- in XEmacs, so that JPEG images can be displayed.
---with-tiff (*) Compile with support for TIFF images. Possibly
- useful, for the same reason as JPEG images.
---with-xface (*) Compile with support for X-Face mail headers.
- Requires the compface package. Of doubtful
- usefulness.
---with-gif=no Compile without the (builtin) support for GIF images.
+--with-xpm (*) Support XPM images. Toolbars depend on it.
+--with-png (*) Support PNG images. Strongly recommended.
+--with-jpeg (*) Support JPEG images.
+--with-tiff (*) Support TIFF images.
+--with-xface (*) Support X-Face mail headers. Requires libcompface.
+--with-gif=no Omit the (builtin) support for GIF images.
Sound options:
---with-sound=TYPE[,TYPE[,...]] (*) Compile with sound support.
- Valid types are `native', `nas' and `esd'.
- Prefix a type with 'no' to disable.
- The first type can be `none' or `all'. `none' means
- `nonative,nonas,noesd'. `all' means `native,nas,esd'.
- Later options override earlier ones for the same TYPE.
- Autodetect native and NAS sound unless specified.
- ESD must be explicitly requested.
+--with-sound=TYPES (*) (Set) Compile with sound support.
+ Types: `native', `nas' and `esd'.
+ Defaults to `noesd', the others are autodetected.
--native-sound-lib=LIB Native sound support library. Needed on Suns
with `--with-sound=native,nas' because both sound
libraries are called libaudio.
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.
---with-postgresql (*) Compile with support for the PostgreSQL RDBMS.
+--with-database=TYPES (*) (Set) Support key:value databases.
+ Types: `berkdb', `dbm', or `gnudbm'. `dbm' and
+ `gnudbm' are incompatible with each other.
+--with-ldap (*) (Bool) Support the LDAP protocol.
+--with-postgresql (*) (Bool) Support the PostgreSQL RDBMS.
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', `dot', `locking' or `mmdf'.
---with-pop Support POP for mail retrieval.
---with-kerberos Support Kerberos-authenticated POP.
---with-hesiod Support Hesiod to get the POP server host.
+--mail-locking=TYPE (*) (Enum) Specify the locking method used by movemail.
+ Types: `lockf', `flock', `dot', `locking' or `mmdf'.
+--with-pop (Bool) Support POP for mail retrieval.
+--with-kerberos (Bool) Support Kerberos-authenticated POP.
+--with-hesiod (Bool) Support Hesiod to get the POP server host.
-Additional features:
+Internationalization options:
---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-netinstall Compile in support for installation over the internet.
- Only functional on the MS Windows platforms.
---with-ipv6-cname=yes Try IPv6 information first when canonicalizing host
- names. This option has no effect unless system
- supports getaddrinfo(3) and getnameinfo(3).
---with-site-lisp=yes Allow for a site-lisp directory in the XEmacs hierarchy
- searched before the installation packages.
---with-site-modules=no Disable site-modules directory in the XEmacs hierarchy,
- which is searched before the installation modules.
---package-path=PATH Directories to search for packages to dump with xemacs.
- PATH splits into three parts separated by double
- colons (::), an early, a late, and a last part,
- corresponding to their position in the various
- system paths: The early part is always first,
- the late part somewhere in the middle, and the
- last part at the very back.
- Only the late part gets seen at dump time.
- If PATH has only one component, that component
- is late.
- If PATH has two components, the first is
- early, the second is late.
---infodir=DIR Directory to install XEmacs Info manuals and dir in.
---infopath=PATH Directories to search for Info documents, info dir
- and localdir files in case run-time searching
- for them fails.
---moduledir=DIR Directory to install dynamic modules in.
---pdump New, experimental, don't-sue-me-if-your-house-
- collapses-and-your-wife-leaves-you, portable dumper.
---with-file-coding Allows transparent use of "foreign" line break
- conventions in text files (such as LF-delimited text
- imported from a Unix system to a Windows environment),
- optionally including autodetection. Defaults to ON
- on Windows, OFF on Unix.
+--with-mule (Bool) Support non-Latin-1 (including Asian) languages.
+--with-xim=TYPE (Enum) Support X Input Method protocol. Types:
+ `motif'(*), `xlib', `no'. Requires Mule.
+--with-canna (*) (Bool) Support the Canna input method. Requires Mule.
+--with-wnn (*) (Bool) Support the Wnn input methods. Requires Mule.
+--with-wnn6 (*) (Bool) Support the commercial version of Wnn.
+--with-xfs (Bool) Support internationalized menubar via XFontSets.
+ `--with-menubars=lucid' (the default) is desirable.
+ Incompatible with `--with-xim=motif'.
-Internationalization options:
+Additional features:
---with-mule Compile with Mule (MUlti-Lingual Emacs) support,
- needed to support non-Latin-1 (including Asian)
- languages.
---with-xim=xlib Compile with support for X input methods,
---with-xim=motif (*) Used in conjunction with Mule support.
- Use either raw Xlib to provide XIM support, or
- the Motif XmIm* routines (when available).
- NOTE: On some systems bugs in X11's XIM support
- will cause XEmacs to crash, so by default,
- no XIM support is compiled in, unless running
- on Solaris and the XmIm* routines are detected.
---with-canna (*) Compile with support for Canna (a Japanese input method
- used in conjunction with Mule support).
---with-wnn (*) Compile with support for Wnn (a multi-language input
- method used in conjunction with Mule support).
---with-wnn6 (*) Compile with support for the commercial package Wnn6.
---with-i18n3 Compile with I18N level 3 (support for message
- translation). This doesn't currently work.
---with-xfs Compile with XFontSet support for internationalized
- menubar. Incompatible with `--with-xim=motif'.
- `--with-menubars=lucid' (the default) is desirable.
+--with-workshop (Bool) Support the Sun WorkShop (formerly Sparcworks)
+ development environment.
+--with-tooltalk (*) (Bool) Support the ToolTalk IPC protocol.
+--with-socks (Bool) Support SOCKS (an Internet proxy).
+--with-dnet (*) (Bool) Support DECnet.
+--with-netinstall (Bool) Support installation over the internet.
+ Only functional on MS Windows platforms.
+--with-ipv6-cname (Bool) IPv6-ly correct host name canonicalization.
+ IPv6 is always supported if detected; this option
+ prevents blocking and unwanted dialup for CNAME lookup.
+--external-widget (Bool) Export XEmacs as a text widget. (EXPERIMENTAL)
+--with-modules (*) (Bool) Support for dynamically loaded libraries
+ (Dynamic Shared Objects). (EXPERIMENTAL)
+--pdump (Bool) Somewhat experimental portable dumper.
+--with-file-coding (Bool) Support detection and translation of newline
+ conventions. Default: `yes' on Windows, `no' on Unix.
+--with-clash-detection=no (Bool) Detect other instances editing the same file.
+
+
+Memory allocation options:
+
+--rel-alloc (Bool) Use the relocating allocator (default for this
+ option is system-dependent).
+--with-dlmalloc=no (Bool) Don't use Doug Lea malloc on systems that have
+ it in the standard C library.
+--with-system-malloc (Bool) Use the system malloc, instead of GNU malloc.
+--with-debug-malloc (Bool) Use the debugging malloc package.
Debugging options:
---debug Compile with support for debugging XEmacs.
+--debug (Bool) Compile with support for debugging XEmacs.
(Causes code-size increase and little loss of speed.)
---error-checking=TYPE[,TYPE]...
- Compile with internal error-checking added.
- Causes noticeable loss of speed. Valid types
- are extents, bufpos, malloc, gc, typecheck.
---error-checking=none Disable all internal error-checking (the default).
---error-checking=all Enable all internal error-checking.
---memory-usage-stats Compile with additional code to allow you to
+--memory-usage-stats (Bool) Compile with additional code to allow you to
determine what XEmacs's memory is being used
for. Causes a small code increase but no loss
- of speed. Normally enabled when --debug is given.
---no-doc-file Don't rebuild the DOC file unless it's explicitly
- deleted. Only use during development. (It speeds
- up the compile-run-test cycle.)
---quick-build Don't GC when dumping. Implies --no-doc-file.
---use-union-type Enable or disable use of a union, instead of an
- int, for the fundamental Lisp_Object type; this
- provides stricter type-checking. Only works with
- some systems and compilers.
---with-quantify Add support for performance debugging using Quantify.
---with-purify Add support for memory debugging using Purify.
-
-
-Other options:
-
---rel-alloc Use the relocating allocator (default for this option
- is system-dependent).
---with-dlmalloc Control usage of Doug Lea malloc on systems that have
- it in the standard C library (default is to use it if
- it is available).
---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 do clash detection.
+ of speed. Normally enabled when `--debug' is given.
+--error-checking=TYPES (Set) Compile with internal error-checking added.
+ Causes noticeable loss of speed. Types: `bufpos',
+ `byte-code', `extents', `gc', `glyphs', `malloc', and
+ `typecheck'. The default value is `none'.
+--use-union-type (Bool) Define Lisp_Object as a union, not an int.
+ Provides stricter type-checking. System-dependent.
+--no-doc-file (Bool) Don't rebuild the DOC file unless it's missing.
+ Only use during development.
+--quick-build (Bool) Don't GC when dumping. Implies `--no-doc-file'.
+--with-quantify (Bool) Support performance debugging using Quantify.
+--with-purify (Bool) Support memory debugging using Purify.
-You may also specify any of the `path' variables found in Makefile.in.in,
-including --bindir, --libdir, --docdir, --lispdir, --sitelispdir,
---datadir, --infodir, --mandir and so on. Note that we recommend
-against explicitly setting any of these variables. See the INSTALL
-file for a complete list plus the reasons we advise not changing them.
-
-If successful, configure leaves its status in config.status. If
-unsuccessful after disturbing the status quo, it removes config.status.
The configure script also recognizes some environment variables, each
of which is equivalent to a corresponding configure flag. Configure
Only patches and administrative actions regarding patches are sent
elsewhere (to the XEmacs Patches list).
-** XEmacs Patches Mailing List
-==============================
+*** XEmacs Patches Mailing List
+-------------------------------
XEmacs Patches records proposed changes to XEmacs, and their
-disposition. It is open subscription, but only patches and actions by
-members of the XEmacs Review Board should be posted to this list. You
+disposition. It is open subscription, and all patches that are
+seriously proposed for inclusion in XEmacs should be posted here. You
can follow progress of your patch by subscribing to the mailing list
or in the archives.
-** List Administrivia
-=====================
+Besides patches, only actions by members of the XEmacs Review Board
+should be posted to this list. All discussion should be redirected to
+XEmacs Beta or XEmacs Design.
+
+*** XEmacs Design Mailing List
+------------------------------
+
+XEmacs Design is for design discussions such as adding major features
+or whole modules, or reimplementation of existing functions, to XEmacs.
+
+*** List Administrivia
+----------------------
In the descriptions below, the word LIST (all uppercase) is a
-variable. Substitute "beta" or "patches" as appropriate (to get
-"xemacs-beta" as the mailbox for the XEmacs Beta mailing list, or
-http://www.xemacs.org/Lists/#xemacs-beta for its URL).
+variable. Substitute "beta", "design", or "patches" as appropriate
+(to get "xemacs-beta" as the mailbox for the XEmacs Beta mailing list,
+or http://www.xemacs.org/Lists/#xemacs-beta for its URL).
The XEmacs mailing lists are managed by the Mailman mailing list
package, and the usual Mailman commands work. Do not send mailing
http://list-archive.xemacs.org/xemacs-LIST
+Note that the xemacs-LIST-admin address is used internally by the
+Mailman software; it is NOT a synonym for xemacs-LIST-request.
+
*** Managing your subscription via the Web
------------------------------------------
** Creating patches for submission
==================================
-Patches to XEmacs should be mailed to <xemacs-patches@xemacs.org>.
-Each patch will be reviewed by the patches review board, and will be
+All patches to XEmacs that are seriously proposed for inclusion (eg,
+bug fixes) should be mailed to <xemacs-patches@xemacs.org>. Each
+patch will be reviewed by the patches review board, and will be
acknowledged and added to the distribution, or rejected with an
explanation. Progress of the patch is tracked on the XEmacs Patches
-mailing list, which is open subscription.
+mailing list, which is open subscription. (If a patch is simply
+intended to facilitate discussion, "I mean something that works like
+this but this is really rough", a CC to XEmacs Patches is optional,
+but doesn't hurt.)
Patches to XEmacs Lisp packages should be sent to the maintainer of
the package. If the maintainer is listed as `XEmacs Development Team'
Discussion of the _content_ of the patch (ie responses to reviewer
comments beyond "that's right, ok, I'll do it your way") should _always_
-be posted to xemacs-beta. (We may split xemacs-beta into code
-discussion and stuff that is more relevant to non-developer testers at
-some point, but at this point xemacs-beta is the correct place for
-this.)
+be posted to xemacs-beta or to xemacs-design. If you're not sure
+which is more appropriate, send it to xemacs-beta. That is the most
+widely read channel.
If discussion results in a bright idea and you come up with a new
patch, normally you should post it to both mailing lists. The people
patch against CVS. If possible do this as a reply to the original
patch post, or something following it in the thread. (The point is to
get the original patch post's Message-ID in your References header.)
-In this case, also use the keyword SUPERCEDES in the Subject header to
+In this case, also use the keyword SUPERSEDES in the Subject header to
indicate that the old patch is no longer valid, and that this one
replaces it.
! *menubar*FontSet: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*, \
! -*-*-*-*-*-*-*-120-*-jisx0208.1983-0
!
-*menubar*Font: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*
+*menubar*Font: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*
*popup*Font: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*
+*menubar*FontSet: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*, \
+ -*-*-*-*-*-*-*-120-*-iso10646-1, \
+ -*-*-*-*-*-*-*-120-*-jisx0208.1983-0, \
+ -*-*-*-*-*-*-*-120-*-jisx0201.1976-0
+*popup*FontSet: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*, \
+ -*-*-*-*-*-*-*-120-*-iso10646-1, \
+ -*-*-*-*-*-*-*-120-*-jisx0208.1983-0, \
+ -*-*-*-*-*-*-*-120-*-jisx0201.1976-0
! Gui elements share this font
!
>> Déplacez le curseur sur la ligne blanche en dessous de ce
paragraphe, puis tapez
- M-x repls<Return>Remarquez<Return>Notez<Return>.
+ M-x repl<Return>s<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
+2002-11-02 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * XEmacs 21.4.10 "Military Intelligence" is released.
+
2002-08-23 Stephen J. Turnbull <stephen@xemacs.org>
* XEmacs 21.4.9 "Informed Management" is released.
; ''byte-optimizer ''byte-compile-inline-expand))))
(defun make-obsolete (fn new)
- "Make the byte-compiler warn that FUNCTION is obsolete.
+ "Make the byte-compiler warn that function FN is obsolete.
The warning will say that NEW should be used instead.
If NEW is a string, that is the `use instead' message."
(interactive "aMake function obsolete: \nxObsoletion replacement: ")
fn)
(defun make-obsolete-variable (var new)
- "Make the byte-compiler warn that VARIABLE is obsolete,
+ "Make the byte-compiler warn that variable VAR is obsolete,
and NEW should be used instead. If NEW is a string, then that is the
`use instead' message."
(interactive
;; By overwhelming demand, we separate out truly obsolete symbols from
;; those that are present for GNU Emacs compatibility.
(defun make-compatible (fn new)
- "Make the byte-compiler know that FUNCTION is provided for compatibility.
+ "Make the byte-compiler know that function FN is provided for compatibility.
The warning will say that NEW should be used instead.
If NEW is a string, that is the `use instead' message."
(interactive "aMake function compatible: \nxCompatible replacement: ")
fn)
(defun make-compatible-variable (var new)
- "Make the byte-compiler know that VARIABLE is provided for compatibility.
+ "Make the byte-compiler know that variable VAR is provided for compatibility,
and NEW should be used instead. If NEW is a string, then that is the
`use instead' message."
(interactive
The frame is made a child of this frame (defaults to the selected frame).
:properties
Additional properties of the frame, as well as `dialog-frame-plist'.
+:autosize
+ If t the frame is sized to exactly fit the widgets given by :spec.
---------------------------------------------------------------------------
'internal-make-dialog-box-exit did)
(remove-hook 'delete-dialog-box-hook
',sym))))
- (add-hook 'delete-dialog-box-hook sym)
+ (if (framep id)
+ (add-hook 'delete-frame-hook sym)
+ (add-hook 'delete-dialog-box-hook sym))
(mapc 'disable-frame frames)
(block nil
(while t
(:parent (selected-frame))
:modal
:properties
+ :autosize
:spec)
()
(flet ((create-dialog-box-frame ()
vertical-scrollbar-visible-p nil
horizontal-scrollbar-visible-p nil
unsplittable t
+ internal-border-width 8
left ,(+ fleft (- (/ fwidth 2)
(/ (* dfwidth
fontw)
2)))))))
(set-face-foreground 'modeline [default foreground] frame)
(set-face-background 'modeline [default background] frame)
+ ;; resize before mapping
+ (when cl-autosize
+ (set-frame-pixel-size
+ frame
+ (image-instance-width
+ (glyph-image-instance cl-spec
+ (frame-selected-window frame)))
+ (image-instance-height
+ (glyph-image-instance cl-spec
+ (frame-selected-window frame)))))
+ ;; somehow, even though the resizing is supposed
+ ;; to be while the frame is not visible, a
+ ;; visible resize is perceptible
(unless unmapped (make-frame-visible frame))
(let ((newbuf (generate-new-buffer " *dialog box*")))
(set-buffer-dedicated-frame newbuf frame)
;; was supposedly much faster than the FSF version because it was written in
;; C. However, the FSF version uses parse-partial-sexp, which is also
;; written in C, and the benchmarking I did showed the
-;; syntactically-sectionize code to be slower overall. So here's the FSF
-;; version, modified to support font-lock-doc-string-face.
+;; syntactically-sectionize code to be slower overall. So here's the
+;; FSF version, modified to support font-lock-doc-string-face.
;; -- mct 2000-12-29
+;; #### Andy conditionally reverted Matt's change when we were experimenting
+;; with making lookup-syntax-properties an optional feature. I don't see how
+;; this code relates to lookup-syntax-properties, though. I wonder if the
+;; bug is in our (?) version of parse-partial-sexp. Andy says no. Of course,
+;; Matt benchmarked ... WTF knows? sjt 2002-09-28
(defun font-lock-fontify-syntactically-region (start end &optional loudly)
"Put proper face on each string and comment between START and END.
-START should be at the beginning of a line."
+START should be at the beginning of a line. Optional argument LOUDLY
+is currently ignored."
(if font-lock-keywords-only
nil
START should be at the beginning of a line."
(let ((loudly (and font-lock-verbose
(>= (- end start) font-lock-message-threshold))))
+ (unless (eq (car-safe font-lock-keywords) t)
+ (setq font-lock-keywords
+ (font-lock-compile-keywords font-lock-keywords)))
(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))))
+ (keywords (cdr font-lock-keywords))
(bufname (buffer-name))
(progress 5) (old-progress 5)
(iter 0)
\f
;; Various functions.
-(defun font-lock-compile-keywords (&optional keywords)
- "Compile KEYWORDS into the form (t KEYWORD ...).
-Here KEYWORD is of the form (MATCHER HIGHLIGHT ...) as shown in the
-`font-lock-keywords' doc string."
- (let ((keywords (or keywords font-lock-keywords)))
- (setq font-lock-keywords
- (if (eq (car-safe keywords) t)
- keywords
- (cons t (mapcar 'font-lock-compile-keyword keywords))))))
+(defun font-lock-compile-keywords (keywords)
+ "Compile KEYWORDS (a list) and return the list of compiled keywords.
+Each keyword has the form (MATCHER HIGHLIGHT ...). See `font-lock-keywords'."
+ (if (eq (car-safe keywords) t)
+ keywords
+ (cons t (mapcar 'font-lock-compile-keyword keywords))))
(defun font-lock-compile-keyword (keyword)
(cond ((nlistp keyword) ; Just MATCHER
(define-key global-map "\C-xr+" 'increment-register)
(define-key global-map "\C-xrc" 'clear-rectangle)
(define-key global-map "\C-xrk" 'kill-rectangle)
+(define-key global-map "\C-xrd" 'delete-rectangle)
(define-key global-map "\C-xry" 'yank-rectangle)
(define-key global-map "\C-xro" 'open-rectangle)
(define-key global-map "\C-xrt" 'string-rectangle)
;; North America
("Pre-Releases" "ftp.xemacs.org" "pub/xemacs/beta/experimental/packages")
("xemacs.org" "ftp.xemacs.org" "pub/xemacs/packages")
+ ("ca.xemacs.org (Canada)" "ftp.ca.xemacs.org" "pub/Mirror/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")
+ ("us.xemacs.org (United States)" "ftp.us.xemacs.org" "pub/xemacs/packages")
+ ("ibiblio.org (United States)" "ibiblio.org" "pub/packages/editors/xemacs/packages")
+ ("stealth.net (United States)" "ftp.stealth.net" "pub/mirrors/ftp.xemacs.org/pub/xemacs/packages")
+ ;("uiuc.edu (United States)" "uiarchive.uiuc.edu" "pub/packages/xemacs/packages")
;; South America
- ("unicamp.br (Brazil)" "ftp.unicamp.br" "pub/xemacs/packages")
+ ("br.xemacs.org (Brazil)" "ftp.br.xemacs.org" "pub/xemacs/packages")
;; Europe
- ("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")
+ ("at.xemacs.org (Austria)" "ftp.at.xemacs.org" "editors/xemacs/packages")
+ ("be.xemacs.org (Belgium)" "ftp.be.xemacs.org" "xemacs/packages")
+ ("cz.xemacs.org (Czech Republic)" "ftp.cz.xemacs.org" "MIRRORS/ftp.xemacs.org/pub/xemacs/packages")
+ ("dk.xemacs.org (Denmark)" "ftp.dk.xemacs.org" "pub/emacs/xemacs/packages")
+ ("fi.xemacs.org (Finland)" "ftp.fi.xemacs.org" "pub/mirrors/ftp.xemacs.org/pub/tux/xemacs/packages")
+ ("fr.xemacs.org (France)" "ftp.fr.xemacs.org" "pub/xemacs/packages")
("pasteur.fr (France)" "ftp.pasteur.fr" "pub/computing/xemacs/packages")
+ ("de.xemacs.org (Germany)" "ftp.de.xemacs.org" "pub/ftp.xemacs.org/tux/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")
+ ;("hu.xemacs.org (Hungary)" "ftp.hu.xemacs.org" "pub/packages/xemacs/packages")
+ ("ie.xemacs.org (Ireland)" "ftp.ie.xemacs.org" "mirrors/ftp.xemacs.org/pub/xemacs/packages")
+ ("it.xemacs.org (Italy)" "ftp.it.xemacs.org" "unix/packages/XEMACS/packages")
+ ("no.xemacs.org (Norway)" "ftp.no.xemacs.org" "pub/xemacs/packages")
+ ("pl.xemacs.org (Poland)" "ftp.pl.xemacs.org" "pub/unix/editors/xemacs/packages")
+ ("ru.xemacs.org (Russia)" "ftp.ru.xemacs.org" "pub/xemacs/packages")
+ ("sk.xemacs.org (Slovakia)" "ftp.sk.xemacs.org" "pub/mirrors/xemacs/packages")
+ ("se.xemacs.org (Sweden)" "ftp.se.xemacs.org" "pub/gnu/xemacs/packages")
+ ("ch.xemacs.org (Switzerland)" "ftp.ch.xemacs.org" "mirror/xemacs/packages")
+ ("uk.xemacs.org (United Kingdom)" "ftp.uk.xemacs.org" "sites/ftp.xemacs.org/pub/xemacs/packages")
;; Asia
+ ("jp.xemacs.org (Japan)" "ftp.jp.xemacs.org" "pub/GNU/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")
+ ("kr.xemacs.org (Korea)" "ftp.kr.xemacs.org" "pub/tools/emacs/xemacs/packages")
+ ;("tw.xemacs.org (Taiwan)" "ftp.tw.xemacs.org" "Editors/xemacs/packages")
;; Africa
- ("sun.ac.za (South Africa)" "ftp.sun.ac.za" "xemacs/packages")
+ ("za.xemacs.org (South Africa)" "ftp.za.xemacs.org" "mirrorsites/ftp.xemacs.org/packages")
;; Middle East
- ("isu.net.sa (Saudi Arabia)" "ftp.isu.net.sa" "pub/mirrors/ftp.xemacs.org/packages")
+ ("sa.xemacs.org (Saudi Arabia)" "ftp.sa.xemacs.org" "pub/mirrors/ftp.xemacs.org/xemacs/packages")
;; Australia
+ ("au.xemacs.org (Australia)" "ftp.au.xemacs.org" "pub/xemacs/packages")
("aarnet.edu.au (Australia)" "mirror.aarnet.edu.au" "pub/xemacs/packages")
+
+ ;; Oceania
+ ("nz.xemacs.org (New Zealand)" "ftp.nz.xemacs.org" "mirror/ftp.xemacs.org/packages")
)
"*List of remote sites available for downloading packages.
List format is '(site-description site-name directory-on-site).
+2002-11-02 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * XEmacs 21.4.10 "Military Intelligence" is released.
+
2002-08-23 Stephen J. Turnbull <stephen@xemacs.org>
* XEmacs 21.4.9 "Informed Management" is released.
+2002-11-02 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * XEmacs 21.4.10 "Military Intelligence" is released.
+
+2002-10-29 Stephen J. Turnbull <steve@tleepslib.sk.tsukuba.ac.jp>
+
+ * lispref/compile.texi (Compilation Options): New node.
+ (Byte Compilation): Add it to menu.
+ (Compilation Functions): Minor mods.
+ (Docs and Compilation):
+ (Dynamic Loading):
+ Document some variable defaults.
+
+2002-10-23 Norbert Koch <nk@viteno.net>
+
+ * xemacs-faq.texi (Q2.0.16): Fix typo in previous commit.
+
+2002-10-18 Stephen J. Turnbull <steve@tleepslib.sk.tsukuba.ac.jp>
+
+ * xemacs-faq.texi (Q2.0.16): New FAQ on "no cygXpm-noX" fatal error.
+ (Q6.1.4): Document cygXpm-noX.
+
+2002-08-22 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * internals/internals.texi (Regression Testing XEmacs): Document
+ how to skip and warn about tests that depend on packages.
+
+2002-09-22 Ville Skyttä <ville.skytta@xemacs.org>
+
+ * xemacs/packages.texi (Available Packages): Add fortran-modes,
+ perl-modes, psgml-dtds, python-modes and ruby-modes.
+ Some consistency tweaks.
+
+2002-09-20 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * internals/internals.texi (Techniques for XEmacs Developers):
+ More performance optimization hints.
+ (Modules for Other Aspects of the Lisp Interpreter and Object System):
+ Describe syntax code internals.
+
+ * lispref/syntax.texi (Syntax Basics): XEmacs "20" -> "20 and later".
+ (Syntax Class Table): Deprecate SPC as whitespace designator.
+ (Syntax Flags): Rewrite for `8-bit' comment syntax flags.
+
2002-08-23 Stephen J. Turnbull <stephen@xemacs.org>
* XEmacs 21.4.9 "Informed Management" is released.
If you want to make XEmacs faster, target your favorite slow benchmark,
run a profiler like Quantify, @code{gprof}, or @code{tcov}, and figure
-out where the cycles are going. Specific projects:
+out where the cycles are going. In many cases you can localize the
+problem (because a particular new feature or even a single patch
+elicited it). Don't hesitate to use brute force techniques like a
+global counter incremented at strategic places, especially in
+combination with other performance indications (@emph{e.g.}, degree of
+buffer fragmentation into extents).
+
+Specific projects:
@itemize @bullet
@item
@item
Speed up redisplay.
@item
-Speed up syntax highlighting. Maybe moving some of the syntax
-highlighting capabilities into C would make a difference.
+Speed up syntax highlighting. It was suggested that ``maybe moving some
+of the syntax highlighting capabilities into C would make a
+difference.'' Wrong idea, I think. When processing one large file a
+particular low-level routine was being called 40 @emph{million} times
+simply for @emph{one} call to @code{newline-and-indent}. Syntax
+highlighting needs to be rewritten to use a reliable, fast parser, then
+to trust the pre-parsed structure, and only do re-highlighting locally
+to a text change. Modern machines are fast enough to implement such
+parsers in Lisp; but no machine will ever be fast enough to deal with
+quadratic (or worse) algorithms!
@item
Implement tail recursion in Emacs Lisp (hard!).
@end itemize
@code{Check-Error}, @code{Check-Error-Message}, and @code{Check-Message}
macros.
+In general, you should avoid using functionality from packages in your
+tests, because you can't be sure that everyone will have the required
+package. However, if you've got a test that works, by all means add it.
+Simply wrap the test in an appropriate test, add a notice that the test
+was skipped, and update the @code{skipped-test-reasons} hashtable.
+Here's an example from @file{syntax-tests.el}:
+
+@example
+;; Test forward-comment at buffer boundaries
+(with-temp-buffer
+
+ ;; try to use exactly what you need: featurep, boundp, fboundp
+ (if (not (fboundp 'c-mode))
+
+ ;; We should provide a standard function for this boilerplate,
+ ;; probably called `Skip-Test' -- check for that API with C-h f
+ (let* ((reason "c-mode unavailable")
+ (count (gethash reason skipped-test-reasons)))
+ (puthash reason (if (null count) 1 (1+ count))
+ skipped-test-reasons)
+ (Print-Skip "comment and parse-partial-sexp tests" reason))
+
+ ;; and here's the test code
+ (c-mode)
+ (insert "// comment\n")
+ (forward-comment -2)
+ (Assert (eq (point) (point-min)))
+ (let ((point (point)))
+ (insert "/* comment */")
+ (goto-char point)
+ (forward-comment 2)
+ (Assert (eq (point) (point-max)))
+ (parse-partial-sexp point (point-max)))))
+@end example
+
+@code{Skip-Test} is intended for use with features that are normally
+present in typical configurations. For truly optional features, or
+tests that apply to one of several alternative implementations (eg, to
+GTK widgets, but not Athena, Motif, MS Windows, or Carbon), simply
+silently omit the test.
+
+
@node A Summary of the Various XEmacs Modules, Allocation of Objects in XEmacs Lisp, Regression Testing XEmacs, Top
@chapter A Summary of the Various XEmacs Modules
@cindex modules, a summary of the various XEmacs
@code{forward-sexp}, and by @file{font-lock.c} to locate quoted strings,
comments, etc.
+@c #### Break this out into a separate node somewhere!
+Syntax codes are implemented as bitfields in an int. Bits 0-6 contain
+the syntax code itself, bit 7 is a special prefix flag used for Lisp,
+and bits 16-23 contain comment syntax flags. From the Lisp programmer's
+point of view, there are 11 flags: 2 styles X 2 characters X @{start,
+end@} flags for two-character comment delimiters, 2 style flags for
+one-character comment delimiters, and the prefix flag.
+
+Internally, however, the characters used in multi-character delimiters
+will have non-comment-character syntax classes (@emph{e.g.}, the
+@samp{/} in C's @samp{/*} comment-start delimiter has ``punctuation''
+(here meaning ``operator-like'') class in C modes). Thus in a mixed
+comment style, such as C++'s @samp{//} to end of line, is represented by
+giving @samp{/} the ``punctuation'' class and the ``style b first
+character of start sequence'' and ``style b second character of start
+sequence'' flags. The fact that class is @emph{not} punctuation allows
+the syntax scanner to recognize that this is a multi-character
+delimiter. The @samp{newline} character is given (single-character)
+``comment-end'' @emph{class} and the ``style b first character of end
+sequence'' @emph{flag}. The ``comment-end'' class allows the scanner to
+determine that no second character is needed to terminate the comment.
@example
@menu
* Speed of Byte-Code:: An example of speedup from byte compilation.
* Compilation Functions:: Byte compilation functions.
+* Compilation Options:: Controlling the byte compiler's behavior.
* Docs and Compilation:: Dynamic loading of documentation strings.
* Dynamic Loading:: Dynamic loading of individual functions.
* Eval During Compile:: Code to be evaluated when you compile.
@c XEmacs feature
@defvar byte-recompile-directory-ignore-errors-p
- If non-@code{nil}, this specifies that @code{byte-recompile-directory}
-will continue compiling even when an error occurs in a file. This is
-normally @code{nil}, but is bound to @code{t} by
-@code{batch-byte-recompile-directory}.
+ When non-@code{nil}, @code{byte-recompile-directory} will continue
+compiling even when an error occurs in a file. Default: @code{nil}, but
+bound to @code{t} by @code{batch-byte-recompile-directory}.
@end defvar
+@c XEmacs feature (?)
+@defvar byte-recompile-directory-recursively
+ When non-@code{nil}, @code{byte-recompile-directory} will recurse on
+subdirectories. Default: @code{t}.
+@end defvar
+
+
@defun byte-code instructions constants stack-depth
@cindex byte-code interpreter
This function actually interprets byte-code.
code without an associated argument list.
@end defun
+@node Compilation Options
+@section Options for the Byte Compiler
+@cindex compilation options
+
+Warning: this node is a quick draft based on docstrings. There may be
+inaccuracies, as the docstrings occasionally disagree with each other.
+This has not been checked yet.
+
+The byte compiler and optimizer are controlled by the following
+variables. The @code{byte-compiler-options} macro described below
+provides a convenient way to set most of them on a file-by-file basis.
+
+@defvar emacs-lisp-file-regexp
+Regexp which matches Emacs Lisp source files.
+You may want to redefine @code{byte-compile-dest-file} if you change
+this. Default: @code{"\\.el$"}.
+@end defvar
+
+@defun byte-compile-dest-file filename
+Convert an Emacs Lisp source file name to a compiled file name. This
+function may be redefined by the user, if necessary, for compatibility
+with @code{emacs-lisp-file-regexp}.
+@end defun
+
+@c ;; This can be the 'byte-compile property of any symbol.
+@c (autoload 'byte-compile-inline-expand "byte-optimize")
+
+@defvar byte-compile-verbose
+When non-@code{nil}, print messages describing progress of
+byte-compiler. Default: @code{t} if interactive on a not-too-slow
+terminal (see @code{search-slow-speed}), otherwise @code{nil}.
+@end defvar
+
+@defvar byte-optimize
+Level of optimization in the byte compiler.
+
+@table @code
+@item nil
+Do no optimization.
+
+@item t
+Do all optimizations.
+
+@item source
+Do optimizations manipulating the source code only.
+
+@item byte
+Do optimizations manipulating the byte code (actually, LAP code) only.
+@end table
+Default: @code{t}.
+@end defvar
+
+@defvar byte-compile-delete-errors
+When non-@code{nil}, the optimizer may delete forms that may signal an
+error if that is the only change in the function's behavior.
+This includes variable references and calls to functions such as
+@code{car}.
+Default: @code{t}.
+@end defvar
+
+@defvar byte-optimize-log nil
+When non-@code{nil}, the byte-compiler logs optimizations into
+@file{*Compile-Log*}.
+
+@table @code
+@item nil
+Log no optimization.
+
+@item t
+Log all optimizations.
+
+@item source
+Log optimizations manipulating the source code only.
+
+@item byte
+Log optimizations manipulating the byte code (actually, LAP code) only.
+@end table
+Default: @code{nil}.
+@end defvar
+
+@defvar byte-compile-error-on-warn
+When non-@code{nil}, the byte-compiler reports warnings with @code{error}.
+Default: @code{nil}.
+@end defvar
+
+@defvar byte-compile-default-warnings
+The warnings used when @code{byte-compile-warnings} is @code{t}. Called
+@code{byte-compile-warning-types} in GNU Emacs.
+Default: @code{(redefine callargs subr-callargs free-vars unresolved
+unused-vars obsolete)}.
+@end defvar
+
+@defvar byte-compile-warnings
+
+List of warnings that the compiler should issue (@code{t} for the
+default set). Elements of the list may be:
+
+@table @code
+@item free-vars
+References to variables not in the current lexical scope.
+
+@item unused-vars
+References to non-global variables bound but not referenced.
+
+@item unresolved
+Calls to unknown functions.
+
+@item callargs
+Lambda calls with args that don't match the definition.
+
+@item subr-callargs
+Calls to subrs with args that don't match the definition.
+
+@item redefine
+Function cell redefined from a macro to a lambda or vice
+versa, or redefined to take a different number of arguments.
+
+@item obsolete
+Use of an obsolete function or variable.
+
+@item pedantic
+Warn of use of compatible symbols.
+@end table
+
+The default set is specified by @code{byte-compile-default-warnings} and
+normally encompasses all possible warnings.
+
+See also the macro @code{byte-compiler-options}. Default: @code{t}.
+@end defvar
+
+The compiler can generate a call graph, which gives information about
+which functions call which functions.
+
+@defvar byte-compile-generate-call-tree
+When non-@code{nil}, the compiler generates a call graph. This records
+functions that were called and from where. If the value is @code{t},
+compilation displays the call graph when it finishes. If the value is
+neither @code{t} nor @code{nil}, compilation asks you whether to display
+the graph.
+
+The call tree only lists functions called, not macros used. Those
+functions which the byte-code interpreter knows about directly
+(@code{eq}, @code{cons}, etc.) are not reported.
+
+The call tree also lists those functions which are not known to be called
+(that is, to which no calls have been compiled). Functions which can be
+invoked interactively are excluded from this list. Default: @code{nil}.
+@end defvar
+
+@defvar byte-compile-call-tree nil
+
+Alist of functions and their call tree, used internally.
+Each element takes the form
+
+ (@var{function} @var{callers} @var{calls})
+
+where @var{callers} is a list of functions that call @var{function}, and
+@var{calls} is a list of functions for which calls were generated while
+compiling @var{function}.
+@end defvar
+
+@defvar byte-compile-call-tree-sort
+When non-@code{nil}, sort the call tree. The values @code{name},
+@code{callers}, @code{calls}, and @code{calls+callers} specify different
+fields to sort on.") Default: @code{name}.
+@end defvar
+
+@code{byte-compile-overwrite-file} controls treatment of existing
+compiled files.
+
+@defvar byte-compile-overwrite-file
+When non-@code{nil}, do not preserve backups of @file{.elc}s.
+Precisely, if @code{nil}, old @file{.elc} files are deleted before the
+new one is saved, and @file{.elc} files will have the same modes as the
+corresponding @file{.el} file. Otherwise, existing @file{.elc} files
+will simply be overwritten, and the existing modes will not be changed.
+If this variable is @code{nil}, then an @file{.elc} file which is a
+symbolic link will be turned into a normal file, instead of the file
+which the link points to being overwritten. Default: @code{t}.
+@end defvar
+
+Variables controlling recompiling directories are described elsewhere
+@xref{Compilation Functions}. They are
+@code{byte-recompile-directory-ignore-errors-p} and
+@code{byte-recompile-directory-recursively}.
+
+The dynamic loading features are described elsewhere. These are
+controlled by the variables @code{byte-compile-dynamic} (@pxref{Dynamic
+Loading}) and @code{byte-compile-dynamic-docstrings} (@pxref{Docs and
+Compilation}).
+
+The byte compiler is a relatively recent development, and has evolved
+significantly over the period covering Emacs versions 19 and 20. The
+following variables control use of newer functionality by the byte
+compiler. These are rarely needed since the release of XEmacs 21.
+
+Another set of compatibility issues arises between Mule and non-Mule
+XEmacsen; there are no known compatibility issues specific to the byte
+compiler. There are also compatibility issues between XEmacs and GNU
+Emacs's versions of the byte compiler. While almost all of the byte
+codes are the same, and code compiled by one version often runs
+perfectly well on the other, this is very dangerous, and can result in
+crashes or data loss. Always recompile your Lisp when moving between
+XEmacs and GNU Emacs.
+
+@defvar byte-compile-single-version nil
+When non-@code{nil}, the choice of emacs version (v19 or v20) byte-codes
+will be hard-coded into bytecomp when it compiles itself. If the
+compiler itself is compiled with optimization, this causes a speedup.
+Default: @code{nil}.
+@end defvar
+
+@defvar byte-compile-emacs19-compatibility
+When non-@code{nil} generate output that can run in Emacs 19.
+Default: @code{nil} when Emacs version is 20 or above, otherwise
+@code{t}.
+@end defvar
+
+@defvar byte-compile-print-gensym
+When non-@code{nil}, the compiler may generate code that creates unique
+symbols at run-time. This is achieved by printing uninterned symbols
+using the @code{#:@var{}} notation, so that they will be read uninterned
+when run.
+
+With this feature, code that uses uninterned symbols in macros will
+not be runnable under pre-21.0 XEmacsen.
+
+Default: When @code{byte-compile-emacs19-compatibility} is non-nil, this
+variable is ignored and considered to be @code{nil}. Otherwise
+@code{t}.
+@end defvar
+
+@defvar byte-compile-new-bytecodes
+This is completely ignored. For backwards compatibility.
+@end defvar
+
+@defun byte-compiler-options &rest args
+Set some compilation-parameters for this file.
+This will affect only the file in which it appears; this does nothing when
+evaluated, or when loaded from a @file{.el} file.
+
+Each argument to this macro must be a list of a key and a value.
+(#### Need to check whether the newer variables are settable here.)
+
+@example
+ Keys: Values: Corresponding variable:
+
+ verbose t, nil byte-compile-verbose
+ optimize t, nil, source, byte byte-optimize
+ warnings list of warnings byte-compile-warnings
+ file-format emacs19, emacs20 byte-compile-emacs19-compatibility
+@end example
+
+The value specified with the @code{warnings}option must be a list,
+containing some subset of the following flags:
+
+@example
+ free-vars references to variables not in the current lexical scope.
+ unused-vars references to non-global variables bound but not referenced.
+ unresolved calls to unknown functions.
+ callargs lambda calls with args that don't match the definition.
+ redefine function cell redefined from a macro to a lambda or vice
+ versa, or redefined to take a different number of arguments.
+@end example
+
+If the first element if the list is @code{+} or `@code{} then the
+specified elements are added to or removed from the current set of
+warnings, instead of the entire set of warnings being overwritten.
+(#### Need to check whether the newer warnings are settable here.)
+
+For example, something like this might appear at the top of a source file:
+
+@example
+ (byte-compiler-options
+ (optimize t)
+ (warnings (- callargs)) ; Don't warn about arglist mismatch
+ (warnings (+ unused-vars)) ; Do warn about unused bindings
+ (file-format emacs19))
+@end example
+@end defun
+
@node Docs and Compilation
@section Documentation Strings and Compilation
@cindex dynamic loading of documentation
@defvar byte-compile-dynamic-docstrings
If this is non-@code{nil}, the byte compiler generates compiled files
that are set up for dynamic loading of documentation strings.
+Default: t.
@end defvar
@cindex @samp{#@@@var{count}}
@defvar byte-compile-dynamic
If this is non-@code{nil}, the byte compiler generates compiled files
that are set up for dynamic function loading.
+Default: nil.
@end defvar
@defun fetch-bytecode function
this chapter.
@end ifinfo
- Under XEmacs 20, a syntax table is a particular subtype of the
+ Under XEmacs 20 and later, a syntax table is a particular subtype of the
primitive char table type (@pxref{Char Tables}), and each element of the
char table is an integer that encodes the syntax of the character in
question, or a cons of such an integer and a matching character (for
their meanings, and examples of their use.
@deffn {Syntax class} @w{whitespace character}
-@dfn{Whitespace characters} (designated with @w{@samp{@ }} or @samp{-})
+@dfn{Whitespace characters} (designated with @samp{-})
separate symbols and words from each other. Typically, whitespace
characters have no other syntactic significance, and multiple whitespace
characters are syntactically equivalent to a single one. Space, tab,
-newline and formfeed are almost always classified as whitespace.
+newline and formfeed are almost always classified as whitespace. (The
+designator @w{@samp{@ }} is accepted for backwards compatibility with
+older versions of XEmacs, but is deprecated. It is invalid in GNU Emacs.)
@end deffn
@deffn {Syntax class} @w{word constituent}
@subsection Syntax Flags
@cindex syntax flags
+@c This is a bit inaccurate, the ``a'' and ``b'' flags actually don't
+@c exist in the internal implementation. AFAICT it doesn't affect the
+@c semantics as perceived by the LISP programmer.
In addition to the classes, entries for characters in a syntax table
-can include flags. There are six possible flags, represented by the
-characters @samp{1}, @samp{2}, @samp{3}, @samp{4}, @samp{b} and
-@samp{p}.
-
- All the flags except @samp{p} are used to describe multi-character
-comment delimiters. The digit flags indicate that a character can
-@emph{also} be part of a comment sequence, in addition to the syntactic
-properties associated with its character class. The flags are
+can include flags. There are eleven possible flags, represented by the
+digits @samp{1}--@samp{8}, and the lowercase letters @samp{a}, @samp{b},
+and @samp{p}.
+
+ All the flags except @samp{p} are used to describe comment delimiters.
+The digit flags indicate that a character can @emph{also} be part of a
+multi-character comment sequence, in addition to the syntactic
+properties associated with its character class. The flags must be
independent of the class and each other for the sake of characters such
as @samp{*} in C mode, which is a punctuation character, @emph{and} the
second character of a start-of-comment sequence (@samp{/*}), @emph{and}
the first character of an end-of-comment sequence (@samp{*/}).
+Emacs supports two comment styles simultaneously in any one syntax
+table. This is for the sake of C++. Each style of comment syntax has
+its own comment-start sequence and its own comment-end sequence. Each
+comment must stick to one style or the other; thus, if it starts with
+the comment-start sequence of style ``b'', it must also end with the
+comment-end sequence of style ``b''.
+
+@c #### Compatibility note; index here.
+As an extension to GNU Emacs 19 and 20, XEmacs supports two arbitrary
+comment-start sequences and two arbitrary comment-end sequences. (Thus
+the need for 8 flags.) GNU Emacs restricts the comment-start sequences
+to start with the same character, XEmacs does not. This means that for
+two-character sequences, where GNU Emacs uses the @samp{b} flag, XEmacs
+uses the digit flags @samp{5}--@samp{8}.
+
+A one character comment-end sequence applies to the ``b'' style if its
+first character has the @samp{b} flag set; otherwise, it applies to the
+``a'' style. The @samp{a} flag is optional. These flags have no effect
+on non-comment characters; two-character styles are determined by the
+digit flags.
+
The flags for a character @var{c} are:
@itemize @bullet
@item
@samp{1} means @var{c} is the start of a two-character comment-start
-sequence.
+sequence of style ``a''.
@item
@samp{2} means @var{c} is the second character of such a sequence.
@item
@samp{3} means @var{c} is the start of a two-character comment-end
-sequence.
+sequence of style ``a''.
@item
@samp{4} means @var{c} is the second character of such a sequence.
@item
+@samp{5} means @var{c} is the start of a two-character comment-start
+sequence of style ``b''.
+
+@item
+@samp{6} means @var{c} is the second character of such a sequence.
+
+@item
+@samp{7} means @var{c} is the start of a two-character comment-end
+sequence of style ``b''.
+
+@item
+@samp{8} means @var{c} is the second character of such a sequence.
+
+@item
+@samp{a} means that @var{c} as a comment delimiter belongs to the
+default ``a'' comment style. (This flag is optional.)
+
+@item
@c Emacs 19 feature
@samp{b} means that @var{c} as a comment delimiter belongs to the
-alternative ``b'' comment style.
+alternate ``b'' comment style.
-Emacs supports two comment styles simultaneously in any one syntax
-table. This is for the sake of C++. Each style of comment syntax has
-its own comment-start sequence and its own comment-end sequence. Each
-comment must stick to one style or the other; thus, if it starts with
-the comment-start sequence of style ``b'', it must also end with the
-comment-end sequence of style ``b''.
+@item
+@c Emacs 19 feature
+@samp{p} identifies an additional ``prefix character'' for Lisp syntax.
+These characters are treated as whitespace when they appear between
+expressions. When they appear within an expression, they are handled
+according to their usual syntax codes.
+
+The function @code{backward-prefix-chars} moves back over these
+characters, as well as over characters whose primary syntax class is
+prefix (@samp{'}). @xref{Motion and Syntax}.
+@end itemize
+
+Lisp (as you would expect) has a simple comment syntax.
+
+@table @asis
+@item @samp{;}
+@samp{<}
+@item newline
+@samp{>}
+@end table
+
+Note that no flags are used.
+This defines two comment-delimiting sequences:
-The two comment-start sequences must begin with the same character; only
-the second character may differ. Mark the second character of the
-``b''-style comment-start sequence with the @samp{b} flag.
+@table @asis
+@item @samp{;}
+This is a single-character comment-start sequence because the syntax
+class is @samp{<}.
-A comment-end sequence (one or two characters) applies to the ``b''
-style if its first character has the @samp{b} flag set; otherwise, it
-applies to the ``a'' style.
+@item newline
+This is a single character comment-end sequence because the syntax class
+is @samp{>} and the @samp{b} flag is not set.
+@end table
-The appropriate comment syntax settings for C++ are as follows:
+C++ (again, as you would expect) has a baroque, overrich, and
+excessively complex comment syntax.
@table @asis
@item @samp{/}
-@samp{124b}
+@samp{1456}
@item @samp{*}
@samp{23}
@item newline
@samp{>b}
@end table
-This defines four comment-delimiting sequences:
+Note that the ``b'' style mixes one-character and two-character
+sequences. The table above defines four comment-delimiting sequences:
@table @asis
@item @samp{/*}
-This is a comment-start sequence for ``a'' style because the
-second character, @samp{*}, does not have the @samp{b} flag.
+This is a comment-start sequence for ``a'' style because the @samp{1}
+flag is set on @samp{/} and the @samp{2} flag is set on @samp{*}.
@item @samp{//}
-This is a comment-start sequence for ``b'' style because the second
-character, @samp{/}, does have the @samp{b} flag.
+This is a comment-start sequence for ``b'' style because both the @samp{5}
+and the @samp{6} flags are set on @samp{/}.
@item @samp{*/}
-This is a comment-end sequence for ``a'' style because the first
-character, @samp{*}, does not have the @samp{b} flag
+This is a comment-end sequence for ``a'' style because the @samp{3}
+flag is set on @samp{*} and the @samp{4} flag is set on @samp{/}.
@item newline
This is a comment-end sequence for ``b'' style, because the newline
character has the @samp{b} flag.
@end table
-@item
-@c Emacs 19 feature
-@samp{p} identifies an additional ``prefix character'' for Lisp syntax.
-These characters are treated as whitespace when they appear between
-expressions. When they appear within an expression, they are handled
-according to their usual syntax codes.
-
-The function @code{backward-prefix-chars} moves back over these
-characters, as well as over characters whose primary syntax class is
-prefix (@samp{'}). @xref{Motion and Syntax}.
-@end itemize
@node Syntax Table Functions
@section Syntax Table Functions
@finalout
@titlepage
@title XEmacs FAQ
-@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 2002/08/20 11:35:32 $
+@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 2002/10/31 15:06:37 $
@sp 1
@author Tony Rossini <rossini@@biostat.washington.edu>
@author Ben Wing <ben@@xemacs.org>
* Q2.0.13:: I don't need no steenkin' packages. Do I? (NEW)
* Q2.0.14:: How do I figure out which packages to install? (NEW)
* Q2.0.15:: EFS fails with "500 AUTH not understood" (NEW)
+* Q2.0.16:: Cygwin XEmacs won't start: cygXpm-noX4.dll was not found (NEW)
Trouble Shooting:
* Q2.1.1:: XEmacs just crashed on me!
* Q2.0.13:: I don't need no steenkin' packages. Do I? (NEW)
* Q2.0.14:: I don't want to install a million .els one at a time! (NEW)
* Q2.0.15:: EFS fails with "500 AUTH not understood" (NEW)
+* Q2.0.16:: Cygwin XEmacs won't start: cygXpm-noX4.dll was not found (NEW)
Trouble Shooting:
* Q2.1.1:: XEmacs just crashed on me!
packages, it is recommended that you use the automatic package tools
afterwards to pick up any recent updates.
-@node Q2.0.15, Q2.1.1, Q2.0.14, Installation
+@node Q2.0.15, Q2.0.16, Q2.0.14, Installation
@unnumberedsubsec Q2.0.15: EFS fails with "500 AUTH not understood" (NEW)
A typical error: FTP Error: USER request failed; 500 AUTH not understood.
`efs-ftp-program-args'. Use M-x customize-variable, and verify the
needed flag with `man ftp' or other local documentation.
-@node Q2.1.1, Q2.1.2, Q2.0.15, Installation
+@node Q2.0.16, Q2.1.1, Q2.0.15, Installation
+@unnumberedsubsec Q2.0.16: Cygwin XEmacs won't start: cygXpm-noX4.dll was not found (NEW)
+
+The Cygwin binary distributed with the netinstaller uses an external DLL
+to handle XPM images (such as toolbar buttons). You may get an error like
+
+ This application has failed to start because cygXpm-noX4.dll was not found.
+ Re-installing the application may fix this problem.
+
+Andy Piper <andy@@xemacs.org> sez:
+
+ cygXpm-noX4 is part of the cygwin distribution under libraries or
+ graphics, but is not installed by default. You need to run the
+ cygwin setup again and select this package.
+
+Ie, reinstalling XEmacs won't help because it is not part of the XEmacs
+distribution.
+
+@node Q2.1.1, Q2.1.2, Q2.0.16, Installation
@unnumberedsec 2.1: Trouble Shooting
@unnumberedsubsec Q2.1.1: Help! XEmacs just crashed on me!
If you want to compile under X, you will also need the X libraries; see
@ref{Q6.1.6}.
+If you want to compile without X, you will need the @file{xpm-nox}
+library, which must be specifically selected in the Cygwin netinstaller;
+it is not selected by default. The package has had various names.
+Currently it is called @file{cygXpm-noX4.dll}.
+
@node Q6.1.4, Q6.1.5, Q6.1.3, MS Windows
@unnumberedsubsec Q6.1.4: How do I compile under Cygwin?
/usr/lib/libXpm.dll.a -> /usr/lib/libXpm-noX.dll.a
@end example
+(This advice may now be obsolete because of the availability of the
+cygXpm-noX4.dll package from Cygwin. Send confirmation to
+@email{faq@@xemacs.org}.)
@item
Other problems are listed in the @file{PROBLEMS} file, in the top-level
@end table
If there is no character in the first column, the package has been
-installed and is up-to-date.
+installed and is up to date.
From here, you can select or unselect packages for installation using
the @key{RET} key, the @kbd{Mouse-2} button or selecting "Select" from
looking for isn't here, please send a message to the
@email{xemacs-beta@@xemacs.org, XEmacs Beta list}.
-This data is up-to-date as of August 8, 2002.
+This data is up to date as of September 22, 2002.
@subsection Normal Packages
A very broad selection of elisp packages.
@item forms
Forms editing support (obsolete, use the built-in Widget instead).
+@item fortran-modes
+Fortran language support.
+
@item frame-icon
Provide a WM icon based on major mode.
@item fsf-compat
-FSF Emacs compatibility files.
+GNU Emacs compatibility files.
@item games
Tetris, Sokoban, and Snake.
The Gnus Newsreader and Mailreader.
@item haskell-mode
-Haskell editing support.
+Haskell language support.
@item hm--html-menus
HTML editing.
compression, remote shells, etc.
@item ocaml
-Objective Caml editing support.
+Objective Caml language support.
@item pc
PC style interface emulation.
@item pcomplete
Provides programmatic completion.
+@item perl-modes
+Perl language support.
+
@item prog-modes
Miscellaneous single-file lisp files for various programming languages.
@item psgml
Validated HTML/SGML editing.
+@item psgml-dtds
+A collection of DTDs for psgml. Note that this package is deprecated
+and will be removed in the future, most likely Q2/2003. Instead of using
+this, you should install needed DTDs yourself.
+
+@item python-modes
+Python language support.
+
@item reftex
Emacs support for LaTeX cross-references, citations.
@item rmail
An obsolete Emacs mailer. If you do not already use it don't start.
+@item ruby-modes
+Ruby language support.
+
@item sasl
Simple Authentication and Security Layer (SASL) library.
+2002-11-02 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * XEmacs 21.4.10 "Military Intelligence" is released.
+
+2002-10-13 Adrian Aichner <adrian@xemacs.org>
+
+ * xemacs.mak (OS): Remove obsolete quoting of double-quote in the
+ Installation file to avoid unnecessary deviations from the UNIX
+ version in `describe-installation' and `build-report'.
+
+2002-10-08 Andy Piper <andy@xemacs.org>
+
+ * xemacs.mak: set the stacksize to 8mb which seems to be the magic
+ number for regex.
+
2002-08-23 Stephen J. Turnbull <stephen@xemacs.org>
* XEmacs 21.4.9 "Informed Management" is released.
<<
# 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
+ editbin -nologo -stack:0x800000 -section:.rsrc,rw xemacs.exe
$(DEL) $(TEMACS_DIR)\xemacs.dmp
+!else
+ editbin -nologo -stack:0x800000 xemacs.exe
!endif
cd $(NT)
@if not exist $(TEMACS_DIR)\SATISFIED nmake -nologo -f xemacs.mak $@
OS: $(OS)
!endif
-XEmacs $(XEMACS_VERSION_STRING) $(xemacs_codename:"=\") configured for `$(EMACS_CONFIGURATION)'.
+XEmacs $(XEMACS_VERSION_STRING) $(xemacs_codename) configured for `$(EMACS_CONFIGURATION)'.
- Building XEmacs in \"$(MAKEDIR:\=\\)\".
+ Building XEmacs in "$(MAKEDIR:\=\\)".
!if defined(CCV)
- Using compiler \"$(CC) $(CFLAGS)\".
+ Using compiler "$(CC) $(CFLAGS)".
!endif
- Installing XEmacs in \"$(INSTALL_DIR:\=\\)\".
- Package path is $(PATH_PACKAGEPATH:"=\").
+ Installing XEmacs in "$(INSTALL_DIR:\=\\)".
+ Package path is $(PATH_PACKAGEPATH).
!if $(INFODOCK)
Building InfoDock.
!endif
close (out);
close (err);
- /* I can't think of any reason why child processes need any more
- than the standard 3 file descriptors. It would be cleaner to
+ /* Close non-process-related file descriptors. It would be cleaner to
close just the ones that need to be, but the following brute
force approach is certainly effective, and not too slow. */
+
{
int fd;
- for (fd=3; fd<=64; fd++)
+
+ for (fd = 3; fd < MAXDESC; fd++)
close (fd);
}
#endif /* not WIN32_NATIVE */
if (!d)
report_file_error ("Opening directory", list1 (directory));
- regex_match_object = Qt;
+ /* #### In Matt's code, this was Qt. Why? */
+ regex_match_object = Qnil;
regex_emacs_buffer = current_buffer;
record_unwind_protect (close_directory_unwind, make_opaque_ptr ((void *)d));
#include "events-mod.h"
+void enqueue_focus_event (Widget wants_it, Lisp_Object frame, int in_p);
static void handle_focus_event_1 (struct frame *f, int in_p);
+static void handle_focus_event_2 (Window w, struct frame *f, int in_p);
static struct event_stream *Xt_event_stream;
static void
handle_focus_event_1 (struct frame *f, int in_p)
{
+ handle_focus_event_2 (XtWindow (FRAME_X_TEXT_WIDGET (f)), f, in_p);
+}
+
+static void
+handle_focus_event_2 (Window win, struct frame *f, int in_p)
+{
+ /* Although this treats focus differently for all widgets (including
+ the frame) it seems to work ok. */
+ Widget needs_it = XtWindowToWidget (FRAME_X_DISPLAY (f), win);
+
#if XtSpecificationRelease > 5
widget_with_focus = XtGetKeyboardFocusWidget (FRAME_X_TEXT_WIDGET (f));
#endif
click in the frame. Why is this? */
if (in_p
#if XtSpecificationRelease > 5
- && FRAME_X_TEXT_WIDGET (f) != widget_with_focus
+ && needs_it != widget_with_focus
#endif
)
{
- lw_set_keyboard_focus (FRAME_X_SHELL_WIDGET (f),
- FRAME_X_TEXT_WIDGET (f));
+ lw_set_keyboard_focus (FRAME_X_SHELL_WIDGET (f), needs_it);
}
+ /* If we are focusing on a native widget then record and exit. */
+ if (needs_it != FRAME_X_TEXT_WIDGET (f)) {
+ widget_with_focus = needs_it;
+ return;
+ }
+
/* We have the focus now. See comment in
emacs_Xt_handle_widget_losing_focus (). */
if (in_p)
}
}
+/* Create a synthetic X focus event. */
+void
+enqueue_focus_event (Widget wants_it, Lisp_Object frame, int in_p)
+{
+ Lisp_Object emacs_event = Fmake_event (Qnil, Qnil);
+ Lisp_Event *ev = XEVENT (emacs_event);
+ XEvent *x_event = &ev->event.magic.underlying_x_event;
+
+ x_event->type = in_p ? FocusIn : FocusOut;
+ x_event->xfocus.window = XtWindow (wants_it);
+
+ ev->channel = frame;
+ ev->event_type = magic_event;
+
+ enqueue_Xt_dispatch_event (emacs_event);
+}
+
/* The idea here is that when a widget glyph gets unmapped we don't
want the focus to stay with it if it has focus - because it may
- well just get deleted next andthen we have lost the focus until the
+ well just get deleted next and then we have lost the focus until the
user does something. So handle_focus_event_1 records the widget
with keyboard focus when FocusOut is processed, and then, when a
widget gets unmapped, it calls this function to restore focus if
if (FRAME_X_EXTERNAL_WINDOW_P (f))
break;
#endif
- handle_focus_event_1 (f, event->type == FocusIn);
+ handle_focus_event_2 (event->xfocus.window, f, event->type == FocusIn);
break;
case ClientMessage:
static void
drain_X_queue (void)
{
+ Lisp_Object devcons, concons;
+ CONSOLE_LOOP (concons)
+ {
+ struct console *con = XCONSOLE (XCAR (concons));
+ if (!con->input_enabled)
+ continue;
+
+ /* sjt sez: Have you tried the loop over devices with XtAppPending(),
+ not XEventsQueued()?
+ Ben Sigelman sez: No.
+ sjt sez: I'm guessing that the reason that your patch "works" is this:
+
+ + struct device* d;
+ + Display* display;
+ + d = XDEVICE (XCAR (devcons));
+ + if (DEVICE_X_P (d) && DEVICE_X_DISPLAY (d)) {
+
+ Ie, if the device goes down, XEmacs detects that and deletes it.
+ Then the if() fails (DEVICE_X_DISPLAY(d) is NULL), and we don't go
+ into the Xlib-of-no-return. If you know different, I'd like to hear
+ about it. ;-)
+
+ These ideas haven't been tested; the code below works for Ben.
+ */
+ CONSOLE_DEVICE_LOOP (devcons, con)
+ {
+ struct device* d;
+ Display* display;
+ d = XDEVICE (XCAR (devcons));
+ if (DEVICE_X_P (d) && DEVICE_X_DISPLAY (d)) {
+ display = DEVICE_X_DISPLAY (d);
+ while (XEventsQueued (display, QueuedAfterReading))
+ XtAppProcessEvent (Xt_app_con, XtIMXEvent);
+ }
+ }
+ }
+ /* This is the old code, before Ben Sigelman's patch. */
+ /*
while (XtAppPending (Xt_app_con) & XtIMXEvent)
XtAppProcessEvent (Xt_app_con, XtIMXEvent);
+ */
}
static int
else
shutdown (str->s, 1);
- CloseHandle ((HANDLE)str->s);
+ closesocket (str->s);
if (str->pending_p)
WaitForSingleObject (str->ov.hEvent, INFINITE);
if (extent_detached_p (ext))
strcpy (bp, "detached");
else
- sprintf (bp, "%d, %d",
+ sprintf (bp, "%ld, %ld",
XINT (Fextent_start_position (obj)),
XINT (Fextent_end_position (obj)));
bp += strlen (bp);
`inside-margin', or `outside-margin') of the extent's
begin glyph.
- end-glyph-layout The layout policy of the extent's end glyph.
+ end-glyph-layout The layout policy of the extent's end glyph.
+
+ syntax-table A cons or a syntax table object. If a cons, the car must
+ be an integer (interpreted as a syntax code, applicable to
+ all characters in the extent). Otherwise, syntax of
+ characters in the extent is looked up in the syntax table.
+ You should use the text property API to manipulate this
+ property. (This may be required in the future.)
*/
(extent, property, value))
{
EXFUN (Fextent_object, 1);
EXFUN (Fextent_start_position, 1);
EXFUN (Fmake_extent, 3);
+EXFUN (Fnext_single_property_change, 4);
EXFUN (Fprevious_single_property_change, 4);
EXFUN (Fset_extent_endpoints, 4);
EXFUN (Fnext_extent_change, 2);
DOCINFO di;
struct device *device = XDEVICE (FRAME_DEVICE (f));
int frame_left, frame_top, frame_width, frame_height;
-
+
/* DC might be recreated in msprinter_apply_devmode,
so do not initialize until now */
HDC hdc = DEVICE_MSPRINTER_HDC (device);
dpy = XtDisplay (FRAME_X_SHELL_WIDGET (f));
#ifdef EXTERNAL_WIDGET
- expect_x_error (XtDisplay (FRAME_X_SHELL_WIDGET (f)));
+ expect_x_error (dpy);
/* for obscure reasons having (I think) to do with the internal
window-to-widget hierarchy maintained by Xt, we have to call
XtUnrealizeWidget() here. Xt can really suck. */
if (f->being_deleted)
XtUnrealizeWidget (FRAME_X_SHELL_WIDGET (f));
XtDestroyWidget (FRAME_X_SHELL_WIDGET (f));
- x_error_occurred_p (XtDisplay (FRAME_X_SHELL_WIDGET (f)));
+ x_error_occurred_p (dpy);
#else
XtDestroyWidget (FRAME_X_SHELL_WIDGET (f));
/* make sure the windows are really gone! */
for (j=0; j<old_width; j++)
{
- int byte = offset[j];
+ int bite = offset[j];
new_offset[j] = ~ (unsigned char)
- ((flip_table[byte & 0xf] << 4) + flip_table[byte >> 4]);
+ ((flip_table[bite & 0xf] << 4) + flip_table[bite >> 4]);
}
}
}
}
+/* Account for some of the limitations with widget images. */
+static int
+mswindows_widget_border_width (void)
+{
+ return DEFAULT_WIDGET_BORDER_WIDTH;
+}
+
/* register widgets into our hashtable so that we can cope with the
callbacks. The hashtable is weak so deregistration is handled
automatically */
default_face_font_info (domain, 0, 0, &height, 0, 0);
GET_LIST_LENGTH (items, len);
- height = (height + WIDGET_BORDER_HEIGHT * 2 ) * len;
+ height = (height + DEFAULT_WIDGET_BORDER_WIDTH * 2 ) * len;
IMAGE_INSTANCE_HEIGHT (ii) = height;
/* Now create the widget. */
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, widget_border_width);
/* image methods - printer */
CONSOLE_INHERITS_METHOD (msprinter, mswindows, print_image_instance);
/* Widget-specific glyph objects.
- Copyright (C) 1998, 1999, 2000 Andy Piper.
+ Copyright (C) 1998, 1999, 2000, 2002 Andy Piper.
This file is part of XEmacs.
Lisp_Object Qetched_in, Qetched_out, Qbevel_in, Qbevel_out;
Lisp_Object Qmake_glyph;
+Lisp_Object Vwidget_border_width;
+
+static int
+widget_border_width (Lisp_Object domain);
+static int
+widget_spacing (Lisp_Object domain);
#ifdef DEBUG_WIDGETS
int debug_widget_instances;
static void
check_valid_justification (Lisp_Object data)
{
- if (!EQ (data, Qleft) && !EQ (data, Qright) && !EQ (data, Qcenter))
+ if (!EQ (data, Qleft)
+ &&
+ !EQ (data, Qright)
+ &&
+ !EQ (data, Qtop)
+ &&
+ !EQ (data, Qbottom)
+ &&
+ !EQ (data, Qcenter))
invalid_argument ("unknown justification for layout", data);
}
}
}
+/* Determine the border with of the widget. */
+static int
+widget_border_width (Lisp_Object domain)
+{
+ /* #### FIXME -- need to use specifiers (Vwidget_border_width) for
+ some portion of this. */
+ if (HAS_DEVMETH_P (DOMAIN_XDEVICE (domain),
+ widget_border_width))
+ return DEVMETH (DOMAIN_XDEVICE (domain), widget_border_width, ());
+ else
+ return DEFAULT_WIDGET_BORDER_WIDTH;
+}
+
+static int
+widget_instance_border_width (Lisp_Image_Instance* ii)
+{
+ return widget_border_width (IMAGE_INSTANCE_DOMAIN (ii));
+}
+
+/* #### Its not clear to me what the value of logical_unit_height should
+ be, or whether it should even depend on the current
+ image_instance. It really should probably only depend on the
+ default widget face and the domain, however you can envisage users
+ wanting different logical units for nested layouts - so using the
+ properties of the current lahyout is probably not so dumb. */
+static int
+logical_unit_height (Lisp_Object text, Lisp_Object face, Lisp_Object domain)
+{
+ int charheight = 0;
+ query_string_geometry (text, face,
+ 0, &charheight, 0, domain);
+ /* For the returned value to be useful it needs to be big enough to
+ accomodate the largest single-height widget. This is currently
+ the edit-field. */
+ return charheight + 2 * widget_spacing (domain)
+ + 4 * widget_border_width (domain);
+}
+
+static int
+widget_logical_unit_height (Lisp_Image_Instance* ii)
+{
+ return logical_unit_height (NILP (IMAGE_INSTANCE_WIDGET_TEXT (ii)) ?
+ NILP (IMAGE_INSTANCE_NAME (ii)) ?
+ Fsymbol_name (Qwidget)
+ : IMAGE_INSTANCE_NAME (ii)
+ : IMAGE_INSTANCE_WIDGET_TEXT (ii),
+ IMAGE_INSTANCE_WIDGET_FACE (ii),
+ IMAGE_INSTANCE_DOMAIN (ii));
+}
+
/* Wire widget property invocations to specific widgets. The problem
we are solving here is that when instantiators get converted to
instances they lose some type information (they just become
from lisp does not result in synchronous updates. Do this last so
that format-specific methods have an opportunity to prevent
wholesale changes - e.g. rebuilding tabs. */
- MAYBE_DEVMETH (DOMAIN_XDEVICE (ii->domain), redisplay_widget, (ii));
+ MAYBE_DEVMETH (DOMAIN_XDEVICE (IMAGE_INSTANCE_DOMAIN (ii)),
+ redisplay_widget, (ii));
/* Pick up the items we recorded earlier. */
if (IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii))
}
}
+/* Determine the spacing of the widget. */
+static int
+widget_spacing (Lisp_Object domain)
+{
+ if (HAS_DEVMETH_P (DOMAIN_XDEVICE (domain), widget_spacing))
+ return DEVMETH (DOMAIN_XDEVICE (domain),
+ widget_spacing, (0));
+ else
+ return DEFAULT_WIDGET_SPACING;
+}
+
/* Query for a widgets desired geometry. If no type specific method is
provided then use the widget text to calculate sizes. */
static void
&w, &h, 0, domain);
/* Adjust the size for borders. */
if (IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii))
- *width = w + 2 * WIDGET_BORDER_WIDTH;
+ *width = w + 2 * widget_instance_border_width (ii);
if (IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP (ii))
- *height = h + 2 * WIDGET_BORDER_HEIGHT;
+ *height = h + 2 * widget_instance_border_width (ii);
}
}
/* Finish off with dynamic sizing. */
IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii) = 1;
IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP (ii) = 1;
IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii) = LAYOUT_HORIZONTAL;
- IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (ii) = 0;
+ IMAGE_INSTANCE_SUBWINDOW_H_JUSTIFY (ii) = 0;
+ IMAGE_INSTANCE_SUBWINDOW_V_JUSTIFY (ii) = 0;
}
/* Instantiate a button widget. Unfortunately instantiated widgets are
size in characters is probably as good as any since the widget
face is more likely to be proportional and thus give inadequate
results. Using character sizes can only ever be approximate
- anyway. */
- if (tw || th)
+ anyway. :height is measured in logical characters which take into
+ account the borders and spacing on widgets. */
+ if (tw)
{
- int charwidth, charheight;
- default_face_font_info (domain, 0, 0, &charheight, &charwidth, 0);
- if (tw)
- pw = charwidth * tw;
- if (th)
- ph = charheight * th;
+ int charwidth;
+ default_face_font_info (domain, 0, 0, 0, &charwidth, 0);
+ pw = ROUND_UP (charwidth * tw + 4 * widget_instance_border_width (ii), charwidth);
+ }
+
+ /* For heights the widget face is more appropriate. */
+ if (th == 1)
+ {
+ int charheight;
+ if (!NILP (IMAGE_INSTANCE_WIDGET_TEXT (ii)))
+ {
+ query_string_geometry (IMAGE_INSTANCE_WIDGET_TEXT (ii),
+ IMAGE_INSTANCE_WIDGET_FACE (ii),
+ 0, &charheight, 0, domain);
+ }
+ else
+ {
+ default_face_font_info (domain, 0, 0, &charheight, 0, 0);
+ }
+ ph = (charheight + 2 * widget_instance_border_width (ii)) * th;
+ }
+ /* For heights > 1 use logical units. */
+ else if (th > 1)
+ {
+ ph = widget_logical_unit_height (ii) * th;
}
/* for a widget with an image pick up the dimensions from that */
if (!NILP (glyph))
{
if (!pw)
- pw = glyph_width (glyph, image_instance) + 2 * WIDGET_BORDER_WIDTH;
+ pw = glyph_width (glyph, image_instance) + 2 * widget_instance_border_width (ii);
if (!ph)
- ph = glyph_height (glyph, image_instance) + 2 * WIDGET_BORDER_HEIGHT;
+ ph = glyph_height (glyph, image_instance) + 2 * widget_instance_border_width (ii);
IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP (ii) = 0;
IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii) = 0;
}
/* Adjust the size for borders. */
if (IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii))
{
- *width = w + 2 * WIDGET_BORDER_WIDTH;
+ *width = w + 3 * widget_instance_border_width (ii);
if (EQ (XGUI_ITEM (IMAGE_INSTANCE_WIDGET_ITEM (ii))->style, Qradio)
||
*width += 12;
}
if (IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP (ii))
- *height = h + 2 * WIDGET_BORDER_HEIGHT;
+ *height = h + 3 * widget_instance_border_width (ii);
+}
+
+/* Get the geometry of an edit field. */
+static void
+edit_field_query_geometry (Lisp_Object image_instance,
+ int* width, int* height,
+ enum image_instance_geometry disp, Lisp_Object domain)
+{
+ Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+ 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 + 4 * widget_instance_border_width (ii);
+ if (IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP (ii))
+ *height = h + 4 * widget_instance_border_width (ii);
}
/* tree-view geometry - get the height right */
if (*height)
{
int len, h;
+ /* #### widget face would be better here. */
default_face_font_info (domain, 0, 0, &h, 0, 0);
GET_LIST_LENGTH (items, len);
*height = len * h;
query_string_geometry (XGUI_ITEM (XCAR (rest))->name,
IMAGE_INSTANCE_WIDGET_FACE (ii),
&w, &h, 0, domain);
- tw += 5 * WIDGET_BORDER_WIDTH; /* some bias */
+ tw += 5 * widget_instance_border_width (ii); /* some bias */
tw += w;
- th = max (th, h + 2 * WIDGET_BORDER_HEIGHT);
+ th = max (th, h + 2 * widget_instance_border_width (ii));
}
/* Fixup returned values depending on orientation. */
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
Lisp_Object items = find_keyword_in_vector (instantiator, Q_items);
Lisp_Object border_inst = find_keyword_in_vector (instantiator, Q_border);
+ Lisp_Object justify = find_keyword_in_vector (instantiator, Q_justify);
+ Lisp_Object hjustify = find_keyword_in_vector (instantiator, Q_horizontally_justify);
+ Lisp_Object vjustify = find_keyword_in_vector (instantiator, Q_vertically_justify);
Lisp_Object border = Qnil;
Lisp_Object children = IMAGE_INSTANCE_LAYOUT_CHILDREN (ii);
int structure_changed = 0;
struct gcpro gcpro1;
+ /* Pick up horizontal justification, left is the default.*/
+ if (!NILP (hjustify))
+ {
+ if (EQ (hjustify, Qright) || EQ (hjustify, Qbottom))
+ IMAGE_INSTANCE_SUBWINDOW_H_JUSTIFY (ii) = LAYOUT_JUSTIFY_RIGHT;
+ else if (EQ (hjustify, Qcenter))
+ IMAGE_INSTANCE_SUBWINDOW_H_JUSTIFY (ii) = LAYOUT_JUSTIFY_CENTER;
+ }
+ /* If not set use general justification. */
+ else if (!NILP (justify))
+ {
+ if (EQ (justify, Qright) || EQ (justify, Qbottom))
+ IMAGE_INSTANCE_SUBWINDOW_H_JUSTIFY (ii) = LAYOUT_JUSTIFY_RIGHT;
+ else if (EQ (justify, Qcenter))
+ IMAGE_INSTANCE_SUBWINDOW_H_JUSTIFY (ii) = LAYOUT_JUSTIFY_CENTER;
+ }
+
+ /* Pick up vertical justification, top is the default. */
+ if (!NILP (vjustify))
+ {
+ if (EQ (vjustify, Qright) || EQ (vjustify, Qbottom))
+ IMAGE_INSTANCE_SUBWINDOW_V_JUSTIFY (ii) = LAYOUT_JUSTIFY_BOTTOM;
+ else if (EQ (vjustify, Qcenter))
+ IMAGE_INSTANCE_SUBWINDOW_V_JUSTIFY (ii) = LAYOUT_JUSTIFY_CENTER;
+ }
+ /* If not set use general justification. */
+ else if (!NILP (justify))
+ {
+ if (EQ (justify, Qright) || EQ (justify, Qbottom))
+ IMAGE_INSTANCE_SUBWINDOW_V_JUSTIFY (ii) = LAYOUT_JUSTIFY_BOTTOM;
+ else if (EQ (justify, Qcenter))
+ IMAGE_INSTANCE_SUBWINDOW_V_JUSTIFY (ii) = LAYOUT_JUSTIFY_CENTER;
+ }
+
/* We want to avoid consing if we can. This is quite awkward because
we have to deal with the border as well as the items. */
-
GCPRO1 (border);
if (INTP (IMAGE_INSTANCE_LAYOUT_BORDER (ii)))
glyphs are cached on a device basis like most other glyphs. Instead
they should be cached per-window and then the instance would be
fixed and we wouldn't have to mess around with font metrics and the
- rest. */
-
-/* Query the geometry of a layout widget. We assume that we can only
- get here if the size is not already fixed. */
+ rest.
+
+ Another sizing problem is alignment. We provide layout widgets that
+ allow users to stack widgets vertically or horizontally. These
+ layouts also allow the widgets to be centered (space evenly
+ distributed), left or right justified (fixed spacing widgets
+ stacked against the left, righ, top or bottom edge). Unfortunately
+ this doesn't allow widgets in different layouts to be aligned. For
+ instance how should the search dialog be organized for alignment?
+ The obvious choice of two vertical columns does not work since the
+ size of individual widgets will affect where they get placed. The
+ same is true for several rows of widgets. To solve this problem we
+ introduce the notion of `logical_unit_height'. This is a size
+ quantity that is designed to be big enough to accomodate the
+ largest `single height unit'. The function
+ widget_logical_unit_height() determines the value of this in
+ pixels. It is dependent on the widget face and some combination of
+ spacing and border-width. Thus if users specify left or right
+ justification in a vertical layout they get something in logical
+ units. To simplify this the functions
+ `widget-logical-to-character-height' and
+ `widget-logical-to-character-width' allow conversion between
+ characters and logical units so that frames can be sized
+ appropriately. */
+
+/* Query the geometry of a layout widget. */
static void
layout_query_geometry (Lisp_Object image_instance, int* width,
int* height, enum image_instance_geometry disp,
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;
- int gheight, gwidth;
+ int gheight, gwidth, luh;
/* If we are not initialized then we won't have any children. */
if (!IMAGE_INSTANCE_INITIALIZED (ii))
!IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii))
return;
+ luh = widget_logical_unit_height (ii);
+
/* Pick up the border text if we have one. */
if (INTP (IMAGE_INSTANCE_LAYOUT_BORDER (ii)))
{
glyph_query_geometry (XCAR (items), &gwidth, &gheight, disp,
image_instance);
- ph_adjust = gheight / 2;
+ ph_adjust = gheight;
items = XCDR (items);
}
glyph_query_geometry (glyph, &gwidth, &gheight, disp, image_instance);
nitems ++;
- if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
- == LAYOUT_HORIZONTAL)
+ if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii) == LAYOUT_HORIZONTAL)
{
maxph = max (maxph, gheight);
maxpw += gwidth;
/* 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 +
- IMAGE_INSTANCE_MARGIN_WIDTH (ii)) * 2;
- else
- *width = maxpw + 2 * (WIDGET_BORDER_WIDTH * 2 +
- IMAGE_INSTANCE_MARGIN_WIDTH (ii));
+ if (IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii)) {
+ 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_instance_border_width (ii) +
+ IMAGE_INSTANCE_MARGIN_WIDTH (ii)) * 2;
+ }
+ else
+ {
+ *width = maxpw + 2 * (widget_instance_border_width (ii) * 2 +
+ IMAGE_INSTANCE_MARGIN_WIDTH (ii));
+ }
+ }
/* Work out vertical spacings. */
- 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 +
- IMAGE_INSTANCE_MARGIN_WIDTH (ii)) * 2 + ph_adjust;
- else
- *height = maxph + (2 * WIDGET_BORDER_HEIGHT +
- IMAGE_INSTANCE_MARGIN_WIDTH (ii)) * 2 + ph_adjust;
+ if (IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP (ii)) {
+ 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_LOGICAL_LAYOUT (ii))
+ {
+ *height = nitems * luh + ph_adjust;
+ }
+ else if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii) == LAYOUT_VERTICAL)
+ {
+ *height = maxph + ((nitems + 1) * widget_instance_border_width (ii) +
+ IMAGE_INSTANCE_MARGIN_WIDTH (ii)) * 2 + ph_adjust;
+ }
+ else
+ {
+ *height = maxph + (2 * widget_instance_border_width (ii) +
+ IMAGE_INSTANCE_MARGIN_WIDTH (ii)) * 2 + ph_adjust;
+ }
+ }
+#ifdef DEBUG_WIDGET_OUTPUT
+ stderr_out ("layout wants %dx%d\n", *width, *height);
+#endif
}
int
int x, y, maxph = 0, maxpw = 0, nitems = 0,
horiz_spacing, vert_spacing, ph_adjust = 0;
int gheight, gwidth;
+ /* See comments in widget_logical_unit_height(). */
+ int luh = widget_logical_unit_height (ii);
/* If we are not initialized then we won't have any children. */
if (!IMAGE_INSTANCE_INITIALIZED (ii))
return 0;
- /* Pick up the border text if we have one. */
+#ifdef DEBUG_WIDGET_OUTPUT
+ stderr_out ("layout output %dx%d\n", width, height);
+#endif
+
+ /* Pick up the border text if we have one. A border can have the
+ values Qetched_in, Qetched_out, Qbevel_in, Qbevel_out or an
+ integer. The first four just affect the display properties of the
+ border that is drawn. The last is an offset and implies that the
+ first item in the list of subcontrols is a text control that
+ should be displayed on the border. */
if (INTP (IMAGE_INSTANCE_LAYOUT_BORDER (ii)))
{
Lisp_Object border = XCAR (items);
items = XCDR (items);
glyph_query_geometry (border, &gwidth, &gheight,
IMAGE_DESIRED_GEOMETRY, image_instance);
- ph_adjust = gheight / 2;
- IMAGE_INSTANCE_LAYOUT_BORDER (ii) = make_int (ph_adjust);
+ /* The vertical offset for subsequent items is the full height
+ of the border glyph. */
+ ph_adjust = gheight;
+ /* The offset for the border is half the glyph height. */
+ IMAGE_INSTANCE_LAYOUT_BORDER (ii) = make_int (gheight / 2);
/* #### Really, what should this be? */
glyph_do_layout (border, gwidth, gheight, 10, 0,
if (width < maxpw)
/* The user wants a smaller space than the largest item, so we
just provide default spacing and will let the output routines
- clip.. */
- horiz_spacing = WIDGET_BORDER_WIDTH * 2;
+ clip. */
+ horiz_spacing = widget_spacing (IMAGE_INSTANCE_DOMAIN (ii));
else if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
- == LAYOUT_HORIZONTAL)
+ == LAYOUT_HORIZONTAL)
/* We have a larger area to display in so distribute the space
evenly. */
horiz_spacing = (width - (maxpw +
horiz_spacing = (width - maxpw) / 2
- IMAGE_INSTANCE_MARGIN_WIDTH (ii);
+ /* We are trying here to get widgets to line up when they are left
+ or right justified vertically. This means that we must position
+ widgets on logical unit boundaries, even though their height may
+ be greater or less than a logical unit. In order to avoid
+ clipping we need to determine how big the widget wants to be and
+ then allocate as many logical units as necessary in order to
+ accommodate it. */
if (height < maxph)
- vert_spacing = WIDGET_BORDER_HEIGHT * 2;
+ vert_spacing = widget_spacing (IMAGE_INSTANCE_DOMAIN (ii)) * 2;
else if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
== LAYOUT_VERTICAL)
- vert_spacing = (height - (maxph + ph_adjust +
- IMAGE_INSTANCE_MARGIN_WIDTH (ii) * 2))
- / (nitems + 1);
+ {
+ if (!IMAGE_INSTANCE_SUBWINDOW_V_CENTERED (ii))
+ vert_spacing = widget_spacing (IMAGE_INSTANCE_DOMAIN (ii)) * 2;
+ else
+ vert_spacing = (height - (maxph + ph_adjust +
+ IMAGE_INSTANCE_MARGIN_WIDTH (ii) * 2))
+ / (nitems + 1);
+ }
else
vert_spacing = (height - (maxph + ph_adjust)) / 2
- IMAGE_INSTANCE_MARGIN_WIDTH (ii);
- y = vert_spacing + ph_adjust + IMAGE_INSTANCE_MARGIN_WIDTH (ii);
+ y = yoffset = vert_spacing + ph_adjust + IMAGE_INSTANCE_MARGIN_WIDTH (ii);
x = horiz_spacing + IMAGE_INSTANCE_MARGIN_WIDTH (ii);
/* Now flip through putting items where we want them, paying
glyph_query_geometry (glyph, &gwidth, &gheight,
IMAGE_DESIRED_GEOMETRY, image_instance);
- if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
- == LAYOUT_HORIZONTAL)
+ if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii) == LAYOUT_HORIZONTAL)
{
- if (IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (ii)
- == LAYOUT_JUSTIFY_RIGHT)
+ if (IMAGE_INSTANCE_SUBWINDOW_BOTTOM_JUSTIFIED (ii))
y = height - (gheight + vert_spacing);
- if (IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (ii)
- == LAYOUT_JUSTIFY_CENTER)
+ else if (IMAGE_INSTANCE_SUBWINDOW_V_CENTERED (ii))
y = (height - gheight) / 2;
}
else
{
- if (IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (ii)
- == LAYOUT_JUSTIFY_RIGHT)
+ if (IMAGE_INSTANCE_SUBWINDOW_RIGHT_JUSTIFIED (ii))
x = width - (gwidth + horiz_spacing);
- if (IMAGE_INSTANCE_SUBWINDOW_JUSTIFY (ii)
- == LAYOUT_JUSTIFY_CENTER)
+ else if (IMAGE_INSTANCE_SUBWINDOW_H_CENTERED (ii))
x = (width - gwidth) / 2;
}
/* Now layout subwidgets if they require it. */
glyph_do_layout (glyph, gwidth, gheight, x, y, image_instance);
- if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii)
- == LAYOUT_HORIZONTAL)
+ if (IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii) == LAYOUT_HORIZONTAL)
{
x += (gwidth + horiz_spacing);
}
else
{
y += (gheight + vert_spacing);
+ if (!IMAGE_INSTANCE_SUBWINDOW_V_CENTERED (ii))
+ {
+ /* justified, vertical layout, try and align on logical unit
+ boundaries. */
+ y = ROUND_UP (y - yoffset, luh) + yoffset;
+ }
}
}
return 1;
}
+DEFUN ("widget-logical-to-character-width", Fwidget_logical_to_character_width, 1, 3, 0, /*
+Convert the width in logical widget units to characters.
+Logical widget units do not take into account adjusments made for
+layout borders, so this adjusment is approximated.
+*/
+ (width, face, domain))
+{
+ int w, neww, charwidth;
+ int border_width = DEFAULT_WIDGET_BORDER_WIDTH;
+
+ if (NILP (domain))
+ domain = Fselected_frame (Qnil);
+
+ CHECK_INT (width);
+ w = XINT (width);
+
+ if (HAS_DEVMETH_P (DOMAIN_XDEVICE (domain), widget_border_width))
+ border_width = DEVMETH (DOMAIN_XDEVICE (domain), widget_border_width, ());
+
+ default_face_font_info (domain, 0, 0, 0, &charwidth, 0);
+ neww = ROUND_UP (charwidth * w + 4 * border_width + 2 * widget_spacing (domain),
+ charwidth) / charwidth;
+
+ return make_int (neww);
+}
+
+DEFUN ("widget-logical-to-character-height", Fwidget_logical_to_character_height, 1, 3, 0, /*
+Convert the height in logical widget units to characters.
+Logical widget units do not take into account adjusments made for
+layout borders, so this adjustment is approximated.
+
+If the components of a widget layout are justified to the top or the
+bottom then they are aligned in terms of `logical units'. This is a
+size quantity that is designed to be big enough to accomodate the
+largest `single height' widget. It is dependent on the widget face and
+some combination of spacing and border-width. Thus if you specify top
+or bottom justification in a vertical layout the subcontrols are laid
+out one per logical unit. This allows adjoining layouts to have
+identical alignment for their subcontrols.
+
+Since frame sizes are measured in characters, this function allows you
+to do appropriate conversion between logical units and characters.
+*/
+ (height, face, domain))
+{
+ int h, newh, charheight;
+
+ CHECK_INT (height);
+ if (NILP (domain))
+ domain = Fselected_frame (Qnil);
+
+ h = XINT (height);
+
+ default_face_font_info (domain, 0, 0, &charheight, 0, 0);
+ newh = ROUND_UP (logical_unit_height (Fsymbol_name (Qwidget),
+ Vwidget_face, domain) * h, charheight)
+ / charheight;
+
+ return make_int (newh);
+}
+
\f
/************************************************************************/
/* initialization */
DEFSYMBOL (Qbevel_in);
DEFSYMBOL (Qbevel_out);
DEFSYMBOL (Qmake_glyph);
+
+ DEFSUBR (Fwidget_logical_to_character_height);
+ DEFSUBR (Fwidget_logical_to_character_width);
}
#define VALID_GUI_KEYWORDS(type) do { \
IIFORMAT_HAS_SHARED_METHOD (edit_field, instantiate, widget);
IIFORMAT_HAS_SHARED_METHOD (edit_field, post_instantiate, widget);
IIFORMAT_HAS_SHARED_METHOD (edit_field, governing_domain, subwindow);
+ IIFORMAT_HAS_METHOD (edit_field, query_geometry);
VALID_WIDGET_KEYWORDS (edit_field);
VALID_GUI_KEYWORDS (edit_field);
}
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_vertically_justify, check_valid_justification); \
+ IIFORMAT_VALID_KEYWORD (layout, Q_horizontally_justify, check_valid_justification); \
IIFORMAT_VALID_KEYWORD (layout, Q_border, check_valid_border); \
IIFORMAT_VALID_KEYWORD (layout, Q_margin_width, check_valid_int); \
IIFORMAT_VALID_KEYWORD (layout, Q_items, \
{
reinit_vars_of_glyphs_widget ();
}
+
+
+void
+specifier_vars_of_glyphs_widget (void)
+{
+ DEFVAR_SPECIFIER ("widget-border-width",
+ &Vwidget_border_width /*
+*Border width of widgets.
+This is a specifier; use `set-specifier' to change it.
+*/ );
+ Vwidget_border_width = Fmake_specifier (Qnatnum);
+}
Copyright (C) 1995 Tinker Systems
Copyright (C) 1995, 1996 Ben Wing
Copyright (C) 1995 Sun Microsystems
- Copyright (C) 1999, 2000 Andy Piper
+ Copyright (C) 1999, 2000, 2002 Andy Piper
This file is part of XEmacs.
#endif
void
emacs_Xt_handle_widget_losing_focus (struct frame* f, Widget losing_widget);
+void
+enqueue_focus_event (Widget wants_it, Lisp_Object frame, int in_p);
#include "bitmaps.h"
-dga->xoffset, -dga->yoffset);
if (!IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (p))
XtMapWidget (IMAGE_INSTANCE_X_CLIPWIDGET (p));
+ /* See comments in glyphs-msw.c about keyboard focus. */
+ if (IMAGE_INSTANCE_WANTS_INITIAL_FOCUS (p)) {
+ /* #### FIXME to pop-up the find dialog we map the text-field
+ seven times! This doesn't show on a fast linux box but does
+ under X on windows. */
+ enqueue_focus_event (IMAGE_INSTANCE_X_WIDGET_ID (p),
+ IMAGE_INSTANCE_FRAME (p), 1);
+ }
}
}
IMAGE_INSTANCE_SUBWINDOW_ID (ii) = (void*)win;
}
+/* Account for some of the limitations with widget images. */
+static int
+x_widget_border_width (void)
+{
+ return DEFAULT_WIDGET_BORDER_WIDTH * 2;
+}
+
+
#if 0
/* #### Should this function exist? If there's any doubt I'm not implementing it --andyp */
DEFUN ("change-subwindow-property", Fchange_subwindow_property, 3, 3, 0, /*
free_widget_value_tree (clip_wv);
+ /* create a sensible name. */
+ if (wv->name == 0 || strcmp(wv->name, "") == 0)
+ wv->name = xstrdup (type);
+
/* copy any args we were given */
ac = 0;
lw_add_value_args_to_args (wv, al, &ac);
CONSOLE_HAS_METHOD (x, map_subwindow);
CONSOLE_HAS_METHOD (x, redisplay_widget);
CONSOLE_HAS_METHOD (x, redisplay_subwindow);
+ CONSOLE_HAS_METHOD (x, widget_border_width);
}
void
#define IMAGE_UNSPECIFIED_GEOMETRY -1
#define IMAGE_UNCHANGED_GEOMETRY -2
-#define WIDGET_BORDER_HEIGHT 4
-#define WIDGET_BORDER_WIDTH 4
+#define DEFAULT_WIDGET_BORDER_WIDTH 2
+#define DEFAULT_WIDGET_SPACING 3
+#define DEFAULT_WIDGET_SHADOW_WIDTH 2
enum governing_domain
{
unsigned int v_resize : 1; /* Whether the vsize is allowed to change. */
unsigned int h_resize : 1; /* Whether the hsize is allowed to change. */
unsigned int orientation : 1; /* Vertical or horizontal. */
- unsigned int justification : 2; /* Left, right or center. */
+ unsigned int h_justification : 2; /* left, right or center. */
+ unsigned int v_justification : 2; /* top, bottom or center. */
/* Face for colors and font. We specify this here because we
want people to be able to put :face in the instantiator
spec. Using glyph-face is more inconvenient, although more
#define LAYOUT_VERTICAL 1
#define LAYOUT_JUSTIFY_LEFT 0
+#define LAYOUT_JUSTIFY_TOP 0
#define LAYOUT_JUSTIFY_RIGHT 1
+#define LAYOUT_JUSTIFY_BOTTOM 1
#define LAYOUT_JUSTIFY_CENTER 2
#define IMAGE_INSTANCE_HASH_DEPTH 0
((i)->u.subwindow.h_resize)
#define IMAGE_INSTANCE_SUBWINDOW_ORIENT(i) \
((i)->u.subwindow.orientation)
-#define IMAGE_INSTANCE_SUBWINDOW_JUSTIFY(i) \
-((i)->u.subwindow.justification)
+#define IMAGE_INSTANCE_SUBWINDOW_H_JUSTIFY(i) \
+((i)->u.subwindow.h_justification)
+#define IMAGE_INSTANCE_SUBWINDOW_V_JUSTIFY(i) \
+((i)->u.subwindow.v_justification)
+#define IMAGE_INSTANCE_SUBWINDOW_RIGHT_JUSTIFIED(i) \
+ (IMAGE_INSTANCE_SUBWINDOW_H_JUSTIFY(i) == LAYOUT_JUSTIFY_RIGHT)
+#define IMAGE_INSTANCE_SUBWINDOW_LEFT_JUSTIFIED(i) \
+ (IMAGE_INSTANCE_SUBWINDOW_H_JUSTIFY(i) == LAYOUT_JUSTIFY_LEFT)
+#define IMAGE_INSTANCE_SUBWINDOW_TOP_JUSTIFIED(i) \
+ (IMAGE_INSTANCE_SUBWINDOW_V_JUSTIFY(i) == LAYOUT_JUSTIFY_TOP)
+#define IMAGE_INSTANCE_SUBWINDOW_BOTTOM_JUSTIFIED(i) \
+ (IMAGE_INSTANCE_SUBWINDOW_V_JUSTIFY(i) == LAYOUT_JUSTIFY_BOTTOM)
+#define IMAGE_INSTANCE_SUBWINDOW_H_CENTERED(i) \
+ (IMAGE_INSTANCE_SUBWINDOW_H_JUSTIFY(i) == LAYOUT_JUSTIFY_CENTER)
+#define IMAGE_INSTANCE_SUBWINDOW_V_CENTERED(i) \
+ (IMAGE_INSTANCE_SUBWINDOW_V_JUSTIFY(i) == LAYOUT_JUSTIFY_CENTER)
+#define IMAGE_INSTANCE_SUBWINDOW_LOGICAL_LAYOUT(i) \
+ (IMAGE_INSTANCE_SUBWINDOW_ORIENT (i) \
+ == LAYOUT_VERTICAL && !IMAGE_INSTANCE_SUBWINDOW_V_CENTERED (i))
+
#define IMAGE_INSTANCE_SUBWINDOW_FACE(i) \
((i)->u.subwindow.face)
int check_for_ignored_expose (struct frame* f, int x, int y, int width, int height);
extern int hold_ignored_expose_registration;
+#define ROUND_UP(arg, unit) (((int)((arg) + (unit) - 1) / (int)(unit)) * (int)(unit))
+
#endif /* INCLUDED_glyphs_h_ */
Lisp_Object path, desc;
struct gcpro gcpro1;
-
+
/* Find which guy is going to explode */
path = Fgethash (hmenu_to_lisp_object (menu), current_hash_table, Qunbound);
assert (!UNBOUNDP (path));
* 4/11/94, rjc Added wait_for_sounds to be called when user wants to
* be sure all play has finished.
* 1998-10-01 rlt Added support for WAVE files.
+ * 2002-10-16 Jon Trulson modifed this to work with NAS releases
+ * 1.5f and higher. We were using the private variable
+ * SoundFileInfo that doesn't exist anymore. But preserve
+ * backward compatibility. This will not work for some
+ * versions of NAS around 1.5b to 1.5f or so. Known to
+ * work on 1.2p5 and 1.6.
*/
#ifdef emacs
{
Sound s;
+#if (AudioLibraryVersionMajor >= 2 ) && (AudioLibraryVersionMinor >= 3)
+ SoundFileInfoProc toProc;
+#endif
if (!(s = (Sound) malloc (sizeof (SoundRec))))
return NULL;
if ((s->formatInfo = SndOpenDataForReading ((char *) data, length)) != NULL)
{
+#if (AudioLibraryVersionMajor >= 2 ) && (AudioLibraryVersionMinor >= 3)
+ if ((toProc = SoundFileGetProc(SoundFileFormatSnd,
+ SoundFileInfoProcTo)) == NULL)
+ {
+ SndCloseFile ((SndInfo *) (s->formatInfo));
+ free (s);
+
+ return NULL;
+ }
+ if (!((*toProc)(s)))
+#else
if (!((int(*)(Sound))(SoundFileInfo[SoundFileFormatSnd].toSound)) (s))
+#endif
{
SndCloseFile ((SndInfo *) (s->formatInfo));
free (s);
}
else if ((s->formatInfo = WaveOpenDataForReading ((char *) data, length)) != NULL)
{
+#if (AudioLibraryVersionMajor >= 2 ) && (AudioLibraryVersionMinor >= 3)
+ if ((toProc = SoundFileGetProc(SoundFileFormatWave,
+ SoundFileInfoProcTo)) == NULL)
+ {
+ WaveCloseFile ((WaveInfo *) (s->formatInfo));
+ free (s);
+
+ return NULL;
+ }
+ if (!((*toProc)(s)))
+#else
if (!((int(*)(Sound))(SoundFileInfo[SoundFileFormatWave].toSound)) (s))
+#endif
{
WaveCloseFile ((WaveInfo *) (s->formatInfo));
free (s);
int xforkin = forkin;
int xforkout = forkout;
+ /* Checking for quit in the child is bad because that will
+ cause I/O, and that, in turn, can confuse the X connection. */
+ begin_dont_check_for_quit();
+
/* Disconnect the current controlling terminal, pursuant to
making the pty be the controlling terminal of the process.
Also put us in our own process group. */
assert (*name);
/* Sort of check we have a valid filename. */
- if (strpbrk (name, "*?|<>\"") || strlen (name) >= MAX_PATH)
+ /* #### can we have escaped shell operators in a Windows filename? */
+ if (strpbrk (name, "|<>\"") || strlen (name) >= MAX_PATH)
{
errno = EIO;
return -1;
}
+ /* #### can we have escaped wildcards in a Windows filename? */
+ else if (strpbrk (name, "*?"))
+ {
+ errno = EINVAL; /* this valid path can't be a symlink */
+ return -1;
+ }
/* Find start of filename */
lastname = name + strlen (name);
+2002-11-02 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * XEmacs 21.4.10 "Military Intelligence" is released.
+
+2002-08-22 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * automated/test-harness.el (test-harness-from-buffer):
+ Print-Skip: new local function.
+
+ * automated/syntax-tests.el (forward-comment at buffer boundaries):
+ * automated/test-harness.el (Check-Message):
+ Warn, not barf, if required packages are unavailable.
+
+2002-09-12 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * automated/regexp-tests.el: Add word-boundary regexp tests.
+
+2002-09-09 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * automated/regexp-tests.el: Add test for stale subexpr match-data.
+ Thanks to Martin Stjernholm for the report.
+
+ * automated/syntax-tests.el: Conditionalize syntax-table property
+ tests on feature. Enable feature if present.
+
2002-08-23 Stephen J. Turnbull <stephen@xemacs.org>
* XEmacs 21.4.9 "Informed Management" is released.
(missing-message-failures 0)
(other-failures 0)
+ ;; #### perhaps this should be a defvar, and output at the very end
+ ;; OTOH, this way AC types can use a null EMACSPACKAGEPATH to find
+ ;; what stuff is needed, and ways to avoid using them
+ (skipped-test-reasons (make-hash-table :test 'equal))
+
(trick-optimizer nil)
(unexpected-test-suite-failure nil)
(debug-on-error t))
,quoted-body ',expected-error error-info))
(incf wrong-error-failures)))))
+ (defun Print-Skip (test reason &optional fmt &rest args)
+ (setq fmt (concat "SKIP: %S. REASON: %S" fmt))
+ (princ (concat (apply #'format fmt test reason args) "\n")))
+
(defmacro Check-Message (expected-message-regexp &rest body)
- (let ((quoted-body (if (= 1 (length body))
- `(quote ,(car body)) `(quote (progn ,@body)))))
- `(let ((messages ""))
- (defadvice message (around collect activate)
- (defvar messages)
- (let ((msg-string (apply 'format (ad-get-args 0))))
- (setq messages (concat messages msg-string))
- msg-string))
- (condition-case error-info
- (progn
- (setq trick-optimizer (progn ,@body))
- (if (string-match ,expected-message-regexp messages)
- (progn
- (princ (format "PASS: %S ==> value %S, message %S, matching %S, as expected\n"
- ,quoted-body trick-optimizer messages ',expected-message-regexp))
- (incf passes))
- (princ (format "FAIL: %S ==> value %S, message %S, NOT matching expected %S\n"
- ,quoted-body trick-optimizer messages ',expected-message-regexp))
- (incf missing-message-failures)))
- (error
- (princ (format "FAIL: %S ==> unexpected error %S\n"
- ,quoted-body error-info))
- (incf other-failures)))
- (ad-unadvise 'message))))
+ (if (not (fboundp 'defadvice))
+ ;; #### This whole thing should go inside a macro Skip-Test
+ (let* ((reason "advice unavailable")
+ (count (gethash reason skipped-test-reasons)))
+ ;(message "%S: %S" reason count)
+ (puthash reason (if (null count) 1 (1+ count))
+ skipped-test-reasons)
+ `(Print-Skip ,expected-message-regexp ,reason))
+ (let ((quoted-body (if (= 1 (length body))
+ `(quote ,(car body)) `(quote (progn ,@body)))))
+ `(let ((messages ""))
+ (defadvice message (around collect activate)
+ (defvar messages)
+ (let ((msg-string (apply 'format (ad-get-args 0))))
+ (setq messages (concat messages msg-string))
+ msg-string))
+ (condition-case error-info
+ (progn
+ (setq trick-optimizer (progn ,@body))
+ (if (string-match ,expected-message-regexp messages)
+ (progn
+ (princ (format "PASS: %S ==> value %S, message %S, matching %S, as expected\n"
+ ,quoted-body trick-optimizer messages ',expected-message-regexp))
+ (incf passes))
+ (princ (format "FAIL: %S ==> value %S, message %S, NOT matching expected %S\n"
+ ,quoted-body trick-optimizer messages ',expected-message-regexp))
+ (incf missing-message-failures)))
+ (error
+ (princ (format "FAIL: %S ==> unexpected error %S\n"
+ ,quoted-body error-info))
+ (incf other-failures)))
+ (ad-unadvise 'message)))))
(defmacro Ignore-Ebola (&rest body)
`(let ((debug-issue-ebola-notices -42)) ,@body))
(if (> total 0)
(format "%s: %d of %d (%d%%) tests successful."
basename passes total (/ (* 100 passes) total))
- (format "%s: No tests run" basename))))
+ (format "%s: No tests run" basename)))
+ (reasons ""))
+ (maphash (lambda (key value)
+ (setq reasons
+ (concat reasons
+ (format "\n %d tests skipped because %s"
+ value key))))
+ skipped-test-reasons)
+ (when (> (length reasons) 1)
+ (setq summary-msg (concat summary-msg reasons "
+ Probably XEmacs cannot find your installed packages. Set EMACSPACKAGEPATH
+ to the package hierarchy root or configure with --package-path to enable
+ the skipped tests.")))
(message "%s" summary-msg))
(when unexpected-test-suite-failure
(message "Test suite execution failed unexpectedly."))
emacs_is_beta=
emacs_major_version=21
emacs_minor_version=4
-emacs_beta_version=9
-xemacs_codename="Informed Management"
+emacs_beta_version=10
+xemacs_codename="Military Intelligence"
emacs_kit_version=
infodock_major_version=4
infodock_minor_version=0