From: tomo Date: Wed, 10 May 2000 03:32:05 +0000 (+0000) Subject: XEmacs 21.2.32 "Kastor & Polydeukes". X-Git-Tag: r21-2-32~1 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=2fd9701a4f902054649dde9143a3f77809afee8f;p=chise%2Fxemacs-chise.git XEmacs 21.2.32 "Kastor & Polydeukes". --- diff --git a/CHANGES-beta b/CHANGES-beta index b51efd5..d9b674a 100644 --- a/CHANGES-beta +++ b/CHANGES-beta @@ -1,4 +1,15 @@ +to 21.2.32 "Kastor & Polydeukes" +-- Internal Postgres RDBMS support from Steve Baur +-- Improve gutter useability +-- Fix window geometry with gutters +-- Fix async updates so that they only occur when neccessary +-- Gutter documentation from Stephen Turnbull +-- redisplay-gutter-area fixes from Andy Piper +-- pdump file in MS-Windows executable from Mike Alexander +-- Miscellaneous fixes from Andy Piper + to 21.2.31 "Iris" +-- Make XEmacs work on Windows again. to 21.2.30 "Hygeia" -- Make (find-tag-other-window) always use other window, diff --git a/ChangeLog b/ChangeLog index 28d7c57..b23223a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,39 @@ +2000-03-20 Martin Buchholz + + * XEmacs 21.2.32 is released. + +2000-03-15 Olivier Galibert + + * configure.in: Add dumper.o object when pdumping. + +2000-02-20 Olivier Galibert + + * Makefile.in.in: Add pdump install support + + * configure.in: Add EMACS_PROGNAME config.h variable. + +2000-03-10 SL Baur + + * configure.usage: document --with-postgresql flag. + +2000-03-06 SL Baur + + * configure.in: add autodetection of PostgreSQL runtime libraries + +2000-03-09 Yoshiki Hayashi + + * aclocal.m4 (XE_SHLIB_STUFF): Define ld_shlibs to yes + when C compiler can produce shared libraries. + +2000-03-01 Didier Verna + + * etc/NEWS: update the rect.el entry. + +2000-02-26 Martin Buchholz + + * configure.in: Unconditionally define SHELL, to allow working + with (unreleased) autoconf 2.14.1, found on Mandrake 7.0 systems. + 2000-02-23 Martin Buchholz * XEmacs 21.2.31 is released. @@ -15,7 +51,7 @@ 2000-02-19 Marcus Thiessel * PROBLEMS: Update email address. Describe more HP Motif errors. - + 2000-02-19 Jan Vroonhof * configure.in: Split Solaris version test in two parts. In the @@ -58,7 +94,7 @@ 2000-02-11 Martin Buchholz - * configure.in: + * configure.in: * src/config.h.in: Define _POSIX_C_SOURCE, _XOPEN_SOURCE, _XOPEN_SOURCE_EXTENDED, but only on tested Operating systems - Linux && SunOS >= 5.5. @@ -152,7 +188,7 @@ 2000-01-08 Martin Buchholz - * configure.in: + * configure.in: - Allow find-tag to work in the build directory. - rename src/gdbinit to src/.gdbinit, so that gdb can find it. - Less verbose messages when creating .sbinit, .gdbinit, TAGS. @@ -198,7 +234,7 @@ 1999-12-13 Martin Buchholz - * configure.in: + * configure.in: * configure.usage: - Autodetect NAS. Change Docs accordingly. @@ -254,7 +290,7 @@ 1999-11-26 Martin Buchholz - * configure.in: + * configure.in: Add configure support for Unix 98 type ssize_t. 1999-11-27 Martin Buchholz @@ -269,7 +305,7 @@ * INSTALL: Update configure option. 1999-10-12 Alexandre Oliva - + * configure.in (native_sound_lib, *-sgi-*): Check for audio.h. (LIBS): Check for libCsup. @@ -287,7 +323,7 @@ 1999-11-17 Martin Buchholz - * Makefile.in.in (install-arch-dep): + * Makefile.in.in (install-arch-dep): Fix `make install' if prefix != exec_prefix. 1999-11-15 Martin Buchholz @@ -357,7 +393,7 @@ 1999-09-19 Michael Sperber [Mr. Preprocessor] * configure.in (EMACS_CONFIGURATION): Use $configuration, not - $canonical, so that installation paths and dynamic path setup will + $canonical, so that installation paths and dynamic path setup will stay in synch. 1999-09-20 Andy Piper @@ -371,9 +407,9 @@ 1999-08-27 Jan Vroonhof - * modules/zlib/Makefile (distclean): - * modules/ldap/Makefile (distclean): - * modules/sample/Makefile (distclean): + * modules/zlib/Makefile (distclean): + * modules/ldap/Makefile (distclean): + * modules/sample/Makefile (distclean): * modules/base64/Makefile (distclean): new target * Makefile.in.in (top_distclean): Add package directories @@ -384,10 +420,10 @@ * configure.in: Warn, but otherwise ignore, obsolete arguments. 1999-08-20 Olivier Galibert - + * configure.in: Add --pdump option. * configure.usage: Ditto. - + 1999-08-04 Andy Piper * configure.in: report widget usage correctly. beef up setting. @@ -424,10 +460,10 @@ 1999-07-23 Jan Vroonhof - * etc/custom/example-themes/example-theme.el: - * etc/custom/example-themes/europe-theme.el: + * etc/custom/example-themes/example-theme.el: + * etc/custom/example-themes/europe-theme.el: * etc/custom/example-themes/ex-custom-file: Some simple examples - illustrating the custom theme support. + illustrating the custom theme support. 1999-07-17 MORIOKA Tomohiko @@ -479,7 +515,7 @@ 1999-06-25 Michael Sperber [Mr. Preprocessor] * configure.in (with_prefix): Added --with-prefix, defaults to - yes, to control whether the value of --prefix is compiled into the + yes, to control whether the value of --prefix is compiled into the binary. 1999-07-03 Andy Piper @@ -558,7 +594,7 @@ 1999-05-31 SL Baur * configure.in (CPP): Don't check for include subdirectories in - site-prefix directories. This check loses in valid configurations + site-prefix directories. This check loses in valid configurations like /usr/jp in TurboLinux. Conditionally add include directory to site switches. @@ -577,7 +613,7 @@ 1999-05-06 Hrvoje Niksic - * aclocal.m4 (ld_dynamic_link_flags): Change -Bexport to -Bdynamic + * aclocal.m4 (ld_dynamic_link_flags): Change -Bexport to -Bdynamic for Solaris. 1999-05-03 Hrvoje Niksic @@ -647,7 +683,7 @@ 1999-01-05 Gunnar Evermann - * PROBLEMS: Document crashes on SPARC with gcc 2.8.1. + * PROBLEMS: Document crashes on SPARC with gcc 2.8.1. 1999-03-01 XEmacs Build Bot @@ -668,29 +704,29 @@ 1999-02-10 Martin Buchholz - * configure.in: + * configure.in: - Fixup xfs comments and redundant option checking - * configure.in: - * INSTALL: + * configure.in: + * INSTALL: * lisp/paths.el: - improved automounter tmp directory support. - support 4 (!) empirically discovered automounter conventions 1999-02-10 Martin Buchholz - * lwlib/lwlib.h: - - redo CONST hacking to deal with X11 R4, which was + * lwlib/lwlib.h: + - redo CONST hacking to deal with X11 R4, which was broken in a previous patch. 1999-02-10 Martin Buchholz - * configure.in: + * configure.in: - irix uses -rpath 1999-02-10 Martin Buchholz - * configure.in: + * configure.in: - Check for XOpenIM before using xim=xlib - only use XmIm if $have_motif = yes @@ -725,10 +761,10 @@ * configure.in: remove -O3 prevention on cygwin - current versions cope ok now. remove dll prevention on cygwin - the new module code checks correctly. - + 1999-01-10 J. Kean Johnston - * configure.in: Added moduledir as the path where loadable modules + * configure.in: Added moduledir as the path where loadable modules are stored. Added --with-site-modules and --moduledir options. - Ensure the SCO OpenServer compiles with --dynamic by default - Check for dlfcn.h for dynamic loader @@ -1443,7 +1479,7 @@ Thu Apr 16 12:59:35 1998 Andy Piper * XEmacs 21.0-beta33 is released. -1998-03-26 Didier Verna +1998-03-26 Didier Verna * configure.in, Makefile.in: Removed infopath_user_defined---we always want to propagate it. @@ -1788,7 +1824,7 @@ Wed Jan 21 10:49:47 1998 Andy Piper * etc/FTP: Update address of what was formerly ftp.ibp.fr. -1998-01-08 Didier Verna +1998-01-08 Didier Verna * configure.in: Get rid of INFOPATH for configure time. * configure.usage (Usage): Ditto. @@ -2104,7 +2140,7 @@ Sun November 01 12:00:00 1997 ChangeLog, README, Todo, paths.h, config.h, inc/*, runemacs.c, xemacs.mak. -1997-11-05 Didier Verna +1997-11-05 Didier Verna * configure.in: Added the --site-prefixes options for the configure script. You give a colon or space separated list of prefixes, and @@ -4025,5 +4061,3 @@ Thu Dec 5 20:42:35 1996 Steven L Baur Thu Dec 5 11:56:05 1996 Joseph J Nuspl * configure.in (LIBS): Fix typo in dialog box test. - - diff --git a/INSTALL b/INSTALL index d00a221..4019235 100644 --- a/INSTALL +++ b/INSTALL @@ -2,8 +2,6 @@ XEmacs Installation Guide Copyright (c) 1994, 1995, 1996 Board of Trustees, University of Illinois Copyright (c) 1994-1999 Free Software Foundation, Inc. -Synched up with: FSF 19.30. - Permission is granted to anyone to make or distribute verbatim copies of this document as received, in any medium, provided that the copyright notice and permission notice are preserved, @@ -18,20 +16,24 @@ Synched up with: FSF 19.30. of the Free Software Foundation are approved by the Foundation. -BUILDING AND INSTALLATION (Unix and Cygwin, see the file nt/README -for instructions on building under Microsoft Windows): +BUILDING AND INSTALLATION FOR UNIX AND CYGWIN + +(for Microsoft Windows, see nt/README also.) -1) Make sure your system has enough swapping space allocated to handle - a program whose pure code is 900k bytes and whose data area is at - least 400k and can reach 8Mb or more. Note that a typical XEmacs - build is much bigger. If the swapping space is - insufficient, you will get an error in the command `temacs -batch - -l loadup dump', found in `./src/Makefile.in.in', or possibly when - running the final dumped XEmacs. +PREREQUISITES +============= - Verify that your users have a high enough stack limit. On some - systems such as OpenBSD and OSF/Tru64 the default is 2MB which is - too low. See 'PROBLEMS' for details. +Make sure your system has enough swapping space allocated to handle a +program whose pure code is 900k bytes and whose data area is at least +400k and can reach 8Mb or more. Note that a typical XEmacs build is +much bigger. If the swapping space is insufficient, you will get an +error in the command `temacs -batch -l loadup dump', found in +`./src/Makefile.in.in', or possibly when running the final dumped +XEmacs. + +Verify that your users have a high enough stack limit. On some systems +such as OpenBSD and OSF/Tru64 the default is 2MB which is too low. See +'PROBLEMS' for details. Building XEmacs requires about 100 Mb of disk space (including the XEmacs sources). Once installed, XEmacs occupies between 20 and 100 Mb @@ -44,8 +46,10 @@ 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). +ADD-ON LIBRARIES +================ -2) Decide on what other software packages you would like to use with +Decide on what other software packages you would like to use with XEmacs, but are not yet available on your system. On some systems, Motif and CDE are optional additions. On Solaris, the SUNWaudmo package enables native sound support. There are also a number of free @@ -72,37 +76,19 @@ be set together by using the --with-site-prefix command. This will set these variables as needed assuming your libraries are organised as a typical /usr tree. -3) [N.B. Most of this section can be done during or after the -compilation of the core source code, but is present early to catch -your attention.] - -Decide what Initial Lisp you need with XEmacs. XEmacs is -distributed separately from most of its runtime environment. This is -done to make it easier for administrators to tune an installation for -what the local users need. Note that while XEmacs will compile and -install without any packages present at least some additional lisp -packages are needed to bring XEmacs up to "normal" editor -functionality. Installation and upgrading of the packages can be done -almost automatically when from inside XEmacs when it has been compiled -and installed. - -More information and suggestions for which packages to install see the -file README.packages. - -IMPORTANT! The file README.packages contain information vital to have -a fully working XEmacs. This information was not included in this file -only because it is too large for this terse INSTALL. Please read -README.packages now! - -By default, packages will be searched for in the path +PACKAGE SYSTEM +============== -~/.xemacs::$prefix/lib/xemacs-${version}/mule-packages:$prefix/lib/xemacs/mule-packages:$prefix/lib/xemacs-${version}/xemacs-packages:$prefix/lib/xemacs/xemacs-packages +The file README.packages contain information vital to have a fully +working XEmacs. This information was not included in this file only +because it is too large for this terse INSTALL. Please read +README.packages now! -This may be changed by specifying a different value with the ---package-path configuration option. +CONFIGURATION OPTIONS +===================== -4) In the top level directory of the XEmacs distribution, run the - program `configure' as follows: +In the top level directory of the XEmacs distribution, run the +program `configure' as follows: ./configure [CONFIGURATION-NAME] [--OPTION[=VALUE]] ... @@ -202,12 +188,17 @@ files, like executables and utility programs. If specified, EXECDIR/lib/xemacs-VERSION/CONFIGURATION-NAME. EXECDIR/bin should be a directory that is normally in users' PATHs. -For example, the command - - ./configure mips-dec-ultrix --with-x11=yes - -configures XEmacs to build for a DECstation running Ultrix, with -support for the X11 window system. +If you specify --prefix (or any of the other installation directory +options), they will get compiled into the xemacs executable so it will +be able to find its various associated file. However, XEmacs has +quite elaborate logic to find out the locations of these directories +dynamically. Sometimes, it is desirable *not* to compile these +directories into the executable so you can move the XEmacs +installation around (as whole) at will. This is true for binary kits, +for instance. Therefore, you can specify --without-prefix on the +configure command line to prevent the installation prefix to become +part of the generated executable; everything else will continue to +work as usual. The `--with-menubars=TYPE' option allows you to specify which X toolkit you wish to use for the menubar. The valid options are @@ -379,24 +370,35 @@ Please note that it is safe to build with as many of the options `--with-xim', `--with-canna' and `--with-wnn' as your system supports. +MAIL LOCKING +============ + +Find out what the preferred method for locking mail spool files is in +your environment. Presently, XEmacs supports lockf, flock, and dot +locking. Specify the locking method via the --mail-locking=METHOD +option to configure. Valid values for METHOD are --mail-locking are +`lockf', `flock', and `dot'. + +RUNNING CONFIGURE +================= + `configure' doesn't do any compilation or installation itself. It just creates the files that influence those things: `./src/config.h', and all the Makefile's in the build tree. -The `--with-pop', `--with-hesiod', and `--with-kerberos' options are used -in conjunction with movemail. As of XEmacs 20.1, movemail is identical -to the one used in Emacs. - When it is done, `configure' prints a description of what it did and creates a shell script `config.status' which, when run, recreates the same configuration. If `configure' exits with an error after disturbing the status quo, it removes `config.status'. -5) Look at `./lisp/paths.el'; if some of those values are not right -for your system, set up the file `./lisp/site-init.el' with XEmacs -Lisp code to override them; it is not a good idea to edit paths.el -itself. YOU MUST USE THE LISP FUNCTION `setq' TO ASSIGN VALUES, -rather than `defvar', as used by `./lisp/paths.el'. For example, +AUXILIARY PATHS +=============== + +Look at `./lisp/paths.el'; if some of those values are not right for +your system, set up the file `./lisp/site-init.el' with XEmacs Lisp +code to override them; it is not a good idea to edit paths.el itself. +YOU MUST USE THE LISP FUNCTION `setq' TO ASSIGN VALUES, rather than +`defvar', as used by `./lisp/paths.el'. For example, (setq news-inews-program "/usr/bin/inews") @@ -415,17 +417,16 @@ configured. If you have an unusual automounter configuration that XEmacs cannot detect, you may need to change the value of `directory-abbrev-alist'. -6) Put into `./lisp/site-init.el' or `./lisp/site-load.el' any Emacs -Lisp code you want XEmacs to load before it is dumped out. Use +SITE-SPECIFIC STARTUP CODE +========================== + +Put into `./lisp/site-init.el' or `./lisp/site-load.el' any Emacs Lisp +code you want XEmacs to load before it is dumped out. Use site-load.el for additional libraries if you arrange for their documentation strings to be in the lib-src/DOC file (see src/Makefile.in.in if you wish to figure out how to do that). For all else, use site-init.el. -If you set load-path to a different value in site-init.el or -site-load.el, XEmacs will use *precisely* that value when it starts up -again. If you do this, you are on your own! - Note that, on some systems, the code you place in site-init.el must not use expand-file-name or any other function which may look something up in the system's password and user information database. @@ -434,12 +435,18 @@ See `./PROBLEMS' for more details on which systems this affects. The `site-*.el' files are nonexistent in the distribution. You do not need to create them if you have nothing to put in them. -7) Refer to the file `./etc/TERMS' for information on fields you may +TERMCAP CONFIGURATION +===================== + +Refer to the file `./etc/TERMS' for information on fields you may wish to add to various termcap entries. The files `./etc/termcap.ucb' and `./etc/termcap.dat' may already contain appropriately-modified entries. -8) Run `make' in the top directory of the XEmacs distribution to finish +RUNNING MAKE +============ + +Run `make' in the top directory of the XEmacs distribution to finish building XEmacs in the standard way. The final executable file is named `src/emacs'. You can execute this file "in place" without copying it, if you wish; then it automatically uses the sibling @@ -511,27 +518,7 @@ By default, XEmacs installs its files in the following directories: If these directories are not what you want, you can specify where to install XEmacs's libraries and data files or where XEmacs should search for its lisp files by giving values for `make' variables as part of -the command. See the section below called `MAKE VARIABLES' for more -information on this. - -Using GNU Make allows for simultaneous builds with and without the ---srcdir option. - -9) If your system uses lock files to interlock access to mailer inbox -files, then you might need to make the movemail program setuid or -setgid to enable it to write the lock files. We believe this is safe. -The setuid/setgid bits need not be set on any other XEmacs-related -executables. - -10) You are done with the hard part! You can remove executables and -object files from the build directory by typing `make clean'. To also -remove the files that `configure' created (so you can compile XEmacs -for a different configuration), type `make distclean'. - -11) You should now go to the XEmacs web page at http://www.xemacs.org/ -and decide what additional Lisp support you wish to have. - -MAKE VARIABLES +the command. You can change where the build process installs XEmacs and its data files by specifying values for `make' variables as part of the `make' @@ -643,7 +630,7 @@ GNU software; here are some variables specific to XEmacs. (where VERSION and CONFIGURATION-NAME are as described above). `docdir' indicates where to put Lisp documentation strings that XEmacs - refers to as it runs. It defaults the value of `archlibdir' + refers to as it runs. It defaults to the value of `archlibdir' (see above). `moduledir' indicates where XEmacs installs and expects to find @@ -667,126 +654,33 @@ The top-level Makefile stores the variable settings it used in the Makefiles for the subdirectories, so you don't have to specify them when running make in the subdirectories. +Using GNU Make allows for simultaneous builds with and without the +--srcdir option. -CONFIGURATION BY HAND - -Instead of running the `configure' program, you have to perform the -following steps. - -1) Copy `./src/config.h.in' to `./src/config.h'. - -2) Consult `./etc/MACHINES' to see what configuration name you should -use for your system. Look at the code of the `configure' script to -see which operating system and architecture description files from -`src/s' and `src/m' should be used for that configuration name. Edit -`src/config.h', and change the two `#include' directives to include -the appropriate system and architecture description files. - -3) Edit `./src/config.h' to set the right options for your system. If -you need to override any of the definitions in the s/*.h and m/*.h -files for your system and machine, do so by editing config.h, not by -changing the s/*.h and m/*.h files. Occasionally you may need to -redefine parameters used in `./lib-src/movemail.c'. - -4) If you're going to use the make utility to build XEmacs, you will -still need to run `configure' first, giving the appropriate values for -the variables in the sections entitled "Things `configure' Might Edit" -and "Where To Install Things." Note that you may only need to change -the variables `prefix' and `exec_prefix', since the rest of the -variables have reasonable defaults based on them. For each Makefile -variable of this type, there is a corresponding configure option; for -example, to change the location of the lock directory, you might use - - ./configure --lockdir=/nfs/xemacslock - -The `configure' script is built from `configure.in' by the `autoconf' -program. However, since XEmacs has configuration requirements that -autoconf can't meet, `configure.in' uses a marriage of custom-baked -configuration code and autoconf macros. New versions of autoconf -could very well break this arrangement, so it may be wise to avoid -rebuilding `configure' from `configure.in' when possible. - - -BUILDING XEMACS BY HAND - -Once XEmacs is configured, running `make' in the top directory performs -the following steps. - -1) Run `make src/paths.h' in the top directory. This produces -`./src/paths.h' from the template file `./src/paths.h.in', changing -the paths to the values specified in `./Makefile'. - -2) Cd to `./lib-src' and run `make'. This creates executables named -`ctags' and `etags' and `wakeup' and `make-docfile' and `digest-doc' -and `test-distrib'. And others. - -3) Cd to `./src' and Run `make'. This refers to files in the `./lisp' -and `./lib-src' subdirectories using names `../lisp' and -`../lib-src'. - -This creates a file `./src/xemacs' which is the runnable XEmacs, -assigning it a new build version number by incrementing the build -version stored in `./lisp/version.el'. - -It also creates a file in `./lib-src' whose name is `DOC' followed by -the current XEmacs version. This file contains documentation strings -for all the functions in XEmacs. Each time you run make to make a new -xemacs, a new DOC file with a new name is made. You must keep the DOC -file for an XEmacs version as long as you keep using that XEmacs -version. - - -INSTALLATION BY HAND - -The steps below are done by running `make install' in the main -directory of the XEmacs distribution. - -1) Copy `./lisp' and its subdirectories, `./etc', and the executables -in `./lib-src' to their final destinations, as selected in `./src/paths.h'. - -Strictly speaking, not all of the executables in `./lib-src' need be copied. -- The programs `cvtmail', `emacsserver', `env', `fakemail', `hexl', - `movemail', `timer', `vcdiff', `wakeup', and `yow' are used by - XEmacs; they do need to be copied. -- The programs `etags', `ctags', `emacsclient', `b2m', `rcs2log', - `gnuclient', `gnudoit', and `gnuattach' are intended to be run - by users; they are handled below. -- The programs `make-docfile' and `test-distrib' were - used in building XEmacs, and are not needed any more. -- The programs `digest-doc' and `sorted-doc' convert a `DOC' file into - a file for users to read. There is no important reason to move them. - -2) Copy the files in `./info' to the place specified in -`./lisp/site-init.el' or `./lisp/paths.el'. Note that if the -destination directory already contains a file named `dir', you -probably don't want to replace it with the `dir' file in the XEmacs -distribution. Instead, you should make sure that the existing `dir' -file contains an appropriate menu entry for the XEmacs info. +MAIL-LOCKING POST-INSTALLATION +============================== -3) Create a directory for XEmacs to use for clash detection, named as -indicated by the PATH_LOCK macro in `./src/paths.h'. +If your system uses dot-locking to interlock access to mailer inbox +files, then you might need to make the movemail program setuid or +setgid to enable it to write the lock files. We believe this is safe. +The setuid/setgid bits need not be set on any other XEmacs-related +executables. -4) Copy `./src/xemacs' to `/usr/local/bin', or to some other directory -in users' search paths. `./src/xemacs' has an alternate name -`./src/emacs-EMACSVERSION'; you may wish to make a symbolic link named -`/usr/local/bin/xemacs' pointing to that alternate name, as an easy way -of installing different versions. +CLEANING UP +========== -You can delete `./src/temacs'. - -5) Copy the programs `b2m', `emacsclient', `ctags', `etags', `rcs2log', -`gnuclient', `gnudoit', and `gnuattach' from `./lib-src' to -`/usr/local/bin'. These programs are intended for users to run. - -6) Copy the man pages in `./etc' for xemacs, ctags, etags, and gnuserv -into the appropriate man directories. +You are done with the hard part! You can remove executables and +object files from the build directory by typing `make clean'. To also +remove the files that `configure' created (so you can compile XEmacs +for a different configuration), type `make distclean'. -7) The files in the `./src' subdirectory, except for `xemacs', are not -used by XEmacs once it is built. The source would be handy for -debugging. +READ README.packages +==================== +Do it! PROBLEMS +======== The most likely problem is that you forgot to read and follow the directions in README.packages. You can not have a working XEmacs @@ -794,7 +688,3 @@ 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. - - -If all else fails, please see etc/InstallGuide courtesy -of Jonathan Seth Hayward. diff --git a/Makefile.in.in b/Makefile.in.in index 8a0b9f0..cb71002 100644 --- a/Makefile.in.in +++ b/Makefile.in.in @@ -295,11 +295,29 @@ all-elc all-elcs: lib-src lwlib dump-elcs src dump-elc dump-elcs: ${GENERATED_HEADERS} FRC.dump-elcs cd ./src && $(RECURSIVE_MAKE) dump-elcs -autoloads: src - MAKE='$(MAKE)' EMACS='./src/$(PROGNAME)' $(SHELL) ${srcdir}/lib-src/update-autoloads.sh +autoloads: lisp/auto-autoloads.el lisp/custom-load.el + +FRC.lisp.auto.autoloads.el: +lisp/auto-autoloads.el: FRC.lisp.auto.autoloads.el + rm -f lisp/auto-autoloads.el + ${blddir}/src/${PROGNAME} -batch -vanilla \ + -l autoload -f batch-update-directory lisp + ${blddir}/src/${PROGNAME} -batch -vanilla \ + -f batch-byte-compile lisp/auto-autoloads.el + @rm -f lisp/auto-autoloads.el~ +#ifdef MULE + rm -f lisp/mule/auto-autoloads.el + ${blddir}/src/${PROGNAME} -batch -vanilla \ + -l autoload -f batch-update-directory lisp/mule + ${blddir}/src/${PROGNAME} -batch -vanilla \ + -f batch-byte-compile lisp/mule/auto-autoloads.el + @rm -f lisp/mule/auto-autoloads.el~ +#endif -custom-loads: - MAKE='$(MAKE)' EMACS='./src/$(PROGNAME)' $(SHELL) ${srcdir}/lib-src/update-custom.sh +FRC.lisp.custom.load.el: +lisp/custom-load.el: FRC.lisp.custom.load.el + ${blddir}/src/${PROGNAME} -batch -vanilla -l cus-dep \ + -f Custom-make-dependencies lisp finder: src @echo "Building finder database ..." @@ -418,6 +436,9 @@ install-arch-dep: mkdir for subdir in `find ${archlibdir} -type d ! -name RCS ! -name SCCS ! -name CVS -print` ; \ do (cd $${subdir} && $(RM) -r RCS CVS SCCS \#* *~) ; done ; \ else true; fi +#ifdef PDUMP + ${INSTALL_DATA} src/${PROGNAME}.dmp ${bindir}/${PROGNAME}-${version}-`src/${PROGNAME} -sd`.dmp +#endif #ifdef WINDOWSNT ${INSTALL_PROGRAM} src/${PROGNAME} ${bindir}/${PROGNAME} -chmod 0755 ${bindir}/${PROGNAME} diff --git a/PROBLEMS b/PROBLEMS index b5414a5..f3ab159 100644 --- a/PROBLEMS +++ b/PROBLEMS @@ -144,9 +144,15 @@ libz.a in the X11 binary directory. ** AIX *** On AIX 4.3, you must specify --with-dialogs=athena with configure -*** The libXt shipped with AIX 4.3 is broken. This causes xemacs -nw - to fail in various ways. The solution is to build against stock - X11R6. +*** The libXt shipped with AIX 4.3 up to 4.3.2 is broken. This causes + xemacs -nw to fail in various ways. The official APAR is this: + +APAR NUMBER: RESOLVED AS: PROGRAM ERROR + +ABSTRACT: +: LIBXT.A INCORRECT HANDLING OF EXCEPTIONS IN XTAPPADDINPUT + + The solution is to install X11.base.lib at version >=4.3.2.5. *** On AIX, you get this compiler error message: diff --git a/aclocal.m4 b/aclocal.m4 index 721d768..48afe84 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -386,6 +386,7 @@ if test "$cc_produces_so" = "yes"; then dll_ld=$CC dll_ldflags=$xcldf can_build_shared=yes + ld_shlibs=yes else # OK - only NOW do we futz about with ld. # See if the linker supports building shared libraries. diff --git a/configure b/configure index 4c42ecd..adcabc5 100755 --- a/configure +++ b/configure @@ -92,6 +92,7 @@ mandir='${prefix}/man' subdirs= MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} ac_max_here_lines=12 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 @@ -350,6 +351,7 @@ while test $# != 0; do with_sparcworks | \ with_tooltalk | \ with_ldap | \ + with_postgresql | \ with_pop | \ with_kerberos | \ with_hesiod | \ @@ -832,7 +834,7 @@ echo " Use \`$progname --help' to show usage.") >&2 && exit 1 fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:836: checking whether ln -s works" >&5 +echo "configure:838: checking whether ln -s works" >&5 rm -f conftestdata if ln -s X conftestdata 2>/dev/null @@ -995,6 +997,15 @@ else PROGNAME=xemacs fi +{ test "$extra_verbose" = "yes" && cat << EOF + Defining EMACS_PROGNAME = "$PROGNAME" +EOF +cat >> confdefs.h <&6 -echo "configure:1084: checking "host system type"" >&5 +echo "configure:1095: checking "host system type"" >&5 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'` canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"` configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'` @@ -1575,7 +1586,7 @@ xe_save_CFLAGS="$CFLAGS" # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1579: checking for $ac_word" >&5 +echo "configure:1590: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1602,7 +1613,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1606: checking for $ac_word" >&5 +echo "configure:1617: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1650,7 +1661,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1654: checking for $ac_word" >&5 +echo "configure:1665: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1679,7 +1690,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1683: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1694: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS' @@ -1692,12 +1703,12 @@ cross_compiling=no cat > conftest.$ac_ext << EOF -#line 1696 "configure" +#line 1707 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1725,19 +1736,19 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1729: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1740: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1734: checking whether we are using GNU C" >&5 +echo "configure:1745: checking whether we are using GNU C" >&5 cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1755,7 +1766,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1759: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1770: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -1788,7 +1799,7 @@ if test "$with_gcc" = "no" -a "$GCC" = "yes"; then # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1792: checking for $ac_word" >&5 +echo "configure:1803: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1815,7 +1826,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1819: checking for $ac_word" >&5 +echo "configure:1830: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1863,7 +1874,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1867: checking for $ac_word" >&5 +echo "configure:1878: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1892,7 +1903,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1896: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1907: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS' @@ -1905,12 +1916,12 @@ cross_compiling=no cat > conftest.$ac_ext << EOF -#line 1909 "configure" +#line 1920 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1938,19 +1949,19 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1942: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1953: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1947: checking whether we are using GNU C" >&5 +echo "configure:1958: checking whether we are using GNU C" >&5 cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1965: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1968,7 +1979,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1972: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1983: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -2001,7 +2012,7 @@ elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2005: checking for $ac_word" >&5 +echo "configure:2016: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2028,7 +2039,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2032: checking for $ac_word" >&5 +echo "configure:2043: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2076,7 +2087,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2080: checking for $ac_word" >&5 +echo "configure:2091: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2105,7 +2116,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2109: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2120: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS' @@ -2118,12 +2129,12 @@ cross_compiling=no cat > conftest.$ac_ext << EOF -#line 2122 "configure" +#line 2133 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2151,19 +2162,19 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2155: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2166: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:2160: checking whether we are using GNU C" >&5 +echo "configure:2171: checking whether we are using GNU C" >&5 cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -2181,7 +2192,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2185: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2196: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -2218,7 +2229,7 @@ test -n "$CPP" -a -d "$CPP" && CPP= test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2222: checking how to run the C preprocessor" >&5 +echo "configure:2233: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2231,13 +2242,13 @@ if test -z "$CPP"; then # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2248,13 +2259,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2265,13 +2276,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2298,9 +2309,9 @@ echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for AIX""... $ac_c" 1>&6 -echo "configure:2302: checking for AIX" >&5 +echo "configure:2313: checking for AIX" >&5 cat > conftest.$ac_ext <&6 -echo "configure:2330: checking for GNU libc" >&5 +echo "configure:2341: checking for GNU libc" >&5 cat > conftest.$ac_ext < int main() { @@ -2340,7 +2351,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* have_glibc=yes else @@ -2417,7 +2428,7 @@ EOF esac cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:2444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then : else @@ -2653,7 +2664,7 @@ fi if test "$GCC" = "yes"; then echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6 -echo "configure:2657: checking for buggy gcc versions" >&5 +echo "configure:2668: checking for buggy gcc versions" >&5 GCC_VERSION=`$CC --version` case `uname -s`:`uname -m`:$GCC_VERSION in *:sun4*:2.8.1|*:sun4*:egcs-2.90.*) @@ -2768,12 +2779,15 @@ test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" && if t test -n "$objects_system" && extra_objs="$extra_objs $objects_system" && if test "$extra_verbose" = "yes"; then echo " xemacs will be linked with \"$objects_system\"" fi -test -n "$unexec" && extra_objs="$extra_objs $unexec" && if test "$extra_verbose" = "yes"; then +test -n "$unexec" && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" && if test "$extra_verbose" = "yes"; then echo " xemacs will be linked with \"$unexec\"" fi +test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" && if test "$extra_verbose" = "yes"; then + echo " xemacs will be linked with \"dumper.o\"" + fi echo $ac_n "checking for dynodump""... $ac_c" 1>&6 -echo "configure:2777: checking for dynodump" >&5 +echo "configure:2791: checking for dynodump" >&5 if test "$unexec" != "unexsol2.o"; then echo "$ac_t""no" 1>&6 else @@ -2811,12 +2825,12 @@ if test "$unexec" = "unexaix.o"; then done echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6 -echo "configure:2815: checking for terminateAndUnload in -lC" >&5 +echo "configure:2829: checking for terminateAndUnload in -lC" >&5 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'` xe_check_libs=" -lC " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2935,7 +2949,7 @@ fi if test "$add_runtime_path" = "yes"; then echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6 -echo "configure:2939: checking "for runtime libraries flag"" >&5 +echo "configure:2953: checking "for runtime libraries flag"" >&5 case "$opsys" in sol2 ) dash_r="-R" ;; decosf* | linux* | irix*) dash_r="-rpath " ;; @@ -2957,14 +2971,14 @@ if test "$GCC" = "yes"; then done fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* dash_r="$try_dash_r" else @@ -3066,10 +3080,10 @@ else fi after_morecore_hook_exists=yes echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6 -echo "configure:3070: checking for malloc_get_state" >&5 +echo "configure:3084: checking for malloc_get_state" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_malloc_get_state=yes" else @@ -3112,10 +3126,10 @@ doug_lea_malloc=no fi echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6 -echo "configure:3116: checking for malloc_set_state" >&5 +echo "configure:3130: checking for malloc_set_state" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_malloc_set_state=yes" else @@ -3158,16 +3172,16 @@ doug_lea_malloc=no fi echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6 -echo "configure:3162: checking whether __after_morecore_hook exists" >&5 +echo "configure:3176: checking whether __after_morecore_hook exists" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -3226,7 +3240,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3230: checking for $ac_word" >&5 +echo "configure:3244: checking for $ac_word" >&5 if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. @@ -3281,7 +3295,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:3285: checking for a BSD compatible install" >&5 +echo "configure:3299: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" @@ -3335,7 +3349,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3339: checking for $ac_word" >&5 +echo "configure:3353: checking for $ac_word" >&5 if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. @@ -3367,15 +3381,15 @@ for ac_hdr in a.out.h cygwin/version.h fcntl.h inttypes.h libgen.h l do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3371: checking for $ac_hdr" >&5 +echo "configure:3385: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3405,10 +3419,10 @@ fi done echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:3409: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:3423: checking for sys/wait.h that is POSIX.1 compatible" >&5 cat > conftest.$ac_ext < #include @@ -3424,7 +3438,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:3428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -3448,10 +3462,10 @@ EOF fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3452: checking for ANSI C header files" >&5 +echo "configure:3466: checking for ANSI C header files" >&5 cat > conftest.$ac_ext < #include @@ -3459,7 +3473,7 @@ cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3476,7 +3490,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3494,7 +3508,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3512,7 +3526,7 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3523,7 +3537,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:3541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then : else @@ -3549,10 +3563,10 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3553: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3567: checking whether time.h and sys/time.h may both be included" >&5 cat > conftest.$ac_ext < #include @@ -3561,7 +3575,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3585,10 +3599,10 @@ EOF fi echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6 -echo "configure:3589: checking for sys_siglist declaration in signal.h or unistd.h" >&5 +echo "configure:3603: checking for sys_siglist declaration in signal.h or unistd.h" >&5 cat > conftest.$ac_ext < #include @@ -3600,7 +3614,7 @@ int main() { char *msg = *(sys_siglist + 1); ; return 0; } EOF -if { (eval echo configure:3604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_decl_sys_siglist=yes else @@ -3625,9 +3639,9 @@ fi echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6 -echo "configure:3629: checking for struct utimbuf" >&5 +echo "configure:3643: checking for struct utimbuf" >&5 cat > conftest.$ac_ext < @@ -3646,7 +3660,7 @@ int main() { static struct utimbuf x; x.actime = x.modtime; ; return 0; } EOF -if { (eval echo configure:3650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 { test "$extra_verbose" = "yes" && cat << \EOF @@ -3666,10 +3680,10 @@ fi rm -f conftest* echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3670: checking return type of signal handlers" >&5 +echo "configure:3684: checking return type of signal handlers" >&5 cat > conftest.$ac_ext < #include @@ -3686,7 +3700,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3690: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3708,10 +3722,10 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3712: checking for size_t" >&5 +echo "configure:3726: checking for size_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3742,10 +3756,10 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3746: checking for pid_t" >&5 +echo "configure:3760: checking for pid_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3776,10 +3790,10 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3780: checking for uid_t in sys/types.h" >&5 +echo "configure:3794: checking for uid_t in sys/types.h" >&5 cat > conftest.$ac_ext < EOF @@ -3815,10 +3829,10 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3819: checking for mode_t" >&5 +echo "configure:3833: checking for mode_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3849,10 +3863,10 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3853: checking for off_t" >&5 +echo "configure:3867: checking for off_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3883,10 +3897,10 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:3887: checking for ssize_t" >&5 +echo "configure:3901: checking for ssize_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3918,9 +3932,9 @@ fi echo $ac_n "checking for struct timeval""... $ac_c" 1>&6 -echo "configure:3922: checking for struct timeval" >&5 +echo "configure:3936: checking for struct timeval" >&5 cat > conftest.$ac_ext < @@ -3936,7 +3950,7 @@ int main() { static struct timeval x; x.tv_sec = x.tv_usec; ; return 0; } EOF -if { (eval echo configure:3940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 HAVE_TIMEVAL=yes @@ -3958,10 +3972,10 @@ fi rm -f conftest* echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:3962: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:3976: checking whether struct tm is in sys/time.h or time.h" >&5 cat > conftest.$ac_ext < #include @@ -3969,7 +3983,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:3973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -3993,10 +4007,10 @@ EOF fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:3997: checking for tm_zone in struct tm" >&5 +echo "configure:4011: checking for tm_zone in struct tm" >&5 cat > conftest.$ac_ext < #include <$ac_cv_struct_tm> @@ -4004,7 +4018,7 @@ int main() { struct tm tm; tm.tm_zone; ; return 0; } EOF -if { (eval echo configure:4008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else @@ -4027,10 +4041,10 @@ EOF else echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:4031: checking for tzname" >&5 +echo "configure:4045: checking for tzname" >&5 cat > conftest.$ac_ext < #ifndef tzname /* For SGI. */ @@ -4040,7 +4054,7 @@ int main() { atoi(*tzname); ; return 0; } EOF -if { (eval echo configure:4044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_var_tzname=yes else @@ -4066,10 +4080,10 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:4070: checking for working const" >&5 +echo "configure:4084: checking for working const" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -4143,7 +4157,7 @@ fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:4147: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:4161: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` cat > conftestmake <<\EOF @@ -4168,12 +4182,12 @@ fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:4172: checking whether byte ordering is bigendian" >&5 +echo "configure:4186: checking whether byte ordering is bigendian" >&5 ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -4184,11 +4198,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -4199,7 +4213,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -4216,7 +4230,7 @@ fi rm -f conftest* if test $ac_cv_c_bigendian = unknown; then cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_c_bigendian=no else @@ -4256,10 +4270,10 @@ fi echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:4260: checking size of short" >&5 +echo "configure:4274: checking size of short" >&5 cat > conftest.$ac_ext < main() @@ -4270,7 +4284,7 @@ main() exit(0); } EOF -if { (eval echo configure:4274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_short=`cat conftestval` else @@ -4298,10 +4312,10 @@ if test "$ac_cv_sizeof_short" = 0; then exit 1 fi echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:4302: checking size of int" >&5 +echo "configure:4316: checking size of int" >&5 cat > conftest.$ac_ext < main() @@ -4312,7 +4326,7 @@ main() exit(0); } EOF -if { (eval echo configure:4316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_int=`cat conftestval` else @@ -4334,10 +4348,10 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:4338: checking size of long" >&5 +echo "configure:4352: checking size of long" >&5 cat > conftest.$ac_ext < main() @@ -4348,7 +4362,7 @@ main() exit(0); } EOF -if { (eval echo configure:4352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_long=`cat conftestval` else @@ -4370,10 +4384,10 @@ EOF echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:4374: checking size of long long" >&5 +echo "configure:4388: checking size of long long" >&5 cat > conftest.$ac_ext < main() @@ -4384,7 +4398,7 @@ main() exit(0); } EOF -if { (eval echo configure:4388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_long_long=`cat conftestval` else @@ -4406,10 +4420,10 @@ EOF echo $ac_n "checking size of void *""... $ac_c" 1>&6 -echo "configure:4410: checking size of void *" >&5 +echo "configure:4424: checking size of void *" >&5 cat > conftest.$ac_ext < main() @@ -4420,7 +4434,7 @@ main() exit(0); } EOF -if { (eval echo configure:4424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_void_p=`cat conftestval` else @@ -4443,7 +4457,7 @@ EOF echo $ac_n "checking for long file names""... $ac_c" 1>&6 -echo "configure:4447: checking for long file names" >&5 +echo "configure:4461: checking for long file names" >&5 ac_cv_sys_long_file_names=yes # Test for long file names in all the places we know might matter: @@ -4489,10 +4503,10 @@ fi echo $ac_n "checking for sin""... $ac_c" 1>&6 -echo "configure:4493: checking for sin" >&5 +echo "configure:4507: checking for sin" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_sin=yes" else @@ -4533,12 +4547,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 -echo "configure:4537: checking for sin in -lm" >&5 +echo "configure:4551: checking for sin in -lm" >&5 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'` xe_check_libs=" -lm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4593,14 +4607,14 @@ EOF cat > conftest.$ac_ext < int main() { return atanh(1.0) + asinh(1.0) + acosh(1.0); ; return 0; } EOF -if { (eval echo configure:4604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_INVERSE_HYPERBOLIC @@ -4617,14 +4631,14 @@ fi rm -f conftest* echo "checking type of mail spool file locking" 1>&6 -echo "configure:4621: checking type of mail spool file locking" >&5 +echo "configure:4635: checking type of mail spool file locking" >&5 for ac_func in lockf flock do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4625: checking for $ac_func" >&5 +echo "configure:4639: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4720,12 +4734,12 @@ test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \ case "$opsys" in decosf*) echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6 -echo "configure:4724: checking for cma_open in -lpthreads" >&5 +echo "configure:4738: checking for cma_open in -lpthreads" >&5 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lpthreads " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4772,7 +4786,7 @@ fi esac echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6 -echo "configure:4776: checking whether the -xildoff compiler flag is required" >&5 +echo "configure:4790: checking whether the -xildoff compiler flag is required" >&5 if ${CC-cc} '-###' -xildon no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then echo "$ac_t""no" 1>&6; @@ -4784,7 +4798,7 @@ fi if test "$opsys" = "sol2"; then if test "$os_release" -ge 56; then echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6 -echo "configure:4788: checking for \"-z ignore\" linker flag" >&5 +echo "configure:4802: checking for \"-z ignore\" linker flag" >&5 case "`ld -h 2>&1`" in *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6 ld_switch_site="-z ignore $ld_switch_site" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-z ignore\" to \$ld_switch_site"; fi ;; @@ -4795,7 +4809,7 @@ fi echo "checking "for specified window system"" 1>&6 -echo "configure:4799: checking "for specified window system"" >&5 +echo "configure:4813: checking "for specified window system"" >&5 if test "$with_x11" != "no"; then test "$x_includes $x_libraries" != "NONE NONE" && \ @@ -4828,7 +4842,7 @@ if test "$with_x11" != "no"; then # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:4832: checking for X" >&5 +echo "configure:4846: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -4888,12 +4902,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4962,14 +4976,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -5078,17 +5092,17 @@ else case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:5082: checking whether -R must be followed by a space" >&5 +echo "configure:5096: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -5104,14 +5118,14 @@ rm -f conftest* else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -5147,12 +5161,12 @@ ac_cv_lib_dnet_dnet_ntoa=no else echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:5151: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:5165: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` xe_check_libs=" -ldnet " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5187,12 +5201,12 @@ fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:5191: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:5205: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` xe_check_libs=" -ldnet_stub " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5232,10 +5246,10 @@ fi # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:5236: checking for gethostbyname" >&5 +echo "configure:5250: checking for gethostbyname" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -5279,12 +5293,12 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:5283: checking for gethostbyname in -lnsl" >&5 +echo "configure:5297: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` xe_check_libs=" -lnsl " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5325,10 +5339,10 @@ fi # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:5329: checking for connect" >&5 +echo "configure:5343: checking for connect" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -5374,12 +5388,12 @@ fi xe_msg_checking="for connect in -lsocket" test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:5378: checking "$xe_msg_checking"" >&5 +echo "configure:5392: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` xe_check_libs=" -lsocket $X_EXTRA_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5414,10 +5428,10 @@ fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:5418: checking for remove" >&5 +echo "configure:5432: checking for remove" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -5461,12 +5475,12 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:5465: checking for remove in -lposix" >&5 +echo "configure:5479: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` xe_check_libs=" -lposix " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5501,10 +5515,10 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:5505: checking for shmat" >&5 +echo "configure:5519: checking for shmat" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -5548,12 +5562,12 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:5552: checking for shmat in -lipc" >&5 +echo "configure:5566: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` xe_check_libs=" -lipc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5600,12 +5614,12 @@ fi xe_msg_checking="for IceConnectionNumber in -lICE" test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:5604: checking "$xe_msg_checking"" >&5 +echo "configure:5618: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` xe_check_libs=" -lICE $X_EXTRA_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5785,7 +5799,7 @@ EOF echo "checking for X defines extracted by xmkmf" 1>&6 -echo "configure:5789: checking for X defines extracted by xmkmf" >&5 +echo "configure:5803: checking for X defines extracted by xmkmf" >&5 rm -fr conftestdir if mkdir conftestdir; then cd conftestdir @@ -5817,15 +5831,15 @@ EOF ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6 -echo "configure:5821: checking for X11/Intrinsic.h" >&5 +echo "configure:5835: checking for X11/Intrinsic.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5849,12 +5863,12 @@ fi echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6 -echo "configure:5853: checking for XOpenDisplay in -lX11" >&5 +echo "configure:5867: checking for XOpenDisplay in -lX11" >&5 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5890,12 +5904,12 @@ fi xe_msg_checking="for XGetFontProperty in -lX11" test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:5894: checking "$xe_msg_checking"" >&5 +echo "configure:5908: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 -b i486-linuxaout" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5933,12 +5947,12 @@ fi echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6 -echo "configure:5937: checking for XShapeSelectInput in -lXext" >&5 +echo "configure:5951: checking for XShapeSelectInput in -lXext" >&5 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'` xe_check_libs=" -lXext " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5972,12 +5986,12 @@ fi echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6 -echo "configure:5976: checking for XtOpenDisplay in -lXt" >&5 +echo "configure:5990: checking for XtOpenDisplay in -lXt" >&5 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'` xe_check_libs=" -lXt " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6011,14 +6025,14 @@ fi echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6 -echo "configure:6015: checking the version of X11 being used" >&5 +echo "configure:6029: checking the version of X11 being used" >&5 cat > conftest.$ac_ext < int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; } EOF -if { (eval echo configure:6022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:6036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ./conftest foobar; x11_release=$? else @@ -6042,10 +6056,10 @@ EOF for ac_func in XConvertCase do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6046: checking for $ac_func" >&5 +echo "configure:6060: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6100,15 +6114,15 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6104: checking for $ac_hdr" >&5 +echo "configure:6118: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6112: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6139,7 +6153,7 @@ done echo $ac_n "checking for XFree86""... $ac_c" 1>&6 -echo "configure:6143: checking for XFree86" >&5 +echo "configure:6157: checking for XFree86" >&5 if test -d "/usr/X386/include" -o \ -f "/etc/XF86Config" -o \ -f "/etc/X11/XF86Config" -o \ @@ -6159,12 +6173,12 @@ EOF test -z "$with_xmu" && { echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6 -echo "configure:6163: checking for XmuReadBitmapDataFromFile in -lXmu" >&5 +echo "configure:6177: checking for XmuReadBitmapDataFromFile in -lXmu" >&5 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'` xe_check_libs=" -lXmu " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6214,19 +6228,19 @@ EOF echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6 -echo "configure:6218: checking for main in -lXbsd" >&5 +echo "configure:6232: checking for main in -lXbsd" >&5 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'` xe_check_libs=" -lXbsd " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6263,22 +6277,22 @@ fi fi if test "$with_msw" != "no"; then echo "checking for MS-Windows" 1>&6 -echo "configure:6267: checking for MS-Windows" >&5 +echo "configure:6281: checking for MS-Windows" >&5 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6 -echo "configure:6270: checking for main in -lgdi32" >&5 +echo "configure:6284: checking for main in -lgdi32" >&5 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'` xe_check_libs=" -lgdi32 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6344,12 +6358,12 @@ EOF fi fi cat > conftest.$ac_ext < int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; } EOF -if { (eval echo configure:6353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:6367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_MSG_SELECT @@ -6424,7 +6438,7 @@ case "$x_libraries" in *X11R4* ) esac echo "checking for WM_COMMAND option" 1>&6 -echo "configure:6428: checking for WM_COMMAND option" >&5; +echo "configure:6442: checking for WM_COMMAND option" >&5; if test "$with_wmcommand" != "no"; then { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_WMCOMMAND @@ -6439,15 +6453,15 @@ fi test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6 -echo "configure:6443: checking for X11/Xauth.h" >&5 +echo "configure:6457: checking for X11/Xauth.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6470,12 +6484,12 @@ fi } test -z "$with_xauth" && { echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6 -echo "configure:6474: checking for XauGetAuthByAddr in -lXau" >&5 +echo "configure:6488: checking for XauGetAuthByAddr in -lXau" >&5 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'` xe_check_libs=" -lXau " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6531,15 +6545,15 @@ if test "$with_tooltalk" != "no" ; then for dir in "" "Tt/" "desktop/" ; do ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6 -echo "configure:6535: checking for ${dir}tt_c.h" >&5 +echo "configure:6549: checking for ${dir}tt_c.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6575,12 +6589,12 @@ if test "$with_tooltalk" != "no" ; then xe_msg_checking="for tt_message_create in -ltt" test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:6579: checking "$xe_msg_checking"" >&5 +echo "configure:6593: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'` xe_check_libs=" -ltt $extra_libs" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6648,15 +6662,15 @@ fi test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6 -echo "configure:6652: checking for Dt/Dt.h" >&5 +echo "configure:6666: checking for Dt/Dt.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6679,12 +6693,12 @@ fi } test -z "$with_cde" && { echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6 -echo "configure:6683: checking for DtDndDragStart in -lDtSvc" >&5 +echo "configure:6697: checking for DtDndDragStart in -lDtSvc" >&5 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'` xe_check_libs=" -lDtSvc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6764,7 +6778,7 @@ EOF fi echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6 -echo "configure:6768: checking if drag and drop API is needed" >&5 +echo "configure:6782: checking if drag and drop API is needed" >&5 if test "$with_dragndrop" != "no" ; then if test -n "$dragndrop_proto" ; then with_dragndrop=yes @@ -6785,18 +6799,18 @@ EOF fi echo "checking for LDAP" 1>&6 -echo "configure:6789: checking for LDAP" >&5 +echo "configure:6803: checking for LDAP" >&5 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ldap.h""... $ac_c" 1>&6 -echo "configure:6792: checking for ldap.h" >&5 +echo "configure:6806: checking for ldap.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6819,15 +6833,15 @@ fi } test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for lber.h""... $ac_c" 1>&6 -echo "configure:6823: checking for lber.h" >&5 +echo "configure:6837: checking for lber.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6851,12 +6865,12 @@ fi if test "$with_ldap" != "no"; then echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6 -echo "configure:6855: checking for ldap_search in -lldap" >&5 +echo "configure:6869: checking for ldap_search in -lldap" >&5 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6892,12 +6906,12 @@ fi xe_msg_checking="for ldap_open in -lldap" test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:6896: checking "$xe_msg_checking"" >&5 +echo "configure:6910: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap -llber" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6933,12 +6947,12 @@ fi xe_msg_checking="for ldap_open in -lldap" test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:6937: checking "$xe_msg_checking"" >&5 +echo "configure:6951: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap -llber -lkrb" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6974,12 +6988,12 @@ fi xe_msg_checking="for ldap_open in -lldap" test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:6978: checking "$xe_msg_checking"" >&5 +echo "configure:6992: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap -llber -lkrb -ldes" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7041,10 +7055,10 @@ EOF for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7045: checking for $ac_func" >&5 +echo "configure:7059: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7096,18 +7110,238 @@ done fi +echo "checking for PostgreSQL" 1>&6 +echo "configure:7115: checking for PostgreSQL" >&5 +postgres_includes_found=no +save_c_switch_site="$c_switch_site" +if test "$with_postgresql" != "no"; then + ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6 +echo "configure:7121: checking for libpq-fe.h" >&5 + +cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:7129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + postgres_includes_found=yes +else + echo "$ac_t""no" 1>&6 +fi + +fi +if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \ + -d "/usr/include/pgsql"; then + c_switch_site="$c_switch_site -I/usr/include/pgsql" + ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6 +echo "configure:7155: checking for libpq-fe.h" >&5 + +cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:7163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + postgres_includes_found=yes +else + echo "$ac_t""no" 1>&6 +fi + + if test "$postgres_includes_found" != "yes"; then + c_switch_site="$save_c_switch_site" + fi +fi +if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \ + -d "/usr/local/pgsql/include"; then + c_switch_site="$c_switch_site -I/usr/local/pgsql/include" + ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6 +echo "configure:7192: checking for libpq-fe.h" >&5 + +cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:7200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + postgres_includes_found=yes +else + echo "$ac_t""no" 1>&6 +fi + + if test "$postgres_includes_found" != "yes"; then + c_switch_site="$save_c_switch_site" + fi +fi + +if test "$postgres_includes_found" = "yes"; then + +echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6 +echo "configure:7228: checking for PQconnectdb in -lpq" >&5 +ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'` + +xe_check_libs=" -lpq " +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +xe_check_libs="" + +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then + echo "$ac_t""yes" 1>&6 + with_postgresql=yes +else + echo "$ac_t""no" 1>&6 +with_postgresql=no +fi + + +fi +if test "$with_postgresql" = "yes"; then + +echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6 +echo "configure:7269: checking for PQconnectStart in -lpq" >&5 +ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'` + +xe_check_libs=" -lpq " +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +xe_check_libs="" + +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then + echo "$ac_t""yes" 1>&6 + with_postgresqlv7=yes +else + echo "$ac_t""no" 1>&6 +with_postgresqlv7=no +fi + + +fi +if test "$with_postgresql" = "yes"; then + { test "$extra_verbose" = "yes" && cat << \EOF + Defining HAVE_POSTGRESQL +EOF +cat >> confdefs.h <<\EOF +#define HAVE_POSTGRESQL 1 +EOF +} + + if test "$with_postgresqlv7" = "yes"; then + { test "$extra_verbose" = "yes" && cat << \EOF + Defining HAVE_POSTGRESQLV7 +EOF +cat >> confdefs.h <<\EOF +#define HAVE_POSTGRESQLV7 1 +EOF +} + + fi + LIBS="-lpq $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lpq\" to \$LIBS"; fi + extra_objs="$extra_objs postgresql.o" && if test "$extra_verbose" = "yes"; then + echo " xemacs will be linked with \"postgresql.o\"" + fi +else + c_switch_site=$save_c_switch_site +fi + if test "$window_system" != "none"; then echo "checking for graphics libraries" 1>&6 -echo "configure:7103: checking for graphics libraries" >&5 +echo "configure:7337: checking for graphics libraries" >&5 xpm_problem="" if test -z "$with_xpm"; then echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6 -echo "configure:7108: checking for Xpm - no older than 3.4f" >&5 +echo "configure:7342: checking for Xpm - no older than 3.4f" >&5 xe_check_libs=-lXpm cat > conftest.$ac_ext < @@ -7116,7 +7350,7 @@ echo "configure:7108: checking for Xpm - no older than 3.4f" >&5 XpmIncludeVersion != XpmLibraryVersion() ? 1 : XpmIncludeVersion < 30406 ? 2 : 0 ;} EOF -if { (eval echo configure:7120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:7354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ./conftest dummy_arg; xpm_status=$?; if test "$xpm_status" = "0"; then @@ -7158,17 +7392,17 @@ EOF libs_x="-lXpm $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXpm\" to \$libs_x"; fi echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6 -echo "configure:7162: checking for \"FOR_MSW\" xpm" >&5 +echo "configure:7396: checking for \"FOR_MSW\" xpm" >&5 xe_check_libs=-lXpm cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* xpm_for_msw=no else @@ -7194,15 +7428,15 @@ EOF test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for compface.h""... $ac_c" 1>&6 -echo "configure:7198: checking for compface.h" >&5 +echo "configure:7432: checking for compface.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7225,12 +7459,12 @@ fi } test -z "$with_xface" && { echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6 -echo "configure:7229: checking for UnGenFace in -lcompface" >&5 +echo "configure:7463: checking for UnGenFace in -lcompface" >&5 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'` xe_check_libs=" -lcompface " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7293,12 +7527,12 @@ EOF if test "$with_png $with_tiff" != "no no"; then echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6 -echo "configure:7297: checking for inflate in -lc" >&5 +echo "configure:7531: checking for inflate in -lc" >&5 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'` xe_check_libs=" -lc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7328,12 +7562,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6 -echo "configure:7332: checking for inflate in -lz" >&5 +echo "configure:7566: checking for inflate in -lz" >&5 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'` xe_check_libs=" -lz " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7363,12 +7597,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6 -echo "configure:7367: checking for inflate in -lgz" >&5 +echo "configure:7601: checking for inflate in -lgz" >&5 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'` xe_check_libs=" -lgz " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7409,15 +7643,15 @@ fi test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6 -echo "configure:7413: checking for jpeglib.h" >&5 +echo "configure:7647: checking for jpeglib.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7421: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7440,12 +7674,12 @@ fi } test -z "$with_jpeg" && { echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6 -echo "configure:7444: checking for jpeg_destroy_decompress in -ljpeg" >&5 +echo "configure:7678: checking for jpeg_destroy_decompress in -ljpeg" >&5 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'` xe_check_libs=" -ljpeg " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7492,10 +7726,10 @@ EOF png_problem="" test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6 -echo "configure:7496: checking for pow" >&5 +echo "configure:7730: checking for pow" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_pow=yes" else @@ -7539,15 +7773,15 @@ fi } test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for png.h""... $ac_c" 1>&6 -echo "configure:7543: checking for png.h" >&5 +echo "configure:7777: checking for png.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7570,12 +7804,12 @@ fi } test -z "$with_png" && { echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6 -echo "configure:7574: checking for png_read_image in -lpng" >&5 +echo "configure:7808: checking for png_read_image in -lpng" >&5 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'` xe_check_libs=" -lpng " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7609,10 +7843,10 @@ fi } if test -z "$with_png"; then echo $ac_n "checking for workable png version information""... $ac_c" 1>&6 -echo "configure:7613: checking for workable png version information" >&5 +echo "configure:7847: checking for workable png version information" >&5 xe_check_libs="-lpng -lz" cat > conftest.$ac_ext < int main(int c, char **v) { @@ -7620,7 +7854,7 @@ echo "configure:7613: checking for workable png version information" >&5 if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1; return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;} EOF -if { (eval echo configure:7624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:7858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ./conftest dummy_arg; png_status=$?; if test "$png_status" = "0"; then @@ -7663,15 +7897,15 @@ EOF test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6 -echo "configure:7667: checking for tiffio.h" >&5 +echo "configure:7901: checking for tiffio.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7694,12 +7928,12 @@ fi } test -z "$with_tiff" && { echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6 -echo "configure:7698: checking for TIFFClientOpen in -ltiff" >&5 +echo "configure:7932: checking for TIFFClientOpen in -ltiff" >&5 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'` xe_check_libs=" -ltiff " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7749,10 +7983,10 @@ fi if test "$with_x11" = "yes"; then echo "checking for X11 graphics libraries" 1>&6 -echo "configure:7753: checking for X11 graphics libraries" >&5 +echo "configure:7987: checking for X11 graphics libraries" >&5 echo "checking for the Athena widgets" 1>&6 -echo "configure:7756: checking for the Athena widgets" >&5 +echo "configure:7990: checking for the Athena widgets" >&5 case "$with_athena" in "xaw" | "") athena_variant=Xaw athena_3d=no ;; @@ -7766,12 +8000,12 @@ echo "configure:7756: checking for the Athena widgets" >&5 if test "$athena_3d" = "no"; then echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6 -echo "configure:7770: checking for XawScrollbarSetThumb in -l$athena_variant" >&5 +echo "configure:8004: checking for XawScrollbarSetThumb in -l$athena_variant" >&5 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'` xe_check_libs=" -l$athena_variant " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7798,12 +8032,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6 -echo "configure:7802: checking for threeDClassRec in -l$athena_variant" >&5 +echo "configure:8036: checking for threeDClassRec in -l$athena_variant" >&5 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'` xe_check_libs=" -l$athena_variant " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7845,12 +8079,12 @@ fi else echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6 -echo "configure:7849: checking for threeDClassRec in -l$athena_variant" >&5 +echo "configure:8083: checking for threeDClassRec in -l$athena_variant" >&5 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'` xe_check_libs=" -l$athena_variant " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7879,12 +8113,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6 -echo "configure:7883: checking for threeDClassRec in -lXaw" >&5 +echo "configure:8117: checking for threeDClassRec in -lXaw" >&5 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'` xe_check_libs=" -lXaw " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7926,15 +8160,15 @@ fi if test "$athena_3d" = "no"; then ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6 -echo "configure:7930: checking for X11/Xaw/ThreeD.h" >&5 +echo "configure:8164: checking for X11/Xaw/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7954,15 +8188,15 @@ else echo "$ac_t""no" 1>&6 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6 -echo "configure:7958: checking for X11/Xaw/XawInit.h" >&5 +echo "configure:8192: checking for X11/Xaw/XawInit.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7966: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7988,15 +8222,15 @@ fi else ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6 -echo "configure:7992: checking for X11/$athena_variant/XawInit.h" >&5 +echo "configure:8226: checking for X11/$athena_variant/XawInit.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8013,15 +8247,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6 -echo "configure:8017: checking for X11/$athena_variant/ThreeD.h" >&5 +echo "configure:8251: checking for X11/$athena_variant/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8049,15 +8283,15 @@ fi if test -z "$athena_h_path"; then ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6 -echo "configure:8053: checking for $athena_variant/XawInit.h" >&5 +echo "configure:8287: checking for $athena_variant/XawInit.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8074,15 +8308,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6 -echo "configure:8078: checking for $athena_variant/ThreeD.h" >&5 +echo "configure:8312: checking for $athena_variant/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8111,15 +8345,15 @@ fi if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6 -echo "configure:8115: checking for X11/Xaw3d/XawInit.h" >&5 +echo "configure:8349: checking for X11/Xaw3d/XawInit.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8136,15 +8370,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6 -echo "configure:8140: checking for X11/Xaw3d/ThreeD.h" >&5 +echo "configure:8374: checking for X11/Xaw3d/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8176,15 +8410,15 @@ fi if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6 -echo "configure:8180: checking for Xaw3d/XawInit.h" >&5 +echo "configure:8414: checking for Xaw3d/XawInit.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8201,15 +8435,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6 -echo "configure:8205: checking for Xaw3d/ThreeD.h" >&5 +echo "configure:8439: checking for Xaw3d/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8241,15 +8475,15 @@ fi if test -z "$athena_h_path"; then ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6 -echo "configure:8245: checking for X11/Xaw/ThreeD.h" >&5 +echo "configure:8479: checking for X11/Xaw/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8284,15 +8518,15 @@ fi ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6 -echo "configure:8288: checking for Xm/Xm.h" >&5 +echo "configure:8522: checking for Xm/Xm.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8530: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8309,12 +8543,12 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6 -echo "configure:8313: checking for XmStringFree in -lXm" >&5 +echo "configure:8547: checking for XmStringFree in -lXm" >&5 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'` xe_check_libs=" -lXm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8354,9 +8588,9 @@ fi if test "$have_motif" = "yes"; then echo $ac_n "checking for Lesstif""... $ac_c" 1>&6 -echo "configure:8358: checking for Lesstif" >&5 +echo "configure:8592: checking for Lesstif" >&5 cat > conftest.$ac_ext < #ifdef LESSTIF_VERSION @@ -8689,7 +8923,7 @@ fi if test "$with_mule" = "yes" ; then echo "checking for Mule-related features" 1>&6 -echo "configure:8693: checking for Mule-related features" >&5 +echo "configure:8927: checking for Mule-related features" >&5 { test "$extra_verbose" = "yes" && cat << \EOF Defining MULE EOF @@ -8714,15 +8948,15 @@ EOF do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8718: checking for $ac_hdr" >&5 +echo "configure:8952: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8753,12 +8987,12 @@ done echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6 -echo "configure:8757: checking for strerror in -lintl" >&5 +echo "configure:8991: checking for strerror in -lintl" >&5 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'` xe_check_libs=" -lintl " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8802,18 +9036,18 @@ fi echo "checking for Mule input methods" 1>&6 -echo "configure:8806: checking for Mule input methods" >&5 +echo "configure:9040: checking for Mule input methods" >&5 case "$with_xim" in "" | "yes" ) echo "checking for XIM" 1>&6 -echo "configure:8809: checking for XIM" >&5 +echo "configure:9043: checking for XIM" >&5 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6 -echo "configure:8812: checking for XOpenIM in -lX11" >&5 +echo "configure:9046: checking for XOpenIM in -lX11" >&5 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8848,12 +9082,12 @@ fi if test "$have_motif $have_lesstif" = "yes no"; then echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6 -echo "configure:8852: checking for XmImMbLookupString in -lXm" >&5 +echo "configure:9086: checking for XmImMbLookupString in -lXm" >&5 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'` xe_check_libs=" -lXm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8929,15 +9163,15 @@ EOF if test "$with_xfs" = "yes" ; then echo "checking for XFontSet" 1>&6 -echo "configure:8933: checking for XFontSet" >&5 +echo "configure:9167: checking for XFontSet" >&5 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6 -echo "configure:8936: checking for XmbDrawString in -lX11" >&5 +echo "configure:9170: checking for XmbDrawString in -lX11" >&5 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8988,15 +9222,15 @@ EOF test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6 -echo "configure:8992: checking for wnn/jllib.h" >&5 +echo "configure:9226: checking for wnn/jllib.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9021,10 +9255,10 @@ fi for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9025: checking for $ac_func" >&5 +echo "configure:9259: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9076,12 +9310,12 @@ done test "$ac_cv_func_crypt" != "yes" && { echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:9080: checking for crypt in -lcrypt" >&5 +echo "configure:9314: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` xe_check_libs=" -lcrypt " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9127,12 +9361,12 @@ fi if test -z "$with_wnn" -o "$with_wnn" = "yes"; then echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6 -echo "configure:9131: checking for jl_dic_list_e in -lwnn" >&5 +echo "configure:9365: checking for jl_dic_list_e in -lwnn" >&5 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'` xe_check_libs=" -lwnn " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9161,12 +9395,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6 -echo "configure:9165: checking for jl_dic_list_e in -lwnn4" >&5 +echo "configure:9399: checking for jl_dic_list_e in -lwnn4" >&5 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'` xe_check_libs=" -lwnn4 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9195,12 +9429,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6 -echo "configure:9199: checking for jl_dic_list_e in -lwnn6" >&5 +echo "configure:9433: checking for jl_dic_list_e in -lwnn6" >&5 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'` xe_check_libs=" -lwnn6 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9229,12 +9463,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6 -echo "configure:9233: checking for dic_list_e in -lwnn6_fromsrc" >&5 +echo "configure:9467: checking for dic_list_e in -lwnn6_fromsrc" >&5 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'` xe_check_libs=" -lwnn6_fromsrc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9293,12 +9527,12 @@ EOF if test "$with_wnn6" != "no"; then echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6 -echo "configure:9297: checking for jl_fi_dic_list in -l$libwnn" >&5 +echo "configure:9531: checking for jl_fi_dic_list in -l$libwnn" >&5 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'` xe_check_libs=" -l$libwnn " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9344,15 +9578,15 @@ EOF if test "$with_canna" != "no"; then ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6 -echo "configure:9348: checking for canna/jrkanji.h" >&5 +echo "configure:9582: checking for canna/jrkanji.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9590: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9379,15 +9613,15 @@ fi c_switch_site="$c_switch_site -I/usr/local/canna/include" ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6 -echo "configure:9383: checking for canna/jrkanji.h" >&5 +echo "configure:9617: checking for canna/jrkanji.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9415,15 +9649,15 @@ fi test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6 -echo "configure:9419: checking for canna/RK.h" >&5 +echo "configure:9653: checking for canna/RK.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9446,12 +9680,12 @@ fi } test -z "$with_canna" && { echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6 -echo "configure:9450: checking for RkBgnBun in -lRKC" >&5 +echo "configure:9684: checking for RkBgnBun in -lRKC" >&5 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'` xe_check_libs=" -lRKC " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9485,12 +9719,12 @@ fi } test -z "$with_canna" && { echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6 -echo "configure:9489: checking for jrKanjiControl in -lcanna" >&5 +echo "configure:9723: checking for jrKanjiControl in -lcanna" >&5 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'` xe_check_libs=" -lcanna " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9550,12 +9784,12 @@ if test "$need_motif" = "yes" ; then libs_x="-lXm $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXm\" to \$libs_x"; fi echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6 -echo "configure:9554: checking for layout_object_getvalue in -li18n" >&5 +echo "configure:9788: checking for layout_object_getvalue in -li18n" >&5 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'` xe_check_libs=" -li18n " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9652,10 +9886,10 @@ fi for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getpt getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf fsync ftruncate umask do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9656: checking for $ac_func" >&5 +echo "configure:9890: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9713,10 +9947,10 @@ extra_objs="$extra_objs realpath.o" && if test "$extra_verbose" = "yes"; then for ac_func in getloadavg do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9717: checking for $ac_func" >&5 +echo "configure:9951: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9775,12 +10009,12 @@ then echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6 -echo "configure:9779: checking for kstat_open in -lkstat" >&5 +echo "configure:10013: checking for kstat_open in -lkstat" >&5 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lkstat " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9825,12 +10059,12 @@ fi echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6 -echo "configure:9829: checking for kvm_read in -lkvm" >&5 +echo "configure:10063: checking for kvm_read in -lkvm" >&5 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'` xe_check_libs=" -lkvm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9875,16 +10109,16 @@ fi fi echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6 -echo "configure:9879: checking whether netdb declares h_errno" >&5 +echo "configure:10113: checking whether netdb declares h_errno" >&5 cat > conftest.$ac_ext < int main() { return h_errno; ; return 0; } EOF -if { (eval echo configure:9888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 { test "$extra_verbose" = "yes" && cat << \EOF @@ -9904,16 +10138,16 @@ fi rm -f conftest* echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 -echo "configure:9908: checking for sigsetjmp" >&5 +echo "configure:10142: checking for sigsetjmp" >&5 cat > conftest.$ac_ext < int main() { sigjmp_buf bar; sigsetjmp (bar, 0); ; return 0; } EOF -if { (eval echo configure:9917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 { test "$extra_verbose" = "yes" && cat << \EOF @@ -9933,11 +10167,11 @@ fi rm -f conftest* echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6 -echo "configure:9937: checking whether localtime caches TZ" >&5 +echo "configure:10171: checking whether localtime caches TZ" >&5 if test "$ac_cv_func_tzset" = "yes"; then cat > conftest.$ac_ext < #if STDC_HEADERS @@ -9972,7 +10206,7 @@ main() exit (0); } EOF -if { (eval echo configure:9976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:10210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then emacs_cv_localtime_cache=no else @@ -10002,9 +10236,9 @@ fi if test "$HAVE_TIMEVAL" = "yes"; then echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6 -echo "configure:10006: checking whether gettimeofday accepts one or two arguments" >&5 +echo "configure:10240: checking whether gettimeofday accepts one or two arguments" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""two" 1>&6 else @@ -10047,19 +10281,19 @@ fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:10051: checking for inline" >&5 +echo "configure:10285: checking for inline" >&5 ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -10091,35 +10325,25 @@ EOF ;; esac -if test "$ac_cv_c_inline" != "no"; then - { test "$extra_verbose" = "yes" && cat << \EOF - Defining HAVE_INLINE -EOF -cat >> confdefs.h <<\EOF -#define HAVE_INLINE 1 -EOF -} - - test "$GCC" = "yes" && extra_objs="$extra_objs inline.o" && if test "$extra_verbose" = "yes"; then +test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" && if test "$extra_verbose" = "yes"; then echo " xemacs will be linked with \"inline.o\"" fi -fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:10113: checking for working alloca.h" >&5 +echo "configure:10337: checking for working alloca.h" >&5 cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:10123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -10143,10 +10367,10 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:10147: checking for alloca" >&5 +echo "configure:10371: checking for alloca" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -10213,10 +10437,10 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:10217: checking whether alloca needs Cray hooks" >&5 +echo "configure:10441: checking whether alloca needs Cray hooks" >&5 cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10244: checking for $ac_func" >&5 +echo "configure:10468: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10296,10 +10520,10 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:10300: checking stack direction for C alloca" >&5 +echo "configure:10524: checking stack direction for C alloca" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:10546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_c_stack_direction=1 else @@ -10347,15 +10571,15 @@ test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" && if test "$extra_verbos ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:10351: checking for vfork.h" >&5 +echo "configure:10575: checking for vfork.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10583: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10383,10 +10607,10 @@ else fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:10387: checking for working vfork" >&5 +echo "configure:10611: checking for working vfork" >&5 cat > conftest.$ac_ext < @@ -10481,7 +10705,7 @@ main() { } } EOF -if { (eval echo configure:10485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:10709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_vfork_works=yes else @@ -10507,10 +10731,10 @@ fi echo $ac_n "checking for working strcoll""... $ac_c" 1>&6 -echo "configure:10511: checking for working strcoll" >&5 +echo "configure:10735: checking for working strcoll" >&5 cat > conftest.$ac_ext < main () @@ -10520,7 +10744,7 @@ main () strcoll ("123", "456") >= 0); } EOF -if { (eval echo configure:10524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:10748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_strcoll_works=yes else @@ -10548,10 +10772,10 @@ fi for ac_func in getpgrp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10552: checking for $ac_func" >&5 +echo "configure:10776: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10602,10 +10826,10 @@ fi done echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6 -echo "configure:10606: checking whether getpgrp takes no argument" >&5 +echo "configure:10830: checking whether getpgrp takes no argument" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:10888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_getpgrp_void=yes else @@ -10687,10 +10911,10 @@ fi echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:10691: checking for working mmap" >&5 +echo "configure:10915: checking for working mmap" >&5 case "$opsys" in ultrix* ) have_mmap=no ;; *) cat > conftest.$ac_ext < #include @@ -10723,7 +10947,7 @@ int main (int argc, char *argv[]) return 1; } EOF -if { (eval echo configure:10727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:10951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then have_mmap=yes else @@ -10749,9 +10973,9 @@ test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no if test "$rel_alloc $have_mmap" = "default yes"; then if test "$doug_lea_malloc" = "yes"; then echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6 -echo "configure:10753: checking for M_MMAP_THRESHOLD" >&5 +echo "configure:10977: checking for M_MMAP_THRESHOLD" >&5 cat > conftest.$ac_ext < int main() { @@ -10763,7 +10987,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:10767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* rel_alloc=no; echo "$ac_t""yes" 1>&6; else @@ -10788,15 +11012,15 @@ EOF ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for termios.h""... $ac_c" 1>&6 -echo "configure:10792: checking for termios.h" >&5 +echo "configure:11016: checking for termios.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10839,15 +11063,15 @@ else echo "$ac_t""no" 1>&6 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for termio.h""... $ac_c" 1>&6 -echo "configure:10843: checking for termio.h" >&5 +echo "configure:11067: checking for termio.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10879,10 +11103,10 @@ fi echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:10883: checking for socket" >&5 +echo "configure:11107: checking for socket" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -10920,15 +11144,15 @@ if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6 -echo "configure:10924: checking for netinet/in.h" >&5 +echo "configure:11148: checking for netinet/in.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10945,15 +11169,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6 -echo "configure:10949: checking for arpa/inet.h" >&5 +echo "configure:11173: checking for arpa/inet.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10978,9 +11202,9 @@ EOF } echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6 -echo "configure:10982: checking "for sun_len member in struct sockaddr_un"" >&5 +echo "configure:11206: checking "for sun_len member in struct sockaddr_un"" >&5 cat > conftest.$ac_ext < @@ -10991,7 +11215,7 @@ int main() { static struct sockaddr_un x; x.sun_len = 1; ; return 0; } EOF -if { (eval echo configure:10995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_SOCKADDR_SUN_LEN @@ -11009,9 +11233,9 @@ else fi rm -f conftest* echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6 -echo "configure:11013: checking "for ip_mreq struct in netinet/in.h"" >&5 +echo "configure:11237: checking "for ip_mreq struct in netinet/in.h"" >&5 cat > conftest.$ac_ext < @@ -11021,7 +11245,7 @@ int main() { static struct ip_mreq x; ; return 0; } EOF -if { (eval echo configure:11025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_MULTICAST @@ -11052,10 +11276,10 @@ fi echo $ac_n "checking for msgget""... $ac_c" 1>&6 -echo "configure:11056: checking for msgget" >&5 +echo "configure:11280: checking for msgget" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_msgget=yes" else @@ -11093,15 +11317,15 @@ if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6 -echo "configure:11097: checking for sys/ipc.h" >&5 +echo "configure:11321: checking for sys/ipc.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11118,15 +11342,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6 -echo "configure:11122: checking for sys/msg.h" >&5 +echo "configure:11346: checking for sys/msg.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11164,15 +11388,15 @@ fi ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dirent.h""... $ac_c" 1>&6 -echo "configure:11168: checking for dirent.h" >&5 +echo "configure:11392: checking for dirent.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11199,15 +11423,15 @@ else echo "$ac_t""no" 1>&6 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6 -echo "configure:11203: checking for sys/dir.h" >&5 +echo "configure:11427: checking for sys/dir.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11240,15 +11464,15 @@ fi ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for nlist.h""... $ac_c" 1>&6 -echo "configure:11244: checking for nlist.h" >&5 +echo "configure:11468: checking for nlist.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11278,22 +11502,22 @@ fi echo "checking "for sound support"" 1>&6 -echo "configure:11282: checking "for sound support"" >&5 +echo "configure:11506: checking "for sound support"" >&5 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes if test "$with_native_sound" != "no"; then if test -n "$native_sound_lib"; then ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6 -echo "configure:11289: checking for multimedia/audio_device.h" >&5 +echo "configure:11513: checking for multimedia/audio_device.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11341,12 +11565,12 @@ fi if test -z "$native_sound_lib"; then echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6 -echo "configure:11345: checking for ALopenport in -laudio" >&5 +echo "configure:11569: checking for ALopenport in -laudio" >&5 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'` xe_check_libs=" -laudio " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11388,12 +11612,12 @@ fi if test -z "$native_sound_lib"; then echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6 -echo "configure:11392: checking for AOpenAudio in -lAlib" >&5 +echo "configure:11616: checking for AOpenAudio in -lAlib" >&5 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'` xe_check_libs=" -lAlib " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11442,15 +11666,15 @@ fi for dir in "machine" "sys" "linux"; do ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6 -echo "configure:11446: checking for ${dir}/soundcard.h" >&5 +echo "configure:11670: checking for ${dir}/soundcard.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11504,15 +11728,15 @@ fi if test "$with_nas_sound" != "no"; then ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6 -echo "configure:11508: checking for audio/audiolib.h" >&5 +echo "configure:11732: checking for audio/audiolib.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11530,12 +11754,12 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6 -echo "configure:11534: checking for AuOpenServer in -laudio" >&5 +echo "configure:11758: checking for AuOpenServer in -laudio" >&5 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'` xe_check_libs=" -laudio " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11585,7 +11809,7 @@ EOF fi libs_x="-laudio $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-laudio\" to \$libs_x"; fi cat > conftest.$ac_ext < EOF @@ -11616,7 +11840,7 @@ if test "$with_esd_sound" != "no"; then # Extract the first word of "esd-config", so it can be a program name with args. set dummy esd-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:11620: checking for $ac_word" >&5 +echo "configure:11844: checking for $ac_word" >&5 if test -n "$have_esd_config"; then ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test. @@ -11645,10 +11869,10 @@ fi c_switch_site="$c_switch_site `esd-config --cflags`" && if test "$extra_verbose" = "yes"; then echo " Appending \"`esd-config --cflags`\" to \$c_switch_site"; fi LIBS="`esd-config --libs` $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"`esd-config --libs`\" to \$LIBS"; fi echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6 -echo "configure:11649: checking for esd_play_stream" >&5 +echo "configure:11873: checking for esd_play_stream" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_esd_play_stream=yes" else @@ -11722,7 +11946,7 @@ test -z "$with_tty" && with_tty=yes if test "$with_tty" = "yes" ; then echo "checking for TTY-related features" 1>&6 -echo "configure:11726: checking for TTY-related features" >&5 +echo "configure:11950: checking for TTY-related features" >&5 { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_TTY EOF @@ -11738,12 +11962,12 @@ EOF if test -z "$with_ncurses"; then echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 -echo "configure:11742: checking for tgetent in -lncurses" >&5 +echo "configure:11966: checking for tgetent in -lncurses" >&5 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -lncurses " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11787,15 +12011,15 @@ EOF ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6 -echo "configure:11791: checking for ncurses/curses.h" >&5 +echo "configure:12015: checking for ncurses/curses.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11817,15 +12041,15 @@ fi ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6 -echo "configure:11821: checking for ncurses/term.h" >&5 +echo "configure:12045: checking for ncurses/term.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11855,15 +12079,15 @@ fi c_switch_site="$c_switch_site -I/usr/include/ncurses" ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6 -echo "configure:11859: checking for ncurses/curses.h" >&5 +echo "configure:12083: checking for ncurses/curses.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11898,12 +12122,12 @@ fi for lib in curses termlib termcap; do echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6 -echo "configure:11902: checking for tgetent in -l$lib" >&5 +echo "configure:12126: checking for tgetent in -l$lib" >&5 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -l$lib " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11945,12 +12169,12 @@ fi else echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 -echo "configure:11949: checking for tgetent in -lcurses" >&5 +echo "configure:12173: checking for tgetent in -lcurses" >&5 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -lcurses " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11979,12 +12203,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 -echo "configure:11983: checking for tgetent in -ltermcap" >&5 +echo "configure:12207: checking for tgetent in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -ltermcap " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12043,15 +12267,15 @@ EOF test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for gpm.h""... $ac_c" 1>&6 -echo "configure:12047: checking for gpm.h" >&5 +echo "configure:12271: checking for gpm.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12074,12 +12298,12 @@ fi } test -z "$with_gpm" && { echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6 -echo "configure:12078: checking for Gpm_Open in -lgpm" >&5 +echo "configure:12302: checking for Gpm_Open in -lgpm" >&5 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'` xe_check_libs=" -lgpm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12140,20 +12364,20 @@ test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \ != "no no no" && echo "checking for database support" 1>&6 -echo "configure:12144: checking for database support" >&5 +echo "configure:12368: checking for database support" >&5 if test "$with_database_gdbm $with_database_dbm" != "no no"; then ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6 -echo "configure:12149: checking for ndbm.h" >&5 +echo "configure:12373: checking for ndbm.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12157: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12183,12 +12407,12 @@ fi if test "$with_database_gdbm" != "no"; then echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:12187: checking for dbm_open in -lgdbm" >&5 +echo "configure:12411: checking for dbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lgdbm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12227,10 +12451,10 @@ fi if test "$with_database_dbm" != "no"; then echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:12231: checking for dbm_open" >&5 +echo "configure:12455: checking for dbm_open" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -12272,12 +12496,12 @@ else echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:12276: checking for dbm_open in -ldbm" >&5 +echo "configure:12500: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` xe_check_libs=" -ldbm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12329,10 +12553,10 @@ EOF if test "$with_database_berkdb" != "no"; then echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6 -echo "configure:12333: checking for Berkeley db.h" >&5 +echo "configure:12557: checking for Berkeley db.h" >&5 for path in "db/db.h" "db.h"; do cat > conftest.$ac_ext < @@ -12354,7 +12578,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:12358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* db_h_path="$path"; break else @@ -12370,9 +12594,9 @@ rm -f conftest* if test "$with_database_berkdb" != "no"; then echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6 -echo "configure:12374: checking for Berkeley DB version" >&5 +echo "configure:12598: checking for Berkeley DB version" >&5 cat > conftest.$ac_ext < #if DB_VERSION_MAJOR > 1 @@ -12391,10 +12615,10 @@ fi rm -f conftest* echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6 -echo "configure:12395: checking for $dbfunc" >&5 +echo "configure:12619: checking for $dbfunc" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$dbfunc=yes" else @@ -12436,12 +12660,12 @@ else echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6 -echo "configure:12440: checking for $dbfunc in -ldb" >&5 +echo "configure:12664: checking for $dbfunc in -ldb" >&5 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'` xe_check_libs=" -ldb " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12516,12 +12740,12 @@ fi if test "$with_socks" = "yes"; then echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6 -echo "configure:12520: checking for SOCKSinit in -lsocks" >&5 +echo "configure:12744: checking for SOCKSinit in -lsocks" >&5 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'` xe_check_libs=" -lsocks " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12587,19 +12811,19 @@ fi if test "$with_modules" != "no"; then echo "checking for module support" 1>&6 -echo "configure:12591: checking for module support" >&5 +echo "configure:12815: checking for module support" >&5 ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 -echo "configure:12595: checking for dlfcn.h" >&5 +echo "configure:12819: checking for dlfcn.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12617,12 +12841,12 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:12621: checking for dlopen in -ldl" >&5 +echo "configure:12845: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` xe_check_libs=" -ldl " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12652,12 +12876,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6 -echo "configure:12656: checking for dlopen in -lc" >&5 +echo "configure:12880: checking for dlopen in -lc" >&5 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'` xe_check_libs=" -lc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12707,12 +12931,12 @@ EOF else echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:12711: checking for shl_load in -ldld" >&5 +echo "configure:12935: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` xe_check_libs=" -ldld " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12750,12 +12974,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6 -echo "configure:12754: checking for dld_init in -ldld" >&5 +echo "configure:12978: checking for dld_init in -ldld" >&5 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'` xe_check_libs=" -ldld " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12811,7 +13035,7 @@ xehost=$canonical xealias=$internal_configuration echo "checking how to build dynamic libraries for ${xehost}" 1>&6 -echo "configure:12815: checking how to build dynamic libraries for ${xehost}" >&5 +echo "configure:13039: checking how to build dynamic libraries for ${xehost}" >&5 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts. case "$xehost" in *-*-linux-gnu*) ;; @@ -12839,9 +13063,9 @@ if test "$GCC" = "yes"; then XEGCC=yes else echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:12843: checking checking whether we are using GNU C" >&5 +echo "configure:13067: checking checking whether we are using GNU C" >&5 cat > conftest.$ac_ext <&6 -echo "configure:12867: checking how to produce PIC code" >&5 +echo "configure:13091: checking how to produce PIC code" >&5 wl= can_build_shared=yes @@ -12956,18 +13180,18 @@ if test -n "$dll_cflags"; then # Check to make sure the dll_cflags actually works. echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6 -echo "configure:12960: checking if PIC flag ${dll_cflags} really works" >&5 +echo "configure:13184: checking if PIC flag ${dll_cflags} really works" >&5 save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $dll_cflags -DPIC" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also @@ -12998,7 +13222,7 @@ cc_produces_so=no xldf= xcldf= echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6 -echo "configure:13002: checking if C compiler can produce shared libraries" >&5 +echo "configure:13226: checking if C compiler can produce shared libraries" >&5 if test "$XEGCC" = yes; then xcldf="-shared" xldf="-shared" @@ -13049,14 +13273,14 @@ if test -n "$xcldf"; then xe_libs= ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5' cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cc_produces_so=yes else @@ -13081,7 +13305,7 @@ if test -z "$LTLD"; then if test "$XEGCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:13085: checking for ld used by GCC" >&5 +echo "configure:13309: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -13106,7 +13330,7 @@ echo "configure:13085: checking for ld used by GCC" >&5 esac else echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:13110: checking for GNU ld" >&5 +echo "configure:13334: checking for GNU ld" >&5 fi if test -z "$LTLD"; then @@ -13144,7 +13368,7 @@ ld_dynamic_link_flags= # Check to see if it really is or isn't GNU ld. echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6 -echo "configure:13148: checking if the linker is GNU ld" >&5 +echo "configure:13372: checking if the linker is GNU ld" >&5 # I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LTLD -v 2>&1 &5; then xe_gnu_ld=yes @@ -13167,11 +13391,12 @@ if test "$cc_produces_so" = "yes"; then dll_ld=$CC dll_ldflags=$xcldf can_build_shared=yes + ld_shlibs=yes else # OK - only NOW do we futz about with ld. # See if the linker supports building shared libraries. echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6 -echo "configure:13175: checking whether the linker supports shared libraries" >&5 +echo "configure:13400: checking whether the linker supports shared libraries" >&5 dll_ld=$CC dll_ldflags=$LDFLAGS ld_shlibs=yes @@ -13386,10 +13611,10 @@ EOF for ac_func in dlerror _dlerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13390: checking for $ac_func" >&5 +echo "configure:13615: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -13451,11 +13676,11 @@ done fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:13684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then : else @@ -14149,6 +14374,12 @@ test "$with_database_gdbm" = yes && echo " Compiling in support for GNU DBM." test "$with_ldap" = yes && echo " Compiling in support for LDAP." +if test "$with_postgresql" = yes; then + echo " Compiling in support for PostgreSQL." + if test "$with_postgresqlv7" = yes; then + echo " Using PostgreSQL V7 bindings." + fi +fi test "$with_ncurses" = yes && echo " Compiling in support for ncurses." test "$with_gpm" = yes && echo " Compiling in support for GPM (General Purpose Mouse)." @@ -14211,7 +14442,7 @@ test "$with_pop" = yes && echo " Using POP for mail access." test "$with_kerberos" = yes && echo " Using Kerberos for POP authentication." test "$with_hesiod" = yes && echo " Using Hesiod to get POP server host." test "$use_union_type" = yes && echo " Using the union type for Lisp_Objects." -test "$pdump" = yes && echo " Using the new portable dumper (wishful thinking)." +test "$pdump" = yes && echo " Using the new portable dumper." test "$debug" = yes && echo " Compiling in extra code for debugging." test "$usage_tracking" = yes && echo " Compiling with usage tracking active (Sun internal)." if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \ diff --git a/configure.in b/configure.in index df3b77b..28bc58a 100644 --- a/configure.in +++ b/configure.in @@ -307,6 +307,7 @@ mandir='${prefix}/man' dnl Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} dnl Maximum number of lines to put in a shell here document. ac_max_here_lines=12 ])dnl AC_INIT_PARSE_ARGS @@ -505,6 +506,7 @@ while test $# != 0; do with_sparcworks | \ with_tooltalk | \ with_ldap | \ + with_postgresql | \ with_pop | \ with_kerberos | \ with_hesiod | \ @@ -1001,6 +1003,8 @@ else PROGNAME=xemacs fi +AC_DEFINE_UNQUOTED(EMACS_PROGNAME, "$PROGNAME") + dnl ---------------------------------- dnl Error checking and debugging flags dnl ---------------------------------- @@ -1947,7 +1951,8 @@ XE_PROTECT_LINKER_FLAGS(ld_call_shared) dnl Add s&m-determined objects (including unexec) to link line test -n "$objects_machine" && XE_ADD_OBJS($objects_machine) test -n "$objects_system" && XE_ADD_OBJS($objects_system) -test -n "$unexec" && XE_ADD_OBJS($unexec) +test -n "$unexec" && test ! "$pdump" = "yes" && XE_ADD_OBJS($unexec) +test "$pdump" = "yes" && XE_ADD_OBJS(dumper.o) dnl Dynodump (Solaris 2.x, x<6) AC_MSG_CHECKING(for dynodump) @@ -2898,6 +2903,55 @@ if test "$with_ldap" = "yes"; then AC_CHECK_FUNCS(ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result) fi +dnl Autodetect PostgreSQL +dnl The default installation location (non-Linux) is /usr/local/pgsql; +dnl a different prefix can be selected at build/install time. If PostgreSQL +dnl is installed into a different prefix, that prefix must be specified in +dnl in the --site-prefixes flag. +dnl The default RPM-based Linux installation location is /usr. +AC_CHECKING(for PostgreSQL) +postgres_includes_found=no +save_c_switch_site="$c_switch_site" +dnl First check site prefixes +if test "$with_postgresql" != "no"; then + AC_CHECK_HEADER(libpq-fe.h,postgres_includes_found=yes) +fi +dnl test for Linux-style installation in /usr +if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \ + -d "/usr/include/pgsql"; then + c_switch_site="$c_switch_site -I/usr/include/pgsql" + AC_CHECK_HEADER(libpq-fe.h,postgres_includes_found=yes) + if test "$postgres_includes_found" != "yes"; then + c_switch_site="$save_c_switch_site" + fi +fi +if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \ + -d "/usr/local/pgsql/include"; then + c_switch_site="$c_switch_site -I/usr/local/pgsql/include" + AC_CHECK_HEADER(libpq-fe.h,postgres_includes_found=yes) + if test "$postgres_includes_found" != "yes"; then + c_switch_site="$save_c_switch_site" + fi +fi + +dnl last check -- can we link against libpq? +if test "$postgres_includes_found" = "yes"; then + AC_CHECK_LIB(pq,PQconnectdb,with_postgresql=yes,with_postgresql=no) +fi +if test "$with_postgresql" = "yes"; then + AC_CHECK_LIB(pq,PQconnectStart,with_postgresqlv7=yes,with_postgresqlv7=no) +fi +if test "$with_postgresql" = "yes"; then + AC_DEFINE(HAVE_POSTGRESQL) + if test "$with_postgresqlv7" = "yes"; then + AC_DEFINE(HAVE_POSTGRESQLV7) + fi + XE_PREPEND(-lpq, LIBS) + XE_ADD_OBJS(postgresql.o) +else + c_switch_site=$save_c_switch_site +fi + dnl ---------------------- dnl Graphics libraries dnl ---------------------- @@ -3515,10 +3569,7 @@ fi AC_C_INLINE -if test "$ac_cv_c_inline" != "no"; then - AC_DEFINE(HAVE_INLINE) - test "$GCC" = "yes" && XE_ADD_OBJS(inline.o) -fi +test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && XE_ADD_OBJS(inline.o) dnl HP-UX has a working alloca in libPW. dnl case "${GCC}${opsys}" in hpux* ) @@ -4477,6 +4528,12 @@ test "$with_database_gdbm" = yes && echo " Compiling in support for GNU DBM." test "$with_ldap" = yes && echo " Compiling in support for LDAP." +if test "$with_postgresql" = yes; then + echo " Compiling in support for PostgreSQL." + if test "$with_postgresqlv7" = yes; then + echo " Using PostgreSQL V7 bindings." + fi +fi test "$with_ncurses" = yes && echo " Compiling in support for ncurses." test "$with_gpm" = yes && echo " Compiling in support for GPM (General Purpose Mouse)." @@ -4539,7 +4596,7 @@ test "$with_pop" = yes && echo " Using POP for mail access." test "$with_kerberos" = yes && echo " Using Kerberos for POP authentication." test "$with_hesiod" = yes && echo " Using Hesiod to get POP server host." test "$use_union_type" = yes && echo " Using the union type for Lisp_Objects." -test "$pdump" = yes && echo " Using the new portable dumper (wishful thinking)." +test "$pdump" = yes && echo " Using the new portable dumper." test "$debug" = yes && echo " Compiling in extra code for debugging." test "$usage_tracking" = yes && echo " Compiling with usage tracking active (Sun internal)." if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \ diff --git a/configure.usage b/configure.usage index a6e9c6b..6b95066 100644 --- a/configure.usage +++ b/configure.usage @@ -139,6 +139,8 @@ Additional features: --with-dnet (*) Compile with support for DECnet. --with-ldap (*) Compile with support for the LDAP protocol (requires installed LDAP libraries on the system). +--with-postgresql (*) Compile with support for the PostgreSQL RDBMS (requires + installed PostreSQL libraries on the system). --mail-locking=TYPE (*) Specify the locking to be used by movemail to prevent concurrent updates of mail spool files. Valid types are `lockf', `flock', and `dot'. diff --git a/etc/NEWS b/etc/NEWS index ee6e827..9425a05 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -47,6 +47,28 @@ to set `delete-key-deletes-forward' to nil is if you want to use the Delete key to delete backwards, despite the presence (according to Xlib) of a BackSpace key on the keyboard. +** Shifted motion keys now select text by default. You can turn this +off by setting `shifted-motion-keys-select-region' to nil. + +** You can now set the variable `kill-whole-line' to `always', which +makes `kill-line' (C-k) delete the entire line always, not just when +the cursor is at the beginning of the line. This behavior, as well as +the existing kill-whole-line behavior, now only take effect when +kill-line is called interactively, although this is a departure from a +previous behavior in the case of setting this variable kill-whole-line +to t. It is almost certainly what has always been intended, and most +likely the old way of doing things introduced bugs. + +The new function `historical-kill-line' ignores the `kill-whole-line' +setting and always gives the historical behavior of only killing to +the end of the line. This function is bound to Sh-C-k, so that the +kill to end of line behavior is available, even when `kill-whole-line' +has been customized. + +** XEmacs menus now have accelerators by default. If a menu item does +not have an accelerator specified, one is created dynamically, using +numbers 1-9 and letters. + ** Interactive searching and matching case improvements. Case sensitiveness in searching operations is normally controlled by @@ -68,13 +90,20 @@ point. If you want to disable the feature, set ** You can now use the buffer tabs to switch between buffers. The tabs are located between the toolbar and the uppermost window, in a location called "gutter". If you dislike the buffer tabs, you can -disable them by specifying: +disable them by customizing `gutter-buffers-tab-visible-p', or by +placing this in your .emacs: - (set-specifier default-gutter-visible-p nil) + (set-gutter-element-visible-p default-gutter-visible-p 'buffers-tab nil) -in your `.emacs'. You can change the location of the gutter with +You can change the location of the gutter with `set-default-gutter-position', however currently only MS-Windows -supports tab widgets with orientations other than vertical.. +supports tab widgets with orientations other than vertical. + +** Kill and yank now interact with the clipboard by default under +Windows. This was done by changing the default value of +`interprogram-cut-function' and `interprogram-paste-function'. You +can get the old behavior by setting these to nil, and there is an +option on the options menu to do this. ** When you press RET at a minibuffer prompt that provides a default value, the value is stored in history instead of an empty line. Also, @@ -91,6 +120,13 @@ the left side. All functions have been rewritten to avoid inserting unwanted spaces, and an optional prefix now allows them to behave the old way. +Also, the behavior of `string-rectangle' is now compliant with +`pending-delete-mode': if this mode is active, then the string +replaces the region rectangle. Otherwise, the command does not delete +or overwrite any existing text. For those who want that feature but do +not use pending-delete-mode, a new function, `replace-rectangle', is +available. + As a side effect, the FORCE argument to `move-to-column' now understands the special value `coerce', which means that the line should not be filled if it is too short to reach the desired column. @@ -177,17 +213,40 @@ Moreover, -user (which used to only work in unpredictable ways) is now equivalent to -user-init-file ~/.emacs -user-init-directory ~/.xemacs. +** Init file may be called .emacs.el. + +Like in GNU Emacs 20.4 and on, you can now name the XEmacs init file +`.emacs.el'. Formerly the name had to be `.emacs'. If you use the +name `.emacs.el', you can byte-compile the file in the usual way. + +If both `.emacs' and `.emacs.el' exist, the latter file is the one +that is used. + ** New variable `mswindows-meta-activates-menu'. -If you set this variable to nil then pressing the Alt key under -MS-Windows will no longer activate the menubar. The default is t. +If you set this variable to nil then pressing and releasing the Alt +key under MS-Windows will no longer activate the menubar. The default +is t. This is not to be confused with `menu-accelerator-enabled', +which enables the use of Alt+ accelerators to invoke the +menus. -** Pixel-based scrolling has been implemented. +** Pixel-based scrolling has been implemented. By default this will attempt to scroll in increments equal to the -height of the default face. Set `window-pixel-scroll-increment' to +height of the default face. Set `window-pixel-scroll-increment' to modify this behaviour. +** Operation progress can be displayed using graphical widgets. +See `lprogress-display' for details. This support has been switched +on by default for font-lock and some web browsing functions. If you +do not like this behaviour set `progress-display-use-echo-area'. + ** Etags changes. +** The PostgreSQL Relational Database Management System is now supported. +It is now possible to build XEmacs so that the programming interface +to the PostgreSQL RDBMS (libpq) is available in XEmacs Lisp. +Supported versions of PostgreSQL are 6.5.3 (earlier versions may work, +but have not been tested) and 7.0-beta1. + *** In DOS, etags looks for file.cgz if it cannot find file.c. *** New option --ignore-case-regex is an alternative to --regex. It is now @@ -241,15 +300,7 @@ get to the initialized data. In that scheme, there is no difference between `temacs' and `xemacs'. This is all very experimental, though. Configure with `--pdump' to -try testing it. NOTE: it is expected that `make' will fail after -dumping `xemacs.dmp'. This is because Makefiles have not yet been -modified to not expect `temacs' producing an `xemacs' executable. You -can try it out by simply running `src/temacs'. If it starts without -failure, the portable dumping worked. - -#### NOTE: the portable dumper is not really usable yet, because the -state of built-in variables is not yet saved. Olivier promised to fix -it. Nag, nag. +try testing it. ** Much effort has been invested to make XEmacs Lisp faster: @@ -295,8 +346,8 @@ buttons, scrollbars, combo boxes, edit fields and progress gauges in a buffer. As a side effect subwindow support now works once again. All of this is still fairly experimental and there is no -documentation. The current APIs might change in a future version of -XEmacs. Some widgets are only available under MS-Windows. See the +documentation. The current APIs might change in a future version of +XEmacs. Some widgets are only available under MS-Windows. See the file glyphs-test.el in the XEmacs src distribution for examples of usage. @@ -443,6 +494,21 @@ beginning with colon as keywords only if they are interned in the global obarray. `keywordp' used to wrongly return t in both cases above. +** New variables `this-command-properties' and +`last-command-properties' are now available for communication between +consecutive commands. Commands should use these to communicate with +the pre/post-command hooks, subsequent commands, wrapping commands, +etc. in preference to looking at and/or setting `this-command'. + +** New functions `add-one-shot-hook' and `add-local-one-shot-hook' make +it possible to add a "one-shot" hook, which is to say a hook that runs +only once, and automatically removes itself after the first time it +has run. + +** The descriptor that specifies the text of a menu item can now be an +evaluated expression. This makes this descriptor parallel with +others, which can also be expressions. + * Changes in XEmacs 21.0 ======================== diff --git a/etc/TUTORIAL.fr b/etc/TUTORIAL.fr index 4a0d27c..e78ae19 100644 --- a/etc/TUTORIAL.fr +++ b/etc/TUTORIAL.fr @@ -1,9 +1,9 @@ -Copyright (c) 1997, Didier Verna . +Copyright (c) 1997-2000, Didier Verna . Se reporter à la fin du document pour les conditions. Vous lisez actuellement la version française du tutoriel d'Emacs. -Cette version a été produite à partir de la version anglaise, qui est +Cette version a été produite à partir de la version anglaise, qui est Copyright (c) 1985, 1996 Free Software Foundation, Inc. @@ -29,7 +29,7 @@ disponibles dans Emacs, les conventions suivantes sont utilis NOTE IMPORTANTE: pour quitter Emacs, tapez C-x C-c (deux caractères). -Quand vous trouvez les caractères >> au début d'une ligne, cette ligne +Quand vous trouvez les caractères >> au début d'une ligne, cette ligne vous donne des directives pour essayer une commande. Par exemple: <> >> Maintenant, tapez C-v («view next screen») pour passer à l'écran @@ -37,7 +37,7 @@ vous donne des directives pour essayer une commande. Par exemple: enfoncée et tapez 'v'). À partir de maintenant, refaites la même chose quand vous avez fini de lire tout l'écran. -Remarquez que quand vous changez d'écran, les deux dernières lignes de +Remarquez que quand vous changez d'écran, les deux dernières lignes de l'écran précédent sont conservées, ceci afin de conserver un minimum de continuité dans la lecture. @@ -70,7 +70,7 @@ Les commandes suivantes sont utiles pour voir des * MOUVEMENTS DE BASE DU CURSEUR ------------------------------- -Passer d'un écran à l'autre, c'est bien ... mais comment faire pour se +Passer d'un écran à l'autre, c'est bien ... mais comment faire pour se déplacer dans le texte d'un seul écran? Il existe plusieurs manières de faire. La plus simple est d'utiliser @@ -98,8 +98,8 @@ car vous vous en servirez tr >> Amenez le curseur sur cette ligne avec quelques C-n. ->> Déplacez vous sur la ligne avec des C-f, puis vers le haut avec des - C-p. Remarquez ce que fait C-p quand le curseur est au milieu de la +>> Déplacez vous sur la ligne avec des C-f, puis vers le haut avec des + C-p. Remarquez ce que fait C-p quand le curseur est au milieu de la ligne. Chaque ligne de texte se termine avec un caractère nommé Newline, qui @@ -125,7 +125,7 @@ op se passe. Si vous trouvez que le déplacement caractère par caractère est trop -lent, vous pouvez vous déplacer mot par mot. M-f et M-b vous déplacent +lent, vous pouvez vous déplacer mot par mot. M-f et M-b vous déplacent respectivement d'un mot en avant et en arrière. >> Tapez quelques M-f et M-b. @@ -143,7 +143,7 @@ unit commandes Control agissent sur des unités plus primaires (caractères, lignes etc.). -Ce parallèle existe encore entre les lignes et les phrases: C-a et C-e +Ce parallèle existe encore entre les lignes et les phrases: C-a et C-e vous positionnent au début ou à la fin d'une ligne, tandis que M-a et M-e vous déplacent au début ou à la fin d'une phrase. @@ -157,7 +157,7 @@ La position du curseur sur dans le texte est aussi appel «point». En d'autres termes, le curseur à l'écran se trouve où le point est dans le texte. -Voici un résumé des commandes simples de déplacement, y compris celles +Voici un résumé des commandes simples de déplacement, y compris celles relatives aux mots et aux phrases: C-f En avant d'un caractère @@ -203,21 +203,21 @@ clavier. Enfin, quand vous aurez l'habitude d'utiliser la touche déplacement plus complexes. La plupart des commandes d'Emacs acceptent un argument numérique, qui -sert souvent comme compteur de répétition. Pour donner un tel argument +sert souvent comme compteur de répétition. Pour donner un tel argument à une fonction, tapez C-u puis les chiffres, et enfin entrez la commande. Si vous disposez de la touche (ou ou ), vous pouvez aussi tapez directement les chiffres tout en maintenant la -touche enfoncée. Il est préférable d'apprendre la méthode C-u car +touche enfoncée. Il est préférable d'apprendre la méthode C-u car elle fonctionne sur tous les terminaux. Par exemple, C-u 8 C-f vous déplace de huit caractères en avant. - + >> Essayez d'utiliser C-n avec un argument numérique pour vous déplacer d'un seul coup sur une autre ligne. Certaines commandes n'interprètent pas leur argument numérique comme -un compteur de répétition. C'est le cas de C-v et M-v qui déplacent le -texte d'autant de lignes plutôt que d'écrans entiers. Par exemple, C-u +un compteur de répétition. C'est le cas de C-v et M-v qui déplacent le +texte d'autant de lignes plutôt que d'écrans entiers. Par exemple, C-u 4 C-v déroulera l'écran de 4 lignes. >> Essayez C-u 8 C-v. @@ -253,14 +253,14 @@ fichier. Si enfin votre pav , celles-ci vous déplaceront d'écran en écran comme C-v et M-v. Toutes ces commandes acceptent des arguments numériques comme décrit -précédemment. +précédemment. * QUAND EMACS EST BLOQUÉ ------------------------ Si jamais Emacs ne répond plus à vos ordres, vous pouvez l'arrêter en -toute sécurité en tapant C-g. C-g peut aussi être utilisé pour stopper +toute sécurité en tapant C-g. C-g peut aussi être utilisé pour stopper une commande qui met trop de temps à s'exécuter. C-g sert également à annuler un argument numérique, ou une commande @@ -271,7 +271,7 @@ que vous ne voulez plus mener Maintenant, tapez C-f. Le curseur doit finalement ne bouger que d'un seul caractère, puisque vous avez annulé l'argument. -Si vous avez tapé un par erreur, vous pourrez toujours l'annuler +Si vous avez tapé un par erreur, vous pourrez toujours l'annuler avec C-g. @@ -296,12 +296,12 @@ espace. Sinon, r Emacs peut afficher plusieurs fenêtres, chacune avec un texte différent. Le terme «fenêtre» signifie ici une zone particulière dans -la fenêtre d'Emacs; il ne s'agit pas de fenêtres pouvant se superposer +la fenêtre d'Emacs; il ne s'agit pas de fenêtres pouvant se superposer dans votre système de multifenétrage. Emacs peut aussi ouvrir -plusieurs fenêtres X (appelées «frames» en jargon Emacsien), mais ceci +plusieurs fenêtres X (appelées «frames» en jargon Emacsien), mais ceci est décrit ultérieurement. -Pour l'instant, mieux vaut ne pas trop s'occuper de plusieurs fenêtres +Pour l'instant, mieux vaut ne pas trop s'occuper de plusieurs fenêtres simultanées, sauf peut-être pour savoir les éliminer toutes sauf une. Ceci est effectué par la commande C-x 1 ('un', pas 'L'). Cette commande tue toutes les fenêtres sauf celle dans laquelle vous vous @@ -335,7 +335,7 @@ quelques fois temps! Plus généralement, efface le caractère situé juste avant le -curseur. +curseur. >> Maintenant, tapez quelques caractères, puis effacez-les avec . Ne vous inquiétez pas pour le contenu de ce tutoriel, ce @@ -364,11 +364,11 @@ pr >> Tapez pour réinsérer le Newline que vous avez effacé. Rappelez-vous bien que la plupart des commandes acceptent un argument -numérique, y compris l'insertion de caractères: +numérique, y compris l'insertion de caractères: >> Tapez C-u 8 *, vous obtiendrez "********". -Vous connaissez maintenant les commandes de base pour insérer du texte +Vous connaissez maintenant les commandes de base pour insérer du texte et corriger des erreurs. Toujours grâce aux touches et , vous pouvez aussi effacer du texte par mot ou par ligne: @@ -386,7 +386,7 @@ Quand vous supprimez plus d'un caract texte pour vous donner la possibilité de le réintroduire. L'opération de réintroduction s'appelle le «yanking». Vous pouvez réintroduire le texte à la même place ou ailleurs. Vous pouvez même le réintroduire -plusieurs fois, pourquoi pas à des endroits différents. La commande de +plusieurs fois, pourquoi pas à des endroits différents. La commande de «yanking» est C-y. Notez bien la différence entre «effacer» et «supprimer». Un texte @@ -396,7 +396,7 @@ vides ne sauvegardent rien. >> Placez le curseur au début d'une ligne non vide. Tapez C-k pour supprimer le texte sur cette ligne. ->> Tapez C-k une deuxième fois. Vous remarquerez que cette fois-ci, la +>> Tapez C-k une deuxième fois. Vous remarquerez que cette fois-ci, la ligne elle-même est supprimée (le caractère Newline). C-k traite son argument numérique de manière spéciale: il supprime @@ -455,7 +455,7 @@ de C-x u Une alternative à C-x u est C-_. C-x u existe car c'est plus facile à taper sur certains claviers. Sur d'autres vous pouvez également -obtenir C-_ en tapant C-/. +obtenir C-_ en tapant C-/. Enfin, la commande d'annulation accepte les argument numériques. @@ -466,18 +466,18 @@ Enfin, la commande d'annulation accepte les argument num Pour sauver votre texte, vous avez besoin de le mettre dans un fichier, sans quoi il disparaîtra quand vous quitterez Emacs. On dit «trouver» un fichier («finding»), ou encore «visiter» un fichier -(«visiting»), ou bien «ouvrir». +(«visiting»), ou bien «ouvrir». Visiter un fichier revient à voir son contenu dans Emacs. Si vous -modifiez le texte du fichier dans Emacs, ces changements ne deviennent -pas permanent, sauf si vous «sauvez» le fichier. Cela permet de ne pas +modifiez le texte du fichier dans Emacs, ces changements ne deviennent +pas permanent, sauf si vous «sauvez» le fichier. Cela permet de ne pas avoir des fichiers à moitié modifiés sur votre système, à moins que vous ne le souhaitiez vraiment. D'autre part, quand Emacs «sauve» un -fichier, il commence par copier l'ancienne version sous un nouveau nom +fichier, il commence par copier l'ancienne version sous un nouveau nom afin que vous puissiez toujours revenir en arrière. Regardez en bas de la fenêtre d'Emacs. Vous trouverez une ligne -contenant des tirets '-', et la chaîne de caractères +contenant des tirets '-', et la chaîne de caractères «Emacs: TUTORIAL.FRANCAIS». Cela vous donne le nom du fichier que vous êtes en train de visiter. En ce moment, vous visitez le fichier «TUTORIAL.FRANCAIS» qui correspond au Tutoriel d'Emacs, version @@ -501,14 +501,14 @@ de la fen manière, on l'appelle «minibuffer». Les commandes d'édition ordinaires peuvent être utilisées pour éditer le nom du fichier. -Pendant que vous êtes en train de taper le nom du fichier, vous pouvez +Pendant que vous êtes en train de taper le nom du fichier, vous pouvez annuler la commande grâce à C-g. >> Tapez C-x C-f puis C-g. Cela annule le minibuffer ainsi que la commande C-x C-f. Vous n'allez finalement pas visiter de fichier. Quand le nom du fichier est correct, tapez . La commande -prendra alors effet et ira chercher le fichier. Après avoir terminé la +prendra alors effet et ira chercher le fichier. Après avoir terminé la saisie du nom, le minibuffer disparaît. Au bout d'un petit moment, le contenu du fichier apparaît et vous @@ -519,7 +519,7 @@ C-x C-s ( Cette commande copie le texte contenu dans Emacs vers le fichier lui-même. La première fois que vous le faites, Emacs sauvegarde la -version initiale du fichier sous un autre nom, en ajoutant un '~' à la +version initiale du fichier sous un autre nom, en ajoutant un '~' à la fin du nom. Quand la sauvegarde est terminée, Emacs affiche le nom du fichier dans @@ -528,17 +528,17 @@ souvent les fichiers pour système (non pas qu'Emacs ne puisse jamais crasher lui-même ...). >> Tapez C-x C-s pour sauver votre copie du tutoriel. - Vous devriez voir apparaître «Wrote ...TUTORIAL.FRANCAIS" tout en bas + Vous devriez voir apparaître «Wrote ...TUTORIAL.FRANCAIS" tout en bas de la fenêtre. NOTE: Sur certains systèmes, C-x C-s bloque l'écran et Emacs ne dit plus rien. Cela signifie qu'une «fonctionnalité» système que l'on -appelle le «flow control» intercepte le C-s et l'empêche de parvenir à +appelle le «flow control» intercepte le C-s et l'empêche de parvenir à Emacs. Pour débloquer la situation, tapez C-q. Reportez-vous dans ce cas à la section «Spontaneous Entry to Incremental Search» du manuel -d'Emacs pour plus d'information sur cette ... «particularité». +d'Emacs pour plus d'information sur cette ... «particularité». -Vous pouvez visiter des fichiers existant, mais aussi des fichiers qui +Vous pouvez visiter des fichiers existant, mais aussi des fichiers qui n'existent pas. C'est en fait comme cela que l'on crée un nouveau fichier dans Emacs. Initialement, le fichier sera inexistant, et la première fois que vous demanderez à Emacs de le sauver, il créera @@ -572,7 +572,7 @@ buffers non attach C-b. Par contre, TOUT texte que vous pouvez voir dans Emacs appartient à un buffer. ->> Tapez C-x 1 pour faire disparaître le buffer contenant la liste des +>> Tapez C-x 1 pour faire disparaître le buffer contenant la liste des buffers. Quand vous éditez un fichier, puis que vous en ouvrez un autre, le @@ -608,7 +608,7 @@ son Remarquez qu'il existe des boutons n'ayant aucun équivalent clavier. Par exemple, le menu «Buffers» donne la liste de tous les -buffers par ordre de plus récente utilisation. Vous pouvez passer d'un +buffers par ordre de plus récente utilisation. Vous pouvez passer d'un buffer à l'autre en les sélectionnant par leur nom dans ce menu. @@ -622,12 +622,12 @@ d cliquant le bouton de gauche au début de la portion à sélectionner, puis en Shift-cliquant à l'autre bout. -Pour supprimer un morceau de texte, utilisez C-w ou le bouton «Cut» du +Pour supprimer un morceau de texte, utilisez C-w ou le bouton «Cut» du menu «Edit». Notez bien que ces deux commandes ne sont pas -équivalentes: C-w ne fait que supprimer le texte en le sauvegardant de +équivalentes: C-w ne fait que supprimer le texte en le sauvegardant de manière interne (comme C-k), mais «Cut» sauvegarde en plus le texte dans le clipboard de X Window, où il pourra être accédé par d'autres -applications. +applications. Pour récupérer du texte en provenance d'autres applications, utilisez «Paste» du menu «Edit». @@ -664,11 +664,11 @@ utilise la commande X (eXtension) qui se pr Ces commandes, bien que très utiles, sont utilisées moins souvent que celles que vous avez déjà apprises. Vous en connaissez déjà deux: les commandes relatives aux fichiers (C-x C-f et C-x C-s). Un autre -exemple est la commande pour quitter définitivement Emacs, C-x C-c (ne +exemple est la commande pour quitter définitivement Emacs, C-x C-c (ne vous inquiétez pas des éventuels changements qui seraient perdus, C-x C-c vous propose de sauver ces changements avant de tuer Emacs). -C-z est la commande qui vous permet de quitter Emacs «temporairement», +C-z est la commande qui vous permet de quitter Emacs «temporairement», pour que vous puissiez y revenir plus tard. Sur les systèmes le permettant, C-z «suspend» Emacs, ce qui signifie @@ -688,7 +688,7 @@ ceux-ci ne sachant pas forc des circonstances où vous ne vous déloguez pas, mieux vaut suspendre par C-z au lieu de sortir véritablement d'Emacs. -Il existe de nombreuses commandes sous C-x. Voici celles que vous avez +Il existe de nombreuses commandes sous C-x. Voici celles que vous avez apprises jusque là: C-x C-f Visiter un fichier (Find File). @@ -702,7 +702,7 @@ souvent, ou disponibles seulement sous certains modes. Par exemple, la commande «replace-string» substitue globalement une chaîne de caractères par une autre. Si vous tapez M-x, Emacs vous affichera M-x en bas de la fenêtre et vous pourrez alors taper le nom d'une -commande, ici replace-string. Tapez simplement 'repl s ' +commande, ici replace-string. Tapez simplement 'repl s ' et Emacs complétera le nom pour vous. Terminez le nom avec La commande replace-string requiert deux arguments: la chaîne à @@ -710,12 +710,12 @@ remplacer et la cha chaînes par . >> Déplacez le curseur sur la ligne blanche en dessous de ce - paragraphe, puis tapez - M-x replsRemarquezNotez. + paragraphe, puis tapez + M-x replsRemarquezNotez. Remarquez comme cette ligne a changé: le mot R-e-m-a-r-q-u-e-z a été remplacé par N-o-t-e-z partout où il est apparu après le - curseur. + curseur. * SAUVEGARDE AUTOMATIQUE @@ -749,15 +749,15 @@ area La ligne juste au dessus de la zone d'écho s'appelle ligne de mode («modeline»). Elle dit actuellement quelque chose comme ça: ---**-XEmacs: TUTORIAL.FRANCAIS (Fundamental)--L752--67%--------- +--**-XEmacs: TUTORIAL.FRANCAIS (Fundamental)--L752--67%--------- -Cette ligne fournit des renseignements utiles sur le status d'Emacs et +Cette ligne fournit des renseignements utiles sur le status d'Emacs et le texte que vous éditez. Vous connaissez déjà la signification du nom de fichier: c'est celui -que vous êtes en train d'éditer. -xx%- indique le pourcentage de texte +que vous êtes en train d'éditer. -xx%- indique le pourcentage de texte situé au dessus du curseur. Si vous pouvez voir le début du fichier à -l'écran, --Top-- sera indiqué au lieu de --00%--. Si le bas du fichier +l'écran, --Top-- sera indiqué au lieu de --00%--. Si le bas du fichier est visible, il y aura --Bot-- à la place. Si votre texte est tout entier contenu dans la fenêtre, vous verrez --All--. @@ -793,7 +793,7 @@ pouvez constater par exemple que M-b et M-f traitent les apostrophes comme faisant partie des mots. Auparavant, ces caractères étaient considérés comme des séparateurs de mots. En général, les modes majeurs ne changent que très peu le comportement des commandes -habituelles. +habituelles. Pour voir la documentation du mode majeur courant, tapez C-h m. @@ -808,7 +808,7 @@ comportement de tel ou tel mode majeur. Ils peuvent désactivés indépendamment du mode majeur courant. Vous pouvez en utiliser autant que possible en même temps. -Un mode mineur très utile pour éditer du texte est le mode +Un mode mineur très utile pour éditer du texte est le mode «Auto Fill». Quand ce mode est activé, Emacs coupe lui-même les lignes si vous tapez du texte trop long pour être contenu sur une seule. @@ -828,7 +828,7 @@ num Tapez du texte jusqu'à ce que la ligne soit coupée, puis replacez la marge à 70. -Si vous faites des changements au milieu d'un paragraphe, le mode Auto +Si vous faites des changements au milieu d'un paragraphe, le mode Auto Fill ne recoupera pas les lignes tout seul. Pour réajuster les lignes d'un tel paragraphe, tapez M-q avec le curseur n'importe où dans le paragraphe. @@ -847,7 +847,7 @@ prochain (ou pr La commande de recherche d'Emacs est un peu différente de celle des autres éditeurs de texte dans la mesure où elle est incrémentale: la recherche intervient au fur et à mesure que vous tapez la chaîne à -rechercher. +rechercher. Pour démarrer une recherche, tapez C-s (en avant) ou C-r (en arrière). MAIS PAS TOUT DE SUITE !! Attendez un peu pour tester ... @@ -872,10 +872,10 @@ n'existe, C-s produira un NOTE: Sur certains systèmes, C-x C-s bloque l'écran et Emacs ne dit plus rien. Cela signifie qu'une «fonctionnalité» système que l'on -appelle le «flow control» intercepte le C-s et l'empêche de parvenir à +appelle le «flow control» intercepte le C-s et l'empêche de parvenir à Emacs. Pour débloquer la situation, tapez C-q. Reportez-vous dans ce cas à la section «Spontaneous Entry to Incremental Search» du manuel -d'Emacs pour plus d'information sur cette ... «particularité». +d'Emacs pour plus d'information sur cette ... «particularité». Si vous êtes au milieu d'une recherche incrémentale et que vous tapez , vous constaterez que le dernier caractère de la chaîne est @@ -923,7 +923,7 @@ r C-M-v (ou C-v si vous n'avez pas de touche ) est un exemple de Control-Méta caractère. L'ordre dans lequel les touches - et sont enfoncées n'a pas d'importance. Ce sont juste + et sont enfoncées n'a pas d'importance. Ce sont juste des modificateurs. Par contre, n'est pas un modificateur, donc vous êtes obligés de taper d'abord , et C-v ensuite. @@ -959,7 +959,7 @@ Pour sortir d'un niveau r l'utiliser pour sortir du minibuffer ou éliminer des fenêtres superflues. ->> Tapez M-x pour vous rendre dans le minibuffer, puis tapez +>> Tapez M-x pour vous rendre dans le minibuffer, puis tapez pour en sortir. Il n'est pas possible d'utiliser C-g pour sortir d'un niveau récursif @@ -985,7 +985,7 @@ Emacs vous indiquera quelles sortes d'aide il peut vous fournir. Si vous ne désirez finalement pas d'aide après avoir tapé C-h, tapez simplement C-g. -(Quelques sites redéfinissent la commande C-h. Cela ne devrait vraiment +(Quelques sites redéfinissent la commande C-h. Cela ne devrait vraiment pas être fait, donc allez vous plaindre à votre administrateur système. Si C-h ne marche pas, tapez M-x help.) @@ -994,7 +994,7 @@ s la commande en question. >> Tapez C-h c C-p. - Le message doit ressembler à quelque chose comme + Le message doit ressembler à quelque chose comme C-p runs the command previous-line @@ -1041,11 +1041,11 @@ C-c. Pour quitter temporairement (et pour pouvoir revenir), tapez C-z Ce tutoriel est fait pour être compréhensible par tout nouvel utilisateur. Donc si quelque chose n'est pas clair, n'hésitez pas à -vous plaindre !! +vous plaindre !! Si vous avez plus particulièrement des remarques à faire sur la version française, vous pouvez aussi me contacter directement -(Didier Verna ). +(Didier Verna ). COPIES / DISTRIBUTION @@ -1057,7 +1057,7 @@ Un peu d'histoire ... Cracraft. * Ben Wing l'a mis à jour pour X Windows. * Martin Buchholz et Hrvoje Niksic y ont apporté des corrections pour - XEmacs. + XEmacs. * J'en (Didier Verna) ai fait une version française un beau jour de 1997. Cette version du tutoriel, tout comme Emacs, est copyrightée, et vous @@ -1082,4 +1082,3 @@ dans le m COPYING et à distribuer Emacs à vos amis. Aidez-nous à tuer l'obstructionnisme logiciel en utilisant, écrivant et partageant du logiciel libre! - diff --git a/info/internals.info b/info/internals.info index 4642aa8..976473c 100644 --- a/info/internals.info +++ b/info/internals.info @@ -41,12 +41,12 @@ Foundation instead of in the original English. Indirect: internals.info-1: 1776 internals.info-2: 46628 -internals.info-3: 94270 -internals.info-4: 143272 -internals.info-5: 189524 -internals.info-6: 239216 -internals.info-7: 282833 -internals.info-8: 331699 +internals.info-3: 94463 +internals.info-4: 143504 +internals.info-5: 193454 +internals.info-6: 243016 +internals.info-7: 286633 +internals.info-8: 335499  Tag Table: (Indirect) @@ -63,127 +63,127 @@ Node: XEmacs From the Perspective of Building32120 Node: XEmacs From the Inside38245 Node: The XEmacs Object System (Abstractly Speaking)46628 Node: How Lisp Objects Are Represented in C60714 -Node: Rules When Writing New C Code65207 -Node: General Coding Rules66011 -Node: Writing Lisp Primitives71722 -Node: Adding Global Lisp Variables82891 -Node: Coding for Mule86529 -Node: Character-Related Data Types87508 -Node: Working With Character and Byte Positions90505 -Node: Conversion to and from External Data94270 -Node: General Guidelines for Writing Mule-Aware Code100411 -Node: An Example of Mule-Aware Code103099 -Node: Techniques for XEmacs Developers105080 -Node: A Summary of the Various XEmacs Modules109290 -Node: Low-Level Modules110110 -Node: Basic Lisp Modules117680 -Node: Modules for Standard Editing Operations124290 -Node: Editor-Level Control Flow Modules130178 -Node: Modules for the Basic Displayable Lisp Objects133624 -Node: Modules for other Display-Related Lisp Objects136146 -Node: Modules for the Redisplay Mechanism137223 -Node: Modules for Interfacing with the File System139574 -Node: Modules for Other Aspects of the Lisp Interpreter and Object System143272 -Node: Modules for Interfacing with the Operating System148725 -Node: Modules for Interfacing with X Windows156386 -Node: Modules for Internationalization159822 -Node: Allocation of Objects in XEmacs Lisp162459 -Node: Introduction to Allocation162980 -Node: Garbage Collection166666 -Node: GCPROing167822 -Node: Garbage Collection - Step by Step174826 -Node: Invocation175218 -Node: garbage_collect_1178232 -Node: mark_object187712 -Node: gc_sweep189524 -Node: sweep_lcrecords_1194587 -Node: compact_string_chars195582 -Node: sweep_strings197762 -Node: sweep_bit_vectors_1198727 -Node: Integers and Characters199403 -Node: Allocation from Frob Blocks200155 -Node: lrecords201759 -Node: Low-level allocation213569 -Node: Cons217731 -Node: Vector218457 -Node: Bit Vector219034 -Node: Symbol219527 -Node: Marker219881 -Node: String220436 -Node: Compiled Function224049 -Node: Dumping224218 -Node: Overview226439 -Node: Data descriptions227009 -Node: Dumping phase229014 -Node: Object inventory229416 -Node: Address allocation232270 -Node: The header233657 -Node: Data dumping234165 -Node: Pointers dumping234826 -Node: Reloading phase236044 -Node: Remaining issues237805 -Node: Events and the Event Loop238766 -Node: Introduction to Events239216 -Node: Main Loop241165 -Node: Specifics of the Event Gathering Mechanism244740 -Node: Specifics About the Emacs Event257193 -Node: The Event Stream Callback Routines257448 -Node: Other Event Loop Functions257693 -Node: Converting Events258833 -Node: Dispatching Events; The Command Builder259442 -Node: Evaluation; Stack Frames; Bindings259677 -Node: Evaluation260019 -Node: Dynamic Binding; The specbinding Stack; Unwind-Protects266574 -Node: Simple Special Forms268958 -Node: Catch and Throw269741 -Node: Symbols and Variables272316 -Node: Introduction to Symbols272580 -Node: Obarrays273648 -Node: Symbol Values277181 -Node: Buffers and Textual Representation279469 -Node: Introduction to Buffers280127 -Node: The Text in a Buffer282833 -Node: Buffer Lists289983 -Node: Markers and Extents291934 -Node: Bufbytes and Emchars294199 -Node: The Buffer Object294414 -Node: MULE Character Sets and Encodings297894 -Node: Character Sets298956 -Node: Encodings302441 -Node: Japanese EUC (Extended Unix Code)303508 -Node: JIS7304340 -Node: Internal Mule Encodings305690 -Node: Internal String Encoding307520 -Node: Internal Character Encoding309665 -Node: CCL311389 -Node: The Lisp Reader and Compiler318141 -Node: Lstreams318354 -Node: Creating an Lstream319385 -Node: Lstream Types320612 -Node: Lstream Functions320864 -Node: Lstream Methods324430 -Node: Consoles; Devices; Frames; Windows327572 -Node: Introduction to Consoles; Devices; Frames; Windows327887 -Node: Point330420 -Node: Window Hierarchy331699 -Node: The Window Object336147 -Node: The Redisplay Mechanism339584 -Node: Critical Redisplay Sections340376 -Node: Line Start Cache341363 -Node: Redisplay Piece by Piece344599 -Node: Extents346636 -Node: Introduction to Extents347170 -Node: Extent Ordering348312 -Node: Format of the Extent Info349553 -Node: Zero-Length Extents351440 -Node: Mathematics of Extent Ordering352838 -Node: Extent Fragments357595 -Node: Faces358681 -Node: Glyphs358797 -Node: Specifiers361814 -Node: Menus361943 -Node: Subprocesses364201 -Node: Interface to X Windows366177 -Node: Index366348 +Node: Rules When Writing New C Code65391 +Node: General Coding Rules66195 +Node: Writing Lisp Primitives71915 +Node: Adding Global Lisp Variables83084 +Node: Coding for Mule86722 +Node: Character-Related Data Types87701 +Node: Working With Character and Byte Positions90698 +Node: Conversion to and from External Data94463 +Node: General Guidelines for Writing Mule-Aware Code100604 +Node: An Example of Mule-Aware Code103292 +Node: Techniques for XEmacs Developers105273 +Node: A Summary of the Various XEmacs Modules113220 +Node: Low-Level Modules114040 +Node: Basic Lisp Modules121610 +Node: Modules for Standard Editing Operations128220 +Node: Editor-Level Control Flow Modules134108 +Node: Modules for the Basic Displayable Lisp Objects137554 +Node: Modules for other Display-Related Lisp Objects140076 +Node: Modules for the Redisplay Mechanism141153 +Node: Modules for Interfacing with the File System143504 +Node: Modules for Other Aspects of the Lisp Interpreter and Object System147202 +Node: Modules for Interfacing with the Operating System152655 +Node: Modules for Interfacing with X Windows160316 +Node: Modules for Internationalization163752 +Node: Allocation of Objects in XEmacs Lisp166389 +Node: Introduction to Allocation166910 +Node: Garbage Collection170596 +Node: GCPROing171752 +Node: Garbage Collection - Step by Step178756 +Node: Invocation179148 +Node: garbage_collect_1182162 +Node: mark_object191642 +Node: gc_sweep193454 +Node: sweep_lcrecords_1198517 +Node: compact_string_chars199512 +Node: sweep_strings201692 +Node: sweep_bit_vectors_1202657 +Node: Integers and Characters203333 +Node: Allocation from Frob Blocks204085 +Node: lrecords205689 +Node: Low-level allocation217424 +Node: Cons221531 +Node: Vector222257 +Node: Bit Vector222834 +Node: Symbol223327 +Node: Marker223681 +Node: String224236 +Node: Compiled Function227849 +Node: Dumping228018 +Node: Overview230239 +Node: Data descriptions230809 +Node: Dumping phase232814 +Node: Object inventory233216 +Node: Address allocation236070 +Node: The header237457 +Node: Data dumping237965 +Node: Pointers dumping238626 +Node: Reloading phase239844 +Node: Remaining issues241605 +Node: Events and the Event Loop242566 +Node: Introduction to Events243016 +Node: Main Loop244965 +Node: Specifics of the Event Gathering Mechanism248540 +Node: Specifics About the Emacs Event260993 +Node: The Event Stream Callback Routines261248 +Node: Other Event Loop Functions261493 +Node: Converting Events262633 +Node: Dispatching Events; The Command Builder263242 +Node: Evaluation; Stack Frames; Bindings263477 +Node: Evaluation263819 +Node: Dynamic Binding; The specbinding Stack; Unwind-Protects270374 +Node: Simple Special Forms272758 +Node: Catch and Throw273541 +Node: Symbols and Variables276116 +Node: Introduction to Symbols276380 +Node: Obarrays277448 +Node: Symbol Values280981 +Node: Buffers and Textual Representation283269 +Node: Introduction to Buffers283927 +Node: The Text in a Buffer286633 +Node: Buffer Lists293783 +Node: Markers and Extents295734 +Node: Bufbytes and Emchars297999 +Node: The Buffer Object298214 +Node: MULE Character Sets and Encodings301694 +Node: Character Sets302756 +Node: Encodings306241 +Node: Japanese EUC (Extended Unix Code)307308 +Node: JIS7308140 +Node: Internal Mule Encodings309490 +Node: Internal String Encoding311320 +Node: Internal Character Encoding313465 +Node: CCL315189 +Node: The Lisp Reader and Compiler321941 +Node: Lstreams322154 +Node: Creating an Lstream323185 +Node: Lstream Types324412 +Node: Lstream Functions324664 +Node: Lstream Methods328230 +Node: Consoles; Devices; Frames; Windows331372 +Node: Introduction to Consoles; Devices; Frames; Windows331687 +Node: Point334220 +Node: Window Hierarchy335499 +Node: The Window Object339947 +Node: The Redisplay Mechanism343384 +Node: Critical Redisplay Sections344176 +Node: Line Start Cache345163 +Node: Redisplay Piece by Piece348399 +Node: Extents350436 +Node: Introduction to Extents350970 +Node: Extent Ordering352112 +Node: Format of the Extent Info353353 +Node: Zero-Length Extents355240 +Node: Mathematics of Extent Ordering356638 +Node: Extent Fragments361395 +Node: Faces362481 +Node: Glyphs362597 +Node: Specifiers365614 +Node: Menus365743 +Node: Subprocesses368001 +Node: Interface to X Windows369977 +Node: Index370148  End Tag Table diff --git a/info/internals.info-2 b/info/internals.info-2 index e8fe7d4..0dbaa54 100644 --- a/info/internals.info-2 +++ b/info/internals.info-2 @@ -410,11 +410,11 @@ representation stuffs a pointer together with a tag, as follows: A tag of 00 is used for all pointer object types, a tag of 10 is used for characters, and the other two tags 01 and 11 are joined together to -form the integer object type. This representation gives us 31 bits -integers, 30 bits characters and pointers are represented directly -without any bit masking. This representation, though, assumes that -pointers to structs are always aligned to multiples of 4, so the lower 2 -bits are always zero. +form the integer object type. This representation gives us 31 bit +integers and 30 bit characters, while pointers are represented directly +without any bit masking or shifting. This representation, though, +assumes that pointers to structs are always aligned to multiples of 4, +so the lower 2 bits are always zero. Lisp objects use the typedef `Lisp_Object', but the actual C type used for the Lisp object can vary. It can be either a simple type @@ -425,24 +425,23 @@ because it ensures that the compiler will actually use a machine word to represent the object (some compilers will use more general and less efficient code for unions and structs even if they can fit in a machine word). The union type, however, has the advantage of stricter type -checking (if you accidentally pass an integer where a Lisp object is -desired, you get a compile error), and it makes it easier to decode -Lisp objects when debugging. The choice of which type to use is +checking. If you accidentally pass an integer where a Lisp object is +desired, you get a compile error. The choice of which type to use is determined by the preprocessor constant `USE_UNION_TYPE' which is defined via the `--use-union-type' option to `configure'. - Various macros are used to construct Lisp objects and extract the -components. Macros of the form `XINT()', `XCHAR()', `XSTRING()', -`XSYMBOL()', etc. shift out the tag field if needed cast it to the -appropriate type. `XINT()' needs to be a bit tricky so that negative -numbers are properly sign-extended. Since integers are stored -left-shifted, if the right-shift operator does an arithmetic shift -(i.e. it leaves the most-significant bit as-is rather than shifting in -a zero, so that it mimics a divide-by-two even for negative numbers) -the shift to remove the tag bit is enough. This is the case on all the -systems we support. - - Note that when `ERROR_CHECK_TYPECHECK' is defined, the extractor + Various macros are used to convert between Lisp_Objects and the +corresponding C type. Macros of the form `XINT()', `XCHAR()', +`XSTRING()', `XSYMBOL()', do any required bit shifting and/or masking +and cast it to the appropriate type. `XINT()' needs to be a bit tricky +so that negative numbers are properly sign-extended. Since integers +are stored left-shifted, if the right-shift operator does an arithmetic +shift (i.e. it leaves the most-significant bit as-is rather than +shifting in a zero, so that it mimics a divide-by-two even for negative +numbers) the shift to remove the tag bit is enough. This is the case +on all the systems we support. + + Note that when `ERROR_CHECK_TYPECHECK' is defined, the converter macros become more complicated--they check the tag bits and/or the type field in the first four bytes of a record type to ensure that the object is really of the correct type. This is great for catching places @@ -454,22 +453,24 @@ unpredictable (and sometimes not easily traceable) results. These macros are of the form `XSETTYPE (LVALUE, RESULT)', i.e. they have to be a statement rather than just used in an expression. The reason for this is that standard C doesn't let you "construct" a -structure (but GCC does). Granted, this sometimes isn't too convenient; -for the case of integers, at least, you can use the function -`make_int()', which constructs and _returns_ an integer Lisp object. -Note that the `XSETTYPE()' macros are also affected by +structure (but GCC does). Granted, this sometimes isn't too +convenient; for the case of integers, at least, you can use the +function `make_int()', which constructs and _returns_ an integer Lisp +object. Note that the `XSETTYPE()' macros are also affected by `ERROR_CHECK_TYPECHECK' and make sure that the structure is of the right type in the case of record types, where the type is contained in the structure. The C programmer is responsible for *guaranteeing* that a -Lisp_Object is is the correct type before using the `XTYPE' macros. -This is especially important in the case of lists. Use `XCAR' and -`XCDR' if a Lisp_Object is certainly a cons cell, else use `Fcar()' and -`Fcdr()'. Trust other C code, but not Lisp code. On the other hand, -if XEmacs has an internal logic error, it's better to crash -immediately, so sprinkle "unreachable" `abort()'s liberally about the -source code. +Lisp_Object is the correct type before using the `XTYPE' macros. This +is especially important in the case of lists. Use `XCAR' and `XCDR' if +a Lisp_Object is certainly a cons cell, else use `Fcar()' and `Fcdr()'. +Trust other C code, but not Lisp code. On the other hand, if XEmacs +has an internal logic error, it's better to crash immediately, so +sprinkle `assert()'s and "unreachable" `abort()'s liberally about the +source code. Where performance is an issue, use `type_checking_assert', +`bufpos_checking_assert', and `gc_checking_assert', which do nothing +unless the corresponding configure error checking flag was specified.  File: internals.info, Node: Rules When Writing New C Code, Next: A Summary of the Various XEmacs Modules, Prev: How Lisp Objects Are Represented in C, Up: Top @@ -529,13 +530,13 @@ to ensure that certain tricks played by various `s/' and `m/' files work out correctly. When including header files, always use angle brackets, not double -quotes, except when the file to be included is in the same directory as -the including file. If either file is a generated file, then that is -not likely to be the case. In order to understand why we have this -rule, imagine what happens when you do a build in the source directory -using `./configure' and another build in another directory using -`../work/configure'. There will be two different `config.h' files. -Which one will be used if you `#include "config.h"'? +quotes, except when the file to be included is always in the same +directory as the including file. If either file is a generated file, +then that is not likely to be the case. In order to understand why we +have this rule, imagine what happens when you do a build in the source +directory using `./configure' and another build in another directory +using `../work/configure'. There will be two different `config.h' +files. Which one will be used if you `#include "config.h"'? *All global and static variables that are to be modifiable must be declared uninitialized.* This means that you may not use the "declare @@ -574,7 +575,7 @@ them. This awful kludge has been removed in XEmacs because The C source code makes heavy use of C preprocessor macros. One popular macro style is: - #define FOO(var, value) do { \ + #define FOO(var, value) do { \ Lisp_Object FOO_value = (value); \ ... /* compute using FOO_value */ \ (var) = bar; \ diff --git a/info/lispref.info b/info/lispref.info index 97fd42d..a936cb7 100644 --- a/info/lispref.info +++ b/info/lispref.info @@ -52,838 +52,860 @@ Foundation instead of in the original English.  Indirect: lispref.info-1: 2366 -lispref.info-2: 48386 -lispref.info-3: 96925 -lispref.info-4: 146765 -lispref.info-5: 195599 -lispref.info-6: 243286 -lispref.info-7: 291564 -lispref.info-8: 340173 -lispref.info-9: 388500 -lispref.info-10: 437952 -lispref.info-11: 486180 -lispref.info-12: 535952 -lispref.info-13: 583851 -lispref.info-14: 632074 -lispref.info-15: 680328 -lispref.info-16: 730084 -lispref.info-17: 778835 -lispref.info-18: 825740 -lispref.info-19: 873123 -lispref.info-20: 921964 -lispref.info-21: 971557 -lispref.info-22: 1018476 -lispref.info-23: 1065503 -lispref.info-24: 1114902 -lispref.info-25: 1164575 -lispref.info-26: 1214485 -lispref.info-27: 1263708 -lispref.info-28: 1312474 -lispref.info-29: 1361910 -lispref.info-30: 1403245 -lispref.info-31: 1452388 -lispref.info-32: 1501601 -lispref.info-33: 1551175 -lispref.info-34: 1599654 -lispref.info-35: 1645336 -lispref.info-36: 1687335 -lispref.info-37: 1732275 -lispref.info-38: 1781962 -lispref.info-39: 1831066 -lispref.info-40: 1880470 -lispref.info-41: 1929796 -lispref.info-42: 1978497 -lispref.info-43: 2023924 -lispref.info-44: 2062260 +lispref.info-2: 48507 +lispref.info-3: 97046 +lispref.info-4: 146886 +lispref.info-5: 195720 +lispref.info-6: 243407 +lispref.info-7: 291685 +lispref.info-8: 340294 +lispref.info-9: 388621 +lispref.info-10: 438073 +lispref.info-11: 486301 +lispref.info-12: 536073 +lispref.info-13: 583972 +lispref.info-14: 632195 +lispref.info-15: 680449 +lispref.info-16: 726641 +lispref.info-17: 775374 +lispref.info-18: 825372 +lispref.info-19: 875063 +lispref.info-20: 923904 +lispref.info-21: 972712 +lispref.info-22: 1019020 +lispref.info-23: 1068450 +lispref.info-24: 1117289 +lispref.info-25: 1162635 +lispref.info-26: 1210057 +lispref.info-27: 1255683 +lispref.info-28: 1304968 +lispref.info-29: 1352818 +lispref.info-30: 1401042 +lispref.info-31: 1450719 +lispref.info-32: 1499044 +lispref.info-33: 1548342 +lispref.info-34: 1589677 +lispref.info-35: 1635982 +lispref.info-36: 1685313 +lispref.info-37: 1733721 +lispref.info-38: 1782812 +lispref.info-39: 1832289 +lispref.info-40: 1879847 +lispref.info-41: 1924668 +lispref.info-42: 1971260 +lispref.info-43: 2019960 +lispref.info-44: 2067361 +lispref.info-45: 2116487 +lispref.info-46: 2148488  Tag Table: (Indirect) Node: Top2366 -Node: Copying48386 -Node: Introduction67544 -Node: Caveats69135 -Node: Lisp History70866 -Node: Conventions72122 -Node: Some Terms72937 -Node: nil and t73658 -Node: Evaluation Notation75335 -Node: Printing Notation76248 -Node: Error Messages77122 -Node: Buffer Text Notation77563 -Node: Format of Descriptions78438 -Node: A Sample Function Description79292 -Node: A Sample Variable Description83278 -Node: Acknowledgements84186 -Node: Lisp Data Types86164 -Node: Printed Representation88719 -Node: Comments90761 -Node: Primitive Types91658 -Node: Programming Types93317 -Node: Integer Type95269 -Node: Floating Point Type96306 -Node: Character Type96925 -Node: Symbol Type104829 -Node: Sequence Type107524 -Node: Cons Cell Type109043 -Node: Dotted Pair Notation113527 -Node: Association List Type115648 -Node: Array Type116531 -Node: String Type117997 -Node: Vector Type120678 -Node: Bit Vector Type121450 -Node: Function Type122312 -Node: Macro Type123425 -Node: Primitive Function Type124122 -Node: Compiled-Function Type125648 -Node: Autoload Type126202 -Node: Char Table Type127216 -Node: Hash Table Type127390 -Node: Range Table Type128545 -Node: Weak List Type129398 -Node: Editing Types129548 -Node: Buffer Type131175 -Node: Marker Type133202 -Node: Extent Type133926 -Node: Window Type135194 -Node: Frame Type136605 -Node: Device Type137400 -Node: Console Type138226 -Node: Window Configuration Type139427 -Node: Event Type140125 -Node: Process Type140289 -Node: Stream Type141324 -Node: Keymap Type142447 -Node: Syntax Table Type142985 -Node: Display Table Type144008 -Node: Database Type144447 -Node: Charset Type144613 -Node: Coding System Type144777 -Node: ToolTalk Message Type144961 -Node: ToolTalk Pattern Type145160 -Node: Window-System Types145332 -Node: Face Type146478 -Node: Glyph Type146609 -Node: Specifier Type146765 -Node: Font Instance Type146938 -Node: Color Instance Type147128 -Node: Image Instance Type147325 -Node: Toolbar Button Type147523 -Node: Subwindow Type147716 -Node: X Resource Type147895 -Node: Type Predicates148048 -Node: Equality Predicates157177 -Node: Numbers161982 -Node: Integer Basics163437 -Node: Float Basics165786 -Node: Predicates on Numbers167528 -Node: Comparison of Numbers169161 -Node: Numeric Conversions172982 -Node: Arithmetic Operations174448 -Node: Rounding Operations179913 -Node: Bitwise Operations181018 -Node: Math Functions190064 -Node: Random Numbers192380 -Node: Strings and Characters194146 -Node: String Basics195599 -Node: Predicates for Strings198017 -Node: Creating Strings198780 -Node: Predicates for Characters204097 -Node: Character Codes205168 -Node: Text Comparison206581 -Node: String Conversion209943 -Node: Modifying Strings213619 -Node: String Properties214260 -Node: Formatting Strings214905 -Node: Character Case224523 -Node: Case Tables227669 -Node: Char Tables231567 -Node: Char Table Types232959 -Node: Working With Char Tables234534 -Node: Lists236483 -Node: Cons Cells237606 -Node: Lists as Boxes238942 -Node: List-related Predicates241584 -Node: List Elements243286 -Node: Building Lists248315 -Node: Modifying Lists254307 -Node: Setcar255119 -Node: Setcdr257540 -Node: Rearrangement260051 -Node: Sets And Lists265637 -Node: Association Lists269865 -Ref: Association Lists-Footnote-1279156 -Node: Property Lists279361 -Node: Working With Normal Plists280909 -Node: Working With Lax Plists283177 -Node: Converting Plists To/From Alists285417 -Node: Weak Lists286765 -Node: Sequences Arrays Vectors288928 -Node: Sequence Functions291564 -Node: Arrays295223 -Node: Array Functions298287 -Node: Vectors300820 -Node: Vector Functions302318 -Node: Bit Vectors304889 -Node: Bit Vector Functions305734 -Node: Symbols307984 -Node: Symbol Components309033 -Node: Definitions313206 -Node: Creating Symbols315431 -Node: Symbol Properties322465 -Node: Plists and Alists323992 -Node: Object Plists325741 -Node: Other Plists328501 -Node: Evaluation330303 -Node: Intro Eval331108 -Ref: Intro Eval-Footnote-1334461 -Node: Eval334596 -Node: Forms339014 -Node: Self-Evaluating Forms340173 -Node: Symbol Forms341686 -Node: Classifying Lists342603 -Node: Function Indirection343359 -Node: Function Forms346470 -Node: Macro Forms347467 -Node: Special Forms349067 -Node: Autoloading351376 -Node: Quoting351874 -Node: Control Structures353235 -Node: Sequencing354855 -Node: Conditionals357720 -Node: Combining Conditions361143 -Node: Iteration364413 -Node: Nonlocal Exits366192 -Node: Catch and Throw366894 -Node: Examples of Catch370733 -Node: Errors372752 -Node: Signaling Errors374241 -Node: Processing of Errors378980 -Node: Handling Errors381259 -Node: Error Symbols388500 -Node: Cleanups392456 -Node: Variables396234 -Node: Global Variables398003 -Node: Constant Variables399079 -Node: Local Variables399705 -Node: Void Variables404642 -Node: Defining Variables408158 -Node: Accessing Variables415322 -Node: Setting Variables416747 -Node: Variable Scoping421266 -Node: Scope422865 -Node: Extent424390 -Node: Impl of Scope425869 -Node: Using Scoping427832 -Node: Buffer-Local Variables429354 -Node: Intro to Buffer-Local430190 -Node: Creating Buffer-Local432733 -Node: Default Value437952 -Node: Variable Aliases441095 -Node: Functions442880 -Node: What Is a Function443974 -Node: Lambda Expressions448020 -Node: Lambda Components448930 -Node: Simple Lambda450762 -Node: Argument List452419 -Node: Function Documentation456147 -Node: Function Names458089 -Node: Defining Functions460662 -Node: Calling Functions463702 -Node: Mapping Functions467551 -Node: Anonymous Functions470239 -Node: Function Cells473484 -Node: Inline Functions478294 -Node: Related Topics480104 -Node: Macros481157 -Node: Simple Macro482441 -Node: Expansion483176 -Node: Compiling Macros486180 -Node: Defining Macros488016 -Node: Backquote489333 -Node: Problems with Macros491730 -Node: Argument Evaluation492425 -Node: Surprising Local Vars495340 -Node: Eval During Expansion497408 -Node: Repeated Expansion499101 -Node: Customization501017 -Node: Common Keywords501486 -Node: Group Definitions504331 -Node: Variable Definitions506523 -Node: Customization Types511513 -Node: Simple Types512948 -Node: Composite Types515105 -Node: Splicing into Lists519795 -Node: Type Keywords521630 -Node: Loading525150 -Node: How Programs Do Loading526825 -Node: Autoload535952 -Node: Repeated Loading542031 -Node: Named Features544144 -Node: Unloading550576 -Node: Hooks for Loading552732 -Node: Byte Compilation553449 -Node: Speed of Byte-Code555366 -Node: Compilation Functions556573 -Node: Docs and Compilation562960 -Node: Dynamic Loading565613 -Node: Eval During Compile567977 -Node: Compiled-Function Objects569242 -Node: Disassembly574040 -Node: Debugging581294 -Node: Debugger582706 -Node: Error Debugging583851 -Node: Infinite Loops586604 -Node: Function Debugging587848 -Node: Explicit Debug590638 -Node: Using Debugger591409 -Node: Debugger Commands593271 -Node: Invoking the Debugger597588 -Node: Internals of Debugger601503 -Node: Syntax Errors606390 -Node: Excess Open607638 -Node: Excess Close609513 -Node: Compilation Errors610934 -Node: Edebug612222 -Node: Using Edebug614330 -Node: Instrumenting617027 -Node: Edebug Execution Modes620516 -Node: Jumping623626 -Node: Edebug Misc625969 -Node: Breakpoints627358 -Node: Global Break Condition630164 -Node: Embedded Breakpoints631119 -Node: Trapping Errors632074 -Node: Edebug Views634150 -Node: Edebug Eval636115 -Node: Eval List637292 -Node: Reading in Edebug640677 -Node: Printing in Edebug641476 -Node: Tracing643191 -Node: Coverage Testing645077 -Node: The Outside Context647118 -Node: Checking Whether to Stop648067 -Node: Edebug Display Update648714 -Node: Edebug Recursive Edit650737 -Node: Instrumenting Macro Calls652392 -Node: Specification List654874 -Node: Backtracking664285 -Node: Debugging Backquote666223 -Node: Specification Examples669929 -Node: Edebug Options671996 -Node: Read and Print677333 -Node: Streams Intro678310 -Node: Input Streams680328 -Node: Input Functions685229 -Node: Output Streams687289 -Node: Output Functions691340 -Node: Output Variables695640 -Node: Minibuffers700439 -Node: Intro to Minibuffers701591 -Node: Text from Minibuffer703779 -Node: Object from Minibuffer708654 -Node: Minibuffer History711881 -Node: Completion714860 -Node: Basic Completion716835 -Node: Minibuffer Completion721864 -Node: Completion Commands725441 -Node: High-Level Completion730084 -Node: Reading File Names734108 -Node: Programmed Completion737792 -Node: Yes-or-No Queries740174 -Node: Multiple Queries745911 -Node: Reading a Password749978 -Node: Minibuffer Misc751315 -Node: Command Loop756185 -Node: Command Overview757529 -Node: Defining Commands760807 -Node: Using Interactive761555 -Node: Interactive Codes766328 -Node: Interactive Examples772120 -Node: Interactive Call773434 -Node: Command Loop Info778835 -Node: Events783814 -Node: Event Types785274 -Node: Event Contents787197 -Node: Event Predicates791673 -Node: Accessing Mouse Event Positions792998 -Node: Frame-Level Event Position Info793697 -Node: Window-Level Event Position Info794737 -Node: Event Text Position Info796501 -Node: Event Glyph Position Info798993 -Node: Event Toolbar Position Info800316 -Node: Other Event Position Info800987 -Node: Accessing Other Event Info801396 -Node: Working With Events803016 -Node: Converting Events809004 -Node: Reading Input811956 -Node: Key Sequence Input812958 -Node: Reading One Event814912 -Node: Dispatching an Event817729 -Node: Quoted Character Input818180 -Node: Peeking and Discarding819528 -Node: Waiting823432 -Node: Quitting825740 -Node: Prefix Command Arguments830148 -Node: Recursive Editing835235 -Node: Disabling Commands840031 -Node: Command History842099 -Node: Keyboard Macros843836 -Node: Keymaps846053 -Node: Keymap Terminology847630 -Node: Format of Keymaps850559 -Node: Creating Keymaps850970 -Node: Inheritance and Keymaps853049 -Node: Key Sequences855421 -Node: Prefix Keys860217 -Node: Active Keymaps863802 -Node: Key Lookup873123 -Node: Functions for Key Lookup878286 -Node: Changing Key Bindings883983 -Node: Key Binding Commands890880 -Node: Scanning Keymaps892945 -Node: Other Keymap Functions901456 -Node: Menus902078 -Node: Menu Format902670 -Node: Menubar Format911316 -Node: Menubar911941 -Node: Modifying Menus915054 -Node: Menu Filters920068 -Node: Pop-Up Menus921964 -Node: Menu Accelerators924169 -Node: Creating Menu Accelerators924925 -Node: Keyboard Menu Traversal926285 -Node: Menu Accelerator Functions927012 -Node: Buffers Menu930089 -Node: Dialog Boxes931383 -Node: Dialog Box Format931550 -Node: Dialog Box Functions932975 -Node: Toolbar933372 -Node: Toolbar Intro933697 -Node: Toolbar Descriptor Format936106 -Node: Specifying the Toolbar940600 -Node: Other Toolbar Variables944205 -Node: Scrollbars948631 -Node: Drag and Drop948767 -Node: Supported Protocols949843 -Node: OffiX DND950346 -Node: CDE dt951353 -Node: MSWindows OLE951944 -Node: Loose ends952115 -Node: Drop Interface952507 -Node: Drag Interface953529 -Node: Modes953703 -Node: Major Modes954654 -Node: Major Mode Conventions957569 -Node: Example Major Modes963524 -Node: Auto Major Mode971557 -Node: Mode Help979005 -Node: Derived Modes980106 -Node: Minor Modes982297 -Node: Minor Mode Conventions983599 -Node: Keymaps and Minor Modes986462 -Node: Modeline Format987297 -Node: Modeline Data989065 -Node: Modeline Variables993335 -Node: %-Constructs998051 -Node: Hooks1000962 -Node: Documentation1007724 -Node: Documentation Basics1009147 -Node: Accessing Documentation1012197 -Node: Keys in Documentation1018476 -Node: Describing Characters1021955 -Node: Help Functions1024304 -Node: Obsoleteness1030755 -Node: Files1033749 -Node: Visiting Files1035674 -Node: Visiting Functions1037179 -Node: Subroutines of Visiting1042226 -Node: Saving Buffers1044299 -Node: Reading from Files1050392 -Node: Writing to Files1052549 -Node: File Locks1055266 -Node: Information about Files1058319 -Node: Testing Accessibility1059080 -Node: Kinds of Files1062820 -Node: Truenames1064501 -Node: File Attributes1065503 -Node: Changing File Attributes1070642 -Node: File Names1076048 -Node: File Name Components1077657 -Node: Directory Names1080758 -Node: Relative File Names1084211 -Node: File Name Expansion1085289 -Node: Unique File Names1089196 -Node: File Name Completion1090811 -Node: User Name Completion1093472 -Node: Contents of Directories1094812 -Node: Create/Delete Dirs1098125 -Node: Magic File Names1099231 -Node: Partial Files1104861 -Node: Intro to Partial Files1105089 -Node: Creating a Partial File1106329 -Node: Detached Partial Files1107264 -Node: Format Conversion1108386 -Node: Files and MS-DOS1114902 -Node: Backups and Auto-Saving1116966 -Node: Backup Files1117641 -Node: Making Backups1119038 -Node: Rename or Copy1121787 -Node: Numbered Backups1124280 -Node: Backup Names1126515 -Node: Auto-Saving1129807 -Node: Reverting1137949 -Node: Buffers1141107 -Node: Buffer Basics1142524 -Node: Current Buffer1144577 -Node: Buffer Names1149265 -Node: Buffer File Name1152470 -Node: Buffer Modification1156589 -Node: Modification Time1158782 -Node: Read Only Buffers1162157 -Node: The Buffer List1164575 -Node: Creating Buffers1169405 -Node: Killing Buffers1171551 -Node: Indirect Buffers1175282 -Node: Windows1177854 -Node: Basic Windows1179332 -Node: Splitting Windows1182430 -Node: Deleting Windows1189319 -Node: Selecting Windows1191999 -Node: Cyclic Window Ordering1195128 -Node: Buffers and Windows1199752 -Node: Displaying Buffers1201593 -Node: Choosing Window1206769 -Node: Window Point1214485 -Node: Window Start1216531 -Node: Vertical Scrolling1221021 -Node: Horizontal Scrolling1227158 -Node: Size of Window1230667 -Node: Position of Window1235385 -Node: Resizing Windows1237625 -Node: Window Configurations1243054 -Node: Frames1246479 -Node: Creating Frames1248248 -Node: Frame Properties1249589 -Node: Property Access1250405 -Node: Initial Properties1251254 -Node: X Frame Properties1253740 -Node: Size and Position1258374 -Node: Frame Name1260370 -Node: Frame Titles1261284 -Node: Deleting Frames1263108 -Node: Finding All Frames1263708 -Node: Frames and Windows1265702 -Node: Minibuffers and Frames1267407 -Node: Input Focus1268325 -Node: Visibility of Frames1271402 -Node: Raising and Lowering1273321 -Node: Frame Configurations1275697 -Node: Frame Hooks1276291 -Node: Consoles and Devices1278096 -Node: Basic Console Functions1280839 -Node: Basic Device Functions1281262 -Node: Console Types and Device Classes1281978 -Node: Connecting to a Console or Device1284175 -Node: The Selected Console and Device1286338 -Node: Console and Device I/O1287364 -Node: Positions1288128 -Node: Point1289097 -Node: Motion1292187 -Node: Character Motion1292954 -Node: Word Motion1295191 -Node: Buffer End Motion1296692 -Node: Text Lines1298189 -Node: Screen Lines1302784 -Node: List Motion1306847 -Node: Skipping Characters1310255 -Node: Excursions1312474 -Node: Narrowing1315506 -Node: Markers1320831 -Node: Overview of Markers1321737 -Node: Predicates on Markers1326429 -Node: Creating Markers1327675 -Node: Information from Markers1331712 -Node: Changing Markers1332810 -Node: The Mark1334188 -Node: The Region1342682 -Node: Text1348368 -Node: Near Point1351067 -Node: Buffer Contents1355254 -Node: Comparing Text1356660 -Node: Insertion1358068 -Node: Commands for Insertion1361910 -Node: Deletion1364866 -Node: User-Level Deletion1368461 -Node: The Kill Ring1372622 -Node: Kill Ring Concepts1374796 -Node: Kill Functions1375850 -Node: Yank Commands1377755 -Node: Low-Level Kill Ring1379626 -Node: Internals of Kill Ring1382412 -Node: Undo1385192 -Node: Maintaining Undo1389521 -Node: Filling1392141 -Node: Margins1398135 -Node: Auto Filling1402064 -Node: Sorting1403245 -Node: Columns1412545 -Node: Indentation1415061 -Node: Primitive Indent1415840 -Node: Mode-Specific Indent1417084 -Node: Region Indent1419595 -Node: Relative Indent1422543 -Node: Indent Tabs1424925 -Node: Motion by Indent1426246 -Node: Case Changes1427025 -Node: Text Properties1430276 -Node: Examining Properties1432089 -Node: Changing Properties1433956 -Node: Property Search1437547 -Node: Special Properties1442258 -Node: Saving Properties1442539 -Node: Substitution1445681 -Node: Registers1448951 -Node: Transposition1451494 -Node: Change Hooks1452388 -Node: Transformations1454428 -Node: Searching and Matching1458813 -Node: String Search1459944 -Node: Regular Expressions1464668 -Node: Syntax of Regexps1466035 -Node: Regexp Example1480414 -Node: Regexp Search1482584 -Node: POSIX Regexps1488672 -Node: Search and Replace1490507 -Node: Match Data1493872 -Node: Simple Match Data1495002 -Node: Replacing Match1499267 -Node: Entire Match Data1501601 -Node: Saving Match Data1503592 -Node: Searching and Case1504973 -Node: Standard Regexps1507007 -Node: Syntax Tables1509205 -Node: Syntax Basics1510319 -Node: Syntax Descriptors1513291 -Node: Syntax Class Table1515141 -Node: Syntax Flags1521179 -Node: Syntax Table Functions1524396 -Node: Motion and Syntax1528260 -Node: Parsing Expressions1529712 -Node: Standard Syntax Tables1535781 -Node: Syntax Table Internals1536625 -Node: Abbrevs1537651 -Node: Abbrev Mode1539454 -Node: Abbrev Tables1540174 -Node: Defining Abbrevs1541707 -Node: Abbrev Files1543612 -Node: Abbrev Expansion1545385 -Node: Standard Abbrev Tables1550016 -Node: Extents1551175 -Node: Intro to Extents1552418 -Node: Creating and Modifying Extents1556412 -Node: Extent Endpoints1557919 -Node: Finding Extents1561182 -Node: Mapping Over Extents1564930 -Node: Extent Properties1571047 -Node: Detached Extents1581191 -Node: Extent Parents1583050 -Node: Duplicable Extents1584744 -Node: Extents and Events1587965 -Node: Atomic Extents1589872 -Node: Specifiers1590319 -Node: Introduction to Specifiers1592432 -Node: Specifiers In-Depth1594742 -Node: Specifier Instancing1599654 -Node: Specifier Types1602916 -Node: Adding Specifications1607990 -Node: Retrieving Specifications1617352 -Node: Specifier Tag Functions1621087 -Node: Specifier Instancing Functions1624321 -Node: Specifier Example1627728 -Node: Creating Specifiers1630884 -Node: Specifier Validation Functions1633133 -Node: Other Specification Functions1635517 -Node: Faces and Window-System Objects1639336 -Node: Faces1639660 -Node: Merging Faces1641277 -Node: Basic Face Functions1643238 -Node: Face Properties1645336 -Node: Face Convenience Functions1655578 -Node: Other Face Display Functions1658708 -Node: Fonts1659521 -Node: Font Specifiers1660222 -Node: Font Instances1660463 -Node: Font Instance Names1661430 -Node: Font Instance Size1662271 -Node: Font Instance Characteristics1663557 -Node: Font Convenience Functions1664726 -Node: Colors1666016 -Node: Color Specifiers1666456 -Node: Color Instances1666683 -Node: Color Instance Properties1667427 -Node: Color Convenience Functions1668053 -Node: Glyphs1669106 -Node: Glyph Functions1670698 -Node: Creating Glyphs1671105 -Node: Glyph Properties1672692 -Node: Glyph Convenience Functions1681859 -Node: Glyph Dimensions1685806 -Node: Images1686886 -Node: Image Specifiers1687335 -Node: Image Instantiator Conversion1698756 -Node: Image Instances1700121 -Node: Image Instance Types1700872 -Node: Image Instance Functions1703527 -Node: Glyph Types1708096 -Node: Mouse Pointer1709868 -Node: Redisplay Glyphs1712871 -Node: Subwindows1713904 -Node: Annotations1714147 -Node: Annotation Basics1715163 -Node: Annotation Primitives1719101 -Node: Annotation Properties1720430 -Node: Locating Annotations1723470 -Node: Margin Primitives1724307 -Node: Annotation Hooks1726201 -Node: Display1726861 -Node: Refresh Screen1727839 -Node: Truncation1729750 -Node: The Echo Area1732275 -Node: Warnings1738710 -Node: Invisible Text1743146 -Node: Selective Display1745725 -Node: Overlay Arrow1749851 -Node: Temporary Displays1751204 -Node: Blinking1755325 -Node: Usual Display1757510 -Node: Display Tables1760059 -Node: Display Table Format1760863 -Node: Active Display Table1762305 -Node: Character Descriptors1763497 -Node: Beeping1764254 -Node: Hash Tables1769020 -Node: Introduction to Hash Tables1769628 -Node: Working With Hash Tables1775651 -Node: Weak Hash Tables1776768 -Node: Range Tables1778567 -Node: Introduction to Range Tables1779256 -Node: Working With Range Tables1779687 -Node: Databases1780572 -Node: Connecting to a Database1780871 -Node: Working With a Database1781962 -Node: Other Database Functions1782820 -Node: Processes1783394 -Node: Subprocess Creation1785618 -Node: Synchronous Processes1788907 -Node: MS-DOS Subprocesses1795625 -Node: Asynchronous Processes1796699 -Node: Deleting Processes1800412 -Node: Process Information1802283 -Node: Input to Processes1806209 -Node: Signals to Processes1808499 -Node: Output from Processes1812919 -Node: Process Buffers1813731 -Node: Filter Functions1816598 -Node: Accepting Output1822168 -Node: Sentinels1823695 -Node: Process Window Size1827185 -Node: Transaction Queues1827534 -Node: Network1829232 -Node: System Interface1831066 -Node: Starting Up1832336 -Node: Start-up Summary1832930 -Node: Init File1836484 -Node: Terminal-Specific1838865 -Node: Command Line Arguments1842024 -Node: Getting Out1845513 -Node: Killing XEmacs1846082 -Node: Suspending XEmacs1847751 -Node: System Environment1851093 -Node: User Identification1857760 -Node: Time of Day1861289 -Node: Time Conversion1864076 -Node: Timers1869116 -Node: Terminal Input1871289 -Node: Input Modes1871792 -Node: Translating Input1874205 -Node: Recording Input1878370 -Node: Terminal Output1880470 -Node: Flow Control1884093 -Node: Batch Mode1887885 -Node: X-Windows1889267 -Node: X Selections1890138 -Node: X Server1892348 -Node: Resources1892799 -Node: Server Data1898108 -Node: Grabs1899315 -Node: X Miscellaneous1900895 -Node: ToolTalk Support1903280 -Node: XEmacs ToolTalk API Summary1903497 -Node: Sending Messages1904797 -Node: Example of Sending Messages1905048 -Node: Elisp Interface for Sending Messages1906110 -Node: Receiving Messages1912502 -Node: Example of Receiving Messages1912725 -Node: Elisp Interface for Receiving Messages1913561 -Node: LDAP Support1917386 -Node: Building XEmacs with LDAP support1917882 -Node: XEmacs LDAP API1918860 -Node: LDAP Variables1919590 -Node: The High-Level LDAP API1922066 -Node: The Low-Level LDAP API1923171 -Node: The LDAP Lisp Object1923445 -Node: Opening and Closing a LDAP Connection1923998 -Node: Searching on a LDAP Server (Low-level)1925781 -Node: Syntax of Search Filters1927174 -Node: Internationalization1928472 -Node: I18N Levels 1 and 21928809 -Node: I18N Level 31929515 -Node: Level 3 Basics1929796 -Node: Level 3 Primitives1930629 -Node: Dynamic Messaging1932235 -Node: Domain Specification1932698 -Node: Documentation String Extraction1934601 -Node: I18N Level 41935519 -Node: MULE1935711 -Node: Internationalization Terminology1936822 -Node: Charsets1945356 -Node: Charset Properties1946052 -Node: Basic Charset Functions1950738 -Node: Charset Property Functions1952919 -Node: Predefined Charsets1954961 -Node: MULE Characters1957881 -Node: Composite Characters1958728 -Node: ISO 20221959982 -Node: Coding Systems1966124 -Node: Coding System Types1968045 -Node: EOL Conversion1969864 -Node: Coding System Properties1971047 -Node: Basic Coding System Functions1974899 -Node: Coding System Property Functions1976803 -Node: Encoding and Decoding Text1977361 -Node: Detection of Textual Encoding1978497 -Node: Big5 and Shift-JIS Functions1980033 -Node: CCL1981121 -Node: CCL Syntax1984225 -Node: CCL Statements1985813 -Node: CCL Expressions1990461 -Node: Calling CCL1993000 -Node: CCL Examples1995989 -Node: Category Tables1996126 -Node: Tips1998484 -Node: Style Tips1999125 -Node: Compilation Tips2008644 -Node: Documentation Tips2010558 -Node: Comment Tips2016067 -Node: Library Headers2019069 -Node: Building XEmacs and Object Allocation2023041 -Node: Building XEmacs2023924 -Node: Pure Storage2030259 -Node: Garbage Collection2033047 -Node: Standard Errors2044186 -Node: Standard Buffer-Local Variables2048395 -Node: Standard Keymaps2051028 -Node: Standard Hooks2054760 -Node: Index2062260 +Node: Copying48507 +Node: Introduction67665 +Node: Caveats69256 +Node: Lisp History70987 +Node: Conventions72243 +Node: Some Terms73058 +Node: nil and t73779 +Node: Evaluation Notation75456 +Node: Printing Notation76369 +Node: Error Messages77243 +Node: Buffer Text Notation77684 +Node: Format of Descriptions78559 +Node: A Sample Function Description79413 +Node: A Sample Variable Description83399 +Node: Acknowledgements84307 +Node: Lisp Data Types86285 +Node: Printed Representation88840 +Node: Comments90882 +Node: Primitive Types91779 +Node: Programming Types93438 +Node: Integer Type95390 +Node: Floating Point Type96427 +Node: Character Type97046 +Node: Symbol Type104950 +Node: Sequence Type107645 +Node: Cons Cell Type109164 +Node: Dotted Pair Notation113648 +Node: Association List Type115769 +Node: Array Type116652 +Node: String Type118118 +Node: Vector Type120799 +Node: Bit Vector Type121571 +Node: Function Type122433 +Node: Macro Type123546 +Node: Primitive Function Type124243 +Node: Compiled-Function Type125769 +Node: Autoload Type126323 +Node: Char Table Type127337 +Node: Hash Table Type127511 +Node: Range Table Type128666 +Node: Weak List Type129519 +Node: Editing Types129669 +Node: Buffer Type131296 +Node: Marker Type133323 +Node: Extent Type134047 +Node: Window Type135315 +Node: Frame Type136726 +Node: Device Type137521 +Node: Console Type138347 +Node: Window Configuration Type139548 +Node: Event Type140246 +Node: Process Type140410 +Node: Stream Type141445 +Node: Keymap Type142568 +Node: Syntax Table Type143106 +Node: Display Table Type144129 +Node: Database Type144568 +Node: Charset Type144734 +Node: Coding System Type144898 +Node: ToolTalk Message Type145082 +Node: ToolTalk Pattern Type145281 +Node: Window-System Types145453 +Node: Face Type146599 +Node: Glyph Type146730 +Node: Specifier Type146886 +Node: Font Instance Type147059 +Node: Color Instance Type147249 +Node: Image Instance Type147446 +Node: Toolbar Button Type147644 +Node: Subwindow Type147837 +Node: X Resource Type148016 +Node: Type Predicates148169 +Node: Equality Predicates157298 +Node: Numbers162103 +Node: Integer Basics163558 +Node: Float Basics165907 +Node: Predicates on Numbers167649 +Node: Comparison of Numbers169282 +Node: Numeric Conversions173103 +Node: Arithmetic Operations174569 +Node: Rounding Operations180034 +Node: Bitwise Operations181139 +Node: Math Functions190185 +Node: Random Numbers192501 +Node: Strings and Characters194267 +Node: String Basics195720 +Node: Predicates for Strings198138 +Node: Creating Strings198901 +Node: Predicates for Characters204218 +Node: Character Codes205289 +Node: Text Comparison206702 +Node: String Conversion210064 +Node: Modifying Strings213740 +Node: String Properties214381 +Node: Formatting Strings215026 +Node: Character Case224644 +Node: Case Tables227790 +Node: Char Tables231688 +Node: Char Table Types233080 +Node: Working With Char Tables234655 +Node: Lists236604 +Node: Cons Cells237727 +Node: Lists as Boxes239063 +Node: List-related Predicates241705 +Node: List Elements243407 +Node: Building Lists248436 +Node: Modifying Lists254428 +Node: Setcar255240 +Node: Setcdr257661 +Node: Rearrangement260172 +Node: Sets And Lists265758 +Node: Association Lists269986 +Ref: Association Lists-Footnote-1279277 +Node: Property Lists279482 +Node: Working With Normal Plists281030 +Node: Working With Lax Plists283298 +Node: Converting Plists To/From Alists285538 +Node: Weak Lists286886 +Node: Sequences Arrays Vectors289049 +Node: Sequence Functions291685 +Node: Arrays295344 +Node: Array Functions298408 +Node: Vectors300941 +Node: Vector Functions302439 +Node: Bit Vectors305010 +Node: Bit Vector Functions305855 +Node: Symbols308105 +Node: Symbol Components309154 +Node: Definitions313327 +Node: Creating Symbols315552 +Node: Symbol Properties322586 +Node: Plists and Alists324113 +Node: Object Plists325862 +Node: Other Plists328622 +Node: Evaluation330424 +Node: Intro Eval331229 +Ref: Intro Eval-Footnote-1334582 +Node: Eval334717 +Node: Forms339135 +Node: Self-Evaluating Forms340294 +Node: Symbol Forms341807 +Node: Classifying Lists342724 +Node: Function Indirection343480 +Node: Function Forms346591 +Node: Macro Forms347588 +Node: Special Forms349188 +Node: Autoloading351497 +Node: Quoting351995 +Node: Control Structures353356 +Node: Sequencing354976 +Node: Conditionals357841 +Node: Combining Conditions361264 +Node: Iteration364534 +Node: Nonlocal Exits366313 +Node: Catch and Throw367015 +Node: Examples of Catch370854 +Node: Errors372873 +Node: Signaling Errors374362 +Node: Processing of Errors379101 +Node: Handling Errors381380 +Node: Error Symbols388621 +Node: Cleanups392577 +Node: Variables396355 +Node: Global Variables398124 +Node: Constant Variables399200 +Node: Local Variables399826 +Node: Void Variables404763 +Node: Defining Variables408279 +Node: Accessing Variables415443 +Node: Setting Variables416868 +Node: Variable Scoping421387 +Node: Scope422986 +Node: Extent424511 +Node: Impl of Scope425990 +Node: Using Scoping427953 +Node: Buffer-Local Variables429475 +Node: Intro to Buffer-Local430311 +Node: Creating Buffer-Local432854 +Node: Default Value438073 +Node: Variable Aliases441216 +Node: Functions443001 +Node: What Is a Function444095 +Node: Lambda Expressions448141 +Node: Lambda Components449051 +Node: Simple Lambda450883 +Node: Argument List452540 +Node: Function Documentation456268 +Node: Function Names458210 +Node: Defining Functions460783 +Node: Calling Functions463823 +Node: Mapping Functions467672 +Node: Anonymous Functions470360 +Node: Function Cells473605 +Node: Inline Functions478415 +Node: Related Topics480225 +Node: Macros481278 +Node: Simple Macro482562 +Node: Expansion483297 +Node: Compiling Macros486301 +Node: Defining Macros488137 +Node: Backquote489454 +Node: Problems with Macros491851 +Node: Argument Evaluation492546 +Node: Surprising Local Vars495461 +Node: Eval During Expansion497529 +Node: Repeated Expansion499222 +Node: Customization501138 +Node: Common Keywords501607 +Node: Group Definitions504452 +Node: Variable Definitions506644 +Node: Customization Types511634 +Node: Simple Types513069 +Node: Composite Types515226 +Node: Splicing into Lists519916 +Node: Type Keywords521751 +Node: Loading525271 +Node: How Programs Do Loading526946 +Node: Autoload536073 +Node: Repeated Loading542152 +Node: Named Features544265 +Node: Unloading550697 +Node: Hooks for Loading552853 +Node: Byte Compilation553570 +Node: Speed of Byte-Code555487 +Node: Compilation Functions556694 +Node: Docs and Compilation563081 +Node: Dynamic Loading565734 +Node: Eval During Compile568098 +Node: Compiled-Function Objects569363 +Node: Disassembly574161 +Node: Debugging581415 +Node: Debugger582827 +Node: Error Debugging583972 +Node: Infinite Loops586725 +Node: Function Debugging587969 +Node: Explicit Debug590759 +Node: Using Debugger591530 +Node: Debugger Commands593392 +Node: Invoking the Debugger597709 +Node: Internals of Debugger601624 +Node: Syntax Errors606511 +Node: Excess Open607759 +Node: Excess Close609634 +Node: Compilation Errors611055 +Node: Edebug612343 +Node: Using Edebug614451 +Node: Instrumenting617148 +Node: Edebug Execution Modes620637 +Node: Jumping623747 +Node: Edebug Misc626090 +Node: Breakpoints627479 +Node: Global Break Condition630285 +Node: Embedded Breakpoints631240 +Node: Trapping Errors632195 +Node: Edebug Views634271 +Node: Edebug Eval636236 +Node: Eval List637413 +Node: Reading in Edebug640798 +Node: Printing in Edebug641597 +Node: Tracing643312 +Node: Coverage Testing645198 +Node: The Outside Context647239 +Node: Checking Whether to Stop648188 +Node: Edebug Display Update648835 +Node: Edebug Recursive Edit650858 +Node: Instrumenting Macro Calls652513 +Node: Specification List654995 +Node: Backtracking664406 +Node: Debugging Backquote666344 +Node: Specification Examples670050 +Node: Edebug Options672117 +Node: Read and Print677454 +Node: Streams Intro678431 +Node: Input Streams680449 +Node: Input Functions685350 +Node: Output Streams687410 +Node: Output Functions691461 +Node: Output Variables695761 +Node: Minibuffers700560 +Node: Intro to Minibuffers701712 +Node: Text from Minibuffer703900 +Node: Object from Minibuffer708986 +Node: Minibuffer History713081 +Node: Completion716060 +Node: Basic Completion718035 +Node: Minibuffer Completion723064 +Node: Completion Commands726641 +Node: High-Level Completion731298 +Node: Reading File Names736040 +Node: Programmed Completion739732 +Node: Yes-or-No Queries742114 +Node: Multiple Queries747851 +Node: Reading a Password751918 +Node: Minibuffer Misc753255 +Node: Command Loop758125 +Node: Command Overview759469 +Node: Defining Commands762747 +Node: Using Interactive763495 +Node: Interactive Codes768268 +Node: Interactive Examples774060 +Node: Interactive Call775374 +Node: Command Loop Info780775 +Node: Events785754 +Node: Event Types787214 +Node: Event Contents789137 +Node: Event Predicates793613 +Node: Accessing Mouse Event Positions794938 +Node: Frame-Level Event Position Info795637 +Node: Window-Level Event Position Info796677 +Node: Event Text Position Info798441 +Node: Event Glyph Position Info800933 +Node: Event Toolbar Position Info802256 +Node: Other Event Position Info802927 +Node: Accessing Other Event Info803336 +Node: Working With Events804956 +Node: Converting Events810944 +Node: Reading Input813896 +Node: Key Sequence Input814898 +Node: Reading One Event816852 +Node: Dispatching an Event819669 +Node: Quoted Character Input820120 +Node: Peeking and Discarding821468 +Node: Waiting825372 +Node: Quitting827680 +Node: Prefix Command Arguments832088 +Node: Recursive Editing837175 +Node: Disabling Commands841971 +Node: Command History844039 +Node: Keyboard Macros845776 +Node: Keymaps847993 +Node: Keymap Terminology849570 +Node: Format of Keymaps852499 +Node: Creating Keymaps852910 +Node: Inheritance and Keymaps854989 +Node: Key Sequences857361 +Node: Prefix Keys862157 +Node: Active Keymaps865742 +Node: Key Lookup875063 +Node: Functions for Key Lookup880226 +Node: Changing Key Bindings885923 +Node: Key Binding Commands892820 +Node: Scanning Keymaps894885 +Node: Other Keymap Functions903396 +Node: Menus904018 +Node: Menu Format904610 +Node: Menubar Format913256 +Node: Menubar913881 +Node: Modifying Menus916994 +Node: Menu Filters922008 +Node: Pop-Up Menus923904 +Node: Menu Accelerators926109 +Node: Creating Menu Accelerators926865 +Node: Keyboard Menu Traversal928225 +Node: Menu Accelerator Functions928952 +Node: Buffers Menu932029 +Node: Dialog Boxes933323 +Node: Dialog Box Format933490 +Node: Dialog Box Functions934915 +Node: Toolbar935312 +Node: Toolbar Intro935633 +Node: Toolbar Descriptor Format938042 +Node: Specifying the Toolbar942536 +Node: Other Toolbar Variables946141 +Node: Gutter950567 +Node: Gutter Intro951043 +Node: Gutter Descriptor Format953040 +Node: Specifying a Gutter957494 +Node: Other Gutter Variables961027 +Node: Common Gutter Widgets965412 +Node: Buffer Tabs966404 +Node: Progress Bars966545 +Node: Scrollbars966690 +Node: Drag and Drop966825 +Node: Supported Protocols967901 +Node: OffiX DND968404 +Node: CDE dt969411 +Node: MSWindows OLE970002 +Node: Loose ends970173 +Node: Drop Interface970565 +Node: Drag Interface971587 +Node: Modes971761 +Node: Major Modes972712 +Node: Major Mode Conventions975627 +Node: Example Major Modes981582 +Node: Auto Major Mode989615 +Node: Mode Help997063 +Node: Derived Modes998164 +Node: Minor Modes1000355 +Node: Minor Mode Conventions1001657 +Node: Keymaps and Minor Modes1004520 +Node: Modeline Format1005355 +Node: Modeline Data1007123 +Node: Modeline Variables1011393 +Node: %-Constructs1016109 +Node: Hooks1019020 +Node: Documentation1025782 +Node: Documentation Basics1027205 +Node: Accessing Documentation1030255 +Node: Keys in Documentation1036534 +Node: Describing Characters1040013 +Node: Help Functions1042362 +Node: Obsoleteness1048813 +Node: Files1051807 +Node: Visiting Files1053732 +Node: Visiting Functions1055237 +Node: Subroutines of Visiting1060284 +Node: Saving Buffers1062357 +Node: Reading from Files1068450 +Node: Writing to Files1070607 +Node: File Locks1073324 +Node: Information about Files1076377 +Node: Testing Accessibility1077138 +Node: Kinds of Files1080878 +Node: Truenames1082559 +Node: File Attributes1083561 +Node: Changing File Attributes1088700 +Node: File Names1094106 +Node: File Name Components1095715 +Node: Directory Names1098816 +Node: Relative File Names1102269 +Node: File Name Expansion1103347 +Node: Unique File Names1107254 +Node: File Name Completion1108869 +Node: User Name Completion1111530 +Node: Contents of Directories1112870 +Node: Create/Delete Dirs1116183 +Node: Magic File Names1117289 +Node: Partial Files1122919 +Node: Intro to Partial Files1123147 +Node: Creating a Partial File1124387 +Node: Detached Partial Files1125322 +Node: Format Conversion1126444 +Node: Files and MS-DOS1132960 +Node: Backups and Auto-Saving1135024 +Node: Backup Files1135699 +Node: Making Backups1137096 +Node: Rename or Copy1139845 +Node: Numbered Backups1142338 +Node: Backup Names1144573 +Node: Auto-Saving1147865 +Node: Reverting1156007 +Node: Buffers1159165 +Node: Buffer Basics1160582 +Node: Current Buffer1162635 +Node: Buffer Names1167323 +Node: Buffer File Name1170528 +Node: Buffer Modification1174647 +Node: Modification Time1176840 +Node: Read Only Buffers1180215 +Node: The Buffer List1182633 +Node: Creating Buffers1187463 +Node: Killing Buffers1189609 +Node: Indirect Buffers1193340 +Node: Windows1195912 +Node: Basic Windows1197390 +Node: Splitting Windows1200488 +Node: Deleting Windows1207377 +Node: Selecting Windows1210057 +Node: Cyclic Window Ordering1213186 +Node: Buffers and Windows1217810 +Node: Displaying Buffers1219651 +Node: Choosing Window1224827 +Node: Window Point1232543 +Node: Window Start1234589 +Node: Vertical Scrolling1239079 +Node: Horizontal Scrolling1245216 +Node: Size of Window1248725 +Node: Position of Window1253443 +Node: Resizing Windows1255683 +Node: Window Configurations1261112 +Node: Frames1264537 +Node: Creating Frames1266878 +Node: Frame Properties1268219 +Node: Property Access1269035 +Node: Initial Properties1269884 +Node: X Frame Properties1272370 +Node: Size and Position1277004 +Node: Frame Name1279000 +Node: Frame Titles1279914 +Node: Deleting Frames1281738 +Node: Finding All Frames1282338 +Node: Frames and Windows1284332 +Node: Minibuffers and Frames1286037 +Node: Input Focus1286955 +Node: Visibility of Frames1290032 +Node: Raising and Lowering1291951 +Node: Frame Configurations1294327 +Node: Frame Hooks1294921 +Node: Consoles and Devices1296726 +Node: Basic Console Functions1299469 +Node: Basic Device Functions1299892 +Node: Console Types and Device Classes1300608 +Node: Connecting to a Console or Device1302805 +Node: The Selected Console and Device1304968 +Node: Console and Device I/O1305994 +Node: Positions1306758 +Node: Point1307727 +Node: Motion1310817 +Node: Character Motion1311584 +Node: Word Motion1313821 +Node: Buffer End Motion1315322 +Node: Text Lines1316819 +Node: Screen Lines1321414 +Node: List Motion1325477 +Node: Skipping Characters1328885 +Node: Excursions1331104 +Node: Narrowing1334136 +Node: Markers1339461 +Node: Overview of Markers1340367 +Node: Predicates on Markers1345059 +Node: Creating Markers1346305 +Node: Information from Markers1350342 +Node: Changing Markers1351440 +Node: The Mark1352818 +Node: The Region1361312 +Node: Text1366998 +Node: Near Point1369697 +Node: Buffer Contents1373884 +Node: Comparing Text1375290 +Node: Insertion1376698 +Node: Commands for Insertion1380540 +Node: Deletion1383496 +Node: User-Level Deletion1387091 +Node: The Kill Ring1391252 +Node: Kill Ring Concepts1393426 +Node: Kill Functions1394480 +Node: Yank Commands1396385 +Node: Low-Level Kill Ring1398256 +Node: Internals of Kill Ring1401042 +Node: Undo1403822 +Node: Maintaining Undo1408151 +Node: Filling1410771 +Node: Margins1416765 +Node: Auto Filling1420694 +Node: Sorting1421875 +Node: Columns1431175 +Node: Indentation1433691 +Node: Primitive Indent1434470 +Node: Mode-Specific Indent1435714 +Node: Region Indent1438225 +Node: Relative Indent1441173 +Node: Indent Tabs1443555 +Node: Motion by Indent1444876 +Node: Case Changes1445655 +Node: Text Properties1448906 +Node: Examining Properties1450719 +Node: Changing Properties1452586 +Node: Property Search1456177 +Node: Special Properties1460888 +Node: Saving Properties1461169 +Node: Substitution1464311 +Node: Registers1467581 +Node: Transposition1470124 +Node: Change Hooks1471018 +Node: Transformations1473058 +Node: Searching and Matching1477443 +Node: String Search1478574 +Node: Regular Expressions1483298 +Node: Syntax of Regexps1484665 +Node: Regexp Example1499044 +Node: Regexp Search1501214 +Node: POSIX Regexps1507302 +Node: Search and Replace1509137 +Node: Match Data1512502 +Node: Simple Match Data1513632 +Node: Replacing Match1517897 +Node: Entire Match Data1520231 +Node: Saving Match Data1522222 +Node: Searching and Case1523603 +Node: Standard Regexps1525637 +Node: Syntax Tables1527835 +Node: Syntax Basics1528949 +Node: Syntax Descriptors1531921 +Node: Syntax Class Table1533771 +Node: Syntax Flags1539809 +Node: Syntax Table Functions1543026 +Node: Motion and Syntax1546890 +Node: Parsing Expressions1548342 +Node: Standard Syntax Tables1554411 +Node: Syntax Table Internals1555255 +Node: Abbrevs1556281 +Node: Abbrev Mode1558084 +Node: Abbrev Tables1558804 +Node: Defining Abbrevs1560337 +Node: Abbrev Files1562242 +Node: Abbrev Expansion1564015 +Node: Standard Abbrev Tables1568646 +Node: Extents1569805 +Node: Intro to Extents1571048 +Node: Creating and Modifying Extents1575042 +Node: Extent Endpoints1576549 +Node: Finding Extents1579812 +Node: Mapping Over Extents1583560 +Node: Extent Properties1589677 +Node: Detached Extents1599821 +Node: Extent Parents1601680 +Node: Duplicable Extents1603374 +Node: Extents and Events1606595 +Node: Atomic Extents1608502 +Node: Specifiers1608949 +Node: Introduction to Specifiers1611062 +Node: Specifiers In-Depth1613372 +Node: Specifier Instancing1618284 +Node: Specifier Types1621546 +Node: Adding Specifications1626620 +Node: Retrieving Specifications1635982 +Node: Specifier Tag Functions1639717 +Node: Specifier Instancing Functions1642951 +Node: Specifier Example1646358 +Node: Creating Specifiers1649514 +Node: Specifier Validation Functions1651763 +Node: Other Specification Functions1654147 +Node: Faces and Window-System Objects1657966 +Node: Faces1658290 +Node: Merging Faces1659907 +Node: Basic Face Functions1661868 +Node: Face Properties1663966 +Node: Face Convenience Functions1674208 +Node: Other Face Display Functions1677338 +Node: Fonts1678151 +Node: Font Specifiers1678852 +Node: Font Instances1679093 +Node: Font Instance Names1680060 +Node: Font Instance Size1680901 +Node: Font Instance Characteristics1682187 +Node: Font Convenience Functions1683356 +Node: Colors1684646 +Node: Color Specifiers1685086 +Node: Color Instances1685313 +Node: Color Instance Properties1686057 +Node: Color Convenience Functions1686683 +Node: Glyphs1687736 +Node: Glyph Functions1689328 +Node: Creating Glyphs1689735 +Node: Glyph Properties1691322 +Node: Glyph Convenience Functions1700489 +Node: Glyph Dimensions1704436 +Node: Images1705516 +Node: Image Specifiers1705965 +Node: Image Instantiator Conversion1717314 +Node: Image Instances1718679 +Node: Image Instance Types1719430 +Node: Image Instance Functions1722085 +Node: Glyph Types1726654 +Node: Mouse Pointer1728426 +Node: Redisplay Glyphs1731429 +Node: Subwindows1732462 +Node: Annotations1732705 +Node: Annotation Basics1733721 +Node: Annotation Primitives1737659 +Node: Annotation Properties1738988 +Node: Locating Annotations1742028 +Node: Margin Primitives1742865 +Node: Annotation Hooks1744759 +Node: Display1745419 +Node: Refresh Screen1746397 +Node: Truncation1748308 +Node: The Echo Area1750833 +Node: Warnings1757268 +Node: Invisible Text1761704 +Node: Selective Display1764283 +Node: Overlay Arrow1768409 +Node: Temporary Displays1769762 +Node: Blinking1773883 +Node: Usual Display1776068 +Node: Display Tables1778617 +Node: Display Table Format1779421 +Node: Active Display Table1780863 +Node: Character Descriptors1782055 +Node: Beeping1782812 +Node: Hash Tables1787578 +Node: Introduction to Hash Tables1788186 +Node: Working With Hash Tables1794209 +Node: Weak Hash Tables1795326 +Node: Range Tables1797125 +Node: Introduction to Range Tables1797814 +Node: Working With Range Tables1798245 +Node: Databases1799130 +Node: Connecting to a Database1799429 +Node: Working With a Database1800520 +Node: Other Database Functions1801378 +Node: Processes1801952 +Node: Subprocess Creation1804176 +Node: Synchronous Processes1807465 +Node: MS-DOS Subprocesses1814183 +Node: Asynchronous Processes1815257 +Node: Deleting Processes1818970 +Node: Process Information1820841 +Node: Input to Processes1824767 +Node: Signals to Processes1827057 +Node: Output from Processes1831477 +Node: Process Buffers1832289 +Node: Filter Functions1835156 +Node: Accepting Output1840726 +Node: Sentinels1842253 +Node: Process Window Size1845743 +Node: Transaction Queues1846092 +Node: Network1847790 +Node: System Interface1849624 +Node: Starting Up1850894 +Node: Start-up Summary1851488 +Node: Init File1855042 +Node: Terminal-Specific1857423 +Node: Command Line Arguments1860582 +Node: Getting Out1864071 +Node: Killing XEmacs1864640 +Node: Suspending XEmacs1866309 +Node: System Environment1869651 +Node: User Identification1876318 +Node: Time of Day1879847 +Node: Time Conversion1882634 +Node: Timers1887674 +Node: Terminal Input1889847 +Node: Input Modes1890350 +Node: Translating Input1892763 +Node: Recording Input1896928 +Node: Terminal Output1899028 +Node: Flow Control1902651 +Node: Batch Mode1906443 +Node: X-Windows1907825 +Node: X Selections1908696 +Node: X Server1910906 +Node: Resources1911357 +Node: Server Data1916666 +Node: Grabs1917873 +Node: X Miscellaneous1919453 +Node: ToolTalk Support1921838 +Node: XEmacs ToolTalk API Summary1922055 +Node: Sending Messages1923355 +Node: Example of Sending Messages1923606 +Node: Elisp Interface for Sending Messages1924668 +Node: Receiving Messages1931060 +Node: Example of Receiving Messages1931283 +Node: Elisp Interface for Receiving Messages1932119 +Node: LDAP Support1935944 +Node: Building XEmacs with LDAP support1936438 +Node: XEmacs LDAP API1937416 +Node: LDAP Variables1938146 +Node: The High-Level LDAP API1940622 +Node: The Low-Level LDAP API1941727 +Node: The LDAP Lisp Object1942001 +Node: Opening and Closing a LDAP Connection1942554 +Node: Searching on a LDAP Server (Low-level)1944337 +Node: Syntax of Search Filters1945730 +Node: PostgreSQL Support1947028 +Node: Building XEmacs with PostgreSQL support1947423 +Node: XEmacs PostgreSQL libpq API1948690 +Node: libpq Lisp Variables1950565 +Node: libpq Lisp Symbols and DataTypes1953529 +Node: Synchronous Interface Functions1966769 +Node: Asynchronous Interface Functions1971260 +Node: Large Object Support1974761 +Node: Other libpq Functions1975388 +Node: Unimplemented libpq Functions1978423 +Node: XEmacs PostgreSQL libpq Examples1983742 +Node: Internationalization1989833 +Node: I18N Levels 1 and 21990176 +Node: I18N Level 31990882 +Node: Level 3 Basics1991163 +Node: Level 3 Primitives1991996 +Node: Dynamic Messaging1993602 +Node: Domain Specification1994065 +Node: Documentation String Extraction1995968 +Node: I18N Level 41996886 +Node: MULE1997078 +Node: Internationalization Terminology1998127 +Node: Charsets2010326 +Node: Charset Properties2011022 +Node: Basic Charset Functions2015737 +Node: Charset Property Functions2017918 +Node: Predefined Charsets2019960 +Node: MULE Characters2022880 +Node: Composite Characters2023727 +Node: Coding Systems2024987 +Node: Coding System Types2027127 +Node: ISO 20222031111 +Node: EOL Conversion2043388 +Node: Coding System Properties2044560 +Node: Basic Coding System Functions2048877 +Node: Coding System Property Functions2050911 +Node: Encoding and Decoding Text2051469 +Node: Detection of Textual Encoding2052605 +Node: Big5 and Shift-JIS Functions2054141 +Node: Predefined Coding Systems2055267 +Node: CCL2067361 +Node: CCL Syntax2070465 +Node: CCL Statements2072041 +Node: CCL Expressions2076689 +Node: Calling CCL2079228 +Node: CCL Examples2082217 +Node: Category Tables2082354 +Node: Tips2084712 +Node: Style Tips2085353 +Node: Compilation Tips2094872 +Node: Documentation Tips2096786 +Node: Comment Tips2102295 +Node: Library Headers2105297 +Node: Building XEmacs and Object Allocation2109269 +Node: Building XEmacs2110152 +Node: Pure Storage2116487 +Node: Garbage Collection2119275 +Node: Standard Errors2130414 +Node: Standard Buffer-Local Variables2134623 +Node: Standard Keymaps2137256 +Node: Standard Hooks2140988 +Node: Index2148488  End Tag Table diff --git a/info/lispref.info-1 b/info/lispref.info-1 index cfc1fa8..e5d088c 100644 --- a/info/lispref.info-1 +++ b/info/lispref.info-1 @@ -89,6 +89,7 @@ Reference Manual, corresponding to XEmacs version 21.0. * Menus:: Defining pull-down and pop-up menus. * Dialog Boxes:: Creating dialog boxes. * Toolbar:: Controlling the toolbar. +* Gutter:: Controlling the gutter. * Scrollbars:: Controlling the scrollbars. * Drag and Drop:: Generic API to inter-application communication via specific protocols. @@ -134,6 +135,7 @@ Reference Manual, corresponding to XEmacs version 21.0. * ToolTalk Support:: Interfacing with the ToolTalk message service. * LDAP Support:: Interfacing with the Lightweight Directory Access Protocol. +* PostgreSQL Support:: Interfacing to the PostgreSQL libpq library. * Internationalization:: How Emacs supports different languages and cultural conventions. * MULE:: Specifics of the Asian-language support. @@ -553,6 +555,8 @@ Toolbar * Specifying the Toolbar:: Setting a toolbar. * Other Toolbar Variables:: Controlling the size of toolbars. +Gutter + Scrollbars Major and Minor Modes diff --git a/info/xemacs-faq.info b/info/xemacs-faq.info index 246c340..81838da 100644 --- a/info/xemacs-faq.info +++ b/info/xemacs-faq.info @@ -9,256 +9,257 @@ END-INFO-DIR-ENTRY  Indirect: xemacs-faq.info-1: 205 -xemacs-faq.info-2: 50061 -xemacs-faq.info-3: 99308 -xemacs-faq.info-4: 149302 -xemacs-faq.info-5: 196381 +xemacs-faq.info-2: 50086 +xemacs-faq.info-3: 99333 +xemacs-faq.info-4: 149327 +xemacs-faq.info-5: 196406  Tag Table: (Indirect) Node: Top205 -Node: Introduction16631 -Node: Q1.0.120034 -Node: Q1.0.220570 -Node: Q1.0.321065 -Node: Q1.0.421327 -Node: Q1.0.522777 -Node: Q1.0.623466 -Node: Q1.0.724472 -Node: Q1.0.824721 -Node: Q1.0.924936 -Node: Q1.0.1025214 -Node: Q1.0.1125457 -Node: Q1.0.1225892 -Node: Q1.0.1326260 -Node: Q1.0.1426509 -Node: Q1.1.126983 -Node: Q1.1.228060 -Node: Q1.1.328453 -Node: Q1.2.129404 -Node: Q1.2.230460 -Node: Q1.2.330894 -Node: Q1.3.131978 -Node: Q1.3.235894 -Node: Q1.3.336449 -Node: Q1.3.436690 -Node: Q1.3.537479 -Node: Q1.3.639894 -Node: Q1.3.741431 -Node: Q1.4.142366 -Node: Q1.4.243228 -Node: Q1.4.343569 -Node: Q1.4.443988 -Node: Q1.4.545528 -Node: Q1.4.645832 -Node: Installation46825 -Node: Q2.0.149188 -Node: Q2.0.250061 -Node: Q2.0.357513 -Node: Q2.0.458811 -Node: Q2.0.559403 -Node: Q2.0.659771 -Node: Q2.0.760152 -Node: Q2.0.860533 -Node: Q2.0.962110 -Node: Q2.0.1063548 -Node: Q2.0.1164392 -Node: Q2.0.1265333 -Node: Q2.1.166855 -Node: Q2.1.269597 -Node: Q2.1.370774 -Node: Q2.1.472067 -Node: Q2.1.572866 -Node: Q2.1.673228 -Node: Q2.1.773705 -Node: Q2.1.874058 -Node: Q2.1.975592 -Node: Q2.1.1076014 -Node: Q2.1.1176771 -Node: Q2.1.1277636 -Node: Q2.1.1378591 -Node: Q2.1.1479622 -Node: Q2.1.1580733 -Node: Q2.1.1687765 -Node: Q2.1.1788459 -Node: Q2.1.1889056 -Node: Q2.1.1989183 -Node: Q2.1.2089713 -Node: Q2.1.2190095 -Node: Q2.1.2290288 -Node: Q2.1.2391585 -Node: Q2.1.2492253 -Node: Customization92783 -Node: Q3.0.197621 -Node: Q3.0.298327 -Node: Q3.0.398891 -Node: Q3.0.499308 -Node: Q3.0.5100141 -Node: Q3.0.6100922 -Node: Q3.0.7101502 -Node: Q3.0.8102166 -Node: Q3.0.9103124 -Node: Q3.1.1103685 -Node: Q3.1.2104422 -Node: Q3.1.3104853 -Node: Q3.1.4105042 -Node: Q3.1.5105231 -Node: Q3.1.6105615 -Node: Q3.1.7106324 -Node: Q3.1.8108548 -Node: Q3.2.1109090 -Node: Q3.2.2110743 -Node: Q3.2.3111542 -Node: Q3.2.4112144 -Node: Q3.2.5113178 -Node: Q3.2.6113645 -Node: Q3.3.1114607 -Node: Q3.3.2115000 -Node: Q3.3.3115631 -Node: Q3.3.4116012 -Node: Q3.3.5117113 -Node: Q3.4.1118607 -Node: Q3.4.2119250 -Node: Q3.5.1119762 -Node: Q3.5.2121211 -Node: Q3.5.3121629 -Node: Q3.5.4122467 -Node: Q3.5.5123299 -Node: Q3.5.6124439 -Node: Q3.5.7125429 -Node: Q3.5.8126869 -Node: Q3.5.9127616 -Node: Q3.5.10128396 -Node: Q3.5.11129032 -Node: Q3.6.1129585 -Node: Q3.6.2130330 -Node: Q3.6.3130758 -Node: Q3.7.1131258 -Node: Q3.7.2132146 -Node: Q3.7.3132805 -Node: Q3.7.4133227 -Node: Q3.7.5133570 -Node: Q3.7.6134038 -Node: Q3.7.7134753 -Node: Q3.7.8135773 -Node: Q3.8.1136192 -Node: Q3.8.2136652 -Node: Q3.8.3137115 -Node: Q3.8.4137721 -Node: Q3.8.5138440 -Node: Q3.9.1139225 -Node: Q3.9.2140165 -Node: Q3.9.3140763 -Node: Q3.9.4141425 -Node: Q3.10.1142304 -Node: Q3.10.2143122 -Node: Q3.10.3144127 -Node: Q3.10.4144855 -Node: Q3.10.5145238 -Node: Subsystems146290 -Node: Q4.0.1148777 -Node: Q4.0.2149302 -Node: Q4.0.3149860 -Node: Q4.0.4150181 -Node: Q4.0.5150423 -Node: Q4.0.6150654 -Node: Q4.0.7151242 -Node: Q4.0.8151567 -Node: Q4.0.9152794 -Node: Q4.0.10154832 -Node: Q4.0.11155321 -Node: Q4.0.12156199 -Node: Q4.1.1157172 -Node: Q4.1.2157575 -Node: Q4.1.3157902 -Node: Q4.2.1158211 -Node: Q4.2.2158841 -Node: Q4.2.3159081 -Node: Q4.2.4159625 -Node: Q4.3.1160278 -Node: Q4.3.2160862 -Node: Q4.3.3162343 -Node: Q4.3.4162615 -Node: Q4.3.5163292 -Node: Q4.4.1163920 -Node: Q4.4.2165406 -Node: Q4.5.1166610 -Node: Q4.6.1167379 -Node: Q4.7.1172639 -Node: Q4.7.2173594 -Node: Q4.7.3173891 -Node: Q4.7.4174077 -Node: Q4.7.5174961 -Node: Q4.7.6176602 -Node: Miscellaneous176891 -Node: Q5.0.1180308 -Node: Q5.0.2181047 -Node: Q5.0.3181901 -Node: Q5.0.4182603 -Node: Q5.0.5183542 -Node: Q5.0.6185522 -Node: Q5.0.7186179 -Node: Q5.0.8186784 -Node: Q5.0.9187303 -Node: Q5.0.10187817 -Node: Q5.0.11188065 -Node: Q5.0.12188603 -Node: Q5.0.13189520 -Node: Q5.0.14190204 -Node: Q5.0.15190969 -Node: Q5.0.16191266 -Node: Q5.0.17191778 -Node: Q5.0.18192043 -Node: Q5.0.19192237 -Node: Q5.0.20192661 -Node: Q5.1.1193576 -Node: Q5.1.2195645 -Node: Q5.1.3196381 -Node: Q5.1.4199775 -Node: Q5.1.5200310 -Node: Q5.1.6202434 -Node: Q5.1.7203920 -Node: Q5.1.8205521 -Node: Q5.1.9206073 -Node: Q5.1.10206958 -Node: Q5.1.11208089 -Node: Q5.2.1208638 -Node: Q5.2.2209208 -Node: Q5.2.3209625 -Node: Q5.2.4209860 -Node: Q5.3.1210770 -Node: Q5.3.2211991 -Node: Q5.3.3212767 -Node: Q5.3.4213251 -Node: Q5.3.5213918 -Node: Q5.3.6214787 -Node: Q5.3.7215032 -Node: Q5.3.8217222 -Node: Q5.3.9217469 -Node: Q5.3.10218422 -Node: Q5.3.11220506 -Node: Q5.3.12222097 -Node: MS Windows223371 -Node: Q6.0.1224777 -Node: Q6.0.2225524 -Node: Q6.0.3225989 -Node: Q6.0.4226269 -Node: Q6.1.1228548 -Node: Q6.1.2229419 -Node: Q6.1.3229700 -Node: Q6.1.4229982 -Node: Q6.1.5230360 -Node: Q6.1.6231192 -Node: Q6.2.1231776 -Node: Q6.2.2232677 -Node: Q6.2.3233089 -Node: Q6.3.1233378 -Node: Q6.3.2234472 -Node: Q6.3.3237653 -Node: Current Events237907 -Node: Q7.0.1238561 -Node: Q7.0.2239200 -Node: Q7.0.3240273 -Node: Q7.0.4240501 +Node: Introduction16702 +Node: Q1.0.120105 +Node: Q1.0.220641 +Node: Q1.0.321136 +Node: Q1.0.421398 +Node: Q1.0.522848 +Node: Q1.0.623537 +Node: Q1.0.724543 +Node: Q1.0.824792 +Node: Q1.0.925007 +Node: Q1.0.1025285 +Node: Q1.0.1125528 +Node: Q1.0.1225917 +Node: Q1.0.1326285 +Node: Q1.0.1426534 +Node: Q1.1.127008 +Node: Q1.1.228085 +Node: Q1.1.328478 +Node: Q1.2.129429 +Node: Q1.2.230485 +Node: Q1.2.330919 +Node: Q1.3.132003 +Node: Q1.3.235919 +Node: Q1.3.336474 +Node: Q1.3.436715 +Node: Q1.3.537504 +Node: Q1.3.639919 +Node: Q1.3.741456 +Node: Q1.4.142391 +Node: Q1.4.243253 +Node: Q1.4.343594 +Node: Q1.4.444013 +Node: Q1.4.545553 +Node: Q1.4.645857 +Node: Installation46850 +Node: Q2.0.149213 +Node: Q2.0.250086 +Node: Q2.0.357538 +Node: Q2.0.458836 +Node: Q2.0.559428 +Node: Q2.0.659796 +Node: Q2.0.760177 +Node: Q2.0.860558 +Node: Q2.0.962135 +Node: Q2.0.1063573 +Node: Q2.0.1164417 +Node: Q2.0.1265358 +Node: Q2.1.166880 +Node: Q2.1.269622 +Node: Q2.1.370799 +Node: Q2.1.472092 +Node: Q2.1.572891 +Node: Q2.1.673253 +Node: Q2.1.773730 +Node: Q2.1.874083 +Node: Q2.1.975617 +Node: Q2.1.1076039 +Node: Q2.1.1176796 +Node: Q2.1.1277661 +Node: Q2.1.1378616 +Node: Q2.1.1479647 +Node: Q2.1.1580758 +Node: Q2.1.1687790 +Node: Q2.1.1788484 +Node: Q2.1.1889081 +Node: Q2.1.1989208 +Node: Q2.1.2089738 +Node: Q2.1.2190120 +Node: Q2.1.2290313 +Node: Q2.1.2391610 +Node: Q2.1.2492278 +Node: Customization92808 +Node: Q3.0.197646 +Node: Q3.0.298352 +Node: Q3.0.398916 +Node: Q3.0.499333 +Node: Q3.0.5100166 +Node: Q3.0.6100947 +Node: Q3.0.7101527 +Node: Q3.0.8102191 +Node: Q3.0.9103149 +Node: Q3.1.1103710 +Node: Q3.1.2104447 +Node: Q3.1.3104878 +Node: Q3.1.4105067 +Node: Q3.1.5105256 +Node: Q3.1.6105640 +Node: Q3.1.7106349 +Node: Q3.1.8108573 +Node: Q3.2.1109115 +Node: Q3.2.2110768 +Node: Q3.2.3111567 +Node: Q3.2.4112169 +Node: Q3.2.5113203 +Node: Q3.2.6113670 +Node: Q3.3.1114595 +Node: Q3.3.2115025 +Node: Q3.3.3115656 +Node: Q3.3.4116037 +Node: Q3.3.5117138 +Node: Q3.4.1118632 +Node: Q3.4.2119275 +Node: Q3.5.1119787 +Node: Q3.5.2121236 +Node: Q3.5.3121654 +Node: Q3.5.4122492 +Node: Q3.5.5123324 +Node: Q3.5.6124464 +Node: Q3.5.7125454 +Node: Q3.5.8126894 +Node: Q3.5.9127641 +Node: Q3.5.10128421 +Node: Q3.5.11129057 +Node: Q3.6.1129610 +Node: Q3.6.2130355 +Node: Q3.6.3130783 +Node: Q3.7.1131283 +Node: Q3.7.2132171 +Node: Q3.7.3132830 +Node: Q3.7.4133252 +Node: Q3.7.5133595 +Node: Q3.7.6134063 +Node: Q3.7.7134778 +Node: Q3.7.8135798 +Node: Q3.8.1136217 +Node: Q3.8.2136677 +Node: Q3.8.3137140 +Node: Q3.8.4137746 +Node: Q3.8.5138465 +Node: Q3.9.1139250 +Node: Q3.9.2140190 +Node: Q3.9.3140788 +Node: Q3.9.4141450 +Node: Q3.10.1142329 +Node: Q3.10.2143147 +Node: Q3.10.3144152 +Node: Q3.10.4144880 +Node: Q3.10.5145263 +Node: Subsystems146315 +Node: Q4.0.1148802 +Node: Q4.0.2149327 +Node: Q4.0.3149885 +Node: Q4.0.4150206 +Node: Q4.0.5150448 +Node: Q4.0.6150679 +Node: Q4.0.7151267 +Node: Q4.0.8151592 +Node: Q4.0.9152819 +Node: Q4.0.10154857 +Node: Q4.0.11155346 +Node: Q4.0.12156224 +Node: Q4.1.1157197 +Node: Q4.1.2157600 +Node: Q4.1.3157927 +Node: Q4.2.1158236 +Node: Q4.2.2158866 +Node: Q4.2.3159106 +Node: Q4.2.4159650 +Node: Q4.3.1160303 +Node: Q4.3.2160887 +Node: Q4.3.3162368 +Node: Q4.3.4162640 +Node: Q4.3.5163317 +Node: Q4.4.1163945 +Node: Q4.4.2165431 +Node: Q4.5.1166635 +Node: Q4.6.1167404 +Node: Q4.7.1172664 +Node: Q4.7.2173619 +Node: Q4.7.3173916 +Node: Q4.7.4174102 +Node: Q4.7.5174986 +Node: Q4.7.6176627 +Node: Miscellaneous176916 +Node: Q5.0.1180333 +Node: Q5.0.2181072 +Node: Q5.0.3181926 +Node: Q5.0.4182628 +Node: Q5.0.5183567 +Node: Q5.0.6185547 +Node: Q5.0.7186204 +Node: Q5.0.8186809 +Node: Q5.0.9187328 +Node: Q5.0.10187842 +Node: Q5.0.11188090 +Node: Q5.0.12188628 +Node: Q5.0.13189545 +Node: Q5.0.14190229 +Node: Q5.0.15190994 +Node: Q5.0.16191291 +Node: Q5.0.17191803 +Node: Q5.0.18192068 +Node: Q5.0.19192262 +Node: Q5.0.20192686 +Node: Q5.1.1193601 +Node: Q5.1.2195670 +Node: Q5.1.3196406 +Node: Q5.1.4199800 +Node: Q5.1.5200335 +Node: Q5.1.6202459 +Node: Q5.1.7203945 +Node: Q5.1.8205546 +Node: Q5.1.9206098 +Node: Q5.1.10206983 +Node: Q5.1.11208114 +Node: Q5.2.1208663 +Node: Q5.2.2209233 +Node: Q5.2.3209650 +Node: Q5.2.4209885 +Node: Q5.3.1210795 +Node: Q5.3.2212016 +Node: Q5.3.3212792 +Node: Q5.3.4213276 +Node: Q5.3.5213943 +Node: Q5.3.6214812 +Node: Q5.3.7215057 +Node: Q5.3.8217247 +Node: Q5.3.9217494 +Node: Q5.3.10218447 +Node: Q5.3.11220531 +Node: Q5.3.12222122 +Node: MS Windows223396 +Node: Q6.0.1224873 +Node: Q6.0.2225620 +Node: Q6.0.3226085 +Node: Q6.0.4226365 +Node: Q6.1.1228644 +Node: Q6.1.2229515 +Node: Q6.1.3229796 +Node: Q6.1.4230078 +Node: Q6.1.5230456 +Node: Q6.1.6231288 +Node: Q6.2.1231872 +Node: Q6.2.2232773 +Node: Q6.2.3233185 +Node: Q6.3.1233474 +Node: Q6.3.2234568 +Node: Q6.3.3237749 +Node: Q6.4.1238018 +Node: Current Events239106 +Node: Q7.0.1239760 +Node: Q7.0.2240399 +Node: Q7.0.3241472 +Node: Q7.0.4241700  End Tag Table diff --git a/info/xemacs-faq.info-1 b/info/xemacs-faq.info-1 index 3393000..7b40d6a 100644 --- a/info/xemacs-faq.info-1 +++ b/info/xemacs-faq.info-1 @@ -352,6 +352,9 @@ Miscellaneous: * Q6.3.2:: What are the differences between the various MS Windows emacsen? * Q6.3.3:: What is the porting team doing at the moment? +Troubleshooting: +* Q6.4.1:: XEmacs won't start on Windows. (NEW) + Current Events: * Q7.0.1:: What is new in 20.2? @@ -608,9 +611,8 @@ Q1.0.11: Is there a port of XEmacs to the Macintosh? ---------------------------------------------------- Yes, there is a port of XEmacs 19.14, tested on MacOS 7.6.1 and MacOS -8.5.1 by Pitts Jarvis (pjarvis@ispchannel.com). It's available at -http://my.ispchannel.com/~pjarvis/xemacs.html -(http://my.ispchannel.com/~pjarvis/xemacs.html). +8.5.1 by Pitts Jarvis . It's available at +`http://my.ispchannel.com/~pjarvis/xemacs.html'.  File: xemacs-faq.info, Node: Q1.0.12, Next: Q1.0.13, Prev: Q1.0.11, Up: Introduction diff --git a/info/xemacs.info b/info/xemacs.info index 593db53..2aaa9bd 100644 --- a/info/xemacs.info +++ b/info/xemacs.info @@ -32,376 +32,385 @@ translation approved by the author instead of in the original English.  Indirect: xemacs.info-1: 1350 -xemacs.info-2: 47935 -xemacs.info-3: 95913 -xemacs.info-4: 144439 -xemacs.info-5: 189703 -xemacs.info-6: 237773 -xemacs.info-7: 286800 -xemacs.info-8: 336132 -xemacs.info-9: 383886 -xemacs.info-10: 433192 -xemacs.info-11: 483025 -xemacs.info-12: 532920 -xemacs.info-13: 582100 -xemacs.info-14: 631463 -xemacs.info-15: 681282 -xemacs.info-16: 729776 -xemacs.info-17: 778475 -xemacs.info-18: 828131 -xemacs.info-19: 872489 -xemacs.info-20: 921160 -xemacs.info-21: 963067 +xemacs.info-2: 48915 +xemacs.info-3: 96893 +xemacs.info-4: 145419 +xemacs.info-5: 193446 +xemacs.info-6: 243306 +xemacs.info-7: 290410 +xemacs.info-8: 339182 +xemacs.info-9: 388710 +xemacs.info-10: 438339 +xemacs.info-11: 485732 +xemacs.info-12: 535325 +xemacs.info-13: 582878 +xemacs.info-14: 632686 +xemacs.info-15: 677477 +xemacs.info-16: 727101 +xemacs.info-17: 775368 +xemacs.info-18: 825010 +xemacs.info-19: 849389 +xemacs.info-20: 881042 +xemacs.info-21: 930187 +xemacs.info-22: 972577  Tag Table: (Indirect) Node: Top1350 -Node: License22506 -Node: Distrib35788 -Node: Intro37452 -Node: Frame40323 -Node: Point43591 -Node: Echo Area45558 -Node: Mode Line47935 -Node: XEmacs under X52366 -Node: Keystrokes55543 -Node: Intro to Keystrokes56387 -Node: Representing Keystrokes58490 -Node: Key Sequences59847 -Node: String Key Sequences63187 -Node: Meta Key63570 -Node: Super and Hyper Keys65043 -Node: Character Representation71288 -Node: Commands72308 -Node: Pull-down Menus75157 -Node: File Menu78506 -Node: Edit Menu82328 -Node: Apps Menu84711 -Node: Options Menu85201 -Node: Buffers Menu89181 -Node: Tools Menu89488 -Node: Help Menu89979 -Node: Menu Customization90380 -Node: Entering Emacs94610 -Node: Exiting95913 -Node: Command Switches99004 -Node: Startup Paths108191 -Node: Basic115771 -Node: Blank Lines125249 -Node: Continuation Lines126675 -Node: Position Info128107 -Node: Arguments131240 -Node: Undo134377 -Node: Minibuffer137324 -Node: Minibuffer File139934 -Node: Minibuffer Edit141739 -Node: Completion144439 -Node: Completion Example146370 -Node: Completion Commands147464 -Node: Strict Completion150120 -Node: Completion Options151901 -Node: Minibuffer History153195 -Node: Repetition156379 -Node: M-x159212 -Node: Help164306 -Node: Mark174225 -Node: Setting Mark176079 -Node: Using Region179201 -Node: Marking Objects179938 -Node: Mark Ring181776 -Node: Mouse Selection183492 -Node: Additional Mouse Operations185499 -Node: Killing189703 -Node: Yanking195339 -Node: Kill Ring196142 -Node: Appending Kills197744 -Node: Earlier Kills199781 -Node: Using X Selections202394 -Node: X Clipboard Selection203644 -Node: X Selection Commands205821 -Node: X Cut Buffers206907 -Node: Active Regions208266 -Node: Accumulating Text212846 -Node: Rectangles215919 -Node: Registers219438 -Node: RegPos220892 -Node: RegText222048 -Node: RegRect223154 -Node: RegConfig224033 -Node: RegNumbers224973 -Node: RegFiles225691 -Node: Bookmarks226349 -Node: Display229721 -Node: Scrolling231216 -Node: Horizontal Scrolling235359 -Node: Selective Display236554 -Node: Display Vars237773 -Node: Search240451 -Node: Incremental Search241644 -Node: Non-Incremental Search250571 -Node: Word Search252013 -Node: Regexp Search253631 -Node: Regexps255167 -Node: Search Case265468 -Node: Replace266249 -Node: Unconditional Replace267197 -Node: Regexp Replace268332 -Node: Replacement and Case269267 -Node: Query Replace270247 -Node: Other Repeating Search273474 -Node: Fixit274729 -Node: Kill Errors275309 -Node: Transpose276642 -Node: Fixing Case279046 -Node: Spelling279692 -Node: Files281153 -Node: File Names282463 -Node: Visiting286800 -Node: Saving293486 -Node: Backup298409 -Node: Backup Names299805 -Node: Backup Deletion301288 -Node: Backup Copying302438 -Node: Interlocking304144 -Node: Reverting308272 -Node: Auto Save310184 -Node: Auto Save Files311151 -Node: Auto Save Control312992 -Node: Recover314830 -Node: Version Control315985 -Node: Concepts of VC318023 -Node: Editing with VC319633 -Node: Variables for Check-in/out324889 -Node: Log Entries326788 -Node: Change Logs and VC327968 -Node: Old Versions331235 -Node: VC Status333238 -Node: Renaming and VC334952 -Node: Snapshots335631 -Node: Making Snapshots336132 -Node: Snapshot Caveats337425 -Node: Version Headers339234 -Node: ListDir341933 -Node: Comparing Files343982 -Node: Dired345515 -Node: Dired Enter346186 -Node: Dired Edit347011 -Node: Dired Deletion348758 -Node: Dired Immed351981 -Node: Misc File Ops353257 -Node: Buffers355745 -Node: Select Buffer357903 -Node: List Buffers359698 -Node: Misc Buffer361456 -Node: Kill Buffer363099 -Node: Several Buffers364229 -Node: Windows368095 -Node: Basic Window368806 -Node: Split Window370525 -Node: Other Window372658 -Node: Pop Up Window375087 -Node: Change Window376592 -Node: Mule379500 -Node: Mule Intro380763 -Node: Language Environments381779 -Node: Input Methods383886 -Node: Select Input Method387606 -Node: Coding Systems389761 -Node: Recognize Coding393947 -Node: Specify Coding397273 -Node: Major Modes402204 -Node: Choosing Modes404423 -Node: Indentation406813 -Node: Indentation Commands408908 -Node: Tab Stops411637 -Node: Just Spaces413486 -Node: Text414301 -Node: Text Mode416284 -Node: Nroff Mode418363 -Node: TeX Mode420006 -Node: TeX Editing422258 -Node: TeX Print425692 -Node: Outline Mode428911 -Node: Outline Format430392 -Node: Outline Motion433192 -Node: Outline Visibility434745 -Node: Words437666 -Node: Sentences440613 -Node: Paragraphs442809 -Node: Pages445097 -Node: Filling447697 -Node: Auto Fill448268 -Node: Fill Commands450415 -Node: Fill Prefix452580 -Node: Case454768 -Node: Programs456796 -Node: Program Modes459345 -Node: Lists461577 -Node: Defuns467417 -Node: Grinding470070 -Node: Basic Indent470698 -Node: Multi-line Indent472719 -Node: Lisp Indent474335 -Node: C Indent477785 -Node: Matching483025 -Node: Comments484547 -Node: Balanced Editing490999 -Node: Lisp Completion492013 -Node: Documentation493028 -Node: Change Log494267 -Node: Tags496845 -Node: Tag Syntax498494 -Node: Create Tags Table502438 -Node: Etags Regexps506498 -Node: Select Tags Table511156 -Node: Find Tag514929 -Node: Tags Search517893 -Node: List Tags521349 -Node: Fortran522378 -Node: Fortran Motion523454 -Node: Fortran Indent524274 -Node: ForIndent Commands524959 -Node: ForIndent Num526104 -Node: ForIndent Conv527378 -Node: ForIndent Vars528154 -Node: Fortran Comments529322 -Node: Fortran Columns532920 -Node: Fortran Abbrev534343 -Node: Asm Mode535252 -Node: Running535804 -Node: Compilation536774 -Node: Lisp Modes541624 -Node: Lisp Libraries542897 -Node: Loading543451 -Node: Compiling Libraries547911 -Node: Mocklisp550802 -Node: Lisp Eval551479 -Node: Lisp Debug555119 -Node: Lisp Interaction560544 -Node: External Lisp561899 -Node: Packages563973 -Node: Package Terminology564714 -Node: Using Packages566072 -Node: Building Packages574931 -Node: Abbrevs577453 -Node: Defining Abbrevs579653 -Node: Expanding Abbrevs582100 -Node: Editing Abbrevs584802 -Node: Saving Abbrevs586675 -Node: Dynamic Abbrevs588615 -Node: Picture589917 -Node: Basic Picture592350 -Node: Insert in Picture594635 -Node: Tabs in Picture596057 -Node: Rectangles in Picture597578 -Node: Sending Mail599486 -Node: Mail Format601197 -Node: Mail Headers602547 -Node: Mail Mode608955 -Node: Reading Mail612568 -Node: Calendar/Diary614143 -Node: Calendar Motion615815 -Node: Calendar Unit Motion616698 -Node: Move to Beginning or End619021 -Node: Specified Dates620154 -Node: Scroll Calendar621042 -Node: Mark and Region622833 -Node: General Calendar624739 -Node: LaTeX Calendar626347 -Node: Holidays628361 -Node: Sunrise/Sunset631463 -Node: Lunar Phases634506 -Node: Other Calendars635891 -Node: Calendar Systems637378 -Node: To Other Calendar640489 -Node: From Other Calendar642480 -Node: Mayan Calendar644785 -Node: Diary647980 -Node: Diary Commands649729 -Node: Format of Diary File653035 -Node: Date Formats655905 -Node: Adding to Diary658479 -Node: Special Diary Entries660110 -Node: Calendar Customization665449 -Node: Calendar Customizing666311 -Node: Holiday Customizing669530 -Node: Date Display Format675998 -Node: Time Display Format676956 -Node: Daylight Savings678094 -Node: Diary Customizing681282 -Node: Hebrew/Islamic Entries685903 -Node: Fancy Diary Display689243 -Node: Included Diary Files691140 -Node: Sexp Diary Entries692121 -Node: Appt Customizing697211 -Node: Sorting698257 -Node: Shell703063 -Node: Single Shell704356 -Node: Interactive Shell705955 -Node: Shell Mode709720 -Node: Terminal emulator712211 -Node: Term Mode714520 -Node: Paging in Term715434 -Node: Narrowing716232 -Node: Hardcopy718182 -Node: Recursive Edit719154 -Node: Dissociated Press722141 -Node: CONX724704 -Node: Amusements725728 -Node: Emulation726208 -Node: Customization728052 -Node: Minor Modes729776 -Node: Variables731408 -Node: Examining733364 -Node: Easy Customization734825 -Node: Customization Groups735839 -Node: Changing an Option738768 -Node: Face Customization745024 -Node: Specific Customization746788 -Node: Edit Options749395 -Node: Locals750979 -Node: File Variables754158 -Node: Keyboard Macros758712 -Node: Basic Kbd Macro760883 -Node: Save Kbd Macro762815 -Node: Kbd Macro Query764484 -Node: Key Bindings766426 -Node: Keymaps767300 -Node: Rebinding771150 -Node: Interactive Rebinding771849 -Node: Programmatic Rebinding774041 -Node: Key Bindings Using Strings776848 -Node: Disabling778475 -Node: Syntax780247 -Node: Syntax Entry781128 -Node: Syntax Change785212 -Node: Init File787381 -Node: Init Syntax788886 -Node: Init Examples791238 -Node: Terminal Init795428 -Node: Audible Bell797138 -Node: Faces800569 -Node: X Resources805406 -Node: Geometry Resources807054 -Node: Iconic Resources809502 -Node: Resource List809974 -Node: Face Resources816481 -Node: Widgets820158 -Node: Menubar Resources821097 -Node: Quitting822030 -Node: Lossage825008 -Node: Stuck Recursive825652 -Node: Screen Garbled826358 -Node: Text Garbled827492 -Node: Unasked-for Search828131 -Node: Emergency Escape828916 -Node: Total Frustration830695 -Node: Bugs831326 -Node: Glossary840860 -Node: Manifesto872489 -Node: Key Index895965 -Node: Command Index921160 -Node: Variable Index963067 -Node: Concept Index979204 +Node: License22810 +Node: Distrib36092 +Node: Intro37756 +Node: Frame40627 +Node: Point44571 +Node: Echo Area46538 +Node: Mode Line48915 +Node: XEmacs under X53346 +Node: Keystrokes56523 +Node: Intro to Keystrokes57367 +Node: Representing Keystrokes59470 +Node: Key Sequences60827 +Node: String Key Sequences64167 +Node: Meta Key64550 +Node: Super and Hyper Keys66023 +Node: Character Representation72268 +Node: Commands73288 +Node: Pull-down Menus76137 +Node: File Menu79486 +Node: Edit Menu83308 +Node: Apps Menu85691 +Node: Options Menu86181 +Node: Buffers Menu90161 +Node: Tools Menu90468 +Node: Help Menu90959 +Node: Menu Customization91360 +Node: Entering Emacs95590 +Node: Exiting96893 +Node: Command Switches99984 +Node: Startup Paths109171 +Node: Basic116751 +Node: Blank Lines126229 +Node: Continuation Lines127655 +Node: Position Info129087 +Node: Arguments132220 +Node: Undo135357 +Node: Minibuffer138304 +Node: Minibuffer File140914 +Node: Minibuffer Edit142719 +Node: Completion145419 +Node: Completion Example147350 +Node: Completion Commands148444 +Node: Strict Completion151100 +Node: Completion Options152881 +Node: Minibuffer History154175 +Node: Repetition157359 +Node: M-x160192 +Node: Help165286 +Node: Help Summary166696 +Node: Key Help169482 +Node: Name Help170441 +Node: Apropos173086 +Node: Library Keywords176205 +Node: Help Mode178526 +Node: Misc Help179023 +Node: Mark182172 +Node: Setting Mark184026 +Node: Using Region187148 +Node: Marking Objects187885 +Node: Mark Ring189723 +Node: Mouse Selection191439 +Node: Additional Mouse Operations193446 +Node: Killing197650 +Node: Yanking203286 +Node: Kill Ring204089 +Node: Appending Kills205691 +Node: Earlier Kills207728 +Node: Using X Selections210341 +Node: X Clipboard Selection211591 +Node: X Selection Commands213768 +Node: X Cut Buffers214854 +Node: Active Regions216213 +Node: Accumulating Text220793 +Node: Rectangles223866 +Node: Registers227385 +Node: RegPos228839 +Node: RegText229995 +Node: RegRect231101 +Node: RegConfig231980 +Node: RegNumbers232920 +Node: RegFiles233638 +Node: Bookmarks234296 +Node: Display237668 +Node: Scrolling239163 +Node: Horizontal Scrolling243306 +Node: Selective Display244501 +Node: Display Vars245720 +Node: Search248398 +Node: Incremental Search249591 +Node: Non-Incremental Search258518 +Node: Word Search259960 +Node: Regexp Search261578 +Node: Regexps263114 +Node: Search Case273415 +Node: Replace274196 +Node: Unconditional Replace275144 +Node: Regexp Replace276279 +Node: Replacement and Case277214 +Node: Query Replace278194 +Node: Other Repeating Search281421 +Node: Fixit282676 +Node: Kill Errors283256 +Node: Transpose284589 +Node: Fixing Case286993 +Node: Spelling287639 +Node: Files289100 +Node: File Names290410 +Node: Visiting294747 +Node: Saving301433 +Node: Backup306356 +Node: Backup Names307752 +Node: Backup Deletion309235 +Node: Backup Copying310385 +Node: Interlocking312091 +Node: Reverting316219 +Node: Auto Save318131 +Node: Auto Save Files319098 +Node: Auto Save Control320939 +Node: Recover322777 +Node: Version Control323932 +Node: Concepts of VC325970 +Node: Editing with VC327580 +Node: Variables for Check-in/out332836 +Node: Log Entries334735 +Node: Change Logs and VC335915 +Node: Old Versions339182 +Node: VC Status341185 +Node: Renaming and VC342899 +Node: Snapshots343578 +Node: Making Snapshots344079 +Node: Snapshot Caveats345372 +Node: Version Headers347181 +Node: ListDir349880 +Node: Comparing Files351929 +Node: Dired353462 +Node: Dired Enter354133 +Node: Dired Edit354958 +Node: Dired Deletion356705 +Node: Dired Immed359928 +Node: Misc File Ops361204 +Node: Buffers363692 +Node: Select Buffer365850 +Node: List Buffers367645 +Node: Misc Buffer369403 +Node: Kill Buffer371046 +Node: Several Buffers372176 +Node: Windows376042 +Node: Basic Window376753 +Node: Split Window378472 +Node: Other Window380605 +Node: Pop Up Window383034 +Node: Change Window384539 +Node: Mule387447 +Node: Mule Intro388710 +Node: Language Environments389726 +Node: Input Methods391833 +Node: Select Input Method395553 +Node: Coding Systems397708 +Node: Recognize Coding401894 +Node: Specify Coding405220 +Node: Major Modes410151 +Node: Choosing Modes412370 +Node: Indentation414760 +Node: Indentation Commands416855 +Node: Tab Stops419584 +Node: Just Spaces421433 +Node: Text422248 +Node: Text Mode424231 +Node: Nroff Mode426310 +Node: TeX Mode427953 +Node: TeX Editing430205 +Node: TeX Print433639 +Node: Outline Mode436858 +Node: Outline Format438339 +Node: Outline Motion441139 +Node: Outline Visibility442692 +Node: Words445613 +Node: Sentences448560 +Node: Paragraphs450756 +Node: Pages453044 +Node: Filling455644 +Node: Auto Fill456215 +Node: Fill Commands458362 +Node: Fill Prefix460527 +Node: Case462715 +Node: Programs464743 +Node: Program Modes467292 +Node: Lists469524 +Node: Defuns475364 +Node: Grinding478017 +Node: Basic Indent478645 +Node: Multi-line Indent480666 +Node: Lisp Indent482282 +Node: C Indent485732 +Node: Matching490972 +Node: Comments492494 +Node: Balanced Editing498946 +Node: Lisp Completion499960 +Node: Documentation500975 +Node: Change Log502214 +Node: Tags504792 +Node: Tag Syntax506441 +Node: Create Tags Table510385 +Node: Etags Regexps514445 +Node: Select Tags Table519103 +Node: Find Tag522876 +Node: Tags Search525840 +Node: List Tags529296 +Node: Fortran530325 +Node: Fortran Motion531401 +Node: Fortran Indent532221 +Node: ForIndent Commands532906 +Node: ForIndent Num534051 +Node: ForIndent Conv535325 +Node: ForIndent Vars536101 +Node: Fortran Comments537269 +Node: Fortran Columns540867 +Node: Fortran Abbrev542290 +Node: Asm Mode543199 +Node: Running543751 +Node: Compilation544721 +Node: Lisp Modes549571 +Node: Lisp Libraries550844 +Node: Loading551398 +Node: Compiling Libraries555858 +Node: Mocklisp558749 +Node: Lisp Eval559426 +Node: Lisp Debug563066 +Node: Lisp Interaction568491 +Node: External Lisp569846 +Node: Packages571920 +Node: Package Terminology572661 +Node: Using Packages574019 +Node: Building Packages582878 +Node: Abbrevs585400 +Node: Defining Abbrevs587600 +Node: Expanding Abbrevs590047 +Node: Editing Abbrevs592749 +Node: Saving Abbrevs594622 +Node: Dynamic Abbrevs596562 +Node: Picture597864 +Node: Basic Picture600297 +Node: Insert in Picture602582 +Node: Tabs in Picture604004 +Node: Rectangles in Picture605525 +Node: Sending Mail607433 +Node: Mail Format609144 +Node: Mail Headers610494 +Node: Mail Mode616902 +Node: Reading Mail620515 +Node: Calendar/Diary622090 +Node: Calendar Motion623762 +Node: Calendar Unit Motion624645 +Node: Move to Beginning or End626968 +Node: Specified Dates628101 +Node: Scroll Calendar628989 +Node: Mark and Region630780 +Node: General Calendar632686 +Node: LaTeX Calendar634294 +Node: Holidays636308 +Node: Sunrise/Sunset639410 +Node: Lunar Phases642453 +Node: Other Calendars643838 +Node: Calendar Systems645325 +Node: To Other Calendar648436 +Node: From Other Calendar650427 +Node: Mayan Calendar652732 +Node: Diary655927 +Node: Diary Commands657676 +Node: Format of Diary File660982 +Node: Date Formats663852 +Node: Adding to Diary666426 +Node: Special Diary Entries668057 +Node: Calendar Customization673396 +Node: Calendar Customizing674258 +Node: Holiday Customizing677477 +Node: Date Display Format683945 +Node: Time Display Format684903 +Node: Daylight Savings686041 +Node: Diary Customizing689229 +Node: Hebrew/Islamic Entries693850 +Node: Fancy Diary Display697190 +Node: Included Diary Files699087 +Node: Sexp Diary Entries700068 +Node: Appt Customizing705158 +Node: Sorting706204 +Node: Shell711010 +Node: Single Shell712303 +Node: Interactive Shell713902 +Node: Shell Mode717667 +Node: Terminal emulator720158 +Node: Term Mode722467 +Node: Paging in Term723381 +Node: Narrowing724179 +Node: Hardcopy726129 +Node: Recursive Edit727101 +Node: Dissociated Press730088 +Node: CONX732651 +Node: Amusements733675 +Node: Emulation734155 +Node: Customization735999 +Node: Minor Modes737844 +Node: Variables739476 +Node: Examining741432 +Node: Easy Customization742893 +Node: Customization Groups743907 +Node: Changing an Option746836 +Node: Face Customization753092 +Node: Specific Customization754856 +Node: Edit Options757463 +Node: Locals759047 +Node: File Variables762226 +Node: Keyboard Macros766780 +Node: Basic Kbd Macro768951 +Node: Save Kbd Macro770883 +Node: Kbd Macro Query772552 +Node: Key Bindings774494 +Node: Keymaps775368 +Node: Rebinding779218 +Node: Interactive Rebinding779917 +Node: Programmatic Rebinding782109 +Node: Key Bindings Using Strings784916 +Node: Disabling786543 +Node: Syntax788315 +Node: Syntax Entry789196 +Node: Syntax Change793280 +Node: Init File795449 +Node: Init Syntax796954 +Node: Init Examples799306 +Node: Terminal Init803496 +Node: Audible Bell805206 +Node: Faces808637 +Node: Frame Components813479 +Node: X Resources813924 +Node: Geometry Resources815583 +Node: Iconic Resources818031 +Node: Resource List818503 +Node: Face Resources825010 +Node: Widgets828687 +Node: Menubar Resources829626 +Node: Quitting830559 +Node: Lossage833537 +Node: Stuck Recursive834181 +Node: Screen Garbled834887 +Node: Text Garbled836021 +Node: Unasked-for Search836660 +Node: Emergency Escape837445 +Node: Total Frustration839224 +Node: Bugs839855 +Node: Glossary849389 +Node: Manifesto881042 +Node: Key Index904518 +Node: Command Index930187 +Node: Variable Index972577 +Node: Concept Index988769  End Tag Table diff --git a/info/xemacs.info-1 b/info/xemacs.info-1 index e8495cf..95651c9 100644 --- a/info/xemacs.info-1 +++ b/info/xemacs.info-1 @@ -212,9 +212,13 @@ Using X Selections Registers -* RegPos:: Saving positions in registers. -* RegText:: Saving text in registers. -* RegRect:: Saving rectangles in registers. +* Position: RegPos. Saving positions in registers. +* Text: RegText. Saving text in registers. +* Rectangle: RegRect. Saving rectangles in registers. +* Configurations: RegConfig. Saving window configurations in registers. +* Files: RegFiles. File names in registers. +* Numbers: RegNumbers. Numbers in registers. +* Bookmarks:: Bookmarks are like registers, but persistent. Controlling the Display @@ -938,9 +942,22 @@ Window exchange information with the user. There is only one echo area per XEmacs frame. - * If you are running XEmacs under the X Window System, a menu bar at - the top of the frame makes shortcuts to several of the commands - available (*note Pull-down Menus::). + * If you are running XEmacs under a graphical windowing system, a + menu bar at the top of the frame makes shortcuts to several of the + commands available (*note Pull-down Menus::). + + * If you are running XEmacs under a graphical windowing system, a + toolbar at the top of the frame, just under the menu bar if it + exists, provides "one-touch" shortcuts to several commands. (Not + yet documented.) + + * If you are running XEmacs under a graphical windowing system, a + gutter at the top (under the toolbar) and/or bottom of the frame + provides advanced GUI facilities like tab controls for rapid + switching among related windows and progress bars for + time-consuming operations like downloads across the Internet. + Gutters are an experimental feature introduced in XEmacs version + 21.2. (Not yet documented.) You can subdivide the XEmacs frame into multiple text windows, and use each window for a different file (*note Windows::). Multiple XEmacs diff --git a/info/xemacs.info-4 b/info/xemacs.info-4 index 4e46b44..d822f79 100644 --- a/info/xemacs.info-4 +++ b/info/xemacs.info-4 @@ -529,49 +529,75 @@ File: xemacs.info, Node: Help, Next: Mark, Prev: M-x, Up: Top Help **** - Emacs provides extensive help features which revolve around a single + XEmacs provides extensive help features accessible through a single character, `C-h'. `C-h' is a prefix key that is used only for -documentation-printing commands. The characters you can type after -`C-h' are called "help options". One help option is `C-h'; you use it -to ask for help about using `C-h'. +documentation-printing commands. The characters that you can type after +`C-h' are called "help options". One help option is `C-h'; that is how +you ask for help about using `C-h'. To cancel, type `C-g'. The +function key is equivalent to `C-h'. - `C-h C-h' prints a list of the possible help options, and then asks -you to type the desired option. It prompts with the string: + `C-h C-h' (`help-for-help') displays a list of the possible help +options, and then asks you to type the desired option. It prompts with +the string: - A, B, C, F, I, K, L, M, N, S, T, V, W, C-c, C-d, C-n, C-w or C-h for more help: + A B C F I K L M N P S T V W C-c C-d C-f C-i C-k C-n C-w; ? for more help: You should type one of those characters. Typing a third `C-h' displays a description of what the options mean; Emacs still waits for you to type an option. To cancel, type `C-g'. + Most help buffers use a special major mode, Help mode, which lets you +scroll conveniently with and or . + +* Menu: + +* Help Summary:: Brief list of all Help commands. +* Key Help:: Asking what a key does in XEmacs. +* Name Help:: Asking about a command, variable or function name. +* Apropos:: Asking what pertains to a given topic. +* Library Keywords:: Finding Lisp libraries by keywords (topics). +* Help Mode:: Special features of Help mode and Help buffers. +* Misc Help:: Other help commands. + + +File: xemacs.info, Node: Help Summary, Next: Key Help, Prev: Help, Up: Help + +Help Summary +============ + Here is a summary of the defined help commands. -`C-h a STRING ' - Display a list of commands whose names contain STRING (`command- - apropos'). +`C-h a REGEXP ' + Display a list of functions and variables whose names match REGEXP + (`heper-apropos'). + +`C-h A REGEXP' + Show all commands whose names contain matches for REGEXP + (`command-apropos'). `C-h b' - Display a table of all key bindings currently in effect, with - local bindings of the current major mode first, followed by all - global bindings (`describe-bindings'). + Display a table of all key bindings currently in effect, with local + bindings of the current major mode first, followed by all global + bindings (`describe-bindings'). `C-h c KEY' - Print the name of the command that KEY runs (`describe-key- - briefly'). `c' is for `character'. For more extensive - information on KEY, use `C-h k'. + Print the name of the command that KEY runs + (`describe-key-briefly'). Here `c' stands for `character'. For + more extensive information on KEY, use `C-h k'. +`C-h d FUNCTION ' `C-h f FUNCTION ' Display documentation on the Lisp function named FUNCTION - (`describe-function'). Note that commands are Lisp functions, so - a command name may be used. + (`describe-function'). Since commands are Lisp functions, a + command name may be used. `C-h i' Run Info, the program for browsing documentation files (`info'). - The complete Emacs manual is available online in Info. + The complete XEmacs manual is available online in Info. `C-h k KEY' - Display name and documentation of the command KEY runs + Display the name and documentation of the command that KEY runs (`describe-key'). `C-h l' @@ -582,41 +608,65 @@ Emacs still waits for you to type an option. To cancel, type `C-g'. Display documentation of the current major mode (`describe-mode'). `C-h n' - Display documentation of Emacs changes, most recent first +`C-h C-n' + Display documentation of XEmacs changes, most recent first (`view-emacs-news'). `C-h p' + Find packages by topic keyword (`finder-by-keyword'). + +`C-h C-p' Display a table of all mouse bindings currently in effect now, with local bindings of the current major mode first, followed by all global bindings (`describe-pointer'). `C-h s' Display current contents of the syntax table, plus an explanation - of what they mean (`describe-syntax'). + of what they mean (`describe-syntax'). *Note Syntax::. `C-h t' - Display the Emacs tutorial (`help-with-tutorial'). + Enter the XEmacs interactive tutorial (`help-with-tutorial'). `C-h v VAR ' - Display the documentation of the Lisp variable VAR (`describe- - variable'). + Display the documentation of the Lisp variable VAR + (`describe-variable'). `C-h w COMMAND ' Print which keys run the command named COMMAND (`where-is'). -`M-x apropos REGEXP' - Show all symbols whose names contain matches for REGEXP. +`C-h B ' + Display info on how to deal with Beta versions of XEmacs + (`describe-beta'). + +`C-h C GROUP ' + Select customization buffer for GROUP (`customize'). + +`C-h F ' + View the local copy of the XEmacs FAQ (`xemacs-local-faq'). + +`C-h C-i FILE ' + Read Info file FILE with Info browser (`Info-query'). + +`C-h C-c COMMAND ' + Look up an Emacs command COMMAND in the Emacs manual in the Info + system (`Info-goto-emacs-command-node'). + +`C-h C-f FUNCTION ' + Look up an Emacs Lisp function FUNCTION in the Elisp manual in the + Info system (`Info-elisp-ref'). + + +File: xemacs.info, Node: Key Help, Next: Name Help, Prev: Help Summary, Up: Help Documentation for a Key ======================= The most basic `C-h' options are `C-h c' (`describe-key-briefly') -and `C-h k' -(`describe-key'). `C-h c KEY' prints the name of the command that KEY -is bound to in the echo area. For example, `C-h c C-f' prints -`forward-char'. Since command names are chosen to describe what the -command does, using this option is a good way to get a somewhat cryptic -description of what KEY does. +and `C-h k' (`describe-key'). `C-h c KEY' prints in the echo area the +name of the command that KEY is bound to. For example, `C-h c C-f' +prints `forward-char'. Since command names are chosen to describe what +the commands do, this is a good way to get a very brief description of +what KEY does. `C-h k KEY' is similar to `C-h c' but gives more information. It displays the documentation string of the function KEY is bound to as @@ -624,6 +674,12 @@ well as its name. KEY is a string or vector of events. When called interactively, KEY may also be a menu selection. This information does not usually fit into the echo area, so a window is used for the display. + `C-h c' and `C-h k' work for any sort of key sequences, including +function keys and mouse events. + + +File: xemacs.info, Node: Name Help, Next: Apropos, Prev: Key Help, Up: Help + Help by Command or Variable Name ================================ @@ -641,30 +697,31 @@ key, that is, a command you would normally call using `M-x'. If the variable `describe-function-show-arglist' is `t', `describe-function' shows its arglist if the FUNCTION is not an autoload function. - `C-h f' is also useful for Lisp functions you are planning to use in -a Lisp program. For example, if you have just written the code -`(make-vector len)' and want to make sure you are using `make-vector' -properly, type `C-h f make-vector '. Because `C-h f' allows all -function names, not just command names, you may find that some of your -favorite abbreviations that work in `M-x' don't work in `C-h f'. An -abbreviation may be unique among command names, yet fail to be unique -when other function names are allowed. - - If you type , leaving the minibuffer empty, `C-h f' by default -describes the function called by the innermost Lisp expression in the -buffer around point, provided that that is a valid, defined Lisp -function name. For example, if point is located following the text -`(make-vector (car x)', the innermost list containing point is the one -starting with `(make-vector', so the default is to describe the -function `make-vector'. + `C-h f' is also useful for Lisp functions that you are planning to +use in a Lisp program. For example, if you have just written the +expression `(make-vector len)' and want to make sure you are using +`make-vector' properly, type `C-h f make-vector '. Because `C-h +f' allows all function names, not just command names, you may find that +some of your favorite abbreviations that work in `M-x' don't work in +`C-h f'. An abbreviation may be unique among command names, yet fail +to be unique when other function names are allowed. + + The function name for `C-h f' to describe has a default which is +used if you type leaving the minibuffer empty. The default is +the function called by the innermost Lisp expression in the buffer +around point, _provided_ that is a valid, defined Lisp function name. +For example, if point is located following the text `(make-vector (car +x)', the innermost list containing point is the one that starts with +`(make-vector', so the default is to describe the function +`make-vector'. `C-h f' is often useful just to verify that you have the right -spelling for the function name. If `C-h f' mentions a default in the -prompt, you have typed the name of a defined Lisp function. If that is -what you wanted to know, just type `C-g' to cancel the `C-h f' command -and continue editing. +spelling for the function name. If `C-h f' mentions a name from the +buffer as the default, that name must be defined as a Lisp function. If +that is all you want to know, just type `C-g' to cancel the `C-h f' +command, then go on editing. - `C-h w COMMAND ' (`where-s') tells you what keys are bound to + `C-h w COMMAND ' (`where-is') tells you what keys are bound to COMMAND. It prints a list of the keys in the echo area. Alternatively, it informs you that a command is not bound to any keys, which implies that you must use `M-x' to call the command. @@ -674,86 +731,201 @@ variables instead of Lisp functions. Its default is the Lisp symbol around or before point, if that is the name of a known Lisp variable. *Note Variables::. + +File: xemacs.info, Node: Apropos, Next: Library Keywords, Prev: Name Help, Up: Help + Apropos ======= -`C-h a' +`C-h A' Show only symbols that are names of commands (`command-apropos'). `M-x apropos REGEXP' Show all symbols whose names comtain matches for REGEXP. - It is possible to ask a question like, "What are the commands for -working with files?" To do this, type `C-h a file ', which -displays a list of all command names that contain `file', such as -`copy-file', `find-file', and so on. With each command name a brief -description of its use and information on the keys you can use to -invoke it is displayed. For example, you would be informed that you -can invoke `find-file' by typing `C-x C-f'. The `a' in `C-h a' stands -for `Apropos'; `C-h a' runs the Lisp function `command-apropos'. - - Because `C-h a' looks only for functions whose names contain the + A more sophisticated sort of question to ask is, "What are the +commands for working with files?" To ask this question, type `C-h a +file ', which displays a list of all command names that contain +`file', including `copy-file', `find-file', and so on. With each +command name appears a brief description of how to use the command, and +what keys you can currently invoke it with. For example, it would say +that you can invoke `find-file' by typing `C-x C-f'. The `A' in `C-h +A' stands for `Apropos'; `C-h A' runs the command `command-apropos'. +This command normally checks only commands (interactive functions); if +you specify a prefix argument, it checks noninteractive functions as +well. + + Because `C-h A' looks only for functions whose names contain the string you specify, you must use ingenuity in choosing the string. If you are looking for commands for killing backwards and `C-h a -kill-backwards ' doesn't reveal any commands, don't give up. Try -just `kill', or just `backwards', or just `back'. Be persistent. -Pretend you are playing Adventure. Also note that you can use a -regular expression as the argument (*note Regexps::). +kill-backwards ' doesn't reveal any, don't give up. Try just +`kill', or just `backwards', or just `back'. Be persistent. Pretend +you are playing Adventure. Also note that you can use a regular +expression as the argument, for more flexibility (*note Regexps::). Here is a set of arguments to give to `C-h a' that covers many -classes of Emacs commands, since there are strong conventions for naming -standard Emacs commands. By giving you a feeling for the naming -conventions, this set of arguments can also help you develop a -technique for picking `apropos' strings. +classes of XEmacs commands, since there are strong conventions for +naming the standard XEmacs commands. By giving you a feel for the +naming conventions, this set should also serve to aid you in developing +a technique for picking `apropos' strings. char, line, word, sentence, paragraph, region, page, sexp, list, - defun, buffer, frame, window, file, dir, register, mode, - beginning, end, forward, backward, next, previous, up, down, - search, goto, kill, delete, mark, insert, yank, fill, indent, case, - change, set, what, list, find, view, describe. + defun, rect, buffer, frame, window, face, file, dir, register, + mode, beginning, end, forward, backward, next, previous, up, down, + search, goto, kill, delete, mark, insert, yank, fill, indent, + case, change, set, what, list, find, view, describe, default. To list all Lisp symbols that contain a match for a regexp, not just the ones that are defined as commands, use the command `M-x apropos' -instead of `C-h a'. +instead of `C-h A'. This command does not check key bindings by +default; specify a numeric argument if you want it to check them. + + The `apropos-documentation' command is like `apropos' except that it +searches documentation strings for matches for the specified regular +expression. + + The `apropos-value' command is like `apropos' except that it +searches symbols' values for matches for the specified regular +expression. This command does not check function definitions or +property lists by default; specify a numeric argument if you want it to +check them. + + If the variable `apropos-do-all' is non-`nil', the commands above +all behave as if they had been given a prefix argument. + + If you want more information about a function definition, variable or +symbol property listed in the Apropos buffer, you can click on it with +`Mouse-2' or move there and type . + + +File: xemacs.info, Node: Library Keywords, Next: Help Mode, Prev: Apropos, Up: Help + +Keyword Search for Lisp Libraries +================================= + + The `C-h p' command lets you search the standard Emacs Lisp +libraries by topic keywords. Here is a partial list of keywords you can +use: + + abbrev abbreviation handling, typing shortcuts, macros + bib code related to the `bib' bibliography processor + c C, C++, and Objective-C language support + calendar calendar and time management support + comm communications, networking, remote access to files + data support for editing files of data + docs support for Emacs documentation + dumped files preloaded into Emacs + emulations emulations of other editors + extensions Emacs Lisp language extensions + faces support for multiple fonts + frames support for Emacs frames and window systems + games games, jokes and amusements + hardware support for interfacing with exotic hardware + help support for on-line help systems + hypermedia support for links between text or other media types + i18n internationalization and alternate character-set support + internal code for Emacs internals, build process, defaults + languages specialized modes for editing programming languages + lisp Lisp support, including Emacs Lisp + local code local to your site + maint maintenance aids for the Emacs development group + mail modes for electronic-mail handling + matching various sorts of searching and matching + mouse mouse support + mule multi-language extensions + news support for netnews reading and posting + oop support for object-oriented programming + outlines support for hierarchical outlining + processes process, subshell, compilation, and job control support + terminals support for terminal types + tex code related to the TeX formatter + tools programming tools + unix front-ends/assistants for, or emulators of, UNIX features + vms support code for vms + wp word processing + + +File: xemacs.info, Node: Help Mode, Next: Misc Help, Prev: Library Keywords, Up: Help + +Help Mode Commands +================== + + Help buffers provide the commands of View mode (*note Misc File +Ops::), plus a few special commands of their own. + +`' + Scroll forward. + +`' +`' + Scroll backward. + + When a command name (*note Running Commands by Name: M-x.) or +variable name (*note Variables::) appears in the documentation, it +normally appears inside paired single-quotes. + + +File: xemacs.info, Node: Misc Help, Prev: Help Mode, Up: Help Other Help Commands =================== `C-h i' (`info') runs the Info program, which is used for browsing -through structured documentation files. The entire Emacs manual is +through structured documentation files. The entire XEmacs manual is available within Info. Eventually all the documentation of the GNU system will be available. Type `h' after entering Info to run a tutorial on using Info. + If you specify a numeric argument, `C-h i' prompts for the name of a +documentation file. This way, you can browse a file which doesn't have +an entry in the top-level Info menu. It is also handy when you need to +get to the documentation quickly, and you know the exact name of the +file. + + There are two special help commands for accessing XEmacs +documentation through Info. `C-h C-f FUNCTION ' enters Info and +goes straight to the documentation of the XEmacs function FUNCTION. +`C-h C-k KEY' enters Info and goes straight to the documentation of the +key KEY. These two keys run the commands `Info-elisp-ref' and +`Info-goto-emacs-key-command-node'. + If something surprising happens, and you are not sure what commands you typed, use `C-h l' (`view-lossage'). `C-h l' prints the last 100 -command characters you typed. If you see commands you don't know, use -`C-h c' to find out what they do. +command characters you typed in. If you see commands that you don't +know, you can use `C-h c' to find out what they do. - Emacs has several major modes. Each mode redefines a few keys and + XEmacs has several major modes. Each mode redefines a few keys and makes a few other changes in how editing works. `C-h m' (`describe-mode') prints documentation on the current major mode, which normally describes all the commands that are changed in this mode. `C-h b' (`describe-bindings') and `C-h s' (`describe-syntax') -present information about the current Emacs mode that is not covered by -`C-h m'. `C-h b' displays a list of all key bindings currently in -effect, with the local bindings of the current major mode first, +present information about the current XEmacs mode that is not covered +by `C-h m'. `C-h b' displays a list of all the key bindings currently +in effect, with the local bindings of the current major mode first, followed by the global bindings (*note Key Bindings::). `C-h s' displays the contents of the syntax table with explanations of each character's syntax (*note Syntax::). + You can get a similar list for a particular prefix key by typing +`C-h' after the prefix key. (There are a few prefix keys for which +this does not work--those that provide their own bindings for `C-h'. +One of these is , because ` C-h' is actually `C-M-h', which +marks a defun.) + The other `C-h' options display various files of useful information. -`C-h C-w' (`describe-no-warranty') displays details on the complete -absence of warranty for XEmacs. `C-h n' (`view-emacs-news') displays -the file `emacs/etc/NEWS', which contains documentation on Emacs -changes arranged chronologically. `C-h t' (`help-with-tutorial') -displays the learn-by-doing Emacs tutorial. `C-h C-c' -(`describe-copying') displays the file `emacs/etc/COPYING', which tells -you the conditions you must obey in distributing copies of Emacs. `C-h -C-d' (`describe-distribution') displays another file named -`emacs/etc/DISTRIB', which tells you how you can order a copy of the -latest version of Emacs. +`C-h C-w' (`describe-no-warranty') displays the full details on the +complete absence of warranty for XEmacs. `C-h n' (`view-emacs-news') +displays the file `xemacs/etc/NEWS', which contains documentation on +XEmacs changes arranged chronologically. `C-h F' (`xemacs-local-faq') +displays local version of the XEmacs +frequentliy-answered-questions-list. `C-h t' (`help-with-tutorial') +displays the learn-by-doing XEmacs tutorial. `C-h C-c' +(`describe-copying') displays the file `xemacs/etc/COPYING', which +tells you the conditions you must obey in distributing copies of +XEmacs. `C-h C-d' (`describe-distribution') displays another file named +`xemacs/etc/DISTRIB', which tells you how you can order a copy of the +latest version of XEmacs.  File: xemacs.info, Node: Mark, Next: Mouse Selection, Prev: Help, Up: Top @@ -1028,115 +1200,3 @@ can paste it into other X applications and use the options from the Edit pull-down menu on it. Since it is also the Emacs region, you can use Emacs region commands on it. - -File: xemacs.info, Node: Additional Mouse Operations, Next: Killing, Prev: Mouse Selection, Up: Top - -Additional Mouse Operations -=========================== - - XEmacs also provides the following mouse functions. Most of these -are not bound to mouse gestures by default, but they are provided for -your customization pleasure. For example, if you wanted `shift-left' -(that is, holding down the key and clicking the left mouse -button) to delete the character at which you are pointing, then you -could do this: - - (global-set-key '(shift button1) 'mouse-del-char) - -`mouse-del-char' - Delete the character pointed to by the mouse. - -`mouse-delete-window' - Delete the Emacs window that the mouse is on. - -`mouse-keep-one-window' - Select the Emacs window that the mouse is on, then delete all other - windows on this frame. - -`mouse-kill-line' - Kill the line pointed to by the mouse. - -`mouse-line-length' - Print the length of the line indicated by the pointer. - -`mouse-scroll' - Scroll point to the mouse position. - -`mouse-select' - Select the Emacs window the mouse is on. - -`mouse-select-and-split' - Select the Emacs window mouse is on, then split it vertically in - half. - -`mouse-set-mark' - Select the Emacs window the mouse is on and set the mark at the - mouse position. Display the cursor at that position for a second. - -`mouse-set-point' - Select the Emacs window that the mouse is on and move point to the - mouse position. - -`mouse-track' - Make a selection with the mouse. This is the default binding of - the left mouse button (). - -`mouse-track-adjust' - Extend the existing selection. This is the default binding of - . - -`mouse-track-and-copy-to-cutbuffer' - Make a selection like `mouse-track', but also copy it to the cut - buffer. - -`mouse-track-delete-and-insert' - Make a selection with the mouse and insert it at point. This is - the default binding of . - -`mouse-track-insert' - Make a selection with the mouse and insert it at point. This is - the default binding of . - -`mouse-window-to-region' - Narrow a window to the region between the cursor and the mouse - pointer. - - The `M-x mouse-track' command should be bound to a mouse button. If -you click-and-drag, the selection is set to the region between the -point of the initial click and the point at which you release the -button. These positions do not need to be ordered. - - If you click-and-release without moving the mouse, the point is -moved, and the selection is disowned (there will be no selection -owner.) The mark will be set to the previous position of point. - - If you double-click, the selection will extend by symbols instead of -by characters. If you triple-click, the selection will extend by lines. - - If you drag the mouse off the top or bottom of the window, you can -select pieces of text that are larger than the visible part of the -buffer; the buffer will scroll as necessary. - - The selected text becomes the current X selection, and is also -copied to the top of the kill ring. Point will be left at the position -at which you released the button and the mark will be left at the -initial click position. Bind a mouse click to -`mouse-track-and-copy-to-cutbuffer' to copy selections to the cut -buffer. (See also the `mouse-track-adjust' command, on -`Shift-button1'.) - - The `M-x mouse-track-adjust' command should be bound to a mouse -button. The selection will be enlarged or shrunk so that the point of -the mouse click is one of its endpoints. This is only meaningful after -the `mouse-track' command () has been executed. - - The `M-x mouse-track-delete-and-insert' command is exactly the same -as the `mouse-track' command on , except that point is not -moved; the selected text is immediately inserted after being selected; -and the text of the selection is deleted. - - The `M-x mouse-track-insert' command is exactly the same as the -`mouse-track' command on , except that point is not moved; the -selected text is immediately inserted after being selected; and the -selection is immediately disowned afterwards. - diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 968f40e..2615c4a 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,22 @@ +2000-03-20 Martin Buchholz + + * XEmacs 21.2.32 is released. + +2000-03-20 Martin Buchholz + + * make-dump-id.c: Use config.h and systime.h for portability. + +2000-02-20 Olivier Galibert + + * make-dump-id.c: Added. + + * Makefile.in.in: Add support for make-dump-id. + +2000-03-12 Ben Wing + + * etags.c (canonicalize_filename): fixed a problem with gratuitous + capitalization of file names under MS Windows. + 2000-02-23 Martin Buchholz * XEmacs 21.2.31 is released. diff --git a/lib-src/Makefile.in.in b/lib-src/Makefile.in.in index d926072..44195bd 100644 --- a/lib-src/Makefile.in.in +++ b/lib-src/Makefile.in.in @@ -375,6 +375,9 @@ make-msgfile: ${srcdir}/make-msgfile.c make-po: ${srcdir}/make-po.c $(CC) $(cflags) ${srcdir}/make-po.c $(ldflags) -o $@ +make-dump-id: ${srcdir}/make-dump-id.c + $(CC) $(cflags) ${srcdir}/make-dump-id.c $(ldflags) -o $@ + cflags_gnuserv = $(CFLAGS) $(cppflags) $(c_switch_all) ldflags_gnuserv = $(LDFLAGS) $(ld_switch_all) @libs_xauth@ $(ld_libs_general) gnuslib.o: ${srcdir}/gnuslib.c ${srcdir}/gnuserv.h ../src/config.h diff --git a/lib-src/etags.c b/lib-src/etags.c index 680f145..6aa6055 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -5457,7 +5457,7 @@ canonicalize_filename (fn) { #ifdef DOS_NT /* Canonicalize drive letter case. */ - if (islower (fn[0])) + if (islower (fn[0]) && fn[1] == ':') fn[0] = toupper (fn[0]); /* Convert backslashes to slashes. */ for (; *fn != '\0'; fn++) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ac4d15b..f3de4f8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,482 @@ +2000-03-20 Martin Buchholz + + * XEmacs 21.2.32 is released. + +2000-03-20 Andy Piper + + * gutter-items.el (update-tab-in-gutter): force selection of the + selected-window if required to do so. + (buffers-tab-items): ditto. + (add-tab-to-gutter): ditto. + (create-frame-hook): use force-selection. + (default-gutter-position-changed): lambdify. + (update-tab-hook): deleted since it was only used in one place. + +2000-03-18 Andy Piper + + * files.el (find-file-noselect): undo change that shouldn't have + gone in. + +2000-03-17 Andy Piper + + * buffer.el (switch-to-buffer): use last-nonminibuf-window instead + of selected-window trickery. + + * gutter-items.el (update-tab-in-gutter): don't give dedicated + frames tabs. + (progress-display-stop-callback): progress -> progress-display + (progress-display-quit-function): ditto. + (clear-progress-display): ditto. + (remove-progress-display): ditto. + (append-progress-display): ditto. + (abort-progress-display): ditto. + (raw-append-progress-display): ditto. + (display-progress-display): ditto. + (current-progress-display-label): ditto. + (current-progress-display): ditto. + (lprogress-display): ditto and save the buffer + (progress-display): ditto. Otherwise the buffer sometimes gets + changed which confuses font-lock. + + * font-lock.el (font-lock-default-fontify-buffer): catch all + errors, not just quit. + (font-lock-mode): progress -> display-progress + (font-lock-default-fontify-buffer): ditto. + (font-lock-fontify-syntactically-region): ditto. + (font-lock-fontify-keywords-region): ditto. + +2000-03-14 Hrvoje Niksic + + * cl.el (gensym): Move to here from cl-macs.el. + (gentemp): Ditto. + +2000-03-16 Andy Piper + + * font-lock.el (font-lock-mode): use lprogress and friends for + progress management. + (font-lock-default-fontify-buffer): ditto. + (font-lock-fontify-syntactically-region): ditto. + (font-lock-fontify-keywords-region): ditto. + (font-lock-revert-cleanup): fix reverting. + (font-lock-revert-setup): ditto. + + * gutter-items.el (progress-use-echo-area): new variable. Use the + echo area for progress gauges if non-nil. + (clear-progress): remove echo area stuff and defer to + clear-message. + (append-progress): dispatch non-command events after each progress + increment. Remove echo area stuff. + (abort-progress): remove echo area stuff and defer to + display-message. + (raw-append-progress): ditto. Dispatch non-command events after + gutter redisplay. + (display-progress): defer echo area stuff to display-message. + + * gutter-items.el (clear-progress): + (abort-progress): indentation changes. + (display-progress): don't clear progress. + (append-progress): compare messages with equal. + (raw-append-progress): use dispatch-non-command-events to flush + widget creation events. + +2000-03-13 Ben Wing + + * abbrev.el: + * abbrev.el (abbrev-string-to-be-defined): New. + * abbrev.el (inverse-abbrev-string-to-be-defined): New. + Changes for use with the menubar. + +2000-03-12 Ben Wing + + * alist.el (vassoc): moved here from font-menu.el. + + * custom.el (defface): typo fix. + + * dialog.el (yes-or-no-p-dialog-box): + * dialog.el (message-box): + * files.el (save-some-buffers-1): + Put accelerators in the button names. + + * font-lock.el (font-lock-comment-face): + * font-lock.el (font-lock-keyword-face): + * font-lock.el (font-lock-function-name-face): + Fixed some of the colors under MS Windows because the existing + default colors were hardly different from black and needed to be + made lighter. + + * font-menu.el: + * font-menu.el (font-menu-split-long-menu): + * font-menu.el (font-menu-family-constructor): + * font-menu.el (font-menu-size-constructor): + * font-menu.el (font-menu-weight-constructor): + * font-menu.el (font-menu-set-font): + vassoc moved to alist.el. + Accelerators added to all menus. + Unused bound var new-props removed. + + * keydefs.el: I did a whole lot of rearranging to put things in a + more consistent order and fixed a number of cases where key + combinations involving up, down, left, right and so on were + defined but the corresponding keypad combinations were not + defined. + + * lisp-mode.el: + * lisp-mode.el (lisp-interaction-mode-popup-menu): + * lisp-mode.el (emacs-lisp-mode): + * lisp-mode.el (lisp-interaction-mode): + * lisp-mode.el (flet): + Added accelerators onto the menus. + Made all the different versions of the let function be indented + the same way. + Undid Steve's easy-menu-ification, because it makes it impossible + to have the menubar and popup menus different. + Cleaned up the menu; added items for find-function &c and some + indenting, and removed debug-on-*. + + * list-mode.el (list-mode-hook): + * list-mode.el (list-mode): + * list-mode.el (completion-setup-hook): + * list-mode.el (display-completion-list): + Added support for the :window-height keyword, which is required + because of other changes that I made for the file dialog box. I + also made the hook variables list-mode-hook and + completion-setup-hook and also minibuffer-setup-hook in + minibuf.el be permanent-local; see comment in list-mode.el. + + * map-ynp.el (map-y-or-n-p): + Added accelerators to the dialog buttons. + + * menubar-items.el (menu-truncate-list): + New internal function. + * menubar-items.el (submenu-generate-accelerator-spec): + * menubar-items.el (menu-item-strip-accelerator-spec): + * menubar-items.el (menu-item-generate-accelerator-spec): + New exported functions, for use in auto-generating accelerator specs. + + * menubar-items.el: + * menubar-items.el (default-menubar): + * menubar-items.el (maybe-add-init-button): + * menubar-items.el (bookmark-menu-filter): + * menubar-items.el (slow-format-buffers-menu-line): + * menubar-items.el (build-buffers-menu-internal): + * menubar-items.el (language-environment-menu-filter): + * menubar-items.el (default-popup-menu): + * menubar-items.el (popup-buffer-menu): + * menubar-items.el (popup-menubar-menu): + Did a major overhaul on this file, and in fact I'm nowhere near + done working on the menubar, and there will be more patches to + come. A basic summary of what I've done: + + a) I added accelerators to all of the menu items. For menus that + are auto-generated, such as the buffers menu, the accelerators are + automatically added to the beginning of each line using the + numbers 1 through 9, then zero, and then letters starting with A, + but omitting the letters that are already in use for the fixed + menu items at the top of the buffers menu. To facilitate adding + accelerators of this kind, I created some new functions + (*-accelerator-spec), which are also being used by other filters + that auto generate lists of things such as ftp sites to download + packages. If people really don't like these accelerators + appearing at the beginning of the menu items, a variable can be + added to optionally turn them off, but I think this is rather + pointless because other menu items have accelerators and many or + most of the menu users will use the accelerators if the support is + there. + + b) I combined the top level Tools and Apps menus into a single + Tools menu, because the distinction between the two is not + obvious, and the items on the menus are not used often enough that + putting some of them onto submenus is a problem. + + c) I created two new top level menus called View and Cmds because + there were too many items on the File and Edit menus, and I'm going + to be adding more items to these menus. In contrast to the Tools + menu, the items on these menus may be used quite often during an + editing session, and so should be available with fewer + keystrokes. + + d) I added a number of options to the options menu, including one + for controlling whether the alt key can be used to traverse to + menu items using the accelerators, one for controlling behavior of + control-k, one for controlling how the kill and yank functions + interact with the clipboard, a few additional buffers-menu + options, and various other things. I also did a bit of + rearranging, for example, combining the keyboard and mouse options + into a single keyboard and mouse submenu to facilitate the + accelerators on that level. + + e) I changed the variable buffers-menu-format-buffer-line-function + to take two arguments instead of one, the second argument being + the line number for use in creating an accelerator. I added a + hack to support existing functions with one argument (although I + doubt that very many of these exist), for backward compatibility. + + f) I moved the top level mule menu to be a submenu of the edit + menu. I think that most of the items on this menu are fairly + useless and there are certainly not enough frequently used items + to justify this being its own top level menu. + + g) I combined most of the items in big-menubar.el into the main menu. + If people think the main menu is too big, it would be possible to + create different configurations, some smaller. + + * menubar.el (check-menu-syntax): + Deleted some syntax checks that were no longer valid, partly + because of changes that were already made a long time ago, and + partly because of a change I made where I allow the name of the + menu item to be an evaluated expression rather than just a string, + similar to all of the other parameters of a menu item. + + * minibuf.el: + * minibuf.el (read-file-name-1): + * minibuf.el (mouse-read-file-name-1): + I made a number of changes to improve the appearance + and functioning of the file dialog box. They include: + + a) Fixing the problem where closing the dialog box by clicking on + the close button of the window didn't properly exit the + minibuffer. + + b) Fixing the problem that if you typed part of a file name, and + then clicked on a completion with the mouse, the file was not + correctly selected. + + c) Changing the title of the dialog box to reflect the operation + being done in accordance with user interface conventions, rather + than the name of the dialog box buffer, which is rather useless. + + d) Remove the words "possible completions are" which didn't + belong. + + e) Fix things so that the completions scroll off the end of the + completions windows only to the right, rather than both to the + right and down, which is in accordance with Windows user interface + conventions. + + * msw-init.el (init-post-mswindows-win): + Added a binding for meta-F4, which is the standard windows binding + for exiting a program. + + * select.el (get-selection-no-error): + * select.el (own-selection): + * select.el (own-clipboard): + Added an optional argument called append to the functions + own-selection and own-clipboard. This adds support for appending + text to the existing selection and allows the function + own-clipboard to be used as the value of the variable + interprogram- cut-function. + + Fixed a bug in own-selection in handling zmacs-region-stays. + + * simple.el (historical-kill-line): New. + + * simple.el (kill-line): + * simple.el (interprogram-cut-function): + * simple.el (interprogram-paste-function): + * simple.el (handle-pre-motion-command): + * simple.el (next-line): + * simple.el (previous-line): + a) Expanded the variable kill-whole-line, so that function + kill-line can be set to delete the entire line always, not just + when cursor is at the beginning of the line. This is controlled + by setting the variable kill-whole-line to the symbol 'always. + This behavior, as well as the existing kill-whole-line behavior, + now only take effect when kill-line is called interactively, + although this is a departure from a previous behavior in the case + of setting this variable kill-whole-line to t. It is almost + certainly what has always been intended, and most likely the old + way of doing things introduced bugs. I also created a function + called historical-kill-line, which ignores the kill-whole-line + setting and always gives the historical behavior of only killing + to the end of the line. I bound this function to shift- control-k + so that the kill to end of line behavior is available, even when + kill-whole-line has been set to change control-k into the simple + delete-whole-line behavior. (This can be set using the options + menu.) + + b) I changed things so that kill and yank now interact with the + clipboard by default under windows. This was done by changing the + default value of interprogram-cut- function and + interprogram-paste-function. You can get the old behavior by + setting these to nil, and there is an option on the options menu + to do this. + + c) I added support for selecting text using shifted motion keys. + This support is on by default and can be controlled by the + variable shifted-motion-keys-select-region. There is also a + variable called unshifted-motion-keys-deselect-region that + controls more specifically how the shifted motion key behavior + works. I did not put an option on the options menu to turn this + off, because I can't imagine why this would be useful. + + * simple.el (forward-block-of-lines): + * simple.el (backward-block-of-lines): + * simple.el (block-movement-size): + New. + + * simple.el (uncapitalized-title-words): + * simple.el (uncapitalized-title-word-regexp): + * simple.el (capitalize-string-as-title): + * simple.el (capitalize-region-as-title): + New. + + + * subr.el (add-hook): + * subr.el (make-local-hook): New. + * subr.el (remove-local-hook): New. + * subr.el (add-one-shot-hook): New. + * subr.el (add-local-one-shot-hook): New. + Added some functions to make using hooks easier. + These include: + + a) Functions add-local-hook and remove-local-hook to make it easy + to use local hooks. + + b) Functions add-one-shot-hook and add-local-one-shot-hook, which + make it possible to add a "one-shot" hook, which is to say a hook + that runs only once, and automatically removes itself after the + first time it has run. + +2000-03-09 Andy Piper + + * files.el (auto-mode-alist): pick up jsp, jhtml and xml files. + +2000-03-09 Yoshiki Hayashi + + * buff-menu.el (buffers-menu-omit-invisible-buffers): + Moved from menubar-items.el. + * dumped-lisp.el: Dump gutter-items regardless of menubar. + +2000-03-08 Andy Piper + + * gutter-items.el (build-buffers-tab-internal): add selected field + to buffers tab spec. + +2000-03-07 Yoshiki Hayashi + + * minibuf.el (last-exact-completion): Initialize to nil. + +2000-03-07 Didier Verna + + * startup.el (command-line-1): remove unused variable + `first-file-buffer'. + +2000-02-29 Hrvoje Niksic + + * loaddefs.el (completion-ignored-extensions): Removed ".log", + which is also used for Web server log files. + +2000-02-03 IKEYAMA Tomonori + + * mule/mule-charset.el: Setup auto-fill-chars. + +2000-03-02 SL Baur + + * subr.el (with-string-as-buffer-contents): Reimplement using + `with-temp-buffer'. Fixes non-unique buffer name problem, fixes + non-deletion of buffer after execution problem. + (with-output-to-string): Use unique buffer name. + +2000-02-29 Stephen J. Turnbull + + * gutter-items.el (buffers-tab-sort-function): New variable. + (buffers-tab-items): Funcall it to sort the buffer tab list. + +2000-02-29 Stephen J. Turnbull + + * startup.el (load-user-init-file): Merge two `if's to one `or'. + +2000-02-28 Martin Buchholz + + * menubar-items.el (maybe-add-init-button): Remove the "Load + .emacs" button from all menubars. + +2000-03-01 Didier Verna + + * rect.el (string-rectangle): depend on `pending-delete-mode' for + region rectangle replacement (from Jan Vroonhof). + (replace-rectangle): new function. + +2000-01-05 Yoshiki Hayashi + + * mule/mule-cmds.el (set-default-coding-systems): Use + set-terminal-coding-system and set-keyboard-coding-system. + * coding.el (set-terminal-coding-system): Use + set-console-tty-output-coding-system. + (set-keyboard-coding-system): Use + set-console-tty-input-coding-system. + +2000-02-21 Yoshiki Hayashi + + * minibuf.el (read-variable): Allow symbol to default argument. + +>>>>>>> 1.156.2.301 +2000-02-27 Andy Piper + + * gutter-items.el (update-tab-hook): new function to be used for + hooks. + (create-frame-hook): add update-tab-hook. + (record-buffer-hook): ditto. + (default-gutter-position-changed): ditto. + (default-gutter-position): updating the buffers tab is now handled + by a hook. + (default-gutter-position-changed-hook): new variable. + (gutter-element-visibility-changed-hook): ditto. + (set-gutter-element-visible-p): call it. + (set-gutter-element): use modify-specifier-instances. Set extents + as duplicable before using. + (remove-gutter-element): ditto. + (set-gutter-element-visible-p): ditto. + (init-gutter): new function. + (add-tab-to-gutter): use new gutter-element functions rather than + setting specifiers directly. + (clear-progress): ditto. + (abort-progress): ditto. + (gutter-buffers-tab-visible-p): renamed from + default-gutter-visible-p + + * specifier.el (modify-specifier-instances): new function from Jan + Vroonhof. + + * x-init.el (init-post-x-win): call init-gutter. + + * msw-init.el (init-post-mswindows-win): call init-gutter. + + * menubar-items.el (default-menubar): Update to reflect new gutter + variables. + +2000-02-26 Andy Piper + + * gutter-items.el (set-gutter-element): new function. Add gutter + elements to the specified gutter. + (remove-gutter-element): new function. Remove gutter elements from + the specified gutter. + (set-gutter-element-visible-p): new function. Set gutter element + visibility for the provided gutter-visible specifier. + +2000-02-23 Andy Piper + + * gutter-items.el (add-tab-to-gutter): specify dimensions + dynamically. + +2000-02-24 Martin Buchholz + + * gutter-items.el (add-tab-to-gutter): + * package-get.el (package-get-interactive-package-query): + * package-ui.el (pui-directory-exists): + (pui-install-selected-packages): + (pui-list-packages): + Use #'(lambda ...) instead of '(lambda ...). + +2000-02-21 Gregory Neil Shapiro + + * startup.el (load-user-init-file): Check to make sure user + has an init-file before calling load(). + +2000-02-20 Kirill 'Big K' Katsnelson + + * msw-glyphs.el (msgdi-device-p): Added this and 'msgdi specifier tag. + 2000-02-23 Martin Buchholz * XEmacs 21.2.31 is released. @@ -15,9 +494,9 @@ 2000-02-19 Martin Buchholz - * byte-optimize.el (byte-optimize-plus): - (byte-optimize-minus): - (byte-optimize-multiply): + * byte-optimize.el (byte-optimize-plus): + (byte-optimize-minus): + (byte-optimize-multiply): Optimize (- 0) to 0, not (-) Optimize (+ 5 3.0) to 8.0 Optimize (* 5 3.0) to 15.0 @@ -33,8 +512,8 @@ defaults. 2000-02-09 Stef Epardaud - - * font-lock.el: Javadoc enhancements + + * font-lock.el: Javadoc enhancements 1999-11-27 Oscar Figueiredo @@ -44,23 +523,23 @@ Conditionalize message display on ldap-verbose (ldap-add-entries, ldap-modify-entries, ldap-delete-entries): New defuns - (ldap-search): Is now defined as an obsolete wrapper calling + (ldap-search): Is now defined as an obsolete wrapper calling ldap-search-basic or ldap-search-entries -1999-12-06 Hirokazu FUKUI +1999-12-06 Hirokazu FUKUI Shuhei KOBAYASHI Jan Vroonhof - - * byte-optimize.el (byte-optimize-form-code-walker): Fixed. - When for-effect is true, didn't call `byte-optimize-form' - in and/or subforms without last. - -1999-12-07 Jan Vroonhof - - * package-get.el (package-get-download-sites): Use correct custom - type. - + + * byte-optimize.el (byte-optimize-form-code-walker): Fixed. + When for-effect is true, didn't call `byte-optimize-form' + in and/or subforms without last. + +1999-12-07 Jan Vroonhof + + * package-get.el (package-get-download-sites): Use correct custom + type. + 2000-02-15 Kirill 'Big K' Katsnelson * files.el (write-file): Ask for coding system when compiled with @@ -80,7 +559,7 @@ unexist function to help-map. (describe-coding-system): Don't use already assigend `C'. -2000-01-23 Björn Torkelsson +2000-01-23 Bjrn Torkelsson * info.el (Info-save-auto-generated-dir): nil -> 'never to make it work in custom. @@ -116,7 +595,7 @@ part of the tag entry first instead of only looking in the context area. -2000-01-23 Björn Torkelsson +2000-01-23 Bjrn Torkelsson * gutter-items.el: fixed typo(s) in customizing default-gutter-position * toobar.el: fixed typo(s) in customizing default-toolbar-position @@ -149,7 +628,7 @@ 2000-02-02 Per Abrahamsen * wid-edit.el (widget-match-inline): An atom never matches a - list. + list. 2000-01-29 Kirill 'Big K' Katsnelson @@ -173,9 +652,9 @@ 2000-01-28 Martin Buchholz - * coding.el (dontusethis-set-value-file-name-coding-system-handler): - (dontusethis-set-value-terminal-coding-system-handler): - (dontusethis-set-value-keyboard-coding-system-handler): + * coding.el (dontusethis-set-value-file-name-coding-system-handler): + (dontusethis-set-value-terminal-coding-system-handler): + (dontusethis-set-value-keyboard-coding-system-handler): Never undefine coding system aliases. Emergency fix for gnus. 2000-01-26 Hrvoje Niksic @@ -216,20 +695,20 @@ * process.el (shell-quote-argument): Use (nt-quote-process-args) for windows-nt. - * version.el: - * startup.el (user-init-file-base): - * process.el (call-process-region): - * files.el (make-backup-file-name): - (backup-file-name-p): - (file-relative-name): - (abbreviate-file-name): - (set-auto-mode): + * version.el: + * startup.el (user-init-file-base): + * process.el (call-process-region): + * files.el (make-backup-file-name): + (backup-file-name-p): + (file-relative-name): + (abbreviate-file-name): + (set-auto-mode): * code-process.el (call-process-region): Removed unnecessary branching on 'windows-nt and 'ms-dos system types. Phased 'ms-dos support out of the universe. * process.el: - * code-process.el: + * code-process.el: * bytecomp.el (byte-compile-file): Removed reference to buffer-file-type, and commented usage of binary-process-output NTEmacs variables. @@ -1080,7 +1559,7 @@ (ldap-encode-string): Guard against `encode-coding-string' not being defined -1999-08-23 Didier Verna +1999-08-23 Didier Verna * rect.el: Cosmetics suggested by Dave Love . Some doc strings improvements, and add a star to the `interactive' @@ -1115,14 +1594,14 @@ * gutter-items.el (remove-buffer-from-gutter-tab): fix *scratch* deletion problem. -1999-07-30 Didier Verna +1999-07-30 Didier Verna * cus-edit.el (custom-save-variables): I said, use prin1 instead of princ to output symbols. (custom-save-face-internal): ditto. (custom-save-resets): ditto. -1999-08-09 Didier Verna +1999-08-09 Didier Verna * gutter-items.el (select-buffers-tab-buffers-by-mode): use `regexp-quote' to protect the major mode name for use as a regular @@ -1813,7 +2292,7 @@ doc-directory. From Karl M. Hegbloom -1999-07-19 Didier Verna +1999-07-19 Didier Verna * rect.el: all functions rewritten, except when noted. Below is a list of interface changes. @@ -1864,7 +2343,7 @@ * gui.el (make-dialog-frame): turn off gutters for dialogs. -1999-07-15 Didier Verna +1999-07-15 Didier Verna * cus-edit.el (custom-prompt-variable): optional third arg makes prompt for a comment string. @@ -2577,7 +3056,7 @@ * simple.el (delete-key-deletes-forward): Revert to previous behavior. -1999-01-18 Didier Verna +1999-01-18 Didier Verna * menubar-items.el (xemacs-splash-buffer): handle the case of multiple elements in the splash buffer body. @@ -2615,7 +3094,7 @@ * package-get.el (package-get-custom): don't load package-get-custom as it is auto-generated. Fix group definition. -1999-03-05 Didier Verna +1999-03-05 Didier Verna * cus-dep.el (Custom-make-dependencies): use `prin1-to-string' instead of `symbol-name' (Thanks Kyle). @@ -2637,7 +3116,7 @@ * font-lock.el (font-lock-revert-cleanup): Null out to avoid repeated calls to font-lock during buffer reversion. -1999-02-12 Didier Verna +1999-02-12 Didier Verna * info.el (Info-build-node-completions): unconditionally widen the tag table buffer. @@ -2760,7 +3239,7 @@ * XEmacs 21.2.9 is released -1999-01-19 Didier Verna +1999-01-19 Didier Verna * replace.el (replace-search-function): new variable containing a function to perform a search-forward. @@ -2768,7 +3247,7 @@ to perform a re-search-forward. (perform-replace): use them. -1999-01-25 Didier Verna +1999-01-25 Didier Verna * select.el (selection-owner-p): use the name `XEmacs'. (cut-copy-clear-internal): ditto. @@ -2784,7 +3263,7 @@ * minibuf.el (minibuffer-completion-table): ditto. * cl-macs.el (return-from): ditto. -1999-01-04 Didier Verna +1999-01-04 Didier Verna * replace.el (delete-non-matching-lines): temporarily disable case-folding when called interactively with a regexp containing @@ -2867,7 +3346,7 @@ (pui-list-packages): Add warning when `package-get-remote' is nil. (package-ui-add-site): New function. -1998-12-01 Didier Verna +1998-12-01 Didier Verna * hyper-apropos.el (hyper-where-is): added the missing autoload. @@ -3350,7 +3829,7 @@ * package-get-base.el: removed. -1998-09-23 Didier Verna +1998-09-23 Didier Verna * simple.el (search-caps-disable-folding): moved from isearch-mode.el (no-upper-case-p): new function. @@ -3648,7 +4127,7 @@ * lisp-mode.el (with-string-as-buffer-contents): Set indentation. -1998-07-17 Didier Verna +1998-07-17 Didier Verna * faces.el (set-face-property): (set-face-dim-p): @@ -4246,7 +4725,7 @@ `save-some-buffers'. (save-some-buffers): Force redisplay only if windows were deleted. -1998-06-02 Didier Verna +1998-06-02 Didier Verna * cus-face.el (custom-face-attributes): generalized the use of toggle buttons for boolean attributes. @@ -4629,7 +5108,7 @@ Wed May 27, 1998 Darryl Okahata * simple.el (zap-up-to-char): New function. Behaves like `zap-to-char' in Emacs 18. -1998-05-13 Didier Verna +1998-05-13 Didier Verna * mouse.el (drag-window-divider): give the vertical divider a pressed look when dragging it. @@ -5129,7 +5608,7 @@ Wed May 27, 1998 Darryl Okahata * default.el: Removed. * site-start.el: Removed. -1998-04-29 Didier Verna +1998-04-29 Didier Verna * minibuf.el (minibuffer-history-minimum-string-length): Default to nil. @@ -5203,7 +5682,7 @@ Sat Apr 24 1998 Andy Piper * msw-glyphs.el: enable graphics support. -1998-04-23 Didier Verna +1998-04-23 Didier Verna * x-menubar.el (default-menubar): restored the line-number-mode option. @@ -5247,7 +5726,7 @@ Sat Apr 24 1998 Andy Piper * package-get.el (package-get-all): add `\n' separator to interactive specification so that both variables are read -1998-04-22 Didier Verna +1998-04-22 Didier Verna * x-menubar.el: ported the options menu to Custom. Moved the "read only" toggle button to the buffers menu. @@ -5386,7 +5865,7 @@ Thu Apr 16 12:59:35 1998 Andy Piper 1998-04-16 SL Baur * files.el (toggle-read-only): Fix docstring. - From Didier Verna + From Didier Verna 1998-04-14 Michael Sperber [Mr. Preprocessor] @@ -6029,7 +6508,7 @@ Tue Feb 17 12:50:37 1998 Andy Piper windows on the currently selected fgrame before searching other frames. -1998-02-25 Didier Verna +1998-02-25 Didier Verna * modeline.el (modeline-swap-buffers): originally named `mouse-release-modeline'. Whether to actually swap the buffers is @@ -6091,7 +6570,7 @@ Tue Feb 17 12:50:37 1998 Andy Piper configuration, hosing temp-buffer-show-function. -1998-02-23 Didier Verna +1998-02-23 Didier Verna * modeline.el (mouse-drag-modeline): - Always scroll the modeline that was originally clicked on. @@ -6100,7 +6579,7 @@ Tue Feb 17 12:50:37 1998 Andy Piper keep on dragging the modeline even if the motion event occurs in another window. -1998-02-23 Didier Verna +1998-02-23 Didier Verna * x-mouse.el (x-init-pointer-shape): use a crossed-arrows cursor glyph on the modeline to indicate that dragging the mouse has an @@ -6127,7 +6606,7 @@ Tue Feb 17 12:50:37 1998 Andy Piper Prevents display flickering when the mouse pointer moves. -1998-02-17 Didier Verna +1998-02-17 Didier Verna * mouse.el (default-mouse-track-set-point-in-window): rewrote this function to handle correctly the case of a toolbar one side of the @@ -6274,7 +6753,7 @@ Tue Feb 17 12:50:37 1998 Andy Piper * loadup.el: test-atoms debugging stuffs removed. -1998-02-03 Martin Buchholz > +1998-02-03 Martin Buchholz * lisp/loaddefs.el (completion-ignored-extensions): Add ".class" @@ -6457,7 +6936,7 @@ Tue Feb 17 12:50:37 1998 Andy Piper * (abbrev-mode): (put)'ed a `:menu-tag' on it and `auto-fill-function'. -1998-01-02 Karl M. Hegbloom <> +1998-01-02 Karl M. Hegbloom * modeline.el (modeline-minor-mode-menu): Changed the string-only menus to :style 'toggle. @@ -6481,7 +6960,7 @@ Tue Feb 17 12:50:37 1998 Andy Piper (toolbar-mail-reader): Add support for `send'. From Jonathan Marten -1998-01-05 Karl M. Hegbloom <> +1998-01-05 Karl M. Hegbloom * info.el (Info-emacs-info-file-name): Add defvar for `Info-emacs-info-file-name' so that `Info-goto-emacs-command-node' @@ -6548,7 +7027,7 @@ Tue Feb 17 12:50:37 1998 Andy Piper * packages.el (package-require): Update to reflect new data format. -1998-01-02 Didier Verna +1998-01-02 Didier Verna * x-menubar.el (default-menubar): make the tutorials available through the menubar. (Plus some compilation warnings cleanup). @@ -6798,7 +7277,7 @@ Tue Feb 17 12:50:37 1998 Andy Piper * cl.el (eql): Compare integers with `eq'. (cl-map-extents): Check for `map-extents' first. -1997-12-17 Didier Verna +1997-12-17 Didier Verna * leim/quail/latin-pre.el ("french-prefix"): doc string cleanup + added the 'numero', 'copyright' and 'trademark' symbols. diff --git a/lisp/ChangeLog.1 b/lisp/ChangeLog.1 index f72e3c1..df5627e 100644 --- a/lisp/ChangeLog.1 +++ b/lisp/ChangeLog.1 @@ -130,7 +130,7 @@ 1997-12-07 Hrvoje Niksic - * wid-edit.el (widget-prettyprint-to-string): Nix cl-prettyprint's + * wid-edit.el (widget-prettyprint-to-string): Nix cl-prettyprint's newlines. 1997-12-06 Hrvoje Niksic @@ -151,7 +151,7 @@ 1997-12-07 SL Baur - * egg/egg-cwnn-leim.el (egg-pinyin-activate): New file. Interface + * egg/egg-cwnn-leim.el (egg-pinyin-activate): New file. Interface to Chinese Wnn server. * egg/egg-kwnn-leim.el: New file. Interface to Korean Wnn @@ -237,10 +237,10 @@ 1997-12-05 Mark Borges * mail/mail-extr.el (all-top-level-domains): - Two letter country codes synched with + Two letter country codes synched with http://www.iana.org/in-notes/iana/assignments/country-codes as updated by the RIPE Network Coordination Centre. - Source: ISO 3166 Maintenance Agency + Source: ISO 3166 Maintenance Agency Latest change: Thu Aug 7 17:59:51 MET DST 1997 1997-12-03 Eric Eide @@ -331,7 +331,7 @@ 1997-11-29 SL Baur - * update-elc.el ((preloaded-file-list site-load-packages)): Modify + * update-elc.el ((preloaded-file-list site-load-packages)): Modify error message to be more build-report.el friendly. * dumped-lisp.el (preloaded-file-list): Remove tooltalk/ prefix @@ -367,7 +367,7 @@ * x-menubar.el (default-menubar): Disable WWW items in help menu if no browse-url. - * help.el (xemacs-www-page): Print error message intead of bombing + * help.el (xemacs-www-page): Print error message intead of bombing if not browse-url. (xemacs-www-faq): Ditto. @@ -389,14 +389,14 @@ * x-toolbar.el (pending-delete): Don't (require 'pending-del). * x-menubar.el (pending-delete): Don't (require 'pending-del). - * x-menubar.el (bookmark-menu-filter): Add guards against bookmark + * x-menubar.el (bookmark-menu-filter): Add guards against bookmark package not being loaded. * mule/char-table.el: Imported from tm. * mule/chartblxmas.el: Ditto. * alist.el: Ditto. * overlay.el: Unpackaged for Quail. - + * x-menubar.el (default-menubar): Put guard on evaluation of `ps-paper-type'. (default-menubar): Put guard on `paren-mode'. @@ -427,7 +427,7 @@ * packages.el (packages-useful-lisp): advice.el is a package. - * x-menubar.el (default-menubar): Make `Options ... Color Printing' + * x-menubar.el (default-menubar): Make `Options ... Color Printing' a toggle. 1997-11-26 Kyle Jones @@ -448,7 +448,7 @@ 1997-11-25 Hrvoje Niksic - * custom.el (custom-declare-variable): Attach the symbol to + * custom.el (custom-declare-variable): Attach the symbol to load history. 1997-11-23 SL Baur @@ -505,7 +505,7 @@ 1997-11-17 Marc Paquette * efs/dired.el: Removed special case for windows-nt in - dired-get-filename(); no longer needed because we now do + dired-get-filename(); no longer needed because we now do CRLF->LF conversion upstream. 1997-11-18 Jonathan Harris @@ -657,9 +657,9 @@ 1997-11-12 Greg Klanderman - * packages/compile.el (compilation-build-compilation-error-regexp-alist): + * packages/compile.el (compilation-build-compilation-error-regexp-alist): Added documentation for this function. - + ** (compilation-error-regexp-systems-list): Update documentation to note that `compilation-build-compilation-error-regexp-alist' must be called after changing the value. Update customization to @@ -751,7 +751,7 @@ * utils/shadow.el (list-load-path-shadows): Supress message when no shadowings are found. - * loadup.el: Modify algorithm for finding initial lisp directories + * loadup.el: Modify algorithm for finding initial lisp directories since the search now starts from lisp/ not lisp/prim/. * update-elc.el: Ditto. * make-docfile.el: Ditto. @@ -856,7 +856,7 @@ Wed Nov 05 23:40:00 1997 Jonathan Harris Reinstated code that uses (mono x) as a specifer tag, but conditioned it on (featurep 'x) because x is not a valid specifier tag under native-win32. - + * Added file headers to: w32-faces.el, w32-init.el @@ -937,7 +937,7 @@ Sun Nov 01 12:00:00 1997 Jonathan Harris 1997-11-07 Kyle Jones * prim/modeline.el (mouse-drag-modeline): Don't - allow the window size to shrink to a size that is not a + allow the window size to shrink to a size that is not a multiple of the height of the default face's font. * prim/modeline.el (mouse-drag-modeline): Don't @@ -961,12 +961,12 @@ Sun Nov 01 12:00:00 1997 Jonathan Harris 1997-11-05 Jens-Ulrik Holger Petersen * mule/mule-cmds.el (set-default-coding-systems): Make - add-hook to `comint-exec-hook' be an append, for when the user + add-hook to `comint-exec-hook' be an append, for when the user changes language environment say. 1997-11-05 SL Baur - * prim/winnt.el: Use a cleaner method for getting Text/Binary file + * prim/winnt.el: Use a cleaner method for getting Text/Binary file type in the mode-line for MS Windows. 1997-11-06 Hrvoje Niksic @@ -1005,7 +1005,7 @@ Sun Nov 01 12:00:00 1997 Jonathan Harris fontifying after fontify-buffer. (lazy-shot-unstall): Make sure buffer is left in a fontified state if needed. Take optional argument. - + * packages/ps-print.el (ps-print-ensure-fontified): Added temporary support for lazy-shot. @@ -1014,10 +1014,10 @@ Sun Nov 01 12:00:00 1997 Jonathan Harris * utils/text-props.el (set-text-properties): Updated docstring. -1997-11-04 Didier Verna +1997-11-04 Didier Verna - * mule/mule-cmds.el (set-default-coding-systems): - The coding-system argument to comint-exec-hook wasn't evaluated + * mule/mule-cmds.el (set-default-coding-systems): + The coding-system argument to comint-exec-hook wasn't evaluated before building the lambda expression. 1997-11-04 Jens-Ulrik Holger Petersen @@ -1088,7 +1088,7 @@ Sun Nov 01 12:00:00 1997 Jonathan Harris * shell.el (shell-chdrive-regexp): New for DOS/NT (shell-mode): Added shell-font-lock-keywrods (shell-mode): Use $PWD for ksh - (shell-directory-tracker): Use dirs and dirtrack-toggle. This may + (shell-directory-tracker): Use dirs and dirtrack-toggle. This may cause problems at is interferes with "dired" (shell-snarf-envar): NEW (shell-copy-environment-variable): NEW @@ -1165,7 +1165,7 @@ Sun Nov 01 12:00:00 1997 Jonathan Harris characters, instead of consing a string each time. (synthesize-keysym): Better error checking. - * prim/keymap.el (synthesize-keysym): Don't bug out when reading a + * prim/keymap.el (synthesize-keysym): Don't bug out when reading a non-character event. 1997-11-02 Tomasz Cholewo @@ -1191,7 +1191,7 @@ Sun Nov 01 12:00:00 1997 Jonathan Harris * prim/packages.el: Updated commentary. (packages-useful-lisp): Added `cl-macs'. -1997-10-27 Didier Verna +1997-10-27 Didier Verna * prim/help-nomule.el (help-with-tutorial): The 'didactic' blank lines message is now taken directly from each tutorial, and thus @@ -1213,7 +1213,7 @@ Sun Nov 01 12:00:00 1997 Jonathan Harris Suggested by Michael Kifer * mule/mule-init.el: Remove `help-with-tutorial-for-mule'. - Suggested by Didier Verna + Suggested by Didier Verna * Disable Cyrillic CCL until CCL engine gets fixed. From: Martin Buchholz @@ -1230,7 +1230,7 @@ Sun Nov 01 12:00:00 1997 Jonathan Harris 1997-10-30 SL Baur - * vm/vm-vars.el (vm-image-directory): Use locate-data-directory if + * vm/vm-vars.el (vm-image-directory): Use locate-data-directory if it exists. * language/european.el: Remove erroneous references to @@ -1438,7 +1438,7 @@ Sun Nov 01 12:00:00 1997 Jonathan Harris * modes/enriched.el (enriched-face-ans): Use color-name instead of color-instance-name. - color-instance-name will not handle the specifiers that + color-instance-name will not handle the specifiers that are passed as arguments. 1997-10-28 Tomasz Cholewo @@ -1451,14 +1451,14 @@ Sun Nov 01 12:00:00 1997 Jonathan Harris * pcl-cvs/pcl-cvs-xemacs.el: Add `cvs-mode-update-no-prompt' to menu. From Stig Bjorlykke -1997-10-28 Didier Verna +1997-10-28 Didier Verna * packages/man.el (manual-entry): corrected the `when' form to include 'section' in the buffer name. 1997-10-28 SL Baur - * prim/packages (packages-find-pacakges): Fix test on + * prim/packages (packages-find-pacakges): Fix test on inhibit-package-init 1997-10-27 Tomasz Cholewo @@ -1488,7 +1488,7 @@ Sun Nov 01 12:00:00 1997 Jonathan Harris * egg/egg-leim.el: Registers EGG/Wnn with LEIM when loaded * egg/egg.el: Bind `toggle-egg-mode' to "\C-\" only if LEIM is - not present when loaded + not present when loaded 1997-10-27 SL Baur @@ -1610,7 +1610,7 @@ Fri Aug 8 12:58:00 1997 David Byers 1997-10-23 Per Abrahamsen * custom/cus-edit.el (hook): Use `widget-group-match' instead of - `widget-editable-list-match'. + `widget-editable-list-match'. 1997-10-23 SL Baur @@ -1626,7 +1626,7 @@ Fri Aug 8 12:58:00 1997 David Byers 1997-10-20 Jan Vroonhof * extents.c: Renamed shot property to initial-redisplay-function - (extent_fragment_update): Changed the bookkeeping whether an event + (extent_fragment_update): Changed the bookkeeping whether an event has been spawned. The initial-redisplay-function property is no longer set to nil. @@ -1641,7 +1641,7 @@ Fri Aug 8 12:58:00 1997 David Byers 1997-10-22 Hrvoje Niksic - * prim/startup.el (command-line-1): Run term-setup-hook regardless + * prim/startup.el (command-line-1): Run term-setup-hook regardless of `input-pending-p'. * custom/cus-edit.el (custom-split-regexp-maybe): Use `split-string'. @@ -1681,7 +1681,7 @@ Fri Aug 8 12:58:00 1997 David Byers 1997-10-21 SL Baur - * prim/about.el (about-maintainer-glyph): Pictures have been moved + * prim/about.el (about-maintainer-glyph): Pictures have been moved to photos subdirectory. 1997-10-21 Hrvoje Niksic @@ -1696,7 +1696,7 @@ Fri Aug 8 12:58:00 1997 David Byers 1997-10-21 Colin Rafferty * x11/x-menubar.el (default-menubar): Made it use lazy-shot - instead of lazy-lock in "Syntax Highlighting->Lazy". + instead of lazy-lock in "Syntax Highlighting->Lazy". (options-menu-saved-forms): Made it save lazy-shot instead of lazy-lock in the options. @@ -1778,12 +1778,12 @@ Fri Aug 8 12:58:00 1997 David Byers * help.el (function-at-point): Use `function-at-point-function'. (function-at-point-function): New variable, formerly - `find-function-function'. + `find-function-function'. (describe-function): Use `function-at-point'. (where-is): Ditto. * find-func.el (find-function-read-function): Use - `function-at-point'. + `function-at-point'. * packages/info.el (Info-elisp-ref): Use `function-at-point'. @@ -1806,7 +1806,7 @@ Fri Aug 8 12:58:00 1997 David Byers * prim/packages.el (packages-find-packages-1): New argument: `user-package' non-nil when searching user packages. - Load any autoloads found in user packages. - + 1997-10-17 Karl M. Hegbloom * packages/info.el (Info-insert-dir): Also kill the localdir temp @@ -1817,7 +1817,7 @@ Fri Aug 8 12:58:00 1997 David Byers * utils/facemenu.el: autoload the `facemenu-keymap' properly. * mule/mule-cmds.el (read-language-name): Fix typo. - From Didier Verna + From Didier Verna 1997-10-15 Adrian Aichner @@ -1886,7 +1886,7 @@ Fri Aug 8 12:58:00 1997 David Byers From Hrvoje Niksic * prim/glyphs.el (init-glyphs): Use different logo for beta XEmacsen. - From Didier Verna + From Didier Verna 1997-10-15 Hrvoje Niksic @@ -1915,7 +1915,7 @@ Fri Aug 8 12:58:00 1997 David Byers * custom/wid-edit.el: (widget-glyph-insert-glyph): Use `widget-mouse-help' if necessary. - (widget-documentation-string-value-create): Don't coerce help-echo + (widget-documentation-string-value-create): Don't coerce help-echo WIDGET to widget. (widget-button-keymap): New keymap. (widget-specify-button): Use it. @@ -1985,7 +1985,7 @@ Fri Aug 8 12:58:00 1997 David Byers 1997-10-14 SL Baur * default.el: New file. - * site-start.el: New file. XEmacs starts faster if dummy versions + * site-start.el: New file. XEmacs starts faster if dummy versions of these files are found early in the `load-path'. Suggested by Kyle Jones @@ -2049,7 +2049,7 @@ Fri Aug 8 12:58:00 1997 David Byers * custom/cus-face.el (custom-face-attributes): Support inverse-video for TTY-s. - * prim/cmdloop.el (keyboard-escape-quit): Abort recursive edit, as + * prim/cmdloop.el (keyboard-escape-quit): Abort recursive edit, as documented. 1997-10-12 Hrvoje Niksic @@ -2103,7 +2103,7 @@ Fri Aug 8 12:58:00 1997 David Byers * '' Added toplevel block (when (fboundp 'load-gc) ...to init the Info-def..list from the environment variable INFOPATH at dump time. - + * prim/packages.el (packages-find-packages-1): append the list of packages info directories to `Info-default-directory-list' rather than prepending them. Don't add them if they're already in the @@ -2112,7 +2112,7 @@ Fri Aug 8 12:58:00 1997 David Byers * packages/info.el (Info-directory-list): various fixes to the directory list handling. * (Info-localdir-heading-regexp) added. - + * '' removed the unrequired defcustom of `Info-default-directory- list' @@ -2153,7 +2153,7 @@ Fri Aug 8 12:58:00 1997 David Byers * packages/bookmark.el: * packages/iswitchb.el: * utils/speedbar.el: - * utils/xemacs-build-report.el: + * utils/xemacs-build-report.el: - change Xemacs --> XEmacs 1997-10-09 Colin Rafferty @@ -2167,7 +2167,7 @@ Fri Aug 8 12:58:00 1997 David Byers (describe-function-arglist): Commented out -- seems unused. (find-function): ALL find-function stuff moved to "find-func.el" - * prim/find-func.el: new file created from functions previously in + * prim/find-func.el: new file created from functions previously in "help.el". 1997-10-09 SL Baur @@ -2203,7 +2203,7 @@ Fri Oct 3 23:10:04 1997 Barry A. Warsaw Fri Sep 26 23:30:58 1997 Barry A. Warsaw - * cc-mode/cc-menus.el: Patches to Imenu support given by + * cc-mode/cc-menus.el: Patches to Imenu support given by "Masatake (jet) YAMATO" . (Jan Dubois) jan.dubois@ibm.net @@ -2226,9 +2226,9 @@ Mon Sep 22 15:47:02 1997 Barry A. Warsaw * x11/x-menubar.el (file-menu-filter): Reverse sense of bounds test. - From: Didier Verna + From: Didier Verna - * prim/format.el (format-annotate-function): Reverse sync to Emacs + * prim/format.el (format-annotate-function): Reverse sync to Emacs 19. 1997-10-08 Hrvoje Niksic @@ -2316,7 +2316,7 @@ Mon Sep 22 15:47:02 1997 Barry A. Warsaw * mule/mule-cmds.el (read-input-method-name): Use a default if available. - From Didier Verna + From Didier Verna * prim/about.el (about-url-alist): Update jwz's home page. @@ -2346,7 +2346,7 @@ Mon Sep 22 15:47:02 1997 Barry A. Warsaw 1997-10-05 Hrvoje Niksic - * prim/simple.el: Minor docstring and comment changes. Customized + * prim/simple.el: Minor docstring and comment changes. Customized some more. 1997-10-04 Hrvoje Niksic @@ -2386,7 +2386,7 @@ Mon Sep 22 15:47:02 1997 Barry A. Warsaw * cl/cl-seq.el (remq): Reformat and add doc-string. Suggested by: Karl M. Hegbloom - + 1997-10-03 Karl M. Hegbloom * packages/func-menu.el: change the countups from message's to @@ -2432,7 +2432,7 @@ Mon Sep 22 15:47:02 1997 Barry A. Warsaw (custom-declare-face): Don't invoke init-face-from-resources explicitly. - * prim/profile.el (pretty-print-profiling-info): When interactive, + * prim/profile.el (pretty-print-profiling-info): When interactive, use a separate buffer instead of current-buffer. (pretty-print-profiling-info): Prettified output. @@ -2984,7 +2984,7 @@ Mon Sep 29 02:11:35 1997 Kyle Jones (widget-text-keymap): Use it. (widget-princ-to-string): Use `with-current-buffer'. (widget-map-buttons): Ditto. - (widget-push-button-gui): Set to value of `widget-glyph-enable' by + (widget-push-button-gui): Set to value of `widget-glyph-enable' by default. (widget-push-button-value-create): Call `widget-specify-button'. @@ -3007,7 +3007,7 @@ Mon Sep 29 02:11:35 1997 Kyle Jones * x11/x-menubar.el: Customized. - * custom/cus-face.el (face-spec-set-match-display): Use `warn' for + * custom/cus-face.el (face-spec-set-match-display): Use `warn' for warnings. * x11/x-font-menu.el: Customized. @@ -3123,7 +3123,7 @@ Mon Sep 29 02:11:35 1997 Kyle Jones 1997-09-18 Jens-Ulrik Holger Petersen * prim/isearch-mode.el (isearch-message): Display-message as - progress (this way isearch message won't appear in the message + progress (this way isearch message won't appear in the message log). 1997-09-18 Jens-Ulrik Holger Petersen @@ -3149,7 +3149,7 @@ Mon Sep 29 02:11:35 1997 Kyle Jones * prim/packages.el (locate-library): Simplify regexp for compression suffixes. Suggested by: Hrvoje Niksic - + 1997-09-17 Karl M. Hegbloom * ilisp/ilisp-out.el (ilisp-scroll-output): bind `scroll-in-place' @@ -3220,7 +3220,7 @@ Fri Sep 5 04:47:03 1997 Barry A. Warsaw I don't know if this breaks something else, because I can't figure out why it was commented out in the first place. - + * cc-mode/cc-langs.el: Define `/' in c-mode-base-map since all modes now support c-electric-slash. @@ -3389,7 +3389,7 @@ Fri Sep 5 04:47:03 1997 Barry A. Warsaw 1997-09-11 Jens-Ulrik Holger Petersen - * packages/vc.el (vc-default-init-version): Make the default value + * packages/vc.el (vc-default-init-version): Make the default value be `nil'. Improve the docstring. 1997-09-12 SL Baur @@ -3508,7 +3508,7 @@ Fri Aug 15 18:39:10 1997 Barry A. Warsaw 1997-09-09 Jens-Ulrik Holger Petersen - * packages/vc.el (vc-register): make the second option arg COMMENT + * packages/vc.el (vc-register): make the second option arg COMMENT do something * packages/vc.el (vc-register): Make the default initial @@ -3522,7 +3522,7 @@ Fri Aug 15 18:39:10 1997 Barry A. Warsaw 1997-09-07 Hrvoje Niksic - * utils/edmacro.el (edmacro-parse-word): Accept ^foo (would signal + * utils/edmacro.el (edmacro-parse-word): Accept ^foo (would signal error). (edmacro-format-1): Add SPC after ^. @@ -3535,7 +3535,7 @@ Fri Aug 15 18:39:10 1997 Barry A. Warsaw always has directories ending with trailing `/'s. * version.el (emacs-version): Preserve previous matching info. - From Didier Verna + From Didier Verna Wed Sep 3 13:53:10 1997 SL Baur @@ -3571,7 +3571,7 @@ Wed Sep 3 13:53:10 1997 SL Baur 1997-09-01 SL Baur - * x11/x-menubar.el (default-menubar): Put tetris in the game menu, + * x11/x-menubar.el (default-menubar): Put tetris in the game menu, and move it and the mine game to the top of the menu. 1997-08-29 SL Baur @@ -3881,28 +3881,28 @@ Sat Jul 26 16:03:33 1997 Barry A. Warsaw * support for "dir" merging 'ala Emacs-19.34, with fallback to cheap localdir files in the secondary info directories. - + * changed default `Info-annotations-path' from ~/.infonotes to ~/.xemacs/info.notes - + * added `Info-additional-directory-list' - + * changed a call to w3-fetch to browse-url - + * added new variables and functions from GNU Emacs 19.34: `Info-dir-contents', `Info-dir-contents-directory', `Info-dir-file-attributes', and the function `Info-insert-dir' - + * rewrote `Info-suffixed-file' to a cond block rather than nested if's for aesthetic reasons. - + * made the top line get split if it's longer than 79 characters and tweaked fontification to handle that. - + * changed the look of the pop-up mouse menus by utilizing the "--:etchedThing" dividers. - + * several docstring reformats and typo fixes, a few comments deleted. @@ -4006,7 +4006,7 @@ Thu Jul 17 03:36:22 1997 Barry A. Warsaw 1997-07-24 SL Baur - * prim/make-docfile.el (docfile-out-of-date): Workaround for NEWOS + * prim/make-docfile.el (docfile-out-of-date): Workaround for NEWOS process exit handling bug. Suggested by Katsumi Yamaoka @@ -4036,7 +4036,7 @@ Thu Jul 17 03:36:22 1997 Barry A. Warsaw 1997-07-21 SL Baur - * prim/packages.el (locate-data-directory): New function to search + * prim/packages.el (locate-data-directory): New function to search for directories in the data-directory-list. 1997-07-21 Karl M. Hegbloom @@ -4079,7 +4079,7 @@ Thu Jul 17 03:36:22 1997 Barry A. Warsaw (speedbar-get-focus): Autoload. (speedbar): Autoload (correctly). - (speedbar-frame-width): Test liveness of frame + (speedbar-frame-width): Test liveness of frame too. (speedbar-frame-mode): Avoid some Emacs 20 code. From Markus Linnala @@ -4115,7 +4115,7 @@ Thu Jul 17 03:36:22 1997 Barry A. Warsaw 1997-07-16 Steven L Baur - * utils/crontab.el (crontab-get): Check for `no crontab for' as an + * utils/crontab.el (crontab-get): Check for `no crontab for' as an error return. Suggested by Jeff Miller @@ -4247,7 +4247,7 @@ Wed Jul 9 22:08:58 1997 Barry A. Warsaw * prim/files.el: Use `files' group. - * prim/disp-table.el (describe-display-table): Made it work; don't + * prim/disp-table.el (describe-display-table): Made it work; don't use `describe-vector'. * prim/gui.el: Customized. @@ -4273,7 +4273,7 @@ Wed Jul 9 22:08:58 1997 Barry A. Warsaw * packages/igrep.el: Don't insinuate XEmacs when loading. (igrep-insinuate): New function. - * packages/blink-cursor.el (blink-cursor-callback): Don't blink on + * packages/blink-cursor.el (blink-cursor-callback): Don't blink on TTY-s. * prim/console.el (resume-pid-console): Use `eql'. @@ -4342,7 +4342,7 @@ Wed Jul 9 22:08:58 1997 Barry A. Warsaw * packages/pending-del.el (pending-delete-pre-hook): Don't quote lambda. (pending-delete-pre-hook): Use `error-message-string'. - (pending-delete): Treat as minor mode; define the standard turn-on + (pending-delete): Treat as minor mode; define the standard turn-on and turn-off functions. (delete-active-region): Simplified. @@ -4353,10 +4353,10 @@ Wed Jul 9 22:08:58 1997 Barry A. Warsaw * packages/pending-del.el: Correct typo in Hrvoje's upgrade. * mel/mel-u.el (uuencode-external-decode-region): Force - buffer-read-only nil because it gets changed magically to t during + buffer-read-only nil because it gets changed magically to t during the call to `insert-file-contents'. - * tm/tm-image.el (mime-preview/filter-for-image): Comment out test + * tm/tm-image.el (mime-preview/filter-for-image): Comment out test for invalid glyph. It appears to be non-functional. * modes/lisp-mode.el (lisp-interaction-mode-popup-menu-1): Add @@ -4542,7 +4542,7 @@ Fri Jun 20 20:40:33 1997 Barry A. Warsaw * hypberbole/hact.el (action:commandp): Don't reference bytecode objects as vectors. (action:params): Ditto. - + * hyperbole/hypb.el (hypb:function-copy): Don't reference byte code objects as vectors. (hypb:function-symbol-replace): Document as broken. The @@ -4567,7 +4567,7 @@ Fri Jun 20 20:40:33 1997 Barry A. Warsaw * utils/easymenu.el (easy-menu-add): Oops, wrong sense in comparison. - * comint/gdb.el (gdb-mode-syntax-table): New variable. Initialize + * comint/gdb.el (gdb-mode-syntax-table): New variable. Initialize with the logic currently in CC Mode 5.11. (gdb-mode): Use it. @@ -4620,7 +4620,7 @@ Fri Jun 20 20:40:33 1997 Barry A. Warsaw * prim/cmdloop.el (errors-deactivate-region): Default to existing behavior. - * leim/quail.el (quail-mode): Correct addition of quail minor mode + * leim/quail.el (quail-mode): Correct addition of quail minor mode info to minor-mode-map-alist. (top-level): Ditto. @@ -4678,7 +4678,7 @@ Fri Jun 20 20:40:33 1997 Barry A. Warsaw make it look better (and will prevent some consing, but that's being anal). From Hrvoje Niksic - + * prim/simple.el (delete-key-deletes-forward): Mark docstring as an user option. From Gary D. Foster @@ -4688,10 +4688,10 @@ Fri Jun 20 20:40:33 1997 Barry A. Warsaw * efs/efs-ovwrt.el (efs-overwrite-fn): efs is manufacturing its own byte code. Whee. - * utils/advice.el (ad-interactive-form): Don't treat bytecode as a + * utils/advice.el (ad-interactive-form): Don't treat bytecode as a vector if it can be avoided. From Kyle Jones - + 1997-06-30 Steven L Baur * prim/files.el (auto-mode-alist): Don't set image-mode by default @@ -4699,7 +4699,7 @@ Fri Jun 20 20:40:33 1997 Barry A. Warsaw Sun Jun 29 20:57:15 1997 Kyle Jones - * prim/simple.el: bind inhibit-read-only to t before + * prim/simple.el: bind inhibit-read-only to t before trying to erase or otherwise modify the echo area buffer. 1997-07-01 MORIOKA Tomohiko @@ -4728,7 +4728,7 @@ Sun Jun 29 03:02:10 1997 Kyle Jones * src/undo.c (record_extent): If the extent's object is a string, just return. We can't record undo information for strings, and it is - very bad to reference through a string pointer as if it + very bad to reference through a string pointer as if it were a buffer pointer. 1997-06-28 Steven L Baur @@ -4775,7 +4775,7 @@ Sun Jun 29 03:02:10 1997 Kyle Jones * utils/autoload.el (batch-update-directory): Kill command line args when done. (autoload-save-customization): Print a warning message with the - offending symbol when we run across the elusive malformed property + offending symbol when we run across the elusive malformed property list ((0 0)). 1997-06-26 Hrvoje Niksic @@ -4784,7 +4784,7 @@ Sun Jun 29 03:02:10 1997 Kyle Jones (pretty-print-profiling-info): Allow interactive calls. * prim/overlay.el: Make more FSF compatible. - + 1997-06-27 Steven L Baur * prim/loaddefs.el (debug-ignored-errors): Fix regexps. @@ -4893,7 +4893,7 @@ Sun Jun 29 03:02:10 1997 Kyle Jones Mule menu because they bombed after recompilation. * packages/hyper-apropos.el - (hyper-apropos-toggle-programming-flag): Use `with-current-buffer' + (hyper-apropos-toggle-programming-flag): Use `with-current-buffer' instead of `eval-in-buffer'. * term/sun-mouse.el: Remove bogus redefinition of @@ -4904,7 +4904,7 @@ Sun Jun 29 03:02:10 1997 Kyle Jones * prim/make-docfile.el: Use princ not print. Suggested by Hrvoje Niksic. - * packages/info.el (Info-select-node): Desensitive case search for + * packages/info.el (Info-select-node): Desensitive case search for Note:. (Info-next-reference): Ditto. * prim/simple.el (kill-region): Adjust endpoints of extent to @@ -4915,7 +4915,7 @@ Sun Jun 29 03:02:10 1997 Kyle Jones * prim/subr.el (eval-in-buffer): Make obsolete. Suggested by Hrvoje Niksic. - * packages/hyper-apropos.el (hyper-apropos-faces): Change group to + * packages/hyper-apropos.el (hyper-apropos-faces): Change group to 'faces. Suggested by Per Abrahamsen. @@ -4926,7 +4926,7 @@ Sun Jun 29 03:02:10 1997 Kyle Jones - Get keybinding before command is executed. Suggested by Kyle Jones and Steve Baur. - + 1997-06-24 Steven L Baur * packages/gnuserv.el: Make old symbols Obsolete. @@ -4936,7 +4936,7 @@ Sun Jun 29 03:02:10 1997 Kyle Jones minibuffer. * prim/minibuf.el (minibuffer-keyboard-quit): Ditto. From Hrvoje Niksic - + * prim/help.el (help-mode-quit): Bury buffer when quitting. From Hrvoje Niksic @@ -4964,7 +4964,7 @@ Mon Jun 23 12:33:52 1997 Per Abrahamsen 1997-06-23 Hrvoje Niksic - * packages/info.el (Info-next-reference): Fix up for M-TAB to work + * packages/info.el (Info-next-reference): Fix up for M-TAB to work correctly. * utils/live-icon.el (live-icon-one-frame): Don't set glyphs to @@ -4990,7 +4990,7 @@ Mon Jun 23 12:33:52 1997 Per Abrahamsen 1997-06-22 Steven L Baur - * x11/x-menubar.el (default-menubar): Make `Jump to bookmark' menu + * x11/x-menubar.el (default-menubar): Make `Jump to bookmark' menu dynamic. From Gary D. Foster @@ -5061,7 +5061,7 @@ Mon Jun 23 12:33:52 1997 Per Abrahamsen * prim/tabify.el (untabify): Return nil. From contributor name lost. - * prim/packages.el (packages-hardcoded-lisp): startup.elc needs to + * prim/packages.el (packages-hardcoded-lisp): startup.elc needs to be scanned for docstrings. 1997-06-21 Hrvoje Niksic @@ -5088,7 +5088,7 @@ Mon Jun 23 12:33:52 1997 Per Abrahamsen 1997-06-20 Steven L Baur - * utils/autoload.el (fixup-autoload-buffer): New function. Insert + * utils/autoload.el (fixup-autoload-buffer): New function. Insert guards so a (load "auto-autoloads") works the same as require. (batch-update-directory): Use it. @@ -5142,11 +5142,11 @@ Mon Jun 23 12:33:52 1997 Per Abrahamsen From Karl M. Hegbloom (archive-mode-map): Bind it to `q'. - * utils/autoload.el (cusload-file-name): Default to custom-load.el + * utils/autoload.el (cusload-file-name): Default to custom-load.el for each individual file. * prim/minibuf.el (minibuffer-max-depth-exceeded): Use - `custom-file' as a location for saving enable multiple minibuffers + `custom-file' as a location for saving enable multiple minibuffers option. * packages/man.el (manual-entry): Don't leave empty buffer if @@ -5168,14 +5168,14 @@ Mon Jun 23 12:33:52 1997 Per Abrahamsen 1997-06-17 Steven L Baur - * prim/files.el (auto-mode-alist): Add /app-defaults/ as candidate + * prim/files.el (auto-mode-alist): Add /app-defaults/ as candidate for xrdb-mode. Suggested by Karl Hegbloom, Regexp by David Moore. - * version.el: Remove variables emacs-version, emacs-major-version, + * version.el: Remove variables emacs-version, emacs-major-version, and emacs-minor-version. - * tooltalk/tooltalk-load.el: Comment as obsolete and move contents + * tooltalk/tooltalk-load.el: Comment as obsolete and move contents to dumped-lisp.el. * prim/make-docfile.el: New file. @@ -5199,7 +5199,7 @@ Mon Jun 23 12:33:52 1997 Per Abrahamsen * prim/dumped-lisp.el: New file. - * prim/update-elc.el (toplevel): Rework using a better function to + * prim/update-elc.el (toplevel): Rework using a better function to determine autoload file locations. * prim/packages.el: New file. @@ -5240,16 +5240,16 @@ Mon Jun 23 12:33:52 1997 Per Abrahamsen as an option. Eliminate XEmacs specific autoloads. From Hrvoje Niksic - + * efs/dired.el (dired-save-excursion): Ebola cleanup. * packages/hyper-apropos.el: Massive cleanup, Customize. - From Hrvoje Niksic + From Hrvoje Niksic Fri Jun 13 13:20:39 1997 Kyle Jones * prim/syntax.el (symbol-near-point): - Check for bobp and avoid (char-syntax (char-before)) if + Check for bobp and avoid (char-syntax (char-before)) if there. 1997-06-13 Steven L Baur @@ -5267,7 +5267,7 @@ Fri Jun 13 13:20:39 1997 Kyle Jones * modes/make-mode.el (makefile-browse): Shouldn't be interactive. From Hrvoje Niksic - * prim/files.el (interpreter-mode-alist): ksh-mode is obsoleted by + * prim/files.el (interpreter-mode-alist): ksh-mode is obsoleted by sh-script. From Hrvoje Niksic @@ -5276,7 +5276,7 @@ Fri Jun 13 13:20:39 1997 Kyle Jones * prim/subr.el (with-current-buffer): New macro. (with-temp-file): Ditto. - * bytecomp/byte-optimize.el (byte-optimize-form-code-walker): Test + * bytecomp/byte-optimize.el (byte-optimize-form-code-walker): Test for `save-current-buffer'. * bytecomp/bytecomp.el: Recognize `save-current-buffer'. @@ -5358,7 +5358,7 @@ Fri Jun 13 13:20:39 1997 Kyle Jones From Heiko Muenkel 1997-06-10 Gary D. Foster - + * modes/view-less.el: Changed \177 bindings to 'delete * modes/help.el: Changed \177 bindings to 'delete @@ -5378,7 +5378,7 @@ Fri Jun 13 13:20:39 1997 Kyle Jones * modes/cc-mode.el: * modes/cperl-mode.el: Fixed references to delete functions to use the new names. - + 1997-06-11 Karl M Hegbloom * ilisp/ilisp-def.el (toplevel): Changed `ilisp-prefix' from @@ -5462,7 +5462,7 @@ Fri Jun 13 13:20:39 1997 Kyle Jones Change usage of \177 to use keysym 'delete. From Gary D. Foster - * packages/etags.el (tags-loop-scan): Don't pass a straight string + * packages/etags.el (tags-loop-scan): Don't pass a straight string to error as a format string. Reported by Miles Duke @@ -5487,9 +5487,9 @@ Fri Jun 13 13:20:39 1997 Kyle Jones 1997-06-04 Gary D. Foster - * modes/cc-mode.el: Modified `c-electric-delete' to honor the + * modes/cc-mode.el: Modified `c-electric-delete' to honor the desired delete direction in both normal and "hungry" modes. - * modes/cperl-mode.el: Modified `cperl-electric-backspace' to + * modes/cperl-mode.el: Modified `cperl-electric-backspace' to honor the desired delete direction. 1997-06-03 MORIOKA Tomohiko @@ -5512,9 +5512,9 @@ Fri Jun 13 13:20:39 1997 Kyle Jones * modes/*.el: Removed conflicting \177 bindings. * modes/cc-mode.el: Modified `c-electric-delete' to use new delete bindings. - * modes/cperl-mode.el: Modified `cperl-electric-backspace' to + * modes/cperl-mode.el: Modified `cperl-electric-backspace' to use new delete bindings. - + 1997-06-03 MORIOKA Tomohiko * leim/quail.el: to sync with quail.el of Emacs-19.34.94-epsilon. @@ -5540,7 +5540,7 @@ Fri Jun 13 13:20:39 1997 Kyle Jones * prim/about.el: Installed new version 2.1. From Hrvoje Niksic - + * prim/profile.el (pretty-print-profiling-info): Autoload don't dump. Clean up comments. @@ -5586,7 +5586,7 @@ Fri Jun 13 13:20:39 1997 Kyle Jones as toolbar callbacks. From weiner@altrasoft.com - * prim/mouse.el (default-mouse-track-cleanup-extent): Correct test + * prim/mouse.el (default-mouse-track-cleanup-extent): Correct test on dead-func extent. * prim/help.el (view-emacs-news): outl-mouse turned off in @@ -5750,7 +5750,7 @@ Tue May 27 13:42:57 1997 Ken Manheimer `icomplete-max-delay-chars' - Maximum number of initial chars to apply icomplete compute delay. - + `icomplete-compute-delay' - Completions-computation stall, used only with large-number completions @@ -5802,7 +5802,7 @@ Fri May 30 18:39:01 1997 Hrvoje Niksic (insert-parentheses): Let a negative argument enclose preceding sexps. From Erik Naggum - + * prim/window-xemacs.el: New file, split from window.el with XEmacs-specific stuff. @@ -5814,12 +5814,12 @@ Fri May 30 18:39:01 1997 Hrvoje Niksic * prim/window.el (kill-buffer-and-window): New command. Bind it to C-x 4 0. From Richard Stallman - + * prim/window.el (split-window-vertically): Don't change point in old window if both the original point and the end of the buffer are visible after splitting, when split-window-keep-point is nil. From Noah Friedman - + * prim/files.el (revert-buffer-internal-hook): Declare. * utils/map-ynp.el: Synch with Emacs 19.34.94. @@ -5877,7 +5877,7 @@ Thu May 29 19:03:52 1997 Per Abrahamsen standard-value for Custom-1.98. 1997-05-26 Steven L Baur - + * prim/help.el (view-lossage-key-count): New variable. (view-lossage-message-count): New variable. (view-lossage): Use them. @@ -5999,7 +5999,7 @@ Mon Sep 25 17:19:51 1995 Per Bothner Tue May 20 20:32:59 1997 Steven L Baur - * prim/subr.el (buffer-substring-no-properties): Clean out extents + * prim/subr.el (buffer-substring-no-properties): Clean out extents too. Mon May 19 19:48:35 1997 Steven L Baur @@ -6018,10 +6018,10 @@ Sun May 18 09:11:50 1997 Steven L Baur * prim/files.el (revert-buffer): Add optional third parameter to preserve buffer modes (from Emacs 19.34.94). - (after-find-file): Add optional fifth parameter to preserve buffer + (after-find-file): Add optional fifth parameter to preserve buffer modes (from Emacs 19.34.94). - * packages/vc.el: Synch with Emacs 19.34.94 because our version was + * packages/vc.el: Synch with Emacs 19.34.94 because our version was hopeless. (vc-checkout): Autoload. (vc-find-binary): Ditto. @@ -6031,7 +6031,7 @@ Sun May 18 09:11:50 1997 Steven L Baur Fri Apr 25 13:21:46 1997 Per Abrahamsen - * apropos.el (apropos): Add support for customization groups. + * apropos.el (apropos): Add support for customization groups. (apropos-print): Ditto. Sat May 17 19:56:31 1997 Glynn Clements @@ -6066,7 +6066,7 @@ Mon May 12 13:47:37 1997 Oscar Figueiredo * tm/tm-vm.el: Provide for vm-unsaved-message having been removed in recent versions of VM. - + Fri May 9 10:41:44 1997 Steven L Baur * iso/iso-acc.el (iso-accents-compose): Fix XEmacs 19.14 @@ -6085,10 +6085,10 @@ Thu May 8 14:35:34 1997 Steven L Baur * hm--html-menus/hm--html.el: Define obsolete aliases for the previous function spellings. - * hm--html-menus/hm--html-keys.el: Define obsolete aliases for the + * hm--html-menus/hm--html-keys.el: Define obsolete aliases for the previous variable spellings. - * prim/obsolete.el (define-obsolete-variable-alias): Fix docstring + * prim/obsolete.el (define-obsolete-variable-alias): Fix docstring spelling. (define-compatible-variable-alias): Ditto. @@ -6128,7 +6128,7 @@ Wed Apr 30 18:06:35 1997 Steven L Baur Tue Apr 29 18:51:31 1997 Steven L Baur - * mule/mule-files.el (buffer-file-coding-system-alist): Regexp for + * mule/mule-files.el (buffer-file-coding-system-alist): Regexp for handling info files didn't match the right pattern. Sun Apr 27 18:09:48 1997 Steven L Baur @@ -6142,7 +6142,7 @@ Sat Apr 26 16:25:49 1997 Steven L Baur Fri Apr 25 08:39:50 1997 Steven L Baur - * modes/sh-script.el (sh-indent-line): Deal with pathological case + * modes/sh-script.el (sh-indent-line): Deal with pathological case of indenting a first line containing a `#' as first non-white space character. @@ -6333,12 +6333,12 @@ Sat Apr 12 05:27:56 1997 Steven L Baur * packages/vc.el (vc-directory): Dired requires a list not a string of space separated names. - * utils/live-icon.el (live-icon-colour-name-from-face): `face' may + * utils/live-icon.el (live-icon-colour-name-from-face): `face' may be a list of faces since it is generated by `extent-face'. Fri Apr 11 21:12:57 1997 Steven L Baur - * packages/ispell.el: Don't attempt creation of the menubar unless + * packages/ispell.el: Don't attempt creation of the menubar unless XEmacs has been compiled with menubars. * prim/simple.el (yank-pop): mark-marker needs optional force @@ -6384,7 +6384,7 @@ Wed Apr 9 10:45:54 1997 Steven L Baur Tue Apr 8 12:57:05 1997 Steven L Baur * modes/lisp-mode.el (eval-defun): Evaluate defcustom in defconst - style instead of defvar style (patch derived from Emacs 19.35/Lars + style instead of defvar style (patch derived from Emacs 19.35/Lars Magne Ingebrigtsen). Mon Apr 7 16:38:43 1997 Steven L Baur @@ -6402,7 +6402,7 @@ Sun Apr 6 06:56:03 1997 Steven L Baur * x11/x-menubar.el (default-menubar): Use xmine not mine. - * prim/help.el (describe-variable): Some doc strings weren't being + * prim/help.el (describe-variable): Some doc strings weren't being terminated with a newline. Sat Apr 5 20:20:00 1997 Steven L Baur @@ -6411,7 +6411,7 @@ Sat Apr 5 20:20:00 1997 Steven L Baur Sat Apr 5 13:18:05 1997 Tomasz J. Cholewo - * packages/etags.el (tags-query-replace): Fixed DELIMITED argument + * packages/etags.el (tags-query-replace): Fixed DELIMITED argument bug. `with-caps-disable-folding' moved to isearch-mode.el. * packages/info.el (Info-search): Use `with-caps-disable-folding'. @@ -6506,8 +6506,8 @@ Sat Mar 22 14:25:47 1997 Tomasz J. Cholewo (fancy-diary-display): Use modeline-buffer-identification. * calendar/appt.el (appt-diary-entries): Do not display diary. - (appt-check): Display diary buffer at midnight. - + (appt-check): Display diary buffer at midnight. + Fri Mar 21 19:16:46 1997 Steven L Baur * mule/mule-coding.el (enable-multibyte-characters): MULE @@ -6636,7 +6636,7 @@ Sun Mar 9 12:38:53 1997 Noah Friedman * utils/eldoc.el (eldoc-pre-command-refresh-echo-area): Use eldoc-display-message-p, not eldoc-display-message-no-interference-p. - + Sat Mar 8 11:20:47 1997 Steven L Baur * prim/startup.el (startup-splash-frame-body): More text tweaking. @@ -6687,7 +6687,7 @@ Fri Mar 7 10:44:48 1997 Steven L Baur * x11/x-menubar.el (default-menubar): Reorganize again undoing previous change. Customize submenu moved to top of options menu. Edit faces restored to edit-faces and renamed to Browse faces. - + Thu Mar 6 08:43:27 1997 Steven L Baur * x11/x-menubar.el (options-menu): New variable. @@ -6743,7 +6743,7 @@ Sun Mar 2 10:10:31 1997 Steven L Baur * site-load.el: Move site-packages to the top level. Sun Mar 2 01:37:04 1997 Hrvoje Niksic - + * utils/mail-extr.el (all-top-level-domains): Added "hr" domain. * packages/ps-print.el (ps-print-color-p): Default to nil. @@ -7030,13 +7030,13 @@ Sat Feb 15 12:07:46 1997 Steven L Baur Sat Feb 15 11:05:29 1997 Kyle Jones * utils/redo.el: made before and after status messages so that the user is aware if a long action is still being processed. - + rolled version number up to 1.00, since the package seems to be stable. cosmetic changes so the file could be included in the XEmacs distribution. - + Sat Feb 15 11:13:05 1997 Hrvoje Niksic * prim/simple.el (line-move-ignore-invisible): Change default to @@ -7172,7 +7172,7 @@ Thu Feb 6 17:14:32 1997 Steven L Baur * packages/ps-print.el: Update maintainer address. Thu Feb 6 12:35:39 1997 Bill Dubuque - + * cl/cl-macs.el (cl-do-proclaim): Correct addition of bound variables to `byte-compile-bound-variables'. @@ -7222,7 +7222,7 @@ Fri Jan 31 09:50:51 1997 Hrvoje Niksic * x11/x-toolbar.el (toolbar-mail-commands-alist): Updated with a lot of new mailer possiblities. - + Fri Jan 31 09:28:49 1997 Martin Buchholz * x11/x-font-menu.el (reset-device-font-menus): Correct guard on @@ -7238,7 +7238,7 @@ Thu Jan 30 22:43:43 1997 David Moore * packages/compile.el: Speed up regexps. (compilation-parse-errors): replace re-search-forward with something faster. - + Thu Jan 30 20:33:56 1997 Hvoje Niksic * x11/x-toolbar.el @@ -7248,7 +7248,7 @@ Thu Jan 30 20:33:56 1997 Hvoje Niksic (toolbar-mail-commands-alist): New variable. (toolbar-mail-reader): Ditto. (toolbar-mail): Use them. - + * x11/x-menubar.el: Shorten help menu item names. Thu Jan 30 17:22:15 1997 Alexandre Oliva @@ -7306,15 +7306,15 @@ Thu Jan 9 13:32:01 1997 Jacques Duthen Prestataire (ps-print-version): Fix value. (cl lisp-float-type): Require them. (ps-number-of-columns ps-*-font-size): Try to select defaults - better suited when `ps-landscape-mode' is non-nil. + better suited when `ps-landscape-mode' is non-nil. (ps-*-faces): Change default for Font Lock mode faces when - `ps-print-color-p' is nil. + `ps-print-color-p' is nil. (ps-right-header): Replace `time-stamp-yy/mm/dd' - by `time-stamp-mon-dd-yyyy'. - (ps-end-file ps-begin-page): Fix bug in page count for Ghostview. + by `time-stamp-mon-dd-yyyy'. + (ps-end-file ps-begin-page): Fix bug in page count for Ghostview. (ps-generate-postscript-with-faces): Replace `ps-sorter' by - `car-less-than-car'. - (ps-plot ps-generate): Replace `%d' by `%3d'. + `car-less-than-car'. + (ps-plot ps-generate): Replace `%d' by `%3d'. Wed Jan 22 15:32:39 1997 Greg Klanderman @@ -7336,7 +7336,7 @@ Tue Jan 21 19:56:26 1997 Martin Buchholz * mule/mule-init.el (init-mule): Get Japanese man pages working. Fri Jan 17 17:22:54 1997 Hrvoje Niksic - + * man.el (Manual-mode): Don't mess with scrollbars if they aren't present. @@ -7806,7 +7806,7 @@ Thu Dec 12 14:46:47 1996 Christoph Wedler Let `buffers-menu-submenus-for-groups-p' be an integer : if there are more buffers than this value, use submenus, otherwise not. - + * packages/vc.el (vc-rename-this-file): New function (was missing, but referred to on the menubar). @@ -7871,7 +7871,7 @@ Tue Dec 10 10:11:55 1996 Steven L Baur * electric/ebuff-menu.el (electric-buffer-menu-mode-map): Correct bad 19.34 synch patch. - + * utils/pretty-print.el: New File. Sun Dec 8 13:59:40 1996 Steven L Baur @@ -8029,7 +8029,7 @@ Wed Dec 4 22:00:49 1996 Steven L Baur evaluated more than once. Comment formatting changes. - + * edebug/advise-eval-region.el: New File. Separate out advise for eval-region so it is only evaluated once. @@ -8037,7 +8037,7 @@ Wed Dec 4 22:00:49 1996 Steven L Baur icomplete-exhibit needs to be called in the setup-hook. - * packages/apropos.el: Correct a typo in button binding. + * packages/apropos.el: Correct a typo in button binding. Fixes the bug where if apropos-label-face is actually defined as face, apropos bombs with an error @@ -8050,7 +8050,5 @@ Wed Dec 4 22:00:49 1996 Steven L Baur Redefines the default faces for the various apropos faces so they come out in color by default (defaults are based on various standard font-lock faces). - - * version.el: Bumped up to b31. - + * version.el: Bumped up to b31. diff --git a/lisp/abbrev.el b/lisp/abbrev.el index dec62a1..110de33 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -419,6 +419,17 @@ The argument FILE is the file name to write." (write-region 1 (point-max) file) (erase-buffer))) +(defun abbrev-string-to-be-defined (arg) + "Return the string for which an abbrev will be defined. +ARG is the argument to `add-global-abbrev' or `add-mode-abbrev'." + (if (and (not arg) (region-active-p)) (setq arg 0) + (setq arg (prefix-numeric-value arg))) + (and (>= arg 0) + (buffer-substring + (point) + (if (= arg 0) (mark) + (save-excursion (forward-word (- arg)) (point)))))) + (defun add-mode-abbrev (arg) "Define mode-specific abbrev for last word(s) before point. Argument is how many words before point form the expansion; @@ -450,13 +461,7 @@ Don't use this function in a Lisp program; use `define-abbrev' instead." (defun add-abbrev (table type arg) ;; XEmacs change: - (if (and (not arg) (region-active-p)) (setq arg 0) - (setq arg (prefix-numeric-value arg))) - (let ((exp (and (>= arg 0) - (buffer-substring - (point) - (if (= arg 0) (mark) - (save-excursion (forward-word (- arg)) (point)))))) + (let ((exp (abbrev-string-to-be-defined arg)) name) (setq name (read-string (format (if exp "%s abbrev for \"%s\": " @@ -469,6 +474,14 @@ Don't use this function in a Lisp program; use `define-abbrev' instead." name (abbrev-expansion name table)))) (define-abbrev table (downcase name) exp)))) +(defun inverse-abbrev-string-to-be-defined (arg) + "Return the string for which an inverse abbrev will be defined. +ARG is the argument to `inverse-add-global-abbrev' or +`inverse-add-mode-abbrev'." + (save-excursion + (forward-word (- arg)) + (buffer-substring (point) (progn (forward-word 1) (point))))) + (defun inverse-add-mode-abbrev (arg) "Define last word before point as a mode-specific abbrev. With prefix argument N, defines the Nth word before point. diff --git a/lisp/alist.el b/lisp/alist.el index fbd409a..05d1267 100644 --- a/lisp/alist.el +++ b/lisp/alist.el @@ -22,7 +22,18 @@ ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. -;;; Code: + +;;;###autoload +(defun vassoc (key valist) + "Search VALIST for a vector whose first element is equal to KEY. +See also `assoc'." + ;; by Stig@hackvan.com + (let (el) + (catch 'done + (while (setq el (pop valist)) + (and (equal key (aref el 0)) + (throw 'done el)))))) + ;;;###autoload (defun put-alist (item value alist) diff --git a/lisp/auto-autoloads.el b/lisp/auto-autoloads.el index eceb685..8a9b351 100644 --- a/lisp/auto-autoloads.el +++ b/lisp/auto-autoloads.el @@ -1,5 +1,5 @@ ;;; DO NOT MODIFY THIS FILE -(if (featurep 'Standard-autoloads) (error "Already loaded")) +(if (featurep 'lisp-autoloads) (error "Already loaded")) ;;;### (autoloads nil "abbrev" "lisp/abbrev.el") @@ -12,7 +12,11 @@ Describe the True Editor and its minions." t nil) ;;;*** -;;;### (autoloads (set-modified-alist modify-alist remove-alist set-alist del-alist put-alist) "alist" "lisp/alist.el") +;;;### (autoloads (set-modified-alist modify-alist remove-alist set-alist del-alist put-alist vassoc) "alist" "lisp/alist.el") + +(autoload 'vassoc "alist" "\ +Search VALIST for a vector whose first element is equal to KEY. +See also `assoc'." nil nil) (autoload 'put-alist "alist" "\ Modify ALIST to set VALUE to ITEM. @@ -83,7 +87,7 @@ are used." t nil) (autoload 'update-file-autoloads "autoload" "\ Update the autoloads for FILE in `generated-autoload-file' \(which FILE might bind in its local variables). -This functions refuses to update autoloads files." t nil) +This function refuses to update autoloads files." t nil) (autoload 'update-autoloads-here "autoload" "\ Update sections of the current buffer generated by `update-file-autoloads'." t nil) @@ -830,7 +834,7 @@ Variables of note: tag-mark-stack-max how many tags-based hops to remember" t nil) (autoload 'find-tag-other-window "etags" "\ -*Find tag whose name contains TAGNAME. +*Find tag whose name contains TAGNAME, in another window. Selects the buffer that the tag is contained in in another window and puts point at its definition. If TAGNAME is a null string, the expression in the buffer @@ -1205,9 +1209,15 @@ Interactively set the variable on the current line." t nil) List of directories to search for Info documentation files. The first directory in this list, the \"dir\" file there will become -the (dir)Top node of the Info documentation tree. If you wish to -modify the info search path, use `M-x customize-variable, -Info-directory-list' to do so.") +the (dir)Top node of the Info documentation tree. + +Note: DO NOT use the `customize' interface to change the value of this +variable. Its value is created dynamically on each startup, depending +on XEmacs packages installed on the system. If you want to change the +search path, make the needed modifications on the variable's value +from .emacs. For instance: + + (setq Info-directory-list (cons \"~/info\" Info-directory-list))") (autoload 'info "info" "\ Enter Info, the documentation browser. @@ -1361,7 +1371,7 @@ recent to least recent -- in other words, the version names don't have to be lexically ordered. It is debatable if it makes sense to have more than one version of a package available.") -(defcustom package-get-download-sites '(("xemacs.org" "ftp.xemacs.org" "pub/xemacs/packages") ("cso.uiuc.edu" "ftp.cso.uiuc.edu" "pub/packages/xemacs/packages") ("unicamp.br" "ftp.unicamp.br" "pub/xemacs/packages") ("sunsite.cnlab-switch.ch" "sunsite.cnlab-switch.ch" "mirror/xemacs/packages") ("tu-darmstadt.de" "ftp.tu-darmstadt.de" "pub/editors/xemacs/packages") ("sunsite.auc.dk" "sunsite.auc.dk" "pub/emacs/xemacs/packages") ("pasteur.fr" "ftp.pasteur.fr" "pub/computing/xemacs/packages") ("cenatls.cena.dgac.fr" "ftp.cenatls.cena.dgac.fr" "pub/Emacs/xemacs/packages") ("kfki.hu" "ftp.kfki.hu" "pub/packages/xemacs/packages") ("uniroma2.it" "ftp.uniroma2.it" "unix/misc/dist/XEMACS/packages") ("icm.edu.pl" "ftp.icm.edu.pl" "pub/unix/editors/xemacs/packages") ("sunet.se" "ftp.sunet.se" "pub/gnu/xemacs/packages") ("doc.ic.ac.uk" "sunsite.doc.ic.ac.uk" "packages/xemacs/packages") ("srcc.msu.su" "ftp1.srcc.msu.su" "mirror/ftp.xemacs.org/packages") ("usyd.edu.au" "ftp.usyd.edu.au" "pub/Xemacs/packages") ("netlab.is.tsukuba.ac.jp" "ftp.netlab.is.tsukuba.ac.jp" "pub/GNU/xemacs/packages") ("jaist.ac.jp" "ftp.jaist.ac.jp" "pub/GNU/xemacs/packages") ("ring.aist.go.jp" "ring.aist.go.jp" "pub/text/xemacs/packages") ("ring.asahi-net.or.jp" "ring.asahi-net.or.jp" "pub/text/xemacs/packages") ("SunSITE.sut.ac.jp" "SunSITE.sut.ac.jp" "pub/archives/packages/xemacs/packages") ("dti.ad.jp" "ftp.dti.ad.jp" "pub/unix/editor/xemacs/packages") ("kreonet.re.kr" "ftp.kreonet.re.kr" "pub/tools/emacs/xemacs/packages")) "*List of remote sites available for downloading packages.\nList format is '(site-description site-name directory-on-site).\nSITE-DESCRIPTION is a textual description of the site. SITE-NAME\nis the internet address of the download site. DIRECTORY-ON-SITE\nis the directory on the site in which packages may be found.\nThis variable is used to initialize `package-get-remote', the\nvariable actually used to specify package download sites." :tag "Package download sites" :type '(repeat (list hostname directory)) :group 'package-get) +(defcustom package-get-download-sites '(("xemacs.org" "ftp.xemacs.org" "pub/xemacs/packages") ("crc.ca (Canada)" "ftp.crc.ca" "pub/packages/editors/xemacs/packages") ("ualberta.ca (Canada)" "sunsite.ualberta.ca" "pub/Mirror/xemacs/packages") ("uiuc.edu (United States)" "uiarchive.uiuc.edu" "pub/packages/xemacs/packages") ("unc.edu (United States)" "metalab.unc.edu" "pub/packages/editors/xemacs/packages") ("utk.edu (United States)" "ftp.sunsite.utk.edu" "pub/xemacs/packages") ("unicamp.br (Brazil)" "ftp.unicamp.br" "pub/xemacs/packages") ("tuwien.ac.at (Austria)" "gd.tuwien.ac.at" "editors/xemacs/packages") ("auc.dk (Denmark)" "sunsite.auc.dk" "pub/emacs/xemacs/packages") ("doc.ic.ac.uk (England)" "sunsite.doc.ic.ac.uk" "packages/xemacs/packages") ("funet.fi (Finland)" "ftp.funet.fi" "pub/mirrors/ftp.xemacs.org/pub/tux/xemacs/packages") ("cenatls.cena.dgac.fr (France)" "ftp.cenatls.cena.dgac.fr" "Emacs/xemacs/packages") ("pasteur.fr (France)" "ftp.pasteur.fr" "pub/computing/xemacs/packages") ("tu-darmstadt.de (Germany)" "ftp.tu-darmstadt.de" "pub/editors/xemacs/packages") ("kfki.hu (Hungary)" "ftp.kfki.hu" "pub/packages/xemacs/packages") ("eunet.ie (Ireland)" "ftp.eunet.ie" "mirrors/ftp.xemacs.org/pub/xemacs/packages") ("uniroma2.it (Italy)" "ftp.uniroma2.it" "unix/misc/dist/XEMACS/packages") ("uio.no (Norway)" "sunsite.uio.no" "pub/xemacs/packages") ("icm.edu.pl (Poland)" "ftp.icm.edu.pl" "pub/unix/editors/xemacs/packages") ("srcc.msu.su (Russia)" "ftp.srcc.msu.su" "mirror/ftp.xemacs.org/packages") ("sunet.se (Sweden)" "ftp.sunet.se" "pub/gnu/xemacs/packages") ("cnlab-switch.ch (Switzerland)" "sunsite.cnlab-switch.ch" "mirror/xemacs/packages") ("aist.go.jp (Japan)" "ring.aist.go.jp" "pub/text/xemacs/packages") ("asahi-net.or.jp (Japan)" "ring.asahi-net.or.jp" "pub/text/xemacs/packages") ("dti.ad.jp (Japan)" "ftp.dti.ad.jp" "pub/unix/editor/xemacs/packages") ("jaist.ac.jp (Japan)" "ftp.jaist.ac.jp" "pub/GNU/xemacs/packages") ("nucba.ac.jp (Japan)" "mirror.nucba.ac.jp" "mirror/xemacs/packages") ("sut.ac.jp (Japan)" "sunsite.sut.ac.jp" "pub/archives/packages/xemacs/packages") ("tsukuba.ac.jp (Japan)" "ftp.netlab.is.tsukuba.ac.jp" "pub/GNU/xemacs/packages") ("kreonet.re.kr (Korea)" "ftp.kreonet.re.kr" "pub/tools/emacs/xemacs/packages") ("nctu.edu.tw (Taiwan)" "coda.nctu.edu.tw" "Editors/xemacs/packages") ("sun.ac.za (South Africa)" "ftp.sun.ac.za" "xemacs/packages") ("isu.net.sa (Saudi Arabia)" "ftp.isu.net.sa" "pub/mirrors/ftp.xemacs.org/packages") ("aarnet.edu.au (Australia)" "mirror.aarnet.edu.au" "pub/xemacs/packages")) "*List of remote sites available for downloading packages.\nList format is '(site-description site-name directory-on-site).\nSITE-DESCRIPTION is a textual description of the site. SITE-NAME\nis the internet address of the download site. DIRECTORY-ON-SITE\nis the directory on the site in which packages may be found.\nThis variable is used to initialize `package-get-remote', the\nvariable actually used to specify package download sites." :tag "Package download sites" :type '(repeat (list (string :tag "Name") host-name directory)) :group 'package-get) (autoload 'package-get-download-menu "package-get" "\ Build the `Add Download Site' menu." nil nil) @@ -1428,7 +1438,7 @@ package is already installed. Valid values for CONFLICT are: INSTALL-DIR, if non-nil, specifies the package directory where fetched packages should be installed. -The value of `package-get-base' is used to determine what files should +The value of `package-get-base' is used to determine what files should be retrieved. The value of `package-get-remote' is used to determine where a package should be retrieved from. The sites are tried in order so one is better off listing easily reached sites first. @@ -1444,7 +1454,7 @@ successfully installed but errors occurred during initialization, or (autoload 'package-get-package-provider "package-get" "\ Search for a package that provides SYM and return the name and version. Searches in `package-get-base' for SYM. If SYM is a - consp, then it must match a corresponding (provide (SYM VERSION)) from + consp, then it must match a corresponding (provide (SYM VERSION)) from the package. If FORCE-CURRENT is non-nil make sure the database is up to date. This might @@ -1540,18 +1550,7 @@ they are not defaultly assigned to keys." t nil) ;;;*** -;;;### (autoloads (clear-rectangle string-rectangle open-rectangle insert-rectangle yank-rectangle extract-rectangle delete-extract-rectangle delete-rectangle kill-rectangle) "rect" "lisp/rect.el") - -(defvar killed-rectangle nil "\ -Rectangle for `yank-rectangle' to insert.") - -(autoload 'kill-rectangle "rect" "\ -Delete the region-rectangle and save it as the last killed one. -You might prefer to use `delete-extract-rectangle' from a program. - -When called from a program, the rectangle's corners are START and END. -With a prefix (or FILL) argument, also fill lines where nothing has to be -deleted." t nil) +;;;### (autoloads (clear-rectangle string-rectangle open-rectangle insert-rectangle yank-rectangle kill-rectangle extract-rectangle delete-extract-rectangle delete-rectangle) "rect" "lisp/rect.el") (autoload 'delete-rectangle "rect" "\ Delete the text in the region-rectangle without saving it. @@ -1573,6 +1572,17 @@ deleted." nil nil) Return the contents of the rectangle with corners at START and END, as a list of strings, one for each line of the rectangle." nil nil) +(defvar killed-rectangle nil "\ +Rectangle for `yank-rectangle' to insert.") + +(autoload 'kill-rectangle "rect" "\ +Delete the region-rectangle and save it as the last killed one. +You might prefer to use `delete-extract-rectangle' from a program. + +When called from a program, the rectangle's corners are START and END. +With a prefix (or FILL) argument, also fill lines where nothing has to be +deleted." t nil) + (autoload 'yank-rectangle "rect" "\ Yank the last killed rectangle with upper left corner at point." t nil) @@ -1593,8 +1603,10 @@ on the right side of the rectangle." t nil) (autoload 'string-rectangle "rect" "\ Insert STRING on each line of the region-rectangle, shifting text right. -The left edge of the rectangle specifies the column for insertion. This -command does not delete or overwrite any existing text. +The left edge of the rectangle specifies the column for insertion. + +If `pending-delete-mode' is active the string replace the region. +Otherwise this command does not delete or overwrite any existing text. When called from a program, the rectangle's corners are START and END." t nil) @@ -1825,4 +1837,4 @@ or if you change your font path, you can call this to re-initialize the menus." ;;;*** -(provide 'Standard-autoloads) +(provide 'lisp-autoloads) diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index b93feb4..3a6df7b 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el @@ -634,6 +634,11 @@ The R column contains a % for buffers that are read-only." files-only)) buffer)) +(defun buffers-menu-omit-invisible-buffers (buf) + "For use as a value of `buffers-menu-omit-function'. +Omits normally invisible buffers (those whose name begins with a space)." + (not (null (string-match "\\` " (buffer-name buf))))) + (provide 'buff-menu) ;;; buff-menu.el ends here diff --git a/lisp/buffer.el b/lisp/buffer.el index 002ce0d..983a55e 100644 --- a/lisp/buffer.el +++ b/lisp/buffer.el @@ -60,10 +60,7 @@ the window-buffer correspondences." (set-buffer-major-mode buf)))) (push-window-configuration) (set-buffer buf) - (set-window-buffer (if (eq (selected-window) (minibuffer-window)) - (next-window (minibuffer-window)) - (selected-window)) - buf norecord) + (set-window-buffer (last-nonminibuf-window) buf norecord) buf)) (defun pop-to-buffer (bufname &optional not-this-window-p on-frame) diff --git a/lisp/build-report.el b/lisp/build-report.el index 66ef27f..3f89157 100644 --- a/lisp/build-report.el +++ b/lisp/build-report.el @@ -138,7 +138,7 @@ available." ;; Bandaid (when (featurep 'mime-setup) ;; No (defvaralias ...) so far. Thanks to "Didier Verna" - ;; for reporting my incorrect defvaraliasing of + ;; for reporting my incorrect defvaraliasing of ;; `mime-editor/insert-tag'. ;; Thanks to Jens-Ulrik Holger Petersen ;; for suggesting the conditional @@ -213,7 +213,7 @@ The make process output must have been saved in (progn (mime-edit-insert-tag "text" - "plain" + "plain" (concat "\nContent-Disposition: attachment;" " filename=\"" @@ -229,7 +229,7 @@ The make process output must have been saved in (goto-char (point-min)) (delete-matching-lines (build-report-delete)) (goto-char (point-min)) - (insert "> Contents of " + (insert "> Contents of " build-report-make-output-file "\n> keeping lines matching\n> \"" (build-report-keep) @@ -239,7 +239,7 @@ The make process output must have been saved in (insert "> " build-report-make-output-file " does not exist!\n\n")) (buffer-string))) - + (defun build-report-insert-installation-file (where all) "Inserts the contents of the `build-report-installation-file' created by the XEmacs Beta configure process." @@ -258,7 +258,7 @@ created by the XEmacs Beta configure process." (progn (mime-edit-insert-tag "text" - "plain" + "plain" (concat "\nContent-Disposition: attachment;" " filename=\"" diff --git a/lisp/cl-macs.el b/lisp/cl-macs.el index 841d5e0..b66b4ea 100644 --- a/lisp/cl-macs.el +++ b/lisp/cl-macs.el @@ -106,31 +106,6 @@ (run-hooks 'cl-hack-bytecomp-hook)) -;;; Symbols. - -(defvar *gensym-counter*) - -;;;###autoload -(defun gensym (&optional arg) - "Generate a new uninterned symbol. -The name is made by appending a number to PREFIX, default \"G\"." - (let ((prefix (if (stringp arg) arg "G")) - (num (if (integerp arg) arg - (prog1 *gensym-counter* - (setq *gensym-counter* (1+ *gensym-counter*)))))) - (make-symbol (format "%s%d" prefix num)))) - -;;;###autoload -(defun gentemp (&optional arg) - "Generate a new interned symbol with a unique name. -The name is made by appending a number to PREFIX, default \"G\"." - (let ((prefix (if (stringp arg) arg "G")) - name) - (while (intern-soft (setq name (format "%s%d" prefix *gensym-counter*))) - (setq *gensym-counter* (1+ *gensym-counter*))) - (intern name))) - - ;;; Program structure. ;;;###autoload diff --git a/lisp/cl.el b/lisp/cl.el index 4bddff6..db01cd2 100644 --- a/lisp/cl.el +++ b/lisp/cl.el @@ -317,6 +317,23 @@ definitions to shadow the loaded ones for use in file byte-compilation." (defvar *gensym-counter* (* (logand (cl-random-time) 1023) 100)) +(defun gensym (&optional arg) + "Generate a new uninterned symbol. +The name is made by appending a number to PREFIX, default \"G\"." + (let ((prefix (if (stringp arg) arg "G")) + (num (if (integerp arg) arg + (prog1 *gensym-counter* + (setq *gensym-counter* (1+ *gensym-counter*)))))) + (make-symbol (format "%s%d" prefix num)))) + +(defun gentemp (&optional arg) + "Generate a new interned symbol with a unique name. +The name is made by appending a number to PREFIX, default \"G\"." + (let ((prefix (if (stringp arg) arg "G")) + name) + (while (intern-soft (setq name (format "%s%d" prefix *gensym-counter*))) + (setq *gensym-counter* (1+ *gensym-counter*))) + (intern name))) ;;; Numbers. diff --git a/lisp/coding.el b/lisp/coding.el index 96056d4..30e4036 100644 --- a/lisp/coding.el +++ b/lisp/coding.el @@ -104,6 +104,9 @@ or a function symbol which, when called, returns such a cons cell." (interactive "zkeyboard-coding-system: ") (get-coding-system coding-system) ; correctness check (setq keyboard-coding-system coding-system) + (if (eq (device-type) 'tty) + (set-console-tty-input-coding-system + (device-console) keyboard-coding-system)) (redraw-modeline t)) (defsubst terminal-coding-system () @@ -117,7 +120,8 @@ or a function symbol which, when called, returns such a cons cell." (setq terminal-coding-system coding-system) ; #### should this affect all current tty consoles ? (if (eq (device-type) 'tty) - (set-console-tty-coding-system (device-console) terminal-coding-system)) + (set-console-tty-output-coding-system + (device-console) terminal-coding-system)) (redraw-modeline t)) (defun set-pathname-coding-system (coding-system) diff --git a/lisp/custom-load.el b/lisp/custom-load.el index a5b0c03..543ca8b 100644 --- a/lisp/custom-load.el +++ b/lisp/custom-load.el @@ -69,7 +69,7 @@ (custom-add-loads 'languages '("lisp-mode" "cus-edit" "font-lock")) (custom-add-loads 'fill '("simple" "fill")) (custom-add-loads 'custom-magic-faces '("cus-edit")) -(custom-add-loads 'display '("toolbar" "scrollbar" "gutter-items" "auto-show")) +(custom-add-loads 'display '("toolbar" "scrollbar" "auto-show")) (custom-add-loads 'faces '("faces" "cus-edit" "font-lock" "font" "hyper-apropos" "info" "wid-edit")) (custom-add-loads 'emacs '("faces" "help" "files" "cus-edit" "package-get")) (custom-add-loads 'processes '("process" "gnuserv")) @@ -83,7 +83,7 @@ (custom-add-loads 'matching '("simple" "isearch-mode" "hyper-apropos")) (custom-add-loads 'i18n '("cus-edit")) (custom-add-loads 'info '("toolbar-items" "info")) -(custom-add-loads 'x '("x-faces" "font-menu")) +(custom-add-loads 'x '("x-faces")) (custom-add-loads 'buffers-tab '("gutter-items")) ;;; custom-load.el ends here diff --git a/lisp/custom.el b/lisp/custom.el index fa7d2b1..49616dc 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -227,7 +227,7 @@ For the DISPLAY to match a FRAME, the REQ property of the frame must match one of the ITEM. The following REQ are defined: `type' (the value of `window-system') - Should be one of `x' or `tty'. + Should be one of `x', `mswindows', or `tty'. `class' (the frame's color support) Should be one of `color', `grayscale', or `mono'. diff --git a/lisp/dialog.el b/lisp/dialog.el index 740ff72..32f6e01 100644 --- a/lisp/dialog.el +++ b/lisp/dialog.el @@ -37,8 +37,8 @@ Takes one argument, which is the string to display to ask the question." event) (popup-dialog-box ;; "Non-violent language please!" says Robin. - (cons prompt '(["Yes" yes t] ["No" no t] nil ["Cancel" abort t]))) -; (cons prompt '(["Yes" yes t] ["No" no t] nil ["Abort" abort t]))) + (cons prompt '(["%_Yes" yes t] ["%_No" no t] nil ["%_Cancel" abort t]))) +; (cons prompt '(["%_Yes" yes t] ["%_No" no t] nil ["A%_bort" abort t]))) (catch 'ynp-done (while t (setq event (next-command-event event)) @@ -138,7 +138,7 @@ minibuffer contents show." nil) (let ((str (apply 'format fmt args))) (if (device-on-window-system-p) - (get-dialog-box-response nil (list str (cons "OK" t))) + (get-dialog-box-response nil (list str (cons "%_OK" t))) (display-message 'message str)) str))) diff --git a/lisp/dumped-lisp.el b/lisp/dumped-lisp.el index 9e95510..acfb9f8 100644 --- a/lisp/dumped-lisp.el +++ b/lisp/dumped-lisp.el @@ -165,7 +165,7 @@ (when-feature (and (not infodock) (or x mswindows) menubar) "menubar-items") (when-feature (and infodock (or x mswindows) menubar) "id-menus") - (when-feature (and gutter menubar window-system) "gutter-items") + (when-feature (and gutter window-system) "gutter-items") (when-feature x "x-faces") (when-feature x "x-iso8859-1") (when-feature x "x-mouse") diff --git a/lisp/files.el b/lisp/files.el index 1c4ad7e..f38a941 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1028,7 +1028,8 @@ If RAWFILE is non-nil, the file is read literally." (setq buf (current-buffer)))) (t (kill-buffer buf) - (signal (car data) (cdr data)))))) + (signal (car data) (cdr data)))) + )) buf))) ;; FSF has `insert-file-literally' and `find-file-literally' here. @@ -1193,7 +1194,9 @@ run `normal-mode' explicitly." ("\\.lex\\'" . c-mode) ("\\.m\\'" . objc-mode) ("\\.oak\\'" . scheme-mode) - ("\\.s?html?\\'" . html-mode) + ("\\.[sj]?html?\\'" . html-mode) + ("\\.jsp\\'" . html-mode) + ("\\.xml\\'" . xml-mode) ("\\.htm?l?3\\'" . html3-mode) ("\\.\\(?:sgml?\\|dtd\\)\\'" . sgml-mode) ("\\.c?ps\\'" . postscript-mode) @@ -2459,7 +2462,7 @@ Optional second argument EXITING means ask about certain non-file buffers (recursive-edit) ;; Return nil to ask about BUF again. nil) - "display the current buffer")))) + "%_Display Buffer")))) (abbrevs-done (and save-abbrevs abbrevs-changed (progn diff --git a/lisp/font-lock.el b/lisp/font-lock.el index b942db4..d5e26d8 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -584,11 +584,10 @@ This is normally set via `font-lock-defaults'.") font-lock-preprocessor-face font-lock-warning-face)) -;; #### There should be an emulation for the old font-lock-use-* -;; settings! - (defface font-lock-comment-face '((((class color) (background dark)) (:foreground "gray80")) + ;; blue4 is hardly different from black on windows. + (((class color) (background light) (type mswindows)) (:foreground "blue")) (((class color) (background light)) (:foreground "blue4")) (((class grayscale) (background light)) (:foreground "DimGray" :bold t :italic t)) @@ -620,6 +619,8 @@ on the major mode's symbol." (defface font-lock-keyword-face '((((class color) (background dark)) (:foreground "cyan")) + ;; red4 is hardly different from black on windows. + (((class color) (background light) (type mswindows)) (:foreground "red")) (((class color) (background light)) (:foreground "red4")) (((class grayscale) (background light)) (:foreground "LightGray" :bold t)) (((class grayscale) (background dark)) (:foreground "DimGray" :bold t)) @@ -629,6 +630,11 @@ on the major mode's symbol." (defface font-lock-function-name-face '((((class color) (background dark)) (:foreground "aquamarine")) + ;; brown4 is hardly different from black on windows. + ;; I changed it to red because IMO it's pointless and ugly to + ;; use a million slightly different colors for niggly syntactic + ;; differences. --ben + (((class color) (background light) (type mswindows)) (:foreground "red")) (((class color) (background light)) (:foreground "brown4")) (t (:bold t :underline t))) "Font Lock mode face used to highlight function names." @@ -834,8 +840,9 @@ See the variable `font-lock-keywords' for customization." ((or (null maximum-size) (<= (buffer-size) maximum-size)) (font-lock-fontify-buffer)) (font-lock-verbose - (lmessage 'command "Fontifying %s... buffer too big." - (buffer-name))))) + (lprogress-display 'font-lock + "Fontifying %s... buffer too big." 'abort + (buffer-name))))) (font-lock-fontified (setq font-lock-fontified nil) (remove-hook 'before-revert-hook 'font-lock-revert-setup t) @@ -996,7 +1003,7 @@ This can take a while for large buffers." (condition-case nil (save-excursion (font-lock-fontify-region (point-min) (point-max))) - (quit + (t (setq aborted t))) (or was-on ; turn it off if it was off. @@ -1004,7 +1011,7 @@ This can take a while for large buffers." (font-lock-mode 0))) (set (make-local-variable 'font-lock-fontified) t) (when (and aborted font-lock-verbose) - (lmessage 'command "Fontifying %s... aborted." (buffer-name)))) + (lprogress-display 'font-lock "Fontifying %s... aborted." 'abort (buffer-name)))) (run-hooks 'font-lock-after-fontify-buffer-hook)) (defun font-lock-default-unfontify-buffer () @@ -1043,7 +1050,7 @@ This can take a while for large buffers." (defun font-lock-default-unfontify-region (beg end &optional maybe-loudly) (when (and maybe-loudly font-lock-verbose (>= (- end beg) font-lock-message-threshold)) - (lmessage 'progress "Fontifying %s..." (buffer-name))) + (lprogress-display 'font-lock "Fontifying %s..." 0 (buffer-name))) (let ((modified (buffer-modified-p)) (buffer-undo-list t) (inhibit-read-only t) buffer-file-name buffer-file-truename) @@ -1305,8 +1312,8 @@ START should be at the beginning of a line." nil (when (and font-lock-verbose (>= (- end start) font-lock-message-threshold)) - (lmessage 'progress "Fontifying %s... (syntactically...)" - (buffer-name))) + (lprogress-display 'font-lock "Fontifying %s... (syntactically)" 5 + (buffer-name))) (font-lock-unfontify-region start end loudly) (goto-char start) (if (> end (point-max)) (setq end (point-max))) @@ -1493,14 +1500,13 @@ START should be at the beginning of a line." (keywords (cdr (if (eq (car-safe font-lock-keywords) t) font-lock-keywords (font-lock-compile-keywords)))) - (bufname (buffer-name)) (count 0) + (bufname (buffer-name)) (count 5) keyword matcher highlights) ;; ;; Fontify each item in `font-lock-keywords' from `start' to `end'. (while keywords - (when loudly (lmessage 'progress "Fontifying %s... (regexps..%s)" - bufname - (make-string (setq count (1+ count)) ?.))) + (when loudly (lprogress-display 'font-lock "Fontifying %s... (regexps)" + (setq count (+ count 5)) bufname)) ;; ;; Find an occurrence of `matcher' from `start' to `end'. (setq keyword (car keywords) matcher (car keyword)) @@ -1523,7 +1529,7 @@ START should be at the beginning of a line." (font-lock-fontify-anchored-keywords (car highlights) end)) (setq highlights (cdr highlights)))) (setq keywords (cdr keywords)))) - (if loudly (lmessage 'progress "Fontifying %s... done." (buffer-name))))) + (if loudly (lprogress-display 'font-lock "Fontifying %s... " 100 (buffer-name))))) ;; Various functions. @@ -1548,17 +1554,26 @@ START should be at the beginning of a line." (lazy-lock-after-fontify-buffer)))) ;; If the buffer is about to be reverted, it won't be fontified afterward. -(defun font-lock-revert-setup () - (setq font-lock-fontified nil)) +;(defun font-lock-revert-setup () +; (setq font-lock-fontified nil)) ;; If the buffer has just been reverted, normally that turns off ;; Font Lock mode. So turn the mode back on if necessary. ;; sb 1999-03-03 -- The above comment no longer appears to be operative as ;; the first call to normal-mode *will* restore the font-lock state and ;; this call forces a second font-locking to occur when reverting a buffer, -;; which is wasteful at best. -;(defalias 'font-lock-revert-cleanup 'turn-on-font-lock) -(defun font-lock-revert-cleanup ()) +;; which is wasteful at best. +;;(defun font-lock-revert-cleanup ()) + +;; 12-10-99. This still does not work right, I think +;; after change functions will still get us. The simplest thing to do +;; is unconditionally turn-off font-lock before revert (and thus nuke +;; all hooks) and then turn it on again afterwards. This also happens +;; to be much faster because fontifying from scratch is better than +;; trying to do incremental changes for the whole buffer. + +(defalias 'font-lock-revert-cleanup 'turn-on-font-lock) +(defalias 'font-lock-revert-setup 'turn-off-font-lock) ;; Various functions. diff --git a/lisp/font-menu.el b/lisp/font-menu.el index aa46c4c..14c680d 100644 --- a/lisp/font-menu.el +++ b/lisp/font-menu.el @@ -168,16 +168,6 @@ the last entry in the menu." ((x) . 10))) t) "Scale factor used in defining font sizes.") -(defun vassoc (key valist) - "Search VALIST for a vector whose first element is equal to KEY. -See also `assoc'." - ;; by Stig@hackvan.com - (let (el) - (catch 'done - (while (setq el (pop valist)) - (and (equal key (aref el 0)) - (throw 'done el)))))) - ;; only call XListFonts (and parse) once per device. ;; ( (device . [parsed-list-fonts family-menu size-menu weight-menu]) ...) (defvar device-fonts-cache nil) @@ -207,12 +197,12 @@ or if you change your font path, you can call this to re-initialize the menus." (message "Getting list of fonts from server... done."))) (defun font-menu-split-long-menu (menu) - "Split MENU according to `font-menu-max-items'." + "Split MENU according to `font-menu-max-items' and add accelerator specs." (let ((len (length menu))) (if (or (null font-menu-max-items) (null (featurep 'lisp-float-type)) (<= len font-menu-max-items)) - menu + (submenu-generate-accelerator-spec menu) ;; Submenu is max 2 entries longer than menu, never shorter, number of ;; entries in submenus differ by at most one (with longer submenus first) (let* ((outer (floor (sqrt len))) @@ -231,14 +221,20 @@ or if you change your font path, you can call this to re-initialize the menus." (setq result (cons (cons (if (stringp font-menu-submenu-name-format) (format font-menu-submenu-name-format - (aref (car sub) 0) (aref to 0)) + (menu-item-strip-accelerator-spec + (aref (car sub) 0)) + (menu-item-strip-accelerator-spec + (aref to 0))) (funcall font-menu-submenu-name-format - (aref (car sub) 0) (aref to 0))) - sub) + (menu-item-strip-accelerator-spec + (aref (car sub) 0)) + (menu-item-strip-accelerator-spec + (aref to 0)))) + (submenu-generate-accelerator-spec sub)) result) rest (1+ rest)) (if (= rest outer) (setq inner (1+ inner))))) - result)))) + (submenu-generate-accelerator-spec result))))) ;;;###autoload (defun font-menu-family-constructor (ignored) @@ -261,7 +257,7 @@ or if you change your font path, you can call this to re-initialize the menus." (font-menu-split-long-menu (mapcar (lambda (item) - (setq f (aref item 0) + (setq f (menu-item-strip-accelerator-spec (aref item 0)) entry (vassoc f (aref dcache 0))) (if (and (or (member weight (aref entry 1)) ;; mswindows often allows any weight @@ -309,7 +305,7 @@ or if you change your font path, you can call this to re-initialize the menus." (select-toggle-menu-item item) (deselect-toggle-menu-item item)) item) - (aref dcache 2))))) + (submenu-generate-accelerator-spec (aref dcache 2)))))) ;;;###autoload (defun font-menu-weight-constructor (ignored) @@ -338,7 +334,7 @@ or if you change your font path, you can call this to re-initialize the menus." (select-toggle-menu-item item) (deselect-toggle-menu-item item)) item) - (aref dcache 3))))) + (submenu-generate-accelerator-spec (aref dcache 3)))))) ;;; Changing font sizes @@ -351,11 +347,10 @@ or if you change your font path, you can call this to re-initialize the menus." (font-data (font-menu-font-data 'default dcache)) (from-family (aref font-data 1)) (from-size (aref font-data 2)) - (from-weight (aref font-data 3)) + (from-weight (aref font-data 3)) (from-slant (aref font-data 4)) - (face-list-to-change (delq 'default (face-list))) - new-default-face-font - new-props) + (face-list-to-change (delq 'default (face-list))) + new-default-face-font) (unless from-family (signal 'error '("couldn't parse font name for default face"))) (when weight @@ -396,14 +391,14 @@ or if you change your font path, you can call this to re-initialize the menus." (and font-menu-this-frame-only-p (selected-frame))) ;; OK Let Customize do it. (custom-set-face-update-spec 'default - (list (list 'type (device-type))) - (list :family family - :size (concat - (int-to-string - (/ (or size from-size) - (specifier-instance font-menu-size-scaling - (selected-device)))) - "pt"))) + (list (list 'type (device-type))) + (list :family family + :size (concat + (int-to-string + (/ (or size from-size) + (specifier-instance font-menu-size-scaling + (selected-device)))) + "pt"))) (message "Font %s" (face-font-name 'default))))) diff --git a/lisp/gutter-items.el b/lisp/gutter-items.el index 9581a49..8a83ed5 100644 --- a/lisp/gutter-items.el +++ b/lisp/gutter-items.el @@ -1,7 +1,7 @@ ;;; gutter-items.el --- Gutter content for XEmacs. ;; Copyright (C) 1999 Free Software Foundation, Inc. -;; Copyright (C) 1999 Andy Piper. +;; Copyright (C) 1999, 2000 Andy Piper. ;; Maintainer: XEmacs Development Team ;; Keywords: frames, extensions, internal, dumped @@ -30,26 +30,13 @@ "Input from the gutters." :group 'environment) -(defvar gutter-buffers-tab nil - "A tab widget in the gutter for displaying buffers. -Do not set this. Use `glyph-image-instance' and -`set-image-instance-property' to change the properties of the tab.") - -(defcustom gutter-visible-p - (specifier-instance default-gutter-visible-p) - "Whether the default gutter is globally visible. This option can be -customized through the options menu." - :group 'gutter - :type 'boolean - :set #'(lambda (var val) - (set-specifier default-gutter-visible-p val) - (setq gutter-visible-p val) - (when gutter-buffers-tab (update-tab-in-gutter)))) - +;; Although these customizations appear bogus, they are neccessary in +;; order to be able to save options through the options menu. (defcustom default-gutter-position (default-gutter-position) "The location of the default gutter. It can be 'top, 'bottom, 'left or -'right. This option can be customized through the options menu." +'right. This option should be customized through the options menu. +To set the gutter position explicitly use `set-default-gutter-position'" :group 'gutter :type '(choice (const :tag "top" top) (const :tag "bottom" bottom) @@ -57,8 +44,68 @@ customized through the options menu." (const :tag "right" right)) :set #'(lambda (var val) (set-default-gutter-position val) - (setq default-gutter-position val) - (when gutter-buffers-tab (update-tab-in-gutter)))) + (setq default-gutter-position val))) + +;;; Gutter helper functions + +;; called by Fset_default_gutter_position() +(defvar default-gutter-position-changed-hook nil + "Function or functions to be called when the gutter position is changed. +The value of this variable may be buffer-local.") + +;; called by set-gutter-element-visible-p +(defvar gutter-element-visibility-changed-hook nil + "Function or functions to be called when the visibility of an +element in the gutter changes. The value of this variable may be +buffer-local. The gutter element symbol is passed as an argument to +the hook, as is the visibility flag.") + +(defun set-gutter-element (gutter-specifier prop val &optional locale tag-set) + "Set GUTTER-SPECIFIER gutter element PROP to VAL in optional LOCALE. +This is a convenience function for setting gutter elements." + (map-extents #'(lambda (extent arg) + (set-extent-property extent 'duplicable t)) val) + (modify-specifier-instances gutter-specifier #'plist-put (list prop val) + 'force nil locale tag-set)) + +(defun remove-gutter-element (gutter-specifier prop &optional locale tag-set) + "Remove gutter element PROP from GUTTER-SPECIFIER in optional LOCALE. +This is a convenience function for removing gutter elements." + (modify-specifier-instances gutter-specifier #'plist-remprop (list prop) + 'force nil locale tag-set)) + +(defun set-gutter-element-visible-p (gutter-visible-specifier-p + prop &optional visible-p + locale tag-set) + "Change the visibility of gutter elements. +Set the visibility of element PROP to VISIBLE-P for +GUTTER-SPECIFIER-VISIBLE-P in optional LOCALE. +This is a convenience function for hiding and showing gutter elements." + (modify-specifier-instances + gutter-visible-specifier-p #'(lambda (spec prop visible-p) + (if (consp spec) + (if visible-p + (if (memq prop spec) spec + (cons prop spec)) + (delq prop spec)) + (if visible-p (list prop)))) + (list prop visible-p) + 'force nil locale tag-set) + (run-hook-with-args 'gutter-element-visibility-changed-hook prop visible-p)) + +(defun gutter-element-visible-p (gutter-visible-specifier-p + prop &optional domain) + "Determine whether a gutter element is visible. +Given GUTTER-VISIBLE-SPECIFIER-P and gutter element PROP, return +non-nil if it is visible in optional DOMAIN." + (let ((spec (specifier-instance gutter-visible-specifier-p domain))) + (or (and (listp spec) (memq 'buffers-tab spec)) + spec))) + +(defun init-gutter () + "Initialize the gutter." + ;; do nothing as yet. + ) ;;; The Buffers tab @@ -66,6 +113,21 @@ customized through the options menu." "Customization of `Buffers' tab." :group 'gutter) +(defvar gutter-buffers-tab nil + "A tab widget in the gutter for displaying buffers. +Do not set this. Use `glyph-image-instance' and +`set-image-instance-property' to change the properties of the tab.") + +(defcustom gutter-buffers-tab-visible-p + (gutter-element-visible-p default-gutter-visible-p 'buffers-tab) + "Whether the buffers tab is globally visible. +This option should be set through the options menu." + :group 'buffers-tab + :type 'boolean + :set #'(lambda (var val) + (set-gutter-element-visible-p default-gutter-visible-p 'buffers-tab val) + (setq gutter-buffers-tab-visible-p val))) + (defvar gutter-buffers-tab-orientation 'top "Where the buffers tab currently is. Do not set this.") @@ -109,6 +171,16 @@ by `buffers-tab-grouping-regexp'." function) :group 'buffers-tab) +(defcustom buffers-tab-sort-function nil + "*If non-nil, a function specifying the buffers to select from the +buffers tab. This is passed the buffer list and returns the list in the +order desired for the tab widget. The default value `nil' leaves the +list in `buffer-list' order (usual most-recently-selected-first)." + + :type '(choice (const :tag "None" nil) + function) + :group 'buffers-tab) + (make-face 'buffers-tab "Face for displaying the buffers tab.") (set-face-parent 'buffers-tab 'default) @@ -203,16 +275,37 @@ This just returns the buffer's name, optionally truncated." (buffer-name buffer)))) (defsubst build-buffers-tab-internal (buffers) - (let (line) + (let ((selected t)) (mapcar #'(lambda (buffer) - (setq line (funcall buffers-tab-format-buffer-line-function - buffer)) - (vector line (list buffers-tab-switch-to-buffer-function - (buffer-name buffer)))) + (prog1 + (vector + (funcall buffers-tab-format-buffer-line-function + buffer) + (list buffers-tab-switch-to-buffer-function + (buffer-name buffer)) + :selected selected) + (when selected (setq selected nil)))) buffers))) -(defun buffers-tab-items (&optional in-deletion frame) +;;; #### SJT I'd really like this function to have just two hooks: (1) the +;;; buffer filter list and (2) a sort function list. Both should be lists +;;; of functions. Each filter takes two arguments: a buffer and a model +;;; buffer. (The model buffer argument allows selecting according to the +;;; mode or directory of that buffer.) The filter returns t if the buffer +;;; should be listed and nil otherwise. Effectively the filter amounts to +;;; the conjuction of the filter list. (Optionally the filter could take a +;;; frame instead of a buffer or generalize to a locale as in a specifier?) +;;; The filtering is done this way to preserve the ordering imposed by +;;; `buffer-list'. In addition, the in-deletion argument will be used the +;;; same way as in the current design. +;;; The list is checked for length and pruned according to least-recently- +;;; selected. (Optionally there could be some kind of sort function here, +;;; too.) +;;; Finally the list is sorted to gutter display order, and the tab data +;;; structure is created and returned. +;;; #### Docstring isn't very well expressed. +(defun buffers-tab-items (&optional in-deletion frame force-selection) "This is the tab filter for the top-level buffers \"Buffers\" tab. It dynamically creates a list of buffers to use as the contents of the tab. Only the most-recently-used few buffers will be listed on the tab, for @@ -222,79 +315,107 @@ items by redefining the function `format-buffers-menu-line'." (save-match-data (let* ((buffers (delete-if buffers-tab-omit-function (buffer-list frame))) (first-buf (car buffers))) + ;; maybe force the selected window + (when (and force-selection + (not in-deletion) + (not (eq first-buf (window-buffer (selected-window frame))))) + (setq buffers (cons (window-buffer (selected-window frame)) + (delq first-buf buffers)))) ;; if we're in deletion ignore the current buffer (when in-deletion (setq buffers (delq (current-buffer) buffers)) (setq first-buf (car buffers))) - ;; group buffers by mode + ;; select buffers in group (default is by mode) (when buffers-tab-selection-function (delete-if-not #'(lambda (buf) (funcall buffers-tab-selection-function first-buf buf)) buffers)) + ;; maybe shorten list of buffers (and (integerp buffers-tab-max-size) (> buffers-tab-max-size 1) (> (length buffers) buffers-tab-max-size) - ;; shorten list of buffers (setcdr (nthcdr buffers-tab-max-size buffers) nil)) + ;; sort buffers in group (default is most-recently-selected) + (when buffers-tab-sort-function + (setq buffers (funcall buffers-tab-sort-function buffers))) + ;; convert list of buffers to list of structures used by tab widget (setq buffers (build-buffers-tab-internal buffers)) buffers))) (defun add-tab-to-gutter () "Put a tab control in the gutter area to hold the most recent buffers." (setq gutter-buffers-tab-orientation (default-gutter-position)) - (let ((gutter-string "")) + (let ((gutter-string "\n")) (unless gutter-buffers-tab-extent - (setq gutter-buffers-tab-extent (make-extent 0 0 gutter-string))) + (setq gutter-buffers-tab-extent (make-extent 0 1 gutter-string))) (set-extent-begin-glyph gutter-buffers-tab-extent (setq gutter-buffers-tab (make-glyph (vector 'tab-control :descriptor "Buffers" :face buffers-tab-face :orientation gutter-buffers-tab-orientation - :properties (list :items (buffers-tab-items)))))) - ;; This looks better than a 3d border - (mapcar '(lambda (x) - (when (valid-image-instantiator-format-p 'tab-control x) - (set-specifier default-gutter-border-width 0 'global x) - (set-specifier top-gutter nil 'global x) - (set-specifier bottom-gutter nil 'global x) - (set-specifier left-gutter nil 'global x) - (set-specifier right-gutter nil 'global x) - (set-specifier left-gutter-width 0 'global x) - (set-specifier right-gutter-width 0 'global x) - (cond ((eq gutter-buffers-tab-orientation 'top) - (set-specifier top-gutter gutter-string 'global x)) - ((eq gutter-buffers-tab-orientation 'bottom) - (set-specifier bottom-gutter gutter-string 'global x)) - ((eq gutter-buffers-tab-orientation 'left) - (set-specifier left-gutter gutter-string 'global x) - (set-specifier left-gutter-width - (glyph-width gutter-buffers-tab) - 'global x)) - ((eq gutter-buffers-tab-orientation 'right) - (set-specifier right-gutter gutter-string 'global x) - (set-specifier right-gutter-width - (glyph-width gutter-buffers-tab) - 'global x)) - ))) - (console-type-list)))) - -(defun update-tab-in-gutter (&optional frame-or-buffer) + (if (or (eq gutter-buffers-tab-orientation 'top) + (eq gutter-buffers-tab-orientation 'bottom)) + :pixel-width :pixel-height) + (if (or (eq gutter-buffers-tab-orientation 'top) + (eq gutter-buffers-tab-orientation 'bottom)) + '(gutter-pixel-width) '(gutter-pixel-height)) + :properties (list :items (buffers-tab-items nil nil t)))))) + + ;; Nuke all existing tabs + (remove-gutter-element top-gutter 'buffers-tab) + (remove-gutter-element bottom-gutter 'buffers-tab) + (remove-gutter-element left-gutter 'buffers-tab) + (remove-gutter-element right-gutter 'buffers-tab) + ;; Put tabs into all devices that will be able to display them + (mapcar + #'(lambda (x) + (when (valid-image-instantiator-format-p 'tab-control x) + (cond ((eq gutter-buffers-tab-orientation 'top) + ;; This looks better than a 3d border + (set-specifier top-gutter-border-width 0 'global x) + (set-gutter-element top-gutter 'buffers-tab + gutter-string 'global x)) + ((eq gutter-buffers-tab-orientation 'bottom) + (set-specifier bottom-gutter-border-width 0 'global x) + (set-gutter-element bottom-gutter 'buffers-tab + gutter-string 'global x)) + ((eq gutter-buffers-tab-orientation 'left) + (set-specifier left-gutter-border-width 0 'global x) + (set-gutter-element left-gutter 'buffers-tab + gutter-string 'global x) + (set-specifier left-gutter-width + (glyph-width gutter-buffers-tab) + 'global x)) + ((eq gutter-buffers-tab-orientation 'right) + (set-specifier right-gutter-border-width 0 'global x) + (set-gutter-element right-gutter 'buffers-tab + gutter-string 'global x) + (set-specifier right-gutter-width + (glyph-width gutter-buffers-tab) + 'global x)) + ))) + (console-type-list)))) + +(defun update-tab-in-gutter (&optional frame-or-buffer force-selection) "Update the tab control in the gutter area." (let ((locale (if (framep frame-or-buffer) frame-or-buffer))) - (when (specifier-instance default-gutter-visible-p locale) - (unless (and gutter-buffers-tab - (eq (default-gutter-position) - gutter-buffers-tab-orientation)) - (add-tab-to-gutter)) - (when (valid-image-instantiator-format-p 'tab-control locale) - (let ((inst (glyph-image-instance - gutter-buffers-tab - (when (framep frame-or-buffer) - (last-nonminibuf-window frame-or-buffer))))) - (set-image-instance-property inst :items - (buffers-tab-items - nil locale))))))) + ;; dedicated frames don't get tabs + (unless (and (framep locale) + (window-dedicated-p (frame-selected-window locale))) + (when (specifier-instance default-gutter-visible-p locale) + (unless (and gutter-buffers-tab + (eq (default-gutter-position) + gutter-buffers-tab-orientation)) + (add-tab-to-gutter)) + (when (valid-image-instantiator-format-p 'tab-control locale) + (let ((inst (glyph-image-instance + gutter-buffers-tab + (when (framep frame-or-buffer) + (last-nonminibuf-window frame-or-buffer))))) + (set-image-instance-property inst :items + (buffers-tab-items + nil locale force-selection)))))))) (defun remove-buffer-from-gutter-tab () "Remove the current buffer from the tab control in the gutter area." @@ -308,31 +429,52 @@ items by redefining the function `format-buffers-menu-line'." (get-buffer-create "*scratch*"))))) (set-image-instance-property inst :items buffers)))) +;; A myriad of different update hooks all doing slightly different things (add-hook 'kill-buffer-hook 'remove-buffer-from-gutter-tab) -(add-hook 'create-frame-hook 'update-tab-in-gutter) +(add-hook 'create-frame-hook + #'(lambda (frame) + (when gutter-buffers-tab (update-tab-in-gutter frame t)))) (add-hook 'record-buffer-hook 'update-tab-in-gutter) +(add-hook 'default-gutter-position-changed + #'(lambda (arg) + (when gutter-buffers-tab (update-tab-in-gutter arg)))) +(add-hook 'gutter-element-visibility-changed-hook + #'(lambda (prop visible-p) + (when (and (eq prop 'buffers-tab) visible-p) + (update-tab-in-gutter)))) ;; ;; progress display ;; ripped off from message display ;; +(defcustom progress-display-use-echo-area nil + "*Whether progress gauge display should display in the echo area. +If NIL then progress gauges will be displayed with whatever native widgets +are available on the current console. If non-NIL then progress display will be +textual and displayed in the echo area." + :type 'boolean + :group 'gutter) + (defvar progress-stack nil "An alist of label/string pairs representing active progress gauges. The first element in the list is currently displayed in the gutter area. -Do not modify this directly--use the `progress' or -`display-progress'/`clear-progress' functions.") +Do not modify this directly--use the `progress-display' or +`display-progress-display'/`clear-progress-display' functions.") (defvar progress-glyph-height 32 "Height of the gutter area for progress messages.") -(defvar progress-stop-callback 'progress-quit-function +(defvar progress-display-stop-callback 'progress-display-quit-function "Function to call to stop the progress operation.") -(defun progress-quit-function () +(defvar progress-display-popup-period 0.5 + "The time that the progress gauge should remain up after completion") + +(defun progress-display-quit-function () "Default function to call for the stop button in a progress gauge. This just removes the progress gauge and calls quit." (interactive) - (clear-progress) + (clear-progress-display) (keyboard-quit)) ;; private variables @@ -361,7 +503,7 @@ This just removes the progress gauge and calls quit." (vector 'button :pixel-height (- progress-glyph-height 8) :descriptor " Stop " - :callback '(funcall progress-stop-callback))))))))) + :callback '(funcall progress-display-stop-callback))))))))) (defvar progress-abort-glyph (make-glyph @@ -372,7 +514,7 @@ This just removes the progress gauge and calls quit." :pixel-height progress-glyph-height :orientation 'horizontal)))))) -(defvar progress-extent-text "") +(defvar progress-extent-text "\n") (defvar progress-extent nil) (defun progress-displayed-p (&optional return-string frame) @@ -387,8 +529,8 @@ return a string containing the message, otherwise just return t." ;;; Returns the string which remains in the echo area, or nil if none. ;;; If label is nil, the whole message stack is cleared. -(defun clear-progress (&optional label frame no-restore) - "Remove any progress gauge with the given LABEL from the progress gauge-stack, +(defun clear-progress-display (&optional label frame no-restore) + "Remove any progress gauge with LABEL from the progress gauge-stack, erasing it from the gutter area if it's currently displayed there. If a message remains at the head of the progress-stack and NO-RESTORE is nil, it will be displayed. The string which remains in the gutter @@ -397,23 +539,33 @@ If LABEL is nil, the entire progress-stack is cleared. Unless you need the return value or you need to specify a label, you should just use (progress nil)." - (or frame (setq frame (selected-frame))) - (remove-progress label frame) - (let ((inhibit-read-only t) - (zmacs-region-stays zmacs-region-stays)) ; preserve from change - (erase-buffer " *Echo Area*") - (erase-buffer (get-buffer-create " *Gutter Area*"))) - (if no-restore - nil ; just preparing to put another msg up - (if progress-stack - (let ((oldmsg (cdr (car progress-stack)))) - (raw-append-progress oldmsg frame) - oldmsg) - ;; nothing to display so get rid of the gauge - (set-specifier bottom-gutter-border-width 0 frame) - (set-specifier bottom-gutter-visible-p nil frame)))) - -(defun remove-progress (&optional label frame) + (if (or (not (valid-image-instantiator-format-p 'progress-gauge frame)) + progress-display-use-echo-area) + (clear-message label frame nil no-restore) + (or frame (setq frame (selected-frame))) + (remove-progress-display label frame) + (let ((inhibit-read-only t) + (zmacs-region-stays zmacs-region-stays)) ; preserve from change + (erase-buffer (get-buffer-create " *Gutter Area*"))) + (if no-restore + nil ; just preparing to put another msg up + (if progress-stack + (let ((oldmsg (cdr (car progress-stack)))) + (raw-append-progress-display oldmsg frame) + oldmsg) + ;; nothing to display so get rid of the gauge + (set-specifier bottom-gutter-border-width 0 frame) + (set-gutter-element-visible-p bottom-gutter-visible-p + 'progress nil frame))))) + +(defun progress-display-clear-when-idle (&optional label) + (add-hook 'pre-idle-hook + (defun progress-display-clear-pre-idle-hook () + (clear-progress-display label) + (remove-hook 'pre-idle-hook + 'progress-display-clear-pre-idle-hook)))) + +(defun remove-progress-display (&optional label frame) ;; If label is nil, we want to remove all matching progress gauges. (while (and progress-stack (or (null label) ; null label means clear whole stack @@ -427,7 +579,7 @@ you should just use (progress nil)." (setcdr s (cdr (cdr s)))) (setq s (cdr s))))))) -(defun append-progress (label message &optional value frame) +(defun append-progress-display (label message &optional value frame) (or frame (setq frame (selected-frame))) ;; Add a new entry to the message-stack, or modify an existing one (let* ((top (car progress-stack)) @@ -435,141 +587,149 @@ you should just use (progress nil)." (if (eq label (car top)) (progn (setcdr top message) - (if (eq tmsg message) + (if (equal tmsg message) (set-image-instance-property (glyph-image-instance progress-gauge-glyph) :percent value) - (raw-append-progress message value frame)) - (redisplay-gutter-area) - (when (input-pending-p) - (dispatch-event (next-command-event)))) + (raw-append-progress-display message value frame)) + (redisplay-gutter-area)) (push (cons label message) progress-stack) - (raw-append-progress message value frame)) - (when (eq value 100) - (sit-for 0.5 nil) - (clear-progress label)))) - -(defun abort-progress (label message &optional frame) - (or frame (setq frame (selected-frame))) - ;; Add a new entry to the message-stack, or modify an existing one - (let* ((top (car progress-stack)) - (inhibit-read-only t) - (zmacs-region-stays zmacs-region-stays)) - (if (eq label (car top)) - (setcdr top message) - (push (cons label message) progress-stack)) - (unless (equal message "") - (insert-string message (get-buffer-create " *Gutter Area*")) - ;; Do what the device is able to cope with. - (if (not (valid-image-instantiator-format-p 'progress-gauge frame)) - (progn - (insert-string message " *Echo Area*") - (if (not executing-kbd-macro) - (redisplay-echo-area))) + (raw-append-progress-display message value frame)) + (dispatch-non-command-events) + ;; either get command events or sit waiting for them + (if (not (eq value 100)) + (when (input-pending-p) + (dispatch-event (next-command-event))) + (sit-for progress-display-popup-period nil) + (clear-progress-display label)))) + +(defun abort-progress-display (label message &optional frame) + (if (or (not (valid-image-instantiator-format-p 'progress-gauge frame)) + progress-display-use-echo-area) + (display-message label (concat message "aborted.") frame) + (or frame (setq frame (selected-frame))) + ;; Add a new entry to the message-stack, or modify an existing one + (let* ((top (car progress-stack)) + (inhibit-read-only t) + (zmacs-region-stays zmacs-region-stays)) + (if (eq label (car top)) + (setcdr top message) + (push (cons label message) progress-stack)) + (unless (equal message "") + (insert-string message (get-buffer-create " *Gutter Area*")) + ;; Do what the device is able to cope with. ;; do some funky display here. (unless progress-extent - (setq progress-extent (make-extent 0 0 progress-extent-text))) + (setq progress-extent (make-extent 0 1 progress-extent-text))) (let ((bglyph (extent-begin-glyph progress-extent))) (set-extent-begin-glyph progress-extent progress-abort-glyph) ;; fixup the gutter specifiers - (set-specifier bottom-gutter progress-extent-text frame) + (set-gutter-element bottom-gutter + 'progress progress-extent-text frame) (set-specifier bottom-gutter-border-width 2 frame) (set-image-instance-property (glyph-image-instance progress-text-glyph) :data message) (set-specifier bottom-gutter-height 'autodetect frame) - (set-specifier bottom-gutter-visible-p t frame) + (set-gutter-element-visible-p bottom-gutter-visible-p + 'progress t frame) ;; we have to do this so redisplay is up-to-date and so ;; redisplay-gutter-area performs optimally. (redisplay-gutter-area) - (sit-for 0.5 nil) - (clear-progress label) + (sit-for progress-display-popup-period nil) + (clear-progress-display label) (set-extent-begin-glyph progress-extent bglyph) ))))) -(defun raw-append-progress (message &optional value frame) +(defun raw-append-progress-display (message &optional value frame) (unless (equal message "") (let ((inhibit-read-only t) (zmacs-region-stays zmacs-region-stays) - (val (or value 0))) ; preserve from change + (val (or value 0))) (insert-string message (get-buffer-create " *Gutter Area*")) - ;; Do what the device is able to cope with. - (if (not (valid-image-instantiator-format-p 'progress-gauge frame)) + ;; do some funky display here. + (unless progress-extent + (setq progress-extent (make-extent 0 1 progress-extent-text)) + (set-extent-begin-glyph progress-extent progress-layout-glyph)) + ;; fixup the gutter specifiers + (set-gutter-element bottom-gutter 'progress progress-extent-text frame) + (set-specifier bottom-gutter-border-width 2 frame) + (set-image-instance-property + (glyph-image-instance progress-gauge-glyph) :percent val) + (set-image-instance-property + (glyph-image-instance progress-text-glyph) :data message) + (if (and (eq (specifier-instance bottom-gutter-height frame) + 'autodetect) + (gutter-element-visible-p bottom-gutter-visible-p + 'progress frame)) (progn - (insert-string - (concat message (if (eq val 100) "done.") - (make-string (/ val 5) ?.)) - " *Echo Area*") - (if (not executing-kbd-macro) - (redisplay-echo-area))) - ;; do some funky display here. - (unless progress-extent - (setq progress-extent (make-extent 0 0 progress-extent-text)) - (set-extent-begin-glyph progress-extent progress-layout-glyph)) - ;; fixup the gutter specifiers - (set-specifier bottom-gutter progress-extent-text frame) - (set-specifier bottom-gutter-border-width 2 frame) - (set-image-instance-property - (glyph-image-instance progress-gauge-glyph) :percent val) - (set-image-instance-property - (glyph-image-instance progress-text-glyph) :data message) - (if (and (eq (specifier-instance bottom-gutter-height frame) - 'autodetect) - (specifier-instance bottom-gutter-visible-p frame)) - (progn - ;; if the gauge is already visible then just draw the gutter - ;; checking for user events - (redisplay-gutter-area) - (when (input-pending-p) - (dispatch-event (next-command-event)))) - ;; otherwise make the gutter visible and redraw the frame - (set-specifier bottom-gutter-height 'autodetect frame) - (set-specifier bottom-gutter-visible-p t frame) - ;; we have to do this so redisplay is up-to-date and so - ;; redisplay-gutter-area performs optimally. - (redisplay-frame) - ))))) - -(defun display-progress (label message &optional value frame) + ;; if the gauge is already visible then just draw the gutter + ;; checking for user events + (redisplay-gutter-area) + (dispatch-non-command-events) + (when (input-pending-p) + (dispatch-event (next-command-event)))) + ;; otherwise make the gutter visible and redraw the frame + (set-specifier bottom-gutter-height 'autodetect frame) + (set-gutter-element-visible-p bottom-gutter-visible-p + 'progress t frame) + ;; we have to do this so redisplay is up-to-date and so + ;; redisplay-gutter-area performs optimally. This may also + ;; make sure the frame geometry looks ok. + (dispatch-non-command-events) + (redisplay-frame) + )))) + +(defun display-progress-display (label message &optional value frame) "Display a progress gauge and message in the bottom gutter area. First argument LABEL is an identifier for this message. MESSAGE is -the string to display. Use `clear-progress' to remove a labelled +the string to display. Use `clear-progress-display' to remove a labelled message." - (clear-progress label frame t) - (if (eq value 'abort) - (abort-progress label message frame) - (append-progress label message value frame))) - -(defun current-progress (&optional frame) + (cond ((eq value 'abort) + (abort-progress-display label message frame)) + ((or (not (valid-image-instantiator-format-p 'progress-gauge frame)) + progress-display-use-echo-area) + (display-message label + (concat message (if (eq value 100) "done." + (make-string (/ value 5) ?.))) + frame)) + (t + (append-progress-display label message value frame)))) + +(defun current-progress-display (&optional frame) "Return the current progress gauge in the gutter area, or nil. The FRAME argument is currently unused." (cdr (car progress-stack))) ;;; may eventually be frame-dependent -(defun current-progress-label (&optional frame) +(defun current-progress-display-label (&optional frame) (car (car progress-stack))) -(defun progress (fmt &optional value &rest args) +(defun progress-display (fmt &optional value &rest args) "Print a progress gauge and message in the bottom gutter area of the frame. The arguments are the same as to `format'. If the only argument is nil, clear any existing progress gauge." - (if (and (null fmt) (null args)) - (prog1 nil - (clear-progress nil)) - (let ((str (apply 'format fmt args))) - (display-progress 'progress str value) - str))) - -(defun lprogress (label fmt &optional value &rest args) + (save-excursion + (if (and (null fmt) (null args)) + (prog1 nil + (clear-progress-display nil)) + (let ((str (apply 'format fmt args))) + (display-progress-display 'progress str value) + str)))) + +(defun lprogress-display (label fmt &optional value &rest args) "Print a progress gauge and message in the bottom gutter area of the frame. First argument LABEL is an identifier for this progress gauge. The rest of the arguments are the same as to `format'." - (if (and (null fmt) (null args)) - (prog1 nil - (clear-progress label nil)) - (let ((str (apply 'format fmt args))) - (display-progress label str value) - str))) + ;; #### sometimes the buffer gets changed temporarily. I don't know + ;; why this is, so protect against it. + (save-excursion + (if (and (null fmt) (null args)) + (prog1 nil + (clear-progress-display label nil)) + (let ((str (apply 'format fmt args))) + (display-progress-display label str value) + str)))) (provide 'gutter-items) ;;; gutter-items.el ends here. diff --git a/lisp/info.el b/lisp/info.el index 0bcda60..a4a6df3 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -22,7 +22,7 @@ ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with XEmacs; see the file COPYING. If not, write to the +;; along with XEmacs; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. @@ -308,7 +308,7 @@ ;; contain none or when it has become older than info files in the same ;; directory. -;; Modified 1998-09-23 by Didier Verna +;; Modified 1998-09-23 by Didier Verna ;; ;; Use the new macro `with-search-caps-disable-folding' @@ -402,10 +402,10 @@ nil or `never' never auto-generate a directory listing, `always' auto-generate a directory listing ignoring existing `dir' and `localdir' files `if-missing', the default, auto-generates a directory listing - if no `dir' or `localdir' file is present. Otherwise the + if no `dir' or `localdir' file is present. Otherwise the contents of any of these files is used instead. `if-outdated' auto-generates a directory listing if the `dir' - and `localdir' are either inexistent or outdated (touched + and `localdir' are either inexistent or outdated (touched less recently than an info file in the same directory)." :type '(choice (const :tag "never" never) (const :tag "always" always) @@ -416,12 +416,12 @@ nil or `never' never auto-generate a directory listing, (defcustom Info-save-auto-generated-dir 'never "*Whether an auto-generated info directory listing should be saved. Possible values are: -nil or `never', the default, auto-generated info directory +nil or `never', the default, auto-generated info directory information will never be saved. `always', auto-generated info directory information will be saved to a `dir' file in the same directory overwriting it if it exists `conservative', auto-generated info directory information will be saved - to a `dir' file in the same directory but the user is asked before + to a `dir' file in the same directory but the user is asked before overwriting any existing file." :type '(choice (const :tag "never" never) (const :tag "always" always) @@ -463,7 +463,7 @@ heading." :group 'info-faces) ;; Is this right for NT? .zip, with -c for to stdout, right? -(defvar Info-suffix-list '( ("" . nil) +(defvar Info-suffix-list '( ("" . nil) (".info" . nil) (".info.bz2" . "bzip2 -dc %s") (".info.gz" . "gzip -dc %s") @@ -537,7 +537,7 @@ Info hierarchy. The first time you invoke Info you start off looking at that node, which is (dir)Top.  File: dir Node: Top This is the top of the INFO tree - This (the Directory node) gives a menu of major topics. + This (the Directory node) gives a menu of major topics. * Menu: The list of major topics begins on the next line. @@ -607,7 +607,7 @@ further (recursive) error recovery. TRYFILE is ??" (Info-find-file-node nil nodename no-going-back tryfile line)) ;; Convert filename to lower case if not found as specified. ;; Expand it, look harder... - ((let (temp temp-downcase found + ((let (temp temp-downcase found (fname (substitute-in-file-name filename))) (let ((dirs (cond ((string-match "^\\./" fname) ; If specified name starts with `./' @@ -628,7 +628,7 @@ further (recursive) error recovery. TRYFILE is ??" ;; Try downcasing, appending a suffix, or both. (setq found (Info-suffixed-file temp temp-downcase)) (setq dirs (cdr dirs))) - (if found + (if found (progn (setq filename (expand-file-name found)) t)))) (Info-find-file-node filename nodename no-going-back tryfile line)) @@ -870,7 +870,7 @@ actually get any text from." (if (string-match "localdir" file) "localdir" "info dir")))) - (if (not buf) + (if (not buf) (insert-file-contents file)) (if (string-match "localdir" (buffer-name)) (setq lbuffers (cons (current-buffer) lbuffers)) @@ -881,13 +881,13 @@ actually get any text from." Info-dir-file-attributes))))))) (or (cdr dirs) (setq Info-dir-contents-directory (car dirs))) (setq dirs (cdr dirs)))) - + ;; ensure that the localdir files are inserted last, and reverse ;; the list of them so that when they get pushed in, they appear ;; in the same order they got specified in the path, from top to ;; bottom. (nconc buffers (reverse lbuffers)) - + (or buffers (error "Can't find the Info directory node")) ;; Distinguish the dir file that comes with Emacs from all the @@ -956,7 +956,7 @@ actually get any text from." (setq end (point)) (setq nodes (cons (list nodename other beg end) nodes)))))) (setq others (cdr others)))) - + ;; Add to the main menu a menu item for each other node. (re-search-forward "^\\* Menu:" nil t) (forward-line 1) @@ -1016,7 +1016,7 @@ actually get any text from." (if (not (find-buffer-visiting file)) (if (not (file-exists-p file)) (if (or (eq Info-auto-generate-directory 'always) - (eq Info-auto-generate-directory 'if-missing)) + (eq Info-auto-generate-directory 'if-missing)) (Info-build-dir-anew (file-name-directory file))) (if (or (eq Info-auto-generate-directory 'always) (and (eq Info-auto-generate-directory 'if-outdated) @@ -1034,7 +1034,7 @@ directory has been modified more recently." f-mod-time newer) (setq Info-dir-newer-info-files nil) - (mapcar + (mapcar #'(lambda (f) (prog2 (setq f-mod-time (nth 5 (file-attributes f))) @@ -1043,7 +1043,7 @@ directory has been modified more recently." (> (car (cdr f-mod-time)) (car (cdr dir-mod-time)))))) (if (and (file-readable-p f) newer) - (setq Info-dir-newer-info-files + (setq Info-dir-newer-info-files (cons f Info-dir-newer-info-files))))) (directory-files (file-name-directory file) 'fullname @@ -1082,12 +1082,12 @@ and `END-INFO-DIR-ENTRY'" (match-string 1) (downcase (or (match-string 3) (match-string 1))))) - (setq entry - (cons (nreverse - (cdr - (nreverse - (split-string - (buffer-substring + (setq entry + (cons (nreverse + (cdr + (nreverse + (split-string + (buffer-substring (re-search-forward "[ \t]*" nil t) (or (and (re-search-forward "^[^ \t]" nil t) (goto-char (match-beginning 0))) @@ -1108,7 +1108,7 @@ and `END-INFO-DIR-ENTRY'" (if (> len description-col) (setq description-col len))) entries) - (setq description-col (+ 5 description-col)) + (setq description-col (+ 5 description-col)) (mapcar #'(lambda (e) (setq e (cdr e)) ; Drop filename (insert "* " (car e) ":" (car (cdr e))) @@ -1123,7 +1123,7 @@ and `END-INFO-DIR-ENTRY'" (defun Info-build-dir-anew (directory) "Build info directory information for DIRECTORY. -The generated directory listing may be saved to a `dir' according +The generated directory listing may be saved to a `dir' according to the value of `Info-save-auto-generated-dir'" (save-excursion (let* ((dirfile (expand-file-name "dir" directory)) @@ -1131,7 +1131,7 @@ to the value of `Info-save-auto-generated-dir'" (eq Info-save-auto-generated-dir 'never) (and (not (file-writable-p dirfile)) (message "File not writable %s. Using temporary." dirfile)))) - (info-files + (info-files (directory-files directory 'fullname ".*\\.info\\(.gz\\|.Z\\|-z\\|.zip\\)?$" @@ -1145,13 +1145,13 @@ to the value of `Info-save-auto-generated-dir'" (erase-buffer) (insert Info-dir-prologue "Info files in " directory ":\n\n") - (Info-dump-dir-entries - (mapcar + (Info-dump-dir-entries + (mapcar #'(lambda (f) (or (Info-extract-dir-entry-from f) (list 'dummy - (progn - (string-match "\\(.*\\)\\.info\\(.gz\\|.Z\\|-z\\|.zip\\)?$" + (progn + (string-match "\\(.*\\)\\.info\\(.gz\\|.Z\\|-z\\|.zip\\)?$" (file-name-nondirectory f)) (capitalize (match-string 1 (file-name-nondirectory f)))) ":" @@ -1167,10 +1167,10 @@ to the value of `Info-save-auto-generated-dir'" (defun Info-rebuild-dir (file) "Build info directory information in the directory of dir FILE. -Description of info files are merged from the info files in the +Description of info files are merged from the info files in the directory and the contents of FILE with the description in info files -taking precedence over descriptions in FILE. -The generated directory listing may be saved to a `dir' according to +taking precedence over descriptions in FILE. +The generated directory listing may be saved to a `dir' according to the value of `Info-save-auto-generated-dir' " (save-excursion (save-restriction @@ -1179,7 +1179,7 @@ the value of `Info-save-auto-generated-dir' " file-dir-entry mark next-section not-first-section - (to-temp + (to-temp (or (null Info-save-auto-generated-dir) (eq Info-save-auto-generated-dir 'never) (and (eq Info-save-auto-generated-dir 'always) @@ -1188,8 +1188,8 @@ the value of `Info-save-auto-generated-dir' " (and (eq Info-save-auto-generated-dir 'conservative) (or (and (not (file-writable-p file)) (message "File not writable %s. Using temporary." file)) - (not (y-or-n-p - (message "%s is outdated. Overwrite ? " + (not (y-or-n-p + (message "%s is outdated. Overwrite ? " file)))))))) (set-buffer (find-file-noselect file t)) (setq buffer-read-only nil) @@ -1232,12 +1232,12 @@ the value of `Info-save-auto-generated-dir' " (if file-dir-entry (setq dir-section-contents (cons file-dir-entry dir-section-contents)) - (setq dir-section-contents + (setq dir-section-contents (cons (list 'dummy (capitalize (file-name-sans-extension (file-name-nondirectory file))) ":" - (list Info-no-description-string)) + (list Info-no-description-string)) dir-section-contents)))))) Info-dir-newer-info-files) (delete-region (point-min) (point-max)) @@ -1259,7 +1259,7 @@ the value of `Info-save-auto-generated-dir' " (save-buffer) (message "Rebuilding %s...done" file)))))) -;;;###autoload +;;;###autoload (defun Info-batch-rebuild-dir () "(Re)build info `dir' files in the directories remaining on the command line. Use this from the command line, with `-batch'; @@ -1279,7 +1279,7 @@ For example, invoke \"xemacs -batch -f Info-batch-rebuild-dir /usr/local/info\"" (car command-line-args-left)) (setq dir (expand-file-name "dir" (car command-line-args-left))) (setq localdir (expand-file-name "localdir" (car command-line-args-left))) - (cond + (cond ((file-exists-p dir) (Info-rebuild-dir dir)) ((file-exists-p localdir) @@ -1587,7 +1587,7 @@ annotation for any node of any file. (See `a' and `x' commands.)" (forward-line 1) (if (re-search-backward "Node: *\\([^,\n]*\\) *[,\n\t]" beg t) - (setq compl + (setq compl (cons (list (buffer-substring (match-beginning 1) (match-end 1))) compl)))))))) @@ -1667,7 +1667,7 @@ annotation for any node of any file. (See `a' and `x' commands.)" (Info-history-add ofile onode opoint))))) ;; Extract the value of the node-pointer named NAME. -;; If there is none, use ERRORNAME in the error message; +;; If there is none, use ERRORNAME in the error message; ;; if ERRORNAME is nil, just return nil. (defun Info-extract-pointer (name &optional errorname) (save-excursion @@ -1943,7 +1943,7 @@ Completion is allowed, and the menu item point is on is the default." ;; there is a problem here in that if several menu items have the same ;; name you can only go to the node of the first with this command. (Info-goto-node (Info-extract-menu-item menu-item) nil t)) - + (defun Info-extract-menu-item (menu-item &optional noerror) (save-excursion (goto-char (point-min)) @@ -2292,7 +2292,7 @@ This command is designed to be used whether you are already in Info or not." "Look up an Emacs Lisp function in the Elisp manual in the Info system. This command is designed to be used whether you are already in Info or not." (interactive (let ((fn (function-at-point)) - (enable-recursive-minibuffers t) + (enable-recursive-minibuffers t) val) (setq val (completing-read (format "Look up Emacs Lisp function%s: " @@ -2999,7 +2999,7 @@ Adds an entry for the node at EVENT, or under point if EVENT is omitted. Used to construct the menubar submenu and popup menu." (or event (setq event (point))) (let ((case-fold-search t) - (xref-regexp (concat "\\*" + (xref-regexp (concat "\\*" (regexp-quote Info-footnote-tag) "[ \n\t]*\\([^:]*\\):")) up-p prev-p next-p menu xrefs subnodes in) diff --git a/lisp/keydefs.el b/lisp/keydefs.el index 947ce34..82652ea 100644 --- a/lisp/keydefs.el +++ b/lisp/keydefs.el @@ -1,6 +1,7 @@ ;;; keydefs.el --- Define standard keybindings. ;; Copyright (C) 1992-4, 1997 Free Software Foundation, Inc. +;; Copyright (C) 2000 Ben Wing. ;; Maintainer: XEmacs Development Team ;; Keywords: internal, dumped @@ -106,9 +107,6 @@ Keymap for characters following C-c.") (define-key global-map "\C-e" 'end-of-line) (define-key global-map "\C-f" 'forward-char-command) (define-key global-map "\C-d" 'delete-char) -(define-key global-map 'delete 'backward-or-forward-delete-char) -(define-key global-map '(meta delete) 'backward-or-forward-kill-word) -(define-key global-map [(control x) (delete)] 'backward-or-forward-kill-sentence) ;; FSFmacs files.el @@ -240,6 +238,7 @@ Keymap for characters following C-c.") (define-key global-map '(control meta -) 'negative-argument) (define-key global-map "\C-k" 'kill-line) +(define-key global-map '(control K) 'historical-kill-line) (define-key global-map "\C-w" 'kill-region) (define-key global-map "\M-w" 'kill-ring-save) (define-key global-map "\M-\C-w" 'append-next-kill) @@ -305,9 +304,6 @@ Keymap for characters following C-c.") (define-key global-map "\M-\)" 'move-past-close-and-reindent) (define-key global-map "\M-\t" 'lisp-complete-symbol) -(define-key global-map '(control meta backspace) 'backward-kill-sexp) -(define-key global-map '(control meta delete) 'backward-or-forward-kill-sexp) - (define-key global-map "\C-x/" 'point-to-register) (define-key global-map "\C-xj" 'jump-to-register) @@ -510,75 +506,72 @@ Keymap for characters following C-c.") ;; movement by units (define-key global-map 'left 'backward-char-command) -(define-key global-map 'up 'previous-line) (define-key global-map 'right 'forward-char-command) +(define-key global-map 'up 'previous-line) (define-key global-map 'down 'next-line) - -;; movement by pages -(define-key global-map 'prior 'scroll-down-command) -(define-key global-map 'next 'scroll-up-command) - -;; movement to the limits -(define-key global-map 'home 'beginning-of-line) -(define-key global-map 'end 'end-of-line) - -;;; Miscellaneous key bindings -(define-key global-map 'again 'repeat-complex-command) -(define-key global-map 'insert 'overwrite-mode) - -;;; These aren't bound to kbd macros like "\C-b" so that they have the -;; expected behavior even in, for example, vi-mode. - -;; We use here symbolic names, assuming that the corresponding keys will -;; generate these keysyms. This is not true on Suns, but x-win-sun.el -;; fixes that. If it turns out that the semantics of these keys should -;; differ from server to server, this should be moved into server-specific -;; files, but these appear to be the standard Motif and PC bindings. - -;; potential R6isms (define-key global-map 'kp-left 'backward-char-command) -(define-key global-map 'kp-up 'previous-line) (define-key global-map 'kp-right 'forward-char-command) +(define-key global-map 'kp-up 'previous-line) (define-key global-map 'kp-down 'next-line) - -;; movement by larger blocks -(define-key global-map '(control left) 'backward-word) -(define-key global-map '(control up) #'(lambda () - (interactive "_") - (forward-line -6))) -(define-key global-map '(control right) 'forward-word) -(define-key global-map '(control down) #'(lambda () - (interactive "_") - (forward-line 6))) - -;; context-sensitive movement -(define-key global-map '(meta left) 'backward-sexp) -(define-key global-map '(meta right) 'forward-sexp) -(define-key global-map '(meta up) 'backward-paragraph) -(define-key global-map '(meta down) 'forward-paragraph) - ;; movement by pages +(define-key global-map 'prior 'scroll-down-command) +(define-key global-map 'next 'scroll-up-command) (define-key global-map '(control prior) 'scroll-right) (define-key global-map '(control next) 'scroll-left) -;; potential R6isms (define-key global-map 'kp-prior 'scroll-down-command) (define-key global-map 'kp-next 'scroll-up-command) (define-key global-map '(control kp-prior) 'scroll-right) (define-key global-map '(control kp-next) 'scroll-left) - ;; movement to the limits +(define-key global-map 'home 'beginning-of-line) +(define-key global-map 'end 'end-of-line) (define-key global-map '(control home) 'beginning-of-buffer) (define-key global-map '(control end) 'end-of-buffer) -(define-key global-map 'begin 'beginning-of-line) -(define-key global-map '(control begin) 'beginning-of-buffer) -;; potential R6isms (define-key global-map 'kp-home 'beginning-of-line) -(define-key global-map '(control kp-home) 'beginning-of-buffer) (define-key global-map 'kp-end 'end-of-line) +(define-key global-map '(control kp-home) 'beginning-of-buffer) (define-key global-map '(control kp-end) 'end-of-buffer) +;; on which systems do these exist? +(define-key global-map 'begin 'beginning-of-line) +(define-key global-map '(control begin) 'beginning-of-buffer) + +;; movement by larger blocks +(define-key global-map '(control left) 'backward-word) +(define-key global-map '(control right) 'forward-word) +(define-key global-map '(control up) 'backward-block-of-lines) +(define-key global-map '(control down) 'forward-block-of-lines) +(define-key global-map '(control kp-left) 'backward-word) +(define-key global-map '(control kp-right) 'forward-word) +(define-key global-map '(control kp-up) 'backward-block-of-lines) +(define-key global-map '(control kp-down) 'forward-block-of-lines) + +;; context-sensitive movement +;; (meta control left/right) should be reserved for bindings that +;; switch between buffers/web pages/etc. +(define-key global-map '(meta left) 'backward-sexp) +(define-key global-map '(meta right) 'forward-sexp) +(define-key global-map '(meta up) 'backward-sentence) +(define-key global-map '(meta down) 'forward-sentence) +(define-key global-map '(meta control up) 'backward-paragraph) +(define-key global-map '(meta control down) 'forward-paragraph) +(define-key global-map '(meta control home) 'beginning-of-defun) +(define-key global-map '(meta control end) 'end-of-defun) +(define-key global-map '(meta control prior) 'backward-page) +(define-key global-map '(meta control next) 'forward-page) +(define-key global-map '(meta kp-left) 'backward-sexp) +(define-key global-map '(meta kp-right) 'forward-sexp) +(define-key global-map '(meta kp-up) 'backward-sentence) +(define-key global-map '(meta kp-down) 'forward-sentence) +(define-key global-map '(meta control kp-up) 'backward-paragraph) +(define-key global-map '(meta control kp-down) 'forward-paragraph) +(define-key global-map '(meta control kp-home) 'beginning-of-defun) +(define-key global-map '(meta control kp-end) 'end-of-defun) +(define-key global-map '(meta control kp-prior) 'backward-page) +(define-key global-map '(meta control kp-next) 'forward-page) + ;; movement between windows (define-key global-map '(control tab) 'other-window) (define-key global-map '(control shift tab) 'backward-other-window) @@ -588,16 +581,33 @@ Keymap for characters following C-c.") (define-key global-map '(meta prior) 'scroll-other-window-down) (define-key global-map '(meta home) 'beginning-of-buffer-other-window) (define-key global-map '(meta end) 'end-of-buffer-other-window) -;; potential R6isms (define-key global-map '(meta kp-next) 'scroll-other-window) (define-key global-map '(meta kp-prior) 'scroll-other-window-down) (define-key global-map '(meta kp-home) 'beginning-of-buffer-other-window) (define-key global-map '(meta kp-end) 'end-of-buffer-other-window) -;; potential R6isms -(define-key global-map 'redo 'repeat-complex-command) +;; the infamous delete key +(define-key global-map 'delete 'backward-or-forward-delete-char) +(define-key global-map '(meta delete) 'backward-or-forward-kill-word) +(define-key global-map [(control x) (delete)] + 'backward-or-forward-kill-sentence) +(define-key global-map 'kp-delete 'backward-or-forward-delete-char) +(define-key global-map '(meta kp-delete) 'backward-or-forward-kill-word) +(define-key global-map [(control x) (kp-delete)] + 'backward-or-forward-kill-sentence) + +;; don't try this one at home, kids. +(define-key global-map '(control meta delete) 'backward-or-forward-kill-sexp) +(define-key global-map '(control meta kp-delete) 'backward-or-forward-kill-sexp) +;; or this one, either, on Linux. +(define-key global-map '(control meta backspace) 'backward-kill-sexp) + + +;;; Miscellaneous key bindings +(define-key global-map 'insert 'overwrite-mode) (define-key global-map 'kp-insert 'overwrite-mode) -(define-key global-map 'kp-delete 'backward-delete-char-untabify) +(define-key global-map 'again 'repeat-complex-command) +(define-key global-map 'redo 'repeat-complex-command) (define-key global-map 'kp-enter [return]) ; do whatever RET does now (define-key global-map 'kp-tab [tab]) diff --git a/lisp/lisp-mode.el b/lisp/lisp-mode.el index fee10bd..2772387 100644 --- a/lisp/lisp-mode.el +++ b/lisp/lisp-mode.el @@ -1,7 +1,7 @@ ;;; lisp-mode.el --- Lisp mode, and its idiosyncratic commands. ;; Copyright (C) 1985, 1996, 1997 Free Software Foundation, Inc. -;; Copyright (C) 1995 Tinker Systems +;; Copyright (C) 1995 Tinker Systems. ;; Maintainer: FSF ;; Keywords: lisp, languages, dumped @@ -32,8 +32,6 @@ ;; The base major mode for editing Lisp code (used also for Emacs Lisp). ;; This mode is documented in the Emacs manual -;; July/05/97 slb Converted to use easymenu. - ;;; Code: (defgroup lisp nil @@ -46,55 +44,57 @@ (defvar lisp-mode-abbrev-table nil) ;; XEmacs change -(defvar lisp-interaction-mode-popup-menu nil) -(defvar lisp-interaction-mode-popup-menu-1 +(defvar lisp-interaction-mode-popup-menu (purecopy '("Lisp-Interaction" - ["Evaluate Last S-expression" eval-last-sexp] - ["Evaluate Entire Buffer" eval-current-buffer] - ["Evaluate Region" eval-region + ["Evaluate Last %_S-expression" eval-last-sexp] + ["Evaluate %_Whole Buffer" eval-current-buffer] + ["Evaluate Re%_gion" eval-region :active (region-exists-p)] "---" - ["Evaluate This Defun" eval-defun] - ;; FSF says "Instrument Function for Debugging" - ["Debug This Defun" edebug-defun] + ["%_Evaluate This Defun" eval-defun] + ["%_Instrument This Defun for Debugging" edebug-defun] "---" - ["Trace a Function" trace-function-background] - ["Untrace All Functions" untrace-all + ["Find %_Function Source..." find-function + :active (fboundp 'find-function)] + ["Find %_Variable Source..." find-variable + :active (fboundp 'find-variable)] + ["%_Trace Function..." trace-function-background] + ["%_Untrace All Functions" untrace-all :active (fboundp 'untrace-all)] "---" - ["Comment Out Region" comment-region - :active (region-exists-p)] - ["Indent Region" indent-region + ["%_Comment Out Region" comment-region :active (region-exists-p)] - ["Indent Line" lisp-indent-line] "---" - ["Debug On Error" (setq debug-on-error (not debug-on-error)) - :style toggle :selected debug-on-error] - ["Debug On Quit" (setq debug-on-quit (not debug-on-quit)) - :style toggle :selected debug-on-quit] - ["Debug on Signal" (setq debug-on-signal (not debug-on-signal)) - :style toggle :selected debug-on-signal] + ["Indent %_Line or Region" + (if (region-exists-p) + (call-interactively 'indent-region) + (call-interactively 'lisp-indent-line))] + ["Indent B%_alanced Expression" indent-sexp] + ["Indent %_Defun" + (progn + (beginning-of-defun) + (indent-sexp))] + "---" + "Look for debug-on-error under Options->General" ))) -(defvar emacs-lisp-mode-popup-menu nil) -(defvar emacs-lisp-mode-popup-menu-1 +(defvar emacs-lisp-mode-popup-menu (purecopy (nconc '("Emacs-Lisp" - ["Byte-compile This File" emacs-lisp-byte-compile] - ["Byte-compile/load This" emacs-lisp-byte-compile-and-load] - ["Byte-recompile Directory..." byte-recompile-directory] + ["%_Byte-Compile This File" emacs-lisp-byte-compile] + ["B%_yte-Compile/Load This File" emacs-lisp-byte-compile-and-load] + ["Byte-%_Recompile Directory..." byte-recompile-directory] "---") - (cdr lisp-interaction-mode-popup-menu-1)))) + (cdr lisp-interaction-mode-popup-menu)))) ;Don't have a menubar entry in Lisp Interaction mode. Otherwise, the ;*scratch* buffer has a Lisp menubar item! Very confusing. ;(defvar lisp-interaction-mode-menubar-menu ; (purecopy (cons "Lisp" (cdr lisp-interaction-mode-popup-menu)))) -(defvar emacs-lisp-mode-menubar-menu nil) -(defvar emacs-lisp-mode-menubar-menu-1 - (purecopy (cons "Lisp" (cdr emacs-lisp-mode-popup-menu-1)))) +(defvar emacs-lisp-mode-menubar-menu + (purecopy (cons "%_Lisp" (cdr emacs-lisp-mode-popup-menu)))) (if (not emacs-lisp-mode-syntax-table) (let ((i 0)) @@ -274,19 +274,15 @@ if that value is non-nil." (set-syntax-table emacs-lisp-mode-syntax-table) ;; XEmacs changes (setq major-mode 'emacs-lisp-mode - ;; mode-popup-menu emacs-lisp-mode-popup-menu + mode-popup-menu emacs-lisp-mode-popup-menu mode-name "Emacs-Lisp") - ;; (if (and (featurep 'menubar) - ;; current-menubar) - ;; (progn + (if (and (featurep 'menubar) + current-menubar) + (progn ;; make a local copy of the menubar, so our modes don't ;; change the global menubar - ;; (set-buffer-menubar current-menubar) - ;; (add-submenu nil emacs-lisp-mode-menubar-menu))) - (unless emacs-lisp-mode-popup-menu - (easy-menu-define emacs-lisp-mode-popup-menu emacs-lisp-mode-map "" - emacs-lisp-mode-popup-menu-1)) - (easy-menu-add emacs-lisp-mode-popup-menu) + (set-buffer-menubar current-menubar) + (add-submenu nil emacs-lisp-mode-menubar-menu))) (lisp-mode-variables nil) (run-hooks 'emacs-lisp-mode-hook)) @@ -366,14 +362,7 @@ if that value is non-nil." (use-local-map lisp-interaction-mode-map) (setq major-mode 'lisp-interaction-mode) (setq mode-name "Lisp Interaction") - ;; XEmacs change - ;; (setq mode-popup-menu lisp-interaction-mode-popup-menu) - (unless lisp-interaction-mode-popup-menu - (easy-menu-define lisp-interaction-mode-popup-menu - lisp-interaction-mode-map - "" - lisp-interaction-mode-popup-menu-1)) - (easy-menu-add lisp-interaction-mode-popup-menu) + (setq mode-popup-menu lisp-interaction-mode-popup-menu) (set-syntax-table emacs-lisp-mode-syntax-table) (lisp-mode-variables nil) @@ -760,6 +749,7 @@ of the start of the containing expression." (put 'let 'lisp-indent-function 1) (put 'let* 'lisp-indent-function 1) (put 'let-specifier 'lisp-indent-function 1) +(put 'flet 'lisp-indent-function 1) (put 'while 'lisp-indent-function 1) (put 'if 'lisp-indent-function 2) (put 'catch 'lisp-indent-function 1) diff --git a/lisp/list-mode.el b/lisp/list-mode.el index b2b828b..25d2418 100644 --- a/lisp/list-mode.el +++ b/lisp/list-mode.el @@ -1,7 +1,7 @@ ;;; list-mode.el --- Major mode for buffers containing lists of items ;; Copyright (C) 1992-4, 1997 Free Software Foundation, Inc. -;; Copyright (C) 1996 Ben Wing. +;; Copyright (C) 1996, 2000 Ben Wing. ;; Maintainer: XEmacs Development Team ;; Keywords: extensions, dumped @@ -63,6 +63,32 @@ (dolist (key '(kp-left left (control ?b))) (define-key map key 'previous-list-mode-item)))) +;; #### We make list-mode-hook, as well as completion-setup-hook and +;; minibuffer-setup-hook, permanent-local so that it's possible to create +;; buffers in these modes and then set up some buffer-specific +;; customizations without resorting to awful kludges. (The problem here +;; is that when you switch a buffer into a mode, reset-buffer is usually +;; called, which destroys all buffer-local settings that you carefully +;; tried to set up when you created the buffer. Therefore, the only way +;; to set these variables is to use the setup hooks -- but if they are +;; not declared permanent local, then any local hook functions that you +;; put on them (which is exactly what you want to do) also get removed, +;; so you would have to resort to putting a global hook function on the +;; setup hook, and then making sure it gets removed later. I actually +;; added some support for doing this with one-shot hooks, but this is +;; clearly not the correct way to do things, and it fails in some cases, +;; particularly when the buffer gets put into the mode more than once, +;; which typically happens with completion buffers, for example.) In +;; fact, all setup hooks should be made permanent local, but I didn't +;; feel like making a global change like this quite yet. The proper way +;; to do it would be to declare new def-style forms, such as defhook and +;; define-local-setup-hook, which are used to initialize hooks in place +;; of the current generic defvars. --ben + +(put 'list-mode-hook 'permanent-local t) +(defvar list-mode-hook nil + "Normal hook run when entering List mode.") + (defun list-mode () "Major mode for buffer containing lists of items." (interactive) @@ -70,12 +96,9 @@ (use-local-map list-mode-map) (setq mode-name "List") (setq major-mode 'list-mode) - (make-local-hook 'post-command-hook) - (add-hook 'post-command-hook 'set-list-mode-extent nil t) - (make-local-hook 'pre-command-hook) - (add-hook 'pre-command-hook 'list-mode-extent-pre-hook nil t) - (make-local-variable 'next-line-add-newlines) - (setq next-line-add-newlines nil) + (add-local-hook 'post-command-hook 'set-list-mode-extent) + (add-local-hook 'pre-command-hook 'list-mode-extent-pre-hook) + (set (make-local-variable 'next-line-add-newlines) nil) (setq list-mode-extent nil) ;; It is visually disconcerting to have the text cursor disappear within list ;; buffers, especially when moving from window to window, so leave it @@ -226,8 +249,11 @@ If ACTIVATE-CALLBACK is non-nil, it should be a function of three If the variable in not t or nil, the string is taken as a regexp to match for end of highlight") +;; see comment at list-mode-hook. +(put 'completion-setup-hook 'permanent-local t) (defvar completion-setup-hook nil - "Normal hook run at the end of setting up the text of a completion buffer.") + "Normal hook run at the end of setting up the text of a completion buffer. +When run, the completion buffer is the current buffer.") ; Unnecessary FSFmacs crock. We frob the extents directly in ; display-completion-list, so no "heuristics" like this are necessary. @@ -265,6 +291,9 @@ Keywords: :window-width If non-nil, width to use in displaying the list, instead of the actual window's width. + :window-height + If non-nil, use no more than this many lines, and extend line width as + necessary. :help-string (default is the value of `completion-default-help-string') Form to evaluate to get a string to insert at the beginning of the completion list buffer. This is evaluated when that buffer @@ -288,7 +317,8 @@ If `completion-highlight-first-word-only' is non-nil, then only the start :reference-buffer (:help-string completion-default-help-string) (:completion-string "Possible completions are:") - :window-width) + :window-width + :window-height) () (let ((old-buffer (current-buffer)) (bufferp (bufferp standard-output))) @@ -315,7 +345,8 @@ If `completion-highlight-first-word-only' is non-nil, then only the start (selected-frame))) 80)))) (let ((count 0) - (max-width 0)) + (max-width 0) + old-max-width) ;; Find longest completion (let ((tail completions)) (while tail @@ -336,6 +367,7 @@ If `completion-highlight-first-word-only' is non-nil, then only the start tail (cdr tail))))) (setq max-width (+ 2 max-width)) ; at least two chars between cols + (setq old-max-width max-width) (let ((rows (let ((cols (min (/ win-width max-width) count))) (if (<= cols 1) count @@ -345,8 +377,15 @@ If `completion-highlight-first-word-only' is non-nil, then only the start (if (/= (% count cols) 0) ; want ceiling... (1+ (/ count cols)) (/ count cols))))))) - (if (stringp cl-completion-string) - (princ (gettext cl-completion-string))) + (when + (and cl-window-height + (> rows cl-window-height)) + (setq max-width old-max-width) + (setq rows cl-window-height)) + (when (and (stringp cl-completion-string) + (> (length cl-completion-string) 0)) + (princ (gettext cl-completion-string)) + (terpri)) (let ((tail completions) (r 0) (regexp-string @@ -355,7 +394,7 @@ If `completion-highlight-first-word-only' is non-nil, then only the start "[ \t]" completion-highlight-first-word-only))) (while (< r rows) - (terpri) + (and (> r 0) (terpri)) (let ((indent 0) (column 0) (tail2 tail)) @@ -425,7 +464,9 @@ If `completion-highlight-first-word-only' is non-nil, then only the start ;; (put-text-property beg (point) 'list-mode-item t) ;; (goto-char end))))) )) - (run-hooks 'completion-setup-hook))) + (save-excursion + (set-buffer standard-output) + (run-hooks 'completion-setup-hook)))) (defvar completion-display-completion-list-function 'display-completion-list "Function to set up the list of completions in the completion buffer. diff --git a/lisp/loaddefs.el b/lisp/loaddefs.el index 44ab60b..7217ae7 100644 --- a/lisp/loaddefs.el +++ b/lisp/loaddefs.el @@ -87,7 +87,8 @@ (setq completion-ignored-extensions (mapcar 'purecopy '(".o" ".elc" "~" ".bin" ".lbin" ".fasl" - ".dvi" ".toc" ".log" ".aux" ".a" ".ln" + ".dvi" ".toc" ;".log" + ".aux" ".a" ".ln" ".lof" ".blg" ".bbl" ".glo" ".idx" ".lot" ".fmt" ".diff" ".oi" ".class"))) diff --git a/lisp/map-ynp.el b/lisp/map-ynp.el index 6fef0e9..80b0f84 100644 --- a/lisp/map-ynp.el +++ b/lisp/map-ynp.el @@ -104,7 +104,7 @@ Returns the number of actions taken." ;; (objects (capitalize (or (nth 1 help) "objects"))) ;; (action (capitalize (or (nth 2 help) "act on"))) ) - (setq map `(("Yes" . act) ("No" . skip) + (setq map `(("%_Yes" . act) ("%_No" . skip) ; bogus crap. --ben ; ((, (if help ; (capitalize @@ -119,9 +119,9 @@ Returns the number of actions taken." ; ((, (capitalize ; (or (and help (nth 5 help)) "Quit"))) ; . exit) - ("Yes All" . automatic) - ("No All" . exit) - ("Cancel" . quit) + ("Yes %_All" . automatic) + ("No A%_ll" . exit) + ("%_Cancel" . quit) ,@(mapcar #'(lambda (elt) (cons (capitalize (nth 2 elt)) (vector (nth 1 elt)))) @@ -231,7 +231,8 @@ ESC or `q' to exit;\n" (lambda (elt) (format "%c to %s" (nth 0 elt) - (nth 2 elt)))) + (normalize-menu-item-name + (nth 2 elt))))) action-alist ";\n") (if action-alist ";\n") diff --git a/lisp/menubar-items.el b/lisp/menubar-items.el index cab09aa..984d80f 100644 --- a/lisp/menubar-items.el +++ b/lisp/menubar-items.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1991-1995, 1997-1998 Free Software Foundation, Inc. ;; Copyright (C) 1995 Tinker Systems and INS Engineering Corp. ;; Copyright (C) 1995 Sun Microsystems. -;; Copyright (C) 1995, 1996 Ben Wing. +;; Copyright (C) 1995, 1996, 2000 Ben Wing. ;; Copyright (C) 1997 MORIOKA Tomohiko ;; Maintainer: XEmacs Development Team @@ -41,60 +41,115 @@ (defvar current-language-environment) (defvar tutorial-supported-languages)) +(defun menu-truncate-list (list n) + (if (<= (length list) n) + list + (butlast list (- (length list) n)))) + +(defun submenu-generate-accelerator-spec (list &optional omit-chars-list) + "Add auto-generated accelerator specifications to a submenu. +This can be used to add accelerators to the return value of a menu filter +function. It correctly ignores unselectable items. It will destructively +modify the list passed to it. If an item already has an auto-generated +accelerator spec, this will be removed before the new one is added, making +this function idempotent. + +If OMIT-CHARS-LIST is given, it should be a list of lowercase characters, +which will not be used as accelerators." + (let ((n 0)) + (dolist (item list list) + (cond + ((vectorp item) + (setq n (1+ n)) + (aset item 0 + (concat + (menu-item-generate-accelerator-spec n omit-chars-list) + (menu-item-strip-accelerator-spec (aref item 0))))) + ((consp item) + (setq n (1+ n)) + (setcar item + (concat + (menu-item-generate-accelerator-spec n omit-chars-list) + (menu-item-strip-accelerator-spec (car item))))))))) + +(defun menu-item-strip-accelerator-spec (item) + "Strip an auto-generated accelerator spec off of ITEM. +ITEM should be a string. This removes specs added by +`menu-item-generate-accelerator-spec' and `submenu-generate-accelerator-spec'." + (if (string-match "%_. " item) + (substring item 4) + item)) + +(defun menu-item-generate-accelerator-spec (n &optional omit-chars-list) + "Return an accelerator specification for use with auto-generated menus. +This should be concat'd onto the beginning of each menu line. The spec +allows the Nth line to be selected by the number N. '0' is used for the +10th line, and 'a' through 'z' are used for the following 26 lines. + +If OMIT-CHARS-LIST is given, it should be a list of lowercase characters, +which will not be used as accelerators." + (cond ((< n 10) (concat "%_" (int-to-string n) " ")) + ((= n 10) "%_0 ") + ((<= n 36) + (setq n (- n 10)) + (let ((m 0)) + (while (> n 0) + (setq m (1+ m)) + (while (memq (int-to-char (+ m (- (char-to-int ?a) 1))) + omit-chars-list) + (setq m (1+ m))) + (setq n (1- n))) + (if (<= m 26) + (concat + "%_" + (char-to-string (int-to-char (+ m (- (char-to-int ?a) 1)))) + " ") + ""))) + (t ""))) + (defconst default-menubar (purecopy-menubar ;; note backquote. `( - ("File" - ["Open..." find-file] - ["Open in Other Window..." find-file-other-window] - ["Open in New Frame..." find-file-other-frame] - ["Insert File..." insert-file] - ["View File..." view-file] + ("%_File" + ["%_Open..." find-file] + ["Open in Other %_Window..." find-file-other-window] + ["Open in New %_Frame..." find-file-other-frame] + ["%_Hex Edit File..." hexl-find-file + :active (fboundp 'hexl-find-file)] + ["%_Insert File..." insert-file] + ["%_View File..." view-file] "------" - ["Save" save-buffer + ["%_Save" save-buffer :active (buffer-modified-p) :suffix (if put-buffer-names-in-file-menu (buffer-name) "")] - ["Save As..." write-file] - ["Save Some Buffers" save-some-buffers] + ["Save %_As..." write-file] + ["Save So%_me Buffers" save-some-buffers] "-----" - ["Print Buffer" lpr-buffer + ["%_Print Buffer" lpr-buffer :active (fboundp 'lpr-buffer) :suffix (if put-buffer-names-in-file-menu (buffer-name) "")] - ["Pretty-Print Buffer" ps-print-buffer-with-faces + ["Prett%_y-Print Buffer" ps-print-buffer-with-faces :active (fboundp 'ps-print-buffer-with-faces) :suffix (if put-buffer-names-in-file-menu (buffer-name) "")] "-----" - ["New Frame" make-frame] - ["Frame on Other Display..." make-frame-on-display] - ["Delete Frame" delete-frame - :active (not (eq (next-frame (selected-frame) 'nomini 'window-system) - (selected-frame)))] - "-----" - ["Split Window" split-window-vertically] - ["Un-Split (Keep This)" delete-other-windows - :active (not (one-window-p t))] - ["Un-Split (Keep Others)" delete-window - :active (not (one-window-p t))] - "-----" - ["Revert Buffer" revert-buffer + ["%_Revert Buffer" revert-buffer :active (or buffer-file-name revert-buffer-function) :suffix (if put-buffer-names-in-file-menu (buffer-name) "")] - ["Delete Buffer" kill-this-buffer - :active t - :suffix (if put-buffer-names-in-file-menu (buffer-name) "")] + ["Re%_cover File..." recover-file] + ["Recover S%_ession..." recover-session] "-----" - ["Exit XEmacs" save-buffers-kill-emacs] + ["E%_xit XEmacs" save-buffers-kill-emacs] ) - ("Edit" - ["Undo" advertised-undo + ("%_Edit" + ["%_Undo" advertised-undo :active (and (not (eq buffer-undo-list t)) (or buffer-undo-list pending-undo-list)) :suffix (if (or (eq last-command 'undo) (eq last-command 'advertised-undo)) "More" "")] - ["Redo" redo + ["%_Redo" redo :included (fboundp 'redo) :active (not (or (eq buffer-undo-list t) (eq last-buffer-undo-list nil) @@ -105,274 +160,615 @@ (or (eq buffer-undo-list pending-undo-list) (eq (cdr buffer-undo-list) pending-undo-list)))) :suffix (if (eq last-command 'redo) "More" "")] - ["Cut" kill-primary-selection + "----" + ["Cu%_t" kill-primary-selection :active (selection-owner-p)] - ["Copy" copy-primary-selection + ["%_Copy" copy-primary-selection :active (selection-owner-p)] - ["Paste" yank-clipboard-selection + ["%_Paste" yank-clipboard-selection :active (selection-exists-p 'CLIPBOARD)] - ["Clear" delete-primary-selection + ["%_Delete" delete-primary-selection :active (selection-owner-p)] "----" - ["Search..." isearch-forward] - ["Search Backward..." isearch-backward] - ["Replace..." query-replace] + ["Select %_All" mark-whole-buffer] + ["Select %_Page" mark-page] "----" - ["Search (Regexp)..." isearch-forward-regexp] - ["Search Backward (Regexp)..." isearch-backward-regexp] - ["Replace (Regexp)..." query-replace-regexp] - "----" - ["Goto Line..." goto-line] - ["What Line" what-line] - ("Bookmarks" - :filter bookmark-menu-filter) + ["%_1 Search..." isearch-forward] + ["%_2 Search Backward..." isearch-backward] + ["%_3 Replace..." query-replace] "----" - ["Start Macro Recording" start-kbd-macro - :active (not defining-kbd-macro)] - ["End Macro Recording" end-kbd-macro - :active defining-kbd-macro] - ["Execute Last Macro" call-last-kbd-macro - :active last-kbd-macro] - "----" - ["Show Message Log" show-message-log] - ) - - ,@(when (featurep 'mule) - '(("Mule" - ("Describe language support") - ("Set language environment") + ["%_4 Search (Regexp)..." isearch-forward-regexp] + ["%_5 Search Backward (Regexp)..." isearch-backward-regexp] + ["%_6 Replace (Regexp)..." query-replace-regexp] + + ,@(when (featurep 'mule) + '("----" + ("%_Multilingual (\"Mule\")" + ("%_Describe Language Support") + ("%_Set Language Environment") "--" - ["Toggle input method" toggle-input-method] - ["Select input method" set-input-method] - ["Describe input method" describe-input-method] + ["T%_oggle Input Method" toggle-input-method] + ["Select %_Input Method" set-input-method] + ["D%_escribe Input Method" describe-input-method] "--" - ["Describe current coding systems" + ["Describe Current %_Coding Systems" describe-current-coding-system] - ["Set coding system of buffer file" + ["Set Coding System of %_Buffer File..." set-buffer-file-coding-system] ;; not implemented yet - ["Set coding system of terminal" + ["Set Coding System of %_Terminal..." set-terminal-coding-system :active nil] ;; not implemented yet - ["Set coding system of keyboard" + ["Set Coding System of %_Keyboard..." set-keyboard-coding-system :active nil] - ["Set coding system of process" + ["Set Coding System of %_Process..." set-buffer-process-coding-system :active (get-buffer-process (current-buffer))] "--" - ["Show character table" view-charset-by-menu] + ["Show Cha%_racter Table" view-charset-by-menu] ;; not implemented yet - ["Show diagnosis for MULE" mule-diag :active nil] - ["Show many languages" view-hello-file]))) - - ("Apps" - ["Read Mail (VM)..." vm - :active (fboundp 'vm)] - ["Read Mail (MH)..." (mh-rmail t) - :active (fboundp 'mh-rmail)] - ["Send mail..." compose-mail - :active (fboundp 'compose-mail)] - ["Usenet News" gnus - :active (fboundp 'gnus)] - ["Browse the Web" w3 - :active (fboundp 'w3)] + ["Show Dia%_gnosis for MULE" mule-diag :active nil] + ["Show \"%_hello\" in Many Languages" view-hello-file])) + ) + ) + + ("%_View" + ["%_New Frame" make-frame] + ["Frame on Other Displa%_y..." make-frame-on-display] + ["%_Delete Frame" delete-frame + :active (not (eq (next-frame (selected-frame) 'nomini 'window-system) + (selected-frame)))] + "-----" + ["%_Split Window" split-window-vertically] + ["S%_plit Window (Side by Side)" split-window-horizontally] + ["%_Un-Split (Keep This)" delete-other-windows + :active (not (one-window-p t))] + ["Un-Split (Keep %_Others)" delete-window + :active (not (one-window-p t))] + "----" + ("N%_arrow" + ["%_Narrow to Region" narrow-to-region :active (region-exists-p)] + ["Narrow to %_Page" narrow-to-page] + ["Narrow to %_Defun" narrow-to-defun] + "----" + ["%_Widen" widen :active (or (/= (point-min) 1) + (/= (point-max) (1+ (buffer-size))))] + ) + "----" + ["Show Message %_Log" show-message-log] + "----" + ["%_Goto Line..." goto-line] + ["%_What Line" what-line] + ("%_Bookmarks" + :filter bookmark-menu-filter) + "----" + ["%_Jump to Previous Mark" (set-mark-command t) + :active (mark t)] + ) + + ("C%_mds" + ["Repeat %_Last Complex Command..." repeat-complex-command] + ["E%_valuate Lisp Expression..." eval-expression] + ["Execute %_Named Command..." execute-extended-command] "----" - ["Spell-Check Buffer" ispell-buffer - :active (fboundp 'ispell-buffer)] - ["Toggle VI emulation" toggle-viper-mode - :active (fboundp 'toggle-viper-mode)] + ["Start %_Macro Recording" start-kbd-macro + :included (not defining-kbd-macro)] + ["End %_Macro Recording" end-kbd-macro + :included defining-kbd-macro] + ["E%_xecute Last Macro" call-last-kbd-macro + :active last-kbd-macro] + ("%_Other Macro" + ["%_Append to Last Macro" (start-kbd-macro t) + :active (and (not defining-kbd-macro) last-kbd-macro)] + ["%_Query User During Macro" kbd-macro-query + :active defining-kbd-macro] + ["Enter %_Recursive Edit During Macro" (kbd-macro-query t) + :active defining-kbd-macro] + "---" + ["E%_xecute Last Macro on Region Lines" + :active (and last-kbd-macro (region-exists-p))] + "---" + ["%_Name Last Macro..." name-last-kbd-macro + :active last-kbd-macro] + ["Assign Last Macro to %_Key..." assign-last-kbd-macro-to-key + :active (and last-kbd-macro + (fboundp 'assign-last-kbd-macro-to-key))] + "---" + ["%_Edit Macro..." edit-kbd-macro] + ["Edit %_Last Macro" edit-last-kbd-macro + :active last-kbd-macro] + "---" + ["%_Insert Named Macro into Buffer..." insert-kbd-macro] + ["Read Macro from Re%_gion" read-kbd-macro + :active (region-exists-p)] + ) "----" - ("Calendar" - ["3-Month Calendar" calendar + ("%_Abbrev" + ["D%_ynamic Abbrev Expand" dabbrev-expand] + ["Dynamic Abbrev %_Complete" dabbrev-completion] + ["Dynamic Abbrev Complete in %_All Buffers" (dabbrev-completion 16)] + "----" + "----" + ["%_Define Global Abbrev for " add-global-abbrev + :suffix (abbrev-string-to-be-defined nil) + :active abbrev-mode] + ["Define %_Mode-Specific Abbrev for " add-mode-abbrev + :suffix (abbrev-string-to-be-defined nil) + :active abbrev-mode] + ["Define Global Ex%_pansion for " inverse-add-global-abbrev + :suffix (inverse-abbrev-string-to-be-defined 1) + :active abbrev-mode] + ["Define Mode-Specific Expa%_nsion for " inverse-add-mode-abbrev + :suffix (inverse-abbrev-string-to-be-defined 1) + :active abbrev-mode] + "---" + ["E%_xpand Abbrev" expand-abbrev] + ["Expand Abbrevs in Re%_gion" expand-region-abbrevs + :active (region-exists-p)] + ["%_Unexpand Last Abbrev" unexpand-abbrev + :active (and (stringp last-abbrev-text) + (> last-abbrev-location 0))] + "---" + ["%_Kill All Abbrevs" kill-all-abbrevs] + ["%_Insert All Abbrevs into Buffer" insert-abbrevs] + ["%_List Abbrevs" list-abbrevs] + "---" + ["%_Edit Abbrevs" edit-abbrevs] + ["%_Redefine Abbrevs from Buffer" edit-abbrevs-redefine + :active (eq major-mode 'edit-abbrevs-mode)] + "---" + ["%_Save Abbrevs As..." write-abbrev-file] + ["L%_oad Abbrevs..." read-abbrev-file] + ) + ("%_Register" + ["%_Copy to Register..." copy-to-register :active (region-exists-p)] + ["%_Paste Register..." insert-register] + "---" + ["%_Save Point to Register" point-to-register] + ["%_Jump to Register" register-to-point] + ) + ("R%_ectangles" + ["%_Kill Rectangle" kill-rectangle] + ["%_Yank Rectangle" yank-rectangle] + ["Rectangle %_to Register" copy-rectangle-to-register] + ["Rectangle %_from Register" insert-register] + ["%_Clear Rectangle" clear-rectangle] + ["%_Open Rectangle" open-rectangle] + ["%_Prefix Rectangle..." string-rectangle] + ["Rectangle %_Mousing" + (customize-set-variable + mouse-track-rectangle-p (not mouse-track-rectangle-p)) + :style toggle :selected mouse-track-rectangle-p] + ) + ("%_Sort" + ["%_Lines" sort-lines :active (region-exists-p)] + ["%_Paragraphs" sort-paragraphs :active (region-exists-p)] + ["P%_ages" sort-pages :active (region-exists-p)] + ["%_Columns" sort-columns :active (region-exists-p)] + ["%_Regexp..." sort-regexp-fields :active (region-exists-p)] + ) + ("%_Center" + ["%_Line" center-line] + ["%_Paragraph" center-paragraph] + ["%_Region" center-region :active (region-exists-p)] + ) + ("%_Indent" + ["%_As Previous Line" indent-relative] + ["%_To Column..." indent-to-column] + "---" + ["%_Region" indent-region :active (region-exists-p)] + ["%_Balanced Expression" indent-sexp] + ["%_C Expression" indent-c-exp] + ) + ("S%_pell-Check" + ["%_Buffer" ispell-buffer + :active (fboundp 'ispell-buffer)] + "---" + ["%_Word" ispell-word] + ["%_Complete Word" ispell-complete-word] + ["%_Region" ispell-region] + ) + ) + + ("%_Tools" + ("%_Internet" + ["Read Mail %_1 (VM)..." vm + :active (fboundp 'vm)] + ["Read Mail %_2 (MH)..." (mh-rmail t) + :active (fboundp 'mh-rmail)] + ["Send %_Mail..." compose-mail + :active (fboundp 'compose-mail)] + ["Usenet %_News" gnus + :active (fboundp 'gnus)] + ["Browse the %_Web" w3 + :active (fboundp 'w3)]) + "---" + ("%_Grep" + :filter + (lambda (menu) + (if (or (not (boundp 'grep-history)) (null grep-history)) + menu + (let ((items + (submenu-generate-accelerator-spec + (mapcar #'(lambda (string) + (vector string + (list 'grep string))) + (menu-truncate-list grep-history 10))))) + (append menu '("---") items)))) + ["%_Grep..." grep :active (fboundp 'grep)] + ["%_Repeat Grep" recompile :active (fboundp 'recompile)] + ["%_Kill Grep" kill-compilation + :active (and (fboundp 'kill-compilation) + (fboundp 'compilation-find-buffer) + (let ((buffer (condition-case nil + (compilation-find-buffer) + (error nil)))) + (and buffer (get-buffer-process buffer))))] + "---" + ["Grep %_All Files in Current Directory..." + (progn + (require 'compile) + (let ((grep-command + (cons (concat grep-command " *") (length grep-command)))) + (call-interactively 'grep))) + :active (fboundp 'grep)] + ["Grep %_C Files in Current Directory..." + (progn + (require 'compile) + (let ((grep-command + (cons (concat grep-command " *.[ch]") (length grep-command)))) + (call-interactively 'grep))) + :active (fboundp 'grep)] + ["Grep %_E-Lisp Files in Current Directory..." + (progn + (require 'compile) + (let ((grep-command + (cons (concat grep-command " *.el") (length grep-command)))) + (call-interactively 'grep))) + :active (fboundp 'grep)] + "---" + ["%_Next Match" next-error + :active (and (fboundp 'compilation-errors-exist-p) + (compilation-errors-exist-p))] + ["%_Previous Match" previous-error + :active (and (fboundp 'compilation-errors-exist-p) + (compilation-errors-exist-p))] + ["%_First Match" first-error + :active (and (fboundp 'compilation-errors-exist-p) + (compilation-errors-exist-p))] + ["G%_oto Match" compile-goto-error + :active (and (fboundp 'compilation-errors-exist-p) + (compilation-errors-exist-p))] + "---" + ["%_Set Grep Command..." + (progn + (require 'compile) + (customize-set-variable + 'grep-command + (read-shell-command "Default Grep Command: " grep-command))) + :active (fboundp 'grep) + ] + ) + ("%_Compile" + :filter + (lambda (menu) + (if (or (not (boundp 'compile-history)) (null compile-history)) + menu + (let ((items + (submenu-generate-accelerator-spec + (mapcar #'(lambda (string) + (vector string + (list 'compile string))) + (menu-truncate-list compile-history 10))))) + (append menu '("---") items)))) + ["%_Compile..." compile :active (fboundp 'compile)] + ["%_Repeat Compilation" recompile :active (fboundp 'recompile)] + ["%_Kill Compilation" kill-compilation + :active (and (fboundp 'kill-compilation) + (fboundp 'compilation-find-buffer) + (let ((buffer (condition-case nil + (compilation-find-buffer) + (error nil)))) + (and buffer (get-buffer-process buffer))))] + "---" + ["%_Next Error" next-error + :active (and (fboundp 'compilation-errors-exist-p) + (compilation-errors-exist-p))] + ["%_Previous Error" previous-error + :active (and (fboundp 'compilation-errors-exist-p) + (compilation-errors-exist-p))] + ["%_First Error" first-error + :active (and (fboundp 'compilation-errors-exist-p) + (compilation-errors-exist-p))] + ["G%_oto Error" compile-goto-error + :active (and (fboundp 'compilation-errors-exist-p) + (compilation-errors-exist-p))] + ) + ("%_Debug" + ["%_GDB..." gdb + :active (fboundp 'gdb)] + ["%_DBX..." dbx + :active (fboundp 'dbx)]) + ("%_Shell" + ["%_Shell" shell + :active (fboundp 'shell)] + ["S%_hell Command..." shell-command + :active (fboundp 'shell-command)] + ["Shell Command on %_Region..." shell-command-on-region + :active (and (fboundp 'shell-command-on-region) (region-exists-p))]) + + ("%_Tags" + ["%_Find Tag..." find-tag] + ["Find %_Other Window..." find-tag-other-window] + ["%_Next Tag..." (find-tag nil)] + ["N%_ext Other Window..." (find-tag-other-window nil)] + ["Next %_File" next-file] + "-----" + ["Tags %_Search..." tags-search] + ["Tags %_Replace..." tags-query-replace] + ["%_Continue Search/Replace" tags-loop-continue] + "-----" + ["%_Pop stack" pop-tag-mark] + ["%_Apropos..." tags-apropos] + "-----" + ["%_Set Tags Table File..." visit-tags-table] + ) + + "----" + + ("Ca%_lendar" + ["%_3-Month Calendar" calendar :active (fboundp 'calendar)] - ["Diary" diary + ["%_Diary" diary :active (fboundp 'diary)] - ["Holidays" holidays + ["%_Holidays" holidays :active (fboundp 'holidays)] ;; we're all pagans at heart ... - ["Phases of the Moon" phases-of-moon + ["%_Phases of the Moon" phases-of-moon :active (fboundp 'phases-of-moon)] - ["Sunrise/Sunset" sunrise-sunset + ["%_Sunrise/Sunset" sunrise-sunset :active (fboundp 'sunrise-sunset)]) - ("Games" - ["Mine Game" xmine + ("Ga%_mes" + ["%_Mine Game" xmine :active (fboundp 'xmine)] - ["Tetris" tetris + ["%_Tetris" tetris :active (fboundp 'tetris)] - ["Sokoban" sokoban + ["%_Sokoban" sokoban :active (fboundp 'sokoban)] - ["Quote from Zippy" yow + ["Quote from %_Zippy" yow :active (fboundp 'yow)] - ["Psychoanalyst" doctor + ["%_Psychoanalyst" doctor :active (fboundp 'doctor)] - ["Psychoanalyze Zippy!" psychoanalyze-pinhead + ["Ps%_ychoanalyze Zippy!" psychoanalyze-pinhead :active (fboundp 'psychoanalyze-pinhead)] - ["Random Flames" flame + ["%_Random Flames" flame :active (fboundp 'flame)] - ["Dunnet (Adventure)" dunnet + ["%_Dunnet (Adventure)" dunnet :active (fboundp 'dunnet)] - ["Towers of Hanoi" hanoi + ["Towers of %_Hanoi" hanoi :active (fboundp 'hanoi)] - ["Game of Life" life + ["Game of %_Life" life :active (fboundp 'life)] - ["Multiplication Puzzle" mpuz - :active (fboundp 'mpuz)])) - - ("Options" - ("Customize" - ("Emacs" :filter (lambda (&rest junk) - (cdr (custom-menu-create 'emacs)))) - ["Group..." customize-group] - ["Variable..." customize-variable] - ["Face..." customize-face] - ["Saved..." customize-saved] - ["Set..." customize-customized] - ["Apropos..." customize-apropos] - ["Browse..." customize-browse]) - - ("Manage Packages" - ("Add Download Site" + ["M%_ultiplication Puzzle" mpuz + :active (fboundp 'mpuz)]) + + "----" + ) + + ("%_Options" + ("%_Advanced (Customize)" + ("%_Emacs" :filter (lambda (&rest junk) + (cdr (custom-menu-create 'emacs)))) + ["%_Group..." customize-group] + ["%_Variable..." customize-variable] + ["%_Face..." customize-face] + ["%_Saved..." customize-saved] + ["Se%_t..." customize-customized] + ["%_Apropos..." customize-apropos] + ["%_Browse..." customize-browse]) + ("Manage %_Packages" + ("%_Add Download Site" :filter (lambda (&rest junk) - (package-get-download-menu))) - ["Update Package Index" package-get-update-base] - ["List & Install" pui-list-packages] - ["Update Installed Packages" package-get-update-all] + (submenu-generate-accelerator-spec + (package-get-download-menu)))) + ["%_Update Package Index" package-get-update-base] + ["%_List and Install" pui-list-packages] + ["U%_pdate Installed Packages" package-get-update-all] ;; hack-o-matic, we can't force a load of package-base here ;; since it triggers dialog box interactions which we can't ;; deal with while using a menu - ("Using Custom" + ("Using %_Custom" :filter (lambda (&rest junk) (if package-get-base - (cdr (custom-menu-create 'packages)) - '(["Please load Package Index" (lamda (&rest junk) ()) nil])))) + (submenu-generate-accelerator-spec + (cdr (custom-menu-create 'packages))) + '(["Please load Package Index" + (lamda (&rest junk) ()) nil])))) - ["Help" (Info-goto-node "(xemacs)Packages")]) - + ["%_Help" (Info-goto-node "(xemacs)Packages")]) "---" - - ("Editing Options" - ["Overstrike" + ("%_Keyboard and Mouse" + ["%_Abbrev Mode" + (customize-set-variable 'abbrev-mode + (not (default-value 'abbrev-mode))) + :style toggle + :selected (default-value 'abbrev-mode)] + ["%_Delete Key Deletes Selection" + (customize-set-variable 'pending-delete-mode (not pending-delete-mode)) + :style toggle + :selected (and (boundp 'pending-delete-mode) pending-delete-mode) + :active (boundp 'pending-delete-mode)] + ["%_Yank/Kill Interact With Clipboard" + (if (eq interprogram-cut-function 'own-clipboard) + (progn + (customize-set-variable 'interprogram-cut-function nil) + (customize-set-variable 'interprogram-paste-function nil)) + (customize-set-variable 'interprogram-cut-function 'own-clipboard) + (customize-set-variable 'interprogram-paste-function 'get-clipboard)) + :style toggle + :selected (eq interprogram-cut-function 'own-clipboard)] + ["%_Overstrike" (progn (setq overwrite-mode (if overwrite-mode nil 'overwrite-mode-textual)) (customize-set-variable 'overwrite-mode overwrite-mode)) :style toggle :selected overwrite-mode] - ["Case Sensitive Search" + ("`%_kill-line' Behavior..." + ["Kill %_Whole Line" + (customize-set-variable 'kill-whole-line 'always) + :style radio :selected (eq kill-whole-line 'always)] + ["Kill to %_End of Line" + (customize-set-variable 'kill-whole-line nil) + :style radio :selected (eq kill-whole-line nil)] + ["Kill Whole Line at %_Beg, Otherwise to End" + (customize-set-variable 'kill-whole-line t) + :style radio :selected (eq kill-whole-line t)]) + ["Size for %_Block-Movement Commands..." + (customize-set-variable 'block-movement-size + (read-number "Block Movement Size: " + t block-movement-size))] + ["%_VI Emulation" + (progn + (toggle-viper-mode) + (customize-set-variable 'viper-mode viper-mode)) + :style toggle :selected (and (boundp 'viper-mode) viper-mode) + :active (fboundp 'toggle-viper-mode)] + ["Active Re%_gions" + (customize-set-variable 'zmacs-regions (not zmacs-regions)) + :style toggle :selected zmacs-regions] + "----" + ["%_Set Key..." global-set-key] + ["%_Unset Key..." global-unset-key] + "---" + ["%_Case Sensitive Search" (customize-set-variable 'case-fold-search (setq case-fold-search (not case-fold-search))) :style toggle :selected (not case-fold-search)] - ["Case Matching Replace" + ["Case Matching %_Replace" (customize-set-variable 'case-replace (not case-replace)) :style toggle :selected case-replace] - ["Auto Delete Selection" - (customize-set-variable 'pending-delete-mode (not pending-delete-mode)) - :style toggle - :selected (and (boundp 'pending-delete-mode) pending-delete-mode) - :active (boundp 'pending-delete-mode)] - ["Active Regions" - (customize-set-variable 'zmacs-regions (not zmacs-regions)) - :style toggle :selected zmacs-regions] - ["Mouse Paste At Text Cursor" - (customize-set-variable 'mouse-yank-at-point (not mouse-yank-at-point)) - :style toggle :selected mouse-yank-at-point] - ("Newline at end of file..." - ["Don't require" + "---" + ("%_Newline at End of File..." + ["%_Don't Require" (customize-set-variable 'require-final-newline nil) :style radio :selected (not require-final-newline)] - ["Require" + ["%_Require" (customize-set-variable 'require-final-newline t) :style radio :selected (eq require-final-newline t)] - ["Ask" + ["%_Ask" (customize-set-variable 'require-final-newline 'ask) :style radio :selected (and require-final-newline (not (eq require-final-newline t)))]) - ["Add Newline When Moving Past End" + ["Add Newline When Moving Past %_End" (customize-set-variable 'next-line-add-newlines (not next-line-add-newlines)) :style toggle :selected next-line-add-newlines] + "---" + ["%_Mouse Paste at Text Cursor" + (customize-set-variable 'mouse-yank-at-point (not mouse-yank-at-point)) + :style toggle :selected mouse-yank-at-point] + ["A%_void Text..." + (customize-set-variable 'mouse-avoidance-mode + (if mouse-avoidance-mode nil 'banish)) + :style toggle + :selected (and (boundp 'mouse-avoidance-mode) mouse-avoidance-mode) + :active (and (boundp 'mouse-avoidance-mode) + (device-on-window-system-p))] + ["%_Strokes Mode" + (customize-set-variable 'strokes-mode (not strokes-mode)) + :style toggle + :selected (and (boundp 'strokes-mode) strokes-mode) + :active (and (boundp 'strokes-mode) + (device-on-window-system-p))] ) - ("General Options" - ["Teach Extended Commands" + ("%_General" + ["This Buffer %_Read Only" (toggle-read-only) + :style toggle :selected buffer-read-only] + ["%_Teach Extended Commands" (customize-set-variable 'teach-extended-commands-p (not teach-extended-commands-p)) :style toggle :selected teach-extended-commands-p] - ["Debug On Error" + ["Debug on %_Error" (customize-set-variable 'debug-on-error (not debug-on-error)) :style toggle :selected debug-on-error] - ["Debug On Quit" + ["Debug on %_Quit" (customize-set-variable 'debug-on-quit (not debug-on-quit)) :style toggle :selected debug-on-quit] + ["Debug on %_Signal" + (customize-set-variable 'debug-on-signal (not debug-on-signal)) + :style toggle :selected debug-on-signal] ) - ("Printing Options" - ["Command-Line Switches for `lpr'/`lp'..." + + ("%_Printing" + ["Command-Line %_Switches for `lpr'/`lp'..." ;; better to directly open a customization buffer, since the value ;; must be a list of strings, which is somewhat complex to prompt for. (customize-variable 'lpr-switches) (boundp 'lpr-switches)] - ("Pretty-Print Paper Size" - ["Letter" + ("%_Pretty-Print Paper Size" + ["%_Letter" (customize-set-variable 'ps-paper-type 'letter) :style radio :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'letter)) :active (boundp 'ps-paper-type)] - ["Letter-small" + ["Lette%_r-Small" (customize-set-variable 'ps-paper-type 'letter-small) :style radio :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'letter-small)) :active (boundp 'ps-paper-type)] - ["Legal" + ["Le%_gal" (customize-set-variable 'ps-paper-type 'legal) :style radio :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'legal)) :active (boundp 'ps-paper-type)] - ["Statement" + ["%_Statement" (customize-set-variable 'ps-paper-type 'statement) :style radio :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'statement)) :active (boundp 'ps-paper-type)] - ["Executive" + ["%_Executive" (customize-set-variable 'ps-paper-type 'executive) :style radio :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'executive)) :active (boundp 'ps-paper-type)] - ["Tabloid" + ["%_Tabloid" (customize-set-variable 'ps-paper-type 'tabloid) :style radio :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'tabloid)) :active (boundp 'ps-paper-type)] - ["Ledger" + ["Le%_dger" (customize-set-variable 'ps-paper-type 'ledger) :style radio :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'ledger)) :active (boundp 'ps-paper-type)] - ["A3" + ["A%_3" (customize-set-variable 'ps-paper-type 'a3) :style radio :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a3)) :active (boundp 'ps-paper-type)] - ["A4" + ["%_A4" (customize-set-variable 'ps-paper-type 'a4) :style radio :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a4)) :active (boundp 'ps-paper-type)] - ["A4small" + ["A4s%_mall" (customize-set-variable 'ps-paper-type 'a4small) :style radio :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a4small)) :active (boundp 'ps-paper-type)] - ["B4" + ["B%_4" (customize-set-variable 'ps-paper-type 'b4) :style radio :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'b4)) :active (boundp 'ps-paper-type)] - ["B5" + ["%_B5" (customize-set-variable 'ps-paper-type 'b5) :style radio :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'b5)) :active (boundp 'ps-paper-type)] ) - ["Color Printing" + ["%_Color Printing" (cond (ps-print-color-p (customize-set-variable 'ps-print-color-p nil) ;; I'm wondering whether all this muck is useful. @@ -387,208 +783,111 @@ :style toggle :selected (and (boundp 'ps-print-color-p) ps-print-color-p) :active (boundp 'ps-print-color-p)]) - ("\"Other Window\" Location" - ["Always in Same Frame" + ("%_Internet" + ("%_Compose Mail With" + ["Default Emacs Mailer" + (customize-set-variable 'mail-user-agent 'sendmail-user-agent) + :style radio + :selected (eq mail-user-agent 'sendmail-user-agent)] + ["MH" + (customize-set-variable 'mail-user-agent 'mh-e-user-agent) + :style radio + :selected (eq mail-user-agent 'mh-e-user-agent) + :active (get 'mh-e-user-agent 'composefunc)] + ["GNUS" + (customize-set-variable 'mail-user-agent 'message-user-agent) + :style radio + :selected (eq mail-user-agent 'message-user-agent) + :active (get 'message-user-agent 'composefunc)] + ) + ["Set My %_Email Address..." (customize-set-variable - 'get-frame-for-buffer-default-instance-limit nil) - :style radio - :selected (null get-frame-for-buffer-default-instance-limit)] - ["Other Frame (2 Frames Max)" - (customize-set-variable 'get-frame-for-buffer-default-instance-limit 2) - :style radio - :selected (eq 2 get-frame-for-buffer-default-instance-limit)] - ["Other Frame (3 Frames Max)" - (customize-set-variable 'get-frame-for-buffer-default-instance-limit 3) - :style radio - :selected (eq 3 get-frame-for-buffer-default-instance-limit)] - ["Other Frame (4 Frames Max)" - (customize-set-variable 'get-frame-for-buffer-default-instance-limit 4) - :style radio - :selected (eq 4 get-frame-for-buffer-default-instance-limit)] - ["Other Frame (5 Frames Max)" - (customize-set-variable 'get-frame-for-buffer-default-instance-limit 5) - :style radio - :selected (eq 5 get-frame-for-buffer-default-instance-limit)] - ["Always Create New Frame" - (customize-set-variable 'get-frame-for-buffer-default-instance-limit 0) - :style radio - :selected (eq 0 get-frame-for-buffer-default-instance-limit)] - "-----" - ["Temp Buffers Always in Same Frame" - (customize-set-variable 'temp-buffer-show-function - 'show-temp-buffer-in-current-frame) - :style radio - :selected (eq temp-buffer-show-function - 'show-temp-buffer-in-current-frame)] - ["Temp Buffers Like Other Buffers" - (customize-set-variable 'temp-buffer-show-function nil) - :style radio - :selected (null temp-buffer-show-function)] - "-----" - ["Make current frame gnuserv target" - (customize-set-variable 'gnuserv-frame (if (eq gnuserv-frame t) nil t)) - :style toggle - :selected (and (boundp 'gnuserv-frame) (eq gnuserv-frame t)) - :active (boundp 'gnuserv-frame)] - ) - "-----" - ("Syntax Highlighting" - ["In This Buffer" - (progn ;; becomes buffer local - (font-lock-mode) - (customize-set-variable 'font-lock-mode font-lock-mode)) - :style toggle - :selected (and (boundp 'font-lock-mode) font-lock-mode) - :active (boundp 'font-lock-mode)] - ["Automatic" - (customize-set-variable 'font-lock-auto-fontify - (not font-lock-auto-fontify)) - :style toggle - :selected (and (boundp 'font-lock-auto-fontify) font-lock-auto-fontify) - :active (fboundp 'font-lock-mode)] - "-----" - ["Fonts" - (progn - (require 'font-lock) - (font-lock-use-default-fonts) - (customize-set-variable 'font-lock-use-fonts t) - (customize-set-variable 'font-lock-use-colors nil) - (font-lock-mode 1)) - :style radio - :selected (and (boundp 'font-lock-use-fonts) font-lock-use-fonts) - :active (fboundp 'font-lock-mode)] - ["Colors" - (progn - (require 'font-lock) - (font-lock-use-default-colors) - (customize-set-variable 'font-lock-use-colors t) - (customize-set-variable 'font-lock-use-fonts nil) - (font-lock-mode 1)) - :style radio - :selected (and (boundp 'font-lock-use-colors) font-lock-use-colors) - :active (boundp 'font-lock-mode)] - "-----" - ["Least" - (progn - (require 'font-lock) - (if (or (and (not (integerp font-lock-maximum-decoration)) - (not (eq t font-lock-maximum-decoration))) - (and (integerp font-lock-maximum-decoration) - (<= font-lock-maximum-decoration 0))) - nil - (customize-set-variable 'font-lock-maximum-decoration nil) - (font-lock-recompute-variables))) - :style radio - :active (fboundp 'font-lock-mode) - :selected (and (boundp 'font-lock-maximium-decoration) - (or (and (not (integerp font-lock-maximum-decoration)) - (not (eq t font-lock-maximum-decoration))) - (and (integerp font-lock-maximum-decoration) - (<= font-lock-maximum-decoration 0))))] - ["More" - (progn - (require 'font-lock) - (if (and (integerp font-lock-maximum-decoration) - (= 1 font-lock-maximum-decoration)) - nil - (customize-set-variable 'font-lock-maximum-decoration 1) - (font-lock-recompute-variables))) - :style radio - :active (fboundp 'font-lock-mode) - :selected (and (boundp 'font-lock-maximium-decoration) - (integerp font-lock-maximum-decoration) - (= 1 font-lock-maximum-decoration))] - ["Even More" - (progn - (require 'font-lock) - (if (and (integerp font-lock-maximum-decoration) - (= 2 font-lock-maximum-decoration)) - nil - (customize-set-variable 'font-lock-maximum-decoration 2) - (font-lock-recompute-variables))) - :style radio - :active (fboundp 'font-lock-mode) - :selected (and (boundp 'font-lock-maximum-decoration) - (integerp font-lock-maximum-decoration) - (= 2 font-lock-maximum-decoration))] - ["Most" - (progn - (require 'font-lock) - (if (or (eq font-lock-maximum-decoration t) - (and (integerp font-lock-maximum-decoration) - (>= font-lock-maximum-decoration 3))) - nil - (customize-set-variable 'font-lock-maximum-decoration t) - (font-lock-recompute-variables))) - :style radio - :active (fboundp 'font-lock-mode) - :selected (and (boundp 'font-lock-maximum-decoration) - (or (eq font-lock-maximum-decoration t) - (and (integerp font-lock-maximum-decoration) - (>= font-lock-maximum-decoration 3))))] - "-----" - ["Lazy" - (progn ;; becomes buffer local - (lazy-shot-mode) - (customize-set-variable 'lazy-shot-mode lazy-shot-mode) - ;; this shouldn't be necessary so there has to - ;; be a redisplay bug lurking somewhere (or - ;; possibly another event handler bug) - (redraw-modeline)) - :active (and (boundp 'font-lock-mode) (boundp 'lazy-shot-mode) - font-lock-mode) - :style toggle - :selected (and (boundp 'lazy-shot-mode) lazy-shot-mode)] - ["Caching" - (progn ;; becomes buffer local - (fast-lock-mode) - (customize-set-variable 'fast-lock-mode fast-lock-mode) - ;; this shouldn't be necessary so there has to - ;; be a redisplay bug lurking somewhere (or - ;; possibly another event handler bug) - (redraw-modeline)) - :active (and (boundp 'font-lock-mode) (boundp 'fast-lock-mode) - font-lock-mode) - :style toggle - :selected (and (boundp 'fast-lock-mode) fast-lock-mode)] - ) - ("Paren Highlighting" - ["None" - (customize-set-variable 'paren-mode nil) - :style radio - :selected (and (boundp 'paren-mode) (not paren-mode)) - :active (boundp 'paren-mode)] - ["Blinking Paren" - (customize-set-variable 'paren-mode 'blink-paren) - :style radio - :selected (and (boundp 'paren-mode) (eq paren-mode 'blink-paren)) - :active (boundp 'paren-mode)] - ["Steady Paren" - (customize-set-variable 'paren-mode 'paren) - :style radio - :selected (and (boundp 'paren-mode) (eq paren-mode 'paren)) - :active (boundp 'paren-mode)] - ["Expression" - (customize-set-variable 'paren-mode 'sexp) - :style radio - :selected (and (boundp 'paren-mode) (eq paren-mode 'sexp)) - :active (boundp 'paren-mode)] -;; ["Nested Shading" -;; (customize-set-variable 'paren-mode 'nested) -;; :style radio -;; :selected (and (boundp 'paren-mode) (eq paren-mode 'nested)) -;; :active (boundp 'paren-mode)] - ) + 'user-mail-address + (read-string "Set email address: " user-mail-address))] + ["Set %_Machine Email Name..." + (customize-set-variable + 'mail-host-address + (read-string "Set machine email name: " mail-host-address))] + "---" + ("%_Open URLs With" + ["%_Emacs-W3" + (customize-set-variable 'browse-url-browser-function 'browse-url-w3) + :style radio + :selected (and (boundp 'browse-url-browser-function) + (eq browse-url-browser-function 'browse-url-w3)) + :active (and (boundp 'browse-url-browser-function) + (fboundp 'browse-url-w3) + (fboundp 'w3-fetch))] + ["%_Netscape" + (customize-set-variable 'browse-url-browser-function + 'browse-url-netscape) + :style radio + :selected (and (boundp 'browse-url-browser-function) + (eq browse-url-browser-function 'browse-url-netscape)) + :active (and (boundp 'browse-url-browser-function) + (fboundp 'browse-url-netscape))] + ["%_Mosaic" + (customize-set-variable 'browse-url-browser-function + 'browse-url-mosaic) + :style radio + :selected (and (boundp 'browse-url-browser-function) + (eq browse-url-browser-function 'browse-url-mosaic)) + :active (and (boundp 'browse-url-browser-function) + (fboundp 'browse-url-mosaic))] + ["Mosaic (%_CCI)" + (customize-set-variable 'browse-url-browser-function 'browse-url-cci) + :style radio + :selected (and (boundp 'browse-url-browser-function) + (eq browse-url-browser-function 'browse-url-cci)) + :active (and (boundp 'browse-url-browser-function) + (fboundp 'browse-url-cci))] + ["%_IXI Mosaic" + (customize-set-variable 'browse-url-browser-function + 'browse-url-iximosaic) + :style radio + :selected (and (boundp 'browse-url-browser-function) + (eq browse-url-browser-function 'browse-url-iximosaic)) + :active (and (boundp 'browse-url-browser-function) + (fboundp 'browse-url-iximosaic))] + ["%_Lynx (xterm)" + (customize-set-variable 'browse-url-browser-function + 'browse-url-lynx-xterm) + :style radio + :selected (and (boundp 'browse-url-browser-function) + (eq browse-url-browser-function 'browse-url-lynx-xterm)) + :active (and (boundp 'browse-url-browser-function) + (fboundp 'browse-url-lynx-xterm))] + ["L%_ynx (xemacs)" + (customize-set-variable 'browse-url-browser-function + 'browse-url-lynx-emacs) + :style radio + :selected (and (boundp 'browse-url-browser-function) + (eq browse-url-browser-function 'browse-url-lynx-emacs)) + :active (and (boundp 'browse-url-browser-function) + (fboundp 'browse-url-lynx-emacs))] + ["%_Grail" + (customize-set-variable 'browse-url-browser-function + 'browse-url-grail) + :style radio + :selected (and (boundp 'browse-url-browser-function) + (eq browse-url-browser-function 'browse-url-grail)) + :active (and (boundp 'browse-url-browser-function) + (fboundp 'browse-url-grail))] + ["%_Kfm" + (customize-set-variable 'browse-url-browser-function + 'browse-url-kfm) + :style radio + :selected (and (boundp 'browse-url-browser-function) + (eq browse-url-browser-function 'browse-url-kfm)) + :active (and (boundp 'browse-url-browser-function) + (fboundp 'browse-url-kfm))] + )) + + "-----" - ("Frame Appearance" - ["Frame-Local Font Menu" - (customize-set-variable 'font-menu-this-frame-only-p - (not font-menu-this-frame-only-p)) - :style toggle - :selected (and (boundp 'font-menu-this-frame-only-p) - font-menu-this-frame-only-p)] + ("Display" ,@(if (featurep 'scrollbar) - '(["Scrollbars" + '(["%_Scrollbars" (customize-set-variable 'scrollbars-visible-p (not scrollbars-visible-p)) :style toggle @@ -599,62 +898,120 @@ ;; off through the Options menu. I would have uncommented this ;; source, but the code for saving options would not save the ;; modeline 3D-ness. Grrr. --hniksic -;; ["3D Modeline" -;; (progn -;; (if (zerop (specifier-instance modeline-shadow-thickness)) -;; (set-specifier modeline-shadow-thickness 2) -;; (set-specifier modeline-shadow-thickness 0)) -;; (redraw-modeline t)) -;; :style toggle -;; :selected (let ((thickness -;; (specifier-instance modeline-shadow-thickness))) -;; (and (integerp thickness) -;; (> thickness 0)))] - ["Truncate Lines" - (progn ;; becomes buffer-local + ;; ["%_3D Modeline" + ;; (progn + ;; (if (zerop (specifier-instance modeline-shadow-thickness)) + ;; (set-specifier modeline-shadow-thickness 2) + ;; (set-specifier modeline-shadow-thickness 0)) + ;; (redraw-modeline t)) + ;; :style toggle + ;; :selected (let ((thickness + ;; (specifier-instance modeline-shadow-thickness))) + ;; (and (integerp thickness) + ;; (> thickness 0)))] + ["%_Truncate Lines" + (progn;; becomes buffer-local (setq truncate-lines (not truncate-lines)) (customize-set-variable 'truncate-lines truncate-lines)) :style toggle :selected truncate-lines] - ["Blinking Cursor" + ["%_Blinking Cursor" (customize-set-variable 'blink-cursor-mode (not blink-cursor-mode)) :style toggle :selected (and (boundp 'blink-cursor-mode) blink-cursor-mode) :active (boundp 'blink-cursor-mode)] "-----" - ["Block cursor" + ["Bl%_ock Cursor" (progn (customize-set-variable 'bar-cursor nil) (force-cursor-redisplay)) :style radio :selected (null bar-cursor)] - ["Bar cursor (1 pixel)" + ["Bar Cursor (%_1 Pixel)" (progn (customize-set-variable 'bar-cursor t) (force-cursor-redisplay)) :style radio :selected (eq bar-cursor t)] - ["Bar cursor (2 pixels)" + ["Bar Cursor (%_2 Pixels)" (progn (customize-set-variable 'bar-cursor 2) (force-cursor-redisplay)) :style radio :selected (and bar-cursor (not (eq bar-cursor t)))] "------" - ["Line Numbers" + ["%_Line Numbers" (progn (customize-set-variable 'line-number-mode (not line-number-mode)) (redraw-modeline)) :style toggle :selected line-number-mode] - ["Column Numbers" + ["%_Column Numbers" (progn (customize-set-variable 'column-number-mode (not column-number-mode)) (redraw-modeline)) :style toggle :selected column-number-mode] - ) - ("Menubar Appearance" - ["Buffers Menu Length..." + + ("\"Other %_Window\" Location" + ["%_Always in Same Frame" + (customize-set-variable + 'get-frame-for-buffer-default-instance-limit nil) + :style radio + :selected (null get-frame-for-buffer-default-instance-limit)] + ["Other Frame (%_2 Frames Max)" + (customize-set-variable 'get-frame-for-buffer-default-instance-limit 2) + :style radio + :selected (eq 2 get-frame-for-buffer-default-instance-limit)] + ["Other Frame (%_3 Frames Max)" + (customize-set-variable 'get-frame-for-buffer-default-instance-limit 3) + :style radio + :selected (eq 3 get-frame-for-buffer-default-instance-limit)] + ["Other Frame (%_4 Frames Max)" + (customize-set-variable 'get-frame-for-buffer-default-instance-limit 4) + :style radio + :selected (eq 4 get-frame-for-buffer-default-instance-limit)] + ["Other Frame (%_5 Frames Max)" + (customize-set-variable 'get-frame-for-buffer-default-instance-limit 5) + :style radio + :selected (eq 5 get-frame-for-buffer-default-instance-limit)] + ["Always Create %_New Frame" + (customize-set-variable 'get-frame-for-buffer-default-instance-limit 0) + :style radio + :selected (eq 0 get-frame-for-buffer-default-instance-limit)] + "-----" + ["%_Temp Buffers Always in Same Frame" + (customize-set-variable 'temp-buffer-show-function + 'show-temp-buffer-in-current-frame) + :style radio + :selected (eq temp-buffer-show-function + 'show-temp-buffer-in-current-frame)] + ["Temp Buffers %_Like Other Buffers" + (customize-set-variable 'temp-buffer-show-function nil) + :style radio + :selected (null temp-buffer-show-function)] + "-----" + ["%_Make Current Frame Gnuserv Target" + (customize-set-variable 'gnuserv-frame (if (eq gnuserv-frame t) nil t)) + :style toggle + :selected (and (boundp 'gnuserv-frame) (eq gnuserv-frame t)) + :active (boundp 'gnuserv-frame)] + ) + ) + ("%_Menubars" + ["%_Frame-Local Font Menu" + (customize-set-variable 'font-menu-this-frame-only-p + (not font-menu-this-frame-only-p)) + :style toggle + :selected (and (boundp 'font-menu-this-frame-only-p) + font-menu-this-frame-only-p)] + ["%_Alt/Meta Selects Menu Items" + (if (eq menu-accelerator-enabled 'menu-force) + (customize-set-variable 'menu-accelerator-enabled nil) + (customize-set-variable 'menu-accelerator-enabled 'menu-force)) + :style toggle + :selected (eq menu-accelerator-enabled 'menu-force)] + "----" + ["Buffers Menu %_Length..." (customize-set-variable 'buffers-menu-max-size ;; would it be better to open a customization buffer ? @@ -662,19 +1019,34 @@ (read-number "Enter number of buffers to display (or 0 for unlimited): "))) (if (eq val 0) nil val)))] - ["Multi-Operation Buffers Sub-Menus" + ["%_Multi-Operation Buffers Sub-Menus" (customize-set-variable 'complex-buffers-menu-p (not complex-buffers-menu-p)) :style toggle :selected complex-buffers-menu-p] - ("Buffers Menu Sorting" - ["Most Recently Used" + ["S%_ubmenus for Buffer Groups" + (customize-set-variable 'buffers-menu-submenus-for-groups-p + (not buffers-menu-submenus-for-groups-p)) + :style toggle + :selected buffers-menu-submenus-for-groups-p] + ["%_Verbose Buffer Menu Entries" + (if (eq buffers-menu-format-buffer-line-function + 'slow-format-buffers-menu-line) + (customize-set-variable 'buffers-menu-format-buffer-line-function + 'format-buffers-menu-line) + (customize-set-variable 'buffers-menu-format-buffer-line-function + 'slow-format-buffers-menu-line)) + :style toggle + :selected (eq buffers-menu-format-buffer-line-function + 'slow-format-buffers-menu-line)] + ("Buffers Menu %_Sorting" + ["%_Most Recently Used" (progn (customize-set-variable 'buffers-menu-sort-function nil) (customize-set-variable 'buffers-menu-grouping-function nil)) :style radio :selected (null buffers-menu-sort-function)] - ["Alphabetically" + ["%_Alphabetically" (progn (customize-set-variable 'buffers-menu-sort-function 'sort-buffers-menu-alphabetically) @@ -682,7 +1054,7 @@ :style radio :selected (eq 'sort-buffers-menu-alphabetically buffers-menu-sort-function)] - ["By Major Mode, Then Alphabetically" + ["%_By Major Mode, Then Alphabetically" (progn (customize-set-variable 'buffers-menu-sort-function @@ -693,13 +1065,8 @@ :style radio :selected (eq 'sort-buffers-menu-by-mode-then-alphabetically buffers-menu-sort-function)]) - ["Submenus for Buffer Groups" - (customize-set-variable 'buffers-menu-submenus-for-groups-p - (not buffers-menu-submenus-for-groups-p)) - :style toggle - :selected buffers-menu-submenus-for-groups-p] "---" - ["Ignore Scaled Fonts" + ["%_Ignore Scaled Fonts" (customize-set-variable 'font-menu-ignore-scaled-fonts (not font-menu-ignore-scaled-fonts)) :style toggle @@ -707,298 +1074,341 @@ font-menu-ignore-scaled-fonts)] ) ,@(if (featurep 'toolbar) - '(("Toolbar Appearance" - ["Visible" + '(("%_Toolbars" + ["%_Visible" (customize-set-variable 'toolbar-visible-p (not toolbar-visible-p)) :style toggle :selected toolbar-visible-p] - ["Captioned" + ["%_Captioned" (customize-set-variable 'toolbar-captioned-p (not toolbar-captioned-p)) :style toggle :selected toolbar-captioned-p] - ("Default Location" - ["Top" + ("%_Default Location" + ["%_Top" (customize-set-variable 'default-toolbar-position 'top) :style radio :selected (eq default-toolbar-position 'top)] - ["Bottom" + ["%_Bottom" (customize-set-variable 'default-toolbar-position 'bottom) :style radio :selected (eq default-toolbar-position 'bottom)] - ["Left" + ["%_Left" (customize-set-variable 'default-toolbar-position 'left) :style radio :selected (eq default-toolbar-position 'left)] - ["Right" + ["%_Right" (customize-set-variable 'default-toolbar-position 'right) :style radio :selected (eq default-toolbar-position 'right)] ) ))) ,@(if (featurep 'gutter) - '(("Gutter Appearance" - ["Visible" - (customize-set-variable 'gutter-visible-p - (not gutter-visible-p)) + '(("G%_utters" + ["Buffers Tab %_Visible" + (customize-set-variable 'gutter-buffers-tab-visible-p + (not gutter-buffers-tab-visible-p)) :style toggle - :selected gutter-visible-p] - ("Default Location" - ["Top" + :selected gutter-buffers-tab-visible-p] + ("%_Default Location" + ["%_Top" (customize-set-variable 'default-gutter-position 'top) :style radio :selected (eq default-gutter-position 'top)] - ["Bottom" + ["%_Bottom" (customize-set-variable 'default-gutter-position 'bottom) :style radio :selected (eq default-gutter-position 'bottom)] - ["Left" + ["%_Left" (customize-set-variable 'default-gutter-position 'left) :style radio :selected (eq default-gutter-position 'left)] - ["Right" + ["%_Right" (customize-set-variable 'default-gutter-position 'right) :style radio :selected (eq default-gutter-position 'right)] ) ))) - ("Mouse" - ["Avoid Text..." - (customize-set-variable 'mouse-avoidance-mode - (if mouse-avoidance-mode nil 'banish)) + "-----" + ("S%_yntax Highlighting" + ["%_In This Buffer" + (progn;; becomes buffer local + (font-lock-mode) + (customize-set-variable 'font-lock-mode font-lock-mode)) :style toggle - :selected (and (boundp 'mouse-avoidance-mode) mouse-avoidance-mode) - :active (and (boundp 'mouse-avoidance-mode) - (device-on-window-system-p))] - ["strokes-mode" - (customize-set-variable 'strokes-mode (not strokes-mode)) + :selected (and (boundp 'font-lock-mode) font-lock-mode) + :active (boundp 'font-lock-mode)] + ["%_Automatic" + (customize-set-variable 'font-lock-auto-fontify + (not font-lock-auto-fontify)) :style toggle - :selected (and (boundp 'strokes-mode) strokes-mode) - :active (and (boundp 'strokes-mode) - (device-on-window-system-p))] - ) - ("Open URLs With" - ["Emacs-W3" - (customize-set-variable 'browse-url-browser-function 'browse-url-w3) + :selected (and (boundp 'font-lock-auto-fontify) font-lock-auto-fontify) + :active (fboundp 'font-lock-mode)] + "-----" + ["%_Fonts" + (progn + (require 'font-lock) + (font-lock-use-default-fonts) + (customize-set-variable 'font-lock-use-fonts t) + (customize-set-variable 'font-lock-use-colors nil) + (font-lock-mode 1)) :style radio - :selected (and (boundp 'browse-url-browser-function) - (eq browse-url-browser-function 'browse-url-w3)) - :active (and (boundp 'browse-url-browser-function) - (fboundp 'browse-url-w3) - (fboundp 'w3-fetch))] - ["Netscape" - (customize-set-variable 'browse-url-browser-function - 'browse-url-netscape) + :selected (and (boundp 'font-lock-use-fonts) font-lock-use-fonts) + :active (fboundp 'font-lock-mode)] + ["%_Colors" + (progn + (require 'font-lock) + (font-lock-use-default-colors) + (customize-set-variable 'font-lock-use-colors t) + (customize-set-variable 'font-lock-use-fonts nil) + (font-lock-mode 1)) :style radio - :selected (and (boundp 'browse-url-browser-function) - (eq browse-url-browser-function 'browse-url-netscape)) - :active (and (boundp 'browse-url-browser-function) - (fboundp 'browse-url-netscape))] - ["Mosaic" - (customize-set-variable 'browse-url-browser-function - 'browse-url-mosaic) + :selected (and (boundp 'font-lock-use-colors) font-lock-use-colors) + :active (boundp 'font-lock-mode)] + "-----" + ["%_Least" + (progn + (require 'font-lock) + (if (or (and (not (integerp font-lock-maximum-decoration)) + (not (eq t font-lock-maximum-decoration))) + (and (integerp font-lock-maximum-decoration) + (<= font-lock-maximum-decoration 0))) + nil + (customize-set-variable 'font-lock-maximum-decoration nil) + (font-lock-recompute-variables))) :style radio - :selected (and (boundp 'browse-url-browser-function) - (eq browse-url-browser-function 'browse-url-mosaic)) - :active (and (boundp 'browse-url-browser-function) - (fboundp 'browse-url-mosaic))] - ["Mosaic (CCI)" - (customize-set-variable 'browse-url-browser-function 'browse-url-cci) + :active (fboundp 'font-lock-mode) + :selected (and (boundp 'font-lock-maximium-decoration) + (or (and (not (integerp font-lock-maximum-decoration)) + (not (eq t font-lock-maximum-decoration))) + (and (integerp font-lock-maximum-decoration) + (<= font-lock-maximum-decoration 0))))] + ["M%_ore" + (progn + (require 'font-lock) + (if (and (integerp font-lock-maximum-decoration) + (= 1 font-lock-maximum-decoration)) + nil + (customize-set-variable 'font-lock-maximum-decoration 1) + (font-lock-recompute-variables))) :style radio - :selected (and (boundp 'browse-url-browser-function) - (eq browse-url-browser-function 'browse-url-cci)) - :active (and (boundp 'browse-url-browser-function) - (fboundp 'browse-url-cci))] - ["IXI Mosaic" - (customize-set-variable 'browse-url-browser-function - 'browse-url-iximosaic) + :active (fboundp 'font-lock-mode) + :selected (and (boundp 'font-lock-maximium-decoration) + (integerp font-lock-maximum-decoration) + (= 1 font-lock-maximum-decoration))] + ["%_Even More" + (progn + (require 'font-lock) + (if (and (integerp font-lock-maximum-decoration) + (= 2 font-lock-maximum-decoration)) + nil + (customize-set-variable 'font-lock-maximum-decoration 2) + (font-lock-recompute-variables))) :style radio - :selected (and (boundp 'browse-url-browser-function) - (eq browse-url-browser-function 'browse-url-iximosaic)) - :active (and (boundp 'browse-url-browser-function) - (fboundp 'browse-url-iximosaic))] - ["Lynx (xterm)" - (customize-set-variable 'browse-url-browser-function - 'browse-url-lynx-xterm) + :active (fboundp 'font-lock-mode) + :selected (and (boundp 'font-lock-maximum-decoration) + (integerp font-lock-maximum-decoration) + (= 2 font-lock-maximum-decoration))] + ["%_Most" + (progn + (require 'font-lock) + (if (or (eq font-lock-maximum-decoration t) + (and (integerp font-lock-maximum-decoration) + (>= font-lock-maximum-decoration 3))) + nil + (customize-set-variable 'font-lock-maximum-decoration t) + (font-lock-recompute-variables))) :style radio - :selected (and (boundp 'browse-url-browser-function) - (eq browse-url-browser-function 'browse-url-lynx-xterm)) - :active (and (boundp 'browse-url-browser-function) - (fboundp 'browse-url-lynx-xterm))] - ["Lynx (xemacs)" - (customize-set-variable 'browse-url-browser-function - 'browse-url-lynx-emacs) + :active (fboundp 'font-lock-mode) + :selected (and (boundp 'font-lock-maximum-decoration) + (or (eq font-lock-maximum-decoration t) + (and (integerp font-lock-maximum-decoration) + (>= font-lock-maximum-decoration 3))))] + "-----" + ["La%_zy" + (progn;; becomes buffer local + (lazy-shot-mode) + (customize-set-variable 'lazy-shot-mode lazy-shot-mode) + ;; this shouldn't be necessary so there has to + ;; be a redisplay bug lurking somewhere (or + ;; possibly another event handler bug) + (redraw-modeline)) + :active (and (boundp 'font-lock-mode) (boundp 'lazy-shot-mode) + font-lock-mode) + :style toggle + :selected (and (boundp 'lazy-shot-mode) lazy-shot-mode)] + ["Cac%_hing" + (progn;; becomes buffer local + (fast-lock-mode) + (customize-set-variable 'fast-lock-mode fast-lock-mode) + ;; this shouldn't be necessary so there has to + ;; be a redisplay bug lurking somewhere (or + ;; possibly another event handler bug) + (redraw-modeline)) + :active (and (boundp 'font-lock-mode) (boundp 'fast-lock-mode) + font-lock-mode) + :style toggle + :selected (and (boundp 'fast-lock-mode) fast-lock-mode)] + ) + ("Pa%_ren Highlighting" + ["%_None" + (customize-set-variable 'paren-mode nil) :style radio - :selected (and (boundp 'browse-url-browser-function) - (eq browse-url-browser-function 'browse-url-lynx-emacs)) - :active (and (boundp 'browse-url-browser-function) - (fboundp 'browse-url-lynx-emacs))] - ["Grail" - (customize-set-variable 'browse-url-browser-function - 'browse-url-grail) + :selected (and (boundp 'paren-mode) (not paren-mode)) + :active (boundp 'paren-mode)] + ["%_Blinking Paren" + (customize-set-variable 'paren-mode 'blink-paren) :style radio - :selected (and (boundp 'browse-url-browser-function) - (eq browse-url-browser-function 'browse-url-grail)) - :active (and (boundp 'browse-url-browser-function) - (fboundp 'browse-url-grail))] - ["Kfm" - (customize-set-variable 'browse-url-browser-function - 'browse-url-kfm) + :selected (and (boundp 'paren-mode) (eq paren-mode 'blink-paren)) + :active (boundp 'paren-mode)] + ["%_Steady Paren" + (customize-set-variable 'paren-mode 'paren) + :style radio + :selected (and (boundp 'paren-mode) (eq paren-mode 'paren)) + :active (boundp 'paren-mode)] + ["%_Expression" + (customize-set-variable 'paren-mode 'sexp) :style radio - :selected (and (boundp 'browse-url-browser-function) - (eq browse-url-browser-function 'browse-url-kfm)) - :active (and (boundp 'browse-url-browser-function) - (fboundp 'browse-url-kfm))] + :selected (and (boundp 'paren-mode) (eq paren-mode 'sexp)) + :active (boundp 'paren-mode)] + ;; ["Nes%_ted Shading" + ;; (customize-set-variable 'paren-mode 'nested) + ;; :style radio + ;; :selected (and (boundp 'paren-mode) (eq paren-mode 'nested)) + ;; :active (boundp 'paren-mode)] ) "-----" - ["Edit Faces..." (customize-face nil)] - ("Font" :filter font-menu-family-constructor) - ("Size" :filter font-menu-size-constructor) -; ("Weight" :filter font-menu-weight-constructor) + ["Edit Fa%_ces..." (customize-face nil)] + ("Fo%_nt" :filter font-menu-family-constructor) + ("Si%_ze" :filter font-menu-size-constructor) + ;; ("Weig%_ht" :filter font-menu-weight-constructor) "-----" - ["Save Options" customize-save-customized] + ["%_Edit Init (.emacs) File" + ;; #### there should be something that holds the name that the init + ;; file should be created as, when it's not present. + (progn (find-file (or user-init-file "~/.emacs")) + (emacs-lisp-mode))] + ["%_Save Options to .emacs File" customize-save-customized] ) - ("Buffers" + ("%_Buffers" :filter buffers-menu-filter - ["Read Only" (toggle-read-only) - :style toggle :selected buffer-read-only] - ["List All Buffers" list-buffers] - "--" + ["Go To %_Previous Buffer" switch-to-other-buffer] + ["Go To %_Buffer..." switch-to-buffer] + "----" + ["%_List All Buffers" list-buffers] + ["%_Delete Buffer" kill-this-buffer + :suffix (if put-buffer-names-in-file-menu (buffer-name) "")] + "----" ) - ("Tools" - ["Grep..." grep - :active (fboundp 'grep)] - ["Compile..." compile - :active (fboundp 'compile)] - ["Shell" shell - :active (fboundp 'shell)] - ["Shell Command..." shell-command - :active (fboundp 'shell-command)] - ["Shell Command on Region..." shell-command-on-region - :active (and (fboundp 'shell-command-on-region) (region-exists-p))] - ["Debug (GDB)..." gdb - :active (fboundp 'gdb)] - ["Debug (DBX)..." dbx - :active (fboundp 'dbx)] - "-----" - ("Tags" - ["Find Tag..." find-tag] - ["Find Other Window..." find-tag-other-window] - ["Next Tag..." (find-tag nil)] - ["Next Other Window..." (find-tag-other-window nil)] - ["Next File" next-file] - "-----" - ["Tags Search..." tags-search] - ["Tags Replace..." tags-query-replace] - ["Continue Search/Replace" tags-loop-continue] - "-----" - ["Pop stack" pop-tag-mark] - ["Apropos..." tags-apropos] - "-----" - ["Set Tags Table File..." visit-tags-table] - )) - - nil ; the partition: menus after this are flushright + nil ; the partition: menus after this are flushright - ("Help" - ["About XEmacs..." about-xemacs] - ("Basics" - ["Installation" describe-installation + ("%_Help" + ["%_About XEmacs..." about-xemacs] + ("%_Basics" + ["%_Installation" describe-installation :active (boundp 'Installation-string)] ;; Tutorials. ,(if (featurep 'mule) ;; Mule tutorials. - (let ((lang language-info-alist) + (let ((lang language-info-alist) (n 0) submenu tut) (while lang + (setq n (1+ n)) (and (setq tut (assq 'tutorial (car lang))) (not (string= (caar lang) "ASCII")) (setq submenu (cons - `[,(caar lang) (help-with-tutorial nil ,(cdr tut))] + `[,(concat (menu-item-generate-accelerator-spec n) + (caar lang)) + (help-with-tutorial nil ,(cdr tut))] submenu))) (setq lang (cdr lang))) - (append `("Tutorials" + (append `("%_Tutorials" :filter tutorials-menu-filter - ["Default" help-with-tutorial t + ["%_Default" help-with-tutorial t ,(concat "(" current-language-environment ")")]) submenu)) ;; Non mule tutorials. (let ((lang tutorial-supported-languages) + (n 0) submenu) (while lang + (setq n (1+ n)) (setq submenu (cons - `[,(caar lang) + `[,(concat (menu-item-generate-accelerator-spec n) + (caar lang)) (help-with-tutorial ,(format "TUTORIAL.%s" (cadr (car lang))))] submenu)) (setq lang (cdr lang))) - (append '("Tutorials" - ["English" help-with-tutorial]) + (append '("%_Tutorials" + ["%_English" help-with-tutorial]) submenu))) - ["News" view-emacs-news] - ["Packages" finder-by-keyword] - ["Splash" xemacs-splash-buffer]) + ["%_News" view-emacs-news] + ["%_Packages" finder-by-keyword] + ["%_Splash" xemacs-splash-buffer]) "-----" - ("XEmacs FAQ" - ["FAQ (local)" xemacs-local-faq] - ["FAQ via WWW" xemacs-www-faq (boundp 'browse-url-browser-function)] - ["Home Page" xemacs-www-page (boundp 'browse-url-browser-function)]) - ("Samples" - ["Sample .emacs" (find-file (locate-data-file "sample.emacs")) (locate-data-file "sample.emacs")] - ["Sample .Xdefaults" (find-file (locate-data-file "sample.Xdefaults")) (locate-data-file "sample.Xdefaults")] - ["Sample enriched" (find-file (locate-data-file "enriched.doc")) (locate-data-file "enriched.doc")]) + ("XEmacs %_FAQ" + ["%_FAQ (local)" xemacs-local-faq] + ["FAQ via %_WWW" xemacs-www-faq (boundp 'browse-url-browser-function)] + ["%_Home Page" xemacs-www-page (boundp 'browse-url-browser-function)]) + ("%_Samples" + ["Sample .%_emacs" (find-file (locate-data-file "sample.emacs")) (locate-data-file "sample.emacs")] + ["Sample .%_Xdefaults" (find-file (locate-data-file "sample.Xdefaults")) (locate-data-file "sample.Xdefaults")] + ["Sample e%_nriched" (find-file (locate-data-file "enriched.doc")) (locate-data-file "enriched.doc")]) "-----" - ("Lookup in Info" - ["Key Binding..." Info-goto-emacs-key-command-node] - ["Command..." Info-goto-emacs-command-node] - ["Function..." Info-elisp-ref] - ["Topic..." Info-query]) - ("Manuals" - ["Info" info] - ["Unix Manual..." manual-entry]) - ("Commands & Keys" - ["Mode" describe-mode] - ["Apropos..." hyper-apropos] - ["Apropos Docs..." apropos-documentation] + ("Lookup in %_Info" + ["%_Key Binding..." Info-goto-emacs-key-command-node] + ["%_Command..." Info-goto-emacs-command-node] + ["%_Function..." Info-elisp-ref] + ["%_Topic..." Info-query]) + ("%_Manuals" + ["%_Info" info] + ["%_Unix Manual..." manual-entry]) + ("%_Commands & Keys" + ["%_Mode" describe-mode] + ["%_Apropos..." hyper-apropos] + ["Apropos %_Docs..." apropos-documentation] "-----" - ["Key..." describe-key] - ["Bindings" describe-bindings] - ["Mouse Bindings" describe-pointer] - ["Recent Keys" view-lossage] + ["%_Key..." describe-key] + ["%_Bindings" describe-bindings] + ["%_Mouse Bindings" describe-pointer] + ["%_Recent Keys" view-lossage] "-----" - ["Function..." describe-function] - ["Variable..." describe-variable] - ["Locate Command..." where-is]) + ["%_Function..." describe-function] + ["%_Variable..." describe-variable] + ["%_Locate Command..." where-is]) "-----" - ["Recent Messages" view-lossage] - ("Misc" - ["No Warranty" describe-no-warranty] - ["XEmacs License" describe-copying] - ["The Latest Version" describe-distribution]) - ["Send Bug Report..." report-emacs-bug + ["%_Recent Messages" view-lossage] + ("%_Misc" + ["%_No Warranty" describe-no-warranty] + ["XEmacs %_License" describe-copying] + ["The Latest %_Version" describe-distribution]) + ["%_Send Bug Report..." report-emacs-bug :active (fboundp 'report-emacs-bug)])))) (defun maybe-add-init-button () "Don't call this. Adds `Load .emacs' button to menubar when starting up with -q." - ;; by Stig@hackvan.com - (cond - (load-user-init-file-p nil) - ((file-exists-p (expand-file-name ".emacs" "~")) - (add-menu-button nil - ["Load .emacs" - (progn (delete-menu-item '("Load .emacs")) - (load-user-init-file)) - ] - "Help")) - (t nil))) + (when (and (not load-user-init-file-p) + (file-exists-p (expand-file-name ".emacs" "~"))) + (add-menu-button + nil + ["%_Load .emacs" + (progn + (mapc #'(lambda (buf) + (with-current-buffer buf + (delete-menu-item '("Load .emacs")))) + (buffer-list)) + (load-user-init-file)) + ] + "Help"))) (add-hook 'before-init-hook 'maybe-add-init-button) @@ -1015,34 +1425,34 @@ Adds `Load .emacs' button to menubar when starting up with -q." bookmark-alist t))) `(,(if definedp - '("Jump to Bookmark" + '("%_Jump to Bookmark" :filter (lambda (&rest junk) (mapcar #'(lambda (bmk) `[,bmk (bookmark-jump ',bmk)]) (bookmark-all-names)))) - ["Jump to Bookmark" nil nil]) - ["Set bookmark" bookmark-set + ["%_Jump to Bookmark" nil nil]) + ["Set %_Bookmark" bookmark-set :active (fboundp 'bookmark-set)] "---" - ["Insert contents" bookmark-menu-insert + ["Insert %_Contents" bookmark-menu-insert :active (fboundp 'bookmark-menu-insert)] - ["Insert location" bookmark-menu-locate + ["Insert L%_ocation" bookmark-menu-locate :active (fboundp 'bookmark-menu-locate)] "---" - ["Rename bookmark" bookmark-menu-rename + ["%_Rename Bookmark" bookmark-menu-rename :active (fboundp 'bookmark-menu-rename)] ,(if definedp - '("Delete Bookmark" + '("%_Delete Bookmark" :filter (lambda (&rest junk) (mapcar #'(lambda (bmk) `[,bmk (bookmark-delete ',bmk)]) (bookmark-all-names)))) - ["Delete Bookmark" nil nil]) - ["Edit Bookmark List" bookmark-bmenu-list ,definedp] + ["%_Delete Bookmark" nil nil]) + ["%_Edit Bookmark List" bookmark-bmenu-list ,definedp] "---" - ["Save bookmarks" bookmark-save ,definedp] - ["Save bookmarks as..." bookmark-write ,definedp] - ["Load a bookmark file" bookmark-load + ["%_Save Bookmarks" bookmark-save ,definedp] + ["Save Bookmarks %_As..." bookmark-write ,definedp] + ["%_Load a Bookmark File" bookmark-load :active (fboundp 'bookmark-load)]))) ;;; The Buffers menu @@ -1051,6 +1461,8 @@ Adds `Load .emacs' button to menubar when starting up with -q." "Customization of `Buffers' menu." :group 'menu) +(defvar buffers-menu-omit-chars-list '(?b ?p ?l)) + (defcustom buffers-menu-max-size 25 "*Maximum number of entries which may appear on the \"Buffers\" menu. If this is 10, then only the ten most-recently-selected buffers will be @@ -1096,11 +1508,22 @@ begins with a space)." :group 'buffers-menu) (defcustom buffers-menu-format-buffer-line-function 'format-buffers-menu-line - "*The function to call to return a string to represent a buffer in the -buffers menu. The function is passed a buffer and should return a string. -The default value `format-buffers-menu-line' just returns the name of -the buffer. Also check out `slow-format-buffers-menu-line' which -returns a whole bunch of info about a buffer." + "*The function to call to return a string to represent a buffer in +the buffers menu. The function is passed a buffer and a number +(starting with 1) indicating which buffer line in the menu is being +processed and should return a string containing an accelerator +spec. (Check out `menu-item-generate-accelerator-spec' as a convenient +way of generating the accelerator specs.) The default value +`format-buffers-menu-line' just returns the name of the buffer and +uses the number as the accelerator. Also check out +`slow-format-buffers-menu-line' which returns a whole bunch of info +about a buffer. + +Note: Gross Compatibility Hack: Older versions of this function prototype +only expected one argument, not two. We deal gracefully with such +functions by simply calling them with one argument and leaving out the +line number. However, this may go away at any time, so make sure to +update all of your functions of this type." :type 'function :group 'buffers-menu) @@ -1131,11 +1554,6 @@ for `buffers-menu-sort-function'." function) :group 'buffers-menu) -(defun buffers-menu-omit-invisible-buffers (buf) - "For use as a value of `buffers-menu-omit-function'. -Omits normally invisible buffers (those whose name begins with a space)." - (not (null (string-match "\\` " (buffer-name buf))))) - (defun sort-buffers-menu-alphabetically (buf1 buf2) "For use as a value of `buffers-menu-sort-function'. Sorts the buffers in alphabetical order by name, but puts buffers beginning @@ -1178,21 +1596,25 @@ beginning with a star at the end of the list." (string-lessp nam1 nam2))))) ;; this version is too slow on some machines. -(defun slow-format-buffers-menu-line (buffer) +;; (vintage 1990, that is) +(defun slow-format-buffers-menu-line (buffer n) "For use as a value of `buffers-menu-format-buffer-line-function'. This returns a string containing a bunch of info about the buffer." - (format "%s%s %-19s %6s %-15s %s" - (if (buffer-modified-p buffer) "*" " ") - (if (symbol-value-in-buffer 'buffer-read-only buffer) "%" " ") - (buffer-name buffer) - (buffer-size buffer) - (symbol-value-in-buffer 'mode-name buffer) - (or (buffer-file-name buffer) ""))) - -(defun format-buffers-menu-line (buffer) + (concat (menu-item-generate-accelerator-spec n buffers-menu-omit-chars-list) + (format "%s%s %-19s %6s %-15s %s" + (if (buffer-modified-p buffer) "*" " ") + (if (symbol-value-in-buffer 'buffer-read-only buffer) + "%" " ") + (buffer-name buffer) + (buffer-size buffer) + (symbol-value-in-buffer 'mode-name buffer) + (or (buffer-file-name buffer) "")))) + +(defun format-buffers-menu-line (buffer n) "For use as a value of `buffers-menu-format-buffer-line-function'. This just returns the buffer's name." - (buffer-name buffer)) + (concat (menu-item-generate-accelerator-spec n buffers-menu-omit-chars-list) + (buffer-name buffer))) (defun group-buffers-menu-by-mode-then-alphabetically (buf1 buf2) "For use as a value of `buffers-menu-grouping-function'. @@ -1221,36 +1643,41 @@ This groups buffers by major mode. It only really makes sense if (buffer-name (current-buffer))))))) (defsubst build-buffers-menu-internal (buffers) - (let (name line) + (let (name line (n 0)) (mapcar #'(lambda (buffer) (if (eq buffer t) "---" - (setq line (funcall buffers-menu-format-buffer-line-function - buffer)) + (setq n (1+ n)) + (setq line + ; #### a truly Kyle-friendly hack. + (let ((fn buffers-menu-format-buffer-line-function)) + (if (= (function-max-args fn) 1) + (funcall fn buffer) + (funcall fn buffer n)))) (if complex-buffers-menu-p (delq nil (list line - (vector "Switch to Buffer" + (vector "S%_witch to Buffer" (list buffers-menu-switch-to-buffer-function (setq name (buffer-name buffer))) t) (if (eq buffers-menu-switch-to-buffer-function 'switch-to-buffer) - (vector "Switch to Buffer, Other Frame" + (vector "Switch to Buffer, Other %_Frame" (list 'switch-to-buffer-other-frame (setq name (buffer-name buffer))) t) nil) (if (and (buffer-modified-p buffer) (buffer-file-name buffer)) - (vector "Save Buffer" + (vector "%_Save Buffer" (list 'buffer-menu-save-buffer name) t) - ["Save Buffer" nil nil] + ["%_Save Buffer" nil nil] ) - (vector "Save As..." + (vector "Save %_As..." (list 'buffer-menu-write-file name) t) - (vector "Delete Buffer" (list 'kill-buffer name) + (vector "%_Delete Buffer" (list 'kill-buffer name) t))) ;; #### We don't want buffer names to be translated, ;; #### so we put the buffer name in the suffix. @@ -1323,10 +1750,13 @@ items by redefining the function `format-buffers-menu-line'." (defun language-environment-menu-filter (menu) "This is the menu filter for the \"Language Environment\" submenu." - (mapcar (lambda (env-sym) - `[ ,(capitalize (symbol-name env-sym)) - (set-language-environment ',env-sym)]) - language-environment-list)) + (let ((n 0)) + (mapcar (lambda (env-sym) + (setq n (1+ n)) + `[ ,(concat (menu-item-generate-accelerator-spec n) + (capitalize (symbol-name env-sym))) + (set-language-environment ',env-sym)]) + language-environment-list))) ;;; The Options menu @@ -1385,24 +1815,24 @@ If this is a relative filename, it is put into the same directory as your (defconst default-popup-menu '("XEmacs Commands" - ["Undo" advertised-undo + ["%_Undo" advertised-undo :active (and (not (eq buffer-undo-list t)) (or buffer-undo-list pending-undo-list)) :suffix (if (or (eq last-command 'undo) (eq last-command 'advertised-undo)) "More" "")] - ["Cut" kill-primary-selection + ["Cu%_t" kill-primary-selection :active (selection-owner-p)] - ["Copy" copy-primary-selection + ["%_Copy" copy-primary-selection :active (selection-owner-p)] - ["Paste" yank-clipboard-selection + ["%_Paste" yank-clipboard-selection :active (selection-exists-p 'CLIPBOARD)] - ["Clear" delete-primary-selection + ["%_Delete" delete-primary-selection :active (selection-owner-p)] "-----" - ["Select Block" mark-paragraph] - ["Split Window" split-window-vertically] - ["Unsplit Window" delete-other-windows] + ["Select %_Block" mark-paragraph] + ["Sp%_lit Window" split-window-vertically] + ["U%_nsplit Window" delete-other-windows] )) (defvar global-popup-menu nil @@ -1469,9 +1899,9 @@ The menu is computed by combining `global-popup-menu' and `mode-popup-menu'." (error "Pointer must be in a normal window")) (select-window window) (if current-menubar - (setq bmenu (assoc "Buffers" current-menubar))) + (setq bmenu (assoc "%_Buffers" current-menubar))) (if (null bmenu) - (setq bmenu (assoc "Buffers" default-menubar))) + (setq bmenu (assoc "%_Buffers" default-menubar))) (if (null bmenu) (error "Can't find the Buffers menu")) (popup-menu bmenu))) @@ -1486,12 +1916,12 @@ The menu is computed by combining `global-popup-menu' and `mode-popup-menu'." (error "Pointer must be in a normal window")) (select-window window) (and current-menubar (run-hooks 'activate-menubar-hook)) - ;; ##### Instead of having to copy this just to safely get rid of + ;; #### Instead of having to copy this just to safely get rid of ;; any nil what we should really do is fix up the internal menubar ;; code to just ignore nil if generating a popup menu (setq popup-menubar (delete nil (copy-sequence (or current-menubar default-menubar)))) - (popup-menu (cons "Menubar Menu" popup-menubar)) + (popup-menu (cons "%_Menubar Menu" popup-menubar)) )) (global-set-key 'button3 'popup-mode-menu) diff --git a/lisp/menubar.el b/lisp/menubar.el index a2f84d5..3b58c86 100644 --- a/lisp/menubar.el +++ b/lisp/menubar.el @@ -128,19 +128,6 @@ See `current-menubar' for a description of the syntax of a menubar." menuitem))) (setq plistp (or (>= L 5) (and (> L 2) (keywordp (aref menuitem 2))))) - (or (stringp (aref menuitem 0)) - (signal 'error - (list - "first element of a button must be a string (the label)" - menuitem))) - (or plistp - (< L 4) - (null (aref menuitem 3)) - (stringp (aref menuitem 3)) - (signal 'error - (list - "fourth element of a button must be a string (the label suffix)" - menuitem))) (if plistp (let ((i 2) selp diff --git a/lisp/minibuf.el b/lisp/minibuf.el index c997510..342f5bd 100644 --- a/lisp/minibuf.el +++ b/lisp/minibuf.el @@ -1,8 +1,8 @@ ;;; minibuf.el --- Minibuffer functions for XEmacs ;; Copyright (C) 1992, 1993, 1994, 1997 Free Software Foundation, Inc. -;; Copyright (C) 1995 Tinker Systems -;; Copyright (C) 1995, 1996 Ben Wing +;; Copyright (C) 1995 Tinker Systems. +;; Copyright (C) 1995, 1996, 2000 Ben Wing. ;; Author: Richard Mlynarik ;; Created: 2-Oct-92 @@ -111,8 +111,12 @@ minibuffer is reinvoked while it is the selected window." ;(defvar minibuffer-setup-hook nil ; "Normal hook run just after entry to minibuffer.") +;; see comment at list-mode-hook. +(put 'minibuffer-setup-hook 'permanent-local t) + (defvar minibuffer-exit-hook nil "Normal hook run just after exit from minibuffer.") +(put 'minibuffer-exit-hook 'permanent-local t) (defvar minibuffer-help-form nil "Value that `help-form' takes on inside the minibuffer.") @@ -608,7 +612,7 @@ See also the variable completion-highlight-first-word-only for control over ;; Used by minibuffer-do-completion -(defvar last-exact-completion) +(defvar last-exact-completion nil) (defun temp-minibuffer-message (m) (let ((savemax (point-max))) @@ -1446,7 +1450,10 @@ Prompts with PROMPT. By default, return DEFAULT-VALUE." Prompts with PROMPT. By default, return DEFAULT-VALUE. A user variable is one whose documentation starts with a `*' character." (intern (completing-read prompt obarray 'user-variable-p t nil - 'variable-history default-value))) + 'variable-history + (if (symbolp default-value) + (symbol-name default-value) + default-value)))) (defun read-buffer (prompt &optional default require-match) "Read the name of a buffer and return as a string. @@ -1638,30 +1645,24 @@ If DEFAULT-VALUE is non-nil, return that if user enters an empty ;; this calls read-file-name-2 (mouse-read-file-name-1 history prompt dir default must-match initial-contents completer) - (let ((rfhookfun - (lambda () - ;; #### SCREAM! Create a `file-system-ignore-case' - ;; function, so this kind of stuff is generalized! - (and (eq system-type 'windows-nt) - (set (make-local-variable 'completion-ignore-case) t)) - (set - (make-local-variable - 'completion-display-completion-list-function) - #'(lambda (completions) - (display-completion-list - completions - :user-data (not (eq completer 'read-file-name-internal)) - :activate-callback - 'read-file-name-activate-callback))) - ;; kludge! - (remove-hook 'minibuffer-setup-hook rfhookfun) - ))) - (unwind-protect - (progn - (add-hook 'minibuffer-setup-hook rfhookfun) - (read-file-name-2 history prompt dir default must-match - initial-contents completer)) - (remove-hook 'minibuffer-setup-hook rfhookfun))))) + (add-one-shot-hook + 'minibuffer-setup-hook + (lambda () + ;; #### SCREAM! Create a `file-system-ignore-case' + ;; function, so this kind of stuff is generalized! + (and (eq system-type 'windows-nt) + (set (make-local-variable 'completion-ignore-case) t)) + (set + (make-local-variable + 'completion-display-completion-list-function) + #'(lambda (completions) + (display-completion-list + completions + :user-data (not (eq completer 'read-file-name-internal)) + :activate-callback + 'read-file-name-activate-callback))))) + (read-file-name-2 history prompt dir default must-match + initial-contents completer))) (defun read-file-name (prompt &optional dir default must-match initial-contents @@ -1925,18 +1926,38 @@ whether it is a file(/result) or a directory (/result/)." result) (t file)))) +(defun mouse-rfn-setup-vars (prompt) + ;; a specifier would be nice. + (set (make-local-variable 'frame-title-format) + (capitalize-string-as-title + ;; Delete ": " off the end. There must be an easier way! + (let ((end-pos (length prompt))) + (if (and (> end-pos 0) (eq (aref prompt (1- end-pos)) ? )) + (setq end-pos (1- end-pos))) + (if (and (> end-pos 0) (eq (aref prompt (1- end-pos)) ?:)) + (setq end-pos (1- end-pos))) + (substring prompt 0 end-pos)))) + ;; ensure that killing the frame works right, + ;; instead of leaving us in the minibuffer. + (add-local-hook 'delete-frame-hook + #'(lambda (frame) + (abort-recursive-edit)))) + (defun mouse-file-display-completion-list (window dir minibuf user-data) (let ((standard-output (window-buffer window))) (condition-case nil (display-completion-list (directory-files dir nil nil nil t) - :window-width (* 2 (window-width window)) + :window-width (window-width window) + :window-height (window-text-area-height window) + :completion-string "" :activate-callback 'mouse-read-file-name-activate-callback :user-data user-data :reference-buffer minibuf :help-string "") - (t nil)))) + (t nil)) + )) (defun mouse-directory-display-completion-list (window dir minibuf user-data) (let ((standard-output (window-buffer window))) @@ -1944,21 +1965,25 @@ whether it is a file(/result) or a directory (/result/)." (display-completion-list (delete "." (directory-files dir nil nil nil 1)) :window-width (window-width window) + :window-height (window-text-area-height window) + :completion-string "" :activate-callback 'mouse-read-file-name-activate-callback :user-data user-data :reference-buffer minibuf :help-string "") - (t nil)))) + (t nil)) + )) (defun mouse-read-file-name-activate-callback (event extent user-data) (let* ((file (extent-string extent)) (minibuf (symbol-value-in-buffer 'completion-reference-buffer (extent-object extent))) - (in-dir (buffer-substring nil nil minibuf)) + (ministring (buffer-substring nil nil minibuf)) + (in-dir (file-name-directory ministring)) (full (expand-file-name file in-dir)) (filebuf (nth 0 user-data)) - (dirbuff (nth 1 user-data)) + (dirbuf (nth 1 user-data)) (filewin (nth 2 user-data)) (dirwin (nth 3 user-data))) (if (file-regular-p full) @@ -1967,29 +1992,34 @@ whether it is a file(/result) or a directory (/result/)." (insert-string (file-name-as-directory (abbreviate-file-name full t)) minibuf) (reset-buffer filebuf) - (if (not dirbuff) + (if (not dirbuf) (mouse-directory-display-completion-list filewin full minibuf user-data) (mouse-file-display-completion-list filewin full minibuf user-data) - (reset-buffer dirbuff) + (reset-buffer dirbuf) (mouse-directory-display-completion-list dirwin full minibuf user-data))))) -;; this is rather cheesified but gets the job done. +;; our cheesy but god-awful time consuming file dialog box implementation. +;; this will be replaced with use of the native file dialog box (when +;; available). (defun mouse-read-file-name-1 (history prompt dir default - must-match initial-contents - completer) + must-match initial-contents + completer) + ;; file-p is t if we're reading files, nil if directories. (let* ((file-p (eq 'read-file-name-internal completer)) (filebuf (get-buffer-create "*Completions*")) - (dirbuff (and file-p (generate-new-buffer " *mouse-read-file*"))) - (butbuff (generate-new-buffer " *mouse-read-file*")) + (dirbuf (and file-p (generate-new-buffer " *mouse-read-file*"))) + (butbuf (generate-new-buffer " *mouse-read-file*")) (frame (make-dialog-frame)) filewin dirwin user-data) (unwind-protect (progn (reset-buffer filebuf) - (select-frame frame) + + ;; set up the frame. + (focus-frame frame) (let ((window-min-height 1)) ;; #### should be 2 not 3, but that causes ;; "window too small to split" errors for some @@ -2002,16 +2032,80 @@ whether it is a file(/result) or a directory (/result/)." (setq filewin (frame-rightmost-window frame) dirwin (frame-leftmost-window frame)) (set-window-buffer filewin filebuf) - (set-window-buffer dirwin dirbuff)) + (set-window-buffer dirwin dirbuf)) (setq filewin (frame-highest-window frame)) (set-window-buffer filewin filebuf)) - (setq user-data (list filebuf dirbuff filewin dirwin)) - (set-window-buffer (frame-lowest-window frame) butbuff) - (set-buffer butbuff) + (setq user-data (list filebuf dirbuf filewin dirwin)) + (set-window-buffer (frame-lowest-window frame) butbuf) + + ;; set up completion buffers. + (let ((rfcshookfun + ;; kludge! + ;; #### I really need to flesh out the object + ;; hierarchy better to avoid these kludges. + ;; (?? I wrote this comment above some time ago, + ;; and I don't understand what I'm referring to + ;; any more. --ben + (lambda () + (mouse-rfn-setup-vars prompt) + (when (featurep 'scrollbar) + (set-specifier scrollbar-width 0 (current-buffer))) + (setq truncate-lines t)))) + + (set-buffer filebuf) + (add-local-hook 'completion-setup-hook rfcshookfun) + (when file-p + (set-buffer dirbuf) + (add-local-hook 'completion-setup-hook rfcshookfun))) + + ;; set up minibuffer. + (add-one-shot-hook + 'minibuffer-setup-hook + (lambda () + (if (not file-p) + (mouse-directory-display-completion-list + filewin dir (current-buffer) user-data) + (mouse-file-display-completion-list + filewin dir (current-buffer) user-data) + (mouse-directory-display-completion-list + dirwin dir (current-buffer) user-data)) + (set + (make-local-variable + 'completion-display-completion-list-function) + (lambda (completions) + (display-completion-list + completions + :help-string "" + :window-width (window-width filewin) + :window-height (window-text-area-height filewin) + :completion-string "" + :activate-callback + 'mouse-read-file-name-activate-callback + :user-data user-data))) + (mouse-rfn-setup-vars prompt) + (save-selected-window + ;; kludge to ensure the frame title is correct. + ;; the minibuffer leaves the frame title the way + ;; it was before (i.e. of the selected window before + ;; the dialog box was opened), so to get it correct + ;; we have to be tricky. + (select-window filewin) + (redisplay-frame nil t) + ;; #### another kludge. sometimes the focus ends up + ;; back in the main window, not the dialog box. it + ;; occurs randomly and it's not possible to reliably + ;; reproduce. We try to fix it by draining non-user + ;; events and then setting the focus back on the frame. + (sit-for 0 t) + (focus-frame frame)))) + + ;; set up button buffer. + (set-buffer butbuf) + (mouse-rfn-setup-vars prompt) (when dir (setq default-directory dir)) (when (featurep 'scrollbar) - (set-specifier scrollbar-width 0 butbuff)) + (set-specifier scrollbar-width 0 butbuf)) (insert " ") (insert-gui-button (make-gui-button "OK" (lambda (foo) @@ -2020,51 +2114,20 @@ whether it is a file(/result) or a directory (/result/)." (insert-gui-button (make-gui-button "Cancel" (lambda (foo) (abort-recursive-edit)))) - (let ((rfhookfun - (lambda () - (if (not file-p) - (mouse-directory-display-completion-list - filewin dir (current-buffer) user-data) - (mouse-file-display-completion-list filewin dir - (current-buffer) - user-data) - (mouse-directory-display-completion-list dirwin dir - (current-buffer) - user-data)) - (set - (make-local-variable - 'completion-display-completion-list-function) - #'(lambda (completions) - (display-completion-list - completions - :help-string "" - :activate-callback - 'mouse-read-file-name-activate-callback - :user-data user-data))) - ;; kludge! - (remove-hook 'minibuffer-setup-hook rfhookfun) - )) - (rfcshookfun - ;; kludge! - ;; #### I really need to flesh out the object - ;; hierarchy better to avoid these kludges. - (lambda () - (save-excursion - (set-buffer standard-output) - (setq truncate-lines t))))) - (unwind-protect - (progn - (add-hook 'minibuffer-setup-hook rfhookfun) - (add-hook 'completion-setup-hook rfcshookfun) - (read-file-name-2 history prompt dir default - must-match initial-contents - completer)) - (remove-hook 'minibuffer-setup-hook rfhookfun) - (remove-hook 'completion-setup-hook rfcshookfun)))) + + ;; now start reading filename. + (read-file-name-2 history prompt dir default + must-match initial-contents + completer)) + + ;; always clean up. + ;; get rid of our hook that calls abort-recursive-edit -- not a good + ;; idea here. + (kill-local-variable 'delete-frame-hook) (delete-frame frame) (kill-buffer filebuf) - (kill-buffer butbuff) - (and dirbuff (kill-buffer dirbuff))))) + (kill-buffer butbuf) + (and dirbuf (kill-buffer dirbuf))))) (defun read-face (prompt &optional must-match) "Read the name of a face from the minibuffer and return it as a symbol." diff --git a/lisp/msw-glyphs.el b/lisp/msw-glyphs.el index aa4db3e..de2823a 100644 --- a/lisp/msw-glyphs.el +++ b/lisp/msw-glyphs.el @@ -30,11 +30,24 @@ ;; Initialization code for MS Windows glyphs. ;; This file is dumped with XEmacs (when MS Windows support is -;; compiled in). +;; compiled in). Make sure this is the first of msw-*.el files +;; dumped. ;;; Code: +(defun msgdi-device-p (&optional device) + "Return non-nil if DEVICE is a GDI device, that is 'mswindows or 'msprinter. +MS GDI devices are mutuially WYSIWIG-compatible, so that many common glyph, +color and font properties apply to them equally. + +This function is also a predicate for 'msgdi device tag, matching this +device class." + (memq (device-type device) '(mswindows msprinter))) + (progn + + (define-specifier-tag 'msgdi (function msgdi-device-p)) + (set-console-type-image-conversion-list 'mswindows `(("\\.bmp\\'" [bmp :file nil] 2) @@ -59,11 +72,14 @@ ;; strings are not allowed so they will be ignored. ("" [nothing]))) + (set-console-type-image-conversion-list + 'msprinter (console-type-image-conversion-list 'mswindows)) + (set-face-font 'border-glyph "WingDings:Regular:11::Symbol" - 'global 'mswindows) - (set-glyph-image continuation-glyph "\xC3" 'global 'mswindows) - (set-glyph-image truncation-glyph "\xF0" 'global 'mswindows) - (set-glyph-image hscroll-glyph "\xEF" 'global 'mswindows) + 'global 'msgdi) + (set-glyph-image continuation-glyph "\xC3" 'global 'msgdi) + (set-glyph-image truncation-glyph "\xF0" 'global 'msgdi) + (set-glyph-image hscroll-glyph "\xEF" 'global 'msgdi) (set-glyph-image octal-escape-glyph "\\") (set-glyph-image control-arrow-glyph "^") @@ -78,11 +94,11 @@ (if emacs-beta-version "xemacs-beta.xpm" "xemacs.xpm")) - 'global 'mswindows)) + 'global 'msgdi)) (t (set-glyph-image xemacs-logo "XEmacs " - 'global 'mswindows))) + 'global 'msgdi))) ) ;;; msw-glyphs.el ends here diff --git a/lisp/msw-init.el b/lisp/msw-init.el index de7d823..aef2101 100644 --- a/lisp/msw-init.el +++ b/lisp/msw-init.el @@ -47,6 +47,7 @@ (if (featurep 'infodock) (require 'id-x-toolbar) (init-x-toolbar))) + (if (featurep 'gutter) (init-gutter)) (add-hook 'zmacs-deactivate-region-hook (lambda () (if (console-on-window-system-p) @@ -61,13 +62,15 @@ (activate-region-as-selection)))) ;; Old-style mswindows bindings. The new-style mswindows bindings ;; (namely Ctrl-X, Ctrl-C and Ctrl-V) are already spoken for by XEmacs. - (define-key global-map '(shift delete) 'kill-primary-selection) - (define-key global-map '(control delete) 'delete-primary-selection) - (define-key global-map '(shift insert) 'yank-clipboard-selection) - (define-key global-map '(control insert) 'copy-primary-selection) + (global-set-key '(shift delete) 'kill-primary-selection) + (global-set-key '(control delete) 'delete-primary-selection) + (global-set-key '(shift insert) 'yank-clipboard-selection) + (global-set-key '(control insert) 'copy-primary-selection) + + (global-set-key '(meta f4) 'save-buffers-kill-emacs) ;; Random stuff - (define-key global-map 'menu 'popup-mode-menu) + (global-set-key 'menu 'popup-mode-menu) (setq mswindows-post-win-initted t))) diff --git a/lisp/mule/auto-autoloads.el b/lisp/mule/auto-autoloads.el index eaed7c8..54ca28f 100644 --- a/lisp/mule/auto-autoloads.el +++ b/lisp/mule/auto-autoloads.el @@ -4,7 +4,7 @@ ;;;### (autoloads (ccl-execute-with-args check-ccl-program define-ccl-program declare-ccl-program ccl-dump ccl-compile ccl-program-p) "mule-ccl" "mule/mule-ccl.el") (autoload 'ccl-program-p "mule-ccl" "\ -T if OBJECT is a valid CCL compiled code." nil nil) +Return t if OBJECT is a valid CCL compiled code." nil nil) (autoload 'ccl-compile "mule-ccl" "\ Return a compiled code of CCL-PROGRAM as a vector of integer." nil nil) diff --git a/lisp/mule/mule-charset.el b/lisp/mule/mule-charset.el index 7758dec..9dd8fef 100644 --- a/lisp/mule/mule-charset.el +++ b/lisp/mule/mule-charset.el @@ -249,4 +249,13 @@ DESCRIPTION (string) is the description string of the charset." (defalias 'charset-plist 'object-plist) (defalias 'set-charset-plist 'setplist) +;; Setup auto-fill-chars for charsets that should invoke auto-filling. +;; SPACE and NEWLIE are already set. +(let ((l '(katakana-jisx0201 + japanese-jisx0208 japanese-jisx0212 + chinese-gb2312 chinese-big5-1 chinese-big5-2))) + (while l + (put-char-table (car l) t auto-fill-chars) + (setq l (cdr l)))) + ;;; mule-charset.el ends here diff --git a/lisp/mule/mule-cmds.el b/lisp/mule/mule-cmds.el index c6e689f..1222b27 100644 --- a/lisp/mule/mule-cmds.el +++ b/lisp/mule/mule-cmds.el @@ -162,9 +162,9 @@ This sets the following coding systems: ;; that they could reset the terminal coding system. ;; (unless (and (eq window-system 'pc) coding-system) ;; (setq default-terminal-coding-system coding-system)) - (setq terminal-coding-system coding-system) + (set-terminal-coding-system coding-system) ;;(setq default-keyboard-coding-system coding-system) - (setq keyboard-coding-system coding-system) + (set-keyboard-coding-system coding-system) ;;(setq default-process-coding-system (cons coding-system coding-system)) ;; Refer to coding-system-for-read and coding-system-for-write ;; so that C-x RET c works. diff --git a/lisp/multicast.el b/lisp/multicast.el index cfedfde..efd3f80 100644 --- a/lisp/multicast.el +++ b/lisp/multicast.el @@ -1,25 +1,25 @@ ;;; multicast.el --- lisp frontend for multicast connections in XEmacs -;; Copyright (C) 1997-1998 Didier Verna. +;; Copyright (C) 1997-2000 Didier Verna. -;; Author: Didier Verna -;; Maintainer: Didier Verna -;; Created: Thu Dec 4 16:37:39 1997 +;; Author: Didier Verna +;; Maintainer: Didier Verna +;; Created: Thu Dec 4 16:37:39 1997 ;; Last Revision: Mon Jan 19 19:10:50 1998 ;; Current Version: 0.4 ;; Keywords: dumped comm processes -;; This file is part of XEmacs. +;; This file is part of XEmacs. ;; XEmacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2 of the License, or -;; (at your option) any later version. +;; (at your option) any later version. ;; XEmacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. +;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; if not, write to the Free Software @@ -60,7 +60,7 @@ ADDRESS specifies a standard multicast address \"dest/port/ttl\": ttl is the time-to-live (15 for site, 63 for region and 127 for world). WARNING: it is *strongly* recommended to avoid using groups beginning with - 224 or 239. Such groups are considered 'admin' groups, and may + 224 or 239. Such groups are considered 'admin' groups, and may behave in a surprising way ..." (let (dest port ttl) ;; We check only the general form of the multicast address. @@ -77,5 +77,5 @@ WARNING: it is *strongly* recommended to avoid using groups beginning with (error "invalid ttl specification.")) (open-multicast-group-internal name buffer dest port ttl) )) - + ;;; multicast.el ends here diff --git a/lisp/package-get.el b/lisp/package-get.el index 587ea39..eb395a9 100644 --- a/lisp/package-get.el +++ b/lisp/package-get.el @@ -68,7 +68,7 @@ ;; vm - a mail reader ;; [] Always install ;; [] Needs updating -;; [] Required by other [packages] +;; [] Required by other [packages] ;; ;; Where `[]' indicates a toggle box ;; @@ -79,7 +79,7 @@ ;; - "Required by other" means some other packages are going to force ;; this to be installed. Clicking on [packages] gives a list ;; of packages that require this. -;; +;; ;; The `package-get-base' should be installed in a file in ;; `data-directory'. The `package-get-here' should be installed in ;; site-lisp. Both are then read at run time. @@ -113,7 +113,7 @@ :prefix "package-get" :group 'package-tools) -;;;###autoload +;;;###autoload (defvar package-get-base nil "List of packages that are installed at this site. For each element in the alist, car is the package name and the cdr is @@ -288,7 +288,8 @@ When nil, updates which are not PGP signed are allowed without confirmation." `(if (member (quote ,(cdr site)) package-get-remote) (setq package-get-remote - (delete (quote ,(cdr site)) package-get-remote)) + (delete (quote ,(cdr site)) + package-get-remote)) (package-ui-add-site (quote ,(cdr site)))) :style 'toggle :selected `(member (quote ,(cdr site)) @@ -373,7 +374,7 @@ if different." (setq location package-get-user-index-filename)) (when (y-or-n-p (concat "Update package index in " location "? ")) (write-file location)))))) - + ;;;###autoload (defun package-get-update-base (&optional db-file force-current) @@ -515,19 +516,18 @@ Query for a version if GET-VERSION is non-nil. Return package name as a symbol instead of a string if PACKAGE-SYMBOL is non-nil. The return value is suitable for direct passing to `interactive'." (package-get-require-base t) - (let ( (table (mapcar '(lambda (item) - (let ( (name (symbol-name (car item))) ) - (cons name name) - )) - package-get-base)) - package package-symbol default-version version) + (let ((table (mapcar #'(lambda (item) + (let ((name (symbol-name (car item)))) + (cons name name))) + package-get-base)) + package package-symbol default-version version) (save-window-excursion (setq package (completing-read "Package: " table nil t)) (setq package-symbol (intern package)) (if get-version (progn - (setq default-version - (package-get-info-prop + (setq default-version + (package-get-info-prop (package-get-info-version (package-get-info-find-package package-get-base package-symbol) nil) @@ -542,8 +542,7 @@ The return value is suitable for direct passing to `interactive'." ) (if package-symbol (list package-symbol) - (list package))) - ))) + (list package)))))) ;;;###autoload (defun package-get-delete-package (package &optional pkg-topdir) @@ -706,7 +705,7 @@ package is already installed. Valid values for CONFLICT are: INSTALL-DIR, if non-nil, specifies the package directory where fetched packages should be installed. -The value of `package-get-base' is used to determine what files should +The value of `package-get-base' is used to determine what files should be retrieved. The value of `package-get-remote' is used to determine where a package should be retrieved from. The sites are tried in order so one is better off listing easily reached sites first. @@ -814,7 +813,7 @@ successfully installed but errors occurred during initialization, or current-dir-entry current-filename)) ;; Get it (setq full-package-filename dest-filename) - (message "Retrieving package `%s' ..." + (message "Retrieving package `%s' ..." current-filename) (sit-for 0) (copy-file (package-get-remote-filename current-dir-entry @@ -900,7 +899,7 @@ returned. To access fields returned from this, use `package-get-info-version' to return information about particular a -version. Use `package-get-info-find-prop' to find particular property +version. Use `package-get-info-find-prop' to find particular property from a version returned by `package-get-info-version'." (interactive "xPackage list: \nsPackage Name: ") (if which @@ -912,7 +911,7 @@ from a version returned by `package-get-info-version'." (defun package-get-info-version (package version) "In PACKAGE, return the plist associated with a particular VERSION of the package. PACKAGE is typically as returned by - `package-get-info-find-package'. If VERSION is nil, then return the + `package-get-info-find-package'. If VERSION is nil, then return the first (aka most recent) version. Use `package-get-info-find-prop' to retrieve a particular property from the value returned by this." (interactive (package-get-interactive-package-query t t)) @@ -989,7 +988,7 @@ If (car search) is nil, (cadr search is interpreted as a local directory). (defun package-get-installedp (package version) "Determine if PACKAGE with VERSION has already been installed. -I'm not sure if I want to do this by searching directories or checking +I'm not sure if I want to do this by searching directories or checking some built in variables. For now, use packages-package-list." ;; Use packages-package-list which contains name and version (equal (plist-get @@ -1001,7 +1000,7 @@ some built in variables. For now, use packages-package-list." (defun package-get-package-provider (sym &optional force-current) "Search for a package that provides SYM and return the name and version. Searches in `package-get-base' for SYM. If SYM is a - consp, then it must match a corresponding (provide (SYM VERSION)) from + consp, then it must match a corresponding (provide (SYM VERSION)) from the package. If FORCE-CURRENT is non-nil make sure the database is up to date. This might @@ -1054,10 +1053,10 @@ lead to Emacs accessing remote sites." (defun package-get-ever-installed-p (pkg &optional notused) (string-match "-package$" (symbol-name pkg)) - (custom-initialize-set - pkg - (if (package-get-info-find-package - packages-package-list + (custom-initialize-set + pkg + (if (package-get-info-find-package + packages-package-list (intern (substring (symbol-name pkg) 0 (match-beginning 0)))) t))) diff --git a/lisp/package-ui.el b/lisp/package-ui.el index f471ae0..c349ca2 100644 --- a/lisp/package-ui.el +++ b/lisp/package-ui.el @@ -140,12 +140,12 @@ Set this to `nil' to use the `default' face." (defun pui-directory-exists (dir) "Check to see if DIR exists in `package-get-remote'." (let (found) - (mapcar '(lambda (item) - (if (and (null (car item)) - (string-equal (file-name-as-directory (car (cdr item))) - (file-name-as-directory dir))) - (setq found t)) - ) package-get-remote) + (mapcar #'(lambda (item) + (if (and (null (car item)) + (string-equal (file-name-as-directory (car (cdr item))) + (file-name-as-directory dir))) + (setq found t))) + package-get-remote) found )) @@ -358,11 +358,8 @@ and whether or not it is up-to-date." (save-window-excursion (with-output-to-temp-buffer tmpbuf (display-completion-list (sort - (mapcar '(lambda (pkg) - (symbol-name pkg) - ) - pui-deleted-packages) - 'string<) + (mapcar #'symbol-name pui-deleted-packages) + #'string<) :activate-callback nil :help-string "Packages selected for removal:\n" :completion-string t @@ -389,16 +386,12 @@ and whether or not it is up-to-date." ;; errors occur, which would normally be caused by display-buffer). (save-window-excursion (with-output-to-temp-buffer tmpbuf - (display-completion-list (sort - (mapcar '(lambda (pkg) - (symbol-name pkg) - ) - pui-selected-packages) - 'string<) - :activate-callback nil - :help-string "Packages selected for installation:\n" - :completion-string t - )) + (display-completion-list + (sort (mapcar #'symbol-name pui-selected-packages) #'string<) + :activate-callback nil + :help-string "Packages selected for installation:\n" + :completion-string t + )) (setq tmpbuf (get-buffer-create tmpbuf)) (display-buffer tmpbuf) (setq do-install (y-or-n-p "Install these packages? ")) @@ -618,67 +611,66 @@ Warning: No download sites specified. Package index may be out of date. ")) (insert sep-string) (setq start (point)) - (mapcar '(lambda (pkg) - (let (pkg-sym info version desc - b e extent current-vers disp) - (setq pkg-sym (car pkg) - info (package-get-info-version (cdr pkg) nil)) - (setq version (package-get-info-prop info 'version) - desc (package-get-info-prop info 'description)) - - (setq disp (pui-package-symbol-char pkg-sym - version)) - (setq b (point)) - (if pui-list-verbose - (progn - (setq current-vers (package-get-key pkg-sym :version)) - (cond - ( (not current-vers) - (setq current-vers "-----") ) - ( (stringp current-vers) - (setq current-vers - (format "%.2f" - (string-to-number current-vers))) ) - ( (numberp current-vers) - (setq current-vers (format "%.2f" current-vers)) ) - ) - (insert - (format "%s %-15s %-5.2f %-5s %s\n" - (car disp) pkg-sym - (if (stringp version) - (string-to-number version) - version) - current-vers desc)) -;; (insert -;; (format "\t\t %-12s %s\n" -;; (package-get-info-prop info 'author-version) -;; (package-get-info-prop info 'date) -;; )) - ) - (insert (format "%s %-15s %-5s %s\n" - (car disp) - pkg-sym version desc))) - (save-excursion - (setq e (progn - (forward-line -1) - (end-of-line) - (point))) - ) - (setq extent (make-extent b e)) - (if (car (cdr disp)) - (set-extent-face extent (get-face (car (cdr disp)))) - (set-extent-face extent (get-face 'default))) - (set-extent-property extent 'highlight t) - (set-extent-property extent 'pui t) - (set-extent-property extent 'pui-package pkg-sym) - (set-extent-property extent 'pui-info info) - (set-extent-property extent 'help-echo 'pui-help-echo) - (set-extent-property extent 'keymap pui-package-keymap) - )) (sort (copy-sequence package-get-base) - '(lambda (a b) - (string< (symbol-name (car a)) - (symbol-name (car b))) - ))) + (mapcar + #'(lambda (pkg) + (let (pkg-sym info version desc + b e extent current-vers disp) + (setq pkg-sym (car pkg) + info (package-get-info-version (cdr pkg) nil)) + (setq version (package-get-info-prop info 'version) + desc (package-get-info-prop info 'description)) + + (setq disp (pui-package-symbol-char pkg-sym + version)) + (setq b (point)) + (if pui-list-verbose + (progn + (setq current-vers (package-get-key pkg-sym :version)) + (cond + ( (not current-vers) + (setq current-vers "-----") ) + ( (stringp current-vers) + (setq current-vers + (format "%.2f" + (string-to-number current-vers))) ) + ( (numberp current-vers) + (setq current-vers (format "%.2f" current-vers)) ) + ) + (insert + (format "%s %-15s %-5.2f %-5s %s\n" + (car disp) pkg-sym + (if (stringp version) + (string-to-number version) + version) + current-vers desc)) + ;; (insert + ;; (format "\t\t %-12s %s\n" + ;; (package-get-info-prop info 'author-version) + ;; (package-get-info-prop info 'date))) + ) + (insert (format "%s %-15s %-5s %s\n" + (car disp) + pkg-sym version desc))) + (save-excursion + (setq e (progn + (forward-line -1) + (end-of-line) + (point)))) + (setq extent (make-extent b e)) + (if (car (cdr disp)) + (set-extent-face extent (get-face (car (cdr disp)))) + (set-extent-face extent (get-face 'default))) + (set-extent-property extent 'highlight t) + (set-extent-property extent 'pui t) + (set-extent-property extent 'pui-package pkg-sym) + (set-extent-property extent 'pui-info info) + (set-extent-property extent 'help-echo 'pui-help-echo) + (set-extent-property extent 'keymap pui-package-keymap) + )) + (sort (copy-sequence package-get-base) + #'(lambda (a b) + (string< (symbol-name (car a)) + (symbol-name (car b)))))) (insert sep-string) (insert (documentation 'list-packages-mode)) (set-buffer-modified-p nil) @@ -693,7 +685,7 @@ Warning: No download sites specified. Package index may be out of date. (add-submenu '() pui-menu) (setq mode-popup-menu pui-menu)) (clear-message) -; (message (substitute-command-keys "Press `\\[pui-help]' for help.")) + ;; (message (substitute-command-keys "Press `\\[pui-help]' for help.")) )) ;;;###autoload diff --git a/lisp/rect.el b/lisp/rect.el index f70149f..2393182 100644 --- a/lisp/rect.el +++ b/lisp/rect.el @@ -1,8 +1,8 @@ ;;; rect.el --- rectangle functions for XEmacs. -;; Copyright (C) 1985, 1993, 1994, 1999 Free Software Foundation, Inc. +;; Copyright (C) 1985-2000 Free Software Foundation, Inc. -;; Maintainer: Didier Verna +;; Maintainer: Didier Verna ;; Keywords: internal ;; This file is part of XEmacs. @@ -30,7 +30,7 @@ ;; in the XEmacs Reference Manual. ;; #### NOTE: this file has been almost completely rewritten by Didier Verna -;; , Jul 99. The purpose of this rewrite is to be less +;; , Jul 99. The purpose of this rewrite is to be less ;; intrusive and fill lines with whitespaces only when needed. A few functions ;; are untouched though, as noted above their definition. @@ -111,6 +111,31 @@ when the function is called." (forward-line 1))) )) + +(defun delete-rectangle-line (startcol endcol fill) + (let ((pt (point-at-eol))) + (when (= (move-to-column startcol (or fill 'coerce)) startcol) + (if (and (not fill) (<= pt endcol)) + (delete-region (point) pt) + ;; else + (setq pt (point)) + (move-to-column endcol t) + (delete-region pt (point)))) + )) + +;;;###autoload +(defun delete-rectangle (start end &optional fill) + "Delete the text in the region-rectangle without saving it. +The same range of columns is deleted in each line starting with the line +where the region begins and ending with the line where the region ends. + +When called from a program, the rectangle's corners are START and END. +With a prefix (or FILL) argument, also fill lines where nothing has to be +deleted." + (interactive "*r\nP") + (apply-on-rectangle 'delete-rectangle-line start end fill)) + + ;; I love ascii art ;-) (defconst spaces-strings '["" " " @@ -122,7 +147,6 @@ when the function is called." " " " "]) - ;; This function is untouched --dv (defun spaces-string (n) (if (<= n 8) (aref spaces-strings n) @@ -132,57 +156,6 @@ when the function is called." n (- n 8))) (concat val (aref spaces-strings n))))) -;;;###autoload -(defvar killed-rectangle nil - "Rectangle for `yank-rectangle' to insert.") - -;;;###autoload -(defun kill-rectangle (start end &optional fill) - "Delete the region-rectangle and save it as the last killed one. -You might prefer to use `delete-extract-rectangle' from a program. - -When called from a program, the rectangle's corners are START and END. -With a prefix (or FILL) argument, also fill lines where nothing has to be -deleted." - (interactive "*r\nP") - (when buffer-read-only - (setq killed-rectangle (extract-rectangle start end)) - (barf-if-buffer-read-only)) - (setq killed-rectangle (delete-extract-rectangle start end fill))) - -;;;###autoload -(defun delete-rectangle (start end &optional fill) - "Delete the text in the region-rectangle without saving it. -The same range of columns is deleted in each line starting with the line -where the region begins and ending with the line where the region ends. - -When called from a program, the rectangle's corners are START and END. -With a prefix (or FILL) argument, also fill lines where nothing has to be -deleted." - (interactive "*r\nP") - (apply-on-rectangle 'delete-rectangle-line start end fill)) - -(defun delete-rectangle-line (startcol endcol fill) - (let ((pt (point-at-eol))) - (when (= (move-to-column startcol (or fill 'coerce)) startcol) - (if (and (not fill) (<= pt endcol)) - (delete-region (point) pt) - ;; else - (setq pt (point)) - (move-to-column endcol t) - (delete-region pt (point)))) - )) - -;;;###autoload -(defun delete-extract-rectangle (start end &optional fill) - "Delete the contents of the rectangle with corners at START and END, and -return it as a list of strings, one for each line of the rectangle. - -With an optional FILL argument, also fill lines where nothing has to be -deleted." - (let ((lines (list nil))) - (apply-on-rectangle 'delete-extract-rectangle-line start end lines fill) - (nreverse (cdr lines)))) (defun delete-extract-rectangle-line (startcol endcol lines fill) (let ((pt (point-at-eol))) @@ -197,13 +170,17 @@ deleted." )) ;;;###autoload -(defun extract-rectangle (start end) - "Return the contents of the rectangle with corners at START and END, -as a list of strings, one for each line of the rectangle." +(defun delete-extract-rectangle (start end &optional fill) + "Delete the contents of the rectangle with corners at START and END, and +return it as a list of strings, one for each line of the rectangle. + +With an optional FILL argument, also fill lines where nothing has to be +deleted." (let ((lines (list nil))) - (apply-on-rectangle 'extract-rectangle-line start end lines) + (apply-on-rectangle 'delete-extract-rectangle-line start end lines fill) (nreverse (cdr lines)))) + ;; #### NOTE: this is actually the only function that needs to do complicated ;; stuff like what's happening in `operate-on-rectangle', because the buffer ;; might be read-only. --dv @@ -236,6 +213,33 @@ as a list of strings, one for each line of the rectangle." (spaces-string endextra)))) (setcdr lines (cons line (cdr lines))))) +;;;###autoload +(defun extract-rectangle (start end) + "Return the contents of the rectangle with corners at START and END, +as a list of strings, one for each line of the rectangle." + (let ((lines (list nil))) + (apply-on-rectangle 'extract-rectangle-line start end lines) + (nreverse (cdr lines)))) + + +;;;###autoload +(defvar killed-rectangle nil + "Rectangle for `yank-rectangle' to insert.") + +;;;###autoload +(defun kill-rectangle (start end &optional fill) + "Delete the region-rectangle and save it as the last killed one. +You might prefer to use `delete-extract-rectangle' from a program. + +When called from a program, the rectangle's corners are START and END. +With a prefix (or FILL) argument, also fill lines where nothing has to be +deleted." + (interactive "*r\nP") + (when buffer-read-only + (setq killed-rectangle (extract-rectangle start end)) + (barf-if-buffer-read-only)) + (setq killed-rectangle (delete-extract-rectangle start end fill))) + ;; This function is untouched --dv ;;;###autoload (defun yank-rectangle () @@ -243,6 +247,7 @@ as a list of strings, one for each line of the rectangle." (interactive "*") (insert-rectangle killed-rectangle)) + ;; This function is untouched --dv ;;;###autoload (defun insert-rectangle (rectangle) @@ -266,6 +271,15 @@ and point is at the lower right corner." (insert (car lines)) (setq lines (cdr lines))))) + +(defun open-rectangle-line (startcol endcol fill) + (let (spaces) + (when (= (move-to-column startcol (or fill 'coerce)) startcol) + (unless (and (not fill) + (= (point) (point-at-eol))) + (indent-to endcol))) + )) + ;;;###autoload (defun open-rectangle (start end &optional fill) "Blank out the region-rectangle, shifting text right. @@ -277,38 +291,32 @@ on the right side of the rectangle." (apply-on-rectangle 'open-rectangle-line start end fill) (goto-char start)) -(defun open-rectangle-line (startcol endcol fill) - (let (spaces) - (when (= (move-to-column startcol (or fill 'coerce)) startcol) - (unless (and (not fill) - (= (point) (point-at-eol))) - (indent-to endcol))) - )) + +(defun string-rectangle-line (startcol endcol string delete) + (move-to-column startcol t) + (if delete + (delete-rectangle-line startcol endcol nil)) + (insert string)) ;;;###autoload (defun string-rectangle (start end string) "Insert STRING on each line of the region-rectangle, shifting text right. -The left edge of the rectangle specifies the column for insertion. This -command does not delete or overwrite any existing text. +The left edge of the rectangle specifies the column for insertion. + +If `pending-delete-mode' is active the string replace the region. +Otherwise this command does not delete or overwrite any existing text. When called from a program, the rectangle's corners are START and END." (interactive "*r\nsString rectangle: ") - (apply-on-rectangle 'string-rectangle-line start end string)) + (apply-on-rectangle 'string-rectangle-line start end string + (and (boundp 'pending-delete-mode) pending-delete-mode))) -(defun string-rectangle-line (startcol endcol string) - (move-to-column startcol t) - (insert string)) - -;;;###autoload -(defun clear-rectangle (start end &optional fill) - "Blank out the region-rectangle. -The text previously in the region is overwritten with blanks. +(defun replace-rectangle (start end string) + "Like `string-rectangle', but unconditionally replace the original region, +as if `pending-delete-mode' were active." + (interactive "*r\nsString rectangle: ") + (apply-on-rectangle 'string-rectangle-line start end string t)) -When called from a program, the rectangle's corners are START and END. -With a prefix (or FILL) argument, also fill with blanks the parts of the -rectangle which were empty." - (interactive "*r\nP") - (apply-on-rectangle 'clear-rectangle-line start end fill)) (defun clear-rectangle-line (startcol endcol fill) (let ((pt (point-at-eol)) @@ -325,6 +333,18 @@ rectangle which were empty." (indent-to (+ (current-column) spaces)))) )) +;;;###autoload +(defun clear-rectangle (start end &optional fill) + "Blank out the region-rectangle. +The text previously in the region is overwritten with blanks. + +When called from a program, the rectangle's corners are START and END. +With a prefix (or FILL) argument, also fill with blanks the parts of the +rectangle which were empty." + (interactive "*r\nP") + (apply-on-rectangle 'clear-rectangle-line start end fill)) + + (provide 'rect) ;;; rect.el ends here diff --git a/lisp/select.el b/lisp/select.el index ef3072e..82788f4 100644 --- a/lisp/select.el +++ b/lisp/select.el @@ -83,14 +83,14 @@ set the clipboard.") This will do nothing under anything other than X.") (defun get-selection-no-error (&optional type data-type) - "Return the value of a Windows selection. + "Return the value of a window-system selection. The argument TYPE (default `PRIMARY') says which selection, and the argument DATA-TYPE (default `STRING', or `COMPOUND_TEXT' under Mule) says how to convert the data. Returns NIL if there is no selection" (condition-case err (get-selection type data-type) (t nil))) (defun get-selection (&optional type data-type) - "Return the value of a Windows selection. + "Return the value of a window-system selection. The argument TYPE (default `PRIMARY') says which selection, and the argument DATA-TYPE (default `STRING', or `COMPOUND_TEXT' under Mule) says how to convert the data. If there is no selection an error is signalled." @@ -112,12 +112,13 @@ says how to convert the data. If there is no selection an error is signalled." text)) ;; FSFmacs calls this `x-set-selection', and reverses the -;; arguments (duh ...). This order is more logical. -(defun own-selection (data &optional type) - "Make an Windows selection of type TYPE and value DATA. +;; first two arguments (duh ...). This order is more logical. +(defun own-selection (data &optional type append) + "Make a window-system selection of type TYPE and value DATA. The argument TYPE (default `PRIMARY') says which selection, and DATA specifies the contents. DATA may be a string, a symbol, an integer (or a cons of two integers or list of two integers). +If APPEND is non-nil, append the data to the existing selection data. The selection may also be a cons of two markers pointing to the same buffer, or an overlay. In these cases, the selection is considered to be the text @@ -131,36 +132,51 @@ Interactively, the text of the region is used as the selection value." (interactive (if (not current-prefix-arg) (list (read-string "Store text for pasting: ")) (list (substring (region-beginning) (region-end))))) - ;FSFmacs huh?? It says: - ;; "This is for temporary compatibility with pre-release Emacs 19." - ;(if (stringp type) - ; (setq type (intern type))) - (or (valid-simple-selection-p data) - (and (vectorp data) - (let ((valid t) - (i (1- (length data)))) - (while (>= i 0) - (or (valid-simple-selection-p (aref data i)) - (setq valid nil)) - (setq i (1- i))) - valid)) - (signal 'error (list "invalid selection" data))) - (or type (setq type 'PRIMARY)) - (if (null data) - (disown-selection-internal type) - (own-selection-internal type data) - (when (and (eq type 'PRIMARY) - selection-sets-clipboard) - (own-selection-internal 'CLIPBOARD data))) - (cond ((eq type 'PRIMARY) - (setq primary-selection-extent - (select-make-extent-for-selection - data primary-selection-extent))) - ((eq type 'SECONDARY) - (setq secondary-selection-extent - (select-make-extent-for-selection - data secondary-selection-extent)))) - (setq zmacs-region-stays t) + ;; calling own-selection-internal will mess this up, so preserve it. + (let ((zmacs-region-stays zmacs-region-stays)) + ;FSFmacs huh?? It says: + ;; "This is for temporary compatibility with pre-release Emacs 19." + ;(if (stringp type) + ; (setq type (intern type))) + (or (valid-simple-selection-p data) + (and (vectorp data) + (let ((valid t) + (i (1- (length data)))) + (while (>= i 0) + (or (valid-simple-selection-p (aref data i)) + (setq valid nil)) + (setq i (1- i))) + valid)) + (signal 'error (list "invalid selection" data))) + (or type (setq type 'PRIMARY)) + (flet ((own-selection-1 + (type data append) + (when append + (unless (stringp data) + ;; kludge! + (setq data (select-convert-to-text type 'STRING data)) + (if (stringp data) + (setq data (concat (get-selection type) data))))) + (own-selection-internal type data))) + (if (null data) + (disown-selection-internal type) + (own-selection-1 type data append) + (when (and (eq type 'PRIMARY) + selection-sets-clipboard) + (own-selection-internal 'CLIPBOARD data append)))) + (cond ((eq type 'PRIMARY) + (setq primary-selection-extent + (select-make-extent-for-selection + data primary-selection-extent))) + ((eq type 'SECONDARY) + (setq secondary-selection-extent + (select-make-extent-for-selection + data secondary-selection-extent))))) + ;; zmacs-region-stays is for commands, not low-level functions. + ;; when behaving as the latter, we better not set it, or we will + ;; cause unwanted sticky-region behavior in kill-region and friends. + (if (interactive-p) + (setq zmacs-region-stays t)) data) (defun dehilight-selection (selection) @@ -184,8 +200,9 @@ Interactively, the text of the region is used as the selection value." (setq lost-selection-hooks 'dehilight-selection) -(defun own-clipboard (string) - "Paste the given string to the window system Clipboard." +(defun own-clipboard (string &optional append) + "Paste the given string to the window system Clipboard. +If APPEND is non-nil, append the string to the existing contents." (own-selection string 'CLIPBOARD)) (defun disown-selection (&optional secondary-p) diff --git a/lisp/simple.el b/lisp/simple.el index 19a6eec..5b306a1 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2,6 +2,7 @@ ;; Copyright (C) 1985-7, 1993-5, 1997 Free Software Foundation, Inc. ;; Copyright (C) 1995 Tinker Systems and INS Engineering Corp. +;; Copyright (C) 2000 Ben Wing. ;; Maintainer: XEmacs Development Team ;; Keywords: lisp, extensions, internal, dumped @@ -1087,22 +1088,50 @@ Repeating \\[universal-argument] without digits or minus sign (skip-chars-forward " \t")) (defcustom kill-whole-line nil - "*If non-nil, `kill-line' with no arg at beg of line kills the whole line." - :type 'boolean + "*Control when and whether `kill-line' removes entire lines. +Note: This only applies when `kill-line' is called interactively; +otherwise, it behaves \"historically\". + +If `always', `kill-line' with no arg always kills the whole line, +wherever point is in the line. (If you want to just kill to the end +of the line, use \\[historical-kill-line].) + +If not `always' but non-nil, `kill-line' with no arg kills the whole +line if point is at the beginning, and otherwise behaves historically. + +If nil, `kill-line' behaves historically." + :type '(radio (const :tag "Kill to end of line" nil) + (const :tag "Kill whole line" always) + (const + :tag "Kill whole line at beginning, otherwise end of line" t)) :group 'killing) +(defun historical-kill-line (&optional arg) + "Same as `kill-line' but ignores value of `kill-whole-line'." + (interactive "*P") + (let ((kill-whole-line nil)) + (if (interactive-p) + (call-interactively 'kill-line) + (kill-line arg)))) + (defun kill-line (&optional arg) - "Kill the rest of the current line; if no nonblanks there, kill thru newline. + "Kill the rest of the current line, or the entire line. +If no nonblanks there, kill thru newline. +If called interactively, may kill the entire line; see `kill-whole-line'. +when given no argument at the beginning of a line. With prefix argument, kill that many lines from point. Negative arguments kill lines backward. When calling from a program, nil means \"no arg\", -a number counts as a prefix arg. - -If `kill-whole-line' is non-nil, then kill the whole line -when given no argument at the beginning of a line." +a number counts as a prefix arg." (interactive "*P") - (kill-region (point) + (kill-region (if (and (interactive-p) + (not arg) + (eq kill-whole-line 'always)) + (save-excursion + (beginning-of-line) + (point)) + (point)) ;; Don't shift point before doing the delete; that way, ;; undo will record the right position of point. ;; FSF @@ -1117,7 +1146,10 @@ when given no argument at the beginning of a line." (forward-line (prefix-numeric-value arg)) (if (eobp) (signal 'end-of-buffer nil)) - (if (or (looking-at "[ \t]*$") (and kill-whole-line (bolp))) + (if (or (looking-at "[ \t]*$") + (and (interactive-p) + (or (eq kill-whole-line 'always) + (and kill-whole-line (bolp))))) (forward-line 1) (end-of-line))) (point)))) @@ -1154,7 +1186,7 @@ kill become the X Clipboard selection." ;;; the cut buffers. I'm afraid to change interface of `kill-hooks', ;;; so I add it. (1997-11-03 by MORIOKA Tomohiko) -(defvar interprogram-cut-function nil +(defcustom interprogram-cut-function 'own-clipboard "Function to call to make a killed region available to other programs. Most window systems provide some sort of facility for cutting and @@ -1167,9 +1199,15 @@ The function takes one or two arguments. The first argument, TEXT, is a string containing the text which should be made available. The second, PUSH, if non-nil means this is a \"new\" kill; -nil means appending to an \"old\" kill.") +nil means appending to an \"old\" kill." + :type '(radio (function-item :tag "Send to Clipboard" + :format "%t\n" + own-clipboard) + (const :tag "None" nil) + (function :tag "Other")) + :group 'killing) -(defvar interprogram-paste-function nil +(defcustom interprogram-paste-function 'get-clipboard "Function to call to get text cut from other programs. Most window systems provide some sort of facility for cutting and @@ -1187,7 +1225,13 @@ than Emacs has provided a string for pasting; if Emacs provided the most recent string, the function should return nil. If it is difficult to tell whether Emacs or some other program provided the current string, it is probably good enough to return nil if the string -is equal (according to `string=') to the last text Emacs provided.") +is equal (according to `string=') to the last text Emacs provided." + :type '(radio (function-item :tag "Get from Clipboard" + :format "%t\n" + get-clipboard) + (const :tag "None" nil) + (function :tag "Other")) + :group 'killing) ;;;; The kill ring data structure. @@ -1804,6 +1848,53 @@ We think it is an unnecessary and unwanted side-effect." :type 'boolean :group 'editing-basics) +(defcustom shifted-motion-keys-select-region t + "*If non-nil, shifted motion keys select text, like in MS Windows. +See also `unshifted-motion-keys-deselect-region'." + :type 'boolean + :group 'editing-basics) + +(defcustom unshifted-motion-keys-deselect-region t + "*If non-nil, unshifted motion keys deselect a shifted-motion region. +This only occurs after a region has been selected using shifted motion keys +(not when using the traditional set-mark-then-move method), and has no effect +if `shifted-motion-keys-select-region' is nil." + :type 'boolean + :group 'editing-basics) + +(defun handle-pre-motion-command-current-command-is-motion () + (and (key-press-event-p last-input-event) + (memq (event-key last-input-event) + '(left right up down home end prior next + kp-left kp-right kp-up kp-down + kp-home kp-end kp-prior kp-next)))) + +(defun handle-pre-motion-command () + (if + (and + (handle-pre-motion-command-current-command-is-motion) + zmacs-regions + shifted-motion-keys-select-region + (not (region-active-p)) + (memq 'shift (event-modifiers last-input-event))) + (push-mark nil nil t))) + +(defun handle-post-motion-command () + (if + (and + (handle-pre-motion-command-current-command-is-motion) + zmacs-regions + (region-active-p)) + (cond ((memq 'shift (event-modifiers last-input-event)) + (if shifted-motion-keys-select-region + (putf this-command-properties 'shifted-motion-command t)) + (setq zmacs-region-stays t)) + ((and (getf last-command-properties 'shifted-motion-command) + unshifted-motion-keys-deselect-region) + (setq zmacs-region-stays nil)) + (t + (setq zmacs-region-stays t))))) + (defun forward-char-command (&optional arg buffer) "Move point right ARG characters (left if ARG negative) in BUFFER. On attempt to pass end of buffer, stop and signal `end-of-buffer'. @@ -1889,7 +1980,7 @@ in `goal-column', which is nil when there is none. If you are thinking of using this in a Lisp program, consider using `forward-line' instead. It is usually easier to use and more reliable (no dependence on goal column, etc.)." - (interactive "_p") ; XEmacs + (interactive "_p") (if (and next-line-add-newlines (= arg 1)) (let ((opoint (point))) (end-of-line) @@ -1920,7 +2011,7 @@ Then it does not try to move vertically. If you are thinking of using this in a Lisp program, consider using `forward-line' with a negative argument instead. It is usually easier to use and more reliable (no dependence on goal column, etc.)." - (interactive "_p") ; XEmacs + (interactive "_p") (if (interactive-p) (condition-case nil (line-move (- arg)) @@ -1930,6 +2021,25 @@ to use and more reliable (no dependence on goal column, etc.)." (line-move (- arg))) nil) +(defcustom block-movement-size 6 + "*Number of lines that \"block movement\" commands (\\[forward-block-of-lines], \\[backward-block-of-lines]) move by." + :type 'integer + :group 'editing-basics) + +(defun backward-block-of-lines () + "Move backward by one \"block\" of lines. +The number of lines that make up a block is controlled by +`block-movement-size', which defaults to 6." + (interactive "_") + (forward-line (- block-movement-size))) + +(defun forward-block-of-lines () + "Move forward by one \"block\" of lines. +The number of lines that make up a block is controlled by +`block-movement-size', which defaults to 6." + (interactive "_") + (forward-line block-movement-size)) + (defcustom track-eol nil "*Non-nil means vertical motion starting at end of line keeps to ends of lines. This means moving to the end of each line moved onto. @@ -3418,6 +3528,43 @@ Otherwise, this function always returns false." (downcase-region (region-beginning) (region-end)) (downcase-word arg))) +;; #### not localized +(defvar uncapitalized-title-words + '("the" "a" "an" "in" "of" "for" "to" "and" "but" "at" "on" "as" "by")) + +(defvar uncapitalized-title-word-regexp + (concat "[ \t]*\\(" (mapconcat #'identity uncapitalized-title-words "\\|") + "\\)\\>")) + +(defun capitalize-string-as-title (string) + "Capitalize the words in the string, except for small words (as in titles). +The words not capitalized are specified in `uncapitalized-title-words'." + (let ((buffer (get-buffer-create " *capitalize-string-as-title*"))) + (unwind-protect + (progn + (insert-string string buffer) + (capitalize-region-as-title 1 (point-max buffer) buffer) + (buffer-string buffer)) + (kill-buffer buffer)))) + +(defun capitalize-region-as-title (b e &optional buffer) + "Capitalize the words in the region, except for small words (as in titles). +The words not capitalized are specified in `uncapitalized-title-words'." + (interactive "r") + (save-excursion + (and buffer + (set-buffer buffer)) + (save-restriction + (narrow-to-region b e) + (goto-char (point-min)) + (let ((first t)) + (while (< (point) (point-max)) + (if (or first + (not (looking-at uncapitalized-title-word-regexp))) + (capitalize-word 1) + (forward-word 1)) + (setq first nil)))))) + ;; Most of the zmacs code is now in elisp. The only thing left in C ;; are the variables zmacs-regions, zmacs-region-active-p and ;; zmacs-region-stays plus the function zmacs_update_region which @@ -4097,5 +4244,5 @@ The C code calls this periodically, right before redisplay." (cond ((featurep 'infodock) "InfoDock") ((featurep 'xemacs) "XEmacs") (t "Emacs"))) - + ;;; simple.el ends here diff --git a/lisp/specifier.el b/lisp/specifier.el index 3092b38..5653975 100644 --- a/lisp/specifier.el +++ b/lisp/specifier.el @@ -403,6 +403,40 @@ is no possibility for ambiguity and no need to go through the function how-to-add)))) value) +(defun modify-specifier-instances (specifier func &optional args force default + locale tag-set) + "Modify all specifications that match LOCALE and TAG-SET by FUNC. + +For each specification that exists for SPECIFIER, in locale LOCALE +that matches TAG-SET, call the function FUNC with the instance as its +first argument and with optional arguments ARGS. The result is then +used as the new value of the instantiator. + +If there is no specification in the domain LOCALE matching TAG-SET and +FORCE is non-nil, an explicit one is created from the matching +specifier instance if that exists or DEFAULT otherwise. If LOCALE is +not a domain (i.e. a buffer), DEFAULT is always used. FUNC is then +applied like above and the resulting specification is added." + + (let ((spec-list (specifier-spec-list specifier locale tag-set))) + (cond + (spec-list + ;; Destructively edit the spec-list + (mapc #'(lambda (spec) + (mapc #'(lambda (inst-pair) + (setcdr inst-pair + (apply func (cdr inst-pair) args))) + (cdr spec))) + spec-list) + (add-spec-list-to-specifier specifier spec-list)) + (force + (set-specifier specifier + (apply func + (or (and (valid-specifier-domain-p locale) + (specifier-instance specifier)) + default) args) + locale tag-set))))) + (defmacro let-specifier (specifier-list &rest body) "Add specifier specs, evaluate forms in BODY and restore the specifiers. \(let-specifier SPECIFIER-LIST BODY...) diff --git a/lisp/startup.el b/lisp/startup.el index 8a2f11a..8c2686e 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -20,7 +20,7 @@ ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with XEmacs; see the file COPYING. If not, write to the +;; along with XEmacs; see the file COPYING. If not, write to the ;; Free Software Foundation, 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. @@ -649,9 +649,9 @@ If this is nil, no message will be displayed.") (defun load-user-init-file () "This function actually reads the init file, .emacs." - (if (not user-init-file) - (setq user-init-file (find-user-init-file))) - (load user-init-file t t t) + (if (or user-init-file + (setq user-init-file (find-user-init-file))) + (load user-init-file t t t)) (unless inhibit-default-init (let ((inhibit-startup-message nil)) ;; Users are supposed to be told their rights. @@ -777,7 +777,7 @@ a new format, when variables have changed, etc." (file-count 0) (line nil) (end-of-options nil) - first-file-buffer file-p arg tem) + file-p arg tem) (while command-line-args-left (setq arg (pop command-line-args-left)) (cond @@ -804,8 +804,8 @@ a new format, when variables have changed, etc." (incf file-count) (setq arg (expand-file-name arg dir)) (cond - ((= file-count 1) (setq first-file-buffer - (progn (find-file arg) (current-buffer)))) + ((= file-count 1) + (find-file arg)) (noninteractive (find-file arg)) (t (find-file-other-window arg))) (when line diff --git a/lisp/subr.el b/lisp/subr.el index 0bbb855..f306b44 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -3,6 +3,7 @@ ;; Copyright (C) 1985, 1986, 1992, 1994-5, 1997 Free Software Foundation, Inc. ;; Copyright (C) 1995 Tinker Systems and INS Engineering Corp. ;; Copyright (C) 1995 Sun Microsystems. +;; Copyright (C) 2000 Ben Wing. ;; Maintainer: XEmacs Development Team ;; Keywords: extensions, dumped @@ -117,7 +118,9 @@ one. This function does nothing if HOOK is already local in the current buffer. -Do not use `make-local-variable' to make a hook variable buffer-local." +Do not use `make-local-variable' to make a hook variable buffer-local. + +See also `add-local-hook' and `remove-local-hook'." (if (local-variable-p hook (current-buffer)) ; XEmacs nil (or (boundp hook) (set hook nil)) @@ -139,7 +142,11 @@ To make a hook variable buffer-local, always use HOOK should be a symbol, and FUNCTION may be any valid function. If HOOK is void, it is first set to nil. If HOOK's value is a single -function, it is changed to a list of functions." +function, it is changed to a list of functions. + +You can remove this hook yourself using `remove-hook'. + +See also `add-local-hook' and `add-one-shot-hook'." (or (boundp hook) (set hook nil)) (or (default-boundp hook) (set-default hook nil)) ;; If the hook value is a single function, turn it into a list. @@ -185,25 +192,114 @@ To make a hook variable buffer-local, always use (null (symbol-value hook)) ;value is nil, or (null function)) ;function is nil, then nil ;Do nothing. - (if (or local - ;; Detect the case where make-local-variable was used on a hook - ;; and do what we used to do. - (and (local-variable-p hook (current-buffer)) - (not (memq t (symbol-value hook))))) - (let ((hook-value (symbol-value hook))) - (if (and (consp hook-value) (not (functionp hook-value))) - (if (member function hook-value) - (setq hook-value (delete function (copy-sequence hook-value)))) - (if (equal hook-value function) - (setq hook-value nil))) - (set hook hook-value)) - (let ((hook-value (default-value hook))) - (if (and (consp hook-value) (not (functionp hook-value))) - (if (member function hook-value) - (setq hook-value (delete function (copy-sequence hook-value)))) - (if (equal hook-value function) - (setq hook-value nil))) - (set-default hook hook-value))))) + (flet ((hook-remove + (function hook-value) + (flet ((hook-test + (fn hel) + (or (equal fn hel) + (and (symbolp hel) + (equal fn + (get hel 'one-shot-hook-fun)))))) + (if (and (consp hook-value) + (not (functionp hook-value))) + (if (member* function hook-value :test 'hook-test) + (setq hook-value + (delete* function (copy-sequence hook-value) + :test 'hook-test))) + (if (equal hook-value function) + (setq hook-value nil))) + hook-value))) + (if (or local + ;; Detect the case where make-local-variable was used on a hook + ;; and do what we used to do. + (and (local-variable-p hook (current-buffer)) + (not (memq t (symbol-value hook))))) + (set hook (hook-remove function (symbol-value hook))) + (set-default hook (hook-remove function (default-value hook))))))) + +;; XEmacs addition +;; #### we need a coherent scheme for indicating compatibility info, +;; so that it can be programmatically retrieved. +(defun add-local-hook (hook function &optional append) + "Add to the local value of HOOK the function FUNCTION. +This modifies only the buffer-local value for the hook (which is +automatically make buffer-local, if necessary), not its default value. +FUNCTION is not added if already present. +FUNCTION is added (if necessary) at the beginning of the hook list +unless the optional argument APPEND is non-nil, in which case +FUNCTION is added at the end. + +HOOK should be a symbol, and FUNCTION may be any valid function. If +HOOK is void, it is first set to nil. If HOOK's value is a single +function, it is changed to a list of functions. + +You can remove this hook yourself using `remove-local-hook'. + +See also `add-hook' and `make-local-hook'." + (make-local-hook hook) + (add-hook hook function append t)) + +;; XEmacs addition +(defun remove-local-hook (hook function) + "Remove from the local value of HOOK the function FUNCTION. +This modifies only the buffer-local value for the hook, not its default +value. (Nothing happens if the hook is not buffer-local.) +HOOK should be a symbol, and FUNCTION may be any valid function. If +FUNCTION isn't the value of HOOK, or, if FUNCTION doesn't appear in the +list of hooks to run in HOOK, then nothing is done. See `add-hook'. + +See also `add-local-hook' and `make-local-hook'." + (if (local-variable-p hook (current-buffer)) + (remove-hook hook function t))) + +(defun add-one-shot-hook (hook function &optional append local) + "Add to the value of HOOK the one-shot function FUNCTION. +FUNCTION will automatically be removed from the hook the first time +after it runs (whether to completion or to an error). +FUNCTION is not added if already present. +FUNCTION is added (if necessary) at the beginning of the hook list +unless the optional argument APPEND is non-nil, in which case +FUNCTION is added at the end. + +HOOK should be a symbol, and FUNCTION may be any valid function. If +HOOK is void, it is first set to nil. If HOOK's value is a single +function, it is changed to a list of functions. + +You can remove this hook yourself using `remove-hook'. + +See also `add-hook', `add-local-hook', and `add-local-one-shot-hook'." + (let ((sym (gensym))) + (fset sym `(lambda (&rest args) + (unwind-protect + (apply ',function args) + (remove-hook ',hook ',sym ',local)))) + (put sym 'one-shot-hook-fun function) + (add-hook hook sym append local))) + +(defun add-local-one-shot-hook (hook function &optional append) + "Add to the local value of HOOK the one-shot function FUNCTION. +FUNCTION will automatically be removed from the hook the first time +after it runs (whether to completion or to an error). +FUNCTION is not added if already present. +FUNCTION is added (if necessary) at the beginning of the hook list +unless the optional argument APPEND is non-nil, in which case +FUNCTION is added at the end. + +The optional fourth argument, LOCAL, if non-nil, says to modify +the hook's buffer-local value rather than its default value. +This makes no difference if the hook is not buffer-local. +To make a hook variable buffer-local, always use +`make-local-hook', not `make-local-variable'. + +HOOK should be a symbol, and FUNCTION may be any valid function. If +HOOK is void, it is first set to nil. If HOOK's value is a single +function, it is changed to a list of functions. + +You can remove this hook yourself using `remove-local-hook'. + +See also `add-hook', `add-local-hook', and `add-local-one-shot-hook'." + (make-local-hook hook) + (add-one-shot-hook hook function append t)) (defun add-to-list (list-var element) "Add to the value of LIST-VAR the element ELEMENT if it isn't there yet. @@ -345,7 +441,8 @@ If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"." "Collect output to `standard-output' while evaluating FORMS and return it as a string." ;; by "William G. Dubuque" w/ mods from Stig - `(with-current-buffer (get-buffer-create " *string-output*") + `(with-current-buffer (get-buffer-create + (generate-new-buffer-name " *string-output*")) (setq buffer-read-only nil) (buffer-disable-undo (current-buffer)) (erase-buffer) @@ -399,16 +496,10 @@ See also `with-temp-file' and `with-output-to-string'." "With the contents of the current buffer being STR, run BODY. Returns the new contents of the buffer, as modified by BODY. The original current buffer is restored afterwards." - `(let ((tempbuf (get-buffer-create " *string-as-buffer-contents*"))) - (with-current-buffer tempbuf - (unwind-protect - (progn - (buffer-disable-undo (current-buffer)) - (erase-buffer) - (insert ,str) - ,@body - (buffer-string)) - (erase-buffer tempbuf))))) + `(with-temp-buffer + (insert ,str) + ,@body + (buffer-string))) (defun insert-face (string face) "Insert STRING and highlight with FACE. Return the extent created." diff --git a/lisp/window.el b/lisp/window.el index c60b931..8c4bba4 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -351,5 +351,4 @@ Any other non-nil value means search frames on all devices." minibuf all-frames device) wins)) - ;;; window.el ends here diff --git a/lisp/x-init.el b/lisp/x-init.el index 5df11b2..cfeaf46 100644 --- a/lisp/x-init.el +++ b/lisp/x-init.el @@ -305,8 +305,8 @@ (init-x-toolbar)) (if (and (featurep 'infodock) (featurep 'toolbar)) (require 'id-x-toolbar)) - (if (featurep 'mule) - (init-mule-x-win)) + (if (featurep 'gutter) (init-gutter)) + (if (featurep 'mule) (init-mule-x-win)) ;; these are only ever called if zmacs-regions is true. (add-hook 'zmacs-deactivate-region-hook (lambda () diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index 1d3eb2c..2362b17 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog @@ -1,3 +1,17 @@ +2000-03-20 Martin Buchholz + + * XEmacs 21.2.32 is released. + +2000-03-14 Ben Wing + + * xlwmenu.c (massage_resource_name): Handle %_ and %%. + +2000-02-20 Gunnar Evermann + + * xlwscrollbar.c (get_gc): Always check for XmUNSPECIFIED_PIXMAP + even if we are only 'compatible' with the Motif resources. + (XmUNSPECIFIED_PIXMAP): Define unconditionally. + 2000-02-23 Martin Buchholz * XEmacs 21.2.31 is released. @@ -126,7 +140,7 @@ 1999-12-12 Daniel Pittman - * lwlib-Xaw.c: + * lwlib-Xaw.c: * xlwcheckbox.c: * xlwgauge.h: * xlwgaugeP.h: @@ -241,11 +255,11 @@ Include to get prototype for atoi(). (GaugeSelect): Call GaugeExpose with the right number of args. (GaugeLoseSel): Call GaugeExpose with the right number of args. - (GaugeConvert): This is a XtConvertSelectionProc, + (GaugeConvert): This is a XtConvertSelectionProc, so 5th parameter must be of type XtPointer, not XPointer. - (GaugeGetValue): This is a XtTimerCallbackProc, + (GaugeGetValue): This is a XtTimerCallbackProc, so 2nd parameter must be of type XtIntervalId *, not XtIntervalId. - + 1999-09-01 Martin Buchholz @@ -281,7 +295,7 @@ * xlwradio.c: * xlwcheckbox.c: * xlwgauge.c: Fix for losing systems without Xmu. - + 1999-08-31 Andy Piper * lwlib-Xm.c (xm_update_one_widget): fix for AIX compiler lossage. @@ -413,7 +427,7 @@ * XEmacs 21.2.18 is released -1999-07-05 Didier Verna +1999-07-05 Didier Verna * lwlib-Xm.c (xm_update_one_widget): add missing #ifdefs around call to xm_update_label. diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c index a35a629..23d5a45 100644 --- a/lwlib/xlwmenu.c +++ b/lwlib/xlwmenu.c @@ -479,16 +479,26 @@ massage_resource_name (const char *in, char *out) Boolean firstp = True; while (*in) { - char ch = massaged_resource_char[(unsigned char) *in++]; - if (ch) + if (*in == '%' && *(in + 1) == '_') + in += 2; + else { - int int_ch = (int) (unsigned char) ch; - *out++ = firstp ? tolower (int_ch) : toupper (int_ch); - firstp = False; - while ((ch = massaged_resource_char[(unsigned char) *in++]) != '\0') - *out++ = ch; - if (!*(in-1)) /* Overshot the NULL byte? */ - break; + char ch; + + if (*in == '%' && *(in + 1) == '%') + in++; + ch = massaged_resource_char[(unsigned char) *in++]; + if (ch) + { + int int_ch = (int) (unsigned char) ch; + *out++ = firstp ? tolower (int_ch) : toupper (int_ch); + firstp = False; + while ((ch = massaged_resource_char[(unsigned char) *in++]) + != '\0') + *out++ = ch; + if (!*(in-1)) /* Overshot the NULL byte? */ + break; + } } } *out = 0; diff --git a/lwlib/xlwscrollbar.c b/lwlib/xlwscrollbar.c index 88f7cc1..2c2d293 100644 --- a/lwlib/xlwscrollbar.c +++ b/lwlib/xlwscrollbar.c @@ -485,11 +485,9 @@ arrow_same_end (XlwScrollBarWidget w) } /*-------------------------- GC and Pixel allocation --------------------*/ -#ifdef NEED_MOTIF #ifndef XmUNSPECIFIED_PIXMAP #define XmUNSPECIFIED_PIXMAP 2 #endif -#endif /* NEED_MOTIF */ static GC get_gc (XlwScrollBarWidget w, Pixel fg, Pixel bg, Pixmap pm) @@ -514,14 +512,10 @@ get_gc (XlwScrollBarWidget w, Pixel fg, Pixel bg, Pixmap pm) values.stipple = pm; /* mask = GCForeground | GCBackground | (pm == None ? 0 : GCStipple | GCFillStyle); gtb */ -#ifdef NEED_MOTIF if (pm != None && pm != 0 && pm != XmUNSPECIFIED_PIXMAP) values.stipple = pm; else values.stipple = None; -#else - values.stipple = pm; -#endif /* NEED_MOTIF */ mask = GCForeground | GCBackground | (values.stipple == None ? 0 : GCStipple | GCFillStyle); diff --git a/man/ChangeLog b/man/ChangeLog index 76ba93a..0ec892f 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,81 @@ +2000-03-20 Martin Buchholz + + * XEmacs 21.2.32 is released. + +2000-03-15 SL Baur + + * lispref/postgresql.texi (Unimplemented libpq Functions): Update + documentation to reflect the latest code. + +2000-03-07 SL Baur + + * lispref/postgresql.texi (PostgreSQL Support): New File. + + * lispref/ldap.texi: Insert PostgreSQL/libpq chapter. + * lispref/lispref.texi (Top): Ditto. + * lispref/internationalization.texi: Ditto. + +2000-03-07 Yoshiki Hayashi + + * lispref/glyphs.texi (Image Specifiers): Remove parenthesis. + +2000-03-06 Yoshiki Hayashi + + * xemacs-faq.texi: Put node before section. + +2000-03-05 Jonathan Harris + + * xemacs-faq.texi (Macintosh port): Made texinfmt-friendly. + +2000-03-01 Sandra Wambold + + * xemacs-faq.texi: Added 6.4.1. XEmacs won't start on Windows + +2000-01-25 Yoshiki Hayashi + + * xemacs/xemacs.texi: Detailed menu update. + +2000-01-28 Yoshiki Hayashi + + * xemacs/help.texi: Synch with FSF 20.5. Update. + +2000-02-21 Yoshiki Hayashi + + * lispref/minibuf.texi: Add default argument documentation. + +2000-02-27 Martin Buchholz + + * internals/internals.texi (lrecords): Update docs for new lisp + object representation. + +2000-02-25 Martin Buchholz + + * internals/internals.texi (Techniques for XEmacs Developers): + Document INLINE_HEADER and how to create macros and inline functions. + Cleanup entire section. + +2000-02-17 Stephen J. Turnbull + + * man/lispref/gutter.texi: New file describing gutter API. + + * man/lispref/lispref.texi, man/lispref/scrollbars.texi, + + * man/lispref/toolbar.texi: Fixup links to new node Gutter. + +2000-02-17 Stephen J. Turnbull + + * man/lispref/frames.texi, man/xemacs/custom.texi, + man/xemacs/frame.texi, man/xemacs/glossary.texi: Mention menubars, + toolbars, and gutters as optional components of frames, with + pointers to descriptions. + +2000-02-17 Stephen J. Turnbull + + * man/lispref/mule.texi: Substantial reorganization and + revision for style of descriptions of character sets, + encodings, and coding systems. Addition of a complete table + of coding systems as of XEmacs 21.2.19. + 2000-02-23 Martin Buchholz * XEmacs 21.2.31 is released. @@ -32,7 +110,7 @@ 2000-02-09 Martin Buchholz - * lispref/symbols.texi (Object Plists): + * lispref/symbols.texi (Object Plists): Document `object-plist'. Document `remprop'. Rework all plist frobbing docs for accuracy. @@ -90,7 +168,7 @@ 2000-01-25 Yoshiki Hayashi * xemacs-faq.texi: Untabify. - + 2000-01-22 Martin Buchholz * internals/internals.texi (General Coding Rules): Document why we @@ -99,7 +177,7 @@ 2000-01-21 Yoshiki Hayashi * xemacs-faq.texi: Change ' -- ' to '---'. - + 2000-01-19 Yoshiki Hayashi * lispref/faces.texi (Face Properties): Document @@ -203,7 +281,7 @@ 1999-12-18 Martin Buchholz - * lispref/functions.texi (Mapping Functions): + * lispref/functions.texi (Mapping Functions): Warn about mapping functions modifying their sequences. 1999-12-15 Sandra Wambold @@ -217,7 +295,7 @@ 1999-12-07 Gunnar Evermann * xemacs/startup.texi (Startup Paths): fix typo: EMACSPACKAGEPATH - instead of PACKAGEPATH + instead of PACKAGEPATH From Marcus Harnisch 1999-12-07 Martin Buchholz @@ -230,9 +308,9 @@ 1999-11-29 Martin Buchholz - * info.texi (Top): + * info.texi (Top): Remove @ifnottex, which gives old makeinfos indigestion. - * texinfo.texi (Top): + * texinfo.texi (Top): Revert to pre-texinfo-4.0 version, plus small changes to make texinfo-3.12, texinfo-3.12f, texinfo-4.0, and TeX happy. @@ -262,7 +340,7 @@ 1999-11-15 Martin Buchholz * xemacs/programs.texi: Upgrade to etags Version 13.32 - + * Makefile: - Make sure the default target is `info' instead of cl.info. - Use $(INFODIR) consistently where appropriate. @@ -369,7 +447,7 @@ * packages.texi: Reword a sentence, fixing @item Decide where to install ... -1999-07-19 Didier Verna +1999-07-19 Didier Verna * custom.texi (Wishlist): removed the Custom Comments wishlist entry. They are implemented. diff --git a/man/internals/internals.texi b/man/internals/internals.texi index f432589..dc213f4 100644 --- a/man/internals/internals.texi +++ b/man/internals/internals.texi @@ -1626,11 +1626,11 @@ stuffs a pointer together with a tag, as follows: A tag of 00 is used for all pointer object types, a tag of 10 is used for characters, and the other two tags 01 and 11 are joined together to -form the integer object type. This representation gives us 31 bits -integers, 30 bits characters and pointers are represented directly -without any bit masking. This representation, though, assumes that -pointers to structs are always aligned to multiples of 4, so the lower 2 -bits are always zero. +form the integer object type. This representation gives us 31 bit +integers and 30 bit characters, while pointers are represented directly +without any bit masking or shifting. This representation, though, +assumes that pointers to structs are always aligned to multiples of 4, +so the lower 2 bits are always zero. Lisp objects use the typedef @code{Lisp_Object}, but the actual C type used for the Lisp object can vary. It can be either a simple type @@ -1641,24 +1641,24 @@ preferable because it ensures that the compiler will actually use a machine word to represent the object (some compilers will use more general and less efficient code for unions and structs even if they can fit in a machine word). The union type, however, has the advantage of -stricter type checking (if you accidentally pass an integer where a Lisp -object is desired, you get a compile error), and it makes it easier to -decode Lisp objects when debugging. The choice of which type to use is -determined by the preprocessor constant @code{USE_UNION_TYPE} which is -defined via the @code{--use-union-type} option to @code{configure}. - -Various macros are used to construct Lisp objects and extract the -components. Macros of the form @code{XINT()}, @code{XCHAR()}, -@code{XSTRING()}, @code{XSYMBOL()}, etc. shift out the tag field if -needed cast it to the appropriate type. @code{XINT()} needs to be a bit -tricky so that negative numbers are properly sign-extended. Since +stricter type checking. If you accidentally pass an integer where a Lisp +object is desired, you get a compile error. The choice of which type +to use is determined by the preprocessor constant @code{USE_UNION_TYPE} +which is defined via the @code{--use-union-type} option to +@code{configure}. + +Various macros are used to convert between Lisp_Objects and the +corresponding C type. Macros of the form @code{XINT()}, @code{XCHAR()}, +@code{XSTRING()}, @code{XSYMBOL()}, do any required bit shifting and/or +masking and cast it to the appropriate type. @code{XINT()} needs to be +a bit tricky so that negative numbers are properly sign-extended. Since integers are stored left-shifted, if the right-shift operator does an arithmetic shift (i.e. it leaves the most-significant bit as-is rather than shifting in a zero, so that it mimics a divide-by-two even for negative numbers) the shift to remove the tag bit is enough. This is the case on all the systems we support. -Note that when @code{ERROR_CHECK_TYPECHECK} is defined, the extractor +Note that when @code{ERROR_CHECK_TYPECHECK} is defined, the converter macros become more complicated---they check the tag bits and/or the type field in the first four bytes of a record type to ensure that the object is really of the correct type. This is great for catching places @@ -1668,25 +1668,29 @@ unpredictable (and sometimes not easily traceable) results. There are similar @code{XSET@var{TYPE}()} macros that construct a Lisp object. These macros are of the form @code{XSET@var{TYPE} -(@var{lvalue}, @var{result})}, -i.e. they have to be a statement rather than just used in an expression. -The reason for this is that standard C doesn't let you ``construct'' a -structure (but GCC does). Granted, this sometimes isn't too convenient; -for the case of integers, at least, you can use the function -@code{make_int()}, which constructs and @emph{returns} an integer -Lisp object. Note that the @code{XSET@var{TYPE}()} macros are also -affected by @code{ERROR_CHECK_TYPECHECK} and make sure that the -structure is of the right type in the case of record types, where the -type is contained in the structure. +(@var{lvalue}, @var{result})}, i.e. they have to be a statement rather +than just used in an expression. The reason for this is that standard C +doesn't let you ``construct'' a structure (but GCC does). Granted, this +sometimes isn't too convenient; for the case of integers, at least, you +can use the function @code{make_int()}, which constructs and +@emph{returns} an integer Lisp object. Note that the +@code{XSET@var{TYPE}()} macros are also affected by +@code{ERROR_CHECK_TYPECHECK} and make sure that the structure is of the +right type in the case of record types, where the type is contained in +the structure. The C programmer is responsible for @strong{guaranteeing} that a -Lisp_Object is is the correct type before using the @code{X@var{TYPE}} +Lisp_Object is the correct type before using the @code{X@var{TYPE}} macros. This is especially important in the case of lists. Use @code{XCAR} and @code{XCDR} if a Lisp_Object is certainly a cons cell, else use @code{Fcar()} and @code{Fcdr()}. Trust other C code, but not Lisp code. On the other hand, if XEmacs has an internal logic error, -it's better to crash immediately, so sprinkle ``unreachable'' -@code{abort()}s liberally about the source code. +it's better to crash immediately, so sprinkle @code{assert()}s and +``unreachable'' @code{abort()}s liberally about the source code. Where +performance is an issue, use @code{type_checking_assert}, +@code{bufpos_checking_assert}, and @code{gc_checking_assert}, which do +nothing unless the corresponding configure error checking flag was +specified. @node Rules When Writing New C Code, A Summary of the Various XEmacs Modules, How Lisp Objects Are Represented in C, Top @chapter Rules When Writing New C Code @@ -1740,13 +1744,14 @@ system header files) to ensure that certain tricks played by various @file{s/} and @file{m/} files work out correctly. When including header files, always use angle brackets, not double -quotes, except when the file to be included is in the same directory as -the including file. If either file is a generated file, then that is -not likely to be the case. In order to understand why we have this -rule, imagine what happens when you do a build in the source directory -using @samp{./configure} and another build in another directory using -@samp{../work/configure}. There will be two different @file{config.h} -files. Which one will be used if you @samp{#include "config.h"}? +quotes, except when the file to be included is always in the same +directory as the including file. If either file is a generated file, +then that is not likely to be the case. In order to understand why we +have this rule, imagine what happens when you do a build in the source +directory using @samp{./configure} and another build in another +directory using @samp{../work/configure}. There will be two different +@file{config.h} files. Which one will be used if you @samp{#include +"config.h"}? @strong{All global and static variables that are to be modifiable must be declared uninitialized.} This means that you may not use the @@ -1791,7 +1796,7 @@ The C source code makes heavy use of C preprocessor macros. One popular macro style is: @example -#define FOO(var, value) do @{ \ +#define FOO(var, value) do @{ \ Lisp_Object FOO_value = (value); \ ... /* compute using FOO_value */ \ (var) = bar; \ @@ -2597,13 +2602,19 @@ proceed writing new Mule-aware code. @node Techniques for XEmacs Developers, , Coding for Mule, Rules When Writing New C Code @section Techniques for XEmacs Developers +To make a purified XEmacs, do: @code{make puremacs}. To make a quantified XEmacs, do: @code{make quantmacs}. -You simply can't dump Quantified and Purified images. Run the image -like so: @code{quantmacs -batch -l loadup.el run-temacs @var{xemacs-args...}}. +You simply can't dump Quantified and Purified images (unless using the +portable dumper). Purify gets confused when xemacs frees memory in one +process that was allocated in a @emph{different} process on a different +machine!. Run it like so: +@example +temacs -batch -l loadup.el run-temacs @var{xemacs-args...} +@end example Before you go through the trouble, are you compiling with all -debugging and error-checking off? If not try that first. Be warned +debugging and error-checking off? If not, try that first. Be warned that while Quantify is directly responsible for quite a few optimizations which have been made to XEmacs, doing a run which generates results which can be acted upon is not necessarily a trivial @@ -2642,14 +2653,116 @@ Unfortunately, Emacs Lisp is slow, and is going to stay slow. Function calls in elisp are especially expensive. Iterating over a long list is going to be 30 times faster implemented in C than in Elisp. +Heavily used small code fragments need to be fast. The traditional way +to implement such code fragments in C is with macros. But macros in C +are known to be broken. + +Macro arguments that are repeatedly evaluated may suffer from repeated +side effects or suboptimal performance. + +Variable names used in macros may collide with caller's variables, +causing (at least) unwanted compiler warnings. + +In order to solve these problems, and maintain statement semantics, one +should use the @code{do @{ ... @} while (0)} trick while trying to +reference macro arguments exactly once using local variables. + +Let's take a look at this poor macro definition: + +@example +#define MARK_OBJECT(obj) \ + if (!marked_p (obj)) mark_object (obj), did_mark = 1 +@end example + +This macro evaluates its argument twice, and also fails if used like this: +@example + if (flag) MARK_OBJECT (obj); else do_something(); +@end example + +A much better definition is + +@example +#define MARK_OBJECT(obj) do @{ \ + Lisp_Object mo_obj = (obj); \ + if (!marked_p (mo_obj)) \ + @{ \ + mark_object (mo_obj); \ + did_mark = 1; \ + @} \ +@} while (0) +@end example + +Notice the elimination of double evaluation by using the local variable +with the obscure name. Writing safe and efficient macros requires great +care. The one problem with macros that cannot be portably worked around +is, since a C block has no value, a macro used as an expression rather +than a statement cannot use the techniques just described to avoid +multiple evaluation. + +In most cases where a macro has function semantics, an inline function +is a better implementation technique. Modern compiler optimizers tend +to inline functions even if they have no @code{inline} keyword, and +configure magic ensures that the @code{inline} keyword can be safely +used as an additional compiler hint. Inline functions used in a single +.c files are easy. The function must already be defined to be +@code{static}. Just add another @code{inline} keyword to the +definition. + +@example +inline static int +heavily_used_small_function (int arg) +@{ + ... +@} +@end example + +Inline functions in header files are trickier, because we would like to +make the following optimization if the function is @emph{not} inlined +(for example, because we're compiling for debugging). We would like the +function to be defined externally exactly once, and each calling +translation unit would create an external reference to the function, +instead of including a definition of the inline function in the object +code of every translation unit that uses it. This optimization is +currently only available for gcc. But you don't have to worry about the +trickiness; just define your inline functions in header files using this +pattern: + +@example +INLINE_HEADER int +i_used_to_be_a_crufty_macro_but_look_at_me_now (int arg); +INLINE_HEADER int +i_used_to_be_a_crufty_macro_but_look_at_me_now (int arg) +@{ + ... +@} +@end example + +The declaration right before the definition is to prevent warnings when +compiling with @code{gcc -Wmissing-declarations}. I consider issuing +this warning for inline functions a gcc bug, but the gcc maintainers disagree. + +Every header which contains inline functions, either directly by using +@code{INLINE_HEADER} or indirectly by using @code{DECLARE_LRECORD} must +be added to @file{inline.c}'s includes to make the optimization +described above work. (Optimization note: if all INLINE_HEADER +functions are in fact inlined in all translation units, then the linker +can just discard @code{inline.o}, since it contains only unreferenced code). + To get started debugging XEmacs, take a look at the @file{.gdbinit} and -@file{.dbxrc} files in the @file{src} directory. -@xref{Q2.1.15 - How to Debug an XEmacs problem with a debugger,,, -xemacs-faq, XEmacs FAQ}. +@file{.dbxrc} files in the @file{src} directory. See the section in the +XEmacs FAQ on How to Debug an XEmacs problem with a debugger. After making source code changes, run @code{make check} to ensure that -you haven't introduced any regressions. If you're feeling ambitious, -you can try to improve the test suite in @file{tests/automated}. +you haven't introduced any regressions. If you want to make xemacs more +reliable, please improve the test suite in @file{tests/automated}. + +Did you make sure you didn't introduce any new compiler warnings? + +Before submitting a patch, please try compiling at least once with + +@example +configure --with-mule --with-union-type --error-checking=all +@end example Here are things to know when you create a new source file: @@ -2676,23 +2789,6 @@ Header files should @emph{not} include @code{} and @code{"lisp.h"}. It is the responsibility of the @file{.c} files that use it to do so. -@item -If the header uses @code{INLINE}, either directly or through -@code{DECLARE_LRECORD}, then it must be added to @file{inline.c}'s -includes. - -@item -Try compiling at least once with - -@example -gcc --with-mule --with-union-type --error-checking=all -@end example - -@item -Did I mention that you should run the test suite? -@example -make check -@end example @end itemize Here is a checklist of things to do when creating a new lisp object type @@ -2704,17 +2800,20 @@ create @var{foo}.h @item create @var{foo}.c @item -add definitions of syms_of_@var{foo}, etc. to @var{foo}.c +add definitions of @code{syms_of_@var{foo}}, etc. to @file{@var{foo}.c} +@item +add declarations of @code{syms_of_@var{foo}}, etc. to @file{symsinit.h} @item -add declarations of syms_of_@var{foo}, etc. to symsinit.h +add calls to @code{syms_of_@var{foo}}, etc. to @file{emacs.c} @item -add calls to syms_of_@var{foo}, etc. to emacs.c(main_1) +add definitions of macros like @code{CHECK_@var{FOO}} and +@code{@var{FOO}P} to @file{@var{foo}.h} @item -add definitions of macros like CHECK_FOO and FOOP to @var{foo}.h +add the new type index to @code{enum lrecord_type} @item -add the new type index to enum lrecord_type +add a DEFINE_LRECORD_IMPLEMENTATION call to @file{@var{foo}.c} @item -add DEFINE_LRECORD_IMPLEMENTATION call to @var{foo}.c +add an INIT_LRECORD_IMPLEMENTATION call to @code{syms_of_@var{foo}.c} @end enumerate @node A Summary of the Various XEmacs Modules, Allocation of Objects in XEmacs Lisp, Rules When Writing New C Code, Top @@ -5166,7 +5265,9 @@ more defensive but less efficient and is used for error-checking.) All lrecords have at the beginning of their structure a @code{struct lrecord_header}. This just contains a type number and some flags, -including the mark bit. The type number, thru the +including the mark bit. All builtin type numbers are defined as +constants in @code{enum lrecord_type}, to allow the compiler to generate +more efficient code for @code{@var{type}P}. The type number, thru the @code{lrecord_implementation_table}, gives access to a @code{struct lrecord_implementation}, which is a structure containing method pointers and such. There is one of these for each type, and it is a global, @@ -5201,21 +5302,21 @@ type. Whenever you create an lrecord, you need to call either @code{DEFINE_LRECORD_IMPLEMENTATION()} or @code{DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION()}. This needs to be -specified in a C file, at the top level. What this actually does is -define and initialize the implementation structure for the lrecord. (And -possibly declares a function @code{error_check_foo()} that implements -the @code{XFOO()} macro when error-checking is enabled.) The arguments -to the macros are the actual type name (this is used to construct the C -variable name of the lrecord implementation structure and related -structures using the @samp{##} macro concatenation operator), a string -that names the type on the Lisp level (this may not be the same as the C -type name; typically, the C type name has underscores, while the Lisp -string has dashes), various method pointers, and the name of the C -structure that contains the object. The methods are used to encapsulate -type-specific information about the object, such as how to print it or -mark it for garbage collection, so that it's easy to add new object -types without having to add a specific case for each new type in a bunch -of different places. +specified in a @file{.c} file, at the top level. What this actually +does is define and initialize the implementation structure for the +lrecord. (And possibly declares a function @code{error_check_foo()} that +implements the @code{XFOO()} macro when error-checking is enabled.) The +arguments to the macros are the actual type name (this is used to +construct the C variable name of the lrecord implementation structure +and related structures using the @samp{##} macro concatenation +operator), a string that names the type on the Lisp level (this may not +be the same as the C type name; typically, the C type name has +underscores, while the Lisp string has dashes), various method pointers, +and the name of the C structure that contains the object. The methods +are used to encapsulate type-specific information about the object, such +as how to print it or mark it for garbage collection, so that it's easy +to add new object types without having to add a specific case for each +new type in a bunch of different places. The difference between @code{DEFINE_LRECORD_IMPLEMENTATION()} and @code{DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION()} is that the former is @@ -5229,21 +5330,20 @@ to determine the actual size of a particular object of that type. For the purpose of keeping allocation statistics, the allocation engine keeps a list of all the different types that exist. Note that, since @code{DEFINE_LRECORD_IMPLEMENTATION()} is a macro that is -specified at top-level, there is no way for it to add to the list of all -existing types. What happens instead is that each implementation -structure contains in it a dynamically assigned number that is -particular to that type. (Or rather, it contains a pointer to another -structure that contains this number. This evasiveness is done so that -the implementation structure can be declared const.) In the sweep stage -of garbage collection, each lrecord is examined to see if its -implementation structure has its dynamically-assigned number set. If -not, it must be a new type, and it is added to the list of known types -and a new number assigned. The number is used to index into an array -holding the number of objects of each type and the total memory -allocated for objects of that type. The statistics in this array are -also computed during the sweep stage. These statistics are returned by -the call to @code{garbage-collect} and are printed out at the end of the -loadup phase. +specified at top-level, there is no way for it to initialize the global +data structures containing type information, like +@code{lrecord_implementations_table}. For this reason a call to +@code{INIT_LRECORD_IMPLEMENTATION} must be added to the same source file +containing @code{DEFINE_LRECORD_IMPLEMENTATION}, but instead of to the +top level, to one of the init functions, typically +@code{syms_of_@var{foo}.c}. @code{INIT_LRECORD_IMPLEMENTATION} must be +called before an object of this type is used. + +The type number is also used to index into an array holding the number +of objects of each type and the total memory allocated for objects of +that type. The statistics in this array are computed during the sweep +stage. These statistics are returned by the call to +@code{garbage-collect}. Note that for every type defined with a @code{DEFINE_LRECORD_*()} macro, there needs to be a @code{DECLARE_LRECORD_IMPLEMENTATION()} @@ -5449,16 +5549,15 @@ warning system, when memory gets to 75%, 85%, and 95% full. (On some systems, the memory warnings are not functional.) Allocated memory that is going to be used to make a Lisp object -is created using @code{allocate_lisp_storage()}. This calls @code{xmalloc()} -but also verifies that the pointer to the memory can fit into -a Lisp word (remember that some bits are taken away for a type -tag and a mark bit). If not, an error is issued through @code{memory_full()}. -@code{allocate_lisp_storage()} is called by @code{alloc_lcrecord()}, -@code{ALLOCATE_FIXED_TYPE()}, and the vector and bit-vector creation -routines. These routines also call @code{INCREMENT_CONS_COUNTER()} at the -appropriate times; this keeps statistics on how much memory is -allocated, so that garbage-collection can be invoked when the -threshold is reached. +is created using @code{allocate_lisp_storage()}. This just calls +@code{xmalloc()}. It used to verify that the pointer to the memory can +fit into a Lisp word, before the current Lisp object representation was +introduced. @code{allocate_lisp_storage()} is called by +@code{alloc_lcrecord()}, @code{ALLOCATE_FIXED_TYPE()}, and the vector +and bit-vector creation routines. These routines also call +@code{INCREMENT_CONS_COUNTER()} at the appropriate times; this keeps +statistics on how much memory is allocated, so that garbage-collection +can be invoked when the threshold is reached. @node Cons, Vector, Low-level allocation, Allocation of Objects in XEmacs Lisp @section Cons @@ -8798,4 +8897,3 @@ Not yet documented. @c That's all @bye - diff --git a/man/lispref/frames.texi b/man/lispref/frames.texi index fb7e633..1ae6f9b 100644 --- a/man/lispref/frames.texi +++ b/man/lispref/frames.texi @@ -9,9 +9,19 @@ @cindex frame A @var{frame} is a rectangle on the screen that contains one or more -XEmacs windows. A frame initially contains a single main window (plus -perhaps a minibuffer window), which you can subdivide vertically or -horizontally into smaller windows. +XEmacs windows (@pxref{Windows}). A frame initially contains a single +main window (plus perhaps an echo area), which you can subdivide +vertically or horizontally into smaller windows. Each window is +associated with a modeline (@pxref{Modeline Format}), and optionally two +scrollbars (@pxref{Scrollbars}). By default the vertical scrollbar is +on, the horizontal scrollbar is off. + + The frame may also contain menubars (@pxref{Menubar}), toolbars +(@pxref{Toolbar Intro}), and gutters (@pxref{Gutter Intro}). By default +there is one of each at the top of the frame, with menubar topmost, +toolbar next, and gutter lowest, immediately above the windows. +(Warning: the gutter is a new, experimental, and unstable feature of +XEmacs version 21.2.) @cindex terminal frame @cindex X window frame diff --git a/man/lispref/glyphs.texi b/man/lispref/glyphs.texi index 1c71406..3cffa49 100644 --- a/man/lispref/glyphs.texi +++ b/man/lispref/glyphs.texi @@ -462,65 +462,64 @@ pairs. The @dfn{format} field should be a symbol, one of @table @code @item nothing -(Don't display anything; no keywords are valid for this. Can only be -instanced as @code{nothing}.) +Don't display anything; no keywords are valid for this. Can only be +instanced as @code{nothing}. @item string -(Display this image as a text string. Can only be instanced +Display this image as a text string. Can only be instanced as @code{text}, although support for instancing as @code{mono-pixmap} -should be added.) +should be added. @item formatted-string -(Display this image as a text string with replaceable fields, -similar to a modeline format string; not currently implemented.) +Display this image as a text string with replaceable fields, +similar to a modeline format string; not currently implemented. @item xbm -(An X bitmap; only if X support was compiled into this XEmacs. Can be +An X bitmap; only if X support was compiled into this XEmacs. Can be instanced as @code{mono-pixmap}, @code{color-pixmap}, or -@code{pointer}.) +@code{pointer}. @item xpm -(An XPM pixmap; only if XPM support was compiled into this XEmacs. Can +An XPM pixmap; only if XPM support was compiled into this XEmacs. Can be instanced as @code{color-pixmap}, @code{mono-pixmap}, or @code{pointer}. XPM is an add-on library for X that was designed to rectify the shortcomings of the XBM format. Most implementations of X include the XPM library as a standard part. If your vendor does not, it is highly recommended that you download it and install it. You can get -it from the standard XEmacs FTP site, among other places.) +it from the standard XEmacs FTP site, among other places. @item xface -(An X-Face bitmap, used to encode people's faces in e-mail messages; +An X-Face bitmap, used to encode people's faces in e-mail messages; only if X-Face support was compiled into this XEmacs. Can be instanced -as @code{mono-pixmap}, @code{color-pixmap}, or @code{pointer}.) +as @code{mono-pixmap}, @code{color-pixmap}, or @code{pointer}. @item gif -(A GIF87 or GIF89 image; only if GIF support was compiled into this +A GIF87 or GIF89 image; only if GIF support was compiled into this XEmacs. Can be instanced as @code{color-pixmap}. Note that XEmacs includes GIF decoding functions as a standard part of it, so if you have X support, you will normally have GIF support, unless you explicitly -disable it at configure time.) +disable it at configure time. @item jpeg -(A JPEG-format image; only if JPEG support was compiled into this +A JPEG-format image; only if JPEG support was compiled into this XEmacs. Can be instanced as @code{color-pixmap}. If you have the JPEG libraries present on your system when XEmacs is built, XEmacs will automatically detect this and use them, unless you explicitly disable it -at configure time.) +at configure time. @item png -(A PNG/GIF24 image; only if PNG support was compiled into this XEmacs. -Can be instanced as @code{color-pixmap}.) +A PNG/GIF24 image; only if PNG support was compiled into this XEmacs. +Can be instanced as @code{color-pixmap}. @item tiff -(A TIFF-format image; only if TIFF support was compiled into this XEmacs. -Not currently implemented.) +A TIFF-format image; only if TIFF support was compiled into this XEmacs. @item cursor-font -(One of the standard cursor-font names, such as @samp{watch} or +One of the standard cursor-font names, such as @samp{watch} or @samp{right_ptr} under X. Under X, this is, more specifically, any of the standard cursor names from appendix B of the Xlib manual [also known as the file @file{}] minus the @samp{XC_} prefix. On other window systems, the valid names will be specific to the type of -window system. Can only be instanced as @code{pointer}.) +window system. Can only be instanced as @code{pointer}. @item font -(A glyph from a font; i.e. the name of a font, and glyph index into it +A glyph from a font; i.e. the name of a font, and glyph index into it of the form @samp{@var{font} fontname index [[mask-font] mask-index]}. Only if X support was compiled into this XEmacs. Currently can only be -instanced as @code{pointer}, although this should probably be fixed.) +instanced as @code{pointer}, although this should probably be fixed. @item subwindow -(An embedded X window; not currently implemented.) +An embedded X window; not currently implemented. @item autodetect -(XEmacs tries to guess what format the data is in. If X support exists, +XEmacs tries to guess what format the data is in. If X support exists, the data string will be checked to see if it names a filename. If so, and this filename contains XBM or XPM data, the appropriate sort of pixmap or pointer will be created. [This includes picking up any @@ -528,66 +527,66 @@ specified hotspot or associated mask file.] Otherwise, if @code{pointer} is one of the allowable image-instance types and the string names a valid cursor-font name, the image will be created as a pointer. Otherwise, the image will be displayed as text. If no X support exists, -the image will always be displayed as text.) +the image will always be displayed as text. @end table The valid keywords are: @table @code @item :data -(Inline data. For most formats above, this should be a string. For +Inline data. For most formats above, this should be a string. For XBM images, this should be a list of three elements: width, height, and a string of bit data. This keyword is not valid for instantiator -format @code{nothing}.) +format @code{nothing}. @item :file -(Data is contained in a file. The value is the name of this file. If +Data is contained in a file. The value is the name of this file. If both @code{:data} and @code{:file} are specified, the image is created from what is specified in @code{:data} and the string in @code{:file} becomes the value of the @code{image-instance-file-name} function when applied to the resulting image-instance. This keyword is not valid for instantiator formats @code{nothing}, @code{string}, @code{formatted-string}, @code{cursor-font}, @code{font}, and -@code{autodetect}.) +@code{autodetect}. @item :foreground @itemx :background -(For @code{xbm}, @code{xface}, @code{cursor-font}, and @code{font}. +For @code{xbm}, @code{xface}, @code{cursor-font}, and @code{font}. These keywords allow you to explicitly specify foreground and background colors. The argument should be anything acceptable to @code{make-color-instance}. This will cause what would be a @code{mono-pixmap} to instead be colorized as a two-color color-pixmap, and specifies the foreground and/or background colors for a pointer -instead of black and white.) +instead of black and white. @item :mask-data -(For @code{xbm} and @code{xface}. This specifies a mask to be used with the +For @code{xbm} and @code{xface}. This specifies a mask to be used with the bitmap. The format is a list of width, height, and bits, like for -@code{:data}.) +@code{:data}. @item :mask-file -(For @code{xbm} and @code{xface}. This specifies a file containing the +For @code{xbm} and @code{xface}. This specifies a file containing the mask data. If neither a mask file nor inline mask data is given for an XBM image, and the XBM image comes from a file, XEmacs will look for a mask file with the same name as the image file but with @samp{Mask} or @samp{msk} appended. For example, if you specify the XBM file @file{left_ptr} [usually located in @file{/usr/include/X11/bitmaps}], the associated mask file @file{left_ptrmsk} will automatically be picked -up.) +up. @item :hotspot-x @itemx :hotspot-y -(For @code{xbm} and @code{xface}. These keywords specify a hotspot if +For @code{xbm} and @code{xface}. These keywords specify a hotspot if the image is instantiated as a @code{pointer}. Note that if the XBM image file specifies a hotspot, it will automatically be picked up if no -explicit hotspot is given.) +explicit hotspot is given. @item :color-symbols -(Only for @code{xpm}. This specifies an alist that maps strings that +Only for @code{xpm}. This specifies an alist that maps strings that specify symbolic color names to the actual color to be used for that symbolic color (in the form of a string or a color-specifier object). If this is not specified, the contents of @code{xpm-color-symbols} are -used to generate the alist.) +used to generate the alist. @end table If instead of a vector, the instantiator is a string, it will be diff --git a/man/lispref/internationalization.texi b/man/lispref/internationalization.texi index 39eb968..b39bee5 100644 --- a/man/lispref/internationalization.texi +++ b/man/lispref/internationalization.texi @@ -3,7 +3,7 @@ @c Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc. @c See the file lispref.texi for copying conditions. @setfilename ../../info/internationalization.info -@node Internationalization, MULE, LDAP Support, top +@node Internationalization, MULE, PostgreSQL Support, top @chapter Internationalization @menu diff --git a/man/lispref/ldap.texi b/man/lispref/ldap.texi index a3a3ffd..9195a2b 100644 --- a/man/lispref/ldap.texi +++ b/man/lispref/ldap.texi @@ -3,7 +3,7 @@ @c Copyright (C) 1998 Free Software Foundation, Inc. @c See the file lispref.texi for copying conditions. @setfilename ../../info/ldap.info -@node LDAP Support, Internationalization, ToolTalk Support, top +@node LDAP Support, PostgreSQL Support, ToolTalk Support, top @chapter LDAP Support @cindex LDAP diff --git a/man/lispref/lispref.texi b/man/lispref/lispref.texi index 8b22bcf..ac6277b 100644 --- a/man/lispref/lispref.texi +++ b/man/lispref/lispref.texi @@ -159,6 +159,7 @@ Reference Manual, corresponding to XEmacs version 21.0. * Menus:: Defining pull-down and pop-up menus. * Dialog Boxes:: Creating dialog boxes. * Toolbar:: Controlling the toolbar. +* Gutter:: Controlling the gutter. * Scrollbars:: Controlling the scrollbars. * Drag and Drop:: Generic API to inter-application communication via specific protocols. @@ -204,6 +205,7 @@ Reference Manual, corresponding to XEmacs version 21.0. * ToolTalk Support:: Interfacing with the ToolTalk message service. * LDAP Support:: Interfacing with the Lightweight Directory Access Protocol. +* PostgreSQL Support:: Interfacing to the PostgreSQL libpq library. * Internationalization:: How Emacs supports different languages and cultural conventions. * MULE:: Specifics of the Asian-language support. @@ -623,6 +625,8 @@ Toolbar * Specifying the Toolbar:: Setting a toolbar. * Other Toolbar Variables:: Controlling the size of toolbars. +Gutter + Scrollbars Major and Minor Modes @@ -1163,6 +1167,7 @@ Building XEmacs and Object Allocation @include menus.texi @include dialog.texi @include toolbar.texi +@include gutter.texi @include scrollbars.texi @include dragndrop.texi @include modes.texi @@ -1199,6 +1204,7 @@ Building XEmacs and Object Allocation @include x-windows.texi @include tooltalk.texi @include ldap.texi +@include postgresql.texi @include internationalization.texi @include mule.texi diff --git a/man/lispref/minibuf.texi b/man/lispref/minibuf.texi index 1e1e9ed..23508f7 100644 --- a/man/lispref/minibuf.texi +++ b/man/lispref/minibuf.texi @@ -150,23 +150,26 @@ the minibuffer on other occasions. However, if user is supposed to edit default value, @var{initial-contents} may be preferred. @end defun -@defun read-string prompt &optional initial history +@defun read-string prompt &optional initial history default-value This function reads a string from the minibuffer and returns it. The arguments @var{prompt} and @var{initial} are used as in @code{read-from-minibuffer}. The keymap used is @code{minibuffer-local-map}. The optional argument @var{history}, if non-nil, specifies a history -list and optionally the initial position in the list. +list and optionally the initial position in the list. The optional +argument @var{default} specifies a default value to return if the user +enters null input; it should be a string. This function is a simplified interface to the @code{read-from-minibuffer} function: @smallexample @group -(read-string @var{prompt} @var{initial}) +(read-string @var{prompt} @var{initial} @var{history} @var{default}) @equiv{} -(read-from-minibuffer @var{prompt} @var{initial} nil nil nil) +(read-from-minibuffer @var{prompt} @var{initial} nil nil + @var{history} nil @var{default}))) @end group @end smallexample @end defun @@ -205,19 +208,25 @@ default, it makes the following bindings: This section describes functions for reading Lisp objects with the minibuffer. -@defun read-minibuffer prompt &optional initial +@defun read-expression prompt &optional initial history default-value This function reads a Lisp object using the minibuffer, and returns it without evaluating it. The arguments @var{prompt} and @var{initial} are used as in @code{read-from-minibuffer}. +The optional argument @var{history}, if non-nil, specifies a history +list and optionally the initial position in the list. The optional +argument @var{default-value} specifies a default value to return if the +user enters null input; it should be a string. + This is a simplified interface to the @code{read-from-minibuffer} function: @smallexample @group -(read-minibuffer @var{prompt} @var{initial}) +(read-expression @var{prompt} @var{initial} @var{history} @var{default-value}) @equiv{} -(read-from-minibuffer @var{prompt} @var{initial} nil t) +(read-from-minibuffer @var{prompt} @var{initial} nil t + @var{history} nil @var{default-value}) @end group @end smallexample @@ -226,7 +235,7 @@ initial input: @smallexample @group -(read-minibuffer +(read-expression "Enter an expression: " (format "%s" '(testing))) ;; @r{Here is how the minibuffer is displayed:} @@ -244,27 +253,38 @@ The user can type @key{RET} immediately to use the initial input as a default, or can edit the input. @end defun -@defun eval-minibuffer prompt &optional initial +@defun read-minibuffer prompt &optional initial history default-value + +This is a FSF Emacs compatible function. Use @code{read-expression} +instead. +@end defun + +@defun eval-minibuffer prompt &optional initial history default-value This function reads a Lisp expression using the minibuffer, evaluates it, then returns the result. The arguments @var{prompt} and @var{initial} are used as in @code{read-from-minibuffer}. +The optional argument @var{history}, if non-nil, specifies a history +list and optionally the initial position in the list. The optional +argument @var{default-value} specifies a default value to return if the +user enters null input; it should be a string. + This function simply evaluates the result of a call to -@code{read-minibuffer}: +@code{read-expression}: @smallexample @group (eval-minibuffer @var{prompt} @var{initial}) @equiv{} -(eval (read-minibuffer @var{prompt} @var{initial})) +(eval (read-expression @var{prompt} @var{initial})) @end group @end smallexample @end defun -@defun edit-and-eval-command prompt form +@defun edit-and-eval-command prompt command &optional history This function reads a Lisp expression in the minibuffer, and then evaluates it. The difference between this command and -@code{eval-minibuffer} is that here the initial @var{form} is not +@code{eval-minibuffer} is that here the initial @var{command} is not optional and it is treated as a Lisp object to be converted to printed representation rather than as a string of text. It is printed with @code{prin1}, so if it is a string, double-quote characters (@samp{"}) @@ -605,7 +625,7 @@ value of @var{require-match}, and regardless of whether the empty string is included in @var{collection}. The function @code{completing-read} works by calling -@code{read-minibuffer}. It uses @code{minibuffer-local-completion-map} +@code{read-expression}. It uses @code{minibuffer-local-completion-map} as the keymap if @var{require-match} is @code{nil}, and uses @code{minibuffer-local-must-match-map} if @var{require-match} is non-@code{nil}. @xref{Completion Commands}. @@ -755,7 +775,7 @@ The list of completions is displayed as text in a buffer named @samp{*Completions*}. @end deffn -@defun display-completion-list completions +@defun display-completion-list completions &rest cl-keys This function displays @var{completions} to the stream in @code{standard-output}, usually a buffer. (@xref{Read and Print}, for more information about streams.) The argument @var{completions} is normally @@ -832,13 +852,19 @@ Buffer name? (default foo) @point{} @end example @end defun -@defun read-command prompt +@defun read-command prompt &optinal default-value This function reads the name of a command and returns it as a Lisp symbol. The argument @var{prompt} is used as in @code{read-from-minibuffer}. Recall that a command is anything for which @code{commandp} returns @code{t}, and a command name is a symbol for which @code{commandp} returns @code{t}. @xref{Interactive Call}. +The argument @var{default-value} specifies what to return if the user +enters null input. It can be a symbol or a string; if it is a string, +@code{read-command} interns it before returning it. If @var{default} is +@code{nil}, that means no default has been specified; then if the user +enters null input, the return value is @code{nil}. + @example (read-command "Command name? ") @@ -874,10 +900,16 @@ as to complete in the set of extant Lisp symbols, and it uses the @end example @end defun -@defun read-variable prompt +@defun read-variable prompt &optional default-value This function reads the name of a user variable and returns it as a symbol. +The argument @var{default-value} specifies what to return if the user +enters null input. It can be a symbol or a string; if it is a string, +@code{read-variable} interns it before returning it. If @var{default} +is @code{nil}, that means no default has been specified; then if the +user enters null input, the return value is @code{nil}. + @example @group (read-variable "Variable name? ") @@ -920,7 +952,7 @@ predicate @code{user-variable-p} instead of @code{commandp}: file name. It provides special features including automatic insertion of the default directory. -@defun read-file-name prompt &optional directory default existing initial +@defun read-file-name prompt &optional directory default existing initial history This function reads a file name in the minibuffer, prompting with @var{prompt} and providing completion. If @var{default} is non-@code{nil}, then the function returns @var{default} if the user just diff --git a/man/lispref/mule.texi b/man/lispref/mule.texi index cae4960..65e518e 100644 --- a/man/lispref/mule.texi +++ b/man/lispref/mule.texi @@ -6,13 +6,13 @@ @node MULE, Tips, Internationalization, top @chapter MULE -@dfn{MULE} is the name originally given to the version of GNU Emacs + @dfn{MULE} is the name originally given to the version of GNU Emacs extended for multi-lingual (and in particular Asian-language) support. -``MULE'' is short for ``MUlti-Lingual Emacs''. It was originally called -Nemacs (``Nihon Emacs'' where ``Nihon'' is the Japanese word for -``Japan''), when it only provided support for Japanese. XEmacs -refers to its multi-lingual support as @dfn{MULE support} since it -is based on @dfn{MULE}. +``MULE'' is short for ``MUlti-Lingual Emacs''. It is an extension and +complete rewrite of Nemacs (``Nihon Emacs'' where ``Nihon'' is the +Japanese word for ``Japan''), which only provided support for Japanese. +XEmacs refers to its multi-lingual support as @dfn{MULE support} since +it is based on @dfn{MULE}. @menu * Internationalization Terminology:: @@ -20,25 +20,40 @@ is based on @dfn{MULE}. * Charsets:: Sets of related characters. * MULE Characters:: Working with characters in XEmacs/MULE. * Composite Characters:: Making new characters by overstriking other ones. -* ISO 2022:: An international standard for charsets and encodings. * Coding Systems:: Ways of representing a string of chars using integers. * CCL:: A special language for writing fast converters. * Category Tables:: Subdividing charsets into groups. @end menu -@node Internationalization Terminology +@node Internationalization Terminology, Charsets, , MULE @section Internationalization Terminology - In internationalization terminology, a string of text is divided up + In internationalization terminology, a string of text is divided up into @dfn{characters}, which are the printable units that make up the text. A single character is (for example) a capital @samp{A}, the -number @samp{2}, a Katakana character, a Kanji ideograph (an -@dfn{ideograph} is a ``picture'' character, such as is used in Japanese -Kanji, Chinese Hanzi, and Korean Hangul; typically there are thousands -of such ideographs in each language), etc. The basic property of a -character is its shape. Note that the same character may be drawn by -two different people (or in two different fonts) in slightly different -ways, although the basic shape will be the same. +number @samp{2}, a Katakana character, a Hangul character, a Kanji +ideograph (an @dfn{ideograph} is a ``picture'' character, such as is +used in Japanese Kanji, Chinese Hanzi, and Korean Hanja; typically there +are thousands of such ideographs in each language), etc. The basic +property of a character is that it is the smallest unit of text with +semantic significance in text processing. + + Human beings normally process text visually, so to a first approximation +a character may be identified with its shape. Note that the same +character may be drawn by two different people (or in two different +fonts) in slightly different ways, although the "basic shape" will be the +same. But consider the works of Scott Kim; human beings can recognize +hugely variant shapes as the "same" character. Sometimes, especially +where characters are extremely complicated to write, completely +different shapes may be defined as the "same" character in national +standards. The Taiwanese variant of Hanzi is generally the most +complicated; over the centuries, the Japanese, Koreans, and the People's +Republic of China have adopted simplifications of the shape, but the +line of descent from the original shape is recorded, and the meanings +and pronunciation of different forms of the same character are +considered to be identical within each language. (Of course, it may +take a specialist to recognize the related form; the point is that the +relations are standardized, despite the differing shapes.) In some cases, the differences will be significant enough that it is actually possible to identify two or more distinct shapes that both @@ -57,87 +72,122 @@ are different characters rather than different glyphs---e.g. Note that @dfn{character} and @dfn{glyph} are used differently here than elsewhere in XEmacs. - A @dfn{character set} is simply a set of related characters. ASCII, + A @dfn{character set} is essentially a set of related characters. ASCII, for example, is a set of 94 characters (or 128, if you count non-printing characters). Other character sets are ISO8859-1 (ASCII plus various accented characters and other international symbols), -JISX0201 (ASCII, more or less, plus half-width Katakana), JISX0208 -(Japanese Kanji), JISX0212 (a second set of less-used Japanese Kanji), +JIS X 0201 (ASCII, more or less, plus half-width Katakana), JIS X 0208 +(Japanese Kanji), JIS X 0212 (a second set of less-used Japanese Kanji), GB2312 (Mainland Chinese Hanzi), etc. - Every character set has one or more @dfn{orderings}, which can be -viewed as a way of assigning a number (or set of numbers) to each -character in the set. For most character sets, there is a standard -ordering, and in fact all of the character sets mentioned above define a -particular ordering. ASCII, for example, places letters in their -``natural'' order, puts uppercase letters before lowercase letters, -numbers before letters, etc. Note that for many of the Asian character -sets, there is no natural ordering of the characters. The actual -orderings are based on one or more salient characteristic, of which -there are many to choose from---e.g. number of strokes, common -radicals, phonetic ordering, etc. - - The set of numbers assigned to any particular character are called -the character's @dfn{position codes}. The number of position codes -required to index a particular character in a character set is called -the @dfn{dimension} of the character set. ASCII, being a relatively -small character set, is of dimension one, and each character in the -set is indexed using a single position code, in the range 0 through -127 (if non-printing characters are included) or 33 through 126 -(if only the printing characters are considered). JISX0208, i.e. -Japanese Kanji, has thousands of characters, and is of dimension two -- -every character is indexed by two position codes, each in the range -33 through 126. (Note that the choice of the range here is somewhat -arbitrary. Although a character set such as JISX0208 defines an -@emph{ordering} of all its characters, it does not define the actual -mapping between numbers and characters. You could just as easily -index the characters in JISX0208 using numbers in the range 0 through -93, 1 through 94, 2 through 95, etc. The reason for the actual range -chosen is so that the position codes match up with the actual values -used in the common encodings.) + The definition of a character set will implicitly or explicitly give +it an @dfn{ordering}, a way of assigning a number to each character in +the set. For many character sets, there is a natural ordering, for +example the ``ABC'' ordering of the Roman letters. But it is not clear +whether digits should come before or after the letters, and in fact +different European languages treat the ordering of accented characters +differently. It is useful to use the natural order where available, of +course. The number assigned to any particular character is called the +character's @dfn{code point}. (Within a given character set, each +character has a unique code point. Thus the word "set" is ill-chosen; +different orderings of the same characters are different character sets. +Identifying characters is simple enough for alphabetic character sets, +but the difference in ordering can cause great headaches when the same +thousands of characters are used by different cultures as in the Hanzi.) + + A code point may be broken into a number of @dfn{position codes}. The +number of position codes required to index a particular character in a +character set is called the @dfn{dimension} of the character set. For +practical purposes, a position code may be thought of as a byte-sized +index. The printing characters of ASCII, being a relatively small +character set, is of dimension one, and each character in the set is +indexed using a single position code, in the range 1 through 94. Use of +this unusual range, rather than the familiar 33 through 126, is an +intentional abstraction; to understand the programming issues you must +break the equation between character sets and encodings. + + JIS X 0208, i.e. Japanese Kanji, has thousands of characters, and is +of dimension two -- every character is indexed by two position codes, +each in the range 1 through 94. (This number ``94'' is not a +coincidence; we shall see that the JIS position codes were chosen so +that JIS kanji could be encoded without using codes that in ASCII are +associated with device control functions.) Note that the choice of the +range here is somewhat arbitrary. You could just as easily index the +printing characters in ASCII using numbers in the range 0 through 93, 2 +through 95, 3 through 96, etc. In fact, the standardized +@emph{encoding} for the ASCII @emph{character set} uses the range 33 +through 126. An @dfn{encoding} is a way of numerically representing characters from one or more character sets into a stream of like-sized numerical values called @dfn{words}; typically these are 8-bit, 16-bit, or 32-bit quantities. If an encoding encompasses only one character set, then the position codes for the characters in that character set could be used -directly. (This is the case with ASCII, and as a result, most people do -not understand the difference between a character set and an encoding.) -This is not possible, however, if more than one character set is to be -used in the encoding. For example, printed Japanese text typically -requires characters from multiple character sets---ASCII, JISX0208, and -JISX0212, to be specific. Each of these is indexed using one or more -position codes in the range 33 through 126, so the position codes could -not be used directly or there would be no way to tell which character -was meant. Different Japanese encodings handle this differently---JIS -uses special escape characters to denote different character sets; EUC -sets the high bit of the position codes for JISX0208 and JISX0212, and -puts a special extra byte before each JISX0212 character; etc. (JIS, -EUC, and most of the other encodings you will encounter are 7-bit or -8-bit encodings. There is one common 16-bit encoding, which is Unicode; -this strives to represent all the world's characters in a single large -character set. 32-bit encodings are generally used internally in -programs to simplify the code that manipulates them; however, they are -not much used externally because they are not very space-efficient.) +directly. (This is the case with the trivial cipher used by children, +assigning 1 to `A', 2 to `B', and so on.) However, even with ASCII, +other considerations intrude. For example, why are the upper- and +lowercase alphabets separated by 8 characters? Why do the digits start +with `0' being assigned the code 48? In both cases because semantically +interesting operations (case conversion and numerical value extraction) +become convenient masking operations. Other artificial aspects (the +control characters being assigned to codes 0--31 and 127) are historical +accidents. (The use of 127 for @samp{DEL} is an artifact of the "punch +once" nature of paper tape, for example.) + + Naive use of the position code is not possible, however, if more than +one character set is to be used in the encoding. For example, printed +Japanese text typically requires characters from multiple character sets +-- ASCII, JIS X 0208, and JIS X 0212, to be specific. Each of these is +indexed using one or more position codes in the range 1 through 94, so +the position codes could not be used directly or there would be no way +to tell which character was meant. Different Japanese encodings handle +this differently -- JIS uses special escape characters to denote +different character sets; EUC sets the high bit of the position codes +for JIS X 0208 and JIS X 0212, and puts a special extra byte before each +JIS X 0212 character; etc. (JIS, EUC, and most of the other encodings +you will encounter in files are 7-bit or 8-bit encodings. There is one +common 16-bit encoding, which is Unicode; this strives to represent all +the world's characters in a single large character set. 32-bit +encodings are often used internally in programs, such as XEmacs with +MULE support, to simplify the code that manipulates them; however, they +are not used externally because they are not very space-efficient.) + + A general method of handling text using multiple character sets +(whether for multilingual text, or simply text in an extremely +complicated single language like Japanese) is defined in the +international standard ISO 2022. ISO 2022 will be discussed in more +detail later (@pxref{ISO 2022}), but for now suffice it to say that text +needs control functions (at least spacing), and if escape sequences are +to be used, an escape sequence introducer. It was decided to make all +text streams compatible with ASCII in the sense that the codes 0--31 +(and 128-159) would always be control codes, never graphic characters, +and where defined by the character set the @samp{SPC} character would be +assigned code 32, and @samp{DEL} would be assigned 127. Thus there are +94 code points remaining if 7 bits are used. This is the reason that +most character sets are defined using position codes in the range 1 +through 94. Then ISO 2022 compatible encodings are produced by shifting +the position codes 1 to 94 into character codes 33 to 126, or (if 8 bit +codes are available) into character codes 161 to 254. Encodings are classified as either @dfn{modal} or @dfn{non-modal}. In -a @dfn{modal encoding}, there are multiple states that the encoding can be in, -and the interpretation of the values in the stream depends on the +a @dfn{modal encoding}, there are multiple states that the encoding can +be in, and the interpretation of the values in the stream depends on the current global state of the encoding. Special values in the encoding, called @dfn{escape sequences}, are used to change the global state. JIS, for example, is a modal encoding. The bytes @samp{ESC $ B} indicate that, from then on, bytes are to be interpreted as position -codes for JISX0208, rather than as ASCII. This effect is cancelled +codes for JIS X 0208, rather than as ASCII. This effect is cancelled using the bytes @samp{ESC ( B}, which mean ``switch from whatever the -current state is to ASCII''. To switch to JISX0212, the escape sequence -@samp{ESC $ ( D}. (Note that here, as is common, the escape sequences do -in fact begin with @samp{ESC}. This is not necessarily the case, -however.) +current state is to ASCII''. To switch to JIS X 0212, the escape +sequence @samp{ESC $ ( D}. (Note that here, as is common, the escape +sequences do in fact begin with @samp{ESC}. This is not necessarily the +case, however. Some encodings use control characters called "locking +shifts" (effect persists until cancelled) to switch character sets.) -A @dfn{non-modal encoding} has no global state that extends past the + A @dfn{non-modal encoding} has no global state that extends past the character currently being interpreted. EUC, for example, is a -non-modal encoding. Characters in JISX0208 are encoded by setting -the high bit of the position codes, and characters in JISX0212 are +non-modal encoding. Characters in JIS X 0208 are encoded by setting +the high bit of the position codes, and characters in JIS X 0212 are encoded by doing the same but also prefixing the character with the byte 0x8F. @@ -148,10 +198,11 @@ disadvantage, however, is that it is much more difficult to work with if it is not being processed in a sequential manner. In the non-modal EUC encoding, for example, the byte 0x41 always refers to the letter @samp{A}; whereas in JIS, it could either be the letter @samp{A}, or -one of the two position codes in a JISX0208 character, or one of the -two position codes in a JISX0212 character. Determining exactly which +one of the two position codes in a JIS X 0208 character, or one of the +two position codes in a JIS X 0212 character. Determining exactly which one is meant could be difficult and time-consuming if the previous -bytes in the string have not already been processed. +bytes in the string have not already been processed, or impossible if +they are drawn from an external stream that cannot be rewound. Non-modal encodings are further divided into @dfn{fixed-width} and @dfn{variable-width} formats. A fixed-width encoding always uses @@ -163,14 +214,18 @@ fixed-width, and this is in fact one of the main reasons for using an encoding with a larger word size. The advantages of fixed-width encodings should be obvious. The advantages of variable-width encodings are that they are generally more space-efficient and allow -for compatibility with existing 8-bit encodings such as ASCII. - - Note that the bytes in an 8-bit encoding are often referred to -as @dfn{octets} rather than simply as bytes. This terminology -dates back to the days before 8-bit bytes were universal, when -some computers had 9-bit bytes, others had 10-bit bytes, etc. - -@node Charsets +for compatibility with existing 8-bit encodings such as ASCII. (For +example, in Unicode ASCII characters are simply promoted to a 16-bit +representation. That means that every ASCII character contains a +@samp{NUL} byte; evidently all of the standard string manipulation +functions will lose badly in a fixed-width Unicode environment.) + + The bytes in an 8-bit encoding are often referred to as @dfn{octets} +rather than simply as bytes. This terminology dates back to the days +before 8-bit bytes were universal, when some computers had 9-bit bytes, +others had 10-bit bytes, etc. + +@node Charsets, MULE Characters, Internationalization Terminology, MULE @section Charsets A @dfn{charset} in MULE is an object that encapsulates a @@ -189,7 +244,7 @@ This function returns non-@code{nil} if @var{object} is a charset. * Predefined Charsets:: Predefined charset objects. @end menu -@node Charset Properties +@node Charset Properties, Basic Charset Functions, , Charsets @subsection Charset Properties Charsets have the following properties: @@ -261,7 +316,7 @@ character will first be processed according to @code{graphic} and then passed through the CCL program, with the resulting values used to index the font. -This is used, for example, in the Big5 character set (used in Taiwan). + This is used, for example, in the Big5 character set (used in Taiwan). This character set is not ISO-2022-compliant, and its size (94x157) does not fit within the maximum 96x96 size of ISO-2022-compliant character sets. As a result, XEmacs/MULE splits it (in a rather complex fashion, @@ -272,10 +327,11 @@ position codes back into standard Big5 indices to retrieve a character from a Big5 font. @end table -Most of the above properties can only be changed when the charset -is created. @xref{Charset Property Functions}. + Most of the above properties can only be set when the charset is +initialized, and cannot be changed later. +@xref{Charset Property Functions}. -@node Basic Charset Functions +@node Basic Charset Functions, Charset Property Functions, Charset Properties, Charsets @subsection Basic Charset Functions @defun find-charset charset-or-name @@ -298,7 +354,7 @@ This function returns a list of the names of all defined charsets. @defun make-charset name doc-string props This function defines a new character set. This function is for use -with Mule support. @var{name} is a symbol, the name by which the +with MULE support. @var{name} is a symbol, the name by which the character set is normally referred. @var{doc-string} is a string describing the character set. @var{props} is a property list, describing the specific nature of the character set. The recognized @@ -326,17 +382,17 @@ number of characters, and final byte as @var{charset}, but which is displayed in the opposite direction. @end defun -@node Charset Property Functions +@node Charset Property Functions, Predefined Charsets, Basic Charset Functions, Charsets @subsection Charset Property Functions -All of these functions accept either a charset name or charset object. + All of these functions accept either a charset name or charset object. @defun charset-property charset prop This function returns property @var{prop} of @var{charset}. @xref{Charset Properties}. @end defun -Convenience functions are also provided for retrieving individual + Convenience functions are also provided for retrieving individual properties of a charset. @defun charset-name charset @@ -386,7 +442,7 @@ This function returns the CCL program, if any, for converting position codes of characters in @var{charset} into font indices. @end defun -The only property of a charset that can currently be set after + The only property of a charset that can currently be set after the charset has been created is the CCL program. @defun set-charset-ccl-program charset ccl-program @@ -394,10 +450,10 @@ This function sets the @code{ccl-program} property of @var{charset} to @var{ccl-program}. @end defun -@node Predefined Charsets +@node Predefined Charsets, , Charset Property Functions, Charsets @subsection Predefined Charsets -The following charsets are predefined in the C code. + The following charsets are predefined in the C code. @example Name Type Fi Gr Dir Registry @@ -428,7 +484,7 @@ korean-ksc5601 94x94 C 0 l2r KSC5601 composite 96x96 0 l2r --- @end example -The following charsets are predefined in the Lisp code. + The following charsets are predefined in the Lisp code. @example Name Type Fi Gr Dir Registry @@ -452,11 +508,11 @@ vietnamese-upper 96 2 1 l2r VISCII1.1 For all of the above charsets, the dimension and number of columns are the same. -Note that ASCII, Control-1, and Composite are handled specially. + Note that ASCII, Control-1, and Composite are handled specially. This is why some of the fields are blank; and some of the filled-in fields (e.g. the type) are not really accurate. -@node MULE Characters +@node MULE Characters, Composite Characters, Charsets, MULE @section MULE Characters @defun make-char charset arg1 &optional arg2 @@ -483,10 +539,10 @@ if omitted. This function returns a list of the charsets in @var{string}. @end defun -@node Composite Characters +@node Composite Characters, Coding Systems, MULE Characters, MULE @section Composite Characters -Composite characters are not yet completely implemented. + Composite characters are not yet completely implemented. @defun make-composite-char string This function converts a string into a single composite character. The @@ -514,70 +570,259 @@ which the composite character was formed. Non-composite characters are left as-is. @var{buffer} defaults to the current buffer if omitted. @end defun -@node ISO 2022 -@section ISO 2022 - -This section briefly describes the ISO 2022 encoding standard. For more -thorough understanding, please refer to the original document of ISO -2022. +@node Coding Systems, CCL, Composite Characters, MULE +@section Coding Systems -Character sets (@dfn{charsets}) are classified into the following four -categories, according to the number of characters of charset: -94-charset, 96-charset, 94x94-charset, and 96x96-charset. + A coding system is an object that defines how text containing multiple +character sets is encoded into a stream of (typically 8-bit) bytes. The +coding system is used to decode the stream into a series of characters +(which may be from multiple charsets) when the text is read from a file +or process, and is used to encode the text back into the same format +when it is written out to a file or process. -@need 1000 -@table @asis -@item 94-charset - ASCII(B), left(J) and right(I) half of JISX0201, ... -@item 96-charset - Latin-1(A), Latin-2(B), Latin-3(C), ... -@item 94x94-charset - GB2312(A), JISX0208(B), KSC5601(C), ... -@item 96x96-charset - none for the moment -@end table + For example, many ISO-2022-compliant coding systems (such as Compound +Text, which is used for inter-client data under the X Window System) use +escape sequences to switch between different charsets -- Japanese Kanji, +for example, is invoked with @samp{ESC $ ( B}; ASCII is invoked with +@samp{ESC ( B}; and Cyrillic is invoked with @samp{ESC - L}. See +@code{make-coding-system} for more information. -The character in parentheses after the name of each charset -is the @dfn{final character} @var{F}, which can be regarded as -the identifier of the charset. ECMA allocates @var{F} to each -charset. @var{F} is in the range of 0x30..0x7F, but 0x30..0x3F -are only for private use. + Coding systems are normally identified using a symbol, and the symbol is +accepted in place of the actual coding system object whenever a coding +system is called for. (This is similar to how faces and charsets work.) -Note: @dfn{ECMA} = European Computer Manufacturers Association +@defun coding-system-p object +This function returns non-@code{nil} if @var{object} is a coding system. +@end defun -There are four @dfn{registers of charsets}, called G0 thru G3. -You can designate (or assign) any charset to one of these -registers. +@menu +* Coding System Types:: Classifying coding systems. +* ISO 2022:: An international standard for + charsets and encodings. +* EOL Conversion:: Dealing with different ways of denoting + the end of a line. +* Coding System Properties:: Properties of a coding system. +* Basic Coding System Functions:: Working with coding systems. +* Coding System Property Functions:: Retrieving a coding system's properties. +* Encoding and Decoding Text:: Encoding and decoding text. +* Detection of Textual Encoding:: Determining how text is encoded. +* Big5 and Shift-JIS Functions:: Special functions for these non-standard + encodings. +* Predefined Coding Systems:: Coding systems implemented by MULE. +@end menu -The code space contained within one octet (of size 256) is divided into -4 areas: C0, GL, C1, and GR. GL and GR are the areas into which a -register of charset can be invoked into. +@node Coding System Types, ISO 2022, , Coding Systems +@subsection Coding System Types -@example -@group - C0: 0x00 - 0x1F - GL: 0x20 - 0x7F - C1: 0x80 - 0x9F - GR: 0xA0 - 0xFF -@end group -@end example + The coding system type determines the basic algorithm XEmacs will use to +decode or encode a data stream. Character encodings will be converted +to the MULE encoding, escape sequences processed, and newline sequences +converted to XEmacs's internal representation. There are three basic +classes of coding system type: no-conversion, ISO-2022, and special. + + No conversion allows you to look at the file's internal representation. +Since XEmacs is basically a text editor, "no conversion" does convert +newline conventions by default. (Use the 'binary coding-system if this +is not desired.) + + ISO 2022 (@pxref{ISO 2022}) is the basic international standard regulating +use of "coded character sets for the exchange of data", ie, text +streams. ISO 2022 contains functions that make it possible to encode +text streams to comply with restrictions of the Internet mail system and +de facto restrictions of most file systems (eg, use of the separator +character in file names). Coding systems which are not ISO 2022 +conformant can be difficult to handle. Perhaps more important, they are +not adaptable to multilingual information interchange, with the obvious +exception of ISO 10646 (Unicode). (Unicode is partially supported by +XEmacs with the addition of the Lisp package ucs-conv.) + + The special class of coding systems includes automatic detection, CCL (a +"little language" embedded as an interpreter, useful for translating +between variants of a single character set), non-ISO-2022-conformant +encodings like Unicode, Shift JIS, and Big5, and MULE internal coding. +(NB: this list is based on XEmacs 21.2. Terminology may vary slightly +for other versions of XEmacs and for GNU Emacs 20.) -Usually, in the initial state, G0 is invoked into GL, and G1 -is invoked into GR. +@table @code +@item no-conversion +No conversion, for binary files, and a few special cases of non-ISO-2022 +coding systems where conversion is done by hook functions (usually +implemented in CCL). On output, graphic characters that are not in +ASCII or Latin-1 will be replaced by a @samp{?}. (For a +no-conversion-encoded buffer, these characters will only be present if +you explicitly insert them.) +@item iso2022 +Any ISO-2022-compliant encoding. Among others, this includes JIS (the +Japanese encoding commonly used for e-mail), national variants of EUC +(the standard Unix encoding for Japanese and other languages), and +Compound Text (an encoding used in X11). You can specify more specific +information about the conversion with the @var{flags} argument. +@item ucs-4 +ISO 10646 UCS-4 encoding. A 31-bit fixed-width superset of Unicode. +@item utf-8 +ISO 10646 UTF-8 encoding. A ``file system safe'' transformation format +that can be used with both UCS-4 and Unicode. +@item undecided +Automatic conversion. XEmacs attempts to detect the coding system used +in the file. +@item shift-jis +Shift-JIS (a Japanese encoding commonly used in PC operating systems). +@item big5 +Big5 (the encoding commonly used for Taiwanese). +@item ccl +The conversion is performed using a user-written pseudo-code program. +CCL (Code Conversion Language) is the name of this pseudo-code. For +example, CCL is used to map KOI8-R characters (an encoding for Russian +Cyrillic) to ISO8859-5 (the form used internally by MULE). +@item internal +Write out or read in the raw contents of the memory representing the +buffer's text. This is primarily useful for debugging purposes, and is +only enabled when XEmacs has been compiled with @code{DEBUG_XEMACS} set +(the @samp{--debug} configure option). @strong{Warning}: Reading in a +file using @code{internal} conversion can result in an internal +inconsistency in the memory representing a buffer's text, which will +produce unpredictable results and may cause XEmacs to crash. Under +normal circumstances you should never use @code{internal} conversion. +@end table -ISO 2022 distinguishes 7-bit environments and 8-bit environments. In -7-bit environments, only C0 and GL are used. +@node ISO 2022, EOL Conversion, Coding System Types, Coding Systems +@section ISO 2022 -Charset designation is done by escape sequences of the form: + This section briefly describes the ISO 2022 encoding standard. A more +thorough treatment is available in the original document of ISO +2022 as well as various national standards (such as JIS X 0202). + + Character sets (@dfn{charsets}) are classified into the following four +categories, according to the number of characters in the charset: +94-charset, 96-charset, 94x94-charset, and 96x96-charset. This means +that although an ISO 2022 coding system may have variable width +characters, each charset used is fixed-width (in contrast to the MULE +character set and UTF-8, for example). + + ISO 2022 provides for switching between character sets via escape +sequences. This switching is somewhat complicated, because ISO 2022 +provides for both legacy applications like Internet mail that accept +only 7 significant bits in some contexts (RFC 822 headers, for example), +and more modern "8-bit clean" applications. It also provides for +compact and transparent representation of languages like Japanese which +mix ASCII and a national script (even outside of computer programs). + + First, ISO 2022 codified prevailing practice by dividing the code space +into "control" and "graphic" regions. The code points 0x00-0x1F and +0x80-0x9F are reserved for "control characters", while "graphic +characters" must be assigned to code points in the regions 0x20-0x7F and +0xA0-0xFF. The positions 0x20 and 0x7F are special, and under some +circumstances must be assigned the graphic character "ASCII SPACE" and +the control character "ASCII DEL" respectively. + + The various regions are given the name C0 (0x00-0x1F), GL (0x20-0x7F), +C1 (0x80-0x9F), and GR (0xA0-0xFF). GL and GR stand for "graphic left" +and "graphic right", respectively, because of the standard method of +displaying graphic character sets in tables with the high byte indexing +columns and the low byte indexing rows. I don't find it very intuitive, +but these are called "registers". + + An ISO 2022-conformant encoding for a graphic character set must use a +fixed number of bytes per character, and the values must fit into a +single register; that is, each byte must range over either 0x20-0x7F, or +0xA0-0xFF. It is not allowed to extend the range of the repertoire of a +character set by using both ranges at the same. This is why a standard +character set such as ISO 8859-1 is actually considered by ISO 2022 to +be an aggregation of two character sets, ASCII and LATIN-1, and why it +is technically incorrect to refer to ISO 8859-1 as "Latin 1". Also, a +single character's bytes must all be drawn from the same register; this +is why Shift JIS (for Japanese) and Big 5 (for Chinese) are not ISO +2022-compatible encodings. + + The reason for this restriction becomes clear when you attempt to define +an efficient, robust encoding for a language like Japanese. Like ISO +8859, Japanese encodings are aggregations of several character sets. In +practice, the vast majority of characters are drawn from the "JIS Roman" +character set (a derivative of ASCII; it won't hurt to think of it as +ASCII) and the JIS X 0208 standard "basic Japanese" character set +including not only ideographic characters ("kanji") but syllabic +Japanese characters ("kana"), a wide variety of symbols, and many +alphabetic characters (Roman, Greek, and Cyrillic) as well. Although +JIS X 0208 includes the whole Roman alphabet, as a 2-byte code it is not +suited to programming; thus the inclusion of ASCII in the standard +Japanese encodings. + + For normal Japanese text such as in newspapers, a broad repertoire of +approximately 3000 characters is used. Evidently this won't fit into +one byte; two must be used. But much of the text processed by Japanese +computers is computer source code, nearly all of which is ASCII. A not +insignificant portion of ordinary text is English (as such or as +borrowed Japanese vocabulary) or other languages which can represented +at least approximately in ASCII, as well. It seems reasonable then to +represent ASCII in one byte, and JIS X 0208 in two. And this is exactly +what the Extended Unix Code for Japanese (EUC-JP) does. ASCII is +invoked to the GL register, and JIS X 0208 is invoked to the GR +register. Thus, each byte can be tested for its character set by +looking at the high bit; if set, it is Japanese, if clear, it is ASCII. +Furthermore, since control characters like newline can never be part of +a graphic character, even in the case of corruption in transmission the +stream will be resynchronized at every line break, on the order of 60-80 +bytes. This coding system requires no escape sequences or special +control codes to represent 99.9% of all Japanese text. + + Note carefully the distinction between the character sets (ASCII and JIS +X 0208), the encoding (EUC-JP), and the coding system (ISO 2022). The +JIS X 0208 character set is used in three different encodings for +Japanese, but in ISO-2022-JP it is invoked into GL (so the high bit is +always clear), in EUC-JP it is invoked into GR (setting the high bit in +the process), and in Shift JIS the high bit may be set or reset, and the +significant bits are shifted within the 16-bit character so that the two +main character sets can coexist with a third (the "halfwidth katakana" +of JIS X 0201). As the name implies, the ISO-2022-JP encoding is also a +version of the ISO-2022 coding system. + + In order to systematically treat subsidiary character sets (like the +"halfwidth katakana" already mentioned, and the "supplementary kanji" of +JIS X 0212), four further registers are defined: G0, G1, G2, and G3. +Unlike GL and GR, they are not logically distinguished by internal +format. Instead, the process of "invocation" mentioned earlier is +broken into two steps: first, a character set is @dfn{designated} to one +of the registers G0-G3 by use of an @dfn{escape sequence} of the form: @example ESC [@var{I}] @var{I} @var{F} @end example -where @var{I} is an intermediate character in the range 0x20 - 0x2F, and -@var{F} is the final character identifying this charset. +where @var{I} is an intermediate character or characters in the range +0x20 - 0x3F, and @var{F}, from the range 0x30-0x7Fm is the final +character identifying this charset. (Final characters in the range +0x30-0x3F are reserved for private use and will never have a publically +registered meaning.) + + Then that register is @dfn{invoked} to either GL or GR, either +automatically (designations to G0 normally involve invocation to GL as +well), or by use of shifting (affecting only the following character in +the data stream) or locking (effective until the next designation or +locking) control sequences. An encoding conformant to ISO 2022 is +typically defined by designating the initial contents of the G0-G3 +registers, specifying an 7 or 8 bit environment, and specifying whether +further designations will be recognized. -The meaning of intermediate characters are: + Some examples of character sets and the registered final characters +@var{F} used to designate them: + +@need 1000 +@table @asis +@item 94-charset + ASCII (B), left (J) and right (I) half of JIS X 0201, ... +@item 96-charset + Latin-1 (A), Latin-2 (B), Latin-3 (C), ... +@item 94x94-charset + GB2312 (A), JIS X 0208 (B), KSC5601 (C), ... +@item 96x96-charset + none for the moment +@end table + + The meanings of the various characters in these sequences, where not +specified by the ISO 2022 standard (such as the ESC character), are +assigned by @dfn{ECMA}, the European Computer Manufacturers Association. + + The meaning of intermediate characters are: @example @group @@ -586,19 +831,19 @@ The meaning of intermediate characters are: ) [0x29]: designate to G1 a 94-charset whose final byte is @var{F}. * [0x2A]: designate to G2 a 94-charset whose final byte is @var{F}. + [0x2B]: designate to G3 a 94-charset whose final byte is @var{F}. + , [0x2C]: designate to G0 a 96-charset whose final byte is @var{F}. - [0x2D]: designate to G1 a 96-charset whose final byte is @var{F}. . [0x2E]: designate to G2 a 96-charset whose final byte is @var{F}. / [0x2F]: designate to G3 a 96-charset whose final byte is @var{F}. @end group @end example -The following rule is not allowed in ISO 2022 but can be used in Mule. + The comma may be used in files read and written only by MULE, as a MULE +extension, but this is illegal in ISO 2022. (The reason is that in ISO +2022 G0 must be a 94-member character set, with 0x20 assigned the value +SPACE, and 0x7F assigned the value DEL.) -@example - , [0x2C]: designate to G0 a 96-charset whose final byte is @var{F}. -@end example - -Here are examples of designations: + Here are examples of designations: @example @group @@ -610,12 +855,15 @@ Here are examples of designations: @end group @end example -To use a charset designated to G2 or G3, and to use a charset designated +(The short forms used to designate GB2312 and JIS X 0208 are for +backwards compatibility; the long forms are preferred.) + + To use a charset designated to G2 or G3, and to use a charset designated to G1 in a 7-bit environment, you must explicitly invoke G1, G2, or G3 into GL. There are two types of invocation, Locking Shift (forever) and Single Shift (one character only). -Locking Shift is done as follows: + Locking Shift is done as follows: @example LS0 or SI (0x0F): invoke G0 into GL @@ -627,7 +875,7 @@ Locking Shift is done as follows: LS3R: invoke G3 into GR @end example -Single Shift is done as follows: + Single Shift is done as follows: @example @group @@ -636,48 +884,53 @@ Single Shift is done as follows: @end group @end example + The shift functions (such as LS1R and SS3) are represented by control +characters (from C1) in 8 bit environments and by escape sequences in 7 +bit environments. + (#### Ben says: I think the above is slightly incorrect. It appears that SS2 invokes G2 into GR and SS3 invokes G3 into GR, whereas ESC N and ESC O behave as indicated. The above definitions will not parse EUC-encoded text correctly, and it looks like the code in mule-coding.c has similar problems.) -You may realize that there are a lot of ISO-2022-compliant ways of -encoding multilingual text. Now, in the world, there exist many coding -systems such as X11's Compound Text, Japanese JUNET code, and so-called -EUC (Extended UNIX Code); all of these are variants of ISO 2022. + Evidently there are a lot of ISO-2022-compliant ways of encoding +multilingual text. Now, in the world, there exist many coding systems +such as X11's Compound Text, Japanese JUNET code, and so-called EUC +(Extended UNIX Code); all of these are variants of ISO 2022. -In Mule, we characterize ISO 2022 by the following attributes: + In MULE, we characterize a version of ISO 2022 by the following +attributes: @enumerate @item -Initial designation to G0 thru G3. +The character sets initially designated to G0 thru G3. @item -Allow designation of short form for Japanese and Chinese. +Whether short form designations are allowed for Japanese and Chinese. @item -Should we designate ASCII to G0 before control characters? +Whether ASCII should be designated to G0 before control characters. @item -Should we designate ASCII to G0 at the end of line? +Whether ASCII should be designated to G0 at the end of line. @item 7-bit environment or 8-bit environment. @item -Use Locking Shift or not. +Whether Locking Shifts are used or not. @item -Use ASCII or JIS0201-1976-Roman. +Whether to use ASCII or the variant JIS X 0201-1976-Roman. @item -Use JISX0208-1983 or JISX0208-1976. +Whether to use JIS X 0208-1983 or the older version JIS X 0208-1976. @end enumerate (The last two are only for Japanese.) -By specifying these attributes, you can create any variant + By specifying these attributes, you can create any variant of ISO 2022. -Here are several examples: + Here are several examples: @example @group -junet -- Coding system used in JUNET. +ISO-2022-JP -- Coding system used in Japanese email (RFC 1463 #### check). 1. G0 <- ASCII, G1..3 <- never used 2. Yes. 3. Yes. @@ -685,125 +938,50 @@ junet -- Coding system used in JUNET. 5. 7-bit environment 6. No. 7. Use ASCII - 8. Use JISX0208-1983 + 8. Use JIS X 0208-1983 @end group @group -ctext -- Compound Text - 1. G0 <- ASCII, G1 <- Latin-1, G2,3 <- never used +ctext -- X11 Compound Text + 1. G0 <- ASCII, G1 <- Latin-1, G2,3 <- never used. 2. No. 3. No. 4. Yes. - 5. 8-bit environment + 5. 8-bit environment. 6. No. - 7. Use ASCII - 8. Use JISX0208-1983 + 7. Use ASCII. + 8. Use JIS X 0208-1983. @end group @group -euc-china -- Chinese EUC. Although many people call this -as "GB encoding", the name may cause misunderstanding. - 1. G0 <- ASCII, G1 <- GB2312, G2,3 <- never used +euc-china -- Chinese EUC. Often called the "GB encoding", but that is +technically incorrect. + 1. G0 <- ASCII, G1 <- GB 2312, G2,3 <- never used. 2. No. 3. Yes. 4. Yes. - 5. 8-bit environment + 5. 8-bit environment. 6. No. - 7. Use ASCII - 8. Use JISX0208-1983 + 7. Use ASCII. + 8. Use JIS X 0208-1983. @end group @group -korean-mail -- Coding system used in Korean network. - 1. G0 <- ASCII, G1 <- KSC5601, G2,3 <- never used +ISO-2022-KR -- Coding system used in Korean email. + 1. G0 <- ASCII, G1 <- KSC 5601, G2,3 <- never used. 2. No. 3. Yes. 4. Yes. - 5. 7-bit environment + 5. 7-bit environment. 6. Yes. - 7. No. - 8. No. + 7. Use ASCII. + 8. Use JIS X 0208-1983. @end group @end example -Mule creates all these coding systems by default. - -@node Coding Systems -@section Coding Systems - -A coding system is an object that defines how text containing multiple -character sets is encoded into a stream of (typically 8-bit) bytes. The -coding system is used to decode the stream into a series of characters -(which may be from multiple charsets) when the text is read from a file -or process, and is used to encode the text back into the same format -when it is written out to a file or process. - -For example, many ISO-2022-compliant coding systems (such as Compound -Text, which is used for inter-client data under the X Window System) use -escape sequences to switch between different charsets---Japanese Kanji, -for example, is invoked with @samp{ESC $ ( B}; ASCII is invoked with -@samp{ESC ( B}; and Cyrillic is invoked with @samp{ESC - L}. See -@code{make-coding-system} for more information. - -Coding systems are normally identified using a symbol, and the symbol is -accepted in place of the actual coding system object whenever a coding -system is called for. (This is similar to how faces and charsets work.) - -@defun coding-system-p object -This function returns non-@code{nil} if @var{object} is a coding system. -@end defun +MULE creates all of these coding systems by default. -@menu -* Coding System Types:: Classifying coding systems. -* EOL Conversion:: Dealing with different ways of denoting - the end of a line. -* Coding System Properties:: Properties of a coding system. -* Basic Coding System Functions:: Working with coding systems. -* Coding System Property Functions:: Retrieving a coding system's properties. -* Encoding and Decoding Text:: Encoding and decoding text. -* Detection of Textual Encoding:: Determining how text is encoded. -* Big5 and Shift-JIS Functions:: Special functions for these non-standard - encodings. -@end menu - -@node Coding System Types -@subsection Coding System Types - -@table @code -@item nil -@itemx autodetect -Automatic conversion. XEmacs attempts to detect the coding system used -in the file. -@item no-conversion -No conversion. Use this for binary files and such. On output, graphic -characters that are not in ASCII or Latin-1 will be replaced by a -@samp{?}. (For a no-conversion-encoded buffer, these characters will -only be present if you explicitly insert them.) -@item shift-jis -Shift-JIS (a Japanese encoding commonly used in PC operating systems). -@item iso2022 -Any ISO-2022-compliant encoding. Among other things, this includes JIS -(the Japanese encoding commonly used for e-mail), national variants of -EUC (the standard Unix encoding for Japanese and other languages), and -Compound Text (an encoding used in X11). You can specify more specific -information about the conversion with the @var{flags} argument. -@item big5 -Big5 (the encoding commonly used for Taiwanese). -@item ccl -The conversion is performed using a user-written pseudo-code program. -CCL (Code Conversion Language) is the name of this pseudo-code. -@item internal -Write out or read in the raw contents of the memory representing the -buffer's text. This is primarily useful for debugging purposes, and is -only enabled when XEmacs has been compiled with @code{DEBUG_XEMACS} set -(the @samp{--debug} configure option). @strong{Warning}: Reading in a -file using @code{internal} conversion can result in an internal -inconsistency in the memory representing a buffer's text, which will -produce unpredictable results and may cause XEmacs to crash. Under -normal circumstances you should never use @code{internal} conversion. -@end table - -@node EOL Conversion +@node EOL Conversion, Coding System Properties, ISO 2022, Coding Systems @subsection EOL Conversion @table @code @@ -830,7 +1008,7 @@ coding systems. (This value is converted to @code{nil} when stored internally, and @code{coding-system-property} will return @code{nil}.) @end table -@node Coding System Properties +@node Coding System Properties, Basic Coding System Functions, EOL Conversion, Coding Systems @subsection Coding System Properties @table @code @@ -842,6 +1020,18 @@ active. End-of-line conversion to be used. It should be one of the types listed in @ref{EOL Conversion}. +@item eol-lf +The coding system which is the same as this one, except that it uses the +Unix line-breaking convention. + +@item eol-crlf +The coding system which is the same as this one, except that it uses the +DOS line-breaking convention. + +@item eol-cr +The coding system which is the same as this one, except that it uses the +Macintosh line-breaking convention. + @item post-read-conversion Function called after a file has been read in, to perform the decoding. Called with two arguments, @var{beg} and @var{end}, denoting a region of @@ -853,7 +1043,7 @@ Called with two arguments, @var{beg} and @var{end}, denoting a region of the current buffer to be encoded. @end table -The following additional properties are recognized if @var{type} is + The following additional properties are recognized if @var{type} is @code{iso2022}: @table @code @@ -931,7 +1121,7 @@ in one charset to another when encoding is performed. The form of each specification is the same as for @code{input-charset-conversion}. @end table -The following additional properties are recognized (and required) if + The following additional properties are recognized (and required) if @var{type} is @code{ccl}: @table @code @@ -942,13 +1132,16 @@ CCL program used for decoding (converting to internal format). CCL program used for encoding (converting to external format). @end table -@node Basic Coding System Functions + The following properties are used internally: @var{eol-cr}, +@var{eol-crlf}, @var{eol-lf}, and @var{base}. + +@node Basic Coding System Functions, Coding System Property Functions, Coding System Properties, Coding Systems @subsection Basic Coding System Functions @defun find-coding-system coding-system-or-name This function retrieves the coding system of the given name. -If @var{coding-system-or-name} is a coding-system object, it is simply + If @var{coding-system-or-name} is a coding-system object, it is simply returned. Otherwise, @var{coding-system-or-name} should be a symbol. If there is no such coding system, @code{nil} is returned. Otherwise the associated coding system object is returned. @@ -968,6 +1161,11 @@ This function returns a list of the names of all defined coding systems. This function returns the name of the given coding system. @end defun +@defun coding-system-base coding-system +Returns the base coding system (undecided EOL convention) +coding system. +@end defun + @defun make-coding-system name type &optional doc-string props This function registers symbol @var{name} as a coding system. @@ -992,7 +1190,7 @@ This function returns the subsidiary coding system of @var{coding-system} with eol type @var{eol-type}. @end defun -@node Coding System Property Functions +@node Coding System Property Functions, Encoding and Decoding Text, Basic Coding System Functions, Coding Systems @subsection Coding System Property Functions @defun coding-system-doc-string coding-system @@ -1007,7 +1205,7 @@ This function returns the type of @var{coding-system}. This function returns the @var{prop} property of @var{coding-system}. @end defun -@node Encoding and Decoding Text +@node Encoding and Decoding Text, Detection of Textual Encoding, Coding System Property Functions, Coding Systems @subsection Encoding and Decoding Text @defun decode-coding-region start end coding-system &optional buffer @@ -1028,7 +1226,7 @@ encoding. The length of the encoded text is returned. @var{buffer} defaults to the current buffer if unspecified. @end defun -@node Detection of Textual Encoding +@node Detection of Textual Encoding, Big5 and Shift-JIS Functions, Encoding and Decoding Text, Coding Systems @subsection Detection of Textual Encoding @defun coding-category-list @@ -1064,20 +1262,20 @@ according to a detected end-of-line type. Optional arg @var{buffer} defaults to the current buffer. @end defun -@node Big5 and Shift-JIS Functions +@node Big5 and Shift-JIS Functions, Predefined Coding Systems, Detection of Textual Encoding, Coding Systems @subsection Big5 and Shift-JIS Functions -These are special functions for working with the non-standard + These are special functions for working with the non-standard Shift-JIS and Big5 encodings. @defun decode-shift-jis-char code -This function decodes a JISX0208 character of Shift-JIS coding-system. +This function decodes a JIS X 0208 character of Shift-JIS coding-system. @var{code} is the character code in Shift-JIS as a cons of type bytes. The corresponding character is returned. @end defun @defun encode-shift-jis-char ch -This function encodes a JISX0208 character @var{ch} to SHIFT-JIS +This function encodes a JIS X 0208 character @var{ch} to SHIFT-JIS coding-system. The corresponding character code in SHIFT-JIS is returned as a cons of two bytes. @end defun @@ -1093,10 +1291,379 @@ This function encodes the Big5 character @var{char} to BIG5 coding-system. The corresponding character code in Big5 is returned. @end defun +@node Predefined Coding Systems, , Big5 and Shift-JIS Functions, Coding Systems +@subsection Coding Systems Implemented + + MULE initializes most of the commonly used coding systems at XEmacs's +startup. A few others are initialized only when the relevant language +environment is selected and support libraries are loaded. (NB: The +following list is based on XEmacs 21.2.19, the development branch at the +time of writing. The list may be somewhat different for other +versions. Recent versions of GNU Emacs 20 implement a few more rare +coding systems; work is being done to port these to XEmacs.) + + Unfortunately, there is not a consistent naming convention for character +sets, and for practical purposes coding systems often take their name +from their principal character sets (ASCII, KOI8-R, Shift JIS). Others +take their names from the coding system (ISO-2022-JP, EUC-KR), and a few +from their non-text usages (internal, binary). To provide for this, and +for the fact that many coding systems have several common names, an +aliasing system is provided. Finally, some effort has been made to use +names that are registered as MIME charsets (this is why the name +'shift_jis contains that un-Lisp-y underscore). + + There is a systematic naming convention regarding end-of-line (EOL) +conventions for different systems. A coding system whose name ends in +"-unix" forces the assumptions that lines are broken by newlines (0x0A). +A coding system whose name ends in "-mac" forces the assumptions that +lines are broken by ASCII CRs (0x0D). A coding system whose name ends +in "-dos" forces the assumptions that lines are broken by CRLF sequences +(0x0D 0x0A). These subsidiary coding systems are automatically derived +from a base coding system. Use of the base coding system implies +autodetection of the text file convention. (The fact that the -unix, +-mac, and -dos are derived from a base system results in them showing up +as "aliases" in `list-coding-systems'.) These subsidiaries have a +consistent modeline indicator as well. "-dos" coding systems have ":T" +appended to their modeline indicator, while "-mac" coding systems have +":t" appended (eg, "ISO8:t" for iso-2022-8-mac). + + In the following table, each coding system is given with its mode line +indicator in parentheses. Non-textual coding systems are listed first, +followed by textual coding systems and their aliases. (The coding system +subsidiary modeline indicators ":T" and ":t" will be omitted from the +table of coding systems.) + + ### SJT 1999-08-23 Maybe should order these by language? Definitely +need language usage for the ISO-8859 family. + + Note that although true coding system aliases have been implemented for +XEmacs 21.2, the coding system initialization has not yet been converted +as of 21.2.19. So coding systems described as aliases have the same +properties as the aliased coding system, but will not be equal as Lisp +objects. + +@table @code + +@item automatic-conversion +@itemx undecided +@itemx undecided-dos +@itemx undecided-mac +@itemx undecided-unix + +Modeline indicator: @code{Auto}. A type @code{undecided} coding system. +Attempts to determine an appropriate coding system from file contents or +the environment. + +@item raw-text +@itemx no-conversion +@itemx raw-text-dos +@itemx raw-text-mac +@itemx raw-text-unix +@itemx no-conversion-dos +@itemx no-conversion-mac +@itemx no-conversion-unix + +Modeline indicator: @code{Raw}. A type @code{no-conversion} coding system, +which converts only line-break-codes. An implementation quirk means +that this coding system is also used for ISO8859-1. + +@item binary +Modeline indicator: @code{Binary}. A type @code{no-conversion} coding +system which does no character coding or EOL conversions. An alias for +@code{raw-text-unix}. + +@item alternativnyj +@itemx alternativnyj-dos +@itemx alternativnyj-mac +@itemx alternativnyj-unix + +Modeline indicator: @code{Cy.Alt}. A type @code{ccl} coding system used for +Alternativnyj, an encoding of the Cyrillic alphabet. + +@item big5 +@itemx big5-dos +@itemx big5-mac +@itemx big5-unix + +Modeline indicator: @code{Zh/Big5}. A type @code{big5} coding system used for +BIG5, the most common encoding of traditional Chinese as used in Taiwan. + +@item cn-gb-2312 +@itemx cn-gb-2312-dos +@itemx cn-gb-2312-mac +@itemx cn-gb-2312-unix + +Modeline indicator: @code{Zh-GB/EUC}. A type @code{iso2022} coding system used +for simplified Chinese (as used in the People's Republic of China), with +the @code{ascii} (G0), @code{chinese-gb2312} (G1), and @code{sisheng} +(G2) character sets initially designated. Chinese EUC (Extended Unix +Code). + +@item ctext-hebrew +@itemx ctext-hebrew-dos +@itemx ctext-hebrew-mac +@itemx ctext-hebrew-unix + +Modeline indicator: @code{CText/Hbrw}. A type @code{iso2022} coding system +with the @code{ascii} (G0) and @code{hebrew-iso8859-8} (G1) character +sets initially designated for Hebrew. + +@item ctext +@itemx ctext-dos +@itemx ctext-mac +@itemx ctext-unix + +Modeline indicator: @code{CText}. A type @code{iso2022} 8-bit coding system +with the @code{ascii} (G0) and @code{latin-iso8859-1} (G1) character +sets initially designated. X11 Compound Text Encoding. Often +mistakenly recognized instead of EUC encodings; usual cause is +inappropriate setting of @code{coding-priority-list}. + +@item escape-quoted + +Modeline indicator: @code{ESC/Quot}. A type @code{iso2022} 8-bit coding +system with the @code{ascii} (G0) and @code{latin-iso8859-1} (G1) +character sets initially designated and escape quoting. Unix EOL +conversion (ie, no conversion). It is used for .ELC files. + +@item euc-jp +@itemx euc-jp-dos +@itemx euc-jp-mac +@itemx euc-jp-unix + +Modeline indicator: @code{Ja/EUC}. A type @code{iso2022} 8-bit coding system +with @code{ascii} (G0), @code{japanese-jisx0208} (G1), +@code{katakana-jisx0201} (G2), and @code{japanese-jisx0212} (G3) +initially designated. Japanese EUC (Extended Unix Code). + +@item euc-kr +@itemx euc-kr-dos +@itemx euc-kr-mac +@itemx euc-kr-unix + +Modeline indicator: @code{ko/EUC}. A type @code{iso2022} 8-bit coding system +with @code{ascii} (G0) and @code{korean-ksc5601} (G1) initially +designated. Korean EUC (Extended Unix Code). + +@item hz-gb-2312 +Modeline indicator: @code{Zh-GB/Hz}. A type @code{no-conversion} coding +system with Unix EOL convention (ie, no conversion) using +post-read-decode and pre-write-encode functions to translate the Hz/ZW +coding system used for Chinese. + +@item iso-2022-7bit +@itemx iso-2022-7bit-unix +@itemx iso-2022-7bit-dos +@itemx iso-2022-7bit-mac +@itemx iso-2022-7 + +Modeline indicator: @code{ISO7}. A type @code{iso2022} 7-bit coding system +with @code{ascii} (G0) initially designated. Other character sets must +be explicitly designated to be used. + +@item iso-2022-7bit-ss2 +@itemx iso-2022-7bit-ss2-dos +@itemx iso-2022-7bit-ss2-mac +@itemx iso-2022-7bit-ss2-unix + +Modeline indicator: @code{ISO7/SS}. A type @code{iso2022} 7-bit coding system +with @code{ascii} (G0) initially designated. Other character sets must +be explicitly designated to be used. SS2 is used to invoke a +96-charset, one character at a time. + +@item iso-2022-8 +@itemx iso-2022-8-dos +@itemx iso-2022-8-mac +@itemx iso-2022-8-unix + +Modeline indicator: @code{ISO8}. A type @code{iso2022} 8-bit coding system +with @code{ascii} (G0) and @code{latin-iso8859-1} (G1) initially +designated. Other character sets must be explicitly designated to be +used. No single-shift or locking-shift. + +@item iso-2022-8bit-ss2 +@itemx iso-2022-8bit-ss2-dos +@itemx iso-2022-8bit-ss2-mac +@itemx iso-2022-8bit-ss2-unix + +Modeline indicator: @code{ISO8/SS}. A type @code{iso2022} 8-bit coding system +with @code{ascii} (G0) and @code{latin-iso8859-1} (G1) initially +designated. Other character sets must be explicitly designated to be +used. SS2 is used to invoke a 96-charset, one character at a time. + +@item iso-2022-int-1 +@itemx iso-2022-int-1-dos +@itemx iso-2022-int-1-mac +@itemx iso-2022-int-1-unix + +Modeline indicator: @code{INT-1}. A type @code{iso2022} 7-bit coding system +with @code{ascii} (G0) and @code{korean-ksc5601} (G1) initially +designated. ISO-2022-INT-1. + +@item iso-2022-jp-1978-irv +@itemx iso-2022-jp-1978-irv-dos +@itemx iso-2022-jp-1978-irv-mac +@itemx iso-2022-jp-1978-irv-unix + +Modeline indicator: @code{Ja-78/7bit}. A type @code{iso2022} 7-bit coding +system. For compatibility with old Japanese terminals; if you need to +know, look at the source. + +@item iso-2022-jp +@itemx iso-2022-jp-2 (ISO7/SS) +@itemx iso-2022-jp-dos +@itemx iso-2022-jp-mac +@itemx iso-2022-jp-unix +@itemx iso-2022-jp-2-dos +@itemx iso-2022-jp-2-mac +@itemx iso-2022-jp-2-unix + +Modeline indicator: @code{MULE/7bit}. A type @code{iso2022} 7-bit coding +system with @code{ascii} (G0) initially designated, and complex +specifications to insure backward compatibility with old Japanese +systems. Used for communication with mail and news in Japan. The "-2" +versions also use SS2 to invoke a 96-charset one character at a time. + +@item iso-2022-kr +Modeline indicator: @code{Ko/7bit} A type @code{iso2022} 7-bit coding +system with @code{ascii} (G0) and @code{korean-ksc5601} (G1) initially +designated. Used for e-mail in Korea. + +@item iso-2022-lock +@itemx iso-2022-lock-dos +@itemx iso-2022-lock-mac +@itemx iso-2022-lock-unix + +Modeline indicator: @code{ISO7/Lock}. A type @code{iso2022} 7-bit coding +system with @code{ascii} (G0) initially designated, using Locking-Shift +to invoke a 96-charset. + +@item iso-8859-1 +@itemx iso-8859-1-dos +@itemx iso-8859-1-mac +@itemx iso-8859-1-unix + +Due to implementation, this is not a type @code{iso2022} coding system, +but rather an alias for the @code{raw-text} coding system. + +@item iso-8859-2 +@itemx iso-8859-2-dos +@itemx iso-8859-2-mac +@itemx iso-8859-2-unix + +Modeline indicator: @code{MIME/Ltn-2}. A type @code{iso2022} coding +system with @code{ascii} (G0) and @code{latin-iso8859-2} (G1) initially +invoked. + +@item iso-8859-3 +@itemx iso-8859-3-dos +@itemx iso-8859-3-mac +@itemx iso-8859-3-unix + +Modeline indicator: @code{MIME/Ltn-3}. A type @code{iso2022} coding system +with @code{ascii} (G0) and @code{latin-iso8859-3} (G1) initially +invoked. + +@item iso-8859-4 +@itemx iso-8859-4-dos +@itemx iso-8859-4-mac +@itemx iso-8859-4-unix + +Modeline indicator: @code{MIME/Ltn-4}. A type @code{iso2022} coding system +with @code{ascii} (G0) and @code{latin-iso8859-4} (G1) initially +invoked. + +@item iso-8859-5 +@itemx iso-8859-5-dos +@itemx iso-8859-5-mac +@itemx iso-8859-5-unix + +Modeline indicator: @code{ISO8/Cyr}. A type @code{iso2022} coding system with +@code{ascii} (G0) and @code{cyrillic-iso8859-5} (G1) initially invoked. + +@item iso-8859-7 +@itemx iso-8859-7-dos +@itemx iso-8859-7-mac +@itemx iso-8859-7-unix + +Modeline indicator: @code{Grk}. A type @code{iso2022} coding system with +@code{ascii} (G0) and @code{greek-iso8859-7} (G1) initially invoked. + +@item iso-8859-8 +@itemx iso-8859-8-dos +@itemx iso-8859-8-mac +@itemx iso-8859-8-unix + +Modeline indicator: @code{MIME/Hbrw}. A type @code{iso2022} coding system with +@code{ascii} (G0) and @code{hebrew-iso8859-8} (G1) initially invoked. + +@item iso-8859-9 +@itemx iso-8859-9-dos +@itemx iso-8859-9-mac +@itemx iso-8859-9-unix + +Modeline indicator: @code{MIME/Ltn-5}. A type @code{iso2022} coding system +with @code{ascii} (G0) and @code{latin-iso8859-9} (G1) initially +invoked. + +@item koi8-r +@itemx koi8-r-dos +@itemx koi8-r-mac +@itemx koi8-r-unix + +Modeline indicator: @code{KOI8}. A type @code{ccl} coding-system used for +KOI8-R, an encoding of the Cyrillic alphabet. + +@item shift_jis +@itemx shift_jis-dos +@itemx shift_jis-mac +@itemx shift_jis-unix + +Modeline indicator: @code{Ja/SJIS}. A type @code{shift-jis} coding-system +implementing the Shift-JIS encoding for Japanese. The underscore is to +conform to the MIME charset implementing this encoding. + +@item tis-620 +@itemx tis-620-dos +@itemx tis-620-mac +@itemx tis-620-unix + +Modeline indicator: @code{TIS620}. A type @code{ccl} encoding for Thai. The +external encoding is defined by TIS620, the internal encoding is +peculiar to MULE, and called @code{thai-xtis}. + +@item viqr + +Modeline indicator: @code{VIQR}. A type @code{no-conversion} coding +system with Unix EOL convention (ie, no conversion) using +post-read-decode and pre-write-encode functions to translate the VIQR +coding system for Vietnamese. + +@item viscii +@itemx viscii-dos +@itemx viscii-mac +@itemx viscii-unix + +Modeline indicator: @code{VISCII}. A type @code{ccl} coding-system used +for VISCII 1.1 for Vietnamese. Differs slightly from VSCII; VISCII is +given priority by XEmacs. + +@item vscii +@itemx vscii-dos +@itemx vscii-mac +@itemx vscii-unix + +Modeline indicator: @code{VSCII}. A type @code{ccl} coding-system used +for VSCII 1.1 for Vietnamese. Differs slightly from VISCII, which is +given priority by XEmacs. Use +@code{(prefer-coding-system 'vietnamese-vscii)} to give priority to VSCII. + +@end table + @node CCL, Category Tables, Coding Systems, MULE @section CCL -CCL (Code Conversion Language) is a simple structured programming + CCL (Code Conversion Language) is a simple structured programming language designed for character coding conversions. A CCL program is compiled to CCL code (represented by a vector of integers) and executed by the CCL interpreter embedded in Emacs. The CCL interpreter @@ -1107,7 +1674,7 @@ statements) and especially @code{r7} (used internally by several statements and operations, especially for multiple return values and I/O operations). -CCL is used for code conversion during process I/O and file I/O for + CCL is used for code conversion during process I/O and file I/O for non-ISO2022 coding systems. (It is the only way for a user to specify a code conversion function.) It is also used for calculating the code point of an X11 font from a character code. However, since CCL is @@ -1116,14 +1683,14 @@ generic calculation where efficiency is demanded. A combination of three or more arithmetic operations can be calculated faster by CCL than by Emacs Lisp. -@strong{Warning:} The code in @file{src/mule-ccl.c} and + @strong{Warning:} The code in @file{src/mule-ccl.c} and @file{$packages/lisp/mule-base/mule-ccl.el} is the definitive description of CCL's semantics. The previous version of this section contained several typos and obsolete names left from earlier versions of MULE, and many may remain. (I am not an experienced CCL programmer; the few who know CCL well find writing English painful.) -A CCL program transforms an input data stream into an output data + A CCL program transforms an input data stream into an output data stream. The input stream, held in a buffer of constant bytes, is left unchanged. The buffer may be filled by an external input operation, taken from an Emacs buffer, or taken from a Lisp string. The output @@ -1131,7 +1698,7 @@ buffer is a dynamic array of bytes, which can be written by an external output operation, inserted into an Emacs buffer, or returned as a Lisp string. -A CCL program is a (Lisp) list containing two or three members. The + A CCL program is a (Lisp) list containing two or three members. The first member is the @dfn{buffer magnification}, which indicates the required minimum size of the output buffer as a multiple of the input buffer. It is followed by the @dfn{main block} which executes while @@ -1139,7 +1706,7 @@ there is input remaining, and an optional @dfn{EOF block} which is executed when the input is exhausted. Both the main block and the EOF block are CCL blocks. -A @dfn{CCL block} is either a CCL statement or list of CCL statements. + A @dfn{CCL block} is either a CCL statement or list of CCL statements. A @dfn{CCL statement} is either a @dfn{set statement} (either an integer or an @dfn{assignment}, which is a list of a register to receive the assignment, an assignment operator, and an expression) or a @dfn{control @@ -1154,11 +1721,11 @@ depends on the keyword). * CCL Examples:: The encoding functions for Big5 and KOI-8. @end menu -@node CCL Syntax, CCL Statements, CCL, CCL +@node CCL Syntax, CCL Statements, , CCL @comment Node, Next, Previous, Up @subsection CCL Syntax -The full syntax of a CCL program in BNF notation: + The full syntax of a CCL program in BNF notation: @format CCL_PROGRAM := @@ -1217,13 +1784,13 @@ ARRAY := '[' integer ... ']' @comment Node, Next, Previous, Up @subsection CCL Statements -The Emacs Code Conversion Language provides the following statement + The Emacs Code Conversion Language provides the following statement types: @dfn{set}, @dfn{if}, @dfn{branch}, @dfn{loop}, @dfn{repeat}, @dfn{break}, @dfn{read}, @dfn{write}, @dfn{call}, and @dfn{end}. @heading Set statement: -The @dfn{set} statement has three variants with the syntaxes + The @dfn{set} statement has three variants with the syntaxes @samp{(@var{reg} = @var{expression})}, @samp{(@var{reg} @var{assignment_operator} @var{expression})}, and @samp{@var{integer}}. The assignment operator variation of the @@ -1236,10 +1803,10 @@ the form @code{(r0 = @var{integer})}. @heading I/O statements: -The @dfn{read} statement takes one or more registers as arguments. It + The @dfn{read} statement takes one or more registers as arguments. It reads one byte (a C char) from the input into each register in turn. -The @dfn{write} takes several forms. In the form @samp{(write @var{reg} + The @dfn{write} takes several forms. In the form @samp{(write @var{reg} ...)} it takes one or more registers as arguments and writes each in turn to the output. The integer in a register (interpreted as an Emchar) is encoded to multibyte form (ie, Bufbytes) and written to the @@ -1253,13 +1820,13 @@ the @var{reg}th element of the @var{array} to the output. @heading Conditional statements: -The @dfn{if} statement takes an @var{expression}, a @var{CCL block}, and + The @dfn{if} statement takes an @var{expression}, a @var{CCL block}, and an optional @var{second CCL block} as arguments. If the @var{expression} evaluates to non-zero, the first @var{CCL block} is executed. Otherwise, if there is a @var{second CCL block}, it is executed. -The @dfn{read-if} variant of the @dfn{if} statement takes an + The @dfn{read-if} variant of the @dfn{if} statement takes an @var{expression}, a @var{CCL block}, and an optional @var{second CCL block} as arguments. The @var{expression} must have the form @code{(@var{reg} @var{operator} @var{operand})} (where @var{operand} is @@ -1268,7 +1835,7 @@ from the input into the first register operand in the @var{expression}, then conditionally executes a CCL block just as the @code{if} statement does. -The @dfn{branch} statement takes an @var{expression} and one or more CCL + The @dfn{branch} statement takes an @var{expression} and one or more CCL blocks as arguments. The CCL blocks are treated as a zero-indexed array, and the @code{branch} statement uses the @var{expression} as the index of the CCL block to execute. Null CCL blocks may be used as @@ -1276,7 +1843,7 @@ no-ops, continuing execution with the statement following the @code{branch} statement in the containing CCL block. Out-of-range values for the @var{EXPRESSION} are also treated as no-ops. -The @dfn{read-branch} variant of the @dfn{branch} statement takes an + The @dfn{read-branch} variant of the @dfn{branch} statement takes an @var{register}, a @var{CCL block}, and an optional @var{second CCL block} as arguments. The @code{read-branch} statement first reads from the input into the @var{register}, then conditionally executes a CCL @@ -1284,16 +1851,16 @@ block just as the @code{branch} statement does. @heading Loop control statements: -The @dfn{loop} statement creates a block with an implied jump from the + The @dfn{loop} statement creates a block with an implied jump from the end of the block back to its head. The loop is exited on a @code{break} statement, and continued without executing the tail by a @code{repeat} statement. -The @dfn{break} statement, written @samp{(break)}, terminates the + The @dfn{break} statement, written @samp{(break)}, terminates the current loop and continues with the next statement in the current block. -The @dfn{repeat} statement has three variants, @code{repeat}, + The @dfn{repeat} statement has three variants, @code{repeat}, @code{write-repeat}, and @code{write-read-repeat}. Each continues the current loop from its head, possibly after performing I/O. @code{repeat} takes no arguments and does no I/O before jumping. @@ -1309,11 +1876,11 @@ operations for each type of argument. @heading Other control statements: -The @dfn{call} statement, written @samp{(call @var{ccl-program-name})}, + The @dfn{call} statement, written @samp{(call @var{ccl-program-name})}, executes a CCL program as a subroutine. It does not return a value to the caller, but can modify the register status. -The @dfn{end} statement, written @samp{(end)}, terminates the CCL + The @dfn{end} statement, written @samp{(end)}, terminates the CCL program successfully, and returns to caller (which may be a CCL program). It does not alter the status of the registers. @@ -1321,13 +1888,13 @@ program). It does not alter the status of the registers. @comment Node, Next, Previous, Up @subsection CCL Expressions -CCL, unlike Lisp, uses infix expressions. The simplest CCL expressions + CCL, unlike Lisp, uses infix expressions. The simplest CCL expressions consist of a single @var{operand}, either a register (one of @code{r0}, ..., @code{r0}) or an integer. Complex expressions are lists of the form @code{( @var{expression} @var{operator} @var{operand} )}. Unlike C, assignments are not expressions. -In the following table, @var{X} is the target resister for a @dfn{set}. + In the following table, @var{X} is the target resister for a @dfn{set}. In subexpressions, this is implicitly @code{r7}. This means that @code{>8}, @code{//}, @code{de-sjis}, and @code{en-sjis} cannot be used freely in subexpressions, since they return parts of their values in @@ -1361,7 +1928,7 @@ freely in subexpressions, since they return parts of their values in @item @tab @tab @tab r[7] = LOWER_BYTE (DE-SJIS (Y, Z)) @end multitable -The CCL operators are as in C, with the addition of CCL_LSH8, CCL_RSH8, + The CCL operators are as in C, with the addition of CCL_LSH8, CCL_RSH8, CCL_DIVMOD, CCL_ENCODE_SJIS, and CCL_DECODE_SJIS. The CCL_ENCODE_SJIS and CCL_DECODE_SJIS treat their first and second bytes as the high and low bytes of a two-byte character code. (SJIS stands for Shift JIS, an @@ -1370,11 +1937,11 @@ complicated transformation of the Japanese standard JIS encoding to Shift JIS. CCL_DECODE_SJIS is its inverse.) It is somewhat odd to represent the SJIS operations in infix form. -@node Calling CCL, CCL Examples, CCL Expressions, CCL +@node Calling CCL, CCL Examples, CCL Expressions, CCL @comment Node, Next, Previous, Up @subsection Calling CCL -CCL programs are called automatically during Emacs buffer I/O when the + CCL programs are called automatically during Emacs buffer I/O when the external representation has a coding system type of @code{shift-jis}, @code{big5}, or @code{ccl}. The program is specified by the coding system (@pxref{Coding Systems}). You can also call CCL programs from @@ -1411,7 +1978,7 @@ side-effect) to contain the ending values for the corresponding registers and IC. Returns the resulting string. @end defun -To call a CCL program from another CCL program, it must first be + To call a CCL program from another CCL program, it must first be registered: @defun register-ccl-program name ccl-program @@ -1421,7 +1988,7 @@ a CCL program, or nil. Return index number of the registered CCL program. @end defun -Information about the processor time used by the CCL interpreter can be + Information about the processor time used by the CCL interpreter can be obtained using these functions: @defun ccl-elapsed-time @@ -1436,11 +2003,11 @@ value and 0. Resets the CCL interpreter's internal elapsed time registers. @end defun -@node CCL Examples, , Calling CCL, CCL +@node CCL Examples, , Calling CCL, CCL @comment Node, Next, Previous, Up @subsection CCL Examples -This section is not yet written. + This section is not yet written. @node Category Tables, , CCL, MULE @section Category Tables diff --git a/man/lispref/scrollbars.texi b/man/lispref/scrollbars.texi index 6fa6cf9..0e4dbbb 100644 --- a/man/lispref/scrollbars.texi +++ b/man/lispref/scrollbars.texi @@ -3,8 +3,8 @@ @c Copyright (C) 1995 Ben Wing. @c See the file lispref.texi for copying conditions. @setfilename ../../info/glyphs.info -@node Scrollbars, Drag and Drop, Toolbar, top -@chapter scrollbars +@node Scrollbars, Drag and Drop, Gutter, top +@chapter Scrollbars @cindex scrollbars Not yet documented. diff --git a/man/lispref/toolbar.texi b/man/lispref/toolbar.texi index 4a72742..13747cd 100644 --- a/man/lispref/toolbar.texi +++ b/man/lispref/toolbar.texi @@ -3,7 +3,7 @@ @c Copyright (C) 1995, 1996 Ben Wing. @c See the file lispref.texi for copying conditions. @setfilename ../../info/toolbar.info -@node Toolbar, Scrollbars, Dialog Boxes, top +@node Toolbar, Gutter, Dialog Boxes, top @chapter Toolbar @cindex toolbar diff --git a/man/xemacs-faq.texi b/man/xemacs-faq.texi index 7197ea8..5b62a19 100644 --- a/man/xemacs-faq.texi +++ b/man/xemacs-faq.texi @@ -1,4 +1,4 @@ -\input texinfo.tex @c -*-texinfo-*- +\input texinfo.tex @c -*- mode: texinfo; coding: iso-2022-8 -*- @c %**start of header @setfilename ../info/xemacs-faq.info @settitle Frequently asked questions about XEmacs @@ -7,7 +7,7 @@ @finalout @titlepage @title XEmacs FAQ -@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 2000/01/27 17:11:28 $ +@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 2000/03/07 09:19:02 $ @sp 1 @author Tony Rossini @author Ben Wing @@ -403,6 +403,9 @@ Miscellaneous: * Q6.3.2:: What are the differences between the various MS Windows emacsen? * Q6.3.3:: What is the porting team doing at the moment? +Troubleshooting: +* Q6.4.1:: XEmacs won't start on Windows. (NEW) + Current Events: * Q7.0.1:: What is new in 20.2? @@ -697,9 +700,8 @@ Yes, @xref{MS Windows}. @c @uref{ftp://ftp.cs.cornell.edu/pub/parmet/, Emacs 18.59}. Yes, there is a port of XEmacs 19.14, tested on MacOS 7.6.1 and MacOS -8.5.1 by @uref{pjarvis@@ispchannel.com,Pitts Jarvis}. It's available -at @uref{http://my.ispchannel.com/~pjarvis/xemacs.html, -http://my.ispchannel.com/~pjarvis/xemacs.html}. +8.5.1 by @email{pjarvis@@ispchannel.com, Pitts Jarvis}. It's available +at @uref{http://my.ispchannel.com/~pjarvis/xemacs.html}. @node Q1.0.12, Q1.0.13, Q1.0.11, Introduction @unnumberedsubsec Q1.0.12: Is there a port of XEmacs to NextStep? @@ -3035,8 +3037,8 @@ and so on. You can also do this interactively via @kbd{M-x edit-faces}. @end quotation -@unnumberedsec 3.3: The Modeline @node Q3.3.1, Q3.3.2, Q3.2.6, Customization +@unnumberedsec 3.3: The Modeline @unnumberedsubsec Q3.3.1: How can I make the modeline go away? @lisp @@ -6103,6 +6105,9 @@ Miscellaneous * Q6.3.2:: What are the differences between the various MS Windows emacsen? * Q6.3.3:: What is the porting team doing at the moment? +Troubleshooting: +* Q6.4.1:: XEmacs won't start on Windows. (NEW) + @end menu @node Q6.0.1, Q6.0.2, MS Windows, MS Windows @@ -6433,11 +6438,31 @@ others. @end itemize -@node Q6.3.3, , Q6.3.2, MS Windows +@node Q6.3.3, Q6.4.1, Q6.3.2, MS Windows @unnumberedsubsec Q6.3.3: What is the porting team doing at the moment? The porting team is continuing work on the MS Windows-specific code. +@node Q6.4.1, ,Q6.3.3, MS Windows +@unnumberedsec 6.3: Troubleshooting +@unnumberedsubsec Q6.4.1 XEmacs won't start on Windows. (NEW) + +XEmacs relies on a process called "dumping" to generate a working +executable. Under MS-Windows this process effectively fixes the memory +addresses of information in the executable. When XEmacs starts up it tries +to reserve these memory addresses so that the dumping process can be +reversed - putting the information back at the correct addresses. +Unfortunately some .dlls (For instance the soundblaster driver) occupy +memory addresses that can conflict with those needed by the dumped XEmacs +executable. In this instance XEmacs will fail to start without any +explanation. Note that this is extremely machine specific. + +Work is being done on fixes for 21.1.* that will make more intelligent +guesses about which memory addresses will be free and so this should +cure the problem for most people. + +21.2 implements "portable dumping" which will eliminate the problem +altogether. @node Current Events, , MS Windows, Top @unnumbered 7 What the Future Holds diff --git a/man/xemacs/custom.texi b/man/xemacs/custom.texi index ffb5a27..bd54971 100644 --- a/man/xemacs/custom.texi +++ b/man/xemacs/custom.texi @@ -28,8 +28,10 @@ customization in each session. @xref{Init File}. are parsed. * Init File:: How to write common customizations in the @file{.emacs} file. -* Audible Bell:: Changing how Emacs sounds the bell. -* Faces:: Changing the fonts and colors of a region of text. +* Audible Bell:: Changing how Emacs sounds the bell. +* Faces:: Changing the fonts and colors of a region of text. +* Frame Components:: Controlling the presence and positions of the + menubar, toolbars, and gutters. * X Resources:: X resources controlling various aspects of the behavior of XEmacs. @end menu @@ -2052,6 +2054,16 @@ to make underlining an attribute of the face or not. If the optional @var{frame} argument is provided, the face is changed only in that frame; otherwise, it is changed in all frames. +@node Frame Components +@section Frame Components + +You can control the presence and position of most frame components, such +as the menubar, toolbars, and gutters. + +This section is not written yet. Try the Lisp Reference Manual: +@ref{Menubar,,,lispref,}, @ref{Toolbar Intro,,,lispref,}, and +@ref{Gutter Intro,,,lispref,}. + @node X Resources @section X Resources @cindex X resources @@ -2477,7 +2489,7 @@ XEmacs executable (usually @samp{xemacs}), and @subsection Menubar Resources As the menubar is implemented as a widget which is not a part of XEmacs -proper, it does not use the fac" mechanism for specifying fonts and +proper, it does not use the face mechanism for specifying fonts and colors: It uses whatever resources are appropriate to the type of widget which is used to implement it. diff --git a/man/xemacs/frame.texi b/man/xemacs/frame.texi index 52be4b8..8dff083 100644 --- a/man/xemacs/frame.texi +++ b/man/xemacs/frame.texi @@ -41,9 +41,21 @@ At the bottom of each XEmacs frame is the @dfn{echo area} or @dfn{minibuffer window}(@pxref{Echo Area}). It is used by XEmacs to exchange information with the user. There is only one echo area per XEmacs frame. @item -If you are running XEmacs under the X Window System, a +If you are running XEmacs under a graphical windowing system, a menu bar at the top of the frame makes shortcuts to several of the commands available (@pxref{Pull-down Menus}). +@item +If you are running XEmacs under a graphical windowing system, a +toolbar at the top of the frame, just under the menu bar if it exists, +provides ``one-touch'' shortcuts to several commands. (Not yet +documented.) +@item +If you are running XEmacs under a graphical windowing system, a +gutter at the top (under the toolbar) and/or bottom of the frame +provides advanced GUI facilities like tab controls for rapid switching +among related windows and progress bars for time-consuming operations +like downloads across the Internet. Gutters are an experimental feature +introduced in XEmacs version 21.2. (Not yet documented.) @end itemize You can subdivide the XEmacs frame into multiple text windows, and use diff --git a/man/xemacs/glossary.texi b/man/xemacs/glossary.texi index a8c21aa..dd2321f 100644 --- a/man/xemacs/glossary.texi +++ b/man/xemacs/glossary.texi @@ -278,7 +278,7 @@ screen. When running Emacs under X, you can have multiple frames, each corresponding to a top-level X window and each looking like the screen on a TTY. Each frame contains one or more non-overlapping Emacs windows (possibly with associated scrollbars, under X), an -echo area, and (under X) possibly a menubar. +echo area, and (under X) possibly a menubar, toolbar, and/or gutter. @item Global Global means `independent of the current environment; in effect diff --git a/man/xemacs/help.texi b/man/xemacs/help.texi index 2b517fc..6fa5fd8 100644 --- a/man/xemacs/help.texi +++ b/man/xemacs/help.texi @@ -1,20 +1,28 @@ @node Help, Mark, M-x, Top @chapter Help +@kindex Help @cindex help @cindex self-documentation +@findex help-command +@kindex C-h +@kindex F1 - Emacs provides extensive help features which revolve around a single + XEmacs provides extensive help features accessible through a single character, @kbd{C-h}. @kbd{C-h} is a prefix key that is used only for -documentation-printing commands. The characters you can type after +documentation-printing commands. The characters that you can type after @kbd{C-h} are called @dfn{help options}. One help option is @kbd{C-h}; -you use it to ask for help about using @kbd{C-h}. +that is how you ask for help about using @kbd{C-h}. To cancel, type +@kbd{C-g}. The function key @key{F1} is equivalent to @kbd{C-h}. - @kbd{C-h C-h} prints a list of the possible help options, and then asks -you to type the desired option. It prompts with the string: +@kindex C-h C-h +@findex help-for-help + @kbd{C-h C-h} (@code{help-for-help}) displays a list of the possible +help options, and then asks you to type the desired option. It prompts +with the string: @smallexample -A, B, C, F, I, K, L, M, N, S, T, V, W, C-c, C-d, C-n, C-w or C-h for more help: +A B C F I K L M N P S T V W C-c C-d C-f C-i C-k C-n C-w; ? for more help: @end smallexample @noindent @@ -23,66 +31,109 @@ You should type one of those characters. Typing a third @kbd{C-h} displays a description of what the options mean; Emacs still waits for you to type an option. To cancel, type @kbd{C-g}. + Most help buffers use a special major mode, Help mode, which lets you +scroll conveniently with @key{SPC} and @key{DEL} or @key{BS}. + +@menu +* Help Summary:: Brief list of all Help commands. +* Key Help:: Asking what a key does in XEmacs. +* Name Help:: Asking about a command, variable or function name. +* Apropos:: Asking what pertains to a given topic. +* Library Keywords:: Finding Lisp libraries by keywords (topics). +* Help Mode:: Special features of Help mode and Help buffers. +* Misc Help:: Other help commands. +@end menu + +@iftex +@node Help Summary, Help Summary, Help, Help +@end iftex +@ifinfo +@node Help Summary, Key Help, Help, Help +@section Help Summary +@end ifinfo + Here is a summary of the defined help commands. @table @kbd -@item C-h a @var{string} @key{RET} -Display a list of commands whose names contain @var{string} -(@code{command-@*apropos}).@refill +@item C-h a @var{regexp} @key{RET} +Display a list of functions and variables whose names match @var{regexp} +(@code{heper-apropos}). +@item C-h A @var{regexp} +Show all commands whose names contain matches for @var{regexp} +(@code{command-apropos}). @item C-h b -Display a table of all key bindings currently in effect, with local bindings of -the current major mode first, followed by all global bindings -(@code{describe-bindings}). +Display a table of all key bindings currently in effect, with local +bindings of the current major mode first, followed by all global +bindings (@code{describe-bindings}). @item C-h c @var{key} -Print the name of the command that @var{key} runs (@code{describe-key-@*briefly}). -@kbd{c} is for `character'. For more extensive information on @var{key}, -use @kbd{C-h k}. -@item C-h f @var{function} @key{RET} +Print the name of the command that @var{key} runs +(@code{describe-key-briefly}). Here @kbd{c} stands for `character'. For more +extensive information on @var{key}, use @kbd{C-h k}. +@item C-h d @var{function} @key{RET} +@itemx C-h f @var{function} @key{RET} Display documentation on the Lisp function named @var{function} -(@code{describe-function}). Note that commands are Lisp functions, so +(@code{describe-function}). Since commands are Lisp functions, a command name may be used. @item C-h i Run Info, the program for browsing documentation files (@code{info}). -The complete Emacs manual is available online in Info. +The complete XEmacs manual is available online in Info. @item C-h k @var{key} -Display name and documentation of the command @var{key} runs (@code{describe-key}). +Display the name and documentation of the command that @var{key} runs +(@code{describe-key}). @item C-h l Display a description of the last 100 characters you typed (@code{view-lossage}). @item C-h m Display documentation of the current major mode (@code{describe-mode}). @item C-h n -Display documentation of Emacs changes, most recent first +@itemx C-h C-n +Display documentation of XEmacs changes, most recent first (@code{view-emacs-news}). @item C-h p +Find packages by topic keyword (@code{finder-by-keyword}). +@item C-h C-p Display a table of all mouse bindings currently in effect now, with -local bindings of the current major mode first, followed by all global bindings -(@code{describe-pointer}). +local bindings of the current major mode first, followed by all global +bindings (@code{describe-pointer}). @item C-h s Display current contents of the syntax table, plus an explanation of -what they mean (@code{describe-syntax}). +what they mean (@code{describe-syntax}). @xref{Syntax}. @item C-h t -Display the Emacs tutorial (@code{help-with-tutorial}). +Enter the XEmacs interactive tutorial (@code{help-with-tutorial}). @item C-h v @var{var} @key{RET} Display the documentation of the Lisp variable @var{var} -(@code{describe-@*variable}). +(@code{describe-variable}). @item C-h w @var{command} @key{RET} Print which keys run the command named @var{command} (@code{where-is}). -@item M-x apropos @var{regexp} -Show all symbols whose names contain matches for @var{regexp}. +@item C-h B @key{RET} +Display info on how to deal with Beta versions of XEmacs +(@code{describe-beta}). +@item C-h C @var{group} @key{RET} +Select customization buffer for @var{group} (@code{customize}). +@item C-h F @key{RET} +View the local copy of the XEmacs FAQ (@code{xemacs-local-faq}). +@item C-h C-i @var{file} @key{RET} +Read Info file @var{file} with Info browser (@code{Info-query}). +@item C-h C-c @var{command} @key{RET} +Look up an Emacs command @var{command} in the Emacs manual in the Info +system (@code{Info-goto-emacs-command-node}). +@item C-h C-f @var{function} @key{RET} +Look up an Emacs Lisp function @var{function} in the Elisp manual in the +Info system (@code{Info-elisp-ref}). @end table +@node Key Help, Name Help, Help Summary, Help @section Documentation for a Key @kindex C-h c @findex describe-key-briefly The most basic @kbd{C-h} options are @kbd{C-h c} -(@code{describe-key-briefly}) and @kbd{C-h k}@*(@code{describe-key}). -@kbd{C-h c @var{key}} prints the name of the command that @var{key} is -bound to in the echo area. For example, @kbd{C-h c C-f} prints +(@code{describe-key-briefly}) and @w{@kbd{C-h k}} (@code{describe-key}). +@kbd{C-h c @var{key}} prints in the echo area the name of the command +that @var{key} is bound to. For example, @kbd{C-h c C-f} prints @samp{forward-char}. Since command names are chosen to describe what -the command does, using this option is a good way to get a somewhat cryptic -description of what @var{key} does.@refill +the commands do, this is a good way to get a very brief description of +what @var{key} does. @kindex C-h k @findex describe-key @@ -93,6 +144,10 @@ vector of events. When called interactively, @var{key} may also be a menu selection. This information does not usually fit into the echo area, so a window is used for the display. + @kbd{C-h c} and @kbd{C-h k} work for any sort of key sequences, +including function keys and mouse events. + +@node Name Help, Apropos, Key Help, Help @section Help by Command or Variable Name @kindex C-h f @@ -116,117 +171,238 @@ If the variable @code{describe-function-show-arglist} is @code{t}, @code{describe-function} shows its arglist if the @var{function} is not an autoload function. - @kbd{C-h f} is also useful for Lisp functions you are planning to -use in a Lisp program. For example, if you have just written the code -@code{(make-vector len)} and want to make sure you are using -@code{make-vector} properly, type @kbd{C-h f make-vector @key{RET}}. Because -@kbd{C-h f} allows all function names, not just command names, you may find -that some of your favorite abbreviations that work in @kbd{M-x} don't work -in @kbd{C-h f}. An abbreviation may be unique among command names, yet fail -to be unique when other function names are allowed. - - -If you type @key{RET}, leaving the minibuffer empty, @kbd{C-h f} by -default describes the function called by the innermost Lisp expression -in the buffer around point, @i{provided} that that is a valid, defined Lisp -function name. For example, if point is located following the text + @kbd{C-h f} is also useful for Lisp functions that you are planning to +use in a Lisp program. For example, if you have just written the +expression @code{(make-vector len)} and want to make sure you are using +@code{make-vector} properly, type @kbd{C-h f make-vector @key{RET}}. +Because @kbd{C-h f} allows all function names, not just command names, +you may find that some of your favorite abbreviations that work in +@kbd{M-x} don't work in @kbd{C-h f}. An abbreviation may be unique +among command names, yet fail to be unique when other function names are +allowed. + + The function name for @kbd{C-h f} to describe has a default which is +used if you type @key{RET} leaving the minibuffer empty. The default is +the function called by the innermost Lisp expression in the buffer +around point, @emph{provided} that is a valid, defined Lisp function +name. For example, if point is located following the text @samp{(make-vector (car x)}, the innermost list containing point is the -one starting with @samp{(make-vector}, so the default is to describe -the function @code{make-vector}. +one that starts with @samp{(make-vector}, so the default is to describe the +function @code{make-vector}. @kbd{C-h f} is often useful just to verify that you have the right -spelling for the function name. If @kbd{C-h f} mentions a default in the -prompt, you have typed the name of a defined Lisp function. If that is -what you wanted to know, just type @kbd{C-g} to cancel the @kbd{C-h f} -command and continue editing. +spelling for the function name. If @kbd{C-h f} mentions a name from the +buffer as the default, that name must be defined as a Lisp function. If +that is all you want to know, just type @kbd{C-g} to cancel the @kbd{C-h +f} command, then go on editing. @kindex C-h w @findex where-is - @kbd{C-h w @var{command} @key{RET}} (@code{where-s}) tells you what + @kbd{C-h w @var{command} @key{RET}} (@code{where-is}) tells you what keys are bound to @var{command}. It prints a list of the keys in the -echo area. Alternatively, it informs you that a command is not bound to -any keys, which implies that you must use @kbd{M-x} to call the -command.@refill +echo area. Alternatively, it informs you that a command is not bound to +any keys, which implies that you must use @kbd{M-x} to call the +command. @kindex C-h v @findex describe-variable @kbd{C-h v} (@code{describe-variable}) is like @kbd{C-h f} but describes Lisp variables instead of Lisp functions. Its default is the Lisp symbol around or before point, if that is the name of a known Lisp -variable. @xref{Variables}.@refill +variable. @xref{Variables}. +@node Apropos, Library Keywords, Name Help, Help @section Apropos -@kindex C-h a +@kindex C-h A @findex command-apropos -@cindex apropos +@cindex apropos @table @kbd -@item C-h a +@item C-h A Show only symbols that are names of commands -(@code{command-apropos}).@refill +(@code{command-apropos}). @item M-x apropos @var{regexp} Show all symbols whose names comtain matches for @var{regexp}. @end table - It is possible to ask a question like, ``What are the commands for -working with files?'' To do this, type @kbd{C-h a file @key{RET}}, -which displays a list of all command names that contain @samp{file}, -such as @code{copy-file}, @code{find-file}, and so on. With each -command name a brief description of its use and information on the keys -you can use to invoke it is displayed. For example, you would be -informed that you can invoke @code{find-file} by typing @kbd{C-x C-f}. -The @kbd{a} in @kbd{C-h a} stands for `Apropos'; @kbd{C-h a} runs the -Lisp function @code{command-apropos}.@refill - - Because @kbd{C-h a} looks only for functions whose names contain the + A more sophisticated sort of question to ask is, ``What are the +commands for working with files?'' To ask this question, type @kbd{C-h +a file @key{RET}}, which displays a list of all command names that +contain @samp{file}, including @code{copy-file}, @code{find-file}, and +so on. With each command name appears a brief description of how to use +the command, and what keys you can currently invoke it with. For +example, it would say that you can invoke @code{find-file} by typing +@kbd{C-x C-f}. The @kbd{A} in @kbd{C-h A} stands for `Apropos'; +@kbd{C-h A} runs the command @code{command-apropos}. This command +normally checks only commands (interactive functions); if you specify a +prefix argument, it checks noninteractive functions as well. + + Because @kbd{C-h A} looks only for functions whose names contain the string you specify, you must use ingenuity in choosing the string. If you are looking for commands for killing backwards and @kbd{C-h a -kill-backwards @key{RET}} doesn't reveal any commands, don't give up. -Try just @kbd{kill}, or just @kbd{backwards}, or just @kbd{back}. Be -persistent. Pretend you are playing Adventure. Also note that you can -use a regular expression as the argument (@pxref{Regexps}). +kill-backwards @key{RET}} doesn't reveal any, don't give up. Try just +@kbd{kill}, or just @kbd{backwards}, or just @kbd{back}. Be persistent. +Pretend you are playing Adventure. Also note that you can use a regular +expression as the argument, for more flexibility (@pxref{Regexps}). Here is a set of arguments to give to @kbd{C-h a} that covers many -classes of Emacs commands, since there are strong conventions for naming -standard Emacs commands. By giving you a feeling for the naming -conventions, this set of arguments can also help you develop a -technique for picking @code{apropos} strings. +classes of XEmacs commands, since there are strong conventions for +naming the standard XEmacs commands. By giving you a feel for the +naming conventions, this set should also serve to aid you in developing +a technique for picking @code{apropos} strings. @quotation char, line, word, sentence, paragraph, region, page, sexp, list, defun, -buffer, frame, window, file, dir, register, mode, -beginning, end, forward, backward, next, previous, up, down, search, goto, -kill, delete, mark, insert, yank, fill, indent, case, -change, set, what, list, find, view, describe. +rect, buffer, frame, window, face, file, dir, register, mode, beginning, +end, forward, backward, next, previous, up, down, search, goto, kill, +delete, mark, insert, yank, fill, indent, case, change, set, what, list, +find, view, describe, default. @end quotation @findex apropos To list all Lisp symbols that contain a match for a regexp, not just the ones that are defined as commands, use the command @kbd{M-x apropos} -instead of @kbd{C-h a}. +instead of @kbd{C-h A}. This command does not check key bindings by +default; specify a numeric argument if you want it to check them. + +@findex apropos-documentation + The @code{apropos-documentation} command is like @code{apropos} except +that it searches documentation strings for matches for the specified +regular expression. + +@findex apropos-value + The @code{apropos-value} command is like @code{apropos} except that it +searches symbols' values for matches for the specified regular +expression. This command does not check function definitions or +property lists by default; specify a numeric argument if you want it to +check them. + +@vindex apropos-do-all + If the variable @code{apropos-do-all} is non-@code{nil}, the commands +above all behave as if they had been given a prefix argument. + + If you want more information about a function definition, variable or +symbol property listed in the Apropos buffer, you can click on it with +@kbd{Mouse-2} or move there and type @key{RET}. + +@node Library Keywords, Help Mode, Apropos, Help +@section Keyword Search for Lisp Libraries + +@kindex C-h p +@findex finder-by-keyword +The @kbd{C-h p} command lets you search the standard Emacs Lisp +libraries by topic keywords. Here is a partial list of keywords you can +use: + +@display +abbrev abbreviation handling, typing shortcuts, macros +bib code related to the `bib' bibliography processor +c C, C++, and Objective-C language support +calendar calendar and time management support +comm communications, networking, remote access to files +data support for editing files of data +docs support for Emacs documentation +dumped files preloaded into Emacs +emulations emulations of other editors +extensions Emacs Lisp language extensions +faces support for multiple fonts +frames support for Emacs frames and window systems +games games, jokes and amusements +hardware support for interfacing with exotic hardware +help support for on-line help systems +hypermedia support for links between text or other media types +i18n internationalization and alternate character-set support +internal code for Emacs internals, build process, defaults +languages specialized modes for editing programming languages +lisp Lisp support, including Emacs Lisp +local code local to your site +maint maintenance aids for the Emacs development group +mail modes for electronic-mail handling +matching various sorts of searching and matching +mouse mouse support +mule multi-language extensions +news support for netnews reading and posting +oop support for object-oriented programming +outlines support for hierarchical outlining +processes process, subshell, compilation, and job control support +terminals support for terminal types +tex code related to the TeX formatter +tools programming tools +unix front-ends/assistants for, or emulators of, UNIX features +vms support code for vms +wp word processing +@end display + +@node Help Mode, Misc Help, Library Keywords, Help +@section Help Mode Commands + + Help buffers provide the commands of View mode (@pxref{Misc File +Ops}), plus a few special commands of their own. +@table @kbd +@item @key{SPC} +Scroll forward. +@item @key{DEL} +@itemx @key{BS} +Scroll backward. +@c @item @key{RET} +@c Follow a cross reference at point. +@c @item @key{TAB} +@c Move point forward to the next cross reference. +@c @item S-@key{TAB} +@c Move point back to the previous cross reference. +@c @item Mouse-2 +@c Follow a cross reference that you click on. +@end table + + When a command name (@pxref{M-x,, Running Commands by Name}) or +variable name (@pxref{Variables}) appears in the documentation, it +normally appears inside paired single-quotes. + +@node Misc Help, , Help Mode, Help @section Other Help Commands @kindex C-h i @findex info +@cindex Info +@cindex manuals, on-line +@cindex on-line manuals @kbd{C-h i} (@code{info}) runs the Info program, which is used for -browsing through structured documentation files. The entire Emacs manual +browsing through structured documentation files. The entire XEmacs manual is available within Info. Eventually all the documentation of the GNU system will be available. Type @kbd{h} after entering Info to run a tutorial on using Info. + If you specify a numeric argument, @kbd{C-h i} prompts for the name of +a documentation file. This way, you can browse a file which doesn't +have an entry in the top-level Info menu. It is also handy when you +need to get to the documentation quickly, and you know the exact name of +the file. + +@kindex C-h C-f +@kindex C-h C-k +@findex Info-elisp-ref +@findex Info-goto-emacs-command-node + There are two special help commands for accessing XEmacs documentation +through Info. @kbd{C-h C-f @var{function} @key{RET}} enters Info and +goes straight to the documentation of the XEmacs function +@var{function}. @kbd{C-h C-k @var{key}} enters Info and goes straight +to the documentation of the key @var{key}. These two keys run the +commands @code{Info-elisp-ref} and +@code{Info-goto-emacs-key-command-node}. + @kindex C-h l @findex view-lossage If something surprising happens, and you are not sure what commands you typed, use @kbd{C-h l} (@code{view-lossage}). @kbd{C-h l} prints the last -100 command characters you typed. If you see commands you don't -know, use @kbd{C-h c} to find out what they do. +100 command characters you typed in. If you see commands that you don't +know, you can use @kbd{C-h c} to find out what they do. @kindex C-h m @findex describe-mode - Emacs has several major modes. Each mode redefines a few keys and + XEmacs has several major modes. Each mode redefines a few keys and makes a few other changes in how editing works. @kbd{C-h m} (@code{describe-mode}) prints documentation on the current major mode, which normally describes all the commands that are changed in this mode. @@ -234,13 +410,21 @@ which normally describes all the commands that are changed in this mode. @kindex C-h b @findex describe-bindings @kbd{C-h b} (@code{describe-bindings}) and @kbd{C-h s} -(@code{describe-syntax}) present information about the current Emacs +(@code{describe-syntax}) present information about the current XEmacs mode that is not covered by @kbd{C-h m}. @kbd{C-h b} displays a list of -all key bindings currently in effect, with the local bindings of the current -major mode first, followed by the global bindings (@pxref{Key +all the key bindings currently in effect, with the local bindings of the +current major mode first, followed by the global bindings (@pxref{Key Bindings}). @kbd{C-h s} displays the contents of the syntax table with -explanations of each character's syntax (@pxref{Syntax}).@refill +explanations of each character's syntax (@pxref{Syntax}). + + You can get a similar list for a particular prefix key by typing +@kbd{C-h} after the prefix key. (There are a few prefix keys for which +this does not work---those that provide their own bindings for +@kbd{C-h}. One of these is @key{ESC}, because @kbd{@key{ESC} C-h} is +actually @kbd{C-M-h}, which marks a defun.) +@kindex C-h F +@findex xemacs-local-faq @kindex C-h n @findex view-emacs-news @kindex C-h t @@ -252,14 +436,16 @@ explanations of each character's syntax (@pxref{Syntax}).@refill @kindex C-h C-w @findex describe-no-warranty The other @kbd{C-h} options display various files of useful -information. @kbd{C-h C-w} (@code{describe-no-warranty}) displays -details on the complete absence of warranty for XEmacs. @kbd{C-h n} -(@code{view-emacs-news}) displays the file @file{emacs/etc/NEWS}, which -contains documentation on Emacs changes arranged chronologically. -@kbd{C-h t} (@code{help-with-tutorial}) displays the learn-by-doing -Emacs tutorial. @kbd{C-h C-c} (@code{describe-copying}) displays the file -@file{emacs/etc/COPYING}, which tells you the conditions you must obey -in distributing copies of Emacs. @kbd{C-h C-d} +information. @kbd{C-h C-w} (@code{describe-no-warranty}) displays the +full details on the complete absence of warranty for XEmacs. @kbd{C-h +n} (@code{view-emacs-news}) displays the file @file{xemacs/etc/NEWS}, +which contains documentation on XEmacs changes arranged chronologically. +@kbd{C-h F} (@code{xemacs-local-faq}) displays local version of the +XEmacs frequentliy-answered-questions-list. @kbd{C-h t} +(@code{help-with-tutorial}) displays the learn-by-doing XEmacs +tutorial. @kbd{C-h C-c} (@code{describe-copying}) displays the file +@file{xemacs/etc/COPYING}, which tells you the conditions you must obey +in distributing copies of XEmacs. @kbd{C-h C-d} (@code{describe-distribution}) displays another file named -@file{emacs/etc/DISTRIB}, which tells you how you can order a copy of -the latest version of Emacs.@refill +@file{xemacs/etc/DISTRIB}, which tells you how you can order a copy of +the latest version of XEmacs. diff --git a/man/xemacs/xemacs.texi b/man/xemacs/xemacs.texi index cbbf13c..dbcc221 100644 --- a/man/xemacs/xemacs.texi +++ b/man/xemacs/xemacs.texi @@ -271,9 +271,13 @@ Using X Selections Registers -* RegPos:: Saving positions in registers. -* RegText:: Saving text in registers. -* RegRect:: Saving rectangles in registers. +* Position: RegPos. Saving positions in registers. +* Text: RegText. Saving text in registers. +* Rectangle: RegRect. Saving rectangles in registers. +* Configurations: RegConfig. Saving window configurations in registers. +* Files: RegFiles. File names in registers. +* Numbers: RegNumbers. Numbers in registers. +* Bookmarks:: Bookmarks are like registers, but persistent. Controlling the Display diff --git a/nt/ChangeLog b/nt/ChangeLog index fffa7b9..e7ec435 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,66 @@ +2000-03-20 Martin Buchholz + + * XEmacs 21.2.32 is released. + +2000-03-15 Mike Alexander + + * xemacs.mak: Fix for generation of $(XEMACS)\Installation. + +2000-03-14 Adrian Aichner + + * xemacs.mak (LIB_SRC_TOOLS): LIB_SRC_TOOLS depend on + XEMACS_INCLUDES when we USE_PORTABLE_DUMPER. + +2000-03-13 Ben Wing + + * xemacs.mak (TEMACS_ENTRYPOINT): + Fix for portable dumper. + +2000-03-12 Ben Wing + + * xemacs.mak (*): + * config.inc: New. + + a) Added a file called config.inc which makes it easier to set + build options for MS Windows. (Previously, the only way to do this + was through command line options to nmake.) + + b) Cleaned the file up a bit. + + c) Changed xemacs to be a windows application and not a console + application, now that runemacs.exe is no longer necessary. + + d) Added support for building the tags file. + + * xemacs.dsw: New. + * xemacs.dsp: New. + For compiling, editing, and debugging XEmacs using the VC++ 5.0 + GUI. They may well work under other versions of VC++, but I don't + have access to them to test them. + +2000-03-11 Andy Piper + + * PROBLEMS: Doc fix from Reini Urban . + +2000-02-27 Mike Alexander + + * xemacs.rc: Include the portable dump data if INCLUDE_DUMP is defined + + * xemacs.mak: Add the portable dump data to the EXE as a resource + +2000-03-07 Jonathan Harris + + * xemacs.mak (TEMACS_LIBS): Add ole32.lib and uuid.lib. + (installation): Always regenerate installation report. + +2000-02-25 Craig Lanning + + * inc\sys\time.h: MinGW defines struct timeval in . + +2000-02-24 Martin Buchholz + + * config.h (INLINE_HEADER): Define properly (?) for Windows. + 2000-02-23 Martin Buchholz * XEmacs 21.2.31 is released. diff --git a/nt/PROBLEMS b/nt/PROBLEMS index 0be8bff..899d0e3 100644 --- a/nt/PROBLEMS +++ b/nt/PROBLEMS @@ -87,9 +87,9 @@ the Cut, Copy and Paste functions. Function XEmacs binding -------- -------------- Undo C-_ - Cut C-Insert - Copy C-Insert - Paste Sh-Del + Cut Sh-Del + Copy C-Insert + Paste Sh-Insert You can rebind keys to make XEmacs more Windows-compatible; for example, to bind C-z to undo: diff --git a/nt/config.h b/nt/config.h index 23974d1..a03e7c6 100644 --- a/nt/config.h +++ b/nt/config.h @@ -583,11 +583,13 @@ on various systems. */ /* MSVC version >= 2.x without /Za supports __inline */ #if (_MSC_VER < 900) || defined(__STDC__) -# define INLINE static +# define inline #else -# define INLINE __inline +# define inline __inline #endif +#define INLINE_HEADER inline static + /* MSVC warnings no-no crap. When adding one to this section, 1. Think twice 2. Insert textual description of the warning. diff --git a/nt/xemacs.mak b/nt/xemacs.mak index 5b4aef6..ed5ec7b 100644 --- a/nt/xemacs.mak +++ b/nt/xemacs.mak @@ -26,9 +26,14 @@ XEMACS=.. LISP=$(XEMACS)\lisp +LIB_SRC=$(XEMACS)\lib-src MODULES=$(XEMACS)\modules NT=$(XEMACS)\nt OUTDIR=$(NT)\obj +SRC=$(XEMACS)\src +MAKEDIRSTRING=$(MAKEDIR:\=\\) +XEMACSDIRSTRING=$(MAKEDIRSTRING:\\nt=) + # Define a variable for the 'del' command to use DEL=-del @@ -37,6 +42,8 @@ DEL=-del !include "..\version.sh" +!include "config.inc" + !if !defined(INFODOCK) INFODOCK=0 !endif @@ -315,7 +322,7 @@ MSW_INCLUDES= MSW_LIBS= !if $(HAVE_MSW_C_DIRED) MSW_DEFINES=$(MSW_DEFINES) -DHAVE_MSW_C_DIRED -MSW_C_DIRED_SRC=$(XEMACS)\src\dired-msw.c +MSW_C_DIRED_SRC=$(SRC)\dired-msw.c MSW_C_DIRED_OBJ=$(OUTDIR)\dired-msw.obj !endif !if $(HAVE_XPM) @@ -325,7 +332,7 @@ MSW_LIBS=$(MSW_LIBS) "$(XPM_DIR)\lib\Xpm.lib" !endif !if $(HAVE_GIF) MSW_DEFINES=$(MSW_DEFINES) -DHAVE_GIF -MSW_GIF_SRC=$(XEMACS)\src\dgif_lib.c $(XEMACS)\src\gif_io.c +MSW_GIF_SRC=$(SRC)\dgif_lib.c $(SRC)\gif_io.c MSW_GIF_OBJ=$(OUTDIR)\dgif_lib.obj $(OUTDIR)\gif_io.obj !endif !if $(HAVE_PNG) @@ -350,13 +357,13 @@ MSW_LIBS=$(MSW_LIBS) "$(COMPFACE_DIR)\libcompface.lib" !endif !if $(HAVE_TOOLBARS) MSW_DEFINES=$(MSW_DEFINES) -DHAVE_TOOLBARS -MSW_TOOLBAR_SRC=$(XEMACS)\src\toolbar.c $(XEMACS)\src\toolbar-msw.c +MSW_TOOLBAR_SRC=$(SRC)\toolbar.c $(SRC)\toolbar-msw.c MSW_TOOLBAR_OBJ=$(OUTDIR)\toolbar.obj $(OUTDIR)\toolbar-msw.obj MSW_LIBS=$(MSW_LIBS) comctl32.lib !endif !if $(HAVE_DIALOGS) MSW_DEFINES=$(MSW_DEFINES) -DHAVE_DIALOGS -MSW_DIALOG_SRC=$(XEMACS)\src\dialog.c $(XEMACS)\src\dialog-msw.c +MSW_DIALOG_SRC=$(SRC)\dialog.c $(SRC)\dialog-msw.c MSW_DIALOG_OBJ=$(OUTDIR)\dialog.obj $(OUTDIR)\dialog-msw.obj !endif !if $(HAVE_WIDGETS) @@ -408,7 +415,7 @@ PATH_DEFINES=-DPATH_PREFIX=\"$(PATH_PREFIX)\" # Generic variables -INCLUDES=$(X_INCLUDES) $(MSW_INCLUDES) -I$(XEMACS)\nt\inc -I$(XEMACS)\src -I$(XEMACS)\lwlib +INCLUDES=$(X_INCLUDES) $(MSW_INCLUDES) -I$(NT)\inc -I$(SRC) -I$(XEMACS)\lwlib DEFINES=$(X_DEFINES) $(MSW_DEFINES) $(MULE_DEFINES) \ $(TAGBITS_DEFINES) $(LRECORD_DEFINES) $(UNION_DEFINES) \ @@ -424,24 +431,23 @@ $(OUTDIR)\nul: -@mkdir $(OUTDIR) XEMACS_INCLUDES=\ - $(XEMACS)\src\config.h \ - $(XEMACS)\src\Emacs.ad.h \ - $(XEMACS)\src\paths.h + $(SRC)\config.h \ + $(SRC)\Emacs.ad.h \ + $(SRC)\paths.h -$(XEMACS)\src\config.h: config.h - copy config.h $(XEMACS)\src +$(SRC)\config.h: config.h + copy config.h $(SRC) -$(XEMACS)\src\Emacs.ad.h: Emacs.ad.h - copy Emacs.ad.h $(XEMACS)\src +$(SRC)\Emacs.ad.h: Emacs.ad.h + copy Emacs.ad.h $(SRC) -$(XEMACS)\src\paths.h: paths.h - copy paths.h $(XEMACS)\src +$(SRC)\paths.h: paths.h + copy paths.h $(SRC) #------------------------------------------------------------------------------ # lib-src programs -LIB_SRC = $(XEMACS)\lib-src LIB_SRC_DEFINES = -DHAVE_CONFIG_H -DWIN32 -DWINDOWSNT # @@ -471,7 +477,7 @@ CONFIG_VALUES = $(LIB_SRC)\config.values # Inferred rule {$(LIB_SRC)}.c{$(LIB_SRC)}.exe : cd $(LIB_SRC) - $(CCV) -I. -I$(XEMACS)/src -I$(XEMACS)/nt/inc $(LIB_SRC_DEFINES) $(CFLAGS) -Fe$@ $** -link -incremental:no + $(CCV) -I. -I$(XEMACS)/src -I$(XEMACS)/nt/inc $(LIB_SRC_DEFINES) $(CFLAGS) -Fe$@ $** -link -incremental:no setargv.obj cd $(NT) # Individual dependencies @@ -497,6 +503,11 @@ LIB_SRC_TOOLS = \ $(LIB_SRC_TOOLS) \ $(LIB_SRC)/minitar.exe !endif +!if $(USE_PORTABLE_DUMPER) +LIB_SRC_TOOLS = \ + $(XEMACS_INCLUDES) \ + $(LIB_SRC_TOOLS) +!endif # Shorthand target minitar: $(LIB_SRC)/minitar.exe @@ -505,7 +516,7 @@ minitar: $(LIB_SRC)/minitar.exe # runxemacs proglet -RUNEMACS = $(XEMACS)\src\runxemacs.exe +RUNEMACS = $(SRC)\runxemacs.exe $(RUNEMACS): $(LIB_SRC)\run.c $(LIB_SRC)\run.res $(CCV) -I$(LIB_SRC) $(CFLAGS) -Fe$@ -Fo$(LIB_SRC) -Fd$(LIB_SRC)\ $** kernel32.lib user32.lib -link -incremental:no @@ -520,7 +531,7 @@ $(LIB_SRC)\run.res: $(LIB_SRC)\run.rc !if !$(USE_SYSTEM_MALLOC) || !$(USE_PORTABLE_DUMPER) LASTFILE=$(OUTDIR)\lastfile.lib -LASTFILE_SRC=$(XEMACS)\src +LASTFILE_SRC=$(SRC) LASTFILE_FLAGS=$(CFLAGS) $(INCLUDES) -Fo$@ -Fd$* -c LASTFILE_OBJS= \ $(OUTDIR)\lastfile.obj @@ -583,135 +594,135 @@ $(OUTDIR)\xlwscrollbar.obj: $(LWLIB_SRC)\xlwscrollbar.c DOC=$(LIB_SRC)\DOC DOC_SRC1=\ - $(XEMACS)\src\abbrev.c \ - $(XEMACS)\src\alloc.c \ - $(XEMACS)\src\alloca.c \ - $(XEMACS)\src\blocktype.c \ - $(XEMACS)\src\buffer.c \ - $(XEMACS)\src\bytecode.c \ - $(XEMACS)\src\callint.c \ - $(XEMACS)\src\callproc.c \ - $(XEMACS)\src\casefiddle.c \ - $(XEMACS)\src\casetab.c \ - $(XEMACS)\src\chartab.c \ - $(XEMACS)\src\cmdloop.c \ - $(XEMACS)\src\cmds.c \ - $(XEMACS)\src\console-stream.c \ - $(XEMACS)\src\console.c \ - $(XEMACS)\src\data.c \ - $(XEMACS)\src\device.c + $(SRC)\abbrev.c \ + $(SRC)\alloc.c \ + $(SRC)\alloca.c \ + $(SRC)\blocktype.c \ + $(SRC)\buffer.c \ + $(SRC)\bytecode.c \ + $(SRC)\callint.c \ + $(SRC)\callproc.c \ + $(SRC)\casefiddle.c \ + $(SRC)\casetab.c \ + $(SRC)\chartab.c \ + $(SRC)\cmdloop.c \ + $(SRC)\cmds.c \ + $(SRC)\console-stream.c \ + $(SRC)\console.c \ + $(SRC)\data.c \ + $(SRC)\device.c DOC_SRC2=\ - $(XEMACS)\src\dired.c \ - $(XEMACS)\src\doc.c \ - $(XEMACS)\src\doprnt.c \ - $(XEMACS)\src\dragdrop.c \ - $(XEMACS)\src\dynarr.c \ - $(XEMACS)\src\editfns.c \ - $(XEMACS)\src\elhash.c \ - $(XEMACS)\src\emacs.c \ - $(XEMACS)\src\eval.c \ - $(XEMACS)\src\event-stream.c \ - $(XEMACS)\src\events.c \ - $(XEMACS)\src\extents.c \ - $(XEMACS)\src\faces.c \ - $(XEMACS)\src\file-coding.c \ - $(XEMACS)\src\fileio.c \ - $(XEMACS)\src\filemode.c \ - $(XEMACS)\src\floatfns.c \ - $(XEMACS)\src\fns.c + $(SRC)\dired.c \ + $(SRC)\doc.c \ + $(SRC)\doprnt.c \ + $(SRC)\dragdrop.c \ + $(SRC)\dynarr.c \ + $(SRC)\editfns.c \ + $(SRC)\elhash.c \ + $(SRC)\emacs.c \ + $(SRC)\eval.c \ + $(SRC)\event-stream.c \ + $(SRC)\events.c \ + $(SRC)\extents.c \ + $(SRC)\faces.c \ + $(SRC)\file-coding.c \ + $(SRC)\fileio.c \ + $(SRC)\filemode.c \ + $(SRC)\floatfns.c \ + $(SRC)\fns.c DOC_SRC3=\ - $(XEMACS)\src\font-lock.c \ - $(XEMACS)\src\frame.c \ - $(XEMACS)\src\general.c \ - $(XEMACS)\src\glyphs.c \ - $(XEMACS)\src\glyphs-eimage.c \ - $(XEMACS)\src\glyphs-widget.c \ - $(XEMACS)\src\gui.c \ - $(XEMACS)\src\gutter.c \ - $(XEMACS)\src\hash.c \ - $(XEMACS)\src\imgproc.c \ - $(XEMACS)\src\indent.c \ - $(XEMACS)\src\insdel.c \ - $(XEMACS)\src\intl.c \ - $(XEMACS)\src\keymap.c \ - $(XEMACS)\src\line-number.c \ - $(XEMACS)\src\lread.c \ - $(XEMACS)\src\lstream.c \ - $(XEMACS)\src\macros.c \ - $(XEMACS)\src\marker.c + $(SRC)\font-lock.c \ + $(SRC)\frame.c \ + $(SRC)\general.c \ + $(SRC)\glyphs.c \ + $(SRC)\glyphs-eimage.c \ + $(SRC)\glyphs-widget.c \ + $(SRC)\gui.c \ + $(SRC)\gutter.c \ + $(SRC)\hash.c \ + $(SRC)\imgproc.c \ + $(SRC)\indent.c \ + $(SRC)\insdel.c \ + $(SRC)\intl.c \ + $(SRC)\keymap.c \ + $(SRC)\line-number.c \ + $(SRC)\lread.c \ + $(SRC)\lstream.c \ + $(SRC)\macros.c \ + $(SRC)\marker.c DOC_SRC4=\ - $(XEMACS)\src\md5.c \ - $(XEMACS)\src\menubar.c \ - $(XEMACS)\src\minibuf.c \ - $(XEMACS)\src\nt.c \ - $(XEMACS)\src\ntplay.c \ - $(XEMACS)\src\ntproc.c \ - $(XEMACS)\src\objects.c \ - $(XEMACS)\src\opaque.c \ - $(XEMACS)\src\print.c \ - $(XEMACS)\src\process.c \ - $(XEMACS)\src\process-nt.c \ - $(XEMACS)\src\profile.c \ - $(XEMACS)\src\rangetab.c \ - $(XEMACS)\src\realpath.c \ - $(XEMACS)\src\redisplay-output.c \ - $(XEMACS)\src\redisplay.c \ - $(XEMACS)\src\regex.c \ - $(XEMACS)\src\scrollbar.c \ - $(XEMACS)\src\search.c \ - $(XEMACS)\src\select.c \ - $(XEMACS)\src\signal.c \ - $(XEMACS)\src\sound.c + $(SRC)\md5.c \ + $(SRC)\menubar.c \ + $(SRC)\minibuf.c \ + $(SRC)\nt.c \ + $(SRC)\ntplay.c \ + $(SRC)\ntproc.c \ + $(SRC)\objects.c \ + $(SRC)\opaque.c \ + $(SRC)\print.c \ + $(SRC)\process.c \ + $(SRC)\process-nt.c \ + $(SRC)\profile.c \ + $(SRC)\rangetab.c \ + $(SRC)\realpath.c \ + $(SRC)\redisplay-output.c \ + $(SRC)\redisplay.c \ + $(SRC)\regex.c \ + $(SRC)\scrollbar.c \ + $(SRC)\search.c \ + $(SRC)\select.c \ + $(SRC)\signal.c \ + $(SRC)\sound.c DOC_SRC5=\ - $(XEMACS)\src\specifier.c \ - $(XEMACS)\src\strftime.c \ - $(XEMACS)\src\symbols.c \ - $(XEMACS)\src\syntax.c \ - $(XEMACS)\src\sysdep.c \ - $(XEMACS)\src\termcap.c \ - $(XEMACS)\src\tparam.c \ - $(XEMACS)\src\undo.c \ - $(XEMACS)\src\window.c \ - $(XEMACS)\src\widget.c + $(SRC)\specifier.c \ + $(SRC)\strftime.c \ + $(SRC)\symbols.c \ + $(SRC)\syntax.c \ + $(SRC)\sysdep.c \ + $(SRC)\termcap.c \ + $(SRC)\tparam.c \ + $(SRC)\undo.c \ + $(SRC)\window.c \ + $(SRC)\widget.c !if $(HAVE_X) DOC_SRC6=\ - $(XEMACS)\src\balloon_help.c \ - $(XEMACS)\src\console-x.c \ - $(XEMACS)\src\device-x.c \ - $(XEMACS)\src\dialog-x.c \ - $(XEMACS)\src\EmacsFrame.c \ - $(XEMACS)\src\EmacsManager.c \ - $(XEMACS)\src\EmacsShell-sub.c\ - $(XEMACS)\src\EmacsShell.c \ - $(XEMACS)\src\event-Xt.c \ - $(XEMACS)\src\frame-x.c \ - $(XEMACS)\src\glyphs-x.c \ - $(XEMACS)\src\gui-x.c \ - $(XEMACS)\src\menubar.c \ - $(XEMACS)\src\menubar-x.c \ - $(XEMACS)\src\objects-x.c \ - $(XEMACS)\src\redisplay-x.c \ - $(XEMACS)\src\scrollbar-x.c \ - $(XEMACS)\src\balloon-x.c \ - $(XEMACS)\src\xgccache.c \ - $(XEMACS)\src\xmu.c \ - $(XEMACS)\src\select-x.c + $(SRC)\balloon_help.c \ + $(SRC)\console-x.c \ + $(SRC)\device-x.c \ + $(SRC)\dialog-x.c \ + $(SRC)\EmacsFrame.c \ + $(SRC)\EmacsManager.c \ + $(SRC)\EmacsShell-sub.c\ + $(SRC)\EmacsShell.c \ + $(SRC)\event-Xt.c \ + $(SRC)\frame-x.c \ + $(SRC)\glyphs-x.c \ + $(SRC)\gui-x.c \ + $(SRC)\menubar.c \ + $(SRC)\menubar-x.c \ + $(SRC)\objects-x.c \ + $(SRC)\redisplay-x.c \ + $(SRC)\scrollbar-x.c \ + $(SRC)\balloon-x.c \ + $(SRC)\xgccache.c \ + $(SRC)\xmu.c \ + $(SRC)\select-x.c !endif !if $(HAVE_MSW) DOC_SRC7=\ - $(XEMACS)\src\console-msw.c \ - $(XEMACS)\src\device-msw.c \ - $(XEMACS)\src\event-msw.c \ - $(XEMACS)\src\frame-msw.c \ - $(XEMACS)\src\glyphs-msw.c \ - $(XEMACS)\src\gui-msw.c \ - $(XEMACS)\src\menubar-msw.c \ - $(XEMACS)\src\objects-msw.c \ - $(XEMACS)\src\redisplay-msw.c \ - $(XEMACS)\src\scrollbar-msw.c \ - $(XEMACS)\src\select-msw.c \ + $(SRC)\console-msw.c \ + $(SRC)\device-msw.c \ + $(SRC)\event-msw.c \ + $(SRC)\frame-msw.c \ + $(SRC)\glyphs-msw.c \ + $(SRC)\gui-msw.c \ + $(SRC)\menubar-msw.c \ + $(SRC)\objects-msw.c \ + $(SRC)\redisplay-msw.c \ + $(SRC)\scrollbar-msw.c \ + $(SRC)\select-msw.c \ $(MSW_C_DIRED_SRC) \ $(MSW_TOOLBAR_SRC) \ $(MSW_DIALOG_SRC) \ @@ -720,31 +731,31 @@ DOC_SRC7=\ !if $(HAVE_MULE) DOC_SRC8=\ - $(XEMACS)\src\mule.c \ - $(XEMACS)\src\mule-charset.c \ - $(XEMACS)\src\mule-ccl.c + $(SRC)\mule.c \ + $(SRC)\mule-charset.c \ + $(SRC)\mule-ccl.c ! if $(HAVE_X) - DOC_SRC8=$(DOC_SRC8) $(XEMACS)\src\input-method-xlib.c + DOC_SRC8=$(DOC_SRC8) $(SRC)\input-method-xlib.c ! endif !endif !if $(DEBUG_XEMACS) DOC_SRC9=\ - $(XEMACS)\src\debug.c \ - $(XEMACS)\src\tests.c + $(SRC)\debug.c \ + $(SRC)\tests.c !endif !if !$(USE_SYSTEM_MALLOC) DOC_SRC10=\ - $(XEMACS)\src\free-hook.c \ - $(XEMACS)\src\gmalloc.c \ - $(XEMACS)\src\ntheap.c \ - $(XEMACS)\src\vm-limit.c + $(SRC)\free-hook.c \ + $(SRC)\gmalloc.c \ + $(SRC)\ntheap.c \ + $(SRC)\vm-limit.c !endif !if !$(USE_PORTABLE_DUMPER) DOC_SRC11=\ - $(XEMACS)\src\unexnt.c + $(SRC)\unexnt.c !endif #------------------------------------------------------------------------------ @@ -757,20 +768,22 @@ EMACS_BETA_VERSION=-DEMACS_BETA_VERSION=$(emacs_beta_version) !ENDIF !if !$(USE_PORTABLE_DUMPER) -TEMACS_ENTRYPOINT=-entry:_start +TEMACS_ENTRYPOINT=-entry:_start +!else +TEMACS_ENTRYPOINT=-entry:mainCRTStartup !endif -TEMACS_DIR=$(XEMACS)\src +TEMACS_DIR=$(SRC) TEMACS=$(TEMACS_DIR)\temacs.exe TEMACS_BROWSE=$(TEMACS_DIR)\temacs.bsc -TEMACS_SRC=$(XEMACS)\src +TEMACS_SRC=$(SRC) TEMACS_LIBS=$(LASTFILE) $(LWLIB) $(X_LIBS) $(MSW_LIBS) \ oldnames.lib kernel32.lib user32.lib gdi32.lib advapi32.lib \ - shell32.lib wsock32.lib winmm.lib winspool.lib $(LIBC_LIB) + shell32.lib wsock32.lib winmm.lib winspool.lib ole32.lib uuid.lib $(LIBC_LIB) TEMACS_LFLAGS=-nologo $(LIBRARIES) $(DEBUG_FLAGS) -base:0x1000000\ - -stack:0x800000 $(TEMACS_ENTRYPOINT) -subsystem:console\ + -stack:0x800000 $(TEMACS_ENTRYPOINT) -subsystem:windows\ -pdb:$(TEMACS_DIR)\temacs.pdb -map:$(TEMACS_DIR)\temacs.map \ - -heap:0x00100000 -out:$@ -nodefaultlib + -heap:0x00100000 -nodefaultlib -incremental:no TEMACS_CPP_FLAGS=-c \ $(CFLAGS) $(INCLUDES) $(DEFINES) $(DEBUG_DEFINES) \ -DEMACS_MAJOR_VERSION=$(emacs_major_version) \ @@ -946,8 +959,7 @@ TEMACS_OBJS= \ $(OUTDIR)\tparam.obj \ $(OUTDIR)\undo.obj \ $(OUTDIR)\widget.obj \ - $(OUTDIR)\window.obj \ - $(OUTDIR)\xemacs.res + $(OUTDIR)\window.obj # Rules @@ -977,7 +989,7 @@ $(OUTDIR)\alloc.obj: $(TEMACS_SRC)\alloc.c #$(TEMACS_SRC)\paths.h: $(TEMACS_SRC)\paths.h.in # !"cd $(TEMACS_SRC); cp paths.h.in paths.h" -$(TEMACS): $(TEMACS_INCLUDES) $(TEMACS_OBJS) +$(TEMACS): $(TEMACS_INCLUDES) $(TEMACS_OBJS) $(OUTDIR)\xemacs.res !if $(DEBUG_XEMACS) @dir /b/s $(OUTDIR)\*.sbr > bscmake.tmp bscmake -nologo -o$(TEMACS_BROWSE) @bscmake.tmp @@ -985,20 +997,23 @@ $(TEMACS): $(TEMACS_INCLUDES) $(TEMACS_OBJS) !endif !if $(USE_PORTABLE_DUMPER) @if exist $(TEMACS_DIR)\xemacs.dmp del $(TEMACS_DIR)\xemacs.dmp -!endif link.exe @<< - $(TEMACS_LFLAGS) $(TEMACS_OBJS) $(TEMACS_LIBS) + $(TEMACS_LFLAGS) -out:$@ $(TEMACS_OBJS) $(TEMACS_LIBS) +<< +!else + link.exe @<< + $(TEMACS_LFLAGS) -out:$@ $(TEMACS_OBJS) $(OUTDIR)\xemacs.res $(TEMACS_LIBS) << +!endif $(OUTDIR)\xemacs.res: xemacs.rc rc -Fo$@ xemacs.rc # Section handling automated tests starts here -SRCDIR=$(MAKEDIR)\..\src -PROGNAME=$(SRCDIR)\xemacs.exe +PROGNAME=$(SRC)\xemacs.exe blddir=$(MAKEDIR:\=\\)\\.. -temacs_loadup=$(TEMACS) -batch -l $(SRCDIR)/../lisp/loadup.el +temacs_loadup=$(TEMACS) -batch -l $(LISP)/loadup.el dump_temacs = $(temacs_loadup) dump run_temacs = $(temacs_loadup) run-temacs ## We have automated tests!! @@ -1008,17 +1023,36 @@ batch_test_emacs=-batch -l $(testdir)/test-harness.el -f batch-test-emacs $(test # .PHONY: check check-temacs check: - cd $(SRCDIR) + cd $(SRC) $(PROGNAME) $(batch_test_emacs) check-temacs: - cd $(SRCDIR) + cd $(SRC) set EMACSBOOTSTRAPLOADPATH=$(LISP) set EMACSBOOTSTRAPMODULEPATH=$(MODULES) $(run_temacs) $(batch_test_emacs) # Section handling automated tests ends here +# Section handling tags starts here + +tagslisp=lisp + +tags: + @echo If you don't have a copy of etags around, then do 'make lib-src' first. + @echo To make use of the tags file, put the following in your .emacs: + @echo (setq tag-table-alist + @echo '(("$(XEMACSDIRSTRING)\\" . "$(XEMACSDIRSTRING)\\"))) + cd $(XEMACS) + $(DEL) TAGS + set PATH=lib-src;%PATH% +# argh!!! we need two ^^'s to get one ^, but only before a backslash. +# i have no idea why. probably some obscure nmake quoting convention. + etags -a -r "/[ ]*DEF\(VAR\|INE\)_[A-Z_]+[ ]*([ ]*\"\([^^\"]+\)\"/\2/" src\*.c src\*.h lwlib\*.c lwlib\*.h lib-src\*.c lib-src\*.h + etags -a -l none -r "/^(def\(var\|un\|alias\|const\|macro\|subst\|struct\|face\|group\|custom\|ine-\(function\|compiler-macro\|[a-z-]+alias\)\)[ ]+'?\([^ ]+\)/\3/" $(tagslisp)\*.el + +# Section handling tags ends here + # Section handling info starts here !if !defined(MAKEINFO) @@ -1258,14 +1292,21 @@ dump-xemacs: temacs set EMACSBOOTSTRAPMODULEPATH=$(MODULES) -1 $(TEMACS) -batch -l $(TEMACS_DIR)\..\lisp\loadup.el dump !if $(USE_PORTABLE_DUMPER) - copy temacs.exe xemacs.exe + rc -d INCLUDE_DUMP -Fo $(OUTDIR)\xemacs.res $(NT)\xemacs.rc + link.exe @<< + $(TEMACS_LFLAGS) -out:xemacs.exe $(TEMACS_OBJS) $(OUTDIR)\xemacs.res $(TEMACS_LIBS) +<< +# Make the resource section read/write since almost all of it is the dump +# data which needs to be writable. This avoids having to copy it. + editbin -nologo -section:.rsrc,rw xemacs.exe + del $(TEMACS_DIR)\xemacs.dmp !endif cd $(NT) @if not exist $(TEMACS_DIR)\SATISFIED nmake -nologo -f xemacs.mak $@ #------------------------------------------------------------------------------ # use this rule to build the complete system -all: $(XEMACS)\Installation $(OUTDIR)\nul $(LASTFILE) $(LWLIB) \ +all: installation $(OUTDIR)\nul $(LASTFILE) $(LWLIB) \ $(LIB_SRC_TOOLS) $(RUNEMACS) $(TEMACS) update-elc $(DOC) dump-xemacs \ $(LISP)/auto-autoloads.el $(LISP)/custom-load.el info @@ -1282,10 +1323,7 @@ install: all @xcopy /q $(LIB_SRC)\*.exe "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)\" @copy $(LIB_SRC)\DOC "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)" @copy $(CONFIG_VALUES) "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)" - @copy $(XEMACS)\src\xemacs.exe "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)" -!if $(USE_PORTABLE_DUMPER) - @copy $(XEMACS)\src\xemacs.dmp "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)" -!endif + @copy $(SRC)\xemacs.exe "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)" @copy $(RUNEMACS) "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)" @xcopy /e /q $(XEMACS)\etc "$(INSTALL_DIR)\etc\" @xcopy /e /q $(XEMACS)\info "$(INSTALL_DIR)\info\" @@ -1342,12 +1380,9 @@ depend: perl ./make-src-depend > depend.tmp perl -MFile::Compare -e "compare('depend.tmp', 'depend') && rename('depend.tmp', 'depend') or unlink('depend.tmp')" -installation:: - @if exist $(XEMACS)\Installation del $(XEMACS)\Installation - -installation:: $(XEMACS)\Installation +$(XEMACS)\Installation:: installation -$(XEMACS)\Installation: +installation:: @type > $(XEMACS)\Installation << !if defined(OS) OS: $(OS) diff --git a/nt/xemacs.rc b/nt/xemacs.rc index 3c0f003..3b5cb7e 100644 --- a/nt/xemacs.rc +++ b/nt/xemacs.rc @@ -1,3 +1,7 @@ +#ifdef INCLUDE_DUMP +101 DUMP "xemacs.dmp" +#endif + XEmacs icon preload "xemacs.ico" XEmacsFile icon "File.ico" XEmacsLisp icon "Lisp.ico" diff --git a/src/ChangeLog b/src/ChangeLog index e37adb4..15db881 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,1226 @@ +2000-03-20 Martin Buchholz + + * XEmacs 21.2.32 is released. + +2000-03-12 Jan Vroonhof + + * sysdep.c: Include proper headers for mmap when pdumping() + +2000-03-20 Martin Buchholz + + * buffer.h (DFC_ALLOCA_USE_CONVERTED_DATA): + (DFC_MALLOC_USE_CONVERTED_DATA): + Add aliasing-safe casts to allow use with char* or unsigned char* + lvalues. + + * eldap.c (Fldap_open): + (Fldap_search_basic): + (Fldap_add): + (Fldap_modify): + Make C++-compilable. + Make sure GCPRO'ed variables are initialized. + Use temp variables to avoid repeated calls to Flength. + +2000-03-16 Martin Buchholz + + * sysfile.h: + Make sure PATH_MAX is always defined. + Include limits.h for PATH_MAX. + Deprecate use of MAXPATHLEN. + +2000-03-10 Martin Buchholz + + * emacs.c: Add reinit_vars_of_fileio. + * symsinit.h: Add reinit_vars_of_fileio. + * fileio.c (reinit_vars_of_fileio): New. + * fileio.c (Fmake_temp_name): + Initialize temp_name random number from microseconds to make + collisions even less likely. Initialize always at process startup + time. (make-temp-name) used to return the same file name twice in + a row when PDUMP. + Random stylistic fiddling. + Comment fixes. + +2000-03-20 Andy Piper + + * glyphs.c (image_instantiate): allow text glyphs to be + instantiated in the minibuffer window. + +2000-03-19 Andy Piper + + * glyphs.c (image_instance_hash): be careful about which items we + hash on. + + * glyphs-widget.c (tab_control_set_property): record into pending + items rather than the actual items. + + * glyphs-x.c (x_update_widget): use pending items to update with. + + * glyphs-msw.c (mswindows_tab_control_update): use pending items + to update with. + + * glyphs.c (mark_image_instance): mark pending items. + + * window.c (Fset_window_configuration): record the buffer. + (Fselect_window): totally revert previous change which breaks many + things. + +2000-03-18 Andy Piper + + * glyphs-msw.c (mswindows_tab_control_update): force selected + item. + + * glyphs.c (image_instantiate): don't allow the minibuffer as a + window domain cache, otherwise we get inconsistencies at + startup. There is something fishy at startup which can lead to the + minibuffer being the selected window when the gutter content is + instantiated. + + * gui.c (parse_gui_item_tree_list): add probably unneccessary + gcpros. + (parse_gui_item_tree_children): ditto. + (parse_gui_item_tree_item): ditto. + + * glyphs.c (Fupdate_widget_instances): return something. + +2000-03-18 Yoshiki Hayashi + + * window.c (Fselect_window): Undo 2000-03-17 change. + +2000-03-17 SL Baur + + * postgresql.c (Fpq_setenv): Remove this turkey when linking + against v7.0 libraries. Insta-coredump city until the postgres + folks fix it. + +2000-03-17 Andy Piper + + * faces.c (complex_vars_of_faces): don't give the widget face an + inherited background pixmap. + + * glyphs-msw.c (mswindows_tab_control_instantiate): select the + selected item. + + * event-stream.c (Fdispatch_non_command_events): return something. + + * gutter.c (output_gutter): use widget face. + (clear_gutter): ditto. + + * NEWS: adjust again. + + * window.c (Fselect_window): make sure this runs to completion to + avoid oddities with Fset_window_configuration. + (Fcurrent_window_configuration): in general do not save the + minibuffer as the selected window. + + * glyphs.h (IMAGE_INSTANCE_HASH_DEPTH): increase. + +2000-03-16 Olivier Galibert + + * emacs.c (Frunning_temacs_p): Revert previous patch. + (main_1): Reinitialize running_temacs_argc if pdump_load succeeds. + +2000-03-16 Andy Piper + + * glyphs-x.c (x_tab_control_update): if no widget values then + return. + + * NEWS: update for new features. + + * event-Xt.c (emacs_Xt_force_event_pending): new function. Post a + synthetic event to the native system. + (reinit_vars_of_event_Xt): set force_event_pending to + emacs_Xt_force_event_pending. + + * events.h (struct event_stream): add force_event_pending. + + * specifier.c (recompute_one_cached_specifier_in_window): add + comment. + + * redisplay.c (redisplay_frame): don't call + update_frame_subwindows. Reset subwindow cachels when + subwindows_changed, removing this was an optimization too far. + + * redisplay-output.c (compare_runes): reorganize so that we catch + glyph changes when we want them. Set optimize_output when this + would help layouts. + (redisplay_output_layout): remove frame_really_changed, use + optimize_output instead. + + * redisplay-msw.c (mswindows_output_display_block): reset + optimize_output after outputting a glyph. + * redisplay-x.c (x_output_display_block): ditto. + * redisplay-tty.c (tty_output_display_block): ditto. + + * gutter.c: (specifier_vars_of_gutter): use new spec changed + functions. + (gutter_specs_changed): do specific gutter positions. + (top_gutter_specs_changed): new function. Only update the + specified gutter specs. + (bottom_gutter_specs_changed): ditto. + (left_gutter_specs_changed): ditto. + (right_gutter_specs_changed): ditto. + + * gui.c (gui_item_hash_internal): new function, does a real hash. + (gui_item_id_hash): use it. + (gui_item_hash): hash the eval'ed gui_item. + + * gui-x.c (popup_selection_callback): send an eval event to call + Fupdate_widget_instances. + + * gui-msw.c (mswindows_handle_gui_wm_command): send an eval event + to call Fupdate_widget_instances. + + * glyphs.h (struct Lisp_Image_Instance): add optimize_output flag. + (IMAGE_INSTANCE_OPTIMIZE_OUTPUT): access it. + + * glyphs.c: (update_frame_subwindows): deleted. + (Fupdate_widget_instances): new function for updating the dirty + state of widgets that might have changed. + (syms_of_glyphs): add Qupdate_widget_instances. + (full_list_hash): hash a list completely. + (image_instance_hash): use it for items and properties. + + * frame-msw.c (mswindows_size_frame_internal): remove unused + variable. + + * faces.h (struct face_cachel): fix comment. + + * event-stream.c (Fdispatch_non_command_events): new + function. Process non-command events, forcing an event cycle + beforehand. + (syms_of_event_stream): declare. + (event_stream_force_event_pending): new function. Force an event + on the native event queue so that an event cycle will occur next + time we check. + + * event-msw.c: + (struct ntpipe_shove_stream): + (mswindows_enqueue_dispatch_event): + (mswindows_dequeue_dispatch_event): + (mswindows_cancel_dispatch_event): + (mswindows_pump_outstanding_events): + (mswindows_drain_windows_queue): + (mswindows_handle_paint): + (mswindows_wnd_proc): + (mswindows_key_to_emacs_keysym): + (get_process_input_waitable): + (emacs_mswindows_delete_stream_pair): re-indent file. + (mswindows_need_event): do not process further fds if the windows + fd is set, otherwise you get endless XM_BUMPQUEUE cycles. This + fixes the 100% cpu problem. + (reinit_vars_of_event_mswindows): set force_event_pending to 0. + +2000-03-15 Olivier Galibert + + * alloc.h: New. + * dumper.h: New. + * dumper.c: New. + + * emacs.c: Moved dump file searching to dumper.c. + (Frunning_temacs_p): Fixed. + + * alloc.c: Moved everything pdump-related to dumper.c. Removed + last_lrecord_type_index_assigned. + +2000-02-20 Olivier Galibert + + * symsinit.h: Added reinit parameter to init_console_stream + declaration. + + * lisp.h: Added file parameter to pdump_load declaration. + + * emacs.c (main_1): Added -nd/--nodump-file and -sd/--show-dump-id + support. Added dump file searching. + + * config.h.in: Added EMACS_PROGNAME. + + * console-stream.c (init_console_stream): Fix reinitialisation + when running from temacs. + + * alloc.c (pdump): Add id support. + (pdump_load): Add file parameter and signature/id support. + + * Makefile.in.in: Add full pdump support. + +2000-03-15 SL Baur + + * postgresql.c: Update documentation to reflect latest code + status. + (print_result): Show tuple counts in printed representation when + appropriate. + (Fpq_put_nbytes): MULE-ize. + (Fpq_get_line_async): Ditto. + +2000-03-14 SL Baur + + * postgresql.c (Fpq_lo_import): Fix return value. + Suggested by: Kenji Itoh . + +2000-03-13 Ben Wing + + * alloc.c (pdump_load): + Fix compile warning under mswin. + +2000-03-14 SL Baur + + * postgresql.c: Mule-ization, bug fixes. + Use PG_CODING to encapsulate coding system name changes. + Backport a version of TO_EXTERNAL format for 21.1/InfoDock. + (pg-coding-system): Create. + + (Fpq_conn_defaults): Mule-ize. + (Fpq_connectdb): Mule-ize & bug fix. + (Fpq_connect_start): Mule-ize. + (Fpq_set_client_encoding): Mule-ize. + (Fpq_finish): Document `DEAD' connection status. + (Fpq_clear): Ditto. + (Fpq_pgconn): Mule-ize. + (Fpq_exec): Mule-ize & bug fix. + (Fpq_send_query): Ditto. + (Fpq_get_result): Ditto. + (Fpq_res_status): Mule-ize. + (Fpq_result_error_message): Mule-ize. + (Fpq_ntuples): fix comments. + (Fpq_fname): Mule-ize. + (Fpq_fnumber): Mule-ize. + (Fpq_ftype): fix comments. + (Fpq_get_value): Mule-ize. + (Fpq_cmd_status): Ditto. + (Fpq_cmd_tuples): Ditto. + (Fpq_oid_value): Ditto. + (Fpq_notifies): Ditto. + (Fpq_lo_import): Ditto. + (Fpq_lo_export): Ditto. + (Fpq_get_line): Ditto. + (Fpq_put_line): Mule-ize and bug fix. + (syms_of_postgresql): Fix ifdef'ing, add pg-coding-system. + +2000-03-10 SL Baur + + * postgresql.c (vars_of_postgresql): Mule-ize. + (Fpq_conn_defaults): Ditto. + +2000-03-12 Ben Wing + + * alloc.c (Fmake_byte_code): + * alloc.c (debug_string_purity_print): + * alloc.c (pdump_backtrace): + * alloc.c (pdump_get_indirect_count): + * alloc.c (pdump_register_sub): + * alloc.c (pdump_register_object): + * alloc.c (pdump_register_struct): + * alloc.c (pdump_dump_data): + * alloc.c (pdump_reloc_one): + Minor cleanups. + + * console-msw.c: + * console-msw.c (GetConsoleHwnd): + * console-msw.c (msw_hide_console): + * console-msw.c (msw_show_console): + * console-msw.c (msw_ensure_console_buffered): + * console-msw.c (msw_output_console_string): + * console-msw.c (console_type_create_mswindows): + + a) Added functions to manipulate the console window for use with + shell support. + + b) Added support for writing text to the console, which is now + used under Windows when xemacs is not being run non-interactively, + to write text that would otherwise be destined for stdout because + under these circumstances, text written to stdout tends to + disappear and not be seen. + + * console-msw.h: + * event-Xt.c: + * event-Xt.c (x_event_to_emacs_event): + * event-Xt.c (describe_event_window): + * events-mod.h (XEMACS_MOD_CONTROL): + * events.c: + * events.c (Fmake_event): + * events.c (character_to_event): + * events.c (event_to_character): + * events.c (format_event_object): + * events.c (Fevent_modifiers): + * events.h: + * events.h (struct key_data): + * events.h (struct button_data): + * events.h (struct misc_user_data): + * frame-x.c (Fcde_start_drag_internal): + * frame-x.c (Foffix_start_drag_internal): + * gpmevent.c (Freceive_gpm_event): + * keymap.c: + * keymap.c (bucky_sym_to_bucky_bit): + * keymap.c (control_meta_superify): + * keymap.c (make_key_description): + * keymap.c (keymap_lookup_directly): + * keymap.c (create_bucky_submap): + * keymap.c (keymap_store): + * keymap.c (define_key_check_and_coerce_keysym): + * keymap.c (define_key_parser): + * keymap.c (define_key_alternate_name): + * keymap.c (Fdefine_key): + * keymap.c (raw_lookup_key_mapper): + * keymap.c (struct map_keymap_unsorted_closure): + * keymap.c (map_keymap_unsorted_mapper): + * keymap.c (map_keymap_sort_predicate): + * keymap.c (map_keymap_sorted): + * keymap.c (accessible_keymaps_mapper_1): + * keymap.c (where_is_recursive_mapper): + * keymap.c (describe_map_mapper): + * keymap.c (describe_map_sort_predicate): + * keymap.c (describe_map): + * keymap.c (complex_vars_of_keymap): + And a number of other files, the key modifier preprocessor + constants that xemacs uses have names that conflict with constants + defined under MS Windows for other purposes, so they were renamed + to begin with the prefix XEMACS_. The variables that hold such + modifiers were changed to consistently be of type int to fix + various compile warnings. + + * console.c (complex_vars_of_console): + * device.c: + * device-msw.c: + * device-msw.c (mswindows_finish_init_device): + * device-msw.c (msw_get_workspace_coords): + * device-msw.c (mswindows_device_system_metrics): + and various other files, added support for a new + device property called offset-workspace which returns the position + of the upper left corner of the workspace area and goes along with + the existing size-workspace property. + + * dialog-msw.c: + * dialog-msw.c (push_bufbyte_string_as_unicode): + * dialog-msw.c (mswindows_popup_dialog_box): + Added support for XEmacs-style accelerator specifications in + button text. Note: I didn't add support for this under X Windows, + and somebody needs to do this. + + * dialog.c: + * dialog.c (Fpopup_dialog_box): + Documented the support for accelerators that was just mentioned. + + editfns.c (get_home_directory): Changed behavior under Windows + when HOME not defined; former behavior was irretrievably broken. + + * emacs.c: + * emacs.c (main_1): + * emacs.c (main): + * minibuf.c (clear_echo_area_internal): + * minibuf.c (echo_area_append): + * print.c: + * print.c (std_handle_out_external): + * print.c (std_handle_out_va): + * print.c (fatal): + * print.c (write_string_to_stdio_stream): + * print.c (output_string): + * print.c (debug_print): + * print.c (debug_backtrace): + * print.c (debug_short_backtrace): + Cleaned up the code that prints text to stdout so that this can be + changed to output into a console window instead under MS Windows, + as described above. + + * eval.c: + * eval.c (DEFEND_AGAINST_THROW_RECURSION): + * eval.c (internal_catch): + * eval.c (unwind_to_catch): + * eval.c (throw_or_bomb_out): + * eval.c (condition_case_1): + * eval.c (signal_1): + * eval.c (check_error_state_sanity): + * eval.c (call_with_suspended_errors_1): + * eval.c (call_with_suspended_errors): + * eval.c (reinit_vars_of_eval): + Added code to catch throw loops and check for a pesky bug that may + be gone now. + + * event-msw.c: + * event-msw.c (key_needs_default_processing_p): + * event-msw.c (mswindows_wnd_proc): + * event-msw.c (mswindows_modifier_state): + * event-msw.c (emacs_mswindows_quit_p): + * event-msw.c (vars_of_event_mswindows): + a) Added support for using the alt key to select menu items as is + standard under MS Windows. This is controlled using the variable + menu-accelerator-enabled, just like under X Windows. There is an + option on the options menu to turn this support on. I really + think that it should be on by default under Windows, but I'm not + going to make this change yet. + + b) Added support for dynamic display size changes under Windows. + + * event-stream.c: + * event-stream.c (maybe_echo_keys): + * event-stream.c (Fnext_event): + * event-stream.c (command_builder_find_leaf): + * event-stream.c (lookup_command_event): + * event-stream.c (execute_command_event): + * event-stream.c (pre_command_hook): + * event-stream.c (post_command_hook): + * event-stream.c (syms_of_event_stream): + * event-stream.c (vars_of_event_stream): + * event-stream.c (complex_vars_of_event_stream): + * events.h (struct command_builder): + + a) Tried to clean up a little bit the horribly written x-specific + accelerator code that crept into this file. I moved this code + into menubar-x.c where it belongs. I also needed to move the + command builder structure into the file events.h because it is + accessed directly by this accelerator code. What I didn't do, but + which should be done at some point, is to properly abstract this + code using device methods instead of the kludgy way that it + currently hooks into the event code. + + b) Added the lisp variables this-command-properties and + last-command- properties, which should be used to synchronize two + adjacent commands in preference to playing games with the variable + this-command, which is typically what happens. + + c) Added some slightly nasty code to hook into the lisp support + for shifted- motion-key selection. This is actually necessary for + somewhat complicated reasons, which are described in + simple.el. (NB: I think the proper thing would be to have the code + that calls the pre and post command hooks also call out to generic + lisp functions in simple.el, where all built-in stuff could be + added. I will think about this more.) + + * event-unixoid.c (poll_fds_for_input): + * lread.c (readchar): + * redisplay-tty.c (tty_clear_frame): + * redisplay-x.c (x_get_gc): + * signal.c (interrupt_signal): + And a whole bunch of other files: fixed up places that printed + directly to stderr to instead call the function stderr_out so that + the changes I made under Windows work correctly. + + * filemode.c (mode_string): + Warning fixes. + + * frame-msw.c: + * frame-msw.c (mswindows_size_frame_internal): + Fixed the computation of frame size and position to keep the frame + within the workspace area, rather than within the physical + dimensions of the screen, so that the frame doesn't overlap window + manager decorations, such as the start menu and toolbar, typically + at the bottom of the screen. + + * frame.c (vars_of_frame): + Changed the default frame title format under MS Windows to consist + of buffername-XEmacs, which is standard under MS Windows. I think + it might be a good idea to change this everywhere because I think + it is superior to the current frame title format, but this is the + kind of change that is likely to cause some people to get annoyed, + so I'm not making it. + + * glyphs-eimage.c (png_instantiate): Fixed some compile warnings. + + * gui-msw.c (mswindows_handle_gui_wm_command): + Fixed compile warnings. + + * gui-x.c: + * gui-x.c (strdup_and_add_accel): + * gui-x.c (button_item_to_widget_value): + * gui-x.h: + Added code to automatically put an accelerator onto the beginning + of menu items that don't have one as is now the standard, and is + described more later. Also fixed things so that the menu item + name can be an evaluated expression, again a new standard. + + * gui.c: + * gui.c (gui_item_add_keyval_pair): + * gui.c (make_gui_item_from_keywords_internal): + * gui.c (gui_add_item_keywords_to_plist): + * gui.c (gui_item_accelerator): + * gui.c (gui_name_accelerator): + * gui.c (gui_item_included_p): + * gui.c (gui_item_display_flush_left): + * gui.c (gui_item_display_flush_right): + * gui.c (parse_gui_item_tree_item): + * gui.c (parse_gui_item_tree_children): + * gui.c (parse_gui_item_tree_list): + Mule-ized. Cleanup. GCPRO addition. + + * line-number.c (buffer_line_number): + * lisp.h: + * lisp.h (EMACS_INT_MAX): + Added the manifest constant EMACS_INT_MIN corresponding to the + existing constant EMACS_INT_MAX. This is partially to fix compile + warnings under Windows, and partly for cleanliness. + + * menubar-msw.c: + * menubar-msw.c (REPLACE_ME_WITH_GLOBAL_VARIABLE_WHICH_CONTROLS_RIGHT_FLUSH): + * menubar-msw.c (msw_translate_menu_or_dialog_item): + * menubar-msw.c (displayable_menu_item): + * menubar-msw.c (populate_menu_add_item): + * menubar-msw.c (populate_or_checksum_helper): + * menubar-msw.c (populate_menu): + * menubar-msw.c (update_frame_menubar_maybe): + * menubar-msw.c (prune_menubar): + * menubar-msw.c (msw_char_is_accelerator): + * menubar-msw.c (unsafe_handle_wm_initmenu_1): + * menubar-msw.c (mswindows_handle_wm_command): + * menubar-msw.c (mswindows_handle_wm_initmenupopup): + * menubar-msw.c (mswindows_handle_wm_initmenu): + * menubar-msw.c (mswindows_update_frame_menubars): + * menubar-msw.c (mswindows_free_frame_menubars): + * menubar-msw.c (mswindows_popup_menu): + Fixed a bug in handling accelerators where an extra character + would be displayed in the menu item. Also generalized the + function displayable_menu_item because it is now used by the + dialog box code as well. And finally, added code in the functions + that create the menubar to extract a list of accelerators for the + top level menubar, which is used in the event code to determine + whether a particular alt-key combination should be used to invoke + a menu item, or should be passed through to access the standard + XEmacs keymap binding for this key combination. + + Much needed GCPROing. + + * menubar-x.c: + * menubar-x.c (menu_item_descriptor_to_widget_value_1): + * menubar-x.c (menu_item_descriptor_to_widget_value): + * menubar-x.c (restore_in_menu_callback): + * menubar-x.c (x_popup_menu): + * menubar-x.c (menu_move_up): + * menubar-x.c (menu_move_down): + * menubar-x.c (menu_move_left): + * menubar-x.c (menu_move_right): + * menubar-x.c (menu_select_item): + * menubar-x.c (command_builder_operate_menu_accelerator): + * menubar-x.c (menu_accelerator_junk_on_error): + * menubar-x.c (command_builder_find_menu_accelerator): + * menubar-x.c (Faccelerate_menu): + * menubar.h: + Moved a whole bunch of code here that was previously in + event-stream.c as described above. There is also code connected + to the new standard of adding an accelerator to the beginning of + menu items that don't have one as described above and below. + + * menubar.c: + * menubar.c (menu_parse_submenu_keywords): + * menubar.c (Fmenu_find_real_submenu): + * menubar.c (Fnormalize_menu_item_name): + * menubar.c (syms_of_menubar): + * menubar.c (vars_of_menubar): + * menubar.c (complex_vars_of_menubar): + + a) Cleaned up a bunch of documentation and improved it. + + b) XEmacs now automatically adds an accelerator onto the beginning + of any menu items that don't have one. I did this because there + will inevitably be some menu items on the main menubar that don't + have accelerators on them because the package that adds that + particular menu item hasn't yet been fixed up to have accelerators + in them and it looked rather strange to have some items with and + some items without accelerators, especially since even in items + without accelerators, you can, at least under windows, still + access the item through an accelerator corresponding to the first + character in the item's name. If people don't like this behavior, + I can add a variable to turn it off optionally, but I'm not sure + this is a good idea because we really do need to have accelerators + on all of the menu items, and if a package doesn't like the + accelerators being put on the first character, then it should put + the accelerators where they belong. + + c) I made a behavior change, which is that the descriptor that + specifies the text of the menu item, which formerly was just a + string, can now also be an evaluated expression. This makes this + descriptor parallel with all of the others, which could also be + evaluated expressions. This also obviates the need for the + keyword :label, which was previously listed in the documentation + as unimplemented, and which was for the same purpose. + + d) GCPROing. + + * ntproc.c: + * ntproc.c (new_child): + * ntproc.c (sys_spawnve): + * ntproc.c (find_child_console): + * ntproc.c (sys_kill): + Fixed compile warnings. By the way, this file should really go + away entirely, and this will happen as soon as Kirill makes his + final round of process cleanups, which affect the function + call-process. + + * process-nt.c: + * process-nt.c (struct nt_process_data): + * process-nt.c (find_process_from_pid): + * process-nt.c (send_signal_the_nt_way): + * process-nt.c (enable_child_signals): + * process-nt.c (find_child_console): + * process-nt.c (send_signal_the_95_way): + * process-nt.c (nt_finalize_process_data): + * process-nt.c (ensure_console_window_exists): + * process-nt.c (nt_create_process): + * process-nt.c (nt_kill_child_process): + * process-nt.c (nt_kill_process_by_pid): + * process-nt.c (nt_open_network_stream): + * process-nt.c (vars_of_process_nt): + Copied over code from Emacs 20.5 to correctly send signals to sub- + processes under Windows 95. Also added code to automatically + create and hide console window when a sub-process is created under + Windows 95, which obviates the need for the separate runemacs.exe + executable, and finally implemented some variables that were + implemented in Emacs 20.5, but previously not in XEmacs. These + include mswindows- start-process-share-console and + mswindows-start-process-inherit-error-mode. (Both of these only + apply to Windows 95.) + + * regex.c (regex_compile): Fixed a compile warning. + + * select-msw.c: + * select-msw.c (mswindows_own_selection): + * select-msw.c (mswindows_get_foreign_selection): + * select-msw.c (mswindows_disown_selection): + * select-msw.c (console_type_create_select_mswindows): + * select-msw.c (syms_of_select_mswindows): + Cleaned up the file and implemented the device method + selection_exists_p, which had accidentally been left out. Also + removed four lisp functions that were remnants from before the + time when the selection code was properly device abstracted. + These functions are no longer needed because there are generic + equivalents, and because they were added recently and don't exist + in FSF Emacs, I don't think there's any problem with just deleting + them. + + * sysdep.c: + * sysdep.c (sys_subshell): + Fixed a compile warning, although in this case there's probably + something wrong with this code, and it ought to be looked into + more thoroughly by somebody who understands it. + + * window.c: + * window.c (Fwindow_text_area_height): + * window.c (Fwindow_width): + * window.c (Fwindow_full_width): + * window.c (Fwindow_pixel_width): + * window.c (debug_print_window): + * window.c (syms_of_window): + Added functions window-text-area-height and window-full-width, + which are functions for returning various width and height + characteristics of a window. (One of these functions is necessary + for making the file dialog box work correctly, and the other one + was added for completeness.) Also added a table to the + documentation for window-height which describes the entire scheme + for accessing width and height characteristics of a window. + +2000-03-12 Kirill 'Big K' Katsnelson + + * nt.c (fstat): Added a comment for another problem with + non-encapsulated [f]stat(), reported by Adrian Aichner + . + +2000-03-11 Andy Piper + + * window.c (make_dummy_parent): initialize subwindow instance + cache. + (Fset_window_configuration): zero extent_modiff. + +2000-03-10 Andy Piper + + * redisplay.c (Fredraw_frame): reset the changed_set flags so that + more changes can be triggered. + (Fredisplay_frame): ditto. + (Fredraw_device): ditto. + (Fredisplay_device): ditto. + (redisplay_frame): make non-static. + (redisplay_frame): call update_frame_gutter_geometry outside of + display proper. + + * gutter.h: declare update_frame_gutter_geometry. + + * redisplay.h: declare redisplay_frame. + + * gutter.c (update_frame_gutter_geometry): move geometry changes + in update_frame_gutters here. Geometry changes can only occur + outside of redisplay. + (update_frame_gutters): remove geometry change code. + (Fredisplay_gutter_area): make sure that we are in display when we + update and that we have flushed any size changes. + +2000-03-11 Andy Piper + + * alloc.c (pdump_dump_data): remove i & count shadows. + +2000-02-27 Mike Alexander + + * sysdep.h: Declare pdump_read_file + + * sysdep.c (pdump_read_file): New function + + * alloc.c (pdump_load): Call pdump_read_file to get the portable + dump data + +2000-03-10 SL Baur + + * lrecord.h: add `lrecord_type_pgsetenv'. + +2000-03-08 SL Baur + + * symsinit.h: declare (vars|syms)_of* functions. + * lrecord.h: add `lrecord_type_pgconn' and 'lrecord_type_pgresult'. + +2000-03-06 SL Baur + + * config.h.in: Add symbols HAVE_POSTGRESQL and HAVE_POSTGRESQLV7 + + * inline.c: Include postgresql.h lrecord stuffs to placate buggy + GCCs. + + * emacs.c (main_1): Call postgres initialization code. + + * postgresql.h: New file. PostgreSQL RDBMS support. + * postgresql.c: New file. + +2000-03-08 Yoshiki Hayashi + + * redisplay-output.c (redisplay_output_display_block): Disable + redundant code. + +2000-03-09 Yoshiki Hayashi + + * mule-canna.c (Fcanna_henkan_region): Translate doc-string. + (Fcanna_henkan_next): Ditto. + (Fcanna_bunsetu_henkou): Ditto. + (Fcanna_henkan_kakutei): Ditto. + (Fcanna_henkan_end): Ditto. + (Fcanna_henkan_quit): Ditto. + (Fcanna_henkan_next): Set retun value correctly. + (c2mu): Use unsigned char instead of signed char. + +2000-03-09 Yoshiki Hayashi + + * emacs.c (main_1): Always call syms_of_gui. + * inline.c: include gui.h + +2000-03-09 Yoshiki Hayashi + + * redisplay.c (Vvisible_bell): Renamed from visible_bell and + converted to Lisp_Object. + (Qtop_bottom): New variable. + (syms_of_redisplay): Initialize it. + * redisplay.h (Vvisible_bell): Ditto. + * sound.c (ding): Ditto and check if Vvisible_bell is nil. + * redisplay-x.c (x_flash): When Vvisible_bell is top-bottom, + only flash top and bottom. + +2000-03-08 Andy Piper + + * buffer.c (Frename_buffer): record new buffer name the right way. + +2000-03-08 Andy Piper + + * glyphs.c (update_subwindow): increase hash depth so that widget + items get picked up properly. + + * redisplay-output.c (compare_runes): increase hash depth so that + widget items get picked up properly. + +2000-03-08 Andy Piper + + * gutter.c (output_gutter): add some debug. + + * glyphs.h (struct Lisp_Image_Instance): add display_hash. + (IMAGE_INSTANCE_DISPLAY_HASH): new macro. + (XIMAGE_INSTANCE_DISPLAY_HASH): ditto. + + * redisplay-output.c (compare_runes): use display_hash to + determine if glyphs really are not the same. + + * glyphs.c (update_subwindow): check display_hash to see if + anything really needs to be updated. If not then do + nothing. Record the display_hash after updating. + (image_instance_equal): compare the image_instance face also. + +2000-03-07 Yoshiki Hayashi + + * redisplay.h: Fix comment style. + +2000-03-08 Jonathan Harris + + * consle-msw.h (struct mswindows_frame): + Added new member paint_pending to indicate whether a WM_PAINT + magic event has been queued for this frame. + + * event-msw.c (mswindows_drain_windows_queue): + Don't queue a WM_PAINT magic event if one is already queued. + (emacs_mswindows_handle_magic_event): clear paint_pending flag. + + * frame-msw.c (mswindows_init_frame_1): initialise paint_pending flag. + +2000-03-07 Didier Verna + + * dired.c: #include `regex.h' after `sysfile.h'. + +2000-03-06 Martin Buchholz + + * sound.c (init_nas_sound): Fix compiler warning. + + * alloc.c (ALIASING_VOIDPP_DEREFERENCE): New. + (FREE_STRUCT_P): + (MARK_STRUCT_AS_FREE): + (MARK_STRUCT_AS_NOT_FREE): + Make `gcc -fstrict-aliasing' work properly. + +2000-03-07 Jonathan Harris + + * device-msw.c (mswindows_finish_init_device): Call CoInitialize(). + (mswindows_delete_device): Call CoUnnitialize(). + + * event-msw.c (mswindows_wnd_proc): WM_DROPFILES: Decode Shortcuts. + +2000-02-25 + + * process-nt.c: MinGW now has , but still needs + . + + * sysdep.c: This extern declaration for environ prevents MinGW + from finding the variable in CRTDLL.DLL. + + * s\mingw32.h (PBS_SMOOTH): Removed, now defined in cygwin's + windows headers. + (SHGFI_EXETYPE): .. + (WM_MOUSEWHEEL): .. + (_WIN32_IE): Added, needed to get the TCS_BOTTOM and TCS_VERTICAL + definitions. + (MMRESULT): Removed, now defined in cygwin's windows headers. + (TIMECAPS): .. + (uid_t,gid_t,pid_t,ssize_t): .. + (_timeb): Removed, MinGW defines both _timeb and timeb. + (HAVE_H_ERRNO): Added. + (HAVE_TZNAME): Added, configure is not detecting this. + +2000-02-03 IKEYAMA Tomonori + + * chartab.h (XCHAR_TABLE_VALUE_UNSAFE): New macro. + * syntax.c (syntax_match): Use it. + + * cmds.c: Import auto-fill-chars from FSF Emacs. + (Vauto_fill_chars): New variables. + (internal_self_insert): Check Vauto_fill_chars. + (vars_of_cmds): + Declare auto-fill-chars as a Lisp variable and initialize it. + +2000-03-05 Jonathan Harris + + * fileio.c (Fmake_symbolic_link): + (Ffile_symlink_p): + Run handlers even if local machine doesn't have symlinks. + +2000-03-05 Jonathan Harris + + * event-msw.c (mswindows_drain_windows_queue): + Don't generate paint magic events for non-XEmacs frames. + +2000-03-05 Andy Piper + + * redisplay.c (redisplay_frame): generate_displayable_area and + friends assumes that we are not in GC, we therefore have to make + sure that this doesn't happen. + + * gutter.c (calculate_gutter_size): generate_displayable_area + assumes that we are not in GC, we therefore have to make sure that + this doesn't happen. + +2000-03-05 Martin Buchholz + + * opaque.c (DEFINE_LRECORD_IMPLEMENTATION): opaque_ptr ==> opaque-ptr + +2000-03-03 Jan Vroonhof + + * redisplay.c (regenerate_window): Make sure we set a sane value + for end_pos even if we jump out of the loop. + (regenerate_window): Answer Ben's question :-). + (start_end_of_last_line): Add may_error argument. + (start_of_last_line): + (end_of_last_line): Pass may_error = 0. + (end_of_last_line_may_error): New function. + (pixel_to_glyph_translation): Use it, so we don't crash in + event_to_glyph. + +2000-03-04 Andy Piper + + * window.h (struct window): add gutter_extent_modiff. + + * window.c (allocate_window): zero out gutter_extent_modiff. + + * redisplay.h: declare sync_display_line_structs. + + * redisplay.c (add_glyph_rune): add a better comment. + + * redisplay-output.c (sync_display_line_structs): made non-static. + (compare_runes): remove unneccesary glyph cachel access. + + * gutter.h: declare gutter_extent_signal_changed_region_maybe. + + * gutter.c (output_gutter): don't output the gutter if extent + changes only involve extents in buffers. use 4 sets of display + lines. + (gutter_extent_signal_changed_region_maybe): new function. Mark + extents in gutters as changed. + (update_frame_gutters): use 4 sets of display lines. + (reset_gutter_display_lines): ditto. + (free_frame_gutters): ditto. + (redraw_exposed_gutter): force output of gutters. + + * frame.h (struct frame): add 4 sets of gutter display lines. + + * extents.c: (extent_changed_for_redisplay): signal changes to + extents in strings in the gutter as well as extents in buffers. + +2000-03-02 Andy Piper + + * gutter.c (specifier_vars_of_gutter): cosmetic changes. + + * frame.c (Fmake_frame): make sure the gutters get initialized + after the frame is visible. + (set_frame_selected_window): re-arrange compilation macros a + little. + (change_frame_size_1): mark gutters changed. + + * device.c (Fset_device_class): mark gutters changed. + +2000-03-01 Andy Piper + + * window.c (window_top_frame_gutter_height): deleted. + (window_bottom_frame_gutter_height): ditto. + (window_left_frame_gutter_height): ditto. + (window_right_frame_gutter_height): ditto. + (window_top_gutter_height): don't use them. + (window_bottom_gutter_height): ditto. + (window_left_gutter_width): ditto. + (window_right_gutter_width): ditto. + (Fsplit_window): ditto. + (Fwindow_pixel_edges): don't use border dimensions here. + + * scrollbar.c (update_scrollbar_instance): don't take gutters into account. + (update_scrollbar_instance): ditto. + + * redisplay.c (generate_modeline): don't take gutters into account. + (generate_modeline): ditto. + (redisplay_frame): small gutter display optimisation. + + * redisplay-x.c (x_output_vertical_divider): don't take gutters into account. + + * redisplay-msw.c (mswindows_output_vertical_divider): don't take + gutters into account. + + * gutter.h (WINDOW_REAL_*_GUTTER_BOUNDS): remove bogus checks + for window position and type. + + * gutter.c (get_gutter_coords): fix for frame gutters. + (update_frame_gutters): update frame geometry if the gutters have + changed. + (init_frame_gutters): record current gutter geometries. + + * glyphs-msw.c (mswindows_subwindow_instantiate): remove unused + var. + (mswindows_widget_instantiate): ditto. + + * frame.h (struct frame): add current_gutter_bounds. + + * frame.c (change_frame_size_1): position window and minibuffer + appropriately taking into account the frame gutters. + + * frame-x.c: (x_initialize_frame_size): take into account the + frame gutters. + +2000-02-29 Stephen J. Turnbull + + * emacs.c (data-directory): Xref `locate-data-file' in docstring. + +2000-02-29 Stephen J. Turnbull + + * alloc.c (dumpopaquevec): Increase dimension for --with-canna. + +1999-12-30 Yoshiki Hayashi + + * file-coding.c (reset_decoding_stream): Clear previous + detection state when autodetect. + +2000-02-29 Didier Verna + + * extents.c (set_extent_glyph_1): don't require extents to be + attached. + +2000-02-27 Andy Piper + + * gutter.c (Fset_default_gutter_position): don't default left and + right gutter visibility to t. + (Fset_default_gutter_position): run + default-gutter-position-changed-hook. + (syms_of_gutter): add default-gutter-position-changed-hook. + +2000-02-26 Andy Piper + + * specifier.c (Fmake_specifier): add gutter references. + + * gutter.h (RAW_WINDOW_GUTTER): new macro. + + * lisp.h: declare Fvalid_plist_p. + + * gutter.c (gutter_geometry_changed_in_window): mark the modeline + as changed. + (default_gutter_visible_p_changed_in_window): invalidate gutter as + well as its visibility so that it gets reconstructed. + (construct_window_gutter_spec): new function. Construct a string + to be displayed in the gutter from a plist of strings. Take care + to only use elements that are declared as visible. + (calculate_gutter_size): use RAW_WINDOW_GUTTER instead of + WINDOW_GUTTER. + (gutter_validate): allow plists of strings in the specifier. + (gutter_specs_changed): construct the real_gutter from the gutter + specs using construct_window_gutter_spec. + (gutter_visible_validate): gutter-visible is a new specifier type. + (Fgutter_visible_specifier_p): new function for the new specifier. + (syms_of_gutter): declare gutter-visible and + Fgutter_visible_specifier_p. + (specifier_type_create_gutter): intitalize new gutter-visible + specifier. + (reinit_specifier_type_create_gutter): ditto. + (specifier_vars_of_gutter): use new specifier type for gutter + visibility. + (init_frame_gutters): construct real_gutter correctly. + (Fgutter_specifier_p): beef up documentation. + (Fgutter_size_specifier_p): ditto. + + * winslots.h: add real_gutter slots. + +2000-02-25 Andy Piper + + * device-msw.c: Be kind to older cygwin versions. From Raymond + Toy . + + * gui-msw.c (Fmswindows_shell_execute): Remove things unknown to + earlier cygwins. From Raymond Toy . + +2000-02-25 Martin Buchholz + + * elhash.c (MARK_OBJ): Practice macro hygiene. + +2000-02-24 Martin Buchholz + + * miscplay.c: s/__inline__/inline/g; + * glyphs-msw.c (set_mono_pixel): INLINE ==> static inline + (get_device_compdc): INLINE ==> static inline + * *.[ch]: Change INLINE to INLINE_HEADER globally. + find -name '*.h' | \ + xargs global-replace \ + 's/(^|(?<=[^A-Za-z0-9_]))INLINE((?=[^A-Za-z0-9_])|$)/INLINE_HEADER/g' + +2000-02-25 Andy Piper + + * window.c (window_top_frame_gutter_height): new function. + (window_top_window_gutter_height): ditto. + (window_top_gutter_height): use them. + (window_bottom_frame_gutter_height): new function. + (window_bottom_window_gutter_height): ditto. + (window_bottom_gutter_height): use them. + (window_left_window_gutter_width): new function. + (window_left_frame_gutter_width): ditto. + (window_left_gutter_width): use them. + (window_right_window_gutter_width): new function. + (window_right_frame_gutter_width): ditto. + (window_right_gutter_width): use them. + (window_pixel_height): new function. calulate window pixel height + with frame gutter involvement. + (Fsplit_window): calculate new sizes taking frame gutters into + account. + (window_char_height_to_pixel_height): don't include frame gutters. + (window_char_height): use window_pixel_height. + (window_pixheight): rename from window_pixel_height. + (change_window_height): use it. + (window_pixel_height_to_char_height): don't include frame gutters. + (window_char_width_to_pixel_width): ditto. + +2000-02-25 Andy Piper + + * glyphs.h (IMAGE_INSTANCE_FACE): glyph might be nil, don't crash + if it is. + +2000-02-24 Martin Buchholz + + * alloc.c (staticpro): + (staticpro_nodump): + (dumpstruct): + (dumpopaque): + (pdump_wire): + (pdump_wire_list): + (compact_string_chars): + (pdump_dump_wired): + Convert: if (foo) abort(); ==> assert (! foo); + + * eldap.c (Fldap_search_basic): + (Fldap_add): + (Fldap_modify): + (Fldap_delete): + Fix compiler warnings, and possible crashes if (random) return + value were to be used. + +2000-02-21 Kirill 'Big K' Katsnelson + + * device-msw.c: Workaround ResetDC failure. + + * frame-msw.c (msprinter_init_frame_3): Added an assertion before + applying a devmode. + + * redisplay-msw.c (get_frame_dc): Added start_page_p. + (mswindows_text_width): Do not start printer page. + + * console-msw.h (CHECK_MSGDI_DEVICE): Added this and friends. + + * glyphs-msw.c: Added image methods to msprinter console and + msprinter-specific image instantiation. + +2000-02-20 Mike Alexander + + * select-msw.c (Fmswindows_set_clipboard): GC protect more things + to avoid crashes when selection-sets-clipboard is on + (mswindows_own_selection): ditto + +2000-02-19 Kirill 'Big K' Katsnelson + + * glyphs-msw.c: + * redisplay-msw.c (get_frame_dc): + (get_frame_compdc): + * console-msw.h: + * device-msw.c (mswindows_init_device): + (mswindows_delete_device): + (msprinter_init_device): + (msprinter_delete_device): + * frame-msw.c (mswindows_init_frame_1): + (mswindows_delete_frame): + (msprinter_init_frame_3): + (msprinter_delete_frame): Move compatible DC to device object from + frame object, for both mswindows and msprinter. Only one at a time + is needed, it is a real waste to have one per frame! + +2000-02-23 Andy Piper + + * glyphs.c: add dynamic width and height elements. + (image_instance_equal): ditto. + + * glyphs-widget.c (widget_query_geometry): calculate width and + height dynamically if required. + (initialize_widget_image_instance): initialize dynamic dimensions. + (widget_instantiate): pick-up dynamic dimensions. + + * glyphs.h (struct Lisp_Image_Instance): add width and height for + dynamic determination. Add appropriate macros. + + * gutter.h (WINDOW_GUTTER_BORDER_WIDTH): make non-integer + dimensions safe. + (WINDOW_GUTTER_SIZE): ditto. + (WINDOW_GUTTER_SIZE_INTERNAL): ditto. + + * redisplay-msw.c (get_frame_compdc): gcc can't cope with this + inline. + (get_frame_dc): ditto. + + * redisplay.h (GLOBAL_RESET_CHANGED_FLAGS): don't reset faces + here. + 2000-02-23 Martin Buchholz * XEmacs 21.2.31 is released. @@ -12,7 +1235,7 @@ 2000-02-21 Mike Sperber - * .dbxrc: + * .dbxrc: * .gdbinit: * Makefile.in.in: Remove obsolete EMACSBOOTSTRAP... environment variables. @@ -62,9 +1285,9 @@ * alloc.c (pdump_load): * alloc.c (GC_CHECK_LHEADER_INVARIANTS): New. * alloc.c (lrecord_type_index): Delete. - Make lisp object type indexes be constant. + Make lisp object type indexes be constant. Makes (byte-compile) 5% faster. - Put all marker functions into their own array. + Put all marker functions into their own array. Makes (garbage-collect) 5% faster. Optimize SYMBOL_VALUE_MAGIC_P. Makes (byte-compile) 2-3% faster. @@ -109,7 +1332,7 @@ * objects-msw.c: (mswindows_X_color_map): tweak some values so they match the default Windows palette. (mswindows_color_to_string): New function. - + 2000-02-21 Jonathan Harris * s/windowsnt.h: Only use __declspec(noreturn) with MSVC>=6. @@ -118,7 +1341,7 @@ * m/*, s/*: Removed obsolete DATA_SEG_BITS, PURE_SEG_BITS, WORD_MACHINE, SIGN_EXTEND_CHAR and EXPLICIT_SIGN_EXTEND. - + * symbols.c (init_symbols_once_early): Removed obsolete DATA_SEG_BITS related kludge. (defvar_magic): Ditto. @@ -137,12 +1360,12 @@ 2000-02-16 Kirill 'Big K' Katsnelson - * keymap.c (get_keyelt): + * keymap.c (get_keyelt): * unexnt.c (unexec): * vm-limit.c (memory_warnings): * ntheap.c (recreate_heap): * ntheap.h (UNINIT_PTR): - * select-msw.c (Fmswindows_get_clipboard): + * select-msw.c (Fmswindows_get_clipboard): (Fmswindows_set_clipboard): * objects-msw.h (MSWINDOWS_BAD_HFONT): * objects-msw.c: @@ -152,15 +1375,15 @@ * sysdep.c (sys_subshell): * process-nt.c (nt_create_process): * nt.c (normalize_filename): - (dostounix_filename): + (dostounix_filename): (unixtodos_filename): * ntproc.c (win32_executable_type): * ntplay.c (play_sound_data_1): - (play_sound_file): - * editfns.c (get_home_directory): - * event-msw.c (struct winsock_stream): - (mswindows_dde_callback): - * device-msw.c (msprinter_init_device): + (play_sound_file): + * editfns.c (get_home_directory): + * event-msw.c (struct winsock_stream): + (mswindows_dde_callback): + * device-msw.c (msprinter_init_device): (msprinter_get_devmode_copy): Frobbed syntax frivolities. * toolbar-msw.c (mswindows_free_frame_toolbars): Paramters to @@ -173,16 +1396,16 @@ * glyphs-widget.c (update_widget): Fixed comparison notation. * event-msw.c (mswindows_dde_callback): Removed extraneous ';'. - + * s\windowsnt.h (DOESNT_RETURN): Defined to support the MSVC __declspec(noreturn) syntax. 2000-02-19 Martin Buchholz - * eldap.c (Fldap_open): - (Fldap_search_basic): - (Fldap_add): - (Fldap_modify): + * eldap.c (Fldap_open): + (Fldap_search_basic): + (Fldap_add): + (Fldap_modify): Use new coding system conversion macros. 2000-01-06 Yoshiki Hayashi @@ -191,7 +1414,7 @@ 1999-11-27 Oscar Figueiredo - * eldap.h (Fldap_search) Renamed from Fldap_search_internal: + * eldap.h (Fldap_search) Renamed from Fldap_search_internal: (Fldap_add, Fldap_modify, Fldap_delete): New functions * eldap.c (Qadd, Qreplace): New constant symbols @@ -200,7 +1423,7 @@ Remove unnecessary calls to slow_down_interrupts and speed_up_interrupts (Fldap_search_basic): Renamed from Fldap_search_internal - Added new optional parameter VERBOSE that triggers the + Added new optional parameter VERBOSE that triggers the display of progress messages Remove unnecessary calls to slow_down_interrupts and speed_up_interrupts diff --git a/src/ChangeLog.1 b/src/ChangeLog.1 index fa31bc6..89cd18b 100644 --- a/src/ChangeLog.1 +++ b/src/ChangeLog.1 @@ -50,7 +50,7 @@ * This change adds four scrollbar specifiers: {horizontal,vertical}-scrollbar-visible-p and scrollbar-on-{top,left}-p. - Spare parts supplied by Didier Verna + Spare parts supplied by Didier Verna * frameslots.h: Added slots for the four specifier caching. @@ -80,7 +80,7 @@ (specifier_vars_of_scrollbar): Declared the four specifiers. * window.h (struct window): Defined slots for caching the new - specifiers. + specifiers. * window.c (mark_window): Mark them. (allocate_window): Initialize them. @@ -123,7 +123,7 @@ 1998-05-10 Kirill M. Katsnelson - * EmacsFrame.c (update_various_frame_slots): Do not store internal + * EmacsFrame.c (update_various_frame_slots): Do not store internal border width there. (EmacsFrameInitialize): Do it rather here. (EmacsFrameSetValues): If EditRes has changed internal border @@ -135,11 +135,11 @@ variables and access macros Added size_slipped redisplay bit and mark/clear macros. - * redisplay.c (redisplay_frame): Adjust frame size if size slipped + * redisplay.c (redisplay_frame): Adjust frame size if size slipped bit is set. (redisplay_device): Call redisplay_frame if size slipped bit is set. - - * frame.c (adjust_frame_size): Redisplay beats frame back in shape + + * frame.c (adjust_frame_size): Redisplay beats frame back in shape with this. Added. (frame_size_slipped): Added. (internal_set_frame_size): Clear size slipped bit. @@ -183,7 +183,7 @@ (EmacsFrameSetValues): Simulate a call to resize callback when no actual geometry change happened. - * console.h (struct console_methods): Removed declarations for all + * console.h (struct console_methods): Removed declarations for all _changed_in_frame methods for toolbars and scrollbars. Added frame_size_fixed_p method. @@ -267,7 +267,7 @@ the system. * ntproc.c: Removed select emulation crap and dynamic Windock - loading. + loading. * nt.c: Removed a lot of terrible wrappers for socket functions. @@ -395,9 +395,9 @@ 1998-05-04 Martin Buchholz - * rangetab.c: + * rangetab.c: * rangetab.h: Move #include's from rangetab.h into rangetab.c for - consistency. + consistency. * inline.c: include rangetab.h to get GCC inlines 1998-05-03 SL Baur @@ -466,17 +466,17 @@ * specifier.h: Corrected documentation on magic specifiers. Documented DEPTH parameter to instantiate_method. - Renamed reveal->unlock_ghost_specifiers_protected(). + Renamed reveal->unlock_ghost_specifiers_protected(). * specifier.c: Removed the reveal mechanism and made ghost specifiers read-only, so they are accessible as fallbacks of magic specifier, but aren't modifiable unless C code enables so. (specifier_equal): Compare specifier fallbacks as well. - * scrollbar.c (init_frame_scrollbars): - (init_device_scrollbars): + * scrollbar.c (init_frame_scrollbars): + (init_device_scrollbars): (init_global_scrollbars): Renamed - reveal->unlock_ghost_specifiers_protected(). + reveal->unlock_ghost_specifiers_protected(). 1998-05-01 Hrvoje Niksic @@ -613,7 +613,7 @@ Compute new character sizes passed to change_frame_size, do not use the old (pre-toolbar-change) ones. (update_frame_toolbars): Honor frame_changed and clear frame bits. - (recompute_overlaying_specifier): New helper function, called from + (recompute_overlaying_specifier): New helper function, called from default toolbar specifier change handlers. (default_toolbar_specs_changed): Use it. (default_toolbar_size_changed_in_frame): Ditto. @@ -622,7 +622,7 @@ (toolbar_geometry_changed_in_window): New handler. The old one, some_windows_value_changed, did not do the trick. (default_toolbar_size_changed_in_window): New handler for default - toolbar. + toolbar. (default_toolbar_border_width_changed_in_window): Ditto. (default_toolbar_visible_p_changed_in_window): Ditto. (specifier_vars_of_toolbar): Use one of the above four handlers @@ -765,8 +765,8 @@ Sun Apr 23 1998 Andy Piper 1998-04-24 Martin Buchholz - * mule-charset.h: - * mule-charset.c: + * mule-charset.h: + * mule-charset.c: Use ints instead of bitfields for Lisp_Charset fields. This should work around bugs in the latest egcs snapshot, and make XEmacs faster. Introduce dimension and chars as fields in @@ -812,7 +812,7 @@ Sat Apr 24 1998 Andy Piper * data.c (Fnot): There has traditionally been kludgy startup lisp code that called `null' even if `not' was more appropriate, because `not' was defined in lisp. This is one primitive - sufficiently important that it should ALWAYS be defined. + sufficiently important that it should ALWAYS be defined. Sat Apr 24 1998 Andy Piper @@ -874,10 +874,10 @@ Thu Apr 23 19:38:19 1998 Andy Piper 1998-04-23 Hrvoje Niksic - * fns.c (Fload_average): Respect errno when reporting getloadavg() + * fns.c (Fload_average): Respect errno when reporting getloadavg() errors. - * getloadavg.c (getloadavg): Cleaner Solaris implementation, based + * getloadavg.c (getloadavg): Cleaner Solaris implementation, based on sample code by Casper Dik. 1998-04-23 SL Baur @@ -903,7 +903,7 @@ Thu Apr 23 19:38:19 1998 Andy Piper * toolbar-msw.c (mswindows_clear_toolbar): Fixed wabbit buttons. (mswindows_output_toolbar): Gave 3D look to toolbars. Still no pretty, needs more work. - (mswindows_move_toolbar): Renamed so because it does not deal with + (mswindows_move_toolbar): Renamed so because it does not deal with redrawing exposed toolbars. Properly position toolbars. (mswindows_redraw_exposed_toolbars): Changed calls to the above. @@ -1026,7 +1026,7 @@ Wed Apr 22 12:59:35 1998 Andy Piper * eldap.c: (print_ldap): Ignore escapeflag (Fldap_search_internal): Added unwind protection to appropriately - free the LDAP temporary structures in case of interruption. Added + free the LDAP temporary structures in case of interruption. Added a QUIT to the result fetching loop. 1998-04-19 SL Baur @@ -1193,7 +1193,7 @@ Fri Apr 17 12:59:35 1998 Andy Piper * indent.c (vertical_motion_1): new helper function to share common code between Fvertical_motion and Fvertical_motion_pixels. - Properly handle the WINDOW argument as the doc string indicates it + Properly handle the WINDOW argument as the doc string indicates it should. Update docstrings to be more clear and concise. (Fvertical_motion): use vertical_motion_1. (Fvertical_motion_pixels): use vertical_motion_1. @@ -1206,7 +1206,7 @@ Fri Apr 17 12:59:35 1998 Andy Piper * specifier.c: Reworked many functions to support magic specifiers. - * scrollbar.c (specifier_vars_of_scrollbar): Made magic specifiers + * scrollbar.c (specifier_vars_of_scrollbar): Made magic specifiers Vscrollbar_width and Vscrollbar_height. (init_frame_scrollbars): Enabled critical lisp code operate on ghost specifiers. @@ -1215,7 +1215,7 @@ Fri Apr 17 12:59:35 1998 Andy Piper * scrollbar-msw.c (Fmswindows_init_scrollbar_metrics): Scrollbar init function, called from init-scrollbars-from-resuorce in - lisp/scrollbar.c + lisp/scrollbar.c (syms_of_scrollbar_mswindows): DEFSUBR it. * emacs.c (main_1): Called syms_of_scrollbar_mswindows() @@ -1252,7 +1252,7 @@ Thu Apr 16 12:59:35 1998 Andy Piper * data.c (pure_write_error): Accept an argument. - * emacs.c (vars_of_emacs): New variable `internal-error-checking'; + * emacs.c (vars_of_emacs): New variable `internal-error-checking'; initialize it. 1998-04-16 Hrvoje Niksic @@ -1301,7 +1301,7 @@ Thu Apr 16 12:59:35 1998 Andy Piper * device-x.c (have_xemacs_resources_in_xrdb): adhere to coding standards and avoid opening display twice by breaking - XtOpenDisplay into XOpenDisplay and XtDisplayInitialize. + XtOpenDisplay into XOpenDisplay and XtDisplayInitialize. (x_init_device): Ditto. 1998-04-15 Olivier Galibert @@ -1359,7 +1359,7 @@ Thu Apr 16 12:59:35 1998 Andy Piper 1998-04-13 Greg Klanderman - * redisplay.c (redisplay_window): When echo area is active, and we + * redisplay.c (redisplay_window): When echo area is active, and we swap in the echo area buffer, restore the minibuffer's pointm and startp when we restore the minibuffer to the window. This avoids having the minibuffer point randomly change when it is active but @@ -1391,9 +1391,9 @@ Thu Apr 16 12:59:35 1998 Andy Piper (emacs_mswindows_select_process): Get Win32 process handle directly from process lrecord. (get_process_handle): Removed function. - (emacs_mswindows_handle_magic_event): Removed handling of + (emacs_mswindows_handle_magic_event): Removed handling of XM_BUMPQUEUE magic event. - (mswindows_wnd_proc): Removed handling of WM_EXITMENULOOP message, + (mswindows_wnd_proc): Removed handling of WM_EXITMENULOOP message, which called a do-nothing handler in menubar-msw.c (mswindows_wnd_proc, WM_EXITSIZEMOVE): Queue an empty event instead of magic event, via mswindows_bump_queue(). @@ -1410,18 +1410,18 @@ Thu Apr 16 12:59:35 1998 Andy Piper * event-stream.c (event_stream_deal_with_async_timeout): Conditionalized timer-based polling for finished processes on - HAVE_UNIX_PROCESSES. + HAVE_UNIX_PROCESSES. * menubar-msw.c (mswindows_handle_wm_command): Queued proper bump queue event. (mswindows_handle_wm_exitmenuloop): Removed function. - + * menubar-msw.h: Removed unused function prototype. * process-nt.c (get_nt_process_handle): Added function. * signal.c (init_poll_for_sigchld): Conditionalized on - HAVE_UNIX_PROCESSES. + HAVE_UNIX_PROCESSES. 1998-04-13 Kirill M. Katsnelson @@ -1455,40 +1455,40 @@ Thu Apr 16 12:59:35 1998 Andy Piper * callproc.c (init_callproc): Correctly initialize `shell-file-name' for WINDOWSNT - + * emacs.c (main_1): Properly called new functions (see symsinit.h entry for which). - * event-msw.c (struct ntpipe_slurp_stream): - (slurp_thread): - (make_ntpipe_input_stream): - (get_ntpipe_input_stream_waitable): - (get_ntpipe_input_stream_param): - (ntpipe_slurp_reader): - (ntpipe_slurp_closer): + * event-msw.c (struct ntpipe_slurp_stream): + (slurp_thread): + (make_ntpipe_input_stream): + (get_ntpipe_input_stream_waitable): + (get_ntpipe_input_stream_param): + (ntpipe_slurp_reader): + (ntpipe_slurp_closer): (init_slurp_stream): Win32 pipe input stream implementation. - (struct ntpipe_shove_stream): - (shove_thread): - (make_ntpipe_output_stream): - (get_ntpipe_output_stream_param): - (ntpipe_shove_writer): - (ntpipe_shove_was_blocked_p): - (ntpipe_shove_flusher): - (ntpipe_shove_closer): + (struct ntpipe_shove_stream): + (shove_thread): + (make_ntpipe_output_stream): + (get_ntpipe_output_stream_param): + (ntpipe_shove_writer): + (ntpipe_shove_was_blocked_p): + (ntpipe_shove_flusher): + (ntpipe_shove_closer): (init_shove_stream): Win32 pipe output stream implementation. (mswindows_enqueue_process_event): Dispatch helper. - (find_waitable_handle): - (add_waitable_handle): + (find_waitable_handle): + (add_waitable_handle): (remove_waitable_handle): New three, waitable handles handling. (mswindows_need_event_in_modal_loop): Simplified. (mswindows_need_event): Simplified. - (mswindows_need_event): Generate process events on process output; + (mswindows_need_event): Generate process events on process output; kick status_notify when a process ends. (mswindows_find_console): Simplified. (emacs_mswindows_event_pending_p): Adjusted parameters to mswindows_need_event(). (emacs_mswindows_next_event): Ditto. - (get_process_input_waitable): + (get_process_input_waitable): (get_process_handle): Process select/unselect helpers. (emacs_mswindows_select_process): Implemented. (emacs_mswindows_unselect_process): Implemented. @@ -1521,7 +1521,7 @@ Thu Apr 16 12:59:35 1998 Andy Piper 1998-04-10 Martin Buchholz - * fns.c (Fnthcdr): + * fns.c (Fnthcdr): Most times through the loop will get a cons, so optimize for that. * bytecode.c (Fbyte_code): Remove '91 vintage compiler bug workaround. @@ -1572,8 +1572,8 @@ Thu Apr 16 12:59:35 1998 Andy Piper * event-msw.c (mswindows_wnd_proc): Fix member access macro names. - * frame-msw.c (mswindows_frame_property): - (mswindows_internal_frame_property_p): + * frame-msw.c (mswindows_frame_property): + (mswindows_internal_frame_property_p): (mswindows_frame_properties): Implemented for the 'left and 'top properties. (console_type_create_frame_mswindows): Regsitered the above. @@ -1650,10 +1650,10 @@ Thu Apr 16 12:59:35 1998 Andy Piper * insdel.c (make_gap): Thou shan't cast EMACS_INT_MAX to int. (buffer_insert_string_1): ditto. - * regex.c (print_partial_compiled_pattern): Neither EMACS_INTs nor + * regex.c (print_partial_compiled_pattern): Neither EMACS_INTs nor ptrdiff_t are portably printable as an int. - * redisplay.c (window_line_number): Don't assume that an EMACS_INT + * redisplay.c (window_line_number): Don't assume that an EMACS_INT in an int. * alloc.c (report_pure_usage): Don't assume that a size_t is @@ -1717,24 +1717,24 @@ Thu Apr 16 12:59:35 1998 Andy Piper (sys_chmod): (sys_creat): - * sysdep.c (sys_read_1): - (sys_read): - (sys_write_1): - (sys_write): - (sys_mkdir): - (sys_readlink): - (sys_chmod): - (sys_creat): - - * nt.c (sys_read): - (sys_chmod): - (sys_creat): + * sysdep.c (sys_read_1): + (sys_read): + (sys_write_1): + (sys_write): + (sys_mkdir): + (sys_readlink): + (sys_chmod): + (sys_creat): + + * nt.c (sys_read): + (sys_chmod): + (sys_creat): (sys_write): Change types of sys_* in accordance with published standards. Use size_t and mode_t instead of unsigned int and int. 1998-04-03 Martin Buchholz - * config.h.in (enum_field): + * config.h.in (enum_field): * lisp-union.h: * extents.h: * redisplay.c (add_margin_runes): @@ -1798,7 +1798,7 @@ Thu Apr 16 12:59:35 1998 Andy Piper * window.c (set_window_pixsize): Move up call to check_min_window_sizes. - * indent.c (vmotion_1): renamed from vmotion() and added + * indent.c (vmotion_1): renamed from vmotion() and added additional argument to optionally return the pixel motion. (vpix_motion): Helper for vmotion_1. (vmotion): Wrapper - just call vmotion_1() with the right args. @@ -1807,36 +1807,36 @@ Thu Apr 16 12:59:35 1998 Andy Piper 1998-04-02 Martin Buchholz - * xselect.c: - * event-Xt.c: - * emacs.c: + * xselect.c: + * event-Xt.c: + * emacs.c: Remove last vestiges of #ifdef EPOCH code. It had no chance of - working anyways. In honour of seeing Marc Andreesen in person for + working anyways. In honour of seeing Marc Andreesen in person for the first time today. 1998-04-01 Martin Buchholz - * extents.h: - * lisp-union.h: + * extents.h: + * lisp-union.h: Don't use enums as bitfields - only unsigned ints. Fixes: warning: nonportable bit-field type * eval.c (call_with_suspended_errors): More volatilizing to appease Sunpro cc. - * mem-limits.h: + * mem-limits.h: * ralloc.c: Remove #undef NULL; they're not even used! - * process-unix.c (unix_send_process): send_process is a method, so + * process-unix.c (unix_send_process): send_process is a method, so we can't include volatile in the prototype. We make the argument - non-volatile, make a volatile copy, and then use that instead. + non-volatile, make a volatile copy, and then use that instead. - * frame-x.c (x_delete_frame): The `frame' variable is initialized + * frame-x.c (x_delete_frame): The `frame' variable is initialized but not actually used. * Makefile.in.in (xselect.o): The last line of b34-pre2's src/Makefile.in.in contains a dependency that should have been - patched away. + patched away. (mostlyclean): Remove the removal of depend.* - no such files exist anymore @@ -1908,7 +1908,7 @@ Sun Mar 29 1998 Andy Piper 1998-03-30 Martin Buchholz - * redisplay.c (create_right_glyph_block): glyph_type should really + * redisplay.c (create_right_glyph_block): glyph_type should really be glyph_layout. 1998-03-29 Martin Buchholz @@ -1918,7 +1918,7 @@ Sun Mar 29 1998 Andy Piper #include sysfile.h. Check all .o files for missing #includes. * config.h.in: - Discovered that config.h.in was missing ENCAPSULATE_CLOSEDIR, as a + Discovered that config.h.in was missing ENCAPSULATE_CLOSEDIR, as a result of fixing the above. * gui.c (gui_item_add_keyval_pair): We should not use the idiom @@ -1927,7 +1927,7 @@ Sun Mar 29 1998 Andy Piper (signal_too_long_error): Ditto. * glyphs.c (image_instantiate_cache_result): Use XC[AD]R instead - of Fc[ad]r. This is always called with valid conses, and in fact, + of Fc[ad]r. This is always called with valid conses, and in fact, already assumed it. * font-lock.c (find_context): Use context_none with context @@ -1940,7 +1940,7 @@ Sun Mar 29 1998 Andy Piper 1998-03-28 Martin Buchholz - * fns.c (string_putprop): + * fns.c (string_putprop): (string_getprop): Make method functions static. * window.c (find_window_by_pixel_pos): Warning suppression. @@ -1949,7 +1949,7 @@ Sun Mar 29 1998 Andy Piper * redisplay-x.c (x_output_eol_cursor): Remove redundant XSETWINDOW. - * glyphs-x.c (signal_image_error): + * glyphs-x.c (signal_image_error): (signal_image_error_2): (convert_EImage_to_XImage): Make functions static. @@ -1966,7 +1966,7 @@ Sun Mar 29 1998 Andy Piper 1998-03-27 Martin Buchholz - * console-tty.c (free_tty_console_struct): + * console-tty.c (free_tty_console_struct): Replace con->console_data with CONSOLE_type_DATA (con) * *.[ch]: C++ compilability of xemacs, on Linux and Solaris. @@ -1976,7 +1976,7 @@ Sun Mar 29 1998 Andy Piper * eval.c: * bytecode.c: Rename Fcondition_case_3 to condition_case_3 - it's not a DEFUN. - + * buffer.h: Remove all *BUFFER_OR_STRING* macros - unused. (memind_to_bytind): Merge two versions of function by moving @@ -1998,27 +1998,27 @@ Sun Mar 29 1998 Andy Piper * marker.c (print_marker): Fix compiler warning, real bug! - * device.h (MARK_DEVICE_FRAMES_FACES_CHANGED): - * frame.h (MARK_FRAME_FACES_CHANGED): - (MARK_FRAME_TOOLBARS_CHANGED): - (MARK_FRAME_SIZE_CHANGED): - (MARK_FRAME_CHANGED): - (MARK_FRAME_WINDOWS_CHANGED): - (MARK_FRAME_WINDOWS_STRUCTURE_CHANGED): + * device.h (MARK_DEVICE_FRAMES_FACES_CHANGED): + * frame.h (MARK_FRAME_FACES_CHANGED): + (MARK_FRAME_TOOLBARS_CHANGED): + (MARK_FRAME_SIZE_CHANGED): + (MARK_FRAME_CHANGED): + (MARK_FRAME_WINDOWS_CHANGED): + (MARK_FRAME_WINDOWS_STRUCTURE_CHANGED): Fix multiple evaluation of macro arguments. Macros are a fact of life. Callers have to use temp variables to avoid multiple evaluation of arguments. * data.c (Ftrue_list_p): New function, with obvious meaning. - This is terminology from Cltl2. + This is terminology from Cltl2. Also define a corresponding macro TRUE_LIST_P. * device-x.c (validify_resource_component): Optimize. Rename. Use the standard technique of using a precomputed table of valid chars. - - (x_get_resource_prefix): - (Fx_get_resource): - (Fx_get_resource_prefix): + + (x_get_resource_prefix): + (Fx_get_resource): + (Fx_get_resource_prefix): Avoid fixed buffer sizes. Use a char_dynarr. Run validify_resource_component on all computed components. @@ -2033,50 +2033,50 @@ Sun Mar 29 1998 Andy Piper Use acons in functions which create alists. * lisp/cl.el (acons): Add docstring. Really otta be a macro, tho. - * buffer.c (Fbuffer_memory_usage): + * buffer.c (Fbuffer_memory_usage): * window.c (Fwindow_memory_usage): Clean up horrible consing code using new acons function. Fix incorrect value reported for gap-overhead. - + * fns.c (Fmember): - (Fold_member): - (Fmemq): - (Fold_memq): - (memq_no_quit): - (Fassoc): - (Fold_assoc): - (Fassq): - (Fold_assq): - (assq_no_quit): - (Frassoc): - (Fold_rassoc): - (Frassq): - (Fold_rassq): - (rassq_no_quit): - (Fdelete): - (Fold_delete): - (Fdelq): - (Fold_delq): - (delq_no_quit): - (delq_no_quit_and_free_cons): - (Fremassoc): - (Fremassq): - (remassq_no_quit): - (Fremrassoc): - (Fremrassq): - (remrassq_no_quit): - (Fnreverse): - (Freverse): - (Fnthcdr): - Optimize. - Replace calls to Fcar, Fcdr, Fsetcar with XCAR and XCDR. + (Fold_member): + (Fmemq): + (Fold_memq): + (memq_no_quit): + (Fassoc): + (Fold_assoc): + (Fassq): + (Fold_assq): + (assq_no_quit): + (Frassoc): + (Fold_rassoc): + (Frassq): + (Fold_rassq): + (rassq_no_quit): + (Fdelete): + (Fold_delete): + (Fdelq): + (Fold_delq): + (delq_no_quit): + (delq_no_quit_and_free_cons): + (Fremassoc): + (Fremassq): + (remassq_no_quit): + (Fremrassoc): + (Fremrassq): + (remrassq_no_quit): + (Fnreverse): + (Freverse): + (Fnthcdr): + Optimize. + Replace calls to Fcar, Fcdr, Fsetcar with XCAR and XCDR. Simplify logic. Many of these functions wouldn't QUIT if called on cyclic lists. e.g. try (progn (setq x '(nil)) (setcdr x x) (reverse x)) One benchmark of delq showed it to be 3 times faster. * emacs.c: - * database.c: + * database.c: Cleanup of database functions. Make the get_subtype and get_type methods return Lisp_Objects, instead of C strings. No more need for both dbm_type and dbm_lisp_type. @@ -2084,7 +2084,7 @@ Sun Mar 29 1998 Andy Piper Replace old `dbm' names with `database'. Rename struct database to struct Lisp_Database. Rename DEFUN arguments to `database', when applicable. - + * buffer.c: * chartab.c: * console.c: @@ -2112,7 +2112,7 @@ Sun Mar 29 1998 Andy Piper * window.c: Place DEFINE_LRECORD_* after definition of static object methods, to avoid redundant declarations. - + * console.c: * console.h: * device.c: @@ -2142,7 +2142,7 @@ Sun Mar 29 1998 Andy Piper 1998-03-21 Martin Buchholz * alloc.c (list*): Optimize recursion levels. - + * alloc.c: Add debugger support via enum dbg_constants. * gdbinit: Complete rewrite. * gdbinit.union: Remove @@ -2153,7 +2153,7 @@ Sun Mar 29 1998 Andy Piper Support all combinations of Kylish DEFINEs. Work out of the box with no user customizations. See the updated faq for details. - + * emacsfns.h: Remove. Move declarations to lisp.h * dynarr.h: Remove. Move declarations to lisp.h * lisp.h. @@ -2161,8 +2161,8 @@ Sun Mar 29 1998 Andy Piper Introduce EXFUN macro for external declaration to correspond to DEFUN. Include header files only when necessary, i.e. not from lisp.h: - unistd.h, limits.h, fnctl.h, blocktype.h, dynarr.h, emacsfns.h - - + + * lisp.h: * lisp-union.h: * lisp-disunion.h: @@ -2217,7 +2217,7 @@ Sun Mar 29 1998 Andy Piper * depend: New file. Generated by make-src-depend * make-src-depend: New file. generates up-to-date dependencies. Makefile dependencies are now automagically maintained, and - CORRECT. lisp.h and friends are now included in the dependencies, + CORRECT. lisp.h and friends are now included in the dependencies, since this complies with the principle of least astonishment. * symbols.c (symbol_is_constant): Optimize. @@ -2230,7 +2230,7 @@ Sun Mar 29 1998 Andy Piper 1998-03-29 SL Baur * emacs.c (voodoo_free_hook): ELF libraries built with newer - versions of GCC do horrible things in dumped binaries after exit() + versions of GCC do horrible things in dumped binaries after exit() is called. (Fkill_emacs): Use it. @@ -2288,8 +2288,8 @@ Sat Mar 28 10:16:29 1998 Andy Piper glyph_changed_set variables, mimicking clip_changed and clip_changed_set. - (redisplay_window): Reset the window's glyph cache is - f->glyphs_changed is non-zero. Call regenerate_window + (redisplay_window): Reset the window's glyph cache is + f->glyphs_changed is non-zero. Call regenerate_window if f->glyphs_changed is non-zero. (redisplay_frame): Clear f->glyphs_changed after @@ -2311,12 +2311,12 @@ Sat Mar 28 10:16:29 1998 Andy Piper related, mark all frames. * redisplay-output.c (compare_display_blocks): - Output the whole display block if f->glyphs_changed is + Output the whole display block if f->glyphs_changed is non-nil. 1998-03-27 Kyle Jones - * callproc.c (Fcall_process_internal): In the case where + * callproc.c (Fcall_process_internal): In the case where fd_error and fd1 are the same don't close that descriptor twice. @@ -2352,7 +2352,7 @@ Sat Mar 28 10:16:29 1998 Andy Piper (mswindows_init_frame_1): Fixed support for popup frames. (mswindows_delete_frame): Fixed memory leak. (mswindows_get_frame_parent): Implemented. - (mswindows_update_frame_external_traits): Moved part of the former + (mswindows_update_frame_external_traits): Moved part of the former update_EmacsFrame() here. (console_type_create_frame_mswindows): Declare get_frame_parent and update_frame_external_traits methods. @@ -2366,16 +2366,16 @@ Sat Mar 28 10:16:29 1998 Andy Piper windows does not yet have associated frame object (mswindows_find_frame): Casted long to Lisp_Object properly. - * device.c (window_system_pixelated_geometry): Changed to call the + * device.c (window_system_pixelated_geometry): Changed to call the device_implementation_flags device method. * device-msw.c (mswindows_device_implementation_flags): - Implemented. + Implemented. (console_type_create_device_mswindows): Declared the above. * console.h (struct console_methods): Added device_implementation_flags_method and - update_frame_external_traits_method. + update_frame_external_traits_method. Defined flags retuned by device_implementation_flags_method. * console-msw.h (struct mswindows_frame): Added charheight and @@ -2384,7 +2384,7 @@ Sat Mar 28 10:16:29 1998 Andy Piper Moved Windows-specific macros from frame.h here. (typedef struct XEMACS_RECT_WH): Added. Declared global variables. - + 1998-03-19 Kirill M. Katsnelson * console-msw.h: Added prototypes for @@ -2408,8 +2408,8 @@ Sat Mar 28 10:16:29 1998 Andy Piper indication to fake font size to 1. (char_to_pixel_size): Ditto. (round_size_to_char): Ditto. - (pixel_to_real_char_size): - (char_to_real_pixel_size): + (pixel_to_real_char_size): + (char_to_real_pixel_size): (round_size_to_real_char): New three counterparts of the above metioned functions, which always use real character metrics. (change_frame_size_1): Use real character metrics when computing @@ -2423,7 +2423,7 @@ Sat Mar 28 10:16:29 1998 Andy Piper (mswindows_init_frame_2): Commented out, unused. (mswindows_after_init_frame): Added frame method. (mswindows_set_frame_size): Reworked to support pixel base - geometry. + geometry. (mswindows_set_frame_position): Cahnged to use SetWindowPos. (mswindows_lower_frame): Ditto. (mswindows_set_frame_properties): Fixed to perform correct @@ -2432,7 +2432,7 @@ Sat Mar 28 10:16:29 1998 Andy Piper after_init_frame added. * faces.c (default_face_height_and_width_1): Added. - (update_EmacsFrame): Changed method of notifying mswindwows frame, + (update_EmacsFrame): Changed method of notifying mswindwows frame, so modeline border gets redrawn. * faces.h: Prototype for default_face_height_and_width_1(). @@ -2443,13 +2443,13 @@ Sat Mar 28 10:16:29 1998 Andy Piper char if window is maximized. Use real char metrics for rounding. Call DefWindowProc to process WM_GETMINMAXINFO - (mswindows_set_chord_timer): Changed chord timeout from 1/2 to 1/3 + (mswindows_set_chord_timer): Changed chord timeout from 1/2 to 1/3 system double click time * device.c (domain_device_type): New function. - (window_system_pixelated_geometry): New function. + (window_system_pixelated_geometry): New function. (Fdomain_device_type): New function, lisp interface to - domain_device_type(). + domain_device_type(). (syms_of_device): DEFSUBRed the above. * device.h: Ptorotypes for domain_device_type() and @@ -2492,7 +2492,7 @@ Sat Mar 28 10:16:29 1998 Andy Piper 1998-03-27 P. E. Jareth Hein - * glyphs-x.c: + * glyphs-x.c: * imgproc.c: * imgproc.h: * glyphs-x.h: Added in a colormap variable in the X specific image @@ -2501,7 +2501,7 @@ Sat Mar 28 10:16:29 1998 Andy Piper coding standards. * glyphs.h: - * glyphs.c: + * glyphs.c: * glyphs-x.c: added image-conversion-error type * objects-x.c (allocate_nearest_color): Corrected a minor bug involving @@ -2530,13 +2530,13 @@ Sat Mar 28 10:16:29 1998 Andy Piper 1998-03-24 Kirill M. Katsnelson - * fileio.c (Ffile_readable_p): GC protect fix, MS Windows specific. + * fileio.c (Ffile_readable_p): GC protect fix, MS Windows specific. Mon Mar 23 22:14:12 1998 Andy Piper * configure.in: compile in glyphs-msw.o when compiling fopr mswindows. - + Mon Mar 23 22:14:12 1998 Andy Piper * msw-glyphs.el: add support for xpm and bmp. change @@ -2547,7 +2547,7 @@ Mon Mar 23 22:14:12 1998 Andy Piper * Makefile.in.in: fastdump - new target for dumping bypassing bytecompilation, DOC. Add dependencies for glyphs-msw.o. Move imgproc.o to object list. - + * glyphs-msw.h: * glyphs-msw.c: new files adding support for xpm and bmp and EImages. @@ -2557,7 +2557,7 @@ Mon Mar 23 22:14:12 1998 Andy Piper * console-msw.h: add bitspixel field to mswindows frame. * device-msw.c: initialise bitspixel field in mswindows frame. - + * glyphs-x.c (xpm_instantiate): call mswindows_xpm_instantiate if the device type is mswindows. @@ -2565,7 +2565,7 @@ Mon Mar 23 22:14:12 1998 Andy Piper mswindows. * symsinit.h: add prototypes for glyphs-msw.c functions. - + * sheap.c: make includes src-dir compliant. * events.c: remove cygwin ^H <-> erase hack. @@ -2609,7 +2609,7 @@ Mon Mar 23 22:14:12 1998 Andy Piper if the symbol is in Vobarray. * symbols.c (reject_constant_symbols): Signal error when - attempting to assign a value to a keyword, unless the value is the + attempting to assign a value to a keyword, unless the value is the keyword itself. * symbols.c (Fintern): Initialize symbol's ->obarray to t only @@ -2716,7 +2716,7 @@ Mon Mar 23 22:14:12 1998 Andy Piper * config.h.in: Add HAVE_LIBMCHECK and HAVE_MCHECK_H. * hash.c (grow_hashtable): Fix tests to compare against - Qnull_pointer since this function may be called before any symbols + Qnull_pointer since this function may be called before any symbols or the Lisp engine is initialized. * emacs.c (main_1): Restore usage of free-hook.c. @@ -2730,7 +2730,7 @@ Mon Mar 23 22:14:12 1998 Andy Piper control variable is being modified underneath us. - Avoid calling delete_console_internal on stream consoles. - * console-tty.c (free_tty_console_struct): NULL out pointers after + * console-tty.c (free_tty_console_struct): NULL out pointers after xfree'ing. * console-stream.c (allocate_stream_console_struct): Fix memory @@ -2758,7 +2758,7 @@ Mon Mar 23 22:14:12 1998 Andy Piper (Fwrite_region_internal): Ditto. (decide_buffer_type): Function removed. (buf_decide_buffer_type): Function removed. - (Many places): References to DOS_NT replaced with WINDOWSNT. MSDOS- + (Many places): References to DOS_NT replaced with WINDOWSNT. MSDOS- specific code removed. * lread.c (Fload_internal): Removed ugly DOS style re-opening a @@ -2774,7 +2774,7 @@ Mon Mar 23 22:14:12 1998 Andy Piper implemented in nt.c * fileio.c (Ffile_readable_p): Conditionalized declared never used - variables. + variables. (Fexpand_file_name): Ditto. (check_executable): Ditto. @@ -2823,7 +2823,7 @@ Mon Mar 23 22:14:12 1998 Andy Piper 1998-03-15 Kyle Jones - * console.h: Added set_final_cursor_coords method to console + * console.h: Added set_final_cursor_coords method to console struct. * console-tty.h: Added final_cursor_x and final_cursor_y @@ -2872,7 +2872,7 @@ Mon Mar 23 22:14:12 1998 Andy Piper * glyphs-x.c (png_instantiate): Added in override support for png backgrounds. - + 1998-03-13 P. E. Jareth Hein * glyphs-x.c (png_instantiate): Fixed a bug that was causing @@ -3058,7 +3058,7 @@ Mon Mar 09 13:00:55 1998 Andy Piper (Fenlarge_window_pixels): New function. (Fshrink_window_pixels): New function. (window_displayed_pixel_height): New, helper for - Fwindow_displayed_pixel_height. + Fwindow_displayed_pixel_height. (change_window_height): Add `inpixels' argument. (syms_of_window): 3 new DEFSUBR's. @@ -3179,16 +3179,16 @@ Fri Feb 20 21:22:34 1998 Darryl Okahata (get_eof_char): Ditto * symsinit.h: Prototypes for initialization functions called from - emacs.c: process_type_create_mswindows, process_type_create_unix, + emacs.c: process_type_create_mswindows, process_type_create_unix, vars_of_process_mswindows, vars_of_process_unix. - * procimpl.h: New file. Includes prototypes and other stuff shared + * procimpl.h: New file. Includes prototypes and other stuff shared by process.c and implementation files (process-unix.c, process-msw.c in future). * process.h (PROCESS_LIVE_P): Changed to test against stream existence, to avoid dependency on fds. - + * process.c: Only process implementation independent code is now in this file. Moved the rest into process-unix.c (Fopen_network_stream_internal): Added 5th parameter, protocol @@ -3198,7 +3198,7 @@ Fri Feb 20 21:22:34 1998 Darryl Okahata processes. UNIX-specific code from the old process.c is here. * Lstream.c (Lstream_was_blocked_p): New function. Replaces - filedesc_stream_was_blocked_p. + filedesc_stream_was_blocked_p. (filedesc_was_blocked_p): Implementation of the method for filedesc stream (filedesc_stream_set_pty_flushing): set pty_flushing flag @@ -3208,10 +3208,10 @@ Fri Feb 20 21:22:34 1998 Darryl Okahata optional lstream method. Added prototypes for functions in lstream.c - * lisp.h: (USID): Typedef for Unique Stream IDentifier. Reuqired + * lisp.h: (USID): Typedef for Unique Stream IDentifier. Reuqired by the new code in many places. - * events.h (struct event_stream): Declaration of the two mandatory + * events.h (struct event_stream): Declaration of the two mandatory event stream methods, required by process support. * event-unixoid.c (event_stream_unixoid_create_stream_pair): @@ -3235,7 +3235,7 @@ Fri Feb 20 21:22:34 1998 Darryl Okahata (emacs_Xt_delete_stream_pair): Ditto * emacs.c (main_1): Added calls to process_type_create*() and - vars_of_process() + vars_of_process() * callproc.c: (many places): removed DOS support @@ -3290,7 +3290,7 @@ Mon Mar 02 11:37:36 1998 Andy Piper 1998-03-01 Kyle Jones - * file-coding.c (setup_eol_coding_systems): Don't try + * file-coding.c (setup_eol_coding_systems): Don't try to copy the mnemonic property of the coding system unless it is a string. @@ -3304,7 +3304,7 @@ Mon Mar 02 11:37:36 1998 Andy Piper 1998-03-01 Kyle Jones - * callint.c: Read coding system names for the 'z' and + * callint.c: Read coding system names for the 'z' and 'Z' interactive specs if FILE_CODING or MULE is defined. Previously, coding system names were read only if MULE was defined. @@ -3393,7 +3393,7 @@ Tue Feb 17 12:50:37 1998 Andy Piper * mule-coding.c: #if 0 out functionality until file-coding is split up. - * file-coding.h: + * file-coding.h: * file-coding.c: new files. copies of mule-coding.h and mule-coding.c. The mule case is unchanged. The non-mule case removes coding relating to other charsets - iso2022, big5, sjis, @@ -3431,7 +3431,7 @@ Tue Feb 17 12:50:37 1998 Andy Piper case, the application class is chosen based on whether the user has any resources with application class `XEmacs' set in the resource database. - (vars_of_device_x): make x-emacs-application-class nil by default + (vars_of_device_x): make x-emacs-application-class nil by default and document new behavior in its doc string. 1998-02-23 Aki Vehtari @@ -3451,11 +3451,11 @@ Tue Feb 17 12:50:37 1998 Andy Piper * s/sol2.h: define HAVE_GETLOADAVG for late edition Solaris From Georg Nikodym -1998-02-24 Didier Verna +1998-02-24 Didier Verna * redisplay.c (generate_fstring_runes): fixed the modeline scrolling lossage (the % constructs appearing in the - modeline). Now that we can have negative positions and boundaries, + modeline). Now that we can have negative positions and boundaries, max_pos == -1 can't mean 'no limit' anymore. Me, stupido! (add_string_to_fstring_db_runes): Ditto. (add_glyph_to_fstring_db_runes): Ditto. @@ -3508,7 +3508,7 @@ Tue Feb 17 12:50:37 1998 Andy Piper * unexelf.c: The proper way to check for GNU libc is with __GLIBC__. Suggested by Andreas Jaeger - + 1998-02-18 SL Baur * Makefile.in.in: Remove all references to prefix-args. @@ -3536,28 +3536,28 @@ Tue Feb 17 12:50:37 1998 Andy Piper (Fset-window-configuration): Restore window-cached specifier values. -1998-02-18 Didier Verna +1998-02-18 Didier Verna * modeline.el (mouse-drag-modeline): added the horizontal scrolling functionality for the modeline. This could still be improved, for instance when the mouse goes out of the modeline. -1998-02-18 Didier Verna +1998-02-18 Didier Verna * redisplay.c: (generate_formatted_string_db): new flag to distinguish a modeline string from a title or icon one, plus use a negative first pos to - indicate the modeline hscroll ammount. + indicate the modeline hscroll ammount. (add_string_to_fstring_db_runes): completely rewrote this function to handle the case of scrolled modelines. (add_glyph_to_fstring_db_runes): handle the case of scrolled - modelines. + modelines. * window.c: (Fmodeline_hscroll): new function to return the modeline current - horizontal scroll ammount. + horizontal scroll ammount. (Fset_modeline_hscroll): new function to scroll the modeline - horizontaly. + horizontaly. Plus some updates related to this new functionality (windows configuration, notably). @@ -3604,8 +3604,8 @@ Tue Feb 17 12:50:37 1998 Andy Piper 1998-02-14 Martin Buchholz - * event-Xt.c (x_reset_key_mapping): - * device-x.c: + * event-Xt.c (x_reset_key_mapping): + * device-x.c: (x-keysym-on-keyboard-p): (x-keysym-on-keyboard-sans-modifiers-p): Use x-keysym-on-keyboard-sans-modifiers-p instead of @@ -3677,7 +3677,7 @@ Tue Feb 17 12:50:37 1998 Andy Piper (gui_item_display_flush_left): Ditto (gui_item_display_flush_right): Ditto. The above listen new functions manipulate on properties common to menu items and GUI - buttons. + buttons. * menubar.c (current_frame_menubar): Moved from menubar-msw.c (menu_parse_submenu_keywords): New function @@ -3771,7 +3771,7 @@ Tue Feb 17 12:50:37 1998 Andy Piper Wed Jan 28 13:41:22 1998 Andy Piper * Makefile.in.in: add support for sheap-adjust.h generation for - static heap. + static heap. Wed Jan 28 13:41:22 1998 Andy Piper @@ -3906,7 +3906,7 @@ Wed Jan 28 13:41:22 1998 Andy Piper * frame-msw.c: Added file-based drag and drop support. The "System/Open" DDE command is also implemented as if it were a drag and drop operation. - + * emacsfns.h: * event-stream.c: * events.c: @@ -4004,7 +4004,7 @@ Wed Jan 21 10:49:47 1998 Andy Piper * unexcw.cc: new file for cygwin32 unexec() requires cygwin32 b19. Predicated on HAVE_COFF_H. - * console.c: + * console.c: * device-msw.c: * event-msw.c: * frame-msw.c: @@ -4034,7 +4034,7 @@ Wed Jan 21 10:49:47 1998 Andy Piper 1998-01-23 Hrvoje Niksic * print.c (print_cons): Use XCAR/XCDR. - (print_string): Fix up so it Vprint_string_length works under Mule + (print_string): Fix up so it Vprint_string_length works under Mule correctly. * eval.c (Feval): Increase profile call count. @@ -4122,15 +4122,15 @@ Wed Jan 21 10:49:47 1998 Andy Piper * offix-cursors.h (cursor_bits): Warning elimination. - * redisplay.c (add_blank_rune): - * redisplay.c (add_glyph_rune): - * redisplay.c (add_emchar_rune): + * redisplay.c (add_blank_rune): + * redisplay.c (add_glyph_rune): + * redisplay.c (add_emchar_rune): Warning elimination. Avoid useless computation in non-mule case. * config.h.in: Define HAVE_INVERSE_HYPERBOLIC using 1 configure test, not 3. - * src/alloc.c: - * src/events.c: + * src/alloc.c: + * src/events.c: Rearrange order of declarations and definitions to avoid forward * src/mem-limits.h: Add motivating comment for future cleanup. @@ -4140,7 +4140,7 @@ Wed Jan 21 10:49:47 1998 Andy Piper Always define _GNU_SOURCE when using GNU libc. Support --without-FOO as a synonym for --with-FOO=no. Always use $srcdir to locate config.guess. - Make it clear that CONFIGURATION is optional. + Make it clear that CONFIGURATION is optional. De-emphasize CONFIGURATION parameter. Random cleanup. More compatible with standard GNU install instructions. --with-menubars=athena3d ==> --with-menubars=lucid. @@ -4247,7 +4247,7 @@ Sat Jan 10 11:36:11 1998 Andy Piper Suggested by Aki Vehtari * src/symbols.c (Fsetq_default): Fix docstring. - From Didier Verna + From Didier Verna 1998-01-07 Kirill M. Katsnelson @@ -4283,13 +4283,13 @@ Thu Jan 08 09:42:36 1998 Andy Piper * lread.c (Fload_internal): On Win32, this reopened the file without first closing the handle. This caused running out of handles. - + * nt.c (sys_open): This one made big mess when opening a handle next after MAXDESC-1. Fixed. 1998-01-06 Kirill M. Katsnelson - * objects-msw.c (mswindows_string_to_color): Patched not to modify + * objects-msw.c (mswindows_string_to_color): Patched not to modify const char* parameter. (hexval): Modified to accept uppercase hex digits. @@ -4321,7 +4321,7 @@ Thu Jan 08 09:42:36 1998 Andy Piper * nt.h: Removed FD_* macros. Rely on definitions in winsock.h. Changed EMACSDEBUG references to DEBUG_XEMACS - * event-msw.c (mswindows_cancel_dispatch_event): Returns Qnil when + * event-msw.c (mswindows_cancel_dispatch_event): Returns Qnil when event not found in the queue. Used to return undefined value. 1998-01-07 SL Baur @@ -4362,7 +4362,7 @@ Thu Jan 08 09:42:36 1998 Andy Piper 1997-12-29 Kirill M. Katsnelson - * msw-proc.c (mswindows_enqueue_magic_event): Made extern. User by + * msw-proc.c (mswindows_enqueue_magic_event): Made extern. User by menubar-msw.c * event-msw.h: Prototype for mswindows_enqueue_magic_event @@ -4410,7 +4410,7 @@ Thu Jan 08 09:42:36 1998 Andy Piper * alloc.c (disksave_object_finalization): Don't zero out load-history if history of pure symbols is desired. - * lread.c (build_load_history): If LOADHIST_DUMPED is defined, add + * lread.c (build_load_history): If LOADHIST_DUMPED is defined, add pure symbols to load-history. * emacsfns.h: New symbols added -- LOADHIST_DUMPED, define to get @@ -4432,7 +4432,7 @@ Thu Jan 08 09:42:36 1998 Andy Piper 1997-12-26 Kirill M. Katsnelson * menubar-msw.c, menubar-msw.h: New files. Menus support. - + * console-msw.h: Added frame menu hashtable variable. * gui.c: popup_up_p variable and Fpopup_up_p and @@ -4458,7 +4458,7 @@ Thu Jan 08 09:42:36 1998 Andy Piper can be compared with 'equal. Menubar uses opaque pointers as hash keys in an 'equal style hastable. - * Most of the above touched files: Eliminated compiler warnings. + * Most of the above touched files: Eliminated compiler warnings. 1997-12-18 Hrvoje Niksic @@ -4471,7 +4471,7 @@ Thu Jan 08 09:42:36 1998 Andy Piper 1997-12-26 P. E. Jareth Hein - * glyphs-x.c (imagick_instantiate): Add in error and + * glyphs-x.c (imagick_instantiate): Add in error and warning handling for ImageMagick files 1997-12-26 SL Baur @@ -4587,7 +4587,7 @@ Thu Dec 18 09:53:12 1997 * fileio.c (Finsert_file_contents_internal): Use report_file_error() to report reading error. - * cmds.c (internal_self_insert): Don't self-insert if the expanded + * cmds.c (internal_self_insert): Don't self-insert if the expanded symbol's hook has a non-nil `no-self-insert' property; synch with FSF 20.2. @@ -4622,22 +4622,22 @@ Thu Dec 18 09:53:12 1997 * dired.c (file_name_completion): Use noseeum_cons. (file_name_completion_unwind): Free the cons. -1997-12-16 - +1997-12-16 + * scrollbar.c: Add HAVE_MS_WINDOWS to scrollbar-page functions. - + * msw-proc.c: Handle scrolling events. - + * frame-msw.c: Initialize scrollbar width and height. This should not be necessary, since the window shouldn't be created until init_frame_2 - + * emacs.c: Call mswindows scrolbar setup when appropriate. - + * scrollbar-msw.c: Created for mswindows-scrollbar support. - + * scrollbar-msw.h: Ditto. - + 1997-12-16 Kirill M. Katsnelson * msw-proc.c: Minor bug in the middle button emulation code @@ -4706,7 +4706,7 @@ Thu Dec 18 09:53:12 1997 1997-12-12 SL Baur - * input-method-xlib.c (describe_XIC): Add casts, use unsigned long + * input-method-xlib.c (describe_XIC): Add casts, use unsigned long int. * eval.c (funcall_subr): Ifdef out as it is now unused. @@ -4786,9 +4786,9 @@ Thu Dec 18 09:53:12 1997 * input-method-xfs.c (Initialize_Locale): Ditto. * input-method-motif.c (Initialize_Locale): Ditto. * input-method-xlib.c (Initialize_Locale): Ditto. - Suggested by Didier Verna and + Suggested by Didier Verna and Martin Buchholz - + 1997-12-10 Karl M. Hegbloom * config.h.in: #undef MAGICK_HEADERS_ARE_UNDER_X11 @@ -4902,11 +4902,11 @@ Thu Dec 18 09:53:12 1997 set the correct window size. 1997-12-04 Jeff Sparkes - + * frame-msw.c: added frame functions for move, resize, iconify, raise, lower, visible_p, iconified_p, focus, make visible, make invisible, set title. - + 1997-12-01 Jonathon Harris * event-msw.c, event-msw.h, frame-msw.c, msw-proc.c: @@ -4931,7 +4931,7 @@ Thu Dec 18 09:53:12 1997 * menubar-x.c: change #ifdef LWLIB_MENUBARS_MOTIF to #if defined LWLIB_MENUBARS_LUCID || defined LWLIB_MENUBARS_MOTIF - around code for incremental menu build. + around code for incremental menu build. * event-stream.c: Changed HAVE_MENUBARS to HAVE_MENUBARS_LUCID in the #ifdef wrappers around menubar accelerator stuff. @@ -5033,7 +5033,7 @@ Thu Dec 18 09:53:12 1997 vector and call mapcar1 with its data. 1997-12-02 P E Jareth Hein - + * objects-x.c: Added colormap/visual support, rewrote allocate_nearest_color, and changed the x-color-instance to deal with possibly not freeing a color. @@ -5142,7 +5142,7 @@ Thu Dec 18 09:53:12 1997 (Fredisplay_echo_area): Clear echo_area_garbaged flag on frame after displaying in echo area. - * redisplay.c: Added hscroll_glyph_width_adjust field + * redisplay.c: Added hscroll_glyph_width_adjust field to position_redisplay_data_type struct. (add_hscroll_rune): Compute the difference in width @@ -5178,7 +5178,7 @@ Thu Dec 18 09:53:12 1997 1997-11-17 Marc Paquette - * callproc.c (Fcall_process_internal): Fix for bug in + * callproc.c (Fcall_process_internal): Fix for bug in CRLF -> LF conversion. 1997-11-19 Jonathan Harris @@ -5199,7 +5199,7 @@ Thu Dec 18 09:53:12 1997 * callproc.c (Fcall_process_internal): Close fd_error. -1997-11-19 Didier Verna +1997-11-19 Didier Verna * emacs.c (main_1): Added the missing argmatch call to check for the '-h' option. @@ -5255,7 +5255,7 @@ Thu Dec 18 09:53:12 1997 * frame.c: Document new toolbar border width speciifer as being usable as frame properties. - (frame_conversion_internal): Factor the toolbar border + (frame_conversion_internal): Factor the toolbar border widths into the geometry calculations. (change_frame_size_1): Ditto. @@ -5274,11 +5274,11 @@ Thu Dec 18 09:53:12 1997 support for drawing a border along with the blank button. Accept border_width and vertical args. - (x_output_toolbar_button): Added support for drawing a + (x_output_toolbar_button): Added support for drawing a border along with the button. (X_OUTPUT_BUTTONS_LOOP): Pass border_width and vert - args to x_draw_blank_toolbar_button. Set vertical and + args to x_draw_blank_toolbar_button. Set vertical and border_width fields in toolbar button. (x_output_toolbar): Support toolbar border widths. @@ -5324,7 +5324,7 @@ Thu Dec 18 09:53:12 1997 1997-11-16 Hrvoje Niksic - * events.c (print_event): Use `event-x-pixel' and `event-y-pixel', + * events.c (print_event): Use `event-x-pixel' and `event-y-pixel', to be consistent with `make-event' and `event-properties'. (Fmake_event): Allow nil dnd-data. @@ -5630,7 +5630,7 @@ Sun November 01 12:00:00 1997 * redisplay.c: init_redisplay Initialise window system to w32, conditioned on HAVE_W32GUI. - + * symsinit.h: Added syms_of_*_w32, vars_of_*_w32 and init_event_w32_late. @@ -5717,33 +5717,33 @@ Sun November 01 12:00:00 1997 1997-11-02 Andreas Jaeger - * m/vax.h: - * s/cxux.h: - * s/xenix.h: - * s/umax.h: - * s/msdos.h: - * s/template.h: - * termcap.c: - * signal.c: - * lread.c: + * m/vax.h: + * s/cxux.h: + * s/xenix.h: + * s/umax.h: + * s/msdos.h: + * s/template.h: + * termcap.c: + * signal.c: + * lread.c: * callproc.c * buffer.c: Remove VMS dependent code. 1997-11-02 Andreas Jaeger * syspwd.h: - * systty.h: - * systime.h: - * syssignal.h: - * sysproc.h: - * sysfloat.h: - * sysfile.h: - * regex.h: - * process.h: - * ndir.h: - * mule-mcpath.h: - * getpagesize.h: - * sysdep.h: + * systty.h: + * systime.h: + * syssignal.h: + * sysproc.h: + * sysfloat.h: + * sysfile.h: + * regex.h: + * process.h: + * ndir.h: + * mule-mcpath.h: + * getpagesize.h: + * sysdep.h: * fileio.c: * process.c: Remove old VMS code. @@ -5753,8 +5753,8 @@ Sun November 01 12:00:00 1997 1997-11-02 Andreas Jaeger - * sysdep.c: - * getloadavg.c: + * sysdep.c: + * getloadavg.c: * malloc.c: Remove old VMS code. 1997-11-02 Hrvoje Niksic @@ -5803,12 +5803,12 @@ Sun November 01 12:00:00 1997 1997-10-31 Kyle Jones - * callproc.c: GC protect current_dir while infile and + * callproc.c: GC protect current_dir while infile and error_file are being initialized. 1997-10-30 SL Baur - * config.h.in: Remove HAVE_GIF, HAVE_JPEG, HAVE_PNG, HAVE_TIFF and + * config.h.in: Remove HAVE_GIF, HAVE_JPEG, HAVE_PNG, HAVE_TIFF and replace with HAVE_IMAGEMAGICK. 1997-10-30 Kyle Jones @@ -5824,7 +5824,7 @@ Sun November 01 12:00:00 1997 1997-10-28 Kyle Jones - * Under LRECORD_VECTOR, moved vectors from being an basic + * Under LRECORD_VECTOR, moved vectors from being an basic lrecord tpye to an lcrecord. Added support for 31 bits Lisp integers. Added support for maskless pointers to Lisp objects. @@ -5854,7 +5854,7 @@ Sun November 01 12:00:00 1997 type checking code on an uninitialized implementation pointer. - (Fpurecopy): return if given a null pointer. THis can + (Fpurecopy): return if given a null pointer. THis can happen when initializing Qnil. (mark_object): return if passed a null pointer. I @@ -5870,7 +5870,7 @@ Sun November 01 12:00:00 1997 indirect children list gets reset to a null pointer when a bfufer is killed. - (complex_vars_of_buffer): initialize indirect_children + (complex_vars_of_buffer): initialize indirect_children slow of Vbuffer_local_symbols and Vbuffer_defaults to nil. @@ -6010,11 +6010,11 @@ Sun November 01 12:00:00 1997 * README: Remove references to VMS. - * vlimit.h: - * s/vms5-5.h: - * s/vms4-4.h: - * s/vms4-2.h: - * s/vms4-0.h: + * vlimit.h: + * s/vms5-5.h: + * s/vms4-4.h: + * s/vms4-2.h: + * s/vms4-0.h: * s/vms.h: Remove files since VMS isn't supported any more. 1997-10-25 Kyle Jones @@ -6030,7 +6030,7 @@ Sun November 01 12:00:00 1997 * alloc.c: Disable purespace statistics unless --debug is in effect. - * console-stream.c (init_console_stream): At the price of a tiny + * console-stream.c (init_console_stream): At the price of a tiny memory leak, reinitialize FILE fields of the console. From Tonny Madsen @@ -6072,15 +6072,15 @@ Sun November 01 12:00:00 1997 separate function so that it could be used as a `print' method for lrecord-based strings. -1997-10-20 Jan Vroonhof - +1997-10-20 Jan Vroonhof + * extents.c: Renamed shot property to initial-redisplay-function (extent_fragment_update): Changed the bookkeeping whether an event has been spawned. The initial-redisplay-function property is no longer set to nil. - + * extents.h: ditto - + 1997-10-20 Kyle Jones * Added support for conses and vectors to be lrecords. @@ -6153,7 +6153,7 @@ Sun November 01 12:00:00 1997 (make-coding-system, coding-system-type, detect-coding-region): Rename `Qautomatic_conversion' -> `Qundecided'. - + * general.c (syms_of_general): Rename `automatic-conversion' -> `undecided' to sync with Emacs 20.2. @@ -6202,7 +6202,7 @@ Sun November 01 12:00:00 1997 1997-10-11 SL Baur - * realpath.c (realpath): CONST IS LOSING but removing it conflicts + * realpath.c (realpath): CONST IS LOSING but removing it conflicts with system headers. * callproc.c: New variable infopath-internal. @@ -6272,7 +6272,7 @@ Sun November 01 12:00:00 1997 * regex.c: Global change: register -> REGISTER. - Ensure REGISTER is always defined. - + * nt.c: Global change: register -> REGISTER. * linuxplay.c: Global change: register -> REGISTER. @@ -6281,7 +6281,7 @@ Sun November 01 12:00:00 1997 * gifalloc.c: Global change: register -> REGISTER. - Ensure REGISTER is always defined. - + * getloadavg.c (getloadavg): register -> REGISTER. * eval.c (unwind_to_catch): [Unused variable] register -> REGISTER. @@ -6344,7 +6344,7 @@ Sun November 01 12:00:00 1997 Fri Oct 3 12:28:08 1997 Kyle Jones * lisp-disunion.h: Move markbit to be between the - type bits and the value bits. Previously it was always + type bits and the value bits. Previously it was always the sign bit of a EMACS_INT, unless modified by a #define in a machine dependent .h file. @@ -6446,7 +6446,7 @@ Fri Oct 3 12:28:08 1997 Kyle Jones is a cons. (Fremrassoc): Ditto. - * dired.c (Fdirectory_files): Nreverse the list only if it will be + * dired.c (Fdirectory_files): Nreverse the list only if it will be sorted. Fri Sep 26 13:55:28 1997 Kyle Jones @@ -6458,7 +6458,7 @@ Fri Sep 26 13:55:28 1997 Kyle Jones 1997-09-26 Hrvoje Niksic * dired.c (close_directory_fd): New function. - (Fdirectory_files): Use it to set up an unwind-protection to close + (Fdirectory_files): Use it to set up an unwind-protection to close the descriptor. (Fdirectory_files): Allow QUIT in re_search. (Fdirectory_files): If the file is too big, allocate necessary @@ -6494,7 +6494,7 @@ Fri Sep 26 13:55:28 1997 Kyle Jones * syntax.c (Fchar_syntax): convert nil input to \000 for compatibility. - * alloc.c (report_pure_usage): Increase slop to 512 bytes in betas + * alloc.c (report_pure_usage): Increase slop to 512 bytes in betas and reduce it to 4 bytes in releases. 1997-09-23 SL Baur @@ -6535,7 +6535,7 @@ Sun Sep 21 14:14:44 1997 Kyle Jones * eval.c (Fapply): replace Flength call with for-loop to compute list length. - + * eval.c (apply_lambda):Use XCAR and XCDR in some places where it is safe to do so. @@ -6577,7 +6577,7 @@ Sun Sep 21 14:14:44 1997 Kyle Jones * events.c (Fmake_event): Add default case, remove unused variables. 1997-08-21 Jan Vroonhof - + * extents.c (extent_fragment_update): Trigger one_shot_function * extents.c (set-extent-one-shot-function): New function @@ -6629,7 +6629,7 @@ Sun Sep 21 14:14:44 1997 Kyle Jones 1997-08-05 Jens-Ulrik Holger Petersen - * eval.c (vars_of_eval): Updated docstring for `debug_on_error' to + * eval.c (vars_of_eval): Updated docstring for `debug_on_error' to mention `debug-ignored-errors'. 1997-08-01 SL Baur @@ -6644,7 +6644,7 @@ Sun Sep 21 14:14:44 1997 Kyle Jones * frame-x.c (x_offix_drop_event_handler): Use stderr_out instead of fprintf. - * mule-coding.c (parse_iso2022_esc): Add abort() trap on unhandled + * mule-coding.c (parse_iso2022_esc): Add abort() trap on unhandled condition. * mule-wnnfns.c (Fwnn_dict_search): Remove unused variable. @@ -6719,7 +6719,7 @@ Sun Sep 21 14:14:44 1997 Kyle Jones New variable Vpackage_path. (vars_of_emacs): Use it. - * editfns.c (Fstring_to_char): Return nil instead of `0' for empty + * editfns.c (Fstring_to_char): Return nil instead of `0' for empty string. 1997-07-10 Hrvoje Niksic @@ -6760,7 +6760,7 @@ Sun Sep 21 14:14:44 1997 Kyle Jones Was forgotten cut & paste identical clone to Fcompiled_function_interactive? - * Makefile.in.in (alloc.o): Remove dependency on puresize_adjust.h + * Makefile.in.in (alloc.o): Remove dependency on puresize_adjust.h so alloc.c need not be recompiled when puresize changes. * alloc.c (PURIFIED): Use get_PURESIZE() instead of constant. @@ -6775,7 +6775,7 @@ Sun Sep 21 14:14:44 1997 Kyle Jones (get_PURESIZE): New function -- declare it. * pure.c: Move final PURESIZE computation and include of - puresize_adjust.h into here so alloc.c need not be recompiled each + puresize_adjust.h into here so alloc.c need not be recompiled each time the puresize is adjusted. (get_PURESIZE): New function. @@ -6795,7 +6795,7 @@ Sun Sep 21 14:14:44 1997 Kyle Jones I am still not sure what this buys us, but I guess it doesn't hurt to have it. From Hrvoje Niksic - + * glyphs.c (make_string_from_file): Use insert-file-contents-literally instead of insert-file-contents-internal. @@ -6925,7 +6925,7 @@ Sun Sep 21 14:14:44 1997 Kyle Jones 1997-06-18 Martin Buchholz - * Makefile.in: + * Makefile.in: * s/*.h: * m/*.h: * config.h.in: @@ -6946,10 +6946,10 @@ Sun Sep 21 14:14:44 1997 Kyle Jones - Make quoted pre-processor string tokens out of all macro values to be used only by configure. * xmu.c: DON'T use Xos.h - * sysdep.c (wait_for_termination): - * search.c: - * editfns.c: - * console-*: + * sysdep.c (wait_for_termination): + * search.c: + * editfns.c: + * console-*: 1997-06-18 Steven L Baur @@ -7049,7 +7049,7 @@ Fri Jun 13 00:25:46 1997 Kyle Jones * syntax.c (Fchar_syntax): Handle case of being passed nil. - * data.c (eq_with_ebola_notice): Add more legitimate places in the + * data.c (eq_with_ebola_notice): Add more legitimate places in the bytecompiler that should not get Ebola notices. Tue Jun 10 00:34:40 1997 Kyle Jones @@ -7097,7 +7097,7 @@ Tue Jun 10 00:34:40 1997 Kyle Jones * keydefs.c (get_relevant_extent_keymaps): Choose correct keymap at extent boundaries. - + Mon Jun 9 19:35:19 1997 Kyle Jones * redisplay.c (pixel_to_glyph_translation): @@ -7119,7 +7119,7 @@ Sat Jun 7 22:07:41 1997 Kyle Jones * sysdep.c: MS Windows NT doesn't (yet) do child TTY processes. From David Hobley - + Sat Jun 7 22:00:54 1997 Kyle Jones * device-x.c (x_delete_device): @@ -7130,7 +7130,7 @@ Sat Jun 7 22:00:54 1997 Kyle Jones * frame.c (Fmake_frame): Correct checking of first_frame_on_device. From Hrvoje Niksic - + 1997-06-04 Steven L Baur * device.c (delete_deviceless_console): New function. @@ -7170,7 +7170,7 @@ Mon Jun 2 02:49:44 1997 Kyle Jones Sat May 31 19:59:49 1997 Kyle Jones * frame-tty.c (tty_init_frame_3: - Defer selection of the newly created frame until + Defer selection of the newly created frame until an event is read. 1997-06-02 Steven L Baur @@ -7233,7 +7233,7 @@ Thu May 29 03:00:16 1997 Kyle Jones (Fset_recent_keys_ring_size): New function. Modifies the above. From Hrvoje Niksic - + * event-stream.c: New variable recent_keys_ring_size replacing a hard-coded macro. @@ -7251,7 +7251,7 @@ Thu May 29 03:00:16 1997 Kyle Jones Wed May 21 11:58:17 1997 Kyle Jones * insdel.c (signal_first_change): - record the current buffer for the unwind instead of the + record the current buffer for the unwind instead of the buffer that's about to become the current buffer. Tue May 20 23:23:39 1997 Steven L Baur @@ -7333,7 +7333,7 @@ Wed Apr 30 18:07:18 1997 Steven L Baur * lread.c: New variable featurep. (read1): Add processing for #- and #+. - (read_list_conser): Handle case where a feature test has removed a + (read_list_conser): Handle case where a feature test has removed a portion of the input stream. (vars_of_lread): New feature `xemacs'. @@ -7362,7 +7362,7 @@ Tue Apr 22 11:54:02 1997 Steven L Baur HAVE_X_WINDOWS. (main_1): Add vars_of_balloon_x and guard with HAVE_X_WINDOWS. - * process.c (get_process): This function can be passed a BUFFER as + * process.c (get_process): This function can be passed a BUFFER as a parameter. Tue Apr 22 01:32:00 1997 Kyle Jones @@ -7493,7 +7493,7 @@ Sun Apr 6 18:03:47 1997 David Moore * dired.c (Fdirectory_files): Clean up GC protection. - * insdel.c (signal_after_change): Don't run after_change_functions + * insdel.c (signal_after_change): Don't run after_change_functions on special Vprin1_to_string_buffer. (signal_before_change): Ditto for before_change_functions. @@ -7551,7 +7551,7 @@ Sun Apr 6 08:08:33 1997 Steven L Baur * config.h.in: Strip unimplemented NeXTStep/Epoch stuff out. - * Makefile.in.in: Remove unused NeXTStep support. It's all in the + * Makefile.in.in: Remove unused NeXTStep support. It's all in the cvs attic if someone wishes to revive it. (epoch.o): Remove last vestiges of non-existent epoch support. @@ -7566,7 +7566,7 @@ Thu Apr 3 08:01:50 1997 Steve Carney Tue Apr 1 12:22:32 1997 Steven L Baur - * config.h.in: MAIL_USE_POP, KERBEROS, HESIOD -- new parameters to + * config.h.in: MAIL_USE_POP, KERBEROS, HESIOD -- new parameters to deal with upgraded movemail.c. Fri Mar 28 19:25:22 1997 Steven L Baur @@ -7613,7 +7613,7 @@ Mon Mar 24 21:50:13 1997 Steven L Baur Mon Mar 24 12:40:56 1997 David Moore * profile.c: Fixed some comments about GC status of functions. - + * profile.c (inside_profiling): New variable to lock the profiling table. (sigprof_handler): Check it. @@ -7647,7 +7647,7 @@ Fri Mar 21 18:54:04 1997 David Moore (Fset_file_modes): ditto (Ffile_newer_than_file_p): ditto (Fset_visited_file_modtime): ditto - + *fileio.c (Ffile_truename): Unneccessary GC protection. (Fdelete_directory): Fix broken caller-must-GC-protect call. @@ -7684,7 +7684,7 @@ Wed Mar 19 10:49:05 1997 Steven L Baur * glyphs-x.c (x_print_image_instance): Move define of HAVE_SUBWINDOWS to glyphs-x.h. - (our_skip_input_data): Implement with some error checking based on + (our_skip_input_data): Implement with some error checking based on patch by Dominic Froud. * glyphs-x.h (HAVE_SUBWINDOWS): Define to keep inline.c from @@ -7755,7 +7755,7 @@ Mon Mar 10 23:51:04 1997 Martin Buchholz Sun Mar 9 21:46:53 1997 Tomasz J. Cholewo - * minibuf.c (regexp_ignore_completion_p): Reverse meaning of + * minibuf.c (regexp_ignore_completion_p): Reverse meaning of completion-regexp-list. Thu Mar 6 19:15:29 1997 Steven L Baur @@ -7843,7 +7843,7 @@ Mon Feb 24 17:35:05 1997 Jonathan Edwards * process.c (record_exited_processes): Fix obvious typo in checking for SIGCLD. - + Sun Feb 23 01:45:49 1997 Martin Buchholz * scrollbar.c (update_scrollbar_instance): Fix for @@ -8312,4 +8312,3 @@ Sat Dec 7 15:48:39 1996 Steven L Baur Wed Dec 4 23:38:03 1996 Steven L Baur * redisplay.c: Allow column numbers in modeline to start from 1. - diff --git a/src/ChangeLog.2 b/src/ChangeLog.2 index eb3af59..ff81570 100644 --- a/src/ChangeLog.2 +++ b/src/ChangeLog.2 @@ -8,9 +8,9 @@ * lisp.h (xfree_1): Make non-public. * (xzero): Use '\0' in memset call for clarity. * (ALIGNOF): Use __alignof__ instead of undocumented __alignof. - * alloc.c (allocate_string_chars_struct): - (make_uninit_string): - (resize_string): + * alloc.c (allocate_string_chars_struct): + (make_uninit_string): + (resize_string): (verify_string_chars_integrity): (compact_string_chars): Now only called for small strings. (sweep_strings): @@ -216,7 +216,7 @@ 2000-01-04 Martin Buchholz - * mule-charset.h (REP_BYTES_BY_FIRST_BYTE): + * mule-charset.h (REP_BYTES_BY_FIRST_BYTE): Remove macro, always use inline function. * mule-charset.c (make_charset): Don't assign to rep_bytes_by_first_byte. (rep_bytes_by_first_byte): Make const. @@ -331,31 +331,31 @@ 1999-12-21 Martin Buchholz - * editfns.c (Fpoint_min): - (Fpoint_min_marker): - (Fpoint_max): - (Fpoint_max_marker): - (Fchar_after): - (Fchar_before): + * editfns.c (Fpoint_min): + (Fpoint_min_marker): + (Fpoint_max): + (Fpoint_max_marker): + (Fchar_after): + (Fchar_before): Docstring fixes. What's a `buffer pointer' anyways? * editfns.c (char=): Remove unused and undocumented optional third BUFFER argument. - * toolbar.h (DEVICE_SUPPORTS_TOOLBARS_P): - * fns.c (plists_differ): - * elhash.c (HASH_CODE): - * elhash.c (KEYS_EQUAL_P): - * redisplay-output.c (redisplay_move_cursor): - * redisplay.c (create_text_block): - * floatfns.c (Flogb): - * glyphs-msw.c (mswindows_initialize_image_instance_mask): - * glyphs-msw.c (xpm_to_eimage): - * buffer.h (POINT_MARKER_P): - * syntax.c (scan_lists): - * cmdloop.c (Fcommand_loop_1): - * widget.c (Fwidget_apply): - * regex.c (STREQ): + * toolbar.h (DEVICE_SUPPORTS_TOOLBARS_P): + * fns.c (plists_differ): + * elhash.c (HASH_CODE): + * elhash.c (KEYS_EQUAL_P): + * redisplay-output.c (redisplay_move_cursor): + * redisplay.c (create_text_block): + * floatfns.c (Flogb): + * glyphs-msw.c (mswindows_initialize_image_instance_mask): + * glyphs-msw.c (xpm_to_eimage): + * buffer.h (POINT_MARKER_P): + * syntax.c (scan_lists): + * cmdloop.c (Fcommand_loop_1): + * widget.c (Fwidget_apply): + * regex.c (STREQ): Remove extra parens, esp. of the form ((expr)) * floatfns.c (Flogb): Make 64-bit clean. @@ -405,7 +405,7 @@ * glyphs-widget.c (VALID_GUI_KEYWORDS): use NONCOPY keyword for callbacks and other things that could recurse. - (VALID_GUI_KEYWORDS): + (VALID_GUI_KEYWORDS): * event-msw.c: fix cpp stuff for cygwin < b20. @@ -456,10 +456,10 @@ 1999-12-18 Martin Buchholz - * fns.c (mapcar1): - (Fmapconcat): - (Fmapcar): - (Fmapvector): + * fns.c (mapcar1): + (Fmapconcat): + (Fmapcar): + (Fmapvector): Docstring fixes. Make them consistent with the lispref and ANSI Lisp. 1999-12-17 Martin Buchholz @@ -479,7 +479,7 @@ * window.c: * event-stream.c: Remove last vestigial uses of GC_* - + * fns.c (mapcar1): Fix ***THREE*** obscure crashes in one function! - Two of those involve evil mapping functions that destructively modify a list being mapped over. @@ -519,7 +519,7 @@ 1999-12-10 Shenghuo ZHU - * file-coding.c (add_coding_system_to_list_mapper): + * file-coding.c (add_coding_system_to_list_mapper): - (coding-system-list) should list aliases correctly. 1999-12-07 Andy Piper @@ -548,7 +548,7 @@ found. (nt_open_network_stream): warn_when_safe if network stream fails to open. - + * ntproc.c (create_child): Remove negative pid hack for Windows 95. Remove incorrect and unnecessary USE_UNION_TYPE handling. @@ -568,7 +568,7 @@ * events.c (Fcopy_event): Don't copy the lrecord_header. - * lisp.h (DO_REALLOC): + * lisp.h (DO_REALLOC): Optimize. Remove redundant parens. Remove generic hygienic macro comment. @@ -577,7 +577,7 @@ 1999-12-05 Martin Buchholz - * lstream.c (Lstream_adding): + * lstream.c (Lstream_adding): - Never compare a size_t and a possibly negative number. - Optimize. @@ -614,11 +614,11 @@ 1999-12-04 Martin Buchholz - * lstream.c: (filedesc_reader): + * lstream.c: (filedesc_reader): (filedesc_writer): Try number 2: Support broken systems where return type of read() and write() is different from ssize_t. - * systty.h: + * systty.h: * sysdep.h: * sysdep.c: - Replace macro calls to EMACS_GET_TTY and EMACS_SET_TTY with @@ -637,7 +637,7 @@ (menu_move_right): Ditto. * lrecord.h (copy_lcrecord): - (zero_lcrecord): + (zero_lcrecord): Always add parentheses around uses of macro arguments. * sysdll.c: #include for exit(). @@ -762,7 +762,7 @@ * file-coding.c (convert_to_external_format): * file-coding.c (convert_from_external_format): - Lstream functions mirror Unix98 read(),write(). Therefore use - Unix98 types size_t and ssize_t. + Unix98 types size_t and ssize_t. - Try to make Lstream* functions 64-bit clean. Someday someone may actually want to read from a Lstream with more than 2**32 bytes. - Add configure support for ssize_t. @@ -790,12 +790,12 @@ 1999-11-26 Martin Buchholz - * device-x.c (x_init_device): + * device-x.c (x_init_device): - Replace magic number `17' with equivalent expn using sizeof. - Replace strcmp with marginally more efficient memcmp. - Avoid using C++ reserved word `class'. - * file-coding.c (determine_real_coding_system): + * file-coding.c (determine_real_coding_system): - Look for both initial and final -*- cookies. - Replace EQ (foo, Qnil) with NILP (foo) - Make searching for cookies more efficient. @@ -848,7 +848,7 @@ * redisplay.h (struct rune): Do not use bitfields for members. (struct rune): Add various comments about further optimizations. - + 1999-11-19 Eric Darve * abbrev.c (abbrev_oblookup): Check whether wordend <= wordstart @@ -914,16 +914,16 @@ * tooltalk.c (tt_build_string): Remove extra parens. * process.c (print_process): Remove extra parens. - * buffer.h (BI_BUF_PTR_BYTE_POS): - (BUF_PTR_BYTE_POS): - (BI_BUF_BYTE_ADDRESS): - (BI_BUF_BYTE_ADDRESS_BEFORE): - (valid_memind_p): - (bytind_to_memind): + * buffer.h (BI_BUF_PTR_BYTE_POS): + (BUF_PTR_BYTE_POS): + (BI_BUF_BYTE_ADDRESS): + (BI_BUF_BYTE_ADDRESS_BEFORE): + (valid_memind_p): + (bytind_to_memind): (memind_to_bytind): Remove extra parens. Inline functions are not macros. - * editfns.c (Fuser_login_name): + * editfns.c (Fuser_login_name): (user_login_name): Use proper type uid_t. @@ -992,18 +992,18 @@ 1999-10-25 Martin Buchholz - * redisplay.h (CLASS_RESET_CHANGED_FLAGS): - (GLOBAL_RESET_CHANGED_FLAGS): - (CLASS_REDISPLAY_FLAGS_CHANGEDP): - (RESET_CHANGED_SET_FLAGS): + * redisplay.h (CLASS_RESET_CHANGED_FLAGS): + (GLOBAL_RESET_CHANGED_FLAGS): + (CLASS_REDISPLAY_FLAGS_CHANGEDP): + (RESET_CHANGED_SET_FLAGS): Fix C++ compile errors/warnings. These macros were just a tad too clever. * process-unix.c (unix_open_network_stream): * objects-x.c (allocate_nearest_color): - * mule-charset.c (vars_of_mule_charset): - * fileio.c (Ffile_truename): - * file-coding.c (vars_of_file_coding): + * mule-charset.c (vars_of_mule_charset): + * fileio.c (Ffile_truename): + * file-coding.c (vars_of_file_coding): Fix compile errors/warnings. * alloc.c (xstrdup): Use fact that memcpy returns its first arg. @@ -1039,8 +1039,8 @@ * sound.c: support HAVE_ESD_SOUND - * miscplay.c: - * miscplay.h: + * miscplay.c: + * miscplay.h: * linuxplay.c: Move large part of linuxplay to generalized file miscplay. Make it platform independent. @@ -1062,7 +1062,7 @@ 1999-10-24 Jan Vroonhof - * unexelf.c: Merge Martin's c++ fixes back in + * unexelf.c: Merge Martin's c++ fixes back in 1999-10-20 Jan Vroonhof @@ -1141,7 +1141,7 @@ * lisp.h (DUMPEDP): Added. Removed dumped flag from dynarr. * alloc.c: Removed hash_next linked list pointer. - + * *.c *.h: Removed markobj and mark_object parameters, removed GC_ and XGC macros. @@ -1731,7 +1731,7 @@ XEmacs slow down to a crawl. I also hope to be able to create a list with more than INT_MAX cons cells. - * redisplay.c (decode_mode_spec): + * redisplay.c (decode_mode_spec): The %p and %P specs in the mode line were not correct for buffers larger than MAX_INT/100! The %p spec was off by .5% even for small buffers! @@ -1741,7 +1741,7 @@ * cmdloop.c (num_input_keys): * print.c (debug_temp): * emacs.c (Vinfo_directory): - Delete unused variables + Delete unused variables * console-x.h (x_interline_space): Mark as unimplemented. * redisplay-x.c (x_interline_space): Mark as unimplemented. @@ -1801,7 +1801,7 @@ * scrollbar-x.c (x_window_is_scrollbar): deleted. * scrollbar-x.h: ditto. - + 1999-09-23 Martin Buchholz * alloc.c (this_marks_a_marked_record): Remove. @@ -2560,7 +2560,7 @@ * console.h (struct console_methods): new console methods for outputting pixmaps and strings. -1999-08-23 Didier Verna +1999-08-23 Didier Verna * sound.c: revert the renaming of `bell_volume' to `Vbell_volume' and `bell_inhibit_time' to `Vbell_inhibit_time'. @@ -3184,7 +3184,7 @@ * s/linux.h: gcc-2.8 changes for powerpc From Justin Vallon -1999-07-05 Didier Verna +1999-07-05 Didier Verna * indent.c: new symbol Qcoerce. (Fmove_to_column): use it + doc string update. @@ -5150,7 +5150,7 @@ * bytecode.c (Ffetch_bytecode): Fix crash when loading lazy-loaded bytecode. -1998-12-02 Didier Verna +1998-12-02 Didier Verna * menubar-x.c (menu_item_descriptor_to_widget_value_1): set the accelerator field to nil for labels. @@ -5161,7 +5161,7 @@ Escape occurrences of '&' and support occurrences of the '%_' accelerator indicator in menus. -1998-11-26 Didier Verna +1998-11-26 Didier Verna * dired.c (Fdirectory_files): use make_string instead of make_ext_string on the filename. The conversion external->internal @@ -6460,14 +6460,14 @@ * chartab.c (canonicalize_char_table_value): Coerce ints to chars for tables of type `char'. -1998-11-26 Didier Verna +1998-11-26 Didier Verna * input-method-xlib.c (Initialize_Locale): don't call XtSetLanguageProc. We've done the whole work here. * input-method-xfs.c (Initialize_Locale): ditto. * input-method-motif.c (Initialize_Locale): ditto. -1998-11-26 Didier Verna +1998-11-26 Didier Verna * process-unix.c (unix_create_process): handle properly Vfile_name_coding_system for converting the program and directory @@ -6912,7 +6912,7 @@ * fns.c (Fremrassq, remrassq_no_quit): A XCAR that should have been an XCDR turned Fremrassq into Fremassq -1998-07-17 Didier Verna +1998-07-17 Didier Verna * redisplay-x.c (x_get_gc): returns a GC with a FillStipple fill style as foreground GC for faces that have the `dim' property. @@ -8250,7 +8250,7 @@ Wed May 27, 1998 Darryl Okahata divider face using Vvertical_divider_face background. Fix drawing spacing gaps around the divider. -1998-05-14 Didier Verna +1998-05-14 Didier Verna * redisplay-x.c (x_output_vertical_divider): removed hard-wired values for the vertical divider line width and spacing. Use the @@ -8449,13 +8449,13 @@ Wed May 27, 1998 Darryl Okahata * redisplay-msw.c (mswindows_output_vertical_divider): Syntax fix. -1998-05-12 Didier Verna +1998-05-12 Didier Verna * redisplay-x.c (x_output_vertical_divider): draw shadows around the divider line. The shadow thickness is currently hard-wired. This will probably be turned into a specifier soon. -1998-05-12 Didier Verna +1998-05-12 Didier Verna * console.h (struct console_methods): the divider_width console method now requires a struct window * argument. @@ -8593,7 +8593,7 @@ Wed May 27, 1998 Darryl Okahata hand-crafted regexps. - Use standard coding conventions for modules/Makefile.in -1998-05-12 Didier Verna +1998-05-12 Didier Verna * redisplay.c: removed the scrolling modeline code that didn't make it for 21.0. To be continued ... diff --git a/src/Makefile.in.in b/src/Makefile.in.in index 0934deb..e840e6d 100644 --- a/src/Makefile.in.in +++ b/src/Makefile.in.in @@ -25,7 +25,20 @@ PROGNAME=@PROGNAME@ -all: ${PROGNAME} +#define NOT_C_CODE +#include "config.h" + +#ifdef PDUMP +DUMP_TARGET = ${PROGNAME}.dmp +EXE_TARGET = ${PROGNAME} +ID_FILE = dump-id.c +#else +DUMP_TARGET = ${PROGNAME} +EXE_TARGET = temacs +ID_FILE = +#endif + +all: ${DUMP_TARGET} .PHONY : all release dump-elc dump-elcs all-elc all-elcs lint ## For performance and consistency, no built-in rules. @@ -73,8 +86,6 @@ LD=@ld@ lib_gcc=@lib_gcc@ ##libmcheck=@libmcheck@ -#define NOT_C_CODE -#include "config.h" ## With the traditional VPATH setting, it is not possible to ## simultaneously compile in-place and in another directory. The @@ -98,6 +109,7 @@ vpath config.h vpath paths.h vpath Emacs.ad.h vpath sheap-adjust.h +vpath dump-id.c #else VPATH=@srcdir@ #endif @@ -126,7 +138,7 @@ LIBI18N = -li18n X11_libs = $(LIBI18N) #endif /* HAVE_X_WINDOWS */ -#ifdef HEAP_IN_DATA +#if defined (HEAP_IN_DATA) && !defined(PDUMP) sheap_obj=sheap.o #endif @@ -309,25 +321,25 @@ mo_dir = ${etcdir} mo_file = ${mo_dir}emacs.mo #endif -temacs_loadup = ./temacs -batch -l ${srcdir}/../lisp/loadup.el +temacs_loadup = ./${EXE_TARGET} -nd -batch -l ${srcdir}/../lisp/loadup.el dump_temacs = ${temacs_loadup} dump run_temacs = ${temacs_loadup} run-temacs -debug_temacs = gdb temacs +debug_temacs = gdb ${EXE_TARGET} -release: temacs ${libsrc}DOC $(mo_file) ${other_files} +release: ${EXE_TARGET} ${libsrc}DOC $(mo_file) ${other_files} #ifdef CANNOT_DUMP - ln temacs ${PROGNAME} + ln ${EXE_TARGET} ${PROGNAME} #else -if [ -w ${srcdir}/../lisp ]; then \ - w=`pwd`; cd ${srcdir} && $${w}/temacs -batch -l ${srcdir}/../lisp/inc-vers; \ + w=`pwd`; cd ${srcdir} && $${w}/${EXE_TARGET} -nd -batch -l ${srcdir}/../lisp/inc-vers; \ else true; fi - -./temacs -batch -l ${srcdir}/../lisp/loadup.el dump + -./${EXE_TARGET} -nd -batch -l ${srcdir}/../lisp/loadup.el dump touch release #endif /* ! defined (CANNOT_DUMP) */ -${PROGNAME}: temacs ${libsrc}DOC $(mo_file) ${other_files} update-elc.stamp +${DUMP_TARGET}: ${EXE_TARGET} ${libsrc}DOC $(mo_file) ${other_files} update-elc.stamp #ifdef HEAP_IN_DATA - @$(RM) $@ $@.exe && touch SATISFIED + @$(RM) $@ && touch SATISFIED -${dump_temacs} @if test -f $@; then if test -f SATISFIED; then \ echo "Testing for Lisp shadows ..."; \ @@ -336,25 +348,22 @@ ${PROGNAME}: temacs ${libsrc}DOC $(mo_file) ${other_files} update-elc.stamp if test -f SATISFIED; then $(RM) SATISFIED; exit 1; fi; \ $(RECURSIVE_MAKE) $@; #else - @$(RM) $@ xemacs.dmp + @$(RM) $@ ${dump_temacs} -#ifdef PDUMP - @mv temacs $@ -#endif @echo "Testing for Lisp shadows ..." @./${PROGNAME} -batch -vanilla -f list-load-path-shadows #endif -fastdump: temacs - @$(RM) ${PROGNAME} && touch SATISFIED +fastdump: ${EXE_TARGET} + @$(RM) ${DUMP_TARGET} && touch SATISFIED -${dump_temacs} @./${PROGNAME} -batch -vanilla -f list-load-path-shadows FRC.update-elc.stamp : -update-elc.stamp : temacs FRC.update-elc.stamp +update-elc.stamp : ${EXE_TARGET} FRC.update-elc.stamp @touch NOBYTECOMPILE - ./temacs -batch -l ${srcdir}/../lisp/update-elc.el + ./${EXE_TARGET} -nd -batch -l ${srcdir}/../lisp/update-elc.el @if test ! -f $@ -o -f NOBYTECOMPILE; then touch $@; fi; \ $(RM) NOBYTECOMPILE @@ -373,16 +382,16 @@ dynodump_deps = ../dynodump/dynodump.so cd ../dynodump && $(RECURSIVE_MAKE) #endif /* DYNODUMP */ -${libsrc}DOC: temacs update-elc.stamp +${libsrc}DOC: ${EXE_TARGET} update-elc.stamp $(RM) ${libsrc}DOC; \ - ${DUMPENV} ./temacs -batch -l ${srcdir}/../lisp/make-docfile.el -- \ + ${DUMPENV} ./${EXE_TARGET} -nd -batch -l ${srcdir}/../lisp/make-docfile.el -- \ -o ${libsrc}DOC -d ${srcdir} -i ${libsrc}../site-packages \ ${obj_src} ${mallocdocsrc} ${rallocdocsrc} dump_elcs: dump-elcs -dump-elcs: temacs - -${DUMPENV} ./temacs -batch -l ${srcdir}/../lisp/update-elc.el +dump-elcs: ${EXE_TARGET} + -${DUMPENV} ./${EXE_TARGET} -nd -batch -l ${srcdir}/../lisp/update-elc.el all-elc all-elcs: cd .. && $(RECURSIVE_MAKE) all-elc @@ -416,6 +425,9 @@ ${libsrc}make-po: #endif /* I18N3 */ +${libsrc}make-dump-id: + cd ${libsrc} && $(RECURSIVE_MAKE) make-dump-id + ${libsrc}make-docfile: cd ${libsrc} && $(RECURSIVE_MAKE) make-docfile @@ -429,23 +441,26 @@ lint: $(LINTFILES) $(LINT.c) $(LINTFILES) ## end of Lint Section -temacs_deps=\ +link_deps=\ $(start_files) ${objs} ${otherobjs}\ $(lwlib_deps) $(dynodump_deps) +temacs_deps=\ + $(link_deps) $(ID_FILE) + temacs_link_args=\ - ${start_flags} ${ldflags}\ - -o $@ ${start_files} ${objs} ${otherobjs} ${LIBES} + ${start_flags} ${ldflags} -I${srcdir} \ + -o $@ ${start_files} ${objs} ${otherobjs} ${ID_FILE} ${LIBES} -temacs: $(temacs_deps) +${EXE_TARGET}: $(temacs_deps) $(LD) $(temacs_link_args) -#ifdef PDUMP - @$(RM) xemacs.dmp -#endif + +dump-id.c: ${libsrc}make-dump-id ${link_deps} + ${libsrc}make-dump-id .PHONY : run-temacs -run-temacs: temacs +run-temacs: ${EXE_TARGET} -${run_temacs} ## We have automated tests!! @@ -470,8 +485,8 @@ rtc_patch.o: rtc_patch_area -o $@ rtcmacs: $(temacs_deps) rtc_patch.o - $(RM) temacs; $(RECURSIVE_MAKE) temacs RTC_patch_objs=rtc_patch.o - mv temacs rtcmacs + $(RM) ${EXE_TARGET}; $(RECURSIVE_MAKE) ${EXE_TARGET} RTC_patch_objs=rtc_patch.o + mv ${EXE_TARGET} rtcmacs .PHONY: run-rtcmacs run-rtcmacs: rtcmacs @@ -484,7 +499,7 @@ run-rtcmacs: rtcmacs runargs -batch -l ${srcdir}/../lisp/loadup.el run-temacs -q; \ run' rtcmacs -debug-temacs: temacs +debug-temacs: ${EXE_TARGET} -${debug_temacs} ## Purify, Quantify, PureCoverage are software quality products from @@ -502,7 +517,7 @@ PURIFY_FLAGS =\ PURIFY_LIBS = -lpthread puremacs: $(temacs_deps) $(PURIFY_PROG) $(PURIFY_FLAGS) $(LD) $(temacs_link_args) $(PURIFY_LIBS) - cp $@ temacs + cp $@ ${EXE_TARGET} ## Quantify #ifdef QUANTIFY @@ -514,7 +529,7 @@ temacs_link_args += $(QUANTIFY_HOME)/quantify_stubs.a quantmacs: $(temacs_deps) $(QUANTIFY_PROG) $(QUANTIFY_FLAGS) $(LD) $(temacs_link_args) - cp $@ temacs + cp $@ ${EXE_TARGET} #endif /* QUANTIFY */ diff --git a/src/alloc.c b/src/alloc.c index 74b6559..0c4325d 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -36,12 +36,13 @@ Boston, MA 02111-1307, USA. */ Added lcrecord lists for 19.14. slb: Lots of work on the purification and dump time code. Synched Doug Lea malloc support from Emacs 20.2. - og: Killed the purespace. Portable dumper. + og: Killed the purespace. Portable dumper (moved to dumper.c) */ #include #include "lisp.h" +#include "alloc.h" #include "backtrace.h" #include "buffer.h" #include "bytecode.h" @@ -56,6 +57,7 @@ Boston, MA 02111-1307, USA. */ #include "redisplay.h" #include "specifier.h" #include "sysfile.h" +#include "sysdep.h" #include "window.h" #include "console-stream.h" @@ -63,19 +65,8 @@ Boston, MA 02111-1307, USA. */ #include #endif -#ifdef HAVE_MMAP -#include -#include -#endif - #ifdef PDUMP -typedef struct -{ - const struct lrecord_description *desc; - int count; -} pdump_reloc_table; - -static char *pdump_rt_list = 0; +#include "dumper.h" #endif EXFUN (Fgarbage_collect, 0); @@ -393,7 +384,7 @@ alloc_lcrecord (size_t size, const struct lrecord_implementation *implementation (! (implementation->hash == NULL && implementation->equal != NULL))); lcheader = (struct lcrecord_header *) allocate_lisp_storage (size); - set_lheader_implementation (&(lcheader->lheader), implementation); + set_lheader_implementation (&lcheader->lheader, implementation); lcheader->next = all_lcrecords; #if 1 /* mly prefers to see small ID numbers */ lcheader->uid = lrecord_uid_counter++; @@ -657,7 +648,7 @@ dbg_eq (Lisp_Object obj1, Lisp_Object obj2) This is called when a relocatable block is freed in ralloc.c. */ void refill_memory_reserve (void); void -refill_memory_reserve () +refill_memory_reserve (void) { if (breathing_space == 0) breathing_space = (char *) malloc (4096 - MALLOC_OVERHEAD); @@ -796,12 +787,18 @@ do \ You have some weird system and need to supply a reasonable value here. #endif +/* The construct (* (void **) (ptr)) would cause aliasing problems + with modern optimizing compilers like `gcc -O3 -fstrict-aliasing'. + But `char *' can legally alias any pointer. Hence this union trick. */ +typedef union { char c; void *p; } *aliasing_voidpp; +#define ALIASING_VOIDPP_DEREFERENCE(ptr) \ + (((aliasing_voidpp) (ptr))->p) #define FREE_STRUCT_P(ptr) \ - (* (void **) ptr == (void *) INVALID_POINTER_VALUE) + (ALIASING_VOIDPP_DEREFERENCE (ptr) == (void *) INVALID_POINTER_VALUE) #define MARK_STRUCT_AS_FREE(ptr) \ - (* (void **) ptr = (void *) INVALID_POINTER_VALUE) + (ALIASING_VOIDPP_DEREFERENCE (ptr) = (void *) INVALID_POINTER_VALUE) #define MARK_STRUCT_AS_NOT_FREE(ptr) \ - (* (void **) ptr = 0) + (ALIASING_VOIDPP_DEREFERENCE (ptr) = 0) #ifdef ERROR_CHECK_GC @@ -923,7 +920,7 @@ Create a new cons, give it CAR and CDR as components, and return it. Lisp_Cons *c; ALLOCATE_FIXED_TYPE (cons, Lisp_Cons, c); - set_lheader_implementation (&(c->lheader), &lrecord_cons); + set_lheader_implementation (&c->lheader, &lrecord_cons); XSETCONS (val, c); c->car = car; c->cdr = cdr; @@ -940,7 +937,7 @@ noseeum_cons (Lisp_Object car, Lisp_Object cdr) Lisp_Cons *c; NOSEEUM_ALLOCATE_FIXED_TYPE (cons, Lisp_Cons, c); - set_lheader_implementation (&(c->lheader), &lrecord_cons); + set_lheader_implementation (&c->lheader, &lrecord_cons); XSETCONS (val, c); XCAR (val) = car; XCDR (val) = cdr; @@ -1057,7 +1054,7 @@ make_float (double float_value) if (sizeof (struct lrecord_header) + sizeof (double) != sizeof (*f)) xzero (*f); - set_lheader_implementation (&(f->lheader), &lrecord_float); + set_lheader_implementation (&f->lheader, &lrecord_float); float_data (f) = float_value; XSETFLOAT (val, f); return val; @@ -1297,7 +1294,7 @@ make_bit_vector_internal (size_t sizei) size_t num_longs = BIT_VECTOR_LONG_STORAGE (sizei); size_t sizem = offsetof (Lisp_Bit_Vector, bits[num_longs]); Lisp_Bit_Vector *p = (Lisp_Bit_Vector *) allocate_lisp_storage (sizem); - set_lheader_implementation (&(p->lheader), &lrecord_bit_vector); + set_lheader_implementation (&p->lheader, &lrecord_bit_vector); INCREMENT_CONS_COUNTER (sizem, "bit-vector"); @@ -1401,7 +1398,7 @@ make_compiled_function (void) Lisp_Object fun; ALLOCATE_FIXED_TYPE (compiled_function, Lisp_Compiled_Function, f); - set_lheader_implementation (&(f->lheader), &lrecord_compiled_function); + set_lheader_implementation (&f->lheader, &lrecord_compiled_function); f->stack_depth = 0; f->specpdl_depth = 0; @@ -1485,7 +1482,7 @@ This is terrible behavior which is retained for compatibility with old f->constants = constants; CHECK_NATNUM (stack_depth); - f->stack_depth = XINT (stack_depth); + f->stack_depth = (unsigned short) XINT (stack_depth); #ifdef COMPILED_FUNCTION_ANNOTATION_HACK if (!NILP (Vcurrent_compiled_function_annotation)) @@ -1548,7 +1545,7 @@ Its value and function definition are void, and its property list is nil. CHECK_STRING (name); ALLOCATE_FIXED_TYPE (symbol, Lisp_Symbol, p); - set_lheader_implementation (&(p->lheader), &lrecord_symbol); + set_lheader_implementation (&p->lheader, &lrecord_symbol); p->name = XSTRING (name); p->plist = Qnil; p->value = Qunbound; @@ -1572,7 +1569,7 @@ allocate_extent (void) struct extent *e; ALLOCATE_FIXED_TYPE (extent, struct extent, e); - set_lheader_implementation (&(e->lheader), &lrecord_extent); + set_lheader_implementation (&e->lheader, &lrecord_extent); extent_object (e) = Qnil; set_extent_start (e, -1); set_extent_end (e, -1); @@ -1602,7 +1599,7 @@ allocate_event (void) Lisp_Event *e; ALLOCATE_FIXED_TYPE (event, Lisp_Event, e); - set_lheader_implementation (&(e->lheader), &lrecord_event); + set_lheader_implementation (&e->lheader, &lrecord_event); XSETEVENT (val, e); return val; @@ -1625,7 +1622,7 @@ Return a new marker which does not point at any place. Lisp_Marker *p; ALLOCATE_FIXED_TYPE (marker, Lisp_Marker, p); - set_lheader_implementation (&(p->lheader), &lrecord_marker); + set_lheader_implementation (&p->lheader, &lrecord_marker); p->buffer = 0; p->memind = 0; marker_next (p) = 0; @@ -1642,7 +1639,7 @@ noseeum_make_marker (void) Lisp_Marker *p; NOSEEUM_ALLOCATE_FIXED_TYPE (marker, Lisp_Marker, p); - set_lheader_implementation (&(p->lheader), &lrecord_marker); + set_lheader_implementation (&p->lheader, &lrecord_marker); p->buffer = 0; p->memind = 0; marker_next (p) = 0; @@ -1862,7 +1859,7 @@ make_uninit_string (Bytecount length) /* Allocate the string header */ ALLOCATE_FIXED_TYPE (string, Lisp_String, s); - set_lheader_implementation (&(s->lheader), &lrecord_string); + set_lheader_implementation (&s->lheader, &lrecord_string); set_string_data (s, BIG_STRING_FULLSIZE_P (fullsize) ? xnew_array (Bufbyte, length + 1) @@ -2166,7 +2163,7 @@ make_string_nocopy (const Bufbyte *contents, Bytecount length) /* Allocate the string header */ ALLOCATE_FIXED_TYPE (string, Lisp_String, s); - set_lheader_implementation (&(s->lheader), &lrecord_string); + set_lheader_implementation (&s->lheader, &lrecord_string); SET_C_READONLY_RECORD_HEADER (&s->lheader); s->plist = Qnil; set_string_data (s, (Bufbyte *)contents); @@ -2348,9 +2345,6 @@ Does not copy symbols. /* Garbage Collection */ /************************************************************************/ -/* This will be used more extensively In The Future */ -static int last_lrecord_type_index_assigned; - /* All the built-in lisp object types are enumerated in `enum lrecord_type'. Additional ones may be defined by a module (none yet). We leave some room in `lrecord_implementations_table' for such new lisp object types. */ @@ -2372,108 +2366,89 @@ struct gcpro *gcprolist; #else #define NSTATICS 2000 #endif -/* Not "static" because of linker lossage on some systems */ -Lisp_Object *staticvec[NSTATICS] - /* Force it into data space! */ - = {0}; -static int staticidx; + +/* Not "static" because used by dumper.c */ +Lisp_Object *staticvec[NSTATICS]; +int staticidx; /* Put an entry in staticvec, pointing at the variable whose address is given */ void staticpro (Lisp_Object *varaddress) { - if (staticidx >= countof (staticvec)) - /* #### This is now a dubious abort() since this routine may be called */ - /* by Lisp attempting to load a DLL. */ - abort (); + /* #### This is now a dubious assert() since this routine may be called */ + /* by Lisp attempting to load a DLL. */ + assert (staticidx < countof (staticvec)); staticvec[staticidx++] = varaddress; } -/* Not "static" because of linker lossage on some systems */ -Lisp_Object *staticvec_nodump[200] - /* Force it into data space! */ - = {0}; -static int staticidx_nodump; + +Lisp_Object *staticvec_nodump[200]; +int staticidx_nodump; /* Put an entry in staticvec_nodump, pointing at the variable whose address is given */ void staticpro_nodump (Lisp_Object *varaddress) { - if (staticidx_nodump >= countof (staticvec_nodump)) - /* #### This is now a dubious abort() since this routine may be called */ - /* by Lisp attempting to load a DLL. */ - abort (); + /* #### This is now a dubious assert() since this routine may be called */ + /* by Lisp attempting to load a DLL. */ + assert (staticidx_nodump < countof (staticvec_nodump)); staticvec_nodump[staticidx_nodump++] = varaddress; } -/* Not "static" because of linker lossage on some systems */ -struct -{ - void *data; - const struct struct_description *desc; -} dumpstructvec[200]; -static int dumpstructidx; +struct pdump_dumpstructinfo dumpstructvec[200]; +int dumpstructidx; /* Put an entry in dumpstructvec, pointing at the variable whose address is given */ void dumpstruct (void *varaddress, const struct struct_description *desc) { - if (dumpstructidx >= countof (dumpstructvec)) - abort (); + assert (dumpstructidx < countof (dumpstructvec)); dumpstructvec[dumpstructidx].data = varaddress; dumpstructvec[dumpstructidx].desc = desc; dumpstructidx++; } -/* Not "static" because of linker lossage on some systems */ -struct dumpopaque_info -{ - void *data; - size_t size; -} dumpopaquevec[200]; - -static int dumpopaqueidx; +struct pdump_dumpopaqueinfo dumpopaquevec[250]; +int dumpopaqueidx; /* Put an entry in dumpopaquevec, pointing at the variable whose address is given */ void dumpopaque (void *varaddress, size_t size) { - if (dumpopaqueidx >= countof (dumpopaquevec)) - abort (); + assert (dumpopaqueidx < countof (dumpopaquevec)); + dumpopaquevec[dumpopaqueidx].data = varaddress; dumpopaquevec[dumpopaqueidx].size = size; dumpopaqueidx++; } Lisp_Object *pdump_wirevec[50]; -static int pdump_wireidx; +int pdump_wireidx; /* Put an entry in pdump_wirevec, pointing at the variable whose address is given */ void pdump_wire (Lisp_Object *varaddress) { - if (pdump_wireidx >= countof (pdump_wirevec)) - abort (); + assert (pdump_wireidx < countof (pdump_wirevec)); pdump_wirevec[pdump_wireidx++] = varaddress; } Lisp_Object *pdump_wirevec_list[50]; -static int pdump_wireidx_list; +int pdump_wireidx_list; /* Put an entry in pdump_wirevec_list, pointing at the variable whose address is given */ void pdump_wire_list (Lisp_Object *varaddress) { - if (pdump_wireidx_list >= countof (pdump_wirevec_list)) - abort (); + assert (pdump_wireidx_list < countof (pdump_wirevec_list)); pdump_wirevec_list[pdump_wireidx_list++] = varaddress; } @@ -2481,7 +2456,7 @@ pdump_wire_list (Lisp_Object *varaddress) #define GC_CHECK_LHEADER_INVARIANTS(lheader) do { \ struct lrecord_header * GCLI_lh = (lheader); \ assert (GCLI_lh != 0); \ - assert (GCLI_lh->type <= last_lrecord_type_index_assigned); \ + assert (GCLI_lh->type < lrecord_type_count); \ assert (! C_READONLY_RECORD_HEADER_P (GCLI_lh) || \ (MARKED_RECORD_HEADER_P (GCLI_lh) && \ LISP_READONLY_RECORD_HEADER_P (GCLI_lh))); \ @@ -3075,8 +3050,7 @@ compact_string_chars (void) size = string_length (string); fullsize = STRING_FULLSIZE (size); - if (BIG_STRING_FULLSIZE_P (fullsize)) - abort (); + gc_checking_assert (! BIG_STRING_FULLSIZE_P (fullsize)); /* Just skip it if it isn't marked. */ if (! MARKED_RECORD_HEADER_P (&(string->lheader))) @@ -3138,7 +3112,7 @@ debug_string_purity_print (Lisp_String *p) { Charcount i; Charcount s = string_char_length (p); - putc ('\"', stderr); + stderr_out ("\""); for (i = 0; i < s; i++) { Emchar ch = string_char (p, i); @@ -3266,28 +3240,7 @@ gc_sweep (void) sweep_events (); #ifdef PDUMP - /* Unmark all dumped objects */ - { - int i; - char *p = pdump_rt_list; - if (p) - for (;;) - { - pdump_reloc_table *rt = (pdump_reloc_table *)p; - p += sizeof (pdump_reloc_table); - if (rt->desc) - { - for (i=0; icount; i++) - { - struct lrecord_header *lh = * (struct lrecord_header **) p; - if (! C_READONLY_RECORD_HEADER_P (lh)) - UNMARK_RECORD_HEADER (lh); - p += sizeof (EMACS_INT); - } - } else - break; - } - } + pdump_objects_unmark (); #endif } @@ -3652,7 +3605,7 @@ Garbage collection happens automatically if you cons more than garbage_collect_1 (); - for (i = 0; i <= last_lrecord_type_index_assigned; i++) + for (i = 0; i < lrecord_type_count; i++) { if (lcrecord_stats[i].bytes_in_use != 0 || lcrecord_stats[i].bytes_freed != 0 @@ -3993,8 +3946,6 @@ init_alloc_once_early (void) { reinit_alloc_once_early (); - last_lrecord_type_index_assigned = lrecord_type_count - 1; - { int i; for (i = 0; i < countof (lrecord_implementations_table); i++) @@ -4135,1047 +4086,3 @@ complex_vars_of_alloc (void) { Vgc_pointer_glyph = Fmake_glyph_internal (Qpointer); } - - -#ifdef PDUMP - -/* The structure of the file - * - * 0 - header - * 256 - dumped objects - * stab_offset - nb_staticpro*(Lisp_Object *) from staticvec - * - nb_staticpro*(relocated Lisp_Object) pointed to by staticpro - * - nb_structdmp*pair(void *, adr) for pointers to structures - * - lrecord_implementations_table[] - * - relocation table - * - wired variable address/value couples with the count preceding the list - */ -typedef struct -{ - char signature[8]; - EMACS_UINT stab_offset; - EMACS_UINT reloc_address; - int nb_staticpro; - int nb_structdmp; - int nb_opaquedmp; - int last_type; -} dump_header; - -char *pdump_start, *pdump_end; - -static const unsigned char align_table[256] = -{ - 8, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 7, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, - 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0 -}; - -typedef struct pdump_entry_list_elmt -{ - struct pdump_entry_list_elmt *next; - const void *obj; - size_t size; - int count; - int is_lrecord; - EMACS_INT save_offset; -} pdump_entry_list_elmt; - -typedef struct -{ - pdump_entry_list_elmt *first; - int align; - int count; -} pdump_entry_list; - -typedef struct pdump_struct_list_elmt -{ - pdump_entry_list list; - const struct struct_description *sdesc; -} pdump_struct_list_elmt; - -typedef struct -{ - pdump_struct_list_elmt *list; - int count; - int size; -} pdump_struct_list; - -static pdump_entry_list pdump_object_table[256]; -static pdump_entry_list pdump_opaque_data_list; -static pdump_struct_list pdump_struct_table; -static pdump_entry_list_elmt *pdump_qnil; - -static int pdump_alert_undump_object[256]; - -static unsigned long cur_offset; -static size_t max_size; -static int pdump_fd; -static void *pdump_buf; - -#define PDUMP_HASHSIZE 200001 - -static pdump_entry_list_elmt **pdump_hash; - -/* Since most pointers are eight bytes aligned, the >>3 allows for a better hash */ -static int -pdump_make_hash (const void *obj) -{ - return ((unsigned long)(obj)>>3) % PDUMP_HASHSIZE; -} - -static pdump_entry_list_elmt * -pdump_get_entry (const void *obj) -{ - int pos = pdump_make_hash (obj); - pdump_entry_list_elmt *e; - - assert (obj != 0); - - while ((e = pdump_hash[pos]) != 0) - { - if (e->obj == obj) - return e; - - pos++; - if (pos == PDUMP_HASHSIZE) - pos = 0; - } - return 0; -} - -static void -pdump_add_entry (pdump_entry_list *list, const void *obj, size_t size, int count, int is_lrecord) -{ - pdump_entry_list_elmt *e; - int align; - int pos = pdump_make_hash (obj); - - while ((e = pdump_hash[pos]) != 0) - { - if (e->obj == obj) - return; - - pos++; - if (pos == PDUMP_HASHSIZE) - pos = 0; - } - - e = xnew (pdump_entry_list_elmt); - - e->next = list->first; - e->obj = obj; - e->size = size; - e->count = count; - e->is_lrecord = is_lrecord; - list->first = e; - - list->count += count; - pdump_hash[pos] = e; - - align = align_table[size & 255]; - if (align < 2 && is_lrecord) - align = 2; - - if (align < list->align) - list->align = align; -} - -static pdump_entry_list * -pdump_get_entry_list (const struct struct_description *sdesc) -{ - int i; - for (i=0; iname, - backtrace[i].position, - backtrace[i].offset); - } - } -} - -static void pdump_register_object (Lisp_Object obj); -static void pdump_register_struct (const void *data, const struct struct_description *sdesc, int count); - -static EMACS_INT -pdump_get_indirect_count (EMACS_INT code, const struct lrecord_description *idesc, const void *idata) -{ - EMACS_INT count; - const void *irdata; - - int line = XD_INDIRECT_VAL (code); - int delta = XD_INDIRECT_DELTA (code); - - irdata = ((char *)idata) + idesc[line].offset; - switch (idesc[line].type) - { - case XD_SIZE_T: - count = *(size_t *)irdata; - break; - case XD_INT: - count = *(int *)irdata; - break; - case XD_LONG: - count = *(long *)irdata; - break; - case XD_BYTECOUNT: - count = *(Bytecount *)irdata; - break; - default: - fprintf (stderr, "Unsupported count type : %d (line = %d, code=%ld)\n", idesc[line].type, line, (long)code); - pdump_backtrace (); - abort (); - } - count += delta; - return count; -} - -static void -pdump_register_sub (const void *data, const struct lrecord_description *desc, int me) -{ - int pos; - - restart: - for (pos = 0; desc[pos].type != XD_END; pos++) - { - const void *rdata = (const char *)data + desc[pos].offset; - - backtrace[me].position = pos; - backtrace[me].offset = desc[pos].offset; - - switch (desc[pos].type) - { - case XD_SPECIFIER_END: - pos = 0; - desc = ((const Lisp_Specifier *)data)->methods->extra_description; - goto restart; - case XD_SIZE_T: - case XD_INT: - case XD_LONG: - case XD_BYTECOUNT: - case XD_LO_RESET_NIL: - case XD_INT_RESET: - case XD_LO_LINK: - break; - case XD_OPAQUE_DATA_PTR: - { - EMACS_INT count = desc[pos].data1; - if (XD_IS_INDIRECT (count)) - count = pdump_get_indirect_count (count, desc, data); - - pdump_add_entry (&pdump_opaque_data_list, - *(void **)rdata, - count, - 1, - 0); - break; - } - case XD_C_STRING: - { - const char *str = *(const char **)rdata; - if (str) - pdump_add_entry (&pdump_opaque_data_list, str, strlen (str)+1, 1, 0); - break; - } - case XD_DOC_STRING: - { - const char *str = *(const char **)rdata; - if ((EMACS_INT)str > 0) - pdump_add_entry (&pdump_opaque_data_list, str, strlen (str)+1, 1, 0); - break; - } - case XD_LISP_OBJECT: - { - const Lisp_Object *pobj = (const Lisp_Object *)rdata; - - assert (desc[pos].data1 == 0); - - backtrace[me].offset = (const char *)pobj - (const char *)data; - pdump_register_object (*pobj); - break; - } - case XD_LISP_OBJECT_ARRAY: - { - int i; - EMACS_INT count = desc[pos].data1; - if (XD_IS_INDIRECT (count)) - count = pdump_get_indirect_count (count, desc, data); - - for (i = 0; i < count; i++) - { - const Lisp_Object *pobj = ((const Lisp_Object *)rdata) + i; - Lisp_Object dobj = *pobj; - - backtrace[me].offset = (const char *)pobj - (const char *)data; - pdump_register_object (dobj); - } - break; - } - case XD_STRUCT_PTR: - { - EMACS_INT count = desc[pos].data1; - const struct struct_description *sdesc = desc[pos].data2; - const char *dobj = *(const char **)rdata; - if (dobj) - { - if (XD_IS_INDIRECT (count)) - count = pdump_get_indirect_count (count, desc, data); - - pdump_register_struct (dobj, sdesc, count); - } - break; - } - default: - fprintf (stderr, "Unsupported dump type : %d\n", desc[pos].type); - pdump_backtrace (); - abort (); - }; - } -} - -static void -pdump_register_object (Lisp_Object obj) -{ - struct lrecord_header *objh; - - if (!POINTER_TYPE_P (XTYPE (obj))) - return; - - objh = XRECORD_LHEADER (obj); - if (!objh) - return; - - if (pdump_get_entry (objh)) - return; - - if (LHEADER_IMPLEMENTATION (objh)->description) - { - int me = depth++; - if (me>65536) - { - fprintf (stderr, "Backtrace overflow, loop ?\n"); - abort (); - } - backtrace[me].obj = objh; - backtrace[me].position = 0; - backtrace[me].offset = 0; - - pdump_add_entry (pdump_object_table + objh->type, - objh, - LHEADER_IMPLEMENTATION (objh)->static_size ? - LHEADER_IMPLEMENTATION (objh)->static_size : - LHEADER_IMPLEMENTATION (objh)->size_in_bytes_method (objh), - 1, - 1); - pdump_register_sub (objh, - LHEADER_IMPLEMENTATION (objh)->description, - me); - --depth; - } - else - { - pdump_alert_undump_object[objh->type]++; - fprintf (stderr, "Undumpable object type : %s\n", LHEADER_IMPLEMENTATION (objh)->name); - pdump_backtrace (); - } -} - -static void -pdump_register_struct (const void *data, const struct struct_description *sdesc, int count) -{ - if (data && !pdump_get_entry (data)) - { - int me = depth++; - int i; - if (me>65536) - { - fprintf (stderr, "Backtrace overflow, loop ?\n"); - abort (); - } - backtrace[me].obj = 0; - backtrace[me].position = 0; - backtrace[me].offset = 0; - - pdump_add_entry (pdump_get_entry_list (sdesc), - data, - sdesc->size, - count, - 0); - for (i=0; isize*i, - sdesc->description, - me); - } - --depth; - } -} - -static void -pdump_dump_data (pdump_entry_list_elmt *elmt, const struct lrecord_description *desc) -{ - size_t size = elmt->size; - int count = elmt->count; - if (desc) - { - int pos, i; - memcpy (pdump_buf, elmt->obj, size*count); - - for (i=0; iobj))->methods->extra_description; - goto restart; - case XD_SIZE_T: - case XD_INT: - case XD_LONG: - case XD_BYTECOUNT: - break; - case XD_LO_RESET_NIL: - { - EMACS_INT count = desc[pos].data1; - int i; - if (XD_IS_INDIRECT (count)) - count = pdump_get_indirect_count (count, desc, elmt->obj); - for (i=0; isave_offset; - break; - } - case XD_INT_RESET: - { - EMACS_INT val = desc[pos].data1; - if (XD_IS_INDIRECT (val)) - val = pdump_get_indirect_count (val, desc, elmt->obj); - *(int *)rdata = val; - break; - } - case XD_OPAQUE_DATA_PTR: - case XD_C_STRING: - case XD_STRUCT_PTR: - { - void *ptr = *(void **)rdata; - if (ptr) - *(EMACS_INT *)rdata = pdump_get_entry (ptr)->save_offset; - break; - } - case XD_LO_LINK: - { - Lisp_Object obj = *(Lisp_Object *)rdata; - pdump_entry_list_elmt *elmt1; - for (;;) - { - elmt1 = pdump_get_entry (XRECORD_LHEADER (obj)); - if (elmt1) - break; - obj = *(Lisp_Object *)(desc[pos].offset + (char *)(XRECORD_LHEADER (obj))); - } - *(EMACS_INT *)rdata = elmt1->save_offset; - break; - } - case XD_LISP_OBJECT: - { - Lisp_Object *pobj = (Lisp_Object *) rdata; - - assert (desc[pos].data1 == 0); - - if (POINTER_TYPE_P (XTYPE (*pobj)) && XRECORD_LHEADER (*pobj)) - *(EMACS_INT *)pobj = - pdump_get_entry (XRECORD_LHEADER (*pobj))->save_offset; - break; - } - case XD_LISP_OBJECT_ARRAY: - { - EMACS_INT count = desc[pos].data1; - int i; - if (XD_IS_INDIRECT (count)) - count = pdump_get_indirect_count (count, desc, elmt->obj); - - for (i=0; isave_offset; - } - break; - } - case XD_DOC_STRING: - { - EMACS_INT str = *(EMACS_INT *)rdata; - if (str > 0) - *(EMACS_INT *)rdata = pdump_get_entry ((void *)str)->save_offset; - break; - } - default: - fprintf (stderr, "Unsupported dump type : %d\n", desc[pos].type); - abort (); - }; - } - } - } - write (pdump_fd, desc ? pdump_buf : elmt->obj, size*count); - if (elmt->is_lrecord && ((size*count) & 3)) - write (pdump_fd, "\0\0\0", 4-((size*count) & 3)); -} - -static void -pdump_reloc_one (void *data, EMACS_INT delta, const struct lrecord_description *desc) -{ - int pos; - - restart: - for (pos = 0; desc[pos].type != XD_END; pos++) - { - void *rdata = (char *)data + desc[pos].offset; - switch (desc[pos].type) - { - case XD_SPECIFIER_END: - pos = 0; - desc = ((const Lisp_Specifier *)data)->methods->extra_description; - goto restart; - case XD_SIZE_T: - case XD_INT: - case XD_LONG: - case XD_BYTECOUNT: - case XD_INT_RESET: - break; - case XD_OPAQUE_DATA_PTR: - case XD_C_STRING: - case XD_STRUCT_PTR: - case XD_LO_LINK: - { - EMACS_INT ptr = *(EMACS_INT *)rdata; - if (ptr) - *(EMACS_INT *)rdata = ptr+delta; - break; - } - case XD_LISP_OBJECT: - { - Lisp_Object *pobj = (Lisp_Object *) rdata; - - assert (desc[pos].data1 == 0); - - if (POINTER_TYPE_P (XTYPE (*pobj)) - && ! EQ (*pobj, Qnull_pointer)) - XSETOBJ (*pobj, XTYPE (*pobj), (char *) XPNTR (*pobj) + delta); - - break; - } - case XD_LISP_OBJECT_ARRAY: - case XD_LO_RESET_NIL: - { - EMACS_INT count = desc[pos].data1; - int i; - if (XD_IS_INDIRECT (count)) - count = pdump_get_indirect_count (count, desc, data); - - for (i=0; i 0) - *(EMACS_INT *)rdata = str + delta; - break; - } - default: - fprintf (stderr, "Unsupported dump type : %d\n", desc[pos].type); - abort (); - }; - } -} - -static void -pdump_allocate_offset (pdump_entry_list_elmt *elmt, const struct lrecord_description *desc) -{ - size_t size = (elmt->is_lrecord ? (elmt->size + 3) & ~3 : elmt->size)*elmt->count; - elmt->save_offset = cur_offset; - if (size>max_size) - max_size = size; - cur_offset += size; -} - -static void -pdump_scan_by_alignment (void (*f)(pdump_entry_list_elmt *, const struct lrecord_description *)) -{ - int align, i; - const struct lrecord_description *idesc; - pdump_entry_list_elmt *elmt; - for (align=8; align>=0; align--) - { - for (i=0; i<=last_lrecord_type_index_assigned; i++) - if (pdump_object_table[i].align == align) - { - elmt = pdump_object_table[i].first; - if (!elmt) - continue; - idesc = lrecord_implementations_table[i]->description; - while (elmt) - { - f (elmt, idesc); - elmt = elmt->next; - } - } - - for (i=0; idescription; - while (elmt) - { - f (elmt, idesc); - elmt = elmt->next; - } - } - - elmt = pdump_opaque_data_list.first; - while (elmt) - { - if (align_table[elmt->size & 255] == align) - f (elmt, 0); - elmt = elmt->next; - } - } -} - -static void -pdump_dump_staticvec (void) -{ - EMACS_INT *reloc = xnew_array (EMACS_INT, staticidx); - int i; - write (pdump_fd, staticvec, staticidx*sizeof (Lisp_Object *)); - - for (i=0; isave_offset; - else - reloc[i] = *(EMACS_INT *)(staticvec[i]); - } - write (pdump_fd, reloc, staticidx*sizeof (Lisp_Object)); - free (reloc); -} - -static void -pdump_dump_structvec (void) -{ - int i; - for (i=0; isave_offset; - write (pdump_fd, &adr, sizeof (adr)); - } -} - -static void -pdump_dump_opaquevec (void) -{ - int i; - for (i=0; idescription; - rt.count = pdump_object_table[i].count; - write (pdump_fd, &rt, sizeof (rt)); - while (elmt) - { - EMACS_INT rdata = pdump_get_entry (elmt->obj)->save_offset; - write (pdump_fd, &rdata, sizeof (rdata)); - elmt = elmt->next; - } - } - - rt.desc = 0; - rt.count = 0; - write (pdump_fd, &rt, sizeof (rt)); - - for (i=0; idescription; - rt.count = pdump_struct_table.list[i].list.count; - write (pdump_fd, &rt, sizeof (rt)); - while (elmt) - { - EMACS_INT rdata = pdump_get_entry (elmt->obj)->save_offset; - for (j=0; jcount; j++) - { - write (pdump_fd, &rdata, sizeof (rdata)); - rdata += elmt->size; - } - elmt = elmt->next; - } - } - rt.desc = 0; - rt.count = 0; - write (pdump_fd, &rt, sizeof (rt)); -} - -static void -pdump_dump_wired (void) -{ - EMACS_INT count = pdump_wireidx + pdump_wireidx_list; - int i; - - write (pdump_fd, &count, sizeof (count)); - - for (i=0; isave_offset; - write (pdump_fd, &pdump_wirevec[i], sizeof (pdump_wirevec[i])); - write (pdump_fd, &obj, sizeof (obj)); - } - - for (i=0; idescription; - for (pos = 0; desc[pos].type != XD_LO_LINK; pos++) - if (desc[pos].type == XD_END) - abort (); - - obj = *(Lisp_Object *)(desc[pos].offset + (char *)(XRECORD_LHEADER (obj))); - } - res = elmt->save_offset; - - write (pdump_fd, &pdump_wirevec_list[i], sizeof (pdump_wirevec_list[i])); - write (pdump_fd, &res, sizeof (res)); - } -} - -void -pdump (void) -{ - int i; - Lisp_Object t_console, t_device, t_frame; - int none; - dump_header hd; - - /* These appear in a DEFVAR_LISP, which does a staticpro() */ - t_console = Vterminal_console; - t_frame = Vterminal_frame; - t_device = Vterminal_device; - - Vterminal_console = Qnil; - Vterminal_frame = Qnil; - Vterminal_device = Qnil; - - pdump_hash = xnew_array_and_zero (pdump_entry_list_elmt *, PDUMP_HASHSIZE); - - for (i=0; i<=last_lrecord_type_index_assigned; i++) - { - pdump_object_table[i].first = 0; - pdump_object_table[i].align = 8; - pdump_object_table[i].count = 0; - pdump_alert_undump_object[i] = 0; - } - pdump_struct_table.count = 0; - pdump_struct_table.size = -1; - - pdump_opaque_data_list.first = 0; - pdump_opaque_data_list.align = 8; - pdump_opaque_data_list.count = 0; - depth = 0; - - for (i=0; iname, pdump_alert_undump_object[i]); - } - if (!none) - return; - - for (i=0; inb_staticpro; - last_lrecord_type_index_assigned = ((dump_header *)pdump_start)->last_type; - delta = ((EMACS_INT)pdump_start) - ((dump_header *)pdump_start)->reloc_address; - p = pdump_start + ((dump_header *)pdump_start)->stab_offset; - - /* Put back the staticvec in place */ - memcpy (staticvec, p, staticidx*sizeof (Lisp_Object *)); - p += staticidx*sizeof (Lisp_Object *); - for (i=0; inb_structdmp; i++) - { - void **adr = PDUMP_READ (p, void **); - *adr = (void *) (PDUMP_READ (p, char *) + delta); - } - - /* Put back the opaques */ - for (i=0; i<((dump_header *)pdump_start)->nb_opaquedmp; i++) - { - struct dumpopaque_info di = PDUMP_READ (p, struct dumpopaque_info); - memcpy (di.data, p, di.size); - p += di.size; - } - - /* Put back the lrecord_implementations_table */ - memcpy (lrecord_implementations_table, p, sizeof (lrecord_implementations_table)); - p += sizeof (lrecord_implementations_table); - - /* Reinitialize lrecord_markers from lrecord_implementations_table */ - for (i=0; i < countof (lrecord_implementations_table); i++) - if (lrecord_implementations_table[i]) - lrecord_markers[i] = lrecord_implementations_table[i]->marker; - - /* Do the relocations */ - pdump_rt_list = p; - count = 2; - for (;;) - { - pdump_reloc_table rt = PDUMP_READ (p, pdump_reloc_table); - if (rt.desc) - { - for (i=0; i < rt.count; i++) - { - char *adr = delta + *(char **)p; - *(char **)p = adr; - pdump_reloc_one (adr, delta, rt.desc); - p += sizeof (char *); - } - } else - if (!(--count)) - break; - } - - /* Put the pdump_wire variables in place */ - count = PDUMP_READ (p, EMACS_INT); - - for (i=0; ibuffer_alist, so this will change it in the per-frame ordering as well. */ Fsetcar (Frassq (buf, Vbuffer_alist), newname); + /* If the buffer is the selected one then this is equivalent to + recording the buffer. */ + if (EQ (Fwindow_buffer (Fselected_window (Qnil)), buf)) + { + va_run_hook_with_args (Qrecord_buffer_hook, 1, buf); + } + if (NILP (current_buffer->filename) && !NILP (current_buffer->auto_save_file_name)) call0 (Qrename_auto_save_file); diff --git a/src/buffer.h b/src/buffer.h index b56d8a5..7c4b0ec 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -470,8 +470,9 @@ for (mps_bufcons = Qunbound, \ /* section of internally-formatted text */ /* -------------------------------------------------------------- */ -INLINE const Bufbyte *charptr_n_addr (const Bufbyte *ptr, Charcount offset); -INLINE const Bufbyte * +INLINE_HEADER const Bufbyte * +charptr_n_addr (const Bufbyte *ptr, Charcount offset); +INLINE_HEADER const Bufbyte * charptr_n_addr (const Bufbyte *ptr, Charcount offset) { return ptr + charcount_to_bytecount (ptr, offset); @@ -491,8 +492,8 @@ Emchar non_ascii_charptr_emchar (const Bufbyte *ptr); Bytecount non_ascii_set_charptr_emchar (Bufbyte *ptr, Emchar c); Bytecount non_ascii_charptr_copy_char (const Bufbyte *ptr, Bufbyte *ptr2); -INLINE Emchar charptr_emchar (const Bufbyte *ptr); -INLINE Emchar +INLINE_HEADER Emchar charptr_emchar (const Bufbyte *ptr); +INLINE_HEADER Emchar charptr_emchar (const Bufbyte *ptr) { return BYTE_ASCII_P (*ptr) ? @@ -500,8 +501,8 @@ charptr_emchar (const Bufbyte *ptr) non_ascii_charptr_emchar (ptr); } -INLINE Bytecount set_charptr_emchar (Bufbyte *ptr, Emchar x); -INLINE Bytecount +INLINE_HEADER Bytecount set_charptr_emchar (Bufbyte *ptr, Emchar x); +INLINE_HEADER Bytecount set_charptr_emchar (Bufbyte *ptr, Emchar x) { return !CHAR_MULTIBYTE_P (x) ? @@ -509,8 +510,9 @@ set_charptr_emchar (Bufbyte *ptr, Emchar x) non_ascii_set_charptr_emchar (ptr, x); } -INLINE Bytecount charptr_copy_char (const Bufbyte *ptr, Bufbyte *ptr2); -INLINE Bytecount +INLINE_HEADER Bytecount +charptr_copy_char (const Bufbyte *ptr, Bufbyte *ptr2); +INLINE_HEADER Bytecount charptr_copy_char (const Bufbyte *ptr, Bufbyte *ptr2) { return BYTE_ASCII_P (*ptr) ? @@ -538,8 +540,8 @@ charptr_copy_char (const Bufbyte *ptr, Bufbyte *ptr2) int non_ascii_valid_char_p (Emchar ch); -INLINE int valid_char_p (Emchar ch); -INLINE int +INLINE_HEADER int valid_char_p (Emchar ch); +INLINE_HEADER int valid_char_p (Emchar ch) { return ((unsigned int) (ch) <= 0xff) || non_ascii_valid_char_p (ch); @@ -557,8 +559,8 @@ valid_char_p (Emchar ch) #ifdef ERROR_CHECK_TYPECHECK -INLINE Emchar XCHAR_OR_CHAR_INT (Lisp_Object obj); -INLINE Emchar +INLINE_HEADER Emchar XCHAR_OR_CHAR_INT (Lisp_Object obj); +INLINE_HEADER Emchar XCHAR_OR_CHAR_INT (Lisp_Object obj) { assert (CHAR_OR_CHAR_INTP (obj)); @@ -622,8 +624,8 @@ XCHAR_OR_CHAR_INT (Lisp_Object obj) /*----------------------------------------------------------------------*/ /* Convert the address of a byte in the buffer into a position. */ -INLINE Bytind BI_BUF_PTR_BYTE_POS (struct buffer *buf, Bufbyte *ptr); -INLINE Bytind +INLINE_HEADER Bytind BI_BUF_PTR_BYTE_POS (struct buffer *buf, Bufbyte *ptr); +INLINE_HEADER Bytind BI_BUF_PTR_BYTE_POS (struct buffer *buf, Bufbyte *ptr) { return (ptr - buf->text->beg + 1 @@ -635,8 +637,8 @@ BI_BUF_PTR_BYTE_POS (struct buffer *buf, Bufbyte *ptr) bytind_to_bufpos (buf, BI_BUF_PTR_BYTE_POS (buf, ptr)) /* Address of byte at position POS in buffer. */ -INLINE Bufbyte * BI_BUF_BYTE_ADDRESS (struct buffer *buf, Bytind pos); -INLINE Bufbyte * +INLINE_HEADER Bufbyte * BI_BUF_BYTE_ADDRESS (struct buffer *buf, Bytind pos); +INLINE_HEADER Bufbyte * BI_BUF_BYTE_ADDRESS (struct buffer *buf, Bytind pos) { return (buf->text->beg + @@ -648,8 +650,8 @@ BI_BUF_BYTE_ADDRESS (struct buffer *buf, Bytind pos) BI_BUF_BYTE_ADDRESS (buf, bufpos_to_bytind (buf, pos)) /* Address of byte before position POS in buffer. */ -INLINE Bufbyte * BI_BUF_BYTE_ADDRESS_BEFORE (struct buffer *buf, Bytind pos); -INLINE Bufbyte * +INLINE_HEADER Bufbyte * BI_BUF_BYTE_ADDRESS_BEFORE (struct buffer *buf, Bytind pos); +INLINE_HEADER Bufbyte * BI_BUF_BYTE_ADDRESS_BEFORE (struct buffer *buf, Bytind pos) { return (buf->text->beg + @@ -664,8 +666,8 @@ BI_BUF_BYTE_ADDRESS_BEFORE (struct buffer *buf, Bytind pos) /* Converting between byte indices and memory indices */ /*----------------------------------------------------------------------*/ -INLINE int valid_memind_p (struct buffer *buf, Memind x); -INLINE int +INLINE_HEADER int valid_memind_p (struct buffer *buf, Memind x); +INLINE_HEADER int valid_memind_p (struct buffer *buf, Memind x) { return ((x >= 1 && x <= (Memind) buf->text->gpt) || @@ -673,16 +675,16 @@ valid_memind_p (struct buffer *buf, Memind x) x <= (Memind) (buf->text->z + buf->text->gap_size))); } -INLINE Memind bytind_to_memind (struct buffer *buf, Bytind x); -INLINE Memind +INLINE_HEADER Memind bytind_to_memind (struct buffer *buf, Bytind x); +INLINE_HEADER Memind bytind_to_memind (struct buffer *buf, Bytind x) { return (Memind) ((x > buf->text->gpt) ? (x + buf->text->gap_size) : x); } -INLINE Bytind memind_to_bytind (struct buffer *buf, Memind x); -INLINE Bytind +INLINE_HEADER Bytind memind_to_bytind (struct buffer *buf, Memind x); +INLINE_HEADER Bytind memind_to_bytind (struct buffer *buf, Memind x) { #ifdef ERROR_CHECK_BUFPOS @@ -902,16 +904,16 @@ memind_to_bytind (struct buffer *buf, Memind x) VALIDATE_BYTIND_BACKWARD (buf, x); \ } while (0) -INLINE Bytind prev_bytind (struct buffer *buf, Bytind x); -INLINE Bytind +INLINE_HEADER Bytind prev_bytind (struct buffer *buf, Bytind x); +INLINE_HEADER Bytind prev_bytind (struct buffer *buf, Bytind x) { DEC_BYTIND (buf, x); return x; } -INLINE Bytind next_bytind (struct buffer *buf, Bytind x); -INLINE Bytind +INLINE_HEADER Bytind next_bytind (struct buffer *buf, Bytind x); +INLINE_HEADER Bytind next_bytind (struct buffer *buf, Bytind x) { INC_BYTIND (buf, x); @@ -973,8 +975,8 @@ Bufpos bytind_to_bufpos_func (struct buffer *buf, Bytind x); extern short three_to_one_table[]; -INLINE int real_bufpos_to_bytind (struct buffer *buf, Bufpos x); -INLINE int +INLINE_HEADER int real_bufpos_to_bytind (struct buffer *buf, Bufpos x); +INLINE_HEADER int real_bufpos_to_bytind (struct buffer *buf, Bufpos x) { if (x >= buf->text->mule_bufmin && x <= buf->text->mule_bufmax) @@ -985,8 +987,8 @@ real_bufpos_to_bytind (struct buffer *buf, Bufpos x) return bufpos_to_bytind_func (buf, x); } -INLINE int real_bytind_to_bufpos (struct buffer *buf, Bytind x); -INLINE int +INLINE_HEADER int real_bytind_to_bufpos (struct buffer *buf, Bytind x); +INLINE_HEADER int real_bytind_to_bufpos (struct buffer *buf, Bytind x) { if (x >= buf->text->mule_bytmin && x <= buf->text->mule_bytmax) @@ -1267,16 +1269,17 @@ dfc_convert_to_internal_format (dfc_conversion_type source_type, } while (0) /* Assign to the `sink' lvalue(s) using the converted data. */ +typedef union { char c; void *p; } *dfc_aliasing_voidpp; #define DFC_ALLOCA_USE_CONVERTED_DATA(sink) do { \ void * dfc_sink_ret = alloca (dfc_sink.data.len + 1); \ memcpy (dfc_sink_ret, dfc_sink.data.ptr, dfc_sink.data.len + 1); \ - (DFC_CPP_CAR sink) = (unsigned char *) dfc_sink_ret; \ + ((dfc_aliasing_voidpp) &(DFC_CPP_CAR sink))->p = dfc_sink_ret; \ (DFC_CPP_CDR sink) = dfc_sink.data.len; \ } while (0) #define DFC_MALLOC_USE_CONVERTED_DATA(sink) do { \ void * dfc_sink_ret = xmalloc (dfc_sink.data.len + 1); \ memcpy (dfc_sink_ret, dfc_sink.data.ptr, dfc_sink.data.len + 1); \ - (DFC_CPP_CAR sink) = (unsigned char *) dfc_sink_ret; \ + ((dfc_aliasing_voidpp) &(DFC_CPP_CAR sink))->p = dfc_sink_ret; \ (DFC_CPP_CDR sink) = dfc_sink.data.len; \ } while (0) #define DFC_C_STRING_ALLOCA_USE_CONVERTED_DATA(sink) do { \ @@ -1704,8 +1707,8 @@ int map_over_sharing_buffers (struct buffer *buf, TRT_TABLE_AS_STRING (buf->case_eqv_table) #endif -INLINE Emchar TRT_TABLE_OF (Lisp_Object trt, Emchar c); -INLINE Emchar +INLINE_HEADER Emchar TRT_TABLE_OF (Lisp_Object trt, Emchar c); +INLINE_HEADER Emchar TRT_TABLE_OF (Lisp_Object trt, Emchar c) { return IN_TRT_TABLE_DOMAIN (c) ? TRT_TABLE_CHAR_1 (trt, c) : c; @@ -1717,8 +1720,8 @@ TRT_TABLE_OF (Lisp_Object trt, Emchar c) /* 1 if CH is upper case. */ -INLINE int UPPERCASEP (struct buffer *buf, Emchar ch); -INLINE int +INLINE_HEADER int UPPERCASEP (struct buffer *buf, Emchar ch); +INLINE_HEADER int UPPERCASEP (struct buffer *buf, Emchar ch) { return DOWNCASE_TABLE_OF (buf, ch) != ch; @@ -1726,8 +1729,8 @@ UPPERCASEP (struct buffer *buf, Emchar ch) /* 1 if CH is lower case. */ -INLINE int LOWERCASEP (struct buffer *buf, Emchar ch); -INLINE int +INLINE_HEADER int LOWERCASEP (struct buffer *buf, Emchar ch); +INLINE_HEADER int LOWERCASEP (struct buffer *buf, Emchar ch) { return (UPCASE_TABLE_OF (buf, ch) != ch && @@ -1736,8 +1739,8 @@ LOWERCASEP (struct buffer *buf, Emchar ch) /* 1 if CH is neither upper nor lower case. */ -INLINE int NOCASEP (struct buffer *buf, Emchar ch); -INLINE int +INLINE_HEADER int NOCASEP (struct buffer *buf, Emchar ch); +INLINE_HEADER int NOCASEP (struct buffer *buf, Emchar ch) { return UPCASE_TABLE_OF (buf, ch) == ch; @@ -1745,8 +1748,8 @@ NOCASEP (struct buffer *buf, Emchar ch) /* Upcase a character, or make no change if that cannot be done. */ -INLINE Emchar UPCASE (struct buffer *buf, Emchar ch); -INLINE Emchar +INLINE_HEADER Emchar UPCASE (struct buffer *buf, Emchar ch); +INLINE_HEADER Emchar UPCASE (struct buffer *buf, Emchar ch) { return (DOWNCASE_TABLE_OF (buf, ch) == ch) ? UPCASE_TABLE_OF (buf, ch) : ch; diff --git a/src/chartab.h b/src/chartab.h index 98901fa..3866640 100644 --- a/src/chartab.h +++ b/src/chartab.h @@ -135,9 +135,9 @@ Lisp_Object get_non_ascii_char_table_value (Lisp_Char_Table *ct, int leading_byte, Emchar c); -INLINE Lisp_Object +INLINE_HEADER Lisp_Object CHAR_TABLE_NON_ASCII_VALUE_UNSAFE (Lisp_Char_Table *ct, Emchar ch); -INLINE Lisp_Object +INLINE_HEADER Lisp_Object CHAR_TABLE_NON_ASCII_VALUE_UNSAFE (Lisp_Char_Table *ct, Emchar ch) { unsigned char lb = CHAR_LEADING_BYTE (ch); @@ -158,6 +158,9 @@ CHAR_TABLE_NON_ASCII_VALUE_UNSAFE (Lisp_Char_Table *ct, Emchar ch) #endif /* not MULE */ +#define XCHAR_TABLE_VALUE_UNSAFE(ct, ch) \ + CHAR_TABLE_VALUE_UNSAFE (XCHAR_TABLE (ct), ch) + enum chartab_range_type { CHARTAB_RANGE_ALL, diff --git a/src/cmds.c b/src/cmds.c index 5470341..c902092 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -41,6 +41,9 @@ Lisp_Object Vself_insert_face; /* This is the command that set up Vself_insert_face. */ Lisp_Object Vself_insert_face_command; + +/* A char-table for characters which may invoke auto-filling. */ +Lisp_Object Vauto_fill_chars; DEFUN ("forward-char", Fforward_char, 0, 2, "_p", /* Move point right N characters (left if N negative). @@ -396,7 +399,9 @@ internal_self_insert (Emchar c1, int noautofill) #endif /* FSFmacs */ } } - if ((c1 == ' ' || c1 == '\n') + if ((CHAR_TABLEP (Vauto_fill_chars) + ? !NILP (XCHAR_TABLE_VALUE_UNSAFE (Vauto_fill_chars, c1)) + : (c1 == ' ' || c1 == '\n')) && !noautofill && !NILP (buf->auto_fill_function)) { @@ -498,4 +503,12 @@ Function called, if non-nil, whenever a close parenthesis is inserted. More precisely, a char with closeparen syntax is self-inserted. */ ); Vblink_paren_function = Qnil; + + DEFVAR_LISP ("auto-fill-chars", &Vauto_fill_chars /* +A char-table for characters which invoke auto-filling. +Such characters has value t in this table. +*/); + Vauto_fill_chars = Fmake_char_table (Qgeneric); + XCHAR_TABLE (Vauto_fill_chars)->ascii[' '] = Qt; + XCHAR_TABLE (Vauto_fill_chars)->ascii['\n'] = Qt; } diff --git a/src/config.h.in b/src/config.h.in index fe5e60b..9f0048a 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -38,7 +38,7 @@ Boston, MA 02111-1307, USA. */ #elif defined(_AIX) #pragma alloca #elif ! defined (alloca) -char *alloca(); +char *alloca (); #endif #endif /* C code */ @@ -47,6 +47,9 @@ char *alloca(); files so as to make it obvious where XEmacs changes are. */ #define XEMACS 1 +/* Program name */ +#undef EMACS_PROGNAME + /* Allow s&m files to differentiate OS versions without having multiple files to maintain. */ #undef OS_RELEASE @@ -390,6 +393,11 @@ char *alloca(); /* Does the library define ldap_parse_result () ? */ #undef HAVE_LDAP_PARSE_RESULT +/* Do we wish to link against the PostgreSQL RDBMS run-time library? + */ +#undef HAVE_POSTGRESQL +#undef HAVE_POSTGRESQLV7 + /* Do you have the Xauth library present? This will add some extra functionality to gnuserv. */ #undef HAVE_XAUTH @@ -775,30 +783,20 @@ on various systems. */ #define LONG_LONG_BITS (SIZEOF_LONG_LONG * BITS_PER_CHAR) #define VOID_P_BITS (SIZEOF_VOID_P * BITS_PER_CHAR) -#ifndef NOT_C_CODE -#ifdef __cplusplus -#define HAVE_INLINE 1 -#define INLINE inline -#else /* not C++ */ +/* Use `INLINE_HEADER' to define inline functions in .h files. + Use `inline static' to define inline functions in .c files. + See the Internals manual for examples and more information. */ + /* Does the keyword `inline' exist? */ -#undef HAVE_INLINE #undef inline -# ifdef HAVE_INLINE -# ifdef __GNUC__ -# ifdef DONT_EXTERN_INLINE_FUNCTIONS -# define INLINE inline -# else -# define INLINE extern inline -# endif -# else -# define INLINE static inline -# endif /* __GNUC__ */ -# else -# define INLINE static -# endif /* HAVE_INLINE */ -#endif /* not C++ */ -#endif /* C code */ +#if defined (__cplusplus) || ! defined (__GNUC__) +# define INLINE_HEADER inline static +#elif defined (DONT_EXTERN_INLINE_HEADER_FUNCTIONS) +# define INLINE_HEADER inline +#else +# define INLINE_HEADER inline extern +#endif #if defined (__cplusplus) && !defined (NOT_C_CODE) /* Avoid C++ keywords used as ordinary C identifiers */ diff --git a/src/console-msw.c b/src/console-msw.c index 8d15ccc..0eb61e1 100644 --- a/src/console-msw.c +++ b/src/console-msw.c @@ -1,5 +1,5 @@ /* Console functions for mswindows. - Copyright (C) 1996 Ben Wing. + Copyright (C) 1996, 2000 Ben Wing. This file is part of XEmacs. @@ -28,6 +28,8 @@ Boston, MA 02111-1307, USA. */ #include #include "lisp.h" +#include "events.h" +#include "opaque.h" #include "console-msw.h" @@ -44,6 +46,69 @@ mswindows_initially_selected_for_input (struct console *con) return 1; } +static HWND msw_console_hwnd = 0; + +#define KLUDGE_BUFSIZE 1024 /* buffer size for console window titles */ + +/* Direct from the horse's mouth: Microsoft KB article Q124103 */ +static HWND +GetConsoleHwnd (void) +{ + HWND hwndFound; /* this is what is returned to the caller */ + char pszNewWindowTitle[KLUDGE_BUFSIZE]; /* contains fabricated WindowTitle */ + char pszOldWindowTitle[KLUDGE_BUFSIZE]; /* contains original WindowTitle */ + + /* fetch current window title */ + + GetConsoleTitle(pszOldWindowTitle, KLUDGE_BUFSIZE); + + /* format a "unique" NewWindowTitle */ + + wsprintf(pszNewWindowTitle,"%d/%d", + GetTickCount(), + GetCurrentProcessId()); + + /* change current window title */ + + SetConsoleTitle(pszNewWindowTitle); + + /* ensure window title has been updated */ + + Sleep(40); + + /* look for NewWindowTitle */ + + hwndFound=FindWindow(NULL, pszNewWindowTitle); + + /* restore original window title */ + + SetConsoleTitle(pszOldWindowTitle); + + return(hwndFound); +} + +HWND +msw_get_console_hwnd (void) +{ + if (!msw_console_hwnd) + msw_console_hwnd = GetConsoleHwnd (); + return msw_console_hwnd; +} + +int +msw_ensure_console_allocated (void) +{ + HWND fgwin = GetForegroundWindow (); + /* stupid mswin api won't let you create the console window + hidden! creating it changes the focus! fuck me! */ + if (AllocConsole ()) + { + SetForegroundWindow (fgwin); + return 1; + } + return 0; +} + static Lisp_Object mswindows_canonicalize_console_connection (Lisp_Object connection, Error_behavior errb) @@ -71,51 +136,70 @@ mswindows_canonicalize_device_connection (Lisp_Object connection, return mswindows_canonicalize_console_connection (connection, errb); } - -/************************************************************************/ -/* initialization */ -/************************************************************************/ - void -syms_of_console_mswindows (void) +msw_hide_console (void) { + ShowWindow (msw_get_console_hwnd (), SW_HIDE); } void -console_type_create_mswindows (void) +msw_show_console (void) { - INITIALIZE_CONSOLE_TYPE (mswindows, "mswindows", "console-mswindows-p"); + HWND hwnd = msw_get_console_hwnd (); + ShowWindow (hwnd, SW_SHOWNA); + + /* I tried to raise the window to the top without activating + it, but this fails. Apparently Windows just doesn't like + having the active window not be on top. So instead, we + at least put it just below our own window, where part of it + will likely be seen. */ + SetWindowPos (hwnd, GetForegroundWindow (), 0, 0, 0, 0, + SWP_NOSIZE | SWP_NOMOVE | SWP_NOSENDCHANGING | + SWP_NOACTIVATE); +} - /* console methods */ -/* CONSOLE_HAS_METHOD (mswindows, init_console); */ -/* CONSOLE_HAS_METHOD (mswindows, mark_console); */ - CONSOLE_HAS_METHOD (mswindows, initially_selected_for_input); -/* CONSOLE_HAS_METHOD (mswindows, delete_console); */ - CONSOLE_HAS_METHOD (mswindows, canonicalize_console_connection); - CONSOLE_HAS_METHOD (mswindows, canonicalize_device_connection); -/* CONSOLE_HAS_METHOD (mswindows, semi_canonicalize_console_connection); */ -/* CONSOLE_HAS_METHOD (mswindows, semi_canonicalize_device_connection); */ +static int msw_console_buffered = 0; +HANDLE msw_console_buffer; - INITIALIZE_CONSOLE_TYPE (msprinter, "msprinter", "console-msprinter-p"); +static void +msw_ensure_console_buffered (void) +{ + if (!msw_console_buffered) + { + COORD new_size; + + new_size.X = 80; + new_size.Y = 1000; + msw_ensure_console_allocated (); + msw_console_buffer = + CreateConsoleScreenBuffer (GENERIC_WRITE, 0, NULL, + CONSOLE_TEXTMODE_BUFFER, NULL); + SetConsoleScreenBufferSize (msw_console_buffer, new_size); + SetConsoleActiveScreenBuffer (msw_console_buffer); + msw_console_buffered = 1; + } } -void -reinit_console_type_create_mswindows (void) +int +msw_output_console_string (CONST Extbyte *str, Extcount len) { - REINITIALIZE_CONSOLE_TYPE (mswindows); - REINITIALIZE_CONSOLE_TYPE (msprinter); + DWORD num_written; + + msw_ensure_console_buffered (); + msw_show_console (); + return WriteConsole (msw_console_buffer, str, len, &num_written, NULL); } -void -vars_of_console_mswindows (void) +/* Determine if running on Windows 9x and not NT */ +int +msw_windows9x_p (void) { - Fprovide (Qmswindows); + return GetVersion () & 0x80000000; } #ifdef DEBUG_XEMACS -#include "events.h" -#include "opaque.h" + /* * Random helper functions for debugging. * Intended for use in the MSVC "Watch" window which doesn't like @@ -176,3 +260,45 @@ DSYMNAME (Lisp_Object obj) } #endif /* DEBUG_XEMACS */ + + + +/************************************************************************/ +/* initialization */ +/************************************************************************/ + +void +syms_of_console_mswindows (void) +{ +} + +void +console_type_create_mswindows (void) +{ + INITIALIZE_CONSOLE_TYPE (mswindows, "mswindows", "console-mswindows-p"); + + /* console methods */ +/* CONSOLE_HAS_METHOD (mswindows, init_console); */ +/* CONSOLE_HAS_METHOD (mswindows, mark_console); */ + CONSOLE_HAS_METHOD (mswindows, initially_selected_for_input); +/* CONSOLE_HAS_METHOD (mswindows, delete_console); */ + CONSOLE_HAS_METHOD (mswindows, canonicalize_console_connection); + CONSOLE_HAS_METHOD (mswindows, canonicalize_device_connection); +/* CONSOLE_HAS_METHOD (mswindows, semi_canonicalize_console_connection); */ +/* CONSOLE_HAS_METHOD (mswindows, semi_canonicalize_device_connection); */ + + INITIALIZE_CONSOLE_TYPE (msprinter, "msprinter", "console-msprinter-p"); +} + +void +reinit_console_type_create_mswindows (void) +{ + REINITIALIZE_CONSOLE_TYPE (mswindows); + REINITIALIZE_CONSOLE_TYPE (msprinter); +} + +void +vars_of_console_mswindows (void) +{ + Fprovide (Qmswindows); +} diff --git a/src/console-msw.h b/src/console-msw.h index afbd3b2..1aad49f 100644 --- a/src/console-msw.h +++ b/src/console-msw.h @@ -45,22 +45,6 @@ Boston, MA 02111-1307, USA. */ #include #endif -/* - * XXX FIXME: The following X modifier defs in events-mod.h clash with win32 - * hotkey defs in winuser.h. For the moment lose the win32 versions. - * Maybe we should rename all of MOD_* to something that doesn't clash. - */ -#ifdef MOD_CONTROL -# undef MOD_CONTROL -#endif -#ifdef MOD_ALT -# undef MOD_ALT -#endif -#ifdef MOD_SHIFT -# undef MOD_SHIFT -#endif - - /* The name of the main window class */ #define XEMACS_CLASS "XEmacs" @@ -93,6 +77,7 @@ struct mswindows_device int horzsize, vertsize; /* Size in mm */ int bitspixel; Lisp_Object fontlist; /* List of strings, device fonts */ + HDC hcdc; /* Compatible DC */ }; #define DEVICE_MSWINDOWS_DATA(d) DEVICE_TYPE_DATA (d, mswindows) @@ -106,10 +91,11 @@ struct mswindows_device #define DEVICE_MSWINDOWS_VERTSIZE(d) (DEVICE_MSWINDOWS_DATA (d)->vertsize) #define DEVICE_MSWINDOWS_BITSPIXEL(d) (DEVICE_MSWINDOWS_DATA (d)->bitspixel) #define DEVICE_MSWINDOWS_FONTLIST(d) (DEVICE_MSWINDOWS_DATA (d)->fontlist) +#define DEVICE_MSWINDOWS_HCDC(d) (DEVICE_MSWINDOWS_DATA (d)->hcdc) struct msprinter_device { - HDC hdc; + HDC hdc, hcdc; /* Printer and the comp. DCs */ HANDLE hprinter; Lisp_Object fontlist; char* name; @@ -119,6 +105,7 @@ struct msprinter_device #define DEVICE_MSPRINTER_DATA(d) DEVICE_TYPE_DATA (d, msprinter) #define DEVICE_MSPRINTER_HDC(d) (DEVICE_MSPRINTER_DATA (d)->hdc) +#define DEVICE_MSPRINTER_HCDC(d) (DEVICE_MSPRINTER_DATA (d)->hcdc) #define DEVICE_MSPRINTER_HPRINTER(d) (DEVICE_MSPRINTER_DATA (d)->hprinter) #define DEVICE_MSPRINTER_FONTLIST(d) (DEVICE_MSPRINTER_DATA (d)->fontlist) #define DEVICE_MSPRINTER_NAME(d) (DEVICE_MSPRINTER_DATA (d)->name) @@ -140,6 +127,24 @@ void msprinter_apply_devmode (struct device *d, DEVMODE *devmode); /* Printer functions in frame-msw.c */ void msprinter_start_page (struct frame *f); +/* Common checks */ + +#define DEVICE_MSGDI_P(dev) (DEVICE_MSWINDOWS_P(dev) || DEVICE_MSPRINTER_P(dev)) +#define CHECK_MSGDI_DEVICE(d) \ + do { \ + CHECK_DEVICE (d); \ + if (!(DEVICEP (d) && DEVICE_MSGDI_P(XDEVICE(d)))) \ + dead_wrong_type_argument \ + (list3 (Qor, Qmswindows, Qmsprinter), d); \ + } while (0) +#define CONCHECK_MSGDI_DEVICE(d) \ + do { \ + CHECK_DEVICE (d); \ + if (!(DEVICEP (d) && DEVICE_MSGDI_P(XDEVICE(d)))) \ + wrong_type_argument \ + (list3 (Qor, Qmswindows, Qmsprinter), d); \ + } while (0) + /* * Frame */ @@ -159,9 +164,6 @@ struct mswindows_frame /* DC for this win32 window */ HDC hdc; - /* compatible DC for bitmap operations */ - HDC cdc; - /* Time of last click event, for button 2 emul */ DWORD last_click_time; @@ -196,6 +198,7 @@ struct mswindows_frame int ignore_next_lbutton_up : 1; int ignore_next_rbutton_up : 1; int sizing : 1; + int paint_pending : 1; /* Whether a WM_PAINT magic event has been queued */ /* Geometry, in characters, as specified by proplist during frame creation. Memebers are set to -1 for unspecified */ @@ -206,7 +209,6 @@ struct mswindows_frame #define FRAME_MSWINDOWS_HANDLE(f) (FRAME_MSWINDOWS_DATA (f)->hwnd) #define FRAME_MSWINDOWS_DC(f) (FRAME_MSWINDOWS_DATA (f)->hdc) -#define FRAME_MSWINDOWS_CDC(f) (FRAME_MSWINDOWS_DATA (f)->cdc) #define FRAME_MSWINDOWS_MENU_HASH_TABLE(f) (FRAME_MSWINDOWS_DATA (f)->menu_hash_table) #define FRAME_MSWINDOWS_TOOLBAR_HASH_TABLE(f) \ (FRAME_MSWINDOWS_DATA (f)->toolbar_hash_table) @@ -236,7 +238,6 @@ struct mswindows_frame struct msprinter_frame { - HDC hcdc; /* Compatoble DC */ int left_margin, top_margin, /* All in twips */ right_margin, bottom_margin; int charheight, charwidth; /* As per proplist or -1 if not gven */ @@ -250,7 +251,6 @@ struct msprinter_frame #define FRAME_MSPRINTER_RIGHT_MARGIN(f) (FRAME_MSPRINTER_DATA (f)->top_margin) #define FRAME_MSPRINTER_TOP_MARGIN(f) (FRAME_MSPRINTER_DATA (f)->right_margin) #define FRAME_MSPRINTER_BOTTOM_MARGIN(f) (FRAME_MSPRINTER_DATA (f)->bottom_margin) -#define FRAME_MSPRINTER_CDC(f) (FRAME_MSPRINTER_DATA (f)->hcdc) #define FRAME_MSPRINTER_JOB_STARTED(f) (FRAME_MSPRINTER_DATA (f)->job_started) #define FRAME_MSPRINTER_PAGE_STARTED(f) (FRAME_MSPRINTER_DATA (f)->page_started) #define FRAME_MSPRINTER_ORIENTATION(f) (FRAME_MSPRINTER_DATA (f)->orientation) @@ -293,7 +293,8 @@ extern HSZ mswindows_dde_service; extern HSZ mswindows_dde_topic_system; extern HSZ mswindows_dde_item_open; HDDEDATA CALLBACK mswindows_dde_callback (UINT uType, UINT uFmt, HCONV hconv, - HSZ hszTopic, HSZ hszItem, HDDEDATA hdata, + HSZ hszTopic, HSZ hszItem, + HDDEDATA hdata, DWORD dwData1, DWORD dwData2); void mswindows_enqueue_misc_user_event (Lisp_Object channel, @@ -301,18 +302,11 @@ void mswindows_enqueue_misc_user_event (Lisp_Object channel, Lisp_Object object); Lisp_Object mswindows_cancel_dispatch_event (Lisp_Event* event); Lisp_Object mswindows_pump_outstanding_events (void); -Lisp_Object mswindows_protect_modal_loop (Lisp_Object (*bfun) (Lisp_Object barg), +Lisp_Object mswindows_protect_modal_loop (Lisp_Object (*bfun) + (Lisp_Object barg), Lisp_Object barg); void mswindows_unmodalize_signal_maybe (void); -#ifdef HAVE_TOOLBARS -Lisp_Object -mswindows_get_toolbar_button_text ( struct frame* f, int command_id ); -Lisp_Object -mswindows_handle_toolbar_wm_command (struct frame* f, HWND ctrl, WORD id); -#endif -Lisp_Object -mswindows_handle_gui_wm_command (struct frame* f, HWND ctrl, DWORD id); COLORREF mswindows_string_to_color (const char *name); USID emacs_mswindows_create_stream_pair (void* inhandle, void* outhandle, Lisp_Object* instream, @@ -328,13 +322,29 @@ HANDLE get_nt_process_handle (Lisp_Process *p); extern Lisp_Object Vmswindows_frame_being_created; extern Lisp_Object mswindows_frame_being_created; +void msw_get_workspace_coords (RECT *rc); + +HWND msw_get_console_hwnd (void); +void msw_hide_console (void); +void msw_show_console (void); +int msw_output_console_string (CONST Extbyte *str, Extcount len); + Lisp_Object mswindows_enumerate_fonts (HDC hdc); +int msw_char_is_accelerator (struct frame *f, Emchar ch); +Bytecount msw_translate_menu_or_dialog_item (Bufbyte *item, Bytecount len, + Bytecount maxlen, Emchar *accel, + Lisp_Object error_name); + +#ifdef HAVE_TOOLBARS Lisp_Object mswindows_get_toolbar_button_text (struct frame* f, int command_id); Lisp_Object mswindows_handle_toolbar_wm_command (struct frame* f, HWND ctrl, WORD id); +#endif Lisp_Object mswindows_handle_gui_wm_command (struct frame* f, - HWND ctrl, DWORD id); + HWND ctrl, LPARAM id); + +int msw_windows9x_p (void); #endif /* INCLUDED_console_msw_h_ */ diff --git a/src/console-stream.c b/src/console-stream.c index 2dd05ac..600937c 100644 --- a/src/console-stream.c +++ b/src/console-stream.c @@ -328,7 +328,7 @@ The initial frame-object, which represents XEmacs' stdout. #ifndef PDUMP void -init_console_stream (void) +init_console_stream (int reinit) { /* This function can GC */ if (!initialized) @@ -350,13 +350,16 @@ init_console_stream (void) #else void -init_console_stream (void) +init_console_stream (int reinit) { /* This function can GC */ - Vterminal_device = Fmake_device (Qstream, Qnil, Qnil); - Vterminal_console = Fdevice_console (Vterminal_device); - Vterminal_frame = Fmake_frame (Qnil, Vterminal_device); - minibuf_window = XFRAME (Vterminal_frame)->minibuffer_window; + if (!reinit) + { + Vterminal_device = Fmake_device (Qstream, Qnil, Qnil); + Vterminal_console = Fdevice_console (Vterminal_device); + Vterminal_frame = Fmake_frame (Qnil, Vterminal_device); + minibuf_window = XFRAME (Vterminal_frame)->minibuffer_window; + } if (initialized) { stream_init_console (XCONSOLE (Vterminal_console), Qnil); diff --git a/src/console.c b/src/console.c index 068200e..ab147bc 100644 --- a/src/console.c +++ b/src/console.c @@ -1410,11 +1410,11 @@ consoles, for example), it is set to nil. /* While this should be const it can't be because some things (i.e. edebug) do manipulate it. */ DEFVAR_CONSOLE_LOCAL ("defining-kbd-macro", defining_kbd_macro /* -Non-nil while a console macro is being defined. Don't set this! +Non-nil while a keyboard macro is being defined. Don't set this! */ ); DEFVAR_CONSOLE_LOCAL ("last-kbd-macro", last_kbd_macro /* -Last kbd macro defined, as a vector of events; nil if none defined. +Last keyboard macro defined, as a vector of events; nil if none defined. */ ); DEFVAR_CONSOLE_LOCAL ("prefix-arg", prefix_arg /* diff --git a/src/console.h b/src/console.h index 27b62b7..4dad2be 100644 --- a/src/console.h +++ b/src/console.h @@ -453,9 +453,9 @@ DECLARE_LRECORD (console, struct console); #define CONSOLE_TYPE_P(con, type) EQ (CONSOLE_TYPE (con), Q##type) #ifdef ERROR_CHECK_TYPECHECK -INLINE struct console * +INLINE_HEADER struct console * error_check_console_type (struct console *con, Lisp_Object sym); -INLINE struct console * +INLINE_HEADER struct console * error_check_console_type (struct console *con, Lisp_Object sym) { assert (EQ (CONSOLE_TYPE (con), sym)); diff --git a/src/database.h b/src/database.h index 42589ff..aad2ca5 100644 --- a/src/database.h +++ b/src/database.h @@ -18,7 +18,7 @@ along with XEmacs; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* This file is only necessary to get INLINE handling correct. +/* This file is only necessary to get inline handling correct. See inline.c */ #ifndef INCLUDED_database_h_ diff --git a/src/device-msw.c b/src/device-msw.c index ded93db..1734233 100644 --- a/src/device-msw.c +++ b/src/device-msw.c @@ -40,7 +40,16 @@ Boston, MA 02111-1307, USA. */ #include "frame.h" #include "sysdep.h" +#if (defined (__CYGWIN32__) || defined(__MINGW32__)) && \ + CYGWIN_VERSION_DLL_MAJOR < 21 +extern BOOL WINAPI DdeFreeStringHandle(DWORD,HSZ); +#else #include +#endif + +#if !(defined (__CYGWIN32__) || defined(__MINGW32__)) +# include /* For CoInitialize */ +#endif /* win32 DDE management library globals */ #ifdef HAVE_DRAGNDROP @@ -129,8 +138,8 @@ mswindows_init_device (struct device *d, Lisp_Object props) DEVICE_MSWINDOWS_VERTSIZE(d) = GetDeviceCaps(hdc, VERTSIZE); DEVICE_MSWINDOWS_BITSPIXEL(d) = GetDeviceCaps(hdc, BITSPIXEL); DEVICE_MSWINDOWS_FONTLIST (d) = mswindows_enumerate_fonts (hdc); - - DeleteDC (hdc); + + DEVICE_MSWINDOWS_HCDC(d) = hdc; /* Register the main window class */ wc.cbSize = sizeof (WNDCLASSEX); @@ -174,13 +183,20 @@ mswindows_finish_init_device (struct device *d, Lisp_Object props) /* Initialize DDE management library and our related globals. We execute a * dde Open("file") by simulating a drop, so this depends on dnd support. */ #ifdef HAVE_DRAGNDROP +# if !(defined(__CYGWIN32__) || defined(__MINGW32__)) + CoInitialize (NULL); +# endif + mswindows_dde_mlid = 0; DdeInitialize (&mswindows_dde_mlid, (PFNCALLBACK)mswindows_dde_callback, APPCMD_FILTERINITS|CBF_FAIL_SELFCONNECTIONS|CBF_FAIL_ADVISES| - CBF_FAIL_POKES|CBF_FAIL_REQUESTS|CBF_SKIP_ALLNOTIFICATIONS, 0); + CBF_FAIL_POKES|CBF_FAIL_REQUESTS|CBF_SKIP_ALLNOTIFICATIONS, + 0); - mswindows_dde_service = DdeCreateStringHandle (mswindows_dde_mlid, XEMACS_CLASS, 0); - mswindows_dde_topic_system = DdeCreateStringHandle (mswindows_dde_mlid, SZDDESYS_TOPIC, 0); + mswindows_dde_service = DdeCreateStringHandle (mswindows_dde_mlid, + XEMACS_CLASS, 0); + mswindows_dde_topic_system = DdeCreateStringHandle (mswindows_dde_mlid, + SZDDESYS_TOPIC, 0); mswindows_dde_item_open = DdeCreateStringHandle (mswindows_dde_mlid, TEXT(MSWINDOWS_DDE_ITEM_OPEN), 0); DdeNameService (mswindows_dde_mlid, mswindows_dde_service, 0L, DNS_REGISTER); @@ -196,11 +212,22 @@ mswindows_delete_device (struct device *d) DdeFreeStringHandle (mswindows_dde_mlid, mswindows_dde_topic_system); DdeFreeStringHandle (mswindows_dde_mlid, mswindows_dde_service); DdeUninitialize (mswindows_dde_mlid); + +# if !(defined(__CYGWIN32__) || defined(__MINGW32__)) + CoUninitialize (); +# endif #endif + DeleteDC (DEVICE_MSWINDOWS_HCDC(d)); free (d->device_data); } +void +msw_get_workspace_coords (RECT *rc) +{ + SystemParametersInfo (SPI_GETWORKAREA, 0, rc, 0); +} + static void mswindows_mark_device (struct device *d) { @@ -271,10 +298,18 @@ mswindows_device_system_metrics (struct device *d, case DM_size_workspace: { RECT rc; - SystemParametersInfo (SPI_GETWORKAREA, 0, &rc, 0); + msw_get_workspace_coords (&rc); return Fcons (make_int (rc.right - rc.left), make_int (rc.bottom - rc.top)); } + + case DM_offset_workspace: + { + RECT rc; + msw_get_workspace_coords (&rc); + return Fcons (make_int (rc.left), make_int (rc.top)); + } + /* case DM_size_toolbar: case DM_size_toolbar_button: @@ -344,8 +379,11 @@ msprinter_init_device (struct device *d, Lisp_Object props) if (DEVICE_MSPRINTER_HDC (d) == NULL) signal_open_printer_error (d); + DEVICE_MSPRINTER_HCDC(d) = + CreateCompatibleDC (DEVICE_MSPRINTER_HDC (d)); + /* Determinie DEVMODE size and store the default DEVMODE */ - DEVICE_MSPRINTER_DEVMODE_SIZE(d) = + DEVICE_MSPRINTER_DEVMODE_SIZE(d) = DocumentProperties (NULL, DEVICE_MSPRINTER_HPRINTER(d), printer_name, NULL, NULL, 0); if (DEVICE_MSPRINTER_DEVMODE_SIZE(d) <= 0) @@ -411,6 +449,8 @@ msprinter_delete_device (struct device *d) ClosePrinter (DEVICE_MSPRINTER_HPRINTER (d)); if (DEVICE_MSPRINTER_HDC (d)) DeleteDC (DEVICE_MSPRINTER_HDC (d)); + if (DEVICE_MSPRINTER_HCDC (d)) + DeleteDC (DEVICE_MSPRINTER_HCDC (d)); if (DEVICE_MSPRINTER_NAME (d)) free (DEVICE_MSPRINTER_NAME (d)); if (DEVICE_MSPRINTER_DEVMODE (d)) @@ -481,7 +521,15 @@ msprinter_apply_devmode (struct device *d, DEVMODE *devmode) devmode, devmode, DM_IN_BUFFER | DM_OUT_BUFFER); - ResetDC (DEVICE_MSPRINTER_HDC (d), devmode); + /* #### ResetDC fails sometimes, Bill only know s why. + The solution below looks more like a workaround to me, + although it might be fine. --kkm */ + if (ResetDC (DEVICE_MSPRINTER_HDC (d), devmode) == NULL) + { + DeleteDC (DEVICE_MSPRINTER_HDC (d)); + DEVICE_MSPRINTER_HDC (d) = + CreateDC ("WINSPOOL", DEVICE_MSPRINTER_NAME(d), NULL, devmode); + } } diff --git a/src/device.c b/src/device.c index 25aa688..5d6ebd9 100644 --- a/src/device.c +++ b/src/device.c @@ -891,6 +891,7 @@ behavior cannot necessarily be determined automatically. MARK_FRAME_GLYPHS_CHANGED (f); MARK_FRAME_SUBWINDOWS_CHANGED (f); MARK_FRAME_TOOLBARS_CHANGED (f); + MARK_FRAME_GUTTERS_CHANGED (f); f->menubar_changed = 1; } } @@ -990,7 +991,7 @@ size-workspace Workspace size in pixels. This can be less than or decorations. For printers, this is the size of printable area. offset-workspace Offset of workspace area from the top left corner - of screen or paper. + of screen or paper, in pixels. size-device-mm Device screen size in millimeters. device-dpi Device resolution, in dots per inch. num-bit-planes Integer, number of device bit planes. diff --git a/src/device.h b/src/device.h index a95c3df..d33b1ea 100644 --- a/src/device.h +++ b/src/device.h @@ -238,9 +238,9 @@ DECLARE_LRECORD (device, struct device); #define DEVICE_TYPE_P(d, type) EQ (DEVICE_TYPE (d), Q##type) #ifdef ERROR_CHECK_TYPECHECK -INLINE struct device * +INLINE_HEADER struct device * error_check_device_type (struct device *d, Lisp_Object sym); -INLINE struct device * +INLINE_HEADER struct device * error_check_device_type (struct device *d, Lisp_Object sym) { assert (EQ (DEVICE_TYPE (d), sym)); diff --git a/src/dialog-msw.c b/src/dialog-msw.c index 279cd36..c1f3251 100644 --- a/src/dialog-msw.c +++ b/src/dialog-msw.c @@ -168,6 +168,25 @@ push_lisp_string_as_unicode (unsigned_char_dynarr* dynarr, Lisp_Object string) Dynarr_add_many (dynarr, uni_string, sizeof(WCHAR) * length); } +/* Helper function which converts the supplied string STRING into Unicode and + pushes it at the end of DYNARR */ +static void +push_bufbyte_string_as_unicode (unsigned_char_dynarr* dynarr, Bufbyte *string, + Bytecount len) +{ + Extbyte *mbcs_string; + Charcount length = bytecount_to_charcount (string, len); + LPWSTR uni_string; + + TO_EXTERNAL_FORMAT (C_STRING, string, + C_STRING_ALLOCA, mbcs_string, + Qnative); + uni_string = alloca_array (WCHAR, length + 1); + length = MultiByteToWideChar (CP_ACP, 0, mbcs_string, -1, + uni_string, sizeof(WCHAR) * (length + 1)); + Dynarr_add_many (dynarr, uni_string, sizeof(WCHAR) * length); +} + /* Given button TEXT, return button width in DLU */ static unsigned int button_width (Lisp_Object text) @@ -362,7 +381,21 @@ mswindows_popup_dialog_box (struct frame* f, Lisp_Object desc) Dynarr_add_many (template, &button_class_id, sizeof (button_class_id)); /* Next thing to add is control text, as Unicode string */ - push_lisp_string_as_unicode (template, pgui_item->name); + { + Lisp_Object ctext = pgui_item->name; + Emchar accel_unused; + Bufbyte *trans = (Bufbyte *) alloca (2 * XSTRING_LENGTH (ctext) + 3); + Bytecount translen; + + memcpy (trans, XSTRING_DATA (ctext), XSTRING_LENGTH (ctext) + 1); + translen = + msw_translate_menu_or_dialog_item (trans, + XSTRING_LENGTH (ctext), + 2 * XSTRING_LENGTH (ctext) + 3, + &accel_unused, + ctext); + push_bufbyte_string_as_unicode (template, trans, translen); + } /* Specify 0 length creation data. */ Dynarr_add_many (template, &zeroes, 2); @@ -385,7 +418,8 @@ mswindows_popup_dialog_box (struct frame* f, Lisp_Object desc) vector = make_vector (Dynarr_length (dialog_items), Qunbound); dialog_data = Fcons (frame, vector); for (i = 0; i < Dynarr_length (dialog_items); i++) - XVECTOR_DATA (vector) [i] = XGUI_ITEM (*Dynarr_atp (dialog_items, i))->callback; + XVECTOR_DATA (vector) [i] = + XGUI_ITEM (*Dynarr_atp (dialog_items, i))->callback; /* Woof! Everything is ready. Pop pop pop in now! */ if (!CreateDialogIndirectParam (NULL, diff --git a/src/dialog.c b/src/dialog.c index 0f0af99..4ce48a6 100644 --- a/src/dialog.c +++ b/src/dialog.c @@ -21,9 +21,6 @@ Boston, MA 02111-1307, USA. */ /* Synched up with: Not in FSF. */ -/* #### There ain't nothin' here because dialog boxes have not been - properly abstracted yet. */ - #include #include "lisp.h" #include "frame.h" @@ -48,6 +45,11 @@ The name is the string to display on the button; it is filtered through the resource database, so it is possible for resources to override what string is actually displayed. +Accelerators can be indicated in the string by putting the sequence +"%_" before the character corresponding to the key that will invoke +the button. Uppercase and lowercase accelerators are equivalent. The +sequence "%%" is also special, and is translated into a single %. + If the `callback' of a button is a symbol, then it must name a command. It will be invoked with `call-interactively'. If it is a list, then it is evaluated with `eval'. @@ -57,8 +59,7 @@ following buttons should be flushright instead of flushleft. Though the keyword/value syntax is supported for dialog boxes just as in popup menus, the only keyword which is both meaningful and fully implemented -for dialog box buttons is `:active'. -*/ +for dialog box buttons is `:active'. */ (dbox_desc)) { struct frame *f = selected_frame (); @@ -72,7 +73,8 @@ for dialog box buttons is `:active'. CHECK_CONS (dbox_desc); CHECK_STRING (XCAR (dbox_desc)); if (!CONSP (XCDR (dbox_desc))) - signal_simple_error ("Dialog descriptor must supply at least one button", dbox_desc); + signal_simple_error ("Dialog descriptor must supply at least one button", + dbox_desc); DEVMETH (d, popup_dialog_box, (f, dbox_desc)); diff --git a/src/dired.c b/src/dired.c index c987db2..3f992ee 100644 --- a/src/dired.c +++ b/src/dired.c @@ -23,16 +23,16 @@ Boston, MA 02111-1307, USA. */ #include #include "lisp.h" -#include "buffer.h" -#include "commands.h" -#include "elhash.h" -#include "regex.h" -#include "opaque.h" #include "sysfile.h" #include "sysdir.h" #include "systime.h" #include "sysdep.h" #include "syspwd.h" +#include "buffer.h" +#include "commands.h" +#include "elhash.h" +#include "regex.h" +#include "opaque.h" Lisp_Object Vcompletion_ignored_extensions; Lisp_Object Qdirectory_files; diff --git a/src/editfns.c b/src/editfns.c index 61ceb1f..a4ee746 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -822,10 +822,18 @@ uncache_home_directory (void) of a few bytes */ } +/* !!#### not Mule correct. */ + /* Returns the home directory, in external format */ Extbyte * get_home_directory (void) { + /* !!#### this is hopelessly bogus. Rule #1: Do not make any assumptions + about what format an external string is in. Could be Unicode, for all + we know, and then all the operations below are totally bogus. + Instead, convert all data to internal format *right* at the juncture + between XEmacs and the outside world, the very moment we first get + the data. --ben */ int output_home_warning = 0; if (cached_home_directory == NULL) @@ -847,7 +855,9 @@ get_home_directory (void) } else { -# if 1 +# if 0 /* changed by ben. This behavior absolutely stinks, and the + possibility being addressed here occurs quite commonly. + Using the current directory makes absolutely no sense. */ /* * Use the current directory. * This preserves the existing XEmacs behavior, but is different diff --git a/src/eldap.c b/src/eldap.c index 99c5d53..68b63e7 100644 --- a/src/eldap.c +++ b/src/eldap.c @@ -417,7 +417,7 @@ entry according to the value of WITHDN. LDAPMessage *e; BerElement *ptr; char *a, *dn; - int i, rc, rc2; + int i, rc; int matches; struct ldap_unwind_struct unwind; @@ -426,10 +426,11 @@ entry according to the value of WITHDN. int speccount = specpdl_depth (); - Lisp_Object list, entry, result; + Lisp_Object list = Qnil; + Lisp_Object entry = Qnil; + Lisp_Object result = Qnil; struct gcpro gcpro1, gcpro2, gcpro3; - list = entry = result = Qnil; GCPRO3 (list, entry, result); unwind.res = NULL; @@ -489,9 +490,9 @@ entry according to the value of WITHDN. /* Perform the search */ if (ldap_search (ld, - NILP (base) ? "" : (char *) XSTRING_DATA (base), + NILP (base) ? (char *) "" : (char *) XSTRING_DATA (base), ldap_scope, - NILP (filter) ? "" : (char *) XSTRING_DATA (filter), + NILP (filter) ? (char *) "" : (char *) XSTRING_DATA (filter), ldap_attributes, NILP (attrsonly) ? 0 : 1) == -1) @@ -538,7 +539,7 @@ entry according to the value of WITHDN. { for (i = 0; unwind.vals[i] != NULL; i++) { - list = Fcons (make_ext_string (unwind.vals[i]->bv_val, + list = Fcons (make_ext_string ((Extbyte *) unwind.vals[i]->bv_val, unwind.vals[i]->bv_len, Qnative), list); @@ -558,11 +559,13 @@ entry according to the value of WITHDN. } #if defined HAVE_LDAP_PARSE_RESULT - rc2 = ldap_parse_result (ld, unwind.res, - &rc, - NULL, NULL, NULL, NULL, 0); - if (rc2 != LDAP_SUCCESS) - rc = rc2; + { + int rc2 = ldap_parse_result (ld, unwind.res, + &rc, + NULL, NULL, NULL, NULL, 0); + if (rc2 != LDAP_SUCCESS) + rc = rc2; + } #else if (rc == 0) signal_ldap_error (ld, NULL, LDAP_TIMELIMIT_EXCEEDED); @@ -604,9 +607,12 @@ containing attribute/value string pairs. struct berval *bervals; int rc; int i, j; + size_t len; - Lisp_Object current, values; + Lisp_Object current = Qnil; + Lisp_Object values = Qnil; struct gcpro gcpro1, gcpro2; + GCPRO2 (current, values); /* Do all the parameter checking */ @@ -622,8 +628,9 @@ containing attribute/value string pairs. signal_simple_error ("Cannot add void entry", entry); /* Build the ldap_mods array */ - ldap_mods = alloca_array (LDAPMod, XINT (Flength (entry))); - ldap_mods_ptrs = alloca_array (LDAPMod *, 1 + XINT (Flength (entry))); + len = XINT (Flength (entry)); + ldap_mods = alloca_array (LDAPMod, len); + ldap_mods_ptrs = alloca_array (LDAPMod *, 1 + len); i = 0; EXTERNAL_LIST_LOOP (entry, entry) { @@ -638,10 +645,10 @@ containing attribute/value string pairs. values = XCDR (current); if (CONSP (values)) { - bervals = - alloca_array (struct berval, XINT (Flength (values))); + len = XINT (Flength (values)); + bervals = alloca_array (struct berval, len); ldap_mods[i].mod_vals.modv_bvals = - alloca_array (struct berval *, 1 + XINT (Flength (values))); + alloca_array (struct berval *, 1 + len); j = 0; EXTERNAL_LIST_LOOP (values, values) { @@ -676,6 +683,7 @@ containing attribute/value string pairs. signal_ldap_error (ld, NULL, rc); UNGCPRO; + return Qnil; } DEFUN ("ldap-modify", Fldap_modify, 3, 3, 0, /* @@ -686,7 +694,7 @@ MODS is a list of modifications to apply. A modification is a list of the form (MOD-OP ATTR VALUE1 VALUE2 ...) MOD-OP and ATTR are mandatory, VALUEs are optional depending on MOD-OP. MOD-OP is the type of modification, one of the symbols `add', `delete' -or `replace'. ATTR is the LDAP attribute type to modify +or `replace'. ATTR is the LDAP attribute type to modify. */ (ldap, dn, mods)) { @@ -694,8 +702,11 @@ or `replace'. ATTR is the LDAP attribute type to modify LDAPMod *ldap_mods, **ldap_mods_ptrs; struct berval *bervals; int i, j, rc; + Lisp_Object mod_op; + size_t len; - Lisp_Object current, mod_op, values; + Lisp_Object current = Qnil; + Lisp_Object values = Qnil; struct gcpro gcpro1, gcpro2; GCPRO2 (current, values); @@ -713,8 +724,9 @@ or `replace'. ATTR is the LDAP attribute type to modify return Qnil; /* Build the ldap_mods array */ - ldap_mods = alloca_array (LDAPMod, XINT (Flength (mods))); - ldap_mods_ptrs = alloca_array (LDAPMod *, 1 + XINT (Flength (mods))); + len = XINT (Flength (mods)); + ldap_mods = alloca_array (LDAPMod, len); + ldap_mods_ptrs = alloca_array (LDAPMod *, 1 + len); i = 0; EXTERNAL_LIST_LOOP (mods, mods) { @@ -738,9 +750,10 @@ or `replace'. ATTR is the LDAP attribute type to modify C_STRING_ALLOCA, ldap_mods[i].mod_type, Qnative); values = XCDR (current); - bervals = alloca_array (struct berval, XINT (Flength (values))); + len = XINT (Flength (values)); + bervals = alloca_array (struct berval, len); ldap_mods[i].mod_vals.modv_bvals = - alloca_array (struct berval *, 1 + XINT (Flength (values))); + alloca_array (struct berval *, 1 + len); j = 0; EXTERNAL_LIST_LOOP (values, values) { @@ -762,6 +775,7 @@ or `replace'. ATTR is the LDAP attribute type to modify signal_ldap_error (ld, NULL, rc); UNGCPRO; + return Qnil; } @@ -783,6 +797,8 @@ DN is the distinguished name of the entry to delete. rc = ldap_delete_s (ld, (char *) XSTRING_DATA (dn)); if (rc != LDAP_SUCCESS) signal_ldap_error (ld, NULL, rc); + + return Qnil; } void diff --git a/src/elhash.c b/src/elhash.c index 52ba848..688018c 100644 --- a/src/elhash.c +++ b/src/elhash.c @@ -1218,6 +1218,15 @@ elisp_map_remhash (maphash_function_t predicate, /************************************************************************/ /* garbage collecting weak hash tables */ /************************************************************************/ +#define MARK_OBJ(obj) do { \ + Lisp_Object mo_obj = (obj); \ + if (!marked_p (mo_obj)) \ + { \ + mark_object (mo_obj); \ + did_mark = 1; \ + } \ +} while (0) + /* Complete the marking for semi-weak hash tables. */ int @@ -1241,9 +1250,6 @@ finish_marking_weak_hash_tables (void) /* Now, scan over all the pairs. For all pairs that are half-marked, we may need to mark the other half if we're keeping this pair. */ -#define MARK_OBJ(obj) \ -do { if (!marked_p (obj)) mark_object (obj), did_mark = 1; } while (0) - switch (ht->weakness) { case HASH_TABLE_KEY_WEAK: diff --git a/src/emacs.c b/src/emacs.c index b581b51..60258af 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -44,6 +44,15 @@ Boston, MA 02111-1307, USA. */ #include "sysfile.h" #include "systime.h" +#ifdef PDUMP +#include "dump-id.h" +#include "dumper.h" +#endif + +#ifndef SEPCHAR +#define SEPCHAR ':' +#endif + #ifdef QUANTIFY #include #endif @@ -68,7 +77,7 @@ Boston, MA 02111-1307, USA. */ /* For PATH_EXEC */ #include -#ifdef HEAP_IN_DATA +#if defined (HEAP_IN_DATA) && !defined(PDUMP) void report_sheap_usage (int die_if_pure_storage_exceeded); #endif @@ -213,6 +222,10 @@ int inhibit_early_packages; /* Nonzero means don't load package autoloads at startup */ int inhibit_autoloads; +/* Nonzero means don't load the dump file (ignored if not PDUMP) */ + +int nodumpfile; + /* Nonzero means print debug information about path searching */ int debug_paths; @@ -234,6 +247,14 @@ static int fatal_error_code; /* Nonzero if handling a fatal error already */ static int fatal_error_in_progress; +static JMP_BUF run_temacs_catch; + +static int run_temacs_argc; +static char **run_temacs_argv; +static char *run_temacs_args; +static size_t run_temacs_argv_size; +static size_t run_temacs_args_size; + static void shut_down_emacs (int sig, Lisp_Object stuff); /* Handle bus errors, illegal instruction, etc. */ @@ -274,61 +295,6 @@ fatal_error_signal (int sig) } -DOESNT_RETURN -fatal (const char *fmt, ...) -{ - va_list args; - va_start (args, fmt); - - fprintf (stderr, "\nXEmacs: "); - vfprintf (stderr, GETTEXT (fmt), args); - fprintf (stderr, "\n"); - - va_end (args); - fflush (stderr); - exit (1); -} - -/* #### The following two functions should be replaced with - calls to emacs_doprnt_*() functions, with STREAM set to send out - to stdout or stderr. This is the only way to ensure that - I18N3 works properly (many implementations of the *printf() - functions, including the ones included in glibc, do not implement - the %###$ argument-positioning syntax). */ - -/* exactly equivalent to fprintf (stderr, fmt, ...) except that it calls - GETTEXT on the format string. */ - -int -stderr_out (const char *fmt, ...) -{ - int retval; - va_list args; - va_start (args, fmt); - - retval = vfprintf (stderr, GETTEXT (fmt), args); - - va_end (args); - /* fflush (stderr); */ - return retval; -} - -/* exactly equivalent to fprintf (stdout, fmt, ...) except that it calls - GETTEXT on the format string. */ - -int -stdout_out (const char *fmt, ...) -{ - int retval; - va_list args; - va_start (args, fmt); - - retval = vfprintf (stdout, GETTEXT (fmt), args); - - va_end (args); - return retval; -} - #ifdef SIGDANGER /* Handler for SIGDANGER. */ @@ -569,7 +535,7 @@ main_1 (int argc, char **argv, char **envp, int restart) * But hey, it solves all NS related memory problems, so who's * complaining? */ if (initialized && malloc_jumpstart (malloc_cookie) != 0) - fprintf (stderr, "malloc jumpstart failed!\n"); + stderr_out ("malloc jumpstart failed!\n"); #endif /* NeXT */ /* @@ -645,6 +611,17 @@ main_1 (int argc, char **argv, char **envp, int restart) inhibit_window_system = 1; #endif + /* Handle the -sd/--show-dump-id switch, which means show the hex dump_id and quit */ + if (argmatch (argv, argc, "-sd", "--show-dump-id", 9, NULL, &skip_args)) + { +#ifdef PDUMP + printf ("%08x\n", dump_id); +#else + printf ("*ERROR**\n"); +#endif + exit (0); + } + /* Handle the -t switch, which specifies filename to use as terminal */ { char *term; @@ -666,6 +643,12 @@ main_1 (int argc, char **argv, char **envp, int restart) } } + /* Handle the --no-dump-file/-nd switch, which means don't load the dump file (ignored when not using pdump) */ + if (argmatch (argv, argc, "-nd", "--no-dump-file", 7, NULL, &skip_args)) + { + nodumpfile = 1; + } + /* Handle -nw switch */ if (argmatch (argv, argc, "-nw", "--no-windows", 6, NULL, &skip_args)) inhibit_window_system = 1; @@ -837,9 +820,15 @@ main_1 (int argc, char **argv, char **envp, int restart) #ifdef PDUMP if (restart) initialized = 1; - else { - initialized = pdump_load (); - purify_flag = !initialized; + else if (nodumpfile) { + initialized = 0; + purify_flag = 1; + } else { + initialized = pdump_load (argv[0]); + if (initialized) + run_temacs_argc = -1; + else + purify_flag = 1; } #else if (!initialized) @@ -930,9 +919,7 @@ main_1 (int argc, char **argv, char **envp, int restart) syms_of_glyphs (); syms_of_glyphs_eimage (); syms_of_glyphs_widget (); -#if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) || defined (HAVE_TOOLBARS) syms_of_gui (); -#endif syms_of_gutter (); syms_of_indent (); syms_of_intl (); @@ -1084,6 +1071,10 @@ main_1 (int argc, char **argv, char **envp, int restart) syms_of_gpmevent (); #endif +#ifdef HAVE_POSTGRESQL + syms_of_postgresql (); +#endif + /* Now create the subtypes for the types that have them. We do this before the vars_*() because more symbols may get initialized here. */ @@ -1264,7 +1255,7 @@ main_1 (int argc, char **argv, char **envp, int restart) using a global variable that has been initialized earlier on in the same function - Any of the object-creating functions on alloc.c: e.g. + Any of the object-creating functions in alloc.c: e.g. make_pure_*() make_string() @@ -1337,9 +1328,7 @@ main_1 (int argc, char **argv, char **envp, int restart) vars_of_glyphs (); vars_of_glyphs_eimage (); vars_of_glyphs_widget (); -#if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) || defined (HAVE_TOOLBARS) vars_of_gui (); -#endif vars_of_gutter (); vars_of_indent (); vars_of_insdel (); @@ -1479,6 +1468,10 @@ main_1 (int argc, char **argv, char **envp, int restart) vars_of_eldap (); #endif +#ifdef HAVE_POSTGRESQL + vars_of_postgresql(); +#endif + #ifdef HAVE_GPM vars_of_gpmevent (); #endif @@ -1680,6 +1673,7 @@ main_1 (int argc, char **argv, char **envp, int restart) reinit_vars_of_event_stream (); reinit_vars_of_events (); reinit_vars_of_extents (); + reinit_vars_of_fileio (); reinit_vars_of_font_lock (); reinit_vars_of_glyphs (); reinit_vars_of_glyphs_widget (); @@ -1794,7 +1788,7 @@ main_1 (int argc, char **argv, char **envp, int restart) #ifdef HAVE_TTY init_device_tty (); #endif - init_console_stream (); /* Create the first console */ + init_console_stream (restart); /* Create the first console */ /* try to get the actual pathname of the exec file we are running */ if (!restart) @@ -1897,8 +1891,9 @@ struct standard_args static const struct standard_args standard_args[] = { /* Handled by main_1 above: */ - { "-nl", "--no-shared-memory", 100, 0 }, - { "-t", "--terminal", 95, 1 }, + { "-sd", "--show-dump-id", 105, 0 }, + { "-t", "--terminal", 100, 1 }, + { "-nd", "--no-dump-file", 95, 0 }, { "-nw", "--no-windows", 90, 0 }, { "-batch", "--batch", 85, 0 }, { "-debug-paths", "--debug-paths", 82, 0 }, @@ -2093,14 +2088,6 @@ sort_args (int argc, char **argv) xfree (priority); } -static JMP_BUF run_temacs_catch; - -static int run_temacs_argc; -static char **run_temacs_argv; -static char *run_temacs_args; -static size_t run_temacs_argv_size; -static size_t run_temacs_args_size; - DEFUN ("running-temacs-p", Frunning_temacs_p, 0, 0, 0, /* True if running temacs. This means we are in the dumping stage. This is false during normal execution of the `xemacs' program, and @@ -2175,7 +2162,7 @@ Do not call this. It will reinitialize your XEmacs. You'll be sorry. unbind_to (0, Qnil); /* this closes loadup.el */ purify_flag = 0; run_temacs_argc = nargs + 1; -#ifdef HEAP_IN_DATA +#if defined (HEAP_IN_DATA) && !defined(PDUMP) report_sheap_usage (0); #endif LONGJMP (run_temacs_catch, 1); @@ -2281,7 +2268,7 @@ main (int argc, char **argv, char **envp) int rc = malloc_set_state (malloc_state_ptr); if (rc != 0) { - fprintf (stderr, "malloc_set_state failed, rc = %d\n", rc); + stderr_out ("malloc_set_state failed, rc = %d\n", rc); abort (); } #if 0 @@ -2559,7 +2546,7 @@ and announce itself normally when it is run. opurify = purify_flag; purify_flag = 0; -#ifdef HEAP_IN_DATA +#if defined (HEAP_IN_DATA) && !defined(PDUMP) report_sheap_usage (1); #endif @@ -2636,9 +2623,6 @@ and announce itself normally when it is run. #endif /* not CANNOT_DUMP */ -#ifndef SEPCHAR -#define SEPCHAR ':' -#endif /* Split STRING into a list of substrings. The substrings are the parts of original STRING separated by SEPCHAR. */ @@ -3164,7 +3148,8 @@ configure's idea of what the package path will be. *Directory of architecture-independent files that come with XEmacs, intended for XEmacs to use. Use of this variable in new code is almost never correct. See the -function `locate-data-directory' and the variable `data-directory-list'. +functions `locate-data-file' and `locate-data-directory' and the variable +`data-directory-list'. */ ); Vdata_directory = Qnil; diff --git a/src/eval.c b/src/eval.c index 426cda1..4e9cbc4 100644 --- a/src/eval.c +++ b/src/eval.c @@ -267,10 +267,16 @@ Lisp_Object Vdebugger; static Lisp_Object Vcondition_handlers; -#if 0 /* no longer used */ +#define DEFEND_AGAINST_THROW_RECURSION + +#ifdef DEFEND_AGAINST_THROW_RECURSION /* Used for error catching purposes by throw_or_bomb_out */ static int throw_level; -#endif /* unused */ +#endif + +#ifdef ERROR_CHECK_TYPECHECK +void check_error_state_sanity (void); +#endif /************************************************************************/ @@ -1304,6 +1310,9 @@ internal_catch (Lisp_Object tag, c.val = (*func) (arg); if (threw) *threw = 0; catchlist = c.next; +#ifdef ERROR_CHECK_TYPECHECK + check_error_state_sanity (); +#endif return c.val; } @@ -1360,19 +1369,25 @@ unwind_to_catch (struct catchtag *c, Lisp_Object val) unbind_to (catchlist->pdlcount, Qnil); handlerlist = catchlist->handlerlist; catchlist = catchlist->next; +#ifdef ERROR_CHECK_TYPECHECK + check_error_state_sanity (); +#endif } while (! last_time); #else /* Actual XEmacs code */ /* Unwind the specpdl stack */ unbind_to (c->pdlcount, Qnil); catchlist = c->next; +#ifdef ERROR_CHECK_TYPECHECK + check_error_state_sanity (); +#endif #endif gcprolist = c->gcpro; backtrace_list = c->backlist; lisp_eval_depth = c->lisp_eval_depth; -#if 0 /* no longer used */ +#ifdef DEFEND_AGAINST_THROW_RECURSION throw_level = 0; #endif LONGJMP (c->jmp, 1); @@ -1382,7 +1397,7 @@ static DOESNT_RETURN throw_or_bomb_out (Lisp_Object tag, Lisp_Object val, int bomb_out_p, Lisp_Object sig, Lisp_Object data) { -#if 0 +#ifdef DEFEND_AGAINST_THROW_RECURSION /* die if we recurse more than is reasonable */ if (++throw_level > 20) abort(); @@ -1635,6 +1650,9 @@ condition_case_1 (Lisp_Object handlers, have this code here, and it doesn't cost anything, so I'm leaving it.*/ UNGCPRO; catchlist = c.next; +#ifdef ERROR_CHECK_TYPECHECK + check_error_state_sanity (); +#endif Vcondition_handlers = XCDR (c.tag); return unbind_to (speccount, c.val); @@ -1851,6 +1869,8 @@ signal_1 (Lisp_Object sig, Lisp_Object data) { /* who knows how much has been initialized? Safest bet is just to bomb out immediately. */ + /* let's not use stderr_out() here, because that does a bunch of + things that might not be safe yet. */ fprintf (stderr, "Error before initialization is complete!\n"); abort (); } @@ -2036,16 +2056,25 @@ signal_error (Lisp_Object sig, Lisp_Object data) for (;;) Fsignal (sig, data); } - -static Lisp_Object -call_with_suspended_errors_1 (Lisp_Object opaque_arg) +#ifdef ERROR_CHECK_TYPECHECK +void +check_error_state_sanity (void) { - Lisp_Object val; - Lisp_Object *kludgy_args = (Lisp_Object *) get_opaque_ptr (opaque_arg); - PRIMITIVE_FUNCALL (val, get_opaque_ptr (kludgy_args[0]), - kludgy_args + 2, XINT (kludgy_args[1])); - return val; + struct catchtag *c; + int found_error_tag = 0; + + for (c = catchlist; c; c = c->next) + { + if (EQ (c->tag, Qunbound_suspended_errors_tag)) + { + found_error_tag = 1; + break; + } + } + + assert (found_error_tag || NILP (Vcurrent_error_state)); } +#endif static Lisp_Object restore_current_warning_class (Lisp_Object warning_class) @@ -2061,6 +2090,25 @@ restore_current_error_state (Lisp_Object error_state) return Qnil; } +static Lisp_Object +call_with_suspended_errors_1 (Lisp_Object opaque_arg) +{ + Lisp_Object val; + Lisp_Object *kludgy_args = (Lisp_Object *) get_opaque_ptr (opaque_arg); + Lisp_Object no_error = kludgy_args[2]; + int speccount = specpdl_depth (); + + if (!EQ (Vcurrent_error_state, no_error)) + { + record_unwind_protect (restore_current_error_state, + Vcurrent_error_state); + Vcurrent_error_state = no_error; + } + PRIMITIVE_FUNCALL (val, get_opaque_ptr (kludgy_args[0]), + kludgy_args + 3, XINT (kludgy_args[1])); + return unbind_to (speccount, val); +} + /* Many functions would like to do one of three things if an error occurs: @@ -2083,8 +2131,8 @@ call_with_suspended_errors (lisp_fn_t fun, volatile Lisp_Object retval, { va_list vargs; int speccount; - Lisp_Object kludgy_args[22]; - Lisp_Object *args = kludgy_args + 2; + Lisp_Object kludgy_args[23]; + Lisp_Object *args = kludgy_args + 3; int i; Lisp_Object no_error; @@ -2126,7 +2174,7 @@ call_with_suspended_errors (lisp_fn_t fun, volatile Lisp_Object retval, return val; } - speccount = specpdl_depth(); + speccount = specpdl_depth (); if (NILP (class) || NILP (Vcurrent_warning_class)) { /* If we're currently calling for no warnings, then make it so. @@ -2137,12 +2185,6 @@ call_with_suspended_errors (lisp_fn_t fun, volatile Lisp_Object retval, Vcurrent_warning_class); Vcurrent_warning_class = class; } - if (!EQ (Vcurrent_error_state, no_error)) - { - record_unwind_protect (restore_current_error_state, - Vcurrent_error_state); - Vcurrent_error_state = no_error; - } { int threw; @@ -2154,6 +2196,7 @@ call_with_suspended_errors (lisp_fn_t fun, volatile Lisp_Object retval, GCPRO2 (opaque1, opaque2); kludgy_args[0] = opaque2; kludgy_args[1] = make_int (nargs); + kludgy_args[2] = no_error; the_retval = internal_catch (Qunbound_suspended_errors_tag, call_with_suspended_errors_1, opaque1, &threw); @@ -5057,7 +5100,7 @@ reinit_vars_of_eval (void) /* XEmacs change: increase these values. */ max_specpdl_size = 3000; max_lisp_eval_depth = 500; -#if 0 /* no longer used */ +#ifdef DEFEND_AGAINST_THROW_RECURSION throw_level = 0; #endif } diff --git a/src/event-Xt.c b/src/event-Xt.c index cb0115f..f984949 100644 --- a/src/event-Xt.c +++ b/src/event-Xt.c @@ -65,16 +65,6 @@ Boston, MA 02111-1307, USA. */ #include "offix.h" #endif -#ifdef WINDOWSNT -/* Hmm, under unix we want X modifiers, under NT we want X modifiers if - we are running X and Windows modifiers otherwise. - gak. This is a kludge until we support multiple native GUIs! -*/ -#undef MOD_ALT -#undef MOD_CONTROL -#undef MOD_SHIFT -#endif - #include "events-mod.h" static void enqueue_Xt_dispatch_event (Lisp_Object event); @@ -1124,7 +1114,7 @@ x_event_to_emacs_event (XEvent *x_event, Lisp_Event *emacs_event) case ButtonPress: case ButtonRelease: { - unsigned int modifiers = 0; + int modifiers = 0; int shift_p, lock_p; Bool key_event_p = (x_event->type == KeyPress); unsigned int *state = @@ -1151,11 +1141,11 @@ x_event_to_emacs_event (XEvent *x_event, Lisp_Event *emacs_event) x_handle_sticky_modifiers (x_event, d); - if (*state & ControlMask) modifiers |= MOD_CONTROL; - if (*state & xd->MetaMask) modifiers |= MOD_META; - if (*state & xd->SuperMask) modifiers |= MOD_SUPER; - if (*state & xd->HyperMask) modifiers |= MOD_HYPER; - if (*state & xd->AltMask) modifiers |= MOD_ALT; + if (*state & ControlMask) modifiers |= XEMACS_MOD_CONTROL; + if (*state & xd->MetaMask) modifiers |= XEMACS_MOD_META; + if (*state & xd->SuperMask) modifiers |= XEMACS_MOD_SUPER; + if (*state & xd->HyperMask) modifiers |= XEMACS_MOD_HYPER; + if (*state & xd->AltMask) modifiers |= XEMACS_MOD_ALT; /* Ignore the Caps_Lock key if: - any other modifiers are down, so that Caps_Lock doesn't @@ -1168,7 +1158,7 @@ x_event_to_emacs_event (XEvent *x_event, Lisp_Event *emacs_event) lock_p = *state & LockMask; if (shift_p || lock_p) - modifiers |= MOD_SHIFT; + modifiers |= XEMACS_MOD_SHIFT; if (key_event_p) { @@ -1200,7 +1190,7 @@ x_event_to_emacs_event (XEvent *x_event, Lisp_Event *emacs_event) ! (CHAR_OR_CHAR_INTP (keysym) && keysym_obeys_caps_lock_p ((KeySym) XCHAR_OR_CHAR_INT (keysym), d))) - modifiers &= (~MOD_SHIFT); + modifiers &= (~XEMACS_MOD_SHIFT); /* If this key contains two distinct keysyms, that is, "shift" generates a different keysym than the @@ -1212,13 +1202,13 @@ x_event_to_emacs_event (XEvent *x_event, Lisp_Event *emacs_event) in the modifiers slot. Neither the characters "a", "A", "2", nor "@" normally have the shift bit set. However, "F1" normally does. */ - if (modifiers & MOD_SHIFT) + if (modifiers & XEMACS_MOD_SHIFT) { int Mode_switch_p = *state & xd->ModeMask; KeySym bot = XLookupKeysym (ev, Mode_switch_p ? 2 : 0); KeySym top = XLookupKeysym (ev, Mode_switch_p ? 3 : 1); if (top && bot && top != bot) - modifiers &= ~MOD_SHIFT; + modifiers &= ~XEMACS_MOD_SHIFT; } emacs_event->event_type = key_press_event; emacs_event->timestamp = ev->time; @@ -1255,7 +1245,7 @@ x_event_to_emacs_event (XEvent *x_event, Lisp_Event *emacs_event) { XMotionEvent *ev = &x_event->xmotion; struct frame *frame = x_window_to_frame (d, ev->window); - unsigned int modifiers = 0; + int modifiers = 0; XMotionEvent event2; if (! frame) @@ -1284,12 +1274,12 @@ x_event_to_emacs_event (XEvent *x_event, Lisp_Event *emacs_event) emacs_event->timestamp = ev->time; emacs_event->event.motion.x = ev->x; emacs_event->event.motion.y = ev->y; - if (ev->state & ShiftMask) modifiers |= MOD_SHIFT; - if (ev->state & ControlMask) modifiers |= MOD_CONTROL; - if (ev->state & xd->MetaMask) modifiers |= MOD_META; - if (ev->state & xd->SuperMask) modifiers |= MOD_SUPER; - if (ev->state & xd->HyperMask) modifiers |= MOD_HYPER; - if (ev->state & xd->AltMask) modifiers |= MOD_ALT; + if (ev->state & ShiftMask) modifiers |= XEMACS_MOD_SHIFT; + if (ev->state & ControlMask) modifiers |= XEMACS_MOD_CONTROL; + if (ev->state & xd->MetaMask) modifiers |= XEMACS_MOD_META; + if (ev->state & xd->SuperMask) modifiers |= XEMACS_MOD_SUPER; + if (ev->state & xd->HyperMask) modifiers |= XEMACS_MOD_HYPER; + if (ev->state & xd->AltMask) modifiers |= XEMACS_MOD_ALT; /* Currently ignores Shift_Lock but probably shouldn't (but it definitely should ignore Caps_Lock). */ emacs_event->event.motion.modifiers = modifiers; @@ -1305,7 +1295,9 @@ x_event_to_emacs_event (XEvent *x_event, Lisp_Event *emacs_event) #ifdef HAVE_OFFIX_DND if (DndIsDropMessage(x_event)) { - unsigned int state, modifiers = 0, button=0; + unsigned int state; + int modifiers = 0; + unsigned int button=0; struct frame *frame = x_any_window_to_frame (d, ev->window); Extbyte *data; unsigned long size, dtype; @@ -1324,12 +1316,12 @@ x_event_to_emacs_event (XEvent *x_event, Lisp_Event *emacs_event) state=DndDragButtons(x_event); - if (state & ShiftMask) modifiers |= MOD_SHIFT; - if (state & ControlMask) modifiers |= MOD_CONTROL; - if (state & xd->MetaMask) modifiers |= MOD_META; - if (state & xd->SuperMask) modifiers |= MOD_SUPER; - if (state & xd->HyperMask) modifiers |= MOD_HYPER; - if (state & xd->AltMask) modifiers |= MOD_ALT; + if (state & ShiftMask) modifiers |= XEMACS_MOD_SHIFT; + if (state & ControlMask) modifiers |= XEMACS_MOD_CONTROL; + if (state & xd->MetaMask) modifiers |= XEMACS_MOD_META; + if (state & xd->SuperMask) modifiers |= XEMACS_MOD_SUPER; + if (state & xd->HyperMask) modifiers |= XEMACS_MOD_HYPER; + if (state & xd->AltMask) modifiers |= XEMACS_MOD_ALT; if (state & Button5Mask) button = Button5; if (state & Button4Mask) button = Button4; @@ -1463,6 +1455,7 @@ x_event_to_emacs_event (XEvent *x_event, Lisp_Event *emacs_event) case FocusIn: case FocusOut: FROB(xfocus, window); break; case VisibilityNotify: FROB(xvisibility, window); break; + case CreateNotify: FROB(xcreatewindow, window); break; default: w = x_event->xany.window; *x_event_copy = *x_event; @@ -1722,6 +1715,25 @@ handle_client_message (struct frame *f, XEvent *event) } static void +emacs_Xt_force_event_pending (struct frame* f) +{ + XEvent event; + + Display* dpy = DEVICE_X_DISPLAY (XDEVICE (FRAME_DEVICE (f))); + event.xclient.type = ClientMessage; + event.xclient.display = dpy; + event.xclient.message_type = XInternAtom (dpy, "BumpQueue", False); + event.xclient.format = 32; + event.xclient.window = 0; + + /* Send the drop message */ + XSendEvent(dpy, XtWindow (FRAME_X_SHELL_WIDGET (f)), + True, NoEventMask, &event); + /* Force event pending to check the X queue. */ + quit_check_signal_tick_count++; +} + +static void emacs_Xt_handle_magic_event (Lisp_Event *emacs_event) { /* This function can GC */ @@ -1834,6 +1846,9 @@ emacs_Xt_handle_magic_event (Lisp_Event *emacs_event) #endif break; + case CreateNotify: + printf ("window created\n"); + break; default: break; } @@ -2295,7 +2310,7 @@ describe_event_window (Window window, Display *display) char *buf = alloca_array (char, XSTRING_LENGTH (f->name) + 4); sprintf (buf, " \"%s\"", XSTRING_DATA (f->name)); write_string_to_stdio_stream (stderr, 0, (Bufbyte *) buf, 0, - strlen (buf), Qterminal); + strlen (buf), Qterminal, 1); } stderr_out ("\n"); } @@ -3080,6 +3095,7 @@ reinit_vars_of_event_Xt (void) { Xt_event_stream = xnew (struct event_stream); Xt_event_stream->event_pending_p = emacs_Xt_event_pending_p; + Xt_event_stream->force_event_pending = emacs_Xt_force_event_pending; Xt_event_stream->next_event_cb = emacs_Xt_next_event; Xt_event_stream->handle_magic_event_cb = emacs_Xt_handle_magic_event; Xt_event_stream->add_timeout_cb = emacs_Xt_add_timeout; diff --git a/src/event-msw.c b/src/event-msw.c index e18c1e6..681743e 100644 --- a/src/event-msw.c +++ b/src/event-msw.c @@ -1,7 +1,7 @@ /* The mswindows event_stream interface. Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. - Copyright (C) 1996 Ben Wing. + Copyright (C) 1996, 2000 Ben Wing. Copyright (C) 1997 Jonathan Harris. This file is part of XEmacs. @@ -41,6 +41,7 @@ Boston, MA 02111-1307, USA. */ #endif #ifdef HAVE_MENUBARS +# include "menubar.h" # include "menubar-msw.h" #endif @@ -73,6 +74,10 @@ typedef unsigned int SOCKET; #include #include +#if !(defined(__CYGWIN32__) || defined(__MINGW32__)) +# include /* For IShellLink */ +#endif + #if defined (__CYGWIN32__) && (CYGWIN_VERSION_DLL_MAJOR < 20) typedef NMHDR *LPNMHDR; #endif @@ -140,7 +145,7 @@ int mswindows_quit_chars_count = 0; /* These are Lisp integers; see DEFVARS in this file for description. */ int mswindows_dynamic_frame_resize; -int mswindows_meta_activates_menu; +int mswindows_alt_by_itself_activates_menu; int mswindows_num_mouse_buttons; int mswindows_mouse_button_max_skew_x; int mswindows_mouse_button_max_skew_y; @@ -179,11 +184,11 @@ static int mswindows_pending_timers_count; struct ntpipe_slurp_stream_shared_data { HANDLE hev_thread; /* Our thread blocks on this, signaled by caller */ - /* This is a manual-reset object. */ + /* This is a manual-reset object. */ HANDLE hev_caller; /* Caller blocks on this, and we signal it */ - /* This is a manual-reset object. */ + /* This is a manual-reset object. */ HANDLE hev_unsleep; /* Pipe read delay is canceled if this is set */ - /* This is a manual-reset object. */ + /* This is a manual-reset object. */ HANDLE hpipe; /* Pipe read end handle. */ LONG die_p; /* Thread must exit ASAP if non-zero */ BOOL eof_p : 1; /* Set when thread saw EOF */ @@ -222,7 +227,7 @@ slurper_free_shared_data_maybe (struct ntpipe_slurp_stream_shared_data* s) } static struct ntpipe_slurp_stream_shared_data* -slurper_allocate_shared_data() +slurper_allocate_shared_data (void) { int i=0; for (i=0; ievent_type == timeout_event || match->event_type == key_press_event); @@ -1221,7 +1226,7 @@ mswindows_pump_outstanding_events (void) GCPRO1 (result); if (NILP(mswindows_error_caught_in_modal_loop)) - result = mswindows_protect_modal_loop (mswindows_unsafe_pump_events, Qnil); + result = mswindows_protect_modal_loop (mswindows_unsafe_pump_events, Qnil); UNGCPRO; return result; } @@ -1231,7 +1236,7 @@ mswindows_pump_outstanding_events (void) * QUITP, and are interesting in keyboard messages only. */ static void -mswindows_drain_windows_queue () +mswindows_drain_windows_queue (void) { MSG msg; @@ -1243,20 +1248,29 @@ mswindows_drain_windows_queue () /* We have to translate messages that are not sent to the main window. This is so that key presses work ok in things like edit fields. However, we *musn't* translate message for the - main window as this is handled in the wnd proc. */ - if (GetWindowLong (msg.hwnd, GWL_STYLE) & WS_CHILD) + main window as this is handled in the wnd proc. + We also have to avoid generating paint magic events for windows + that aren't XEmacs frames */ + if (GetWindowLong (msg.hwnd, GWL_STYLE) & (WS_CHILD|WS_POPUP)) { TranslateMessage (&msg); } else if (msg.message == WM_PAINT) { + struct mswindows_frame* msframe; + /* hdc will be NULL unless this is a subwindow - in which case we shouldn't have received a paint message for it here. */ assert (msg.wParam == 0); /* Queue a magic event for handling when safe */ - mswindows_enqueue_magic_event (msg.hwnd, WM_PAINT); - + msframe = FRAME_MSWINDOWS_DATA ( + XFRAME (mswindows_find_frame (msg.hwnd))); + if (!msframe->paint_pending) + { + msframe->paint_pending = 1; + mswindows_enqueue_magic_event (msg.hwnd, WM_PAINT); + } /* Don't dispatch. WM_PAINT is always the last message in the queue so it's OK to just return. */ return; @@ -1355,48 +1369,51 @@ mswindows_need_event (int badly_p) { mswindows_drain_windows_queue (); } -#ifdef HAVE_TTY - /* Look for a TTY event */ - for (i = 0; i < MAXDESC-1; i++) + else { - /* To avoid race conditions (among other things, an infinite - loop when called from Fdiscard_input()), we must return - user events ahead of process events. */ - if (FD_ISSET (i, &temp_mask) && FD_ISSET (i, &tty_only_mask)) +#ifdef HAVE_TTY + /* Look for a TTY event */ + for (i = 0; i < MAXDESC-1; i++) { - struct console *c = tty_find_console_from_fd (i); - Lisp_Object emacs_event = Fmake_event (Qnil, Qnil); - Lisp_Event* event = XEVENT (emacs_event); - - assert (c); - if (read_event_from_tty_or_stream_desc (event, c, i)) + /* To avoid race conditions (among other things, an infinite + loop when called from Fdiscard_input()), we must return + user events ahead of process events. */ + if (FD_ISSET (i, &temp_mask) && FD_ISSET (i, &tty_only_mask)) { - mswindows_enqueue_dispatch_event (emacs_event); - return; + struct console *c = tty_find_console_from_fd (i); + Lisp_Object emacs_event = Fmake_event (Qnil, Qnil); + Lisp_Event* event = XEVENT (emacs_event); + + assert (c); + if (read_event_from_tty_or_stream_desc (event, c, i)) + { + mswindows_enqueue_dispatch_event (emacs_event); + return; + } } } - } #endif - /* Look for a process event */ - for (i = 0; i < MAXDESC-1; i++) - { - if (FD_ISSET (i, &temp_mask)) + /* Look for a process event */ + for (i = 0; i < MAXDESC-1; i++) { - if (FD_ISSET (i, &process_only_mask)) + if (FD_ISSET (i, &temp_mask)) { - Lisp_Process *p = - get_process_from_usid (FD_TO_USID(i)); - - mswindows_enqueue_process_event (p); - } - else - { - /* We might get here when a fake event came - through a signal. Return a dummy event, so - that a cycle of the command loop will - occur. */ - drain_signal_event_pipe (); - mswindows_enqueue_magic_event (NULL, XM_BUMPQUEUE); + if (FD_ISSET (i, &process_only_mask)) + { + Lisp_Process *p = + get_process_from_usid (FD_TO_USID(i)); + + mswindows_enqueue_process_event (p); + } + else + { + /* We might get here when a fake event came + through a signal. Return a dummy event, so + that a cycle of the command loop will + occur. */ + drain_signal_event_pipe (); + mswindows_enqueue_magic_event (NULL, XM_BUMPQUEUE); + } } } } @@ -1415,53 +1432,53 @@ mswindows_need_event (int badly_p) } #else /* Now try getting a message or process event */ - active = MsgWaitForMultipleObjects (mswindows_waitable_count, - mswindows_waitable_handles, - FALSE, badly_p ? INFINITE : 0, - QS_ALLINPUT); - - /* This will assert if handle being waited for becomes abandoned. - Not the case currently tho */ - assert ((!badly_p && active == WAIT_TIMEOUT) || - (active >= WAIT_OBJECT_0 && - active <= WAIT_OBJECT_0 + mswindows_waitable_count)); - - if (active == WAIT_TIMEOUT) - { - /* No luck trying - just return what we've already got */ - return; - } - else if (active == WAIT_OBJECT_0 + mswindows_waitable_count) - { - /* Got your message, thanks */ - mswindows_drain_windows_queue (); - } - else - { - int ix = active - WAIT_OBJECT_0; - /* First, try to find which process' output has signaled */ - Lisp_Process *p = - get_process_from_usid (HANDLE_TO_USID (mswindows_waitable_handles[ix])); - if (p != NULL) - { - /* Found a signaled process input handle */ - mswindows_enqueue_process_event (p); - } - else - { - /* None. This means that the process handle itself has signaled. - Remove the handle from the wait vector, and make status_notify - note the exited process */ - mswindows_waitable_handles [ix] = - mswindows_waitable_handles [--mswindows_waitable_count]; - kick_status_notify (); - /* Have to return something: there may be no accompanying - process event */ - mswindows_enqueue_magic_event (NULL, XM_BUMPQUEUE); - } - } + active = MsgWaitForMultipleObjects (mswindows_waitable_count, + mswindows_waitable_handles, + FALSE, badly_p ? INFINITE : 0, + QS_ALLINPUT); + + /* This will assert if handle being waited for becomes abandoned. + Not the case currently tho */ + assert ((!badly_p && active == WAIT_TIMEOUT) || + (active >= WAIT_OBJECT_0 && + active <= WAIT_OBJECT_0 + mswindows_waitable_count)); + + if (active == WAIT_TIMEOUT) + { + /* No luck trying - just return what we've already got */ + return; + } + else if (active == WAIT_OBJECT_0 + mswindows_waitable_count) + { + /* Got your message, thanks */ + mswindows_drain_windows_queue (); + } + else + { + int ix = active - WAIT_OBJECT_0; + /* First, try to find which process' output has signaled */ + Lisp_Process *p = + get_process_from_usid (HANDLE_TO_USID (mswindows_waitable_handles[ix])); + if (p != NULL) + { + /* Found a signaled process input handle */ + mswindows_enqueue_process_event (p); + } + else + { + /* None. This means that the process handle itself has signaled. + Remove the handle from the wait vector, and make status_notify + note the exited process */ + mswindows_waitable_handles [ix] = + mswindows_waitable_handles [--mswindows_waitable_count]; + kick_status_notify (); + /* Have to return something: there may be no accompanying + process event */ + mswindows_enqueue_magic_event (NULL, XM_BUMPQUEUE); + } + } #endif - } /* while */ + } /* while */ } /************************************************************************/ @@ -1614,36 +1631,36 @@ mswindows_dde_callback (UINT uType, UINT uFmt, HCONV hconv, * Helper to do repainting - repaints can happen both from the windows * procedure and from magic events */ -void +static void mswindows_handle_paint (struct frame *frame) - { - HWND hwnd = FRAME_MSWINDOWS_HANDLE (frame); +{ + HWND hwnd = FRAME_MSWINDOWS_HANDLE (frame); - /* According to the docs we need to check GetUpdateRect() before - actually doing a WM_PAINT */ - if (GetUpdateRect (hwnd, NULL, FALSE)) - { - PAINTSTRUCT paintStruct; - int x, y, width, height; - - BeginPaint (hwnd, &paintStruct); - x = paintStruct.rcPaint.left; - y = paintStruct.rcPaint.top; - width = paintStruct.rcPaint.right - paintStruct.rcPaint.left; - height = paintStruct.rcPaint.bottom - paintStruct.rcPaint.top; - /* Normally we want to ignore expose events when child - windows are unmapped, however once we are in the guts of - WM_PAINT we need to make sure that we don't register - unmaps then because they will not actually occur. */ - if (!check_for_ignored_expose (frame, x, y, width, height)) - { - hold_ignored_expose_registration = 1; - mswindows_redraw_exposed_area (frame, x, y, width, height); - hold_ignored_expose_registration = 0; - } - EndPaint (hwnd, &paintStruct); - } - } + /* According to the docs we need to check GetUpdateRect() before + actually doing a WM_PAINT */ + if (GetUpdateRect (hwnd, NULL, FALSE)) + { + PAINTSTRUCT paintStruct; + int x, y, width, height; + + BeginPaint (hwnd, &paintStruct); + x = paintStruct.rcPaint.left; + y = paintStruct.rcPaint.top; + width = paintStruct.rcPaint.right - paintStruct.rcPaint.left; + height = paintStruct.rcPaint.bottom - paintStruct.rcPaint.top; + /* Normally we want to ignore expose events when child + windows are unmapped, however once we are in the guts of + WM_PAINT we need to make sure that we don't register + unmaps then because they will not actually occur. */ + if (!check_for_ignored_expose (frame, x, y, width, height)) + { + hold_ignored_expose_registration = 1; + mswindows_redraw_exposed_area (frame, x, y, width, height); + hold_ignored_expose_registration = 0; + } + EndPaint (hwnd, &paintStruct); + } +} /* * Returns 1 if a key is a real modifier or special key, which @@ -1652,7 +1669,7 @@ mswindows_handle_paint (struct frame *frame) static int key_needs_default_processing_p (UINT vkey) { - if (mswindows_meta_activates_menu && vkey == VK_MENU) + if (mswindows_alt_by_itself_activates_menu && vkey == VK_MENU) return 1; return 0; @@ -1673,742 +1690,821 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) struct frame *frame; struct mswindows_frame* msframe; + assert (!GetWindowLong (hwnd, GWL_USERDATA)); switch (message) - { - case WM_DESTROYCLIPBOARD: - /* We own the clipboard and someone else wants it. Delete our - cached copy of the clipboard contents so we'll ask for it from - Windows again when someone does a paste. */ - handle_selection_clear(QCLIPBOARD); - break; - - case WM_ERASEBKGND: - /* Erase background only during non-dynamic sizing */ - msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd))); - if (msframe->sizing && !mswindows_dynamic_frame_resize) - goto defproc; - return 1; - - case WM_CLOSE: - fobj = mswindows_find_frame (hwnd); - mswindows_enqueue_misc_user_event (fobj, Qeval, list3 (Qdelete_frame, fobj, Qt)); - break; - - case WM_KEYUP: - case WM_SYSKEYUP: - /* See Win95 comment under WM_KEYDOWN */ { - BYTE keymap[256]; - - if (wParam == VK_CONTROL) - { - GetKeyboardState (keymap); - keymap [(lParam & 0x1000000) ? VK_RCONTROL : VK_LCONTROL] &= ~0x80; - SetKeyboardState (keymap); - } - else if (wParam == VK_MENU) - { - GetKeyboardState (keymap); - keymap [(lParam & 0x1000000) ? VK_RMENU : VK_LMENU] &= ~0x80; - SetKeyboardState (keymap); - } - }; - if (key_needs_default_processing_p (wParam)) - goto defproc; - else + case WM_DESTROYCLIPBOARD: + /* We own the clipboard and someone else wants it. Delete our + cached copy of the clipboard contents so we'll ask for it from + Windows again when someone does a paste. */ + handle_selection_clear(QCLIPBOARD); break; - case WM_KEYDOWN: - case WM_SYSKEYDOWN: - /* In some locales the right-hand Alt key is labelled AltGr. This key - * should produce alternative charcaters when combined with another key. - * eg on a German keyboard pressing AltGr+q should produce '@'. - * AltGr generates exactly the same keystrokes as LCtrl+RAlt. But if - * TranslateMessage() is called with *any* combination of Ctrl+Alt down, - * it translates as if AltGr were down. - * We get round this by removing all modifiers from the keymap before - * calling TranslateMessage() unless AltGr is *really* down. */ - { - BYTE keymap[256]; - int has_AltGr = mswindows_current_layout_has_AltGr (); - int mods; - int extendedp = lParam & 0x1000000; - Lisp_Object keysym; - - GetKeyboardState (keymap); - mods = mswindows_modifier_state (keymap, has_AltGr); - - /* Handle non-printables */ - if (!NILP (keysym = mswindows_key_to_emacs_keysym (wParam, mods, - extendedp))) - mswindows_enqueue_keypress_event (hwnd, keysym, mods); - else /* Normal keys & modifiers */ - { - int quit_ch = CONSOLE_QUIT_CHAR (XCONSOLE (mswindows_find_console (hwnd))); - BYTE keymap_orig[256]; - POINT pnt = { LOWORD (GetMessagePos()), HIWORD (GetMessagePos()) }; - MSG msg; - - msg.hwnd = hwnd; - msg.message = message; - msg.wParam = wParam; - msg.lParam = lParam; - msg.time = GetMessageTime(); - msg.pt = pnt; - - /* GetKeyboardState() does not work as documented on Win95. We have - * to loosely track Left and Right modifiers on behalf of the OS, - * without screwing up Windows NT which tracks them properly. */ - if (wParam == VK_CONTROL) - keymap [extendedp ? VK_RCONTROL : VK_LCONTROL] |= 0x80; - else if (wParam == VK_MENU) - keymap [extendedp ? VK_RMENU : VK_LMENU] |= 0x80; - - memcpy (keymap_orig, keymap, 256); - - /* Remove shift modifier from an ascii character */ - mods &= ~MOD_SHIFT; - - /* Clear control and alt modifiers unless AltGr is pressed */ - keymap [VK_RCONTROL] = 0; - keymap [VK_LMENU] = 0; - if (!has_AltGr || !(keymap [VK_LCONTROL] & 0x80) - || !(keymap [VK_RMENU] & 0x80)) - { - keymap [VK_LCONTROL] = 0; - keymap [VK_CONTROL] = 0; - keymap [VK_RMENU] = 0; - keymap [VK_MENU] = 0; - } - SetKeyboardState (keymap); - - /* Maybe generate some WM_[SYS]CHARs in the queue */ - TranslateMessage (&msg); - - while (PeekMessage (&msg, hwnd, WM_CHAR, WM_CHAR, PM_REMOVE) - || PeekMessage (&msg, hwnd, WM_SYSCHAR, WM_SYSCHAR, PM_REMOVE)) - { - int mods1 = mods; - WPARAM ch = msg.wParam; - - /* If a quit char with no modifiers other than control and - shift, then mark it with a fake modifier, which is removed - upon dequeueing the event */ - /* #### This might also not withstand localization, if - quit character is not a latin-1 symbol */ - if (((quit_ch < ' ' && (mods & MOD_CONTROL) && quit_ch + 'a' - 1 == ch) - || (quit_ch >= ' ' && !(mods & MOD_CONTROL) && quit_ch == ch)) - && ((mods & ~(MOD_CONTROL | MOD_SHIFT)) == 0)) - { - mods1 |= FAKE_MOD_QUIT; - ++mswindows_quit_chars_count; - } + case WM_ERASEBKGND: + /* Erase background only during non-dynamic sizing */ + msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd))); + if (msframe->sizing && !mswindows_dynamic_frame_resize) + goto defproc; + return 1; - mswindows_enqueue_keypress_event (hwnd, make_char(ch), mods1); - } /* while */ - SetKeyboardState (keymap_orig); - } /* else */ - } - if (key_needs_default_processing_p (wParam)) - goto defproc; - else + case WM_CLOSE: + fobj = mswindows_find_frame (hwnd); + mswindows_enqueue_misc_user_event (fobj, Qeval, list3 (Qdelete_frame, fobj, Qt)); break; - case WM_MBUTTONDOWN: - case WM_MBUTTONUP: - /* Real middle mouse button has nothing to do with emulated one: - if one wants to exercise fingers playing chords on the mouse, - he is allowed to do that! */ - mswindows_enqueue_mouse_button_event (hwnd, message, - MAKEPOINTS (lParam), GetMessageTime()); - break; - - case WM_LBUTTONUP: - msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd))); - msframe->last_click_time = GetMessageTime(); - - KillTimer (hwnd, BUTTON_2_TIMER_ID); - msframe->button2_need_lbutton = 0; - if (msframe->ignore_next_lbutton_up) + case WM_KEYUP: + case WM_SYSKEYUP: + /* See Win95 comment under WM_KEYDOWN */ { - msframe->ignore_next_lbutton_up = 0; - } - else if (msframe->button2_is_down) - { - msframe->button2_is_down = 0; - msframe->ignore_next_rbutton_up = 1; - mswindows_enqueue_mouse_button_event (hwnd, WM_MBUTTONUP, - MAKEPOINTS (lParam), GetMessageTime()); - } - else - { - if (msframe->button2_need_rbutton) + BYTE keymap[256]; + int should_set_keymap = 0; + + if (wParam == VK_CONTROL) { - msframe->button2_need_rbutton = 0; - mswindows_enqueue_mouse_button_event (hwnd, WM_LBUTTONDOWN, - MAKEPOINTS (lParam), GetMessageTime()); + GetKeyboardState (keymap); + keymap [(lParam & 0x1000000) ? VK_RCONTROL : VK_LCONTROL] &= ~0x80; + should_set_keymap = 1; } - mswindows_enqueue_mouse_button_event (hwnd, WM_LBUTTONUP, - MAKEPOINTS (lParam), GetMessageTime()); - } - break; - - case WM_RBUTTONUP: - msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd))); - msframe->last_click_time = GetMessageTime(); - - KillTimer (hwnd, BUTTON_2_TIMER_ID); - msframe->button2_need_rbutton = 0; - if (msframe->ignore_next_rbutton_up) - { - msframe->ignore_next_rbutton_up = 0; - } - else if (msframe->button2_is_down) - { - msframe->button2_is_down = 0; - msframe->ignore_next_lbutton_up = 1; - mswindows_enqueue_mouse_button_event (hwnd, WM_MBUTTONUP, - MAKEPOINTS (lParam), GetMessageTime()); - } - else - { - if (msframe->button2_need_lbutton) + else if (wParam == VK_MENU) { - msframe->button2_need_lbutton = 0; - mswindows_enqueue_mouse_button_event (hwnd, WM_RBUTTONDOWN, - MAKEPOINTS (lParam), GetMessageTime()); + GetKeyboardState (keymap); + keymap [(lParam & 0x1000000) ? VK_RMENU : VK_LMENU] &= ~0x80; + should_set_keymap = 1; } - mswindows_enqueue_mouse_button_event (hwnd, WM_RBUTTONUP, - MAKEPOINTS (lParam), GetMessageTime()); - } - break; - case WM_LBUTTONDOWN: - msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd))); + if (should_set_keymap + && (message != WM_SYSKEYUP + || NILP (Vmenu_accelerator_enabled))) + SetKeyboardState (keymap); - if (msframe->button2_need_lbutton) - { - KillTimer (hwnd, BUTTON_2_TIMER_ID); - msframe->button2_need_lbutton = 0; - msframe->button2_need_rbutton = 0; - if (mswindows_button2_near_enough (msframe->last_click_point, MAKEPOINTS (lParam))) - { - mswindows_enqueue_mouse_button_event (hwnd, WM_MBUTTONDOWN, - MAKEPOINTS (lParam), GetMessageTime()); - msframe->button2_is_down = 1; - } - else - { - mswindows_enqueue_mouse_button_event (hwnd, WM_RBUTTONDOWN, - msframe->last_click_point, msframe->last_click_time); - mswindows_enqueue_mouse_button_event (hwnd, WM_LBUTTONDOWN, - MAKEPOINTS (lParam), GetMessageTime()); - } } - else - { - mswindows_set_chord_timer (hwnd); - msframe->button2_need_rbutton = 1; - msframe->last_click_point = MAKEPOINTS (lParam); - } - msframe->last_click_time = GetMessageTime(); - break; - - case WM_RBUTTONDOWN: - msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd))); + if (key_needs_default_processing_p (wParam)) + goto defproc; + else + break; - if (msframe->button2_need_rbutton) + case WM_KEYDOWN: + case WM_SYSKEYDOWN: + /* In some locales the right-hand Alt key is labelled AltGr. This key + * should produce alternative charcaters when combined with another key. + * eg on a German keyboard pressing AltGr+q should produce '@'. + * AltGr generates exactly the same keystrokes as LCtrl+RAlt. But if + * TranslateMessage() is called with *any* combination of Ctrl+Alt down, + * it translates as if AltGr were down. + * We get round this by removing all modifiers from the keymap before + * calling TranslateMessage() unless AltGr is *really* down. */ { - KillTimer (hwnd, BUTTON_2_TIMER_ID); - msframe->button2_need_lbutton = 0; - msframe->button2_need_rbutton = 0; - if (mswindows_button2_near_enough (msframe->last_click_point, MAKEPOINTS (lParam))) + BYTE keymap[256]; + int has_AltGr = mswindows_current_layout_has_AltGr (); + int mods; + int extendedp = lParam & 0x1000000; + Lisp_Object keysym; + + frame = XFRAME (mswindows_find_frame (hwnd)); + GetKeyboardState (keymap); + mods = mswindows_modifier_state (keymap, has_AltGr); + + /* Handle non-printables */ + if (!NILP (keysym = mswindows_key_to_emacs_keysym (wParam, mods, + extendedp))) + mswindows_enqueue_keypress_event (hwnd, keysym, mods); + else /* Normal keys & modifiers */ { - mswindows_enqueue_mouse_button_event (hwnd, WM_MBUTTONDOWN, - MAKEPOINTS (lParam), GetMessageTime()); - msframe->button2_is_down = 1; - } - else - { - mswindows_enqueue_mouse_button_event (hwnd, WM_LBUTTONDOWN, - msframe->last_click_point, msframe->last_click_time); - mswindows_enqueue_mouse_button_event (hwnd, WM_RBUTTONDOWN, - MAKEPOINTS (lParam), GetMessageTime()); - } - } - else - { - mswindows_set_chord_timer (hwnd); - msframe->button2_need_lbutton = 1; - msframe->last_click_point = MAKEPOINTS (lParam); + Emchar quit_ch = CONSOLE_QUIT_CHAR (XCONSOLE (mswindows_find_console (hwnd))); + BYTE keymap_orig[256]; + POINT pnt = { LOWORD (GetMessagePos()), HIWORD (GetMessagePos()) }; + MSG msg, tranmsg; + int potential_accelerator = 0; + int got_accelerator = 0; + + msg.hwnd = hwnd; + msg.message = message; + msg.wParam = wParam; + msg.lParam = lParam; + msg.time = GetMessageTime(); + msg.pt = pnt; + + /* GetKeyboardState() does not work as documented on Win95. We have + * to loosely track Left and Right modifiers on behalf of the OS, + * without screwing up Windows NT which tracks them properly. */ + if (wParam == VK_CONTROL) + keymap [extendedp ? VK_RCONTROL : VK_LCONTROL] |= 0x80; + else if (wParam == VK_MENU) + keymap [extendedp ? VK_RMENU : VK_LMENU] |= 0x80; + + memcpy (keymap_orig, keymap, 256); + + if (!NILP (Vmenu_accelerator_enabled) && + !(mods & XEMACS_MOD_SHIFT) && message == WM_SYSKEYDOWN) + potential_accelerator = 1; + + /* Remove shift modifier from an ascii character */ + mods &= ~XEMACS_MOD_SHIFT; + + /* Clear control and alt modifiers unless AltGr is pressed */ + keymap [VK_RCONTROL] = 0; + keymap [VK_LMENU] = 0; + if (!has_AltGr || !(keymap [VK_LCONTROL] & 0x80) + || !(keymap [VK_RMENU] & 0x80)) + { + keymap [VK_LCONTROL] = 0; + keymap [VK_CONTROL] = 0; + keymap [VK_RMENU] = 0; + keymap [VK_MENU] = 0; + } + SetKeyboardState (keymap); + + /* Maybe generate some WM_[SYS]CHARs in the queue */ + TranslateMessage (&msg); + + while (PeekMessage (&tranmsg, hwnd, WM_CHAR, WM_CHAR, PM_REMOVE) + || PeekMessage (&tranmsg, hwnd, WM_SYSCHAR, WM_SYSCHAR, PM_REMOVE)) + { + int mods1 = mods; + WPARAM ch = tranmsg.wParam; + + /* If a quit char with no modifiers other than control and + shift, then mark it with a fake modifier, which is removed + upon dequeueing the event */ + /* #### This might also not withstand localization, if + quit character is not a latin-1 symbol */ + if (((quit_ch < ' ' && (mods & XEMACS_MOD_CONTROL) && quit_ch + 'a' - 1 == ch) + || (quit_ch >= ' ' && !(mods & XEMACS_MOD_CONTROL) && quit_ch == ch)) + && ((mods & ~(XEMACS_MOD_CONTROL | XEMACS_MOD_SHIFT)) == 0)) + { + mods1 |= FAKE_MOD_QUIT; + ++mswindows_quit_chars_count; + } + else if (potential_accelerator && !got_accelerator && + msw_char_is_accelerator (frame, ch)) + { + got_accelerator = 1; + break; + } + mswindows_enqueue_keypress_event (hwnd, make_char (ch), mods1); + } /* while */ + SetKeyboardState (keymap_orig); + /* This generates WM_SYSCHAR messages, which are interpreted + by DefWindowProc as the menu selections. */ + if (got_accelerator) + { + TranslateMessage (&msg); + goto defproc; + } + } /* else */ } - msframe->last_click_time = GetMessageTime(); - break; + if (key_needs_default_processing_p (wParam)) + goto defproc; + else + break; - case WM_TIMER: - if (wParam == BUTTON_2_TIMER_ID) - { - msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd))); - KillTimer (hwnd, BUTTON_2_TIMER_ID); + case WM_MBUTTONDOWN: + case WM_MBUTTONUP: + /* Real middle mouse button has nothing to do with emulated one: + if one wants to exercise fingers playing chords on the mouse, + he is allowed to do that! */ + mswindows_enqueue_mouse_button_event (hwnd, message, + MAKEPOINTS (lParam), GetMessageTime()); + break; - if (msframe->button2_need_lbutton) - { - msframe->button2_need_lbutton = 0; - mswindows_enqueue_mouse_button_event (hwnd, WM_RBUTTONDOWN, - msframe->last_click_point, msframe->last_click_time); - } - else if (msframe->button2_need_rbutton) - { - msframe->button2_need_rbutton = 0; - mswindows_enqueue_mouse_button_event (hwnd, WM_LBUTTONDOWN, - msframe->last_click_point, msframe->last_click_time); - } - } - else - assert ("Spurious timer fired" == 0); - break; + case WM_LBUTTONUP: + msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd))); + msframe->last_click_time = GetMessageTime(); - case WM_MOUSEMOVE: - /* Optimization: don't report mouse movement while size is changing */ - msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd))); - if (!msframe->sizing) - { - /* When waiting for the second mouse button to finish - button2 emulation, and have moved too far, just pretend - as if timer has expired. This improves drag-select feedback */ - if ((msframe->button2_need_lbutton || msframe->button2_need_rbutton) - && !mswindows_button2_near_enough (msframe->last_click_point, - MAKEPOINTS (lParam))) + KillTimer (hwnd, BUTTON_2_TIMER_ID); + msframe->button2_need_lbutton = 0; + if (msframe->ignore_next_lbutton_up) { - KillTimer (hwnd, BUTTON_2_TIMER_ID); - SendMessage (hwnd, WM_TIMER, BUTTON_2_TIMER_ID, 0); + msframe->ignore_next_lbutton_up = 0; } + else if (msframe->button2_is_down) + { + msframe->button2_is_down = 0; + msframe->ignore_next_rbutton_up = 1; + mswindows_enqueue_mouse_button_event (hwnd, WM_MBUTTONUP, + MAKEPOINTS (lParam), GetMessageTime()); + } + else + { + if (msframe->button2_need_rbutton) + { + msframe->button2_need_rbutton = 0; + mswindows_enqueue_mouse_button_event (hwnd, WM_LBUTTONDOWN, + MAKEPOINTS (lParam), GetMessageTime()); + } + mswindows_enqueue_mouse_button_event (hwnd, WM_LBUTTONUP, + MAKEPOINTS (lParam), GetMessageTime()); + } + break; - emacs_event = Fmake_event (Qnil, Qnil); - event = XEVENT(emacs_event); - - event->channel = mswindows_find_frame(hwnd); - event->timestamp = GetMessageTime(); - event->event_type = pointer_motion_event; - event->event.motion.x = MAKEPOINTS(lParam).x; - event->event.motion.y = MAKEPOINTS(lParam).y; - event->event.motion.modifiers = mswindows_modifier_state (NULL, 0); - - mswindows_enqueue_dispatch_event (emacs_event); - } - break; + case WM_RBUTTONUP: + msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd))); + msframe->last_click_time = GetMessageTime(); - case WM_CANCELMODE: - ReleaseCapture (); - /* Queue a `cancel-mode-internal' misc user event, so mouse - selection would be canceled if any */ - mswindows_enqueue_misc_user_event (mswindows_find_frame (hwnd), - Qcancel_mode_internal, Qnil); - break; + KillTimer (hwnd, BUTTON_2_TIMER_ID); + msframe->button2_need_rbutton = 0; + if (msframe->ignore_next_rbutton_up) + { + msframe->ignore_next_rbutton_up = 0; + } + else if (msframe->button2_is_down) + { + msframe->button2_is_down = 0; + msframe->ignore_next_lbutton_up = 1; + mswindows_enqueue_mouse_button_event (hwnd, WM_MBUTTONUP, + MAKEPOINTS (lParam), GetMessageTime()); + } + else + { + if (msframe->button2_need_lbutton) + { + msframe->button2_need_lbutton = 0; + mswindows_enqueue_mouse_button_event (hwnd, WM_RBUTTONDOWN, + MAKEPOINTS (lParam), GetMessageTime()); + } + mswindows_enqueue_mouse_button_event (hwnd, WM_RBUTTONUP, + MAKEPOINTS (lParam), GetMessageTime()); + } + break; - case WM_NOTIFY: - { - LPNMHDR nmhdr = (LPNMHDR)lParam; + case WM_LBUTTONDOWN: + msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd))); - if (nmhdr->code == TTN_NEEDTEXT) + if (msframe->button2_need_lbutton) { -#ifdef HAVE_TOOLBARS - LPTOOLTIPTEXT tttext = (LPTOOLTIPTEXT)lParam; - Lisp_Object btext; - - /* find out which toolbar */ - frame = XFRAME (mswindows_find_frame (hwnd)); - btext = mswindows_get_toolbar_button_text ( frame, - nmhdr->idFrom ); + KillTimer (hwnd, BUTTON_2_TIMER_ID); + msframe->button2_need_lbutton = 0; + msframe->button2_need_rbutton = 0; + if (mswindows_button2_near_enough (msframe->last_click_point, MAKEPOINTS (lParam))) + { + mswindows_enqueue_mouse_button_event (hwnd, WM_MBUTTONDOWN, + MAKEPOINTS (lParam), GetMessageTime()); + msframe->button2_is_down = 1; + } + else + { + mswindows_enqueue_mouse_button_event (hwnd, WM_RBUTTONDOWN, + msframe->last_click_point, msframe->last_click_time); + mswindows_enqueue_mouse_button_event (hwnd, WM_LBUTTONDOWN, + MAKEPOINTS (lParam), GetMessageTime()); + } + } + else + { + mswindows_set_chord_timer (hwnd); + msframe->button2_need_rbutton = 1; + msframe->last_click_point = MAKEPOINTS (lParam); + } + msframe->last_click_time = GetMessageTime(); + break; - tttext->lpszText = NULL; - tttext->hinst = NULL; + case WM_RBUTTONDOWN: + msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd))); - if (!NILP(btext)) + if (msframe->button2_need_rbutton) + { + KillTimer (hwnd, BUTTON_2_TIMER_ID); + msframe->button2_need_lbutton = 0; + msframe->button2_need_rbutton = 0; + if (mswindows_button2_near_enough (msframe->last_click_point, MAKEPOINTS (lParam))) { - /* I think this is safe since the text will only go away - when the toolbar does...*/ - TO_EXTERNAL_FORMAT (LISP_STRING, btext, - C_STRING_ALLOCA, tttext->lpszText, - Qnative); + mswindows_enqueue_mouse_button_event (hwnd, WM_MBUTTONDOWN, + MAKEPOINTS (lParam), GetMessageTime()); + msframe->button2_is_down = 1; + } + else + { + mswindows_enqueue_mouse_button_event (hwnd, WM_LBUTTONDOWN, + msframe->last_click_point, msframe->last_click_time); + mswindows_enqueue_mouse_button_event (hwnd, WM_RBUTTONDOWN, + MAKEPOINTS (lParam), GetMessageTime()); } -#endif } - /* handle tree view callbacks */ - else if (nmhdr->code == TVN_SELCHANGED) + else { - NM_TREEVIEW* ptree = (NM_TREEVIEW*)lParam; - frame = XFRAME (mswindows_find_frame (hwnd)); - mswindows_handle_gui_wm_command (frame, 0, ptree->itemNew.lParam); + mswindows_set_chord_timer (hwnd); + msframe->button2_need_lbutton = 1; + msframe->last_click_point = MAKEPOINTS (lParam); } - /* handle tab control callbacks */ - else if (nmhdr->code == TCN_SELCHANGE) - { - TC_ITEM item; - int idx = SendMessage (nmhdr->hwndFrom, TCM_GETCURSEL, 0, 0); - frame = XFRAME (mswindows_find_frame (hwnd)); + msframe->last_click_time = GetMessageTime(); + break; - item.mask = TCIF_PARAM; - SendMessage (nmhdr->hwndFrom, TCM_GETITEM, (WPARAM)idx, - (LPARAM)&item); + case WM_TIMER: + if (wParam == BUTTON_2_TIMER_ID) + { + msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd))); + KillTimer (hwnd, BUTTON_2_TIMER_ID); - mswindows_handle_gui_wm_command (frame, 0, item.lParam); + if (msframe->button2_need_lbutton) + { + msframe->button2_need_lbutton = 0; + mswindows_enqueue_mouse_button_event (hwnd, WM_RBUTTONDOWN, + msframe->last_click_point, msframe->last_click_time); + } + else if (msframe->button2_need_rbutton) + { + msframe->button2_need_rbutton = 0; + mswindows_enqueue_mouse_button_event (hwnd, WM_LBUTTONDOWN, + msframe->last_click_point, msframe->last_click_time); + } } - } - break; - - case WM_PAINT: - /* hdc will be NULL unless this is a subwindow - in which case we - shouldn't have received a paint message for it here. */ - assert (wParam == 0); - - /* Can't queue a magic event because windows goes modal and sends paint - messages directly to the windows procedure when doing solid drags - and the message queue doesn't get processed. */ - mswindows_handle_paint (XFRAME (mswindows_find_frame (hwnd))); - break; - - case WM_SIZE: - /* We only care about this message if our size has really changed */ - if (wParam==SIZE_RESTORED || wParam==SIZE_MAXIMIZED || wParam==SIZE_MINIMIZED) - { - RECT rect; - int columns, rows; + else + assert ("Spurious timer fired" == 0); + break; - fobj = mswindows_find_frame (hwnd); - frame = XFRAME (fobj); - msframe = FRAME_MSWINDOWS_DATA (frame); + case WM_MOUSEMOVE: + /* Optimization: don't report mouse movement while size is changing */ + msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd))); + if (!msframe->sizing) + { + /* When waiting for the second mouse button to finish + button2 emulation, and have moved too far, just pretend + as if timer has expired. This improves drag-select feedback */ + if ((msframe->button2_need_lbutton || msframe->button2_need_rbutton) + && !mswindows_button2_near_enough (msframe->last_click_point, + MAKEPOINTS (lParam))) + { + KillTimer (hwnd, BUTTON_2_TIMER_ID); + SendMessage (hwnd, WM_TIMER, BUTTON_2_TIMER_ID, 0); + } - /* We cannot handle frame map and unmap hooks right in - this routine, because these may throw. We queue - magic events to run these hooks instead - kkm */ + emacs_event = Fmake_event (Qnil, Qnil); + event = XEVENT(emacs_event); - if (wParam==SIZE_MINIMIZED) - { - /* Iconified */ - FRAME_VISIBLE_P (frame) = 0; - mswindows_enqueue_magic_event (hwnd, XM_UNMAPFRAME); + event->channel = mswindows_find_frame(hwnd); + event->timestamp = GetMessageTime(); + event->event_type = pointer_motion_event; + event->event.motion.x = MAKEPOINTS(lParam).x; + event->event.motion.y = MAKEPOINTS(lParam).y; + event->event.motion.modifiers = mswindows_modifier_state (NULL, 0); + + mswindows_enqueue_dispatch_event (emacs_event); } - else + break; + + case WM_CANCELMODE: + ReleaseCapture (); + /* Queue a `cancel-mode-internal' misc user event, so mouse + selection would be canceled if any */ + mswindows_enqueue_misc_user_event (mswindows_find_frame (hwnd), + Qcancel_mode_internal, Qnil); + break; + + case WM_NOTIFY: + { + LPNMHDR nmhdr = (LPNMHDR)lParam; + + if (nmhdr->code == TTN_NEEDTEXT) + { +#ifdef HAVE_TOOLBARS + LPTOOLTIPTEXT tttext = (LPTOOLTIPTEXT)lParam; + Lisp_Object btext; + + /* find out which toolbar */ + frame = XFRAME (mswindows_find_frame (hwnd)); + btext = mswindows_get_toolbar_button_text ( frame, + nmhdr->idFrom ); + + tttext->lpszText = NULL; + tttext->hinst = NULL; + + if (!NILP(btext)) + { + /* I think this is safe since the text will only go away + when the toolbar does...*/ + TO_EXTERNAL_FORMAT (LISP_STRING, btext, + C_STRING_ALLOCA, tttext->lpszText, + Qnative); + } +#endif + } + /* handle tree view callbacks */ + else if (nmhdr->code == TVN_SELCHANGED) + { + NM_TREEVIEW* ptree = (NM_TREEVIEW*)lParam; + frame = XFRAME (mswindows_find_frame (hwnd)); + mswindows_handle_gui_wm_command (frame, 0, ptree->itemNew.lParam); + } + /* handle tab control callbacks */ + else if (nmhdr->code == TCN_SELCHANGE) + { + TC_ITEM item; + int idx = SendMessage (nmhdr->hwndFrom, TCM_GETCURSEL, 0, 0); + frame = XFRAME (mswindows_find_frame (hwnd)); + + item.mask = TCIF_PARAM; + SendMessage (nmhdr->hwndFrom, TCM_GETITEM, (WPARAM)idx, + (LPARAM)&item); + + mswindows_handle_gui_wm_command (frame, 0, item.lParam); + } + } + break; + + case WM_PAINT: + /* hdc will be NULL unless this is a subwindow - in which case we + shouldn't have received a paint message for it here. */ + assert (wParam == 0); + + /* Can't queue a magic event because windows goes modal and sends paint + messages directly to the windows procedure when doing solid drags + and the message queue doesn't get processed. */ + mswindows_handle_paint (XFRAME (mswindows_find_frame (hwnd))); + break; + + case WM_SIZE: + /* We only care about this message if our size has really changed */ + if (wParam==SIZE_RESTORED || wParam==SIZE_MAXIMIZED || wParam==SIZE_MINIMIZED) { - GetClientRect(hwnd, &rect); - FRAME_PIXWIDTH(frame) = rect.right; - FRAME_PIXHEIGHT(frame) = rect.bottom; + RECT rect; + int columns, rows; - pixel_to_real_char_size (frame, rect.right, rect.bottom, - &FRAME_MSWINDOWS_CHARWIDTH (frame), - &FRAME_MSWINDOWS_CHARHEIGHT (frame)); + fobj = mswindows_find_frame (hwnd); + frame = XFRAME (fobj); + msframe = FRAME_MSWINDOWS_DATA (frame); - pixel_to_char_size (frame, rect.right, rect.bottom, &columns, &rows); - change_frame_size (frame, rows, columns, 1); + /* We cannot handle frame map and unmap hooks right in + this routine, because these may throw. We queue + magic events to run these hooks instead - kkm */ - /* If we are inside frame creation, we have to apply geometric - properties now. */ - if (FRAME_MSWINDOWS_TARGET_RECT (frame)) + if (wParam==SIZE_MINIMIZED) { - /* Yes, we have to size again */ - mswindows_size_frame_internal ( frame, - FRAME_MSWINDOWS_TARGET_RECT - (frame)); - /* Reset so we do not get here again. The SetWindowPos call in - * mswindows_size_frame_internal can cause recursion here. */ - if (FRAME_MSWINDOWS_TARGET_RECT (frame)) - { - xfree (FRAME_MSWINDOWS_TARGET_RECT (frame)); - FRAME_MSWINDOWS_TARGET_RECT (frame) = 0; - } + /* Iconified */ + FRAME_VISIBLE_P (frame) = 0; + mswindows_enqueue_magic_event (hwnd, XM_UNMAPFRAME); } else { - if (!msframe->sizing && !FRAME_VISIBLE_P (frame)) - mswindows_enqueue_magic_event (hwnd, XM_MAPFRAME); - FRAME_VISIBLE_P (frame) = 1; + GetClientRect(hwnd, &rect); + FRAME_PIXWIDTH(frame) = rect.right; + FRAME_PIXHEIGHT(frame) = rect.bottom; + + pixel_to_real_char_size (frame, rect.right, rect.bottom, + &FRAME_MSWINDOWS_CHARWIDTH (frame), + &FRAME_MSWINDOWS_CHARHEIGHT (frame)); + + pixel_to_char_size (frame, rect.right, rect.bottom, &columns, &rows); + change_frame_size (frame, rows, columns, 1); - if (!msframe->sizing || mswindows_dynamic_frame_resize) - redisplay (); + /* If we are inside frame creation, we have to apply geometric + properties now. */ + if (FRAME_MSWINDOWS_TARGET_RECT (frame)) + { + /* Yes, we have to size again */ + mswindows_size_frame_internal ( frame, + FRAME_MSWINDOWS_TARGET_RECT + (frame)); + /* Reset so we do not get here again. The SetWindowPos call in + * mswindows_size_frame_internal can cause recursion here. */ + if (FRAME_MSWINDOWS_TARGET_RECT (frame)) + { + xfree (FRAME_MSWINDOWS_TARGET_RECT (frame)); + FRAME_MSWINDOWS_TARGET_RECT (frame) = 0; + } + } + else + { + if (!msframe->sizing && !FRAME_VISIBLE_P (frame)) + mswindows_enqueue_magic_event (hwnd, XM_MAPFRAME); + FRAME_VISIBLE_P (frame) = 1; + + if (!msframe->sizing || mswindows_dynamic_frame_resize) + redisplay (); + } } } - } - break; + break; + + case WM_DISPLAYCHANGE: + { + struct device *d; - /* Misc magic events which only require that the frame be identified */ - case WM_SETFOCUS: - case WM_KILLFOCUS: - mswindows_enqueue_magic_event (hwnd, message); - break; + fobj = mswindows_find_frame (hwnd); + frame = XFRAME (fobj); + d = XDEVICE (FRAME_DEVICE (frame)); - case WM_WINDOWPOSCHANGING: - { - WINDOWPOS *wp = (LPWINDOWPOS) lParam; - WINDOWPLACEMENT wpl = { sizeof(WINDOWPLACEMENT) }; - GetWindowPlacement(hwnd, &wpl); - - /* Only interested if size is changing and we're not being iconified */ - if (wpl.showCmd != SW_SHOWMINIMIZED - && wpl.showCmd != SW_SHOWMAXIMIZED - && !(wp->flags & SWP_NOSIZE)) + DEVICE_MSWINDOWS_HORZRES(d) = LOWORD (lParam); + DEVICE_MSWINDOWS_VERTRES(d) = HIWORD (lParam); + DEVICE_MSWINDOWS_BITSPIXEL(d) = wParam; + break; + } + + /* Misc magic events which only require that the frame be identified */ + case WM_SETFOCUS: + case WM_KILLFOCUS: + mswindows_enqueue_magic_event (hwnd, message); + break; + + case WM_WINDOWPOSCHANGING: { - RECT ncsize = { 0, 0, 0, 0 }; - int pixwidth, pixheight; - AdjustWindowRectEx (&ncsize, GetWindowLong (hwnd, GWL_STYLE), - GetMenu(hwnd) != NULL, - GetWindowLong (hwnd, GWL_EXSTYLE)); - - round_size_to_real_char (XFRAME (mswindows_find_frame (hwnd)), - wp->cx - (ncsize.right - ncsize.left), - wp->cy - (ncsize.bottom - ncsize.top), - &pixwidth, &pixheight); - - /* Convert client sizes to window sizes */ - pixwidth += (ncsize.right - ncsize.left); - pixheight += (ncsize.bottom - ncsize.top); - - if (wpl.showCmd != SW_SHOWMAXIMIZED) + WINDOWPOS *wp = (LPWINDOWPOS) lParam; + WINDOWPLACEMENT wpl = { sizeof(WINDOWPLACEMENT) }; + GetWindowPlacement(hwnd, &wpl); + + /* Only interested if size is changing and we're not being iconified */ + if (wpl.showCmd != SW_SHOWMINIMIZED + && wpl.showCmd != SW_SHOWMAXIMIZED + && !(wp->flags & SWP_NOSIZE)) { - /* Adjust so that the bottom or right doesn't move if it's - * the top or left that's being changed */ - RECT rect; - GetWindowRect (hwnd, &rect); - - if (rect.left != wp->x) - wp->x += wp->cx - pixwidth; - if (rect.top != wp->y) - wp->y += wp->cy - pixheight; + RECT ncsize = { 0, 0, 0, 0 }; + int pixwidth, pixheight; + AdjustWindowRectEx (&ncsize, GetWindowLong (hwnd, GWL_STYLE), + GetMenu(hwnd) != NULL, + GetWindowLong (hwnd, GWL_EXSTYLE)); + + round_size_to_real_char (XFRAME (mswindows_find_frame (hwnd)), + wp->cx - (ncsize.right - ncsize.left), + wp->cy - (ncsize.bottom - ncsize.top), + &pixwidth, &pixheight); + + /* Convert client sizes to window sizes */ + pixwidth += (ncsize.right - ncsize.left); + pixheight += (ncsize.bottom - ncsize.top); + + if (wpl.showCmd != SW_SHOWMAXIMIZED) + { + /* Adjust so that the bottom or right doesn't move if it's + * the top or left that's being changed */ + RECT rect; + GetWindowRect (hwnd, &rect); + + if (rect.left != wp->x) + wp->x += wp->cx - pixwidth; + if (rect.top != wp->y) + wp->y += wp->cy - pixheight; + } + + wp->cx = pixwidth; + wp->cy = pixheight; } - - wp->cx = pixwidth; - wp->cy = pixheight; + /* DefWindowProc sends useful WM_GETMINMAXINFO message, and adjusts + window position if the user tries to track window too small */ } - /* DefWindowProc sends useful WM_GETMINMAXINFO message, and adjusts - window position if the user tries to track window too small */ - } - goto defproc; + goto defproc; - case WM_ENTERSIZEMOVE: - msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd))); - msframe->sizing = 1; - return 0; + case WM_ENTERSIZEMOVE: + msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd))); + msframe->sizing = 1; + return 0; - case WM_EXITSIZEMOVE: - msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd))); - msframe->sizing = 0; - /* Queue noop event */ - mswindows_enqueue_magic_event (NULL, XM_BUMPQUEUE); - return 0; + case WM_EXITSIZEMOVE: + msframe = FRAME_MSWINDOWS_DATA (XFRAME (mswindows_find_frame (hwnd))); + msframe->sizing = 0; + /* Queue noop event */ + mswindows_enqueue_magic_event (NULL, XM_BUMPQUEUE); + return 0; #ifdef HAVE_SCROLLBARS - case WM_VSCROLL: - case WM_HSCROLL: - { - /* Direction of scroll is determined by scrollbar instance. */ - int code = (int) LOWORD(wParam); - int pos = (short int) HIWORD(wParam); - HWND hwndScrollBar = (HWND) lParam; - struct gcpro gcpro1, gcpro2; - - mswindows_handle_scrollbar_event (hwndScrollBar, code, pos); - GCPRO2 (emacs_event, fobj); - if (UNBOUNDP(mswindows_pump_outstanding_events())) /* Can GC */ - { - /* Error during event pumping - cancel scroll */ - SendMessage (hwndScrollBar, WM_CANCELMODE, 0, 0); - } - UNGCPRO; - break; - } + case WM_VSCROLL: + case WM_HSCROLL: + { + /* Direction of scroll is determined by scrollbar instance. */ + int code = (int) LOWORD(wParam); + int pos = (short int) HIWORD(wParam); + HWND hwndScrollBar = (HWND) lParam; + struct gcpro gcpro1, gcpro2; + + mswindows_handle_scrollbar_event (hwndScrollBar, code, pos); + GCPRO2 (emacs_event, fobj); + if (UNBOUNDP(mswindows_pump_outstanding_events())) /* Can GC */ + { + /* Error during event pumping - cancel scroll */ + SendMessage (hwndScrollBar, WM_CANCELMODE, 0, 0); + } + UNGCPRO; + break; + } - case WM_MOUSEWHEEL: - { - int keys = LOWORD (wParam); /* Modifier key flags */ - int delta = (short) HIWORD (wParam); /* Wheel rotation amount */ - struct gcpro gcpro1, gcpro2; + case WM_MOUSEWHEEL: + { + int keys = LOWORD (wParam); /* Modifier key flags */ + int delta = (short) HIWORD (wParam); /* Wheel rotation amount */ + struct gcpro gcpro1, gcpro2; - if (mswindows_handle_mousewheel_event (mswindows_find_frame (hwnd), keys, delta)) - { - GCPRO2 (emacs_event, fobj); - mswindows_pump_outstanding_events (); /* Can GC */ - UNGCPRO; - } - else - goto defproc; - break; - } + if (mswindows_handle_mousewheel_event (mswindows_find_frame (hwnd), keys, delta)) + { + GCPRO2 (emacs_event, fobj); + mswindows_pump_outstanding_events (); /* Can GC */ + UNGCPRO; + } + else + goto defproc; + break; + } #endif #ifdef HAVE_MENUBARS - case WM_INITMENU: - if (UNBOUNDP (mswindows_handle_wm_initmenu ( - (HMENU) wParam, - XFRAME (mswindows_find_frame (hwnd))))) - SendMessage (hwnd, WM_CANCELMODE, 0, 0); - break; - - case WM_INITMENUPOPUP: - if (!HIWORD(lParam)) - { - if (UNBOUNDP (mswindows_handle_wm_initmenupopup ( - (HMENU) wParam, - XFRAME (mswindows_find_frame (hwnd))))) - SendMessage (hwnd, WM_CANCELMODE, 0, 0); - } - break; + case WM_INITMENU: + if (UNBOUNDP (mswindows_handle_wm_initmenu ( + (HMENU) wParam, + XFRAME (mswindows_find_frame (hwnd))))) + SendMessage (hwnd, WM_CANCELMODE, 0, 0); + break; + + case WM_INITMENUPOPUP: + if (!HIWORD(lParam)) + { + if (UNBOUNDP (mswindows_handle_wm_initmenupopup ( + (HMENU) wParam, + XFRAME (mswindows_find_frame (hwnd))))) + SendMessage (hwnd, WM_CANCELMODE, 0, 0); + } + break; #endif /* HAVE_MENUBARS */ - case WM_COMMAND: - { - WORD id = LOWORD (wParam); - WORD nid = HIWORD (wParam); - HWND cid = (HWND)lParam; - frame = XFRAME (mswindows_find_frame (hwnd)); + case WM_COMMAND: + { + WORD id = LOWORD (wParam); + WORD nid = HIWORD (wParam); + HWND cid = (HWND)lParam; + frame = XFRAME (mswindows_find_frame (hwnd)); #ifdef HAVE_TOOLBARS - if (!NILP (mswindows_handle_toolbar_wm_command (frame, cid, id))) - break; + if (!NILP (mswindows_handle_toolbar_wm_command (frame, cid, id))) + break; #endif - /* widgets in a buffer only eval a callback for suitable events.*/ - switch (nid) - { - case BN_CLICKED: - case EN_CHANGE: - case CBN_EDITCHANGE: - case CBN_SELCHANGE: - if (!NILP (mswindows_handle_gui_wm_command (frame, cid, id))) - return 0; - } - /* menubars always must come last since the hashtables do not - always exist*/ + /* widgets in a buffer only eval a callback for suitable events.*/ + switch (nid) + { + case BN_CLICKED: + case EN_CHANGE: + case CBN_EDITCHANGE: + case CBN_SELCHANGE: + if (!NILP (mswindows_handle_gui_wm_command (frame, cid, id))) + return 0; + } + /* menubars always must come last since the hashtables do not + always exist*/ #ifdef HAVE_MENUBARS - if (!NILP (mswindows_handle_wm_command (frame, id))) - break; + if (!NILP (mswindows_handle_wm_command (frame, id))) + break; #endif - return DefWindowProc (hwnd, message, wParam, lParam); - /* Bite me - a spurious command. This used to not be able to - happen but with the introduction of widgets its now - possible. */ - } - break; + return DefWindowProc (hwnd, message, wParam, lParam); + /* Bite me - a spurious command. This used to not be able to + happen but with the introduction of widgets its now + possible. */ + } + break; - case WM_CTLCOLORBTN: - case WM_CTLCOLORLISTBOX: - case WM_CTLCOLOREDIT: - case WM_CTLCOLORSTATIC: - case WM_CTLCOLORSCROLLBAR: - { - /* if we get an opportunity to paint a widget then do so if - there is an appropriate face */ - HWND crtlwnd = (HWND)lParam; - LONG ii = GetWindowLong (crtlwnd, GWL_USERDATA); - if (ii) - { - Lisp_Object image_instance; - VOID_TO_LISP (image_instance, ii); - if (IMAGE_INSTANCEP (image_instance) - && - IMAGE_INSTANCE_TYPE_P (image_instance, IMAGE_WIDGET)) - { - /* set colors for the buttons */ - HDC hdc = (HDC)wParam; - if (last_widget_brushed != ii) - { - if (widget_brush) - DeleteObject (widget_brush); - widget_brush = CreateSolidBrush - (COLOR_INSTANCE_MSWINDOWS_COLOR - (XCOLOR_INSTANCE - (FACE_BACKGROUND - (XIMAGE_INSTANCE_WIDGET_FACE (image_instance), - XIMAGE_INSTANCE_SUBWINDOW_FRAME (image_instance))))); - } - last_widget_brushed = ii; - SetTextColor - (hdc, - COLOR_INSTANCE_MSWINDOWS_COLOR - (XCOLOR_INSTANCE - (FACE_FOREGROUND - (XIMAGE_INSTANCE_WIDGET_FACE (image_instance), - XIMAGE_INSTANCE_SUBWINDOW_FRAME (image_instance))))); - SetBkMode (hdc, OPAQUE); - SetBkColor - (hdc, - COLOR_INSTANCE_MSWINDOWS_COLOR - (XCOLOR_INSTANCE - (FACE_BACKGROUND - (XIMAGE_INSTANCE_WIDGET_FACE (image_instance), - XIMAGE_INSTANCE_SUBWINDOW_FRAME (image_instance))))); - return (LRESULT)widget_brush; - } - } - } - goto defproc; + case WM_CTLCOLORBTN: + case WM_CTLCOLORLISTBOX: + case WM_CTLCOLOREDIT: + case WM_CTLCOLORSTATIC: + case WM_CTLCOLORSCROLLBAR: + { + /* if we get an opportunity to paint a widget then do so if + there is an appropriate face */ + HWND crtlwnd = (HWND)lParam; + LONG ii = GetWindowLong (crtlwnd, GWL_USERDATA); + if (ii) + { + Lisp_Object image_instance; + VOID_TO_LISP (image_instance, ii); + if (IMAGE_INSTANCEP (image_instance) + && + IMAGE_INSTANCE_TYPE_P (image_instance, IMAGE_WIDGET)) + { + /* set colors for the buttons */ + HDC hdc = (HDC)wParam; + if (last_widget_brushed != ii) + { + if (widget_brush) + DeleteObject (widget_brush); + widget_brush = CreateSolidBrush + (COLOR_INSTANCE_MSWINDOWS_COLOR + (XCOLOR_INSTANCE + (FACE_BACKGROUND + (XIMAGE_INSTANCE_WIDGET_FACE (image_instance), + XIMAGE_INSTANCE_SUBWINDOW_FRAME (image_instance))))); + } + last_widget_brushed = ii; + SetTextColor + (hdc, + COLOR_INSTANCE_MSWINDOWS_COLOR + (XCOLOR_INSTANCE + (FACE_FOREGROUND + (XIMAGE_INSTANCE_WIDGET_FACE (image_instance), + XIMAGE_INSTANCE_SUBWINDOW_FRAME (image_instance))))); + SetBkMode (hdc, OPAQUE); + SetBkColor + (hdc, + COLOR_INSTANCE_MSWINDOWS_COLOR + (XCOLOR_INSTANCE + (FACE_BACKGROUND + (XIMAGE_INSTANCE_WIDGET_FACE (image_instance), + XIMAGE_INSTANCE_SUBWINDOW_FRAME (image_instance))))); + return (LRESULT)widget_brush; + } + } + } + goto defproc; #ifdef HAVE_DRAGNDROP - case WM_DROPFILES: /* implementation ripped-off from event-Xt.c */ - { - UINT filecount, i, len; - POINT point; - char* filename; -#ifdef __CYGWIN32__ - char* fname; -#endif - Lisp_Object l_dndlist = Qnil, l_item = Qnil; - struct gcpro gcpro1, gcpro2, gcpro3; + case WM_DROPFILES: /* implementation ripped-off from event-Xt.c */ + { + UINT filecount, i, len; + POINT point; + char* filename; + char* fname; - emacs_event = Fmake_event (Qnil, Qnil); - event = XEVENT(emacs_event); + Lisp_Object l_dndlist = Qnil, l_item = Qnil; + struct gcpro gcpro1, gcpro2, gcpro3; - GCPRO3 (emacs_event, l_dndlist, l_item); + emacs_event = Fmake_event (Qnil, Qnil); + event = XEVENT(emacs_event); - if (!DragQueryPoint ((HDROP) wParam, &point)) - point.x = point.y = -1; /* outside client area */ + GCPRO3 (emacs_event, l_dndlist, l_item); - event->event_type = misc_user_event; - event->channel = mswindows_find_frame(hwnd); - event->timestamp = GetMessageTime(); - event->event.misc.button = 1; /* #### Should try harder */ - event->event.misc.modifiers = mswindows_modifier_state (NULL, 0); - event->event.misc.x = point.x; - event->event.misc.y = point.y; - event->event.misc.function = Qdragdrop_drop_dispatch; + if (!DragQueryPoint ((HDROP) wParam, &point)) + point.x = point.y = -1; /* outside client area */ + + event->event_type = misc_user_event; + event->channel = mswindows_find_frame(hwnd); + event->timestamp = GetMessageTime(); + event->event.misc.button = 1; /* #### Should try harder */ + event->event.misc.modifiers = mswindows_modifier_state (NULL, 0); + event->event.misc.x = point.x; + event->event.misc.y = point.y; + event->event.misc.function = Qdragdrop_drop_dispatch; + + filecount = DragQueryFile ((HDROP) wParam, 0xffffffff, NULL, 0); + for (i=0; i/ part and + * because they may contain reserved characters. But that's OK - + * they just need to be good enough to keep dragdrop.el happy. */ + fname = (char *)xmalloc (len+1); + DragQueryFile ((HANDLE) wParam, i, fname, len+1); + + /* May be a shell link aka "shortcut" - replace fname if so */ +#if !(defined(__CYGWIN32__) || defined(__MINGW32__)) + /* cygwin doesn't define this COM stuff */ + if (!stricmp (fname + strlen (fname) - 4, ".LNK")) + { + IShellLink* psl; + + if (CoCreateInstance (&CLSID_ShellLink, NULL, + CLSCTX_INPROC_SERVER, &IID_IShellLink, &psl) == S_OK) + { + IPersistFile* ppf; + + if (psl->lpVtbl->QueryInterface (psl, &IID_IPersistFile, + &ppf) == S_OK) + { + WORD wsz[MAX_PATH]; + WIN32_FIND_DATA wfd; + LPSTR resolved = (char *) xmalloc (MAX_PATH+1); + + MultiByteToWideChar (CP_ACP,0, fname, -1, wsz, MAX_PATH); + + if ((ppf->lpVtbl->Load (ppf, wsz, STGM_READ) == S_OK) && + (psl->lpVtbl->GetPath (psl, resolved, MAX_PATH, + &wfd, 0)==S_OK)) + { + xfree (fname); + fname = resolved; + len = strlen (fname); + } + + ppf->lpVtbl->Release (ppf); + } + + psl->lpVtbl->Release (psl); + } + } +#endif - filecount = DragQueryFile ((HDROP) wParam, 0xffffffff, NULL, 0); - for (i=0; i/ part and - * because they may contain reserved characters. But that's OK. */ #ifdef __CYGWIN32__ - fname = (char *)xmalloc (len+1); - DragQueryFile ((HANDLE) wParam, i, fname, len+1); - filename = xmalloc (cygwin32_win32_to_posix_path_list_buf_size (fname) + 5); - strcpy (filename, "file:"); - cygwin32_win32_to_posix_path_list (fname, filename+5); - xfree (fname); + filename = xmalloc (cygwin32_win32_to_posix_path_list_buf_size (fname) + 5); + strcpy (filename, "file:"); + cygwin32_win32_to_posix_path_list (fname, filename+5); #else - filename = (char *)xmalloc (len+6); - strcpy (filename, "file:"); - DragQueryFile ((HDROP) wParam, i, filename+5, len+1); - dostounix_filename (filename+5); + filename = (char *)xmalloc (len+6); + strcat (strcpy (filename, "file:"), fname); + dostounix_filename (filename+5); #endif - l_item = make_string (filename, strlen (filename)); - l_dndlist = Fcons (l_item, l_dndlist); - xfree (filename); - } - DragFinish ((HDROP) wParam); + xfree (fname); + l_item = make_string (filename, strlen (filename)); + l_dndlist = Fcons (l_item, l_dndlist); + xfree (filename); + } + DragFinish ((HDROP) wParam); - event->event.misc.object = Fcons (Qdragdrop_URL, l_dndlist); - mswindows_enqueue_dispatch_event (emacs_event); - UNGCPRO; - } - break; + event->event.misc.object = Fcons (Qdragdrop_URL, l_dndlist); + mswindows_enqueue_dispatch_event (emacs_event); + UNGCPRO; + } + break; #endif - defproc: - default: - return DefWindowProc (hwnd, message, wParam, lParam); - } + defproc: + default: + return DefWindowProc (hwnd, message, wParam, lParam); + } return (0); } @@ -2487,16 +2583,16 @@ int mswindows_modifier_state (BYTE* keymap, int has_AltGr) if (has_AltGr && (keymap [VK_LCONTROL] & 0x80) && (keymap [VK_RMENU] & 0x80)) { - mods |= (keymap [VK_LMENU] & 0x80) ? MOD_META : 0; - mods |= (keymap [VK_RCONTROL] & 0x80) ? MOD_CONTROL : 0; + mods |= (keymap [VK_LMENU] & 0x80) ? XEMACS_MOD_META : 0; + mods |= (keymap [VK_RCONTROL] & 0x80) ? XEMACS_MOD_CONTROL : 0; } else { - mods |= (keymap [VK_MENU] & 0x80) ? MOD_META : 0; - mods |= (keymap [VK_CONTROL] & 0x80) ? MOD_CONTROL : 0; + mods |= (keymap [VK_MENU] & 0x80) ? XEMACS_MOD_META : 0; + mods |= (keymap [VK_CONTROL] & 0x80) ? XEMACS_MOD_CONTROL : 0; } - mods |= (keymap [VK_SHIFT] & 0x80) ? MOD_SHIFT : 0; + mods |= (keymap [VK_SHIFT] & 0x80) ? XEMACS_MOD_SHIFT : 0; return mods; } @@ -2554,8 +2650,8 @@ Lisp_Object mswindows_key_to_emacs_keysym (int mswindows_key, int mods, case VK_DELETE: return KEYSYM ("kp-delete"); case VK_HELP: return KEYSYM ("help"); #if 0 /* FSF Emacs allows these to return configurable syms/mods */ - case VK_LWIN return KEYSYM (""); - case VK_RWIN return KEYSYM (""); + case VK_LWIN return KEYSYM (""); + case VK_RWIN return KEYSYM (""); #endif case VK_APPS: return KEYSYM ("menu"); case VK_NUMPAD0: return KEYSYM ("kp-0"); @@ -2717,7 +2813,11 @@ emacs_mswindows_handle_magic_event (Lisp_Event *emacs_event) break; case WM_PAINT: - mswindows_handle_paint (XFRAME (EVENT_CHANNEL (emacs_event))); + { + struct frame *f = XFRAME (EVENT_CHANNEL (emacs_event)); + mswindows_handle_paint (f); + (FRAME_MSWINDOWS_DATA (f))->paint_pending = 0; + } break; case WM_SETFOCUS: @@ -2778,7 +2878,7 @@ get_process_input_waitable (Lisp_Process *process) ? get_winsock_stream_waitable (XLSTREAM (instr)) : get_ntpipe_input_stream_waitable (XLSTREAM (instr))); #else - return get_ntpipe_input_stream_waitable (XLSTREAM (instr)); + return get_ntpipe_input_stream_waitable (XLSTREAM (instr)); #endif } @@ -2866,7 +2966,7 @@ emacs_mswindows_quit_p (void) emacs_event = mswindows_cancel_dispatch_event (&match_against); assert (!NILP (emacs_event)); - if (XEVENT(emacs_event)->event.key.modifiers & MOD_SHIFT) + if (XEVENT(emacs_event)->event.key.modifiers & XEMACS_MOD_SHIFT) critical_p = 1; Fdeallocate_event(emacs_event); @@ -2950,7 +3050,7 @@ emacs_mswindows_create_stream_pair (void* inhandle, void* outhandle, USID emacs_mswindows_delete_stream_pair (Lisp_Object instream, - Lisp_Object outstream) + Lisp_Object outstream) { /* Oh nothing special here for Win32 at all */ #if defined (HAVE_UNIX_PROCESSES) @@ -3012,6 +3112,7 @@ reinit_vars_of_event_mswindows (void) mswindows_event_stream = xnew (struct event_stream); mswindows_event_stream->event_pending_p = emacs_mswindows_event_pending_p; + mswindows_event_stream->force_event_pending = 0; mswindows_event_stream->next_event_cb = emacs_mswindows_next_event; mswindows_event_stream->handle_magic_event_cb = emacs_mswindows_handle_magic_event; mswindows_event_stream->add_timeout_cb = emacs_mswindows_add_timeout; @@ -3052,13 +3153,16 @@ vars_of_event_mswindows (void) mswindows_error_caught_in_modal_loop = Qnil; staticpro (&mswindows_error_caught_in_modal_loop); - DEFVAR_BOOL ("mswindows-meta-activates-menu", &mswindows_meta_activates_menu /* -*Controls whether pressing and releasing the Meta (Alt) key should -activate the menubar. + DEFVAR_BOOL ("mswindows-alt-by-itself-activates-menu", + &mswindows_alt_by_itself_activates_menu /* +*Controls whether pressing and releasing the Alt key activates the menubar. +This applies only if no intervening key was pressed. See also +`menu-accelerator-enabled', which is probably the behavior you actually want. Default is t. */ ); - DEFVAR_BOOL ("mswindows-dynamic-frame-resize", &mswindows_dynamic_frame_resize /* + DEFVAR_BOOL ("mswindows-dynamic-frame-resize", + &mswindows_dynamic_frame_resize /* *Controls redrawing frame contents during mouse-drag or keyboard resize operation. When non-nil, the frame is redrawn while being resized. When nil, frame is not redrawn, and exposed areas are filled with default @@ -3068,8 +3172,8 @@ settings. Default is t on fast machines, nil on slow. */ ); -/* The description copied verbatim from nt-emacs. (C) Geoff Voelker */ - DEFVAR_INT ("mswindows-mouse-button-tolerance", &mswindows_mouse_button_tolerance /* + DEFVAR_INT ("mswindows-mouse-button-tolerance", + &mswindows_mouse_button_tolerance /* *Analogue of double click interval for faking middle mouse events. The value is the minimum time in milliseconds that must elapse between left/right button down events before they are considered distinct events. @@ -3078,12 +3182,12 @@ button down event is generated instead. If negative or zero, currently set system default is used instead. */ ); -/* The description copied verbatim from nt-emacs. (C) Geoff Voelker */ DEFVAR_INT ("mswindows-num-mouse-buttons", &mswindows_num_mouse_buttons /* Number of physical mouse buttons. */ ); - DEFVAR_INT ("mswindows-mouse-button-max-skew-x", &mswindows_mouse_button_max_skew_x /* + DEFVAR_INT ("mswindows-mouse-button-max-skew-x", + &mswindows_mouse_button_max_skew_x /* *Maximum horizontal distance in pixels between points in which left and right button clicks occurred for them to be translated into single middle button event. Clicks must occur in time not longer than defined @@ -3091,7 +3195,8 @@ by the variable `mswindows-mouse-button-tolerance'. If negative or zero, currently set system default is used instead. */ ); - DEFVAR_INT ("mswindows-mouse-button-max-skew-y", &mswindows_mouse_button_max_skew_y /* + DEFVAR_INT ("mswindows-mouse-button-max-skew-y", + &mswindows_mouse_button_max_skew_y /* *Maximum vertical distance in pixels between points in which left and right button clicks occurred for them to be translated into single middle button event. Clicks must occur in time not longer than defined @@ -3102,7 +3207,7 @@ If negative or zero, currently set system default is used instead. mswindows_mouse_button_max_skew_x = 0; mswindows_mouse_button_max_skew_y = 0; mswindows_mouse_button_tolerance = 0; - mswindows_meta_activates_menu = 1; + mswindows_alt_by_itself_activates_menu = 1; } void diff --git a/src/event-stream.c b/src/event-stream.c index 8871609..4b67a2e 100644 --- a/src/event-stream.c +++ b/src/event-stream.c @@ -23,6 +23,20 @@ Boston, MA 02111-1307, USA. */ /* Synched up with: Not in FSF. */ +/* Authorship: + + Created 1991 by Jamie Zawinski. + A great deal of work over the ages by Ben Wing (Mule-ization for 19.12, + device abstraction for 19.12/19.13, async timers for 19.14, + rewriting of focus code for 19.12, pre-idle hook for 19.12, + redoing of signal and quit handling for 19.9 and 19.12, + misc-user events to clean up menu/scrollbar handling for 19.11, + function-key-map/key-translation-map/keyboard-translate-table for + 19.13/19.14, open-dribble-file for 19.13, much other cleanup). + focus-follows-mouse from Chuck Thompson, 1995. + XIM stuff by Martin Buchholz, c. 1996?. +*/ + /* This file has been Mule-ized. */ /* @@ -38,8 +52,6 @@ Boston, MA 02111-1307, USA. */ /* TODO: This stuff is way too hard to maintain - needs rework. - (global-set-key "\C-p" global-map) causes a crash - need recursion check. - C-x @ h x causes a crash. The command builder should deal only with key and button events. @@ -62,14 +74,6 @@ Boston, MA 02111-1307, USA. */ #include #include "lisp.h" -#ifdef HAVE_X_WINDOWS -#include "console-x.h" /* for menu accelerators ... */ -#include "gui-x.h" -#include "../lwlib/lwlib.h" -#else -#define lw_menu_active 0 -#endif - #include "blocktype.h" #include "buffer.h" #include "commands.h" @@ -81,6 +85,7 @@ Boston, MA 02111-1307, USA. */ #include "keymap.h" #include "lstream.h" #include "macros.h" /* for defining_keyboard_macro */ +#include "menubar.h" /* #### for evil kludges. */ #include "process.h" #include "window.h" @@ -107,21 +112,22 @@ Lisp_Object Qcommand_event_p; Lisp_Object Vpre_command_hook, Vpost_command_hook; Lisp_Object Qpre_command_hook, Qpost_command_hook; +/* See simple.el */ +Lisp_Object Qhandle_pre_motion_command, Qhandle_post_motion_command; + /* Hook run when XEmacs is about to be idle. */ Lisp_Object Qpre_idle_hook, Vpre_idle_hook; /* Control gratuitous keyboard focus throwing. */ int focus_follows_mouse; -#ifdef ILL_CONCEIVED_HOOK +#if 0 /* FSF Emacs crap */ /* Hook run after a command if there's no more input soon. */ Lisp_Object Qpost_command_idle_hook, Vpost_command_idle_hook; /* Delay time in microseconds before running post-command-idle-hook. */ int post_command_idle_delay; -#endif /* ILL_CONCEIVED_HOOK */ -#ifdef DEFERRED_ACTION_CRAP /* List of deferred actions to be performed at a later time. The precise format isn't relevant here; we just check whether it is nil. */ Lisp_Object Vdeferred_action_list; @@ -129,7 +135,7 @@ Lisp_Object Vdeferred_action_list; /* Function to call to handle deferred actions, when there are any. */ Lisp_Object Vdeferred_action_function; Lisp_Object Qdeferred_action_function; -#endif /* DEFERRED_ACTION_CRAP */ +#endif /* FSF Emacs crap */ /* Non-nil disable property on a command means do not execute it; call disabled-command-hook's value instead. */ @@ -164,13 +170,20 @@ Lisp_Object Vunread_command_event; /* obsoleteness support */ static Lisp_Object Qunread_command_events, Qunread_command_event; /* Previous command, represented by a Lisp object. - Does not include prefix commands and arg setting commands */ + Does not include prefix commands and arg setting commands. */ Lisp_Object Vlast_command; +/* Contents of this-command-properties for the last command. */ +Lisp_Object Vlast_command_properties; + /* If a command sets this, the value goes into - previous-command for the next command. */ + last-command for the next command. */ Lisp_Object Vthis_command; +/* If a command sets this, the value goes into + last-command-properties for the next command. */ +Lisp_Object Vthis_command_properties; + /* The value of point when the last command was executed. */ Bufpos last_point_position; @@ -235,30 +248,6 @@ int recent_keys_ring_index; recent-keys. */ int inhibit_input_event_recording; -/* prefix key(s) that must match in order to activate menu. - This is ugly. fix me. - */ -Lisp_Object Vmenu_accelerator_prefix; - -/* list of modifier keys to match accelerator for top level menus */ -Lisp_Object Vmenu_accelerator_modifiers; - -/* whether menu accelerators are enabled */ -Lisp_Object Vmenu_accelerator_enabled; - -/* keymap for auxiliary menu accelerator functions */ -Lisp_Object Vmenu_accelerator_map; - -Lisp_Object Qmenu_force; -Lisp_Object Qmenu_fallback; -Lisp_Object Qmenu_quit; -Lisp_Object Qmenu_up; -Lisp_Object Qmenu_down; -Lisp_Object Qmenu_left; -Lisp_Object Qmenu_right; -Lisp_Object Qmenu_select; -Lisp_Object Qmenu_escape; - Lisp_Object Qself_insert_defer_undo; /* this is in keymap.c */ @@ -288,60 +277,6 @@ external_debugging_print_event (char *event_description, Lisp_Object event) /* The callback routines for the window system or terminal driver */ struct event_stream *event_stream; -/* This structure is what we use to encapsulate the state of a command sequence - being composed; key events are executed by adding themselves to the command - builder; if the command builder is then complete (does not still represent - a prefix key sequence) it executes the corresponding command. - */ -struct command_builder -{ - struct lcrecord_header header; - Lisp_Object console; /* back pointer to the console this command - builder is for */ - /* Qnil, or a Lisp_Event representing the first event read - * after the last command completed. Threaded. */ - /* #### NYI */ - Lisp_Object prefix_events; - /* Qnil, or a Lisp_Event representing event in the current - * keymap-lookup sequence. Subsequent events are threaded via - * the event's next slot */ - Lisp_Object current_events; - /* Last elt of above */ - Lisp_Object most_current_event; - /* Last elt before function map code took over. What this means is: - All prefixes up to (but not including) this event have non-nil - bindings, but the prefix including this event has a nil binding. - Any events in the chain after this one were read solely because - we're part of a possible function key. If we end up with - something that's not part of a possible function key, we have to - unread all of those events. */ - Lisp_Object last_non_munged_event; - /* One set of values for function-key-map, one for key-translation-map */ - struct munging_key_translation - { - /* First event that can begin a possible function key sequence - (to be translated according to function-key-map). Normally - this is the first event in the chain. However, once we've - translated a sequence through function-key-map, this will point - to the first event after the translated sequence: we don't ever - want to translate any events twice through function-key-map, or - things could get really screwed up (e.g. if the user created a - translation loop). If this is nil, then the next-read event is - the first that can begin a function key sequence. */ - Lisp_Object first_mungeable_event; - } munge_me[2]; - - Bufbyte *echo_buf; - Bytecount echo_buf_length; /* size of echo_buf */ - Bytecount echo_buf_index; /* index into echo_buf - * -1 before doing echoing for new cmd */ - /* Self-insert-command is magic in that it doesn't always push an undo- - boundary: up to 20 consecutive self-inserts can happen before an undo- - boundary is pushed. This variable is that counter. - */ - int self_insert_countdown; -}; - static void echo_key_event (struct command_builder *, Lisp_Object event); static void maybe_kbd_translate (Lisp_Object event); @@ -507,6 +442,13 @@ event_stream_event_pending_p (int user) return event_stream && event_stream->event_pending_p (user); } +static void +event_stream_force_event_pending (struct frame* f) +{ + if (event_stream->force_event_pending) + event_stream->force_event_pending (f); +} + static int maybe_read_quit_event (Lisp_Event *event) { @@ -734,7 +676,10 @@ maybe_echo_keys (struct command_builder *command_builder, int no_snooze) if (minibuf_level == 0 && echo_keystrokes > 0.0 - && !lw_menu_active) +#if defined (HAVE_X_WINDOWS) && defined (LWLIB_MENUBARS_LUCID) + && !x_kludge_lw_menu_active () +#endif + ) { if (!no_snooze) { @@ -2123,9 +2068,6 @@ The returned event will be one of the following types: XCOMMAND_BUILDER (con->command_builder); int store_this_key = 0; struct gcpro gcpro1; -#ifdef LWLIB_MENUBARS_LUCID - extern int in_menu_callback; /* defined in menubar-x.c */ -#endif /* LWLIB_MENUBARS_LUCID */ GCPRO1 (event); /* DO NOT do QUIT anywhere within this function or the functions it calls. @@ -2401,6 +2343,56 @@ but it also makes a provision for displaying keystrokes in the echo area. return event; } +DEFUN ("dispatch-non-command-events", Fdispatch_non_command_events, 0, 0, 0, /* +Dispatch any pending "magic" events. + +This function is useful for forcing the redisplay of native +widgets. Normally these are redisplayed through a native window-system +event encoded as magic event, rather than by the redisplay code. This +function does not call redisplay or do any of the other things that +`next-event' does. +*/ + ()) +{ + /* This function can GC */ + Lisp_Object event = Qnil; + struct gcpro gcpro1; + GCPRO1 (event); + event = Fmake_event (Qnil, Qnil); + + /* Make sure that there will be something in the native event queue + so that externally managed things (e.g. widgets) get some CPU + time. */ + event_stream_force_event_pending (selected_frame ()); + + while (event_stream_event_pending_p (0)) + { + QUIT; /* next_event_internal() does not QUIT. */ + + /* We're a generator of the command_event_queue, so we can't be a + consumer as well. Also, we have no reason to consult the + command_event_queue; there are only user and eval-events there, + and we'd just have to put them back anyway. + */ + next_event_internal (event, 0); /* blocks */ + /* See the comment in accept-process-output about Vquit_flag */ + if (XEVENT_TYPE (event) == magic_event || + XEVENT_TYPE (event) == timeout_event || + XEVENT_TYPE (event) == process_event || + XEVENT_TYPE (event) == pointer_motion_event) + execute_internal_event (event); + else + { + enqueue_command_event_1 (event); + break; + } + } + + Fdeallocate_event (event); + UNGCPRO; + return Qnil; +} + static void reset_current_events (struct command_builder *command_builder) { @@ -3096,502 +3088,6 @@ command_builder_find_leaf_1 (struct command_builder *builder) return event_binding (event0, 1); } -#if defined(HAVE_X_WINDOWS) && defined(LWLIB_MENUBARS_LUCID) -static void -menu_move_up (void) -{ - widget_value *current = lw_get_entries (False); - widget_value *entries = lw_get_entries (True); - widget_value *prev = NULL; - - while (entries != current) - { - if (entries->name /*&& entries->enabled*/) prev = entries; - entries = entries->next; - assert (entries); - } - - if (!prev) - /* move to last item */ - { - while (entries->next) - { - if (entries->name /*&& entries->enabled*/) prev = entries; - entries = entries->next; - } - if (prev) - { - if (entries->name /*&& entries->enabled*/) - prev = entries; - } - else - { - /* no selectable items in this menu, pop up to previous level */ - lw_pop_menu (); - return; - } - } - lw_set_item (prev); -} - -static void -menu_move_down (void) -{ - widget_value *current = lw_get_entries (False); - widget_value *new = current; - - while (new->next) - { - new = new->next; - if (new->name /*&& new->enabled*/) break; - } - - if (new==current||!(new->name/*||new->enabled*/)) - { - new = lw_get_entries (True); - while (new!=current) - { - if (new->name /*&& new->enabled*/) break; - new = new->next; - } - if (new==current&&!(new->name /*|| new->enabled*/)) - { - lw_pop_menu (); - return; - } - } - - lw_set_item (new); -} - -static void -menu_move_left (void) -{ - int level = lw_menu_level (); - int l = level; - widget_value *current; - - while (level-- >= 3) - lw_pop_menu (); - - menu_move_up (); - current = lw_get_entries (False); - if (l > 2 && current->contents) - lw_push_menu (current->contents); -} - -static void -menu_move_right (void) -{ - int level = lw_menu_level (); - int l = level; - widget_value *current; - - while (level-- >= 3) - lw_pop_menu (); - - menu_move_down (); - current = lw_get_entries (False); - if (l > 2 && current->contents) - lw_push_menu (current->contents); -} - -static void -menu_select_item (widget_value *val) -{ - if (val == NULL) - val = lw_get_entries (False); - - /* is match a submenu? */ - - if (val->contents) - { - /* enter the submenu */ - - lw_set_item (val); - lw_push_menu (val->contents); - } - else - { - /* Execute the menu entry by calling the menu's `select' - callback function - */ - lw_kill_menus (val); - } -} - -static Lisp_Object -command_builder_operate_menu_accelerator (struct command_builder *builder) -{ - /* this function can GC */ - - struct console *con = XCONSOLE (Vselected_console); - Lisp_Object evee = builder->most_current_event; - Lisp_Object binding; - widget_value *entries; - - extern int lw_menu_accelerate; /* lwlib.c */ - -#if 0 - { - int i; - Lisp_Object t; - char buf[50]; - - t = builder->current_events; - i = 0; - while (!NILP (t)) - { - i++; - sprintf (buf,"OPERATE (%d): ",i); - write_c_string (buf, Qexternal_debugging_output); - print_internal (t, Qexternal_debugging_output, 1); - write_c_string ("\n", Qexternal_debugging_output); - t = XEVENT_NEXT (t); - } - } -#endif /* 0 */ - - /* menu accelerator keys don't go into keyboard macros */ - if (!NILP (con->defining_kbd_macro) && NILP (Vexecuting_macro)) - con->kbd_macro_ptr = con->kbd_macro_end; - - /* don't echo menu accelerator keys */ - /*reset_key_echo (builder, 1);*/ - - if (!lw_menu_accelerate) - { - /* `convert' mouse display to keyboard display - by entering the open submenu - */ - entries = lw_get_entries (False); - if (entries->contents) - { - lw_push_menu (entries->contents); - lw_display_menu (CurrentTime); - } - } - - /* compare event to the current menu accelerators */ - - entries=lw_get_entries (True); - - while (entries) - { - Lisp_Object accel; - VOID_TO_LISP (accel, entries->accel); - if (entries->name && !NILP (accel)) - { - if (event_matches_key_specifier_p (XEVENT (evee), accel)) - { - /* a match! */ - - menu_select_item (entries); - - if (lw_menu_active) lw_display_menu (CurrentTime); - - reset_this_command_keys (Vselected_console, 1); - /*reset_command_builder_event_chain (builder);*/ - return Vmenu_accelerator_map; - } - } - entries = entries->next; - } - - /* try to look up event in menu-accelerator-map */ - - binding = event_binding_in (evee, Vmenu_accelerator_map, 1); - - if (NILP (binding)) - { - /* beep at user for undefined key */ - return Qnil; - } - else - { - if (EQ (binding, Qmenu_quit)) - { - /* turn off menus and set quit flag */ - lw_kill_menus (NULL); - Vquit_flag = Qt; - } - else if (EQ (binding, Qmenu_up)) - { - int level = lw_menu_level (); - if (level > 2) - menu_move_up (); - } - else if (EQ (binding, Qmenu_down)) - { - int level = lw_menu_level (); - if (level > 2) - menu_move_down (); - else - menu_select_item (NULL); - } - else if (EQ (binding, Qmenu_left)) - { - int level = lw_menu_level (); - if (level > 3) - { - lw_pop_menu (); - lw_display_menu (CurrentTime); - } - else - menu_move_left (); - } - else if (EQ (binding, Qmenu_right)) - { - int level = lw_menu_level (); - if (level > 2 && - lw_get_entries (False)->contents) - { - widget_value *current = lw_get_entries (False); - if (current->contents) - menu_select_item (NULL); - } - else - menu_move_right (); - } - else if (EQ (binding, Qmenu_select)) - menu_select_item (NULL); - else if (EQ (binding, Qmenu_escape)) - { - int level = lw_menu_level (); - - if (level > 2) - { - lw_pop_menu (); - lw_display_menu (CurrentTime); - } - else - { - /* turn off menus quietly */ - lw_kill_menus (NULL); - } - } - else if (KEYMAPP (binding)) - { - /* prefix key */ - reset_this_command_keys (Vselected_console, 1); - /*reset_command_builder_event_chain (builder);*/ - return binding; - } - else - { - /* turn off menus and execute binding */ - lw_kill_menus (NULL); - reset_this_command_keys (Vselected_console, 1); - /*reset_command_builder_event_chain (builder);*/ - return binding; - } - } - - if (lw_menu_active) lw_display_menu (CurrentTime); - - reset_this_command_keys (Vselected_console, 1); - /*reset_command_builder_event_chain (builder);*/ - - return Vmenu_accelerator_map; -} - -static Lisp_Object -menu_accelerator_junk_on_error (Lisp_Object errordata, Lisp_Object ignored) -{ - Vmenu_accelerator_prefix = Qnil; - Vmenu_accelerator_modifiers = Qnil; - Vmenu_accelerator_enabled = Qnil; - if (!NILP (errordata)) - { - Lisp_Object args[2]; - - args[0] = build_string ("Error in menu accelerators (setting to nil)"); - /* #### This should call - (with-output-to-string (display-error errordata)) - but that stuff is all in Lisp currently. */ - args[1] = errordata; - warn_when_safe_lispobj - (Qerror, Qwarning, - emacs_doprnt_string_lisp ((const Bufbyte *) "%s: %s", - Qnil, -1, 2, args)); - } - - return Qnil; -} - -static Lisp_Object -menu_accelerator_safe_compare (Lisp_Object event0) -{ - if (CONSP (Vmenu_accelerator_prefix)) - { - Lisp_Object t; - t=Vmenu_accelerator_prefix; - while (!NILP (t) - && !NILP (event0) - && event_matches_key_specifier_p (XEVENT (event0), Fcar (t))) - { - t = Fcdr (t); - event0 = XEVENT_NEXT (event0); - } - if (!NILP (t)) - return Qnil; - } - else if (NILP (event0)) - return Qnil; - else if (event_matches_key_specifier_p (XEVENT (event0), Vmenu_accelerator_prefix)) - event0 = XEVENT_NEXT (event0); - else - return Qnil; - return event0; -} - -static Lisp_Object -menu_accelerator_safe_mod_compare (Lisp_Object cons) -{ - return (event_matches_key_specifier_p (XEVENT (XCAR (cons)), XCDR (cons)) - ? Qt - : Qnil); -} - -static Lisp_Object -command_builder_find_menu_accelerator (struct command_builder *builder) -{ - /* this function can GC */ - Lisp_Object event0 = builder->current_events; - struct console *con = XCONSOLE (Vselected_console); - struct frame *f = XFRAME (CONSOLE_SELECTED_FRAME (con)); - Widget menubar_widget; - - /* compare entries in event0 against the menu prefix */ - - if ((!CONSOLE_X_P (XCONSOLE (builder->console))) || NILP (event0) || - XEVENT (event0)->event_type != key_press_event) - return Qnil; - - if (!NILP (Vmenu_accelerator_prefix)) - { - event0 = condition_case_1 (Qerror, - menu_accelerator_safe_compare, - event0, - menu_accelerator_junk_on_error, - Qnil); - } - - if (NILP (event0)) - return Qnil; - - menubar_widget = FRAME_X_MENUBAR_WIDGET (f); - if (menubar_widget - && CONSP (Vmenu_accelerator_modifiers)) - { - Lisp_Object fake; - Lisp_Object last = Qnil; - struct gcpro gcpro1; - Lisp_Object matchp; - - widget_value *val; - LWLIB_ID id = XPOPUP_DATA (f->menubar_data)->id; - - val = lw_get_all_values (id); - if (val) - { - val = val->contents; - - fake = Fcopy_sequence (Vmenu_accelerator_modifiers); - last = fake; - - while (!NILP (Fcdr (last))) - last = Fcdr (last); - - Fsetcdr (last, Fcons (Qnil, Qnil)); - last = Fcdr (last); - } - - fake = Fcons (Qnil, fake); - - GCPRO1 (fake); - - while (val) - { - Lisp_Object accel; - VOID_TO_LISP (accel, val->accel); - if (val->name && !NILP (accel)) - { - Fsetcar (last, accel); - Fsetcar (fake, event0); - matchp = condition_case_1 (Qerror, - menu_accelerator_safe_mod_compare, - fake, - menu_accelerator_junk_on_error, - Qnil); - if (!NILP (matchp)) - { - /* we found one! */ - - lw_set_menu (menubar_widget, val); - /* yah - yet another hack. - pretend emacs timestamp is the same as an X timestamp, - which for the moment it is. (read events.h) - */ - lw_map_menu (XEVENT (event0)->timestamp); - - if (val->contents) - lw_push_menu (val->contents); - - lw_display_menu (CurrentTime); - - /* menu accelerator keys don't go into keyboard macros */ - if (!NILP (con->defining_kbd_macro) && NILP (Vexecuting_macro)) - con->kbd_macro_ptr = con->kbd_macro_end; - - /* don't echo menu accelerator keys */ - /*reset_key_echo (builder, 1);*/ - reset_this_command_keys (Vselected_console, 1); - UNGCPRO; - - return Vmenu_accelerator_map; - } - } - - val = val->next; - } - - UNGCPRO; - } - return Qnil; -} - - -DEFUN ("accelerate-menu", Faccelerate_menu, 0, 0, "_", /* -Make the menubar active. Menu items can be selected using menu accelerators -or by actions defined in menu-accelerator-map. -*/ - ()) -{ - struct console *con = XCONSOLE (Vselected_console); - struct frame *f = XFRAME (CONSOLE_SELECTED_FRAME (con)); - LWLIB_ID id; - widget_value *val; - - if (NILP (f->menubar_data)) - error ("Frame has no menubar."); - - id = XPOPUP_DATA (f->menubar_data)->id; - val = lw_get_all_values (id); - val = val->contents; - lw_set_menu (FRAME_X_MENUBAR_WIDGET (f), val); - lw_map_menu (CurrentTime); - - lw_display_menu (CurrentTime); - - /* menu accelerator keys don't go into keyboard macros */ - if (!NILP (con->defining_kbd_macro) && NILP (Vexecuting_macro)) - con->kbd_macro_ptr = con->kbd_macro_end; - - return Qnil; -} -#endif /* HAVE_X_WINDOWS && HAVE_MENUBARS */ - /* See if we can do function-key-map or key-translation-map translation on the current events in the command builder. If so, do this, and return the resulting binding, if any. */ @@ -3713,9 +3209,11 @@ command_builder_find_leaf (struct command_builder *builder, return Qnil; } - /* if we're currently in a menu accelerator, check there for further events */ + /* if we're currently in a menu accelerator, check there for further + events */ + /* #### fuck me! who wrote this crap? think "abstraction", baby. */ #if defined(HAVE_X_WINDOWS) && defined(LWLIB_MENUBARS_LUCID) - if (lw_menu_active) + if (x_kludge_lw_menu_active ()) { return command_builder_operate_menu_accelerator (builder); } @@ -3766,14 +3264,14 @@ command_builder_find_leaf (struct command_builder *builder, Lisp_Object terminal = builder->most_current_event; struct key_data* key = & XEVENT (terminal)->event.key; Emchar c = 0; - if ((key->modifiers & MOD_SHIFT) + if ((key->modifiers & XEMACS_MOD_SHIFT) || (CHAR_OR_CHAR_INTP (key->keysym) && ((c = XCHAR_OR_CHAR_INT (key->keysym)), c >= 'A' && c <= 'Z'))) { Lisp_Event terminal_copy = *XEVENT (terminal); - if (key->modifiers & MOD_SHIFT) - key->modifiers &= (~ MOD_SHIFT); + if (key->modifiers & XEMACS_MOD_SHIFT) + key->modifiers &= (~ XEMACS_MOD_SHIFT); else key->keysym = make_char (c + 'a' - 'A'); @@ -4174,10 +3672,10 @@ lookup_command_event (struct command_builder *command_builder, Fcopy_event (event, recent); e = XEVENT (recent); if (e->event_type == key_press_event) - e->event.key.modifiers |= MOD_META; + e->event.key.modifiers |= XEMACS_MOD_META; else if (e->event_type == button_press_event || e->event_type == button_release_event) - e->event.button.modifiers |= MOD_META; + e->event.button.modifiers |= XEMACS_MOD_META; else abort (); @@ -4208,7 +3706,11 @@ lookup_command_event (struct command_builder *command_builder, if (KEYMAPP (leaf)) { - if (!lw_menu_active) +#if defined (HAVE_X_WINDOWS) && defined (LWLIB_MENUBARS_LUCID) + if (!x_kludge_lw_menu_active ()) +#else + if (1) +#endif { Lisp_Object prompt = Fkeymap_prompt (leaf, Qt); if (STRINGP (prompt)) @@ -4228,19 +3730,20 @@ lookup_command_event (struct command_builder *command_builder, else maybe_echo_keys (command_builder, 0); } - else if (!NILP (Vquit_flag)) { - Lisp_Object quit_event = Fmake_event(Qnil, Qnil); - Lisp_Event *e = XEVENT (quit_event); - /* if quit happened during menu acceleration, pretend we read it */ - struct console *con = XCONSOLE (Fselected_console ()); - int ch = CONSOLE_QUIT_CHAR (con); - - character_to_event (ch, e, con, 1, 1); - e->channel = make_console (con); - - enqueue_command_event (quit_event); - Vquit_flag = Qnil; - } + else if (!NILP (Vquit_flag)) + { + Lisp_Object quit_event = Fmake_event (Qnil, Qnil); + Lisp_Event *e = XEVENT (quit_event); + /* if quit happened during menu acceleration, pretend we read it */ + struct console *con = XCONSOLE (Fselected_console ()); + int ch = CONSOLE_QUIT_CHAR (con); + + character_to_event (ch, e, con, 1, 1); + e->channel = make_console (con); + + enqueue_command_event (quit_event); + Vquit_flag = Qnil; + } } else if (!NILP (leaf)) { @@ -4359,6 +3862,9 @@ execute_command_event (struct command_builder *command_builder, { /* Start a new command next time */ Vlast_command = Vthis_command; + Vlast_command_properties = Vthis_command_properties; + Vthis_command_properties = Qnil; + /* Emacs 18 doesn't unconditionally clear the echoed keystrokes, so we don't either */ reset_this_command_keys (make_console (con), 0); @@ -4379,6 +3885,9 @@ pre_command_hook (void) safe_run_hook_trapping_errors ("Error in `pre-command-hook' (setting hook to nil)", Qpre_command_hook, 1); + + /* This is a kludge, but necessary; see simple.el */ + call0 (Qhandle_pre_motion_command); } /* Run the post command hook. */ @@ -4398,14 +3907,18 @@ post_command_hook (void) Lisp_Object win = Fselected_window (Qnil); -#if 0 /* If the last command deleted the frame, `win' might be nil. It seems safest to do nothing in this case. */ + /* Note: Someone added the following comment and put #if 0's around + this code, not realizing that doing this invites a crash in the + line after. */ /* #### This doesn't really fix the problem, if delete-frame is called by some hook */ if (NILP (win)) return; -#endif + + /* This is a kludge, but necessary; see simple.el */ + call0 (Qhandle_post_motion_command); if (! zmacs_region_stays && (!MINI_WINDOW_P (XWINDOW (win)) @@ -4418,12 +3931,10 @@ post_command_hook (void) ("Error in `post-command-hook' (setting hook to nil)", Qpost_command_hook, 1); -#ifdef DEFERRED_ACTION_CRAP +#if 0 /* FSF Emacs crap */ if (!NILP (Vdeferred_action_list)) call0 (Vdeferred_action_function); -#endif -#ifdef ILL_CONCEIVED_HOOK if (NILP (Vunread_command_events) && NILP (Vexecuting_macro) && !NILP (Vpost_command_idle_hook) @@ -4432,9 +3943,9 @@ post_command_hook (void) safe_run_hook_trapping_errors ("Error in `post-command-idle-hook' (setting hook to nil)", Qpost_command_idle_hook, 1); -#endif +#endif /* FSF Emacs crap */ -#if 0 /* FSFmacs */ +#if 0 /* FSF Emacs */ if (!NILP (current_buffer->mark_active)) { if (!NILP (Vdeactivate_mark) && !NILP (Vtransient_mark_mode)) @@ -4446,7 +3957,7 @@ post_command_hook (void) BUF_MODIFF (current_buffer) != prev_modiff) run_hook (intern ("activate-mark-hook")); } -#endif /* FSFmacs */ +#endif /* FSF Emacs */ /* #### Kludge!!! This is necessary to make sure that things are properly positioned even if post-command-hook moves point. @@ -4935,23 +4446,21 @@ syms_of_event_stream (void) DEFSUBR (Fadd_async_timeout); DEFSUBR (Fdisable_async_timeout); DEFSUBR (Fdispatch_event); + DEFSUBR (Fdispatch_non_command_events); DEFSUBR (Fread_key_sequence); DEFSUBR (Fthis_command_keys); DEFSUBR (Freset_this_command_lengths); DEFSUBR (Fopen_dribble_file); -#if defined(HAVE_X_WINDOWS) && defined(LWLIB_MENUBARS_LUCID) - DEFSUBR (Faccelerate_menu); -#endif defsymbol (&Qpre_command_hook, "pre-command-hook"); defsymbol (&Qpost_command_hook, "post-command-hook"); defsymbol (&Qunread_command_events, "unread-command-events"); defsymbol (&Qunread_command_event, "unread-command-event"); defsymbol (&Qpre_idle_hook, "pre-idle-hook"); -#ifdef ILL_CONCEIVED_HOOK + defsymbol (&Qhandle_pre_motion_command, "handle-pre-motion-command"); + defsymbol (&Qhandle_post_motion_command, "handle-post-motion-command"); +#if 0 /* FSF Emacs crap */ defsymbol (&Qpost_command_idle_hook, "post-command-idle-hook"); -#endif -#ifdef DEFERRED_ACTION_CRAP defsymbol (&Qdeferred_action_function, "deferred-action-function"); #endif defsymbol (&Qretry_undefined_key_binding_unshifted, @@ -4959,17 +4468,6 @@ syms_of_event_stream (void) defsymbol (&Qauto_show_make_point_visible, "auto-show-make-point-visible"); - defsymbol (&Qmenu_force, "menu-force"); - defsymbol (&Qmenu_fallback, "menu-fallback"); - - defsymbol (&Qmenu_quit, "menu-quit"); - defsymbol (&Qmenu_up, "menu-up"); - defsymbol (&Qmenu_down, "menu-down"); - defsymbol (&Qmenu_left, "menu-left"); - defsymbol (&Qmenu_right, "menu-right"); - defsymbol (&Qmenu_select, "menu-select"); - defsymbol (&Qmenu_escape, "menu-escape"); - defsymbol (&Qself_insert_defer_undo, "self-insert-defer-undo"); defsymbol (&Qcancel_mode_internal, "cancel-mode-internal"); } @@ -5063,7 +4561,7 @@ used by the window manager, so it is up to the user to set it. */ ); focus_follows_mouse = 0; -#ifdef ILL_CONCEIVED_HOOK +#if 0 /* FSF Emacs crap */ /* Ill-conceived because it's not run in all sorts of cases where XEmacs is blocking. That's what `pre-idle-hook' is designed to solve. */ @@ -5080,9 +4578,7 @@ Delay time before running `post-command-idle-hook'. This is measured in microseconds. */ ); post_command_idle_delay = 5000; -#endif /* ILL_CONCEIVED_HOOK */ -#ifdef DEFERRED_ACTION_CRAP /* Random FSFmacs crap. There is absolutely nothing to gain, and a great deal to lose, in using this in place of just setting `post-command-hook'. */ @@ -5098,7 +4594,7 @@ This function is called with no arguments after each command whenever `deferred-action-list' is non-nil. */ ); Vdeferred_action_function = Qnil; -#endif /* DEFERRED_ACTION_CRAP */ +#endif /* FSF Emacs crap */ DEFVAR_LISP ("last-command-event", &Vlast_command_event /* Last keyboard or mouse button event that was part of a command. This @@ -5188,6 +4684,23 @@ will be in `last-command' during the following command. */ ); Vthis_command = Qnil; + DEFVAR_LISP ("last-command-properties", &Vlast_command_properties /* +Value of `this-command-properties' for the last command. +Used by commands to help synchronize consecutive commands, in preference +to looking at `last-command' directly. +*/ ); + Vlast_command_properties = Qnil; + + DEFVAR_LISP ("this-command-properties", &Vthis_command_properties /* +Properties set by the current command. +At the beginning of each command, the current value of this variable is +copied to `last-command-properties', and then it is set to nil. Use `putf' +to add properties to this variable. Commands should use this to communicate +with pre/post-command hooks, subsequent commands, wrapping commands, etc. +in preference to looking at and/or setting `this-command'. +*/ ); + Vthis_command_properties = Qnil; + DEFVAR_LISP ("help-char", &Vhelp_char /* Character to recognize as meaning Help. When it is read, do `(eval help-form)', and display result if it's a string. @@ -5301,41 +4814,6 @@ and is one of the following: Non-nil inhibits recording of input-events to recent-keys ring. */ ); inhibit_input_event_recording = 0; - - DEFVAR_LISP("menu-accelerator-prefix", &Vmenu_accelerator_prefix /* -Prefix key(s) that must be typed before menu accelerators will be activated. -Set this to a value acceptable by define-key. -*/ ); - Vmenu_accelerator_prefix = Qnil; - - DEFVAR_LISP ("menu-accelerator-modifiers", &Vmenu_accelerator_modifiers /* -Modifier keys which must be pressed to get to the top level menu accelerators. -This is a list of modifier key symbols. All modifier keys must be held down -while a valid menu accelerator key is pressed in order for the top level -menu to become active. - -See also menu-accelerator-enabled and menu-accelerator-prefix. -*/ ); - Vmenu_accelerator_modifiers = list1 (Qmeta); - - DEFVAR_LISP ("menu-accelerator-enabled", &Vmenu_accelerator_enabled /* -Whether menu accelerator keys can cause the menubar to become active. -If 'menu-force or 'menu-fallback, then menu accelerator keys can -be used to activate the top level menu. Once the menubar becomes active, the -accelerator keys can be used regardless of the value of this variable. - -menu-force is used to indicate that the menu accelerator key takes -precedence over bindings in the current keymap(s). menu-fallback means -that bindings in the current keymap take precedence over menu accelerator keys. -Thus a top level menu with an accelerator of "T" would be activated on a -keypress of Meta-t if menu-accelerator-enabled is menu-force. -However, if menu-accelerator-enabled is menu-fallback, then -Meta-t will not activate the menubar and will instead run the function -transpose-words, to which it is normally bound. - -See also menu-accelerator-modifiers and menu-accelerator-prefix. -*/ ); - Vmenu_accelerator_enabled = Qnil; } void @@ -5343,41 +4821,6 @@ complex_vars_of_event_stream (void) { Vkeyboard_translate_table = make_lisp_hash_table (100, HASH_TABLE_NON_WEAK, HASH_TABLE_EQ); - - DEFVAR_LISP ("menu-accelerator-map", &Vmenu_accelerator_map /* -Keymap for use when the menubar is active. -The actions menu-quit, menu-up, menu-down, menu-left, menu-right, -menu-select and menu-escape can be mapped to keys in this map. - -menu-quit Immediately deactivate the menubar and any open submenus without - selecting an item. -menu-up Move the menu cursor up one row in the current menu. If the - move extends past the top of the menu, wrap around to the bottom. -menu-down Move the menu cursor down one row in the current menu. If the - move extends past the bottom of the menu, wrap around to the top. - If executed while the cursor is in the top level menu, move down - into the selected menu. -menu-left Move the cursor from a submenu into the parent menu. If executed - while the cursor is in the top level menu, move the cursor to the - left. If the move extends past the left edge of the menu, wrap - around to the right edge. -menu-right Move the cursor into a submenu. If the cursor is located in the - top level menu or is not currently on a submenu heading, then move - the cursor to the next top level menu entry. If the move extends - past the right edge of the menu, wrap around to the left edge. -menu-select Activate the item under the cursor. If the cursor is located on - a submenu heading, then move the cursor into the submenu. -menu-escape Pop up to the next level of menus. Moves from a submenu into its - parent menu. From the top level menu, this deactivates the - menubar. - -This keymap can also contain normal key-command bindings, in which case the -menubar is deactivated and the corresponding command is executed. - -The action bindings used by the menu accelerator code are designed to mimic -the actions of menu traversal keys in a commonly used PC operating system. -*/ ); - Vmenu_accelerator_map = Fmake_keymap(Qnil); } void diff --git a/src/event-tty.c b/src/event-tty.c index 93fb928..59b4e00 100644 --- a/src/event-tty.c +++ b/src/event-tty.c @@ -249,6 +249,7 @@ reinit_vars_of_event_tty (void) tty_event_stream = xnew (struct event_stream); tty_event_stream->event_pending_p = emacs_tty_event_pending_p; + tty_event_stream->force_event_pending = 0; tty_event_stream->next_event_cb = emacs_tty_next_event; tty_event_stream->handle_magic_event_cb = emacs_tty_handle_magic_event; tty_event_stream->add_timeout_cb = emacs_tty_add_timeout; diff --git a/src/event-unixoid.c b/src/event-unixoid.c index 1bfd82c..3d7efb7 100644 --- a/src/event-unixoid.c +++ b/src/event-unixoid.c @@ -225,7 +225,7 @@ poll_fds_for_input (SELECT_TYPE mask) { /* Something went seriously wrong; don't abort since maybe the TTY just died at the wrong time. */ - fprintf (stderr, "xemacs: select failed: errno = %d\n", errno); + stderr_out ("xemacs: select failed: errno = %d\n", errno); return 0; } /* else, we got interrupted by a signal, so try again. */ diff --git a/src/events-mod.h b/src/events-mod.h index 48da194..76644e1 100644 --- a/src/events-mod.h +++ b/src/events-mod.h @@ -1,8 +1,8 @@ /* The modifiers XEmacs knows about; these appear in key and button events. */ -#define MOD_CONTROL (1<<0) -#define MOD_META (1<<1) -#define MOD_SUPER (1<<2) -#define MOD_HYPER (1<<3) -#define MOD_ALT (1<<4) -#define MOD_SHIFT (1<<5) /* not used for dual-case characters */ +#define XEMACS_MOD_CONTROL (1<<0) +#define XEMACS_MOD_META (1<<1) +#define XEMACS_MOD_SUPER (1<<2) +#define XEMACS_MOD_HYPER (1<<3) +#define XEMACS_MOD_ALT (1<<4) +#define XEMACS_MOD_SHIFT (1<<5) /* not used for dual-case characters */ diff --git a/src/events.c b/src/events.c index 60002d8..325be1e 100644 --- a/src/events.c +++ b/src/events.c @@ -37,17 +37,6 @@ Boston, MA 02111-1307, USA. */ #include "keymap.h" /* for key_desc_list_to_event() */ #include "redisplay.h" #include "window.h" - -#ifdef WINDOWSNT -/* Hmm, under unix we want X modifiers, under NT we want X modifiers if - we are running X and Windows modifiers otherwise. - gak. This is a kludge until we support multiple native GUIs! -*/ -#undef MOD_ALT -#undef MOD_CONTROL -#undef MOD_SHIFT -#endif - #include "events-mod.h" /* Where old events go when they are explicitly deallocated. @@ -87,7 +76,7 @@ deinitialize_event (Lisp_Object ev) ((int *) event) [i] = 0xdeadbeef; event->event_type = dead_event; event->channel = Qnil; - set_lheader_implementation (&(event->lheader), &lrecord_event); + set_lheader_implementation (&event->lheader, &lrecord_event); XSET_EVENT_NEXT (ev, Qnil); } @@ -96,7 +85,7 @@ void zero_event (Lisp_Event *e) { xzero (*e); - set_lheader_implementation (&(e->lheader), &lrecord_event); + set_lheader_implementation (&e->lheader, &lrecord_event); e->event_type = empty_event; e->next = Qnil; e->channel = Qnil; @@ -551,13 +540,13 @@ WARNING: the event object returned may be a reused one; see the function EXTERNAL_LIST_LOOP_2 (sym, value) { - if (EQ (sym, Qcontrol)) modifiers |= MOD_CONTROL; - else if (EQ (sym, Qmeta)) modifiers |= MOD_META; - else if (EQ (sym, Qsuper)) modifiers |= MOD_SUPER; - else if (EQ (sym, Qhyper)) modifiers |= MOD_HYPER; - else if (EQ (sym, Qalt)) modifiers |= MOD_ALT; - else if (EQ (sym, Qsymbol)) modifiers |= MOD_ALT; - else if (EQ (sym, Qshift)) modifiers |= MOD_SHIFT; + if (EQ (sym, Qcontrol)) modifiers |= XEMACS_MOD_CONTROL; + else if (EQ (sym, Qmeta)) modifiers |= XEMACS_MOD_META; + else if (EQ (sym, Qsuper)) modifiers |= XEMACS_MOD_SUPER; + else if (EQ (sym, Qhyper)) modifiers |= XEMACS_MOD_HYPER; + else if (EQ (sym, Qalt)) modifiers |= XEMACS_MOD_ALT; + else if (EQ (sym, Qsymbol)) modifiers |= XEMACS_MOD_ALT; + else if (EQ (sym, Qshift)) modifiers |= XEMACS_MOD_SHIFT; else signal_simple_error ("Invalid key modifier", sym); } @@ -977,7 +966,7 @@ character_to_event (Emchar c, Lisp_Event *event, struct console *con, int use_console_meta_flag, int do_backspace_mapping) { Lisp_Object k = Qnil; - unsigned int m = 0; + int m = 0; if (event->event_type == dead_event) error ("character-to-event called with a deallocated event!"); @@ -996,21 +985,21 @@ character_to_event (Emchar c, Lisp_Event *event, struct console *con, break; case 1: /* top bit is meta */ c -= 128; - m = MOD_META; + m = XEMACS_MOD_META; break; default: /* this is a real character */ break; } } - if (c < ' ') c += '@', m |= MOD_CONTROL; - if (m & MOD_CONTROL) + if (c < ' ') c += '@', m |= XEMACS_MOD_CONTROL; + if (m & XEMACS_MOD_CONTROL) { switch (c) { - case 'I': k = QKtab; m &= ~MOD_CONTROL; break; - case 'J': k = QKlinefeed; m &= ~MOD_CONTROL; break; - case 'M': k = QKreturn; m &= ~MOD_CONTROL; break; - case '[': k = QKescape; m &= ~MOD_CONTROL; break; + case 'I': k = QKtab; m &= ~XEMACS_MOD_CONTROL; break; + case 'J': k = QKlinefeed; m &= ~XEMACS_MOD_CONTROL; break; + case 'M': k = QKreturn; m &= ~XEMACS_MOD_CONTROL; break; + case '[': k = QKescape; m &= ~XEMACS_MOD_CONTROL; break; default: #if defined(HAVE_TTY) if (do_backspace_mapping && @@ -1018,7 +1007,7 @@ character_to_event (Emchar c, Lisp_Event *event, struct console *con, c - '@' == XCHAR (con->tty_erase_char)) { k = QKbackspace; - m &= ~MOD_CONTROL; + m &= ~XEMACS_MOD_CONTROL; } #endif /* defined(HAVE_TTY) && !defined(__CYGWIN32__) */ break; @@ -1067,7 +1056,7 @@ event_to_character (Lisp_Event *event, return -1; } if (!allow_extra_modifiers && - event->event.key.modifiers & (MOD_SUPER|MOD_HYPER|MOD_ALT)) + event->event.key.modifiers & (XEMACS_MOD_SUPER|XEMACS_MOD_HYPER|XEMACS_MOD_ALT)) return -1; if (CHAR_OR_CHAR_INTP (event->event.key.keysym)) c = XCHAR_OR_CHAR_INT (event->event.key.keysym); @@ -1086,7 +1075,7 @@ event_to_character (Lisp_Event *event, else return -1; - if (event->event.key.modifiers & MOD_CONTROL) + if (event->event.key.modifiers & XEMACS_MOD_CONTROL) { if (c >= 'a' && c <= 'z') c -= ('a' - 'A'); @@ -1104,7 +1093,7 @@ event_to_character (Lisp_Event *event, if (! allow_extra_modifiers) return -1; } - if (event->event.key.modifiers & MOD_META) + if (event->event.key.modifiers & XEMACS_MOD_META) { if (! allow_meta) return -1; if (c & 0200) return -1; /* don't allow M-oslash (overlap) */ @@ -1244,13 +1233,13 @@ format_event_object (char *buf, Lisp_Event *event, int brief) key = event->event.key.keysym; /* Hack. */ if (! brief && CHARP (key) && - mod & (MOD_CONTROL | MOD_META | MOD_SUPER | MOD_HYPER)) + mod & (XEMACS_MOD_CONTROL | XEMACS_MOD_META | XEMACS_MOD_SUPER | XEMACS_MOD_HYPER)) { int k = XCHAR (key); if (k >= 'a' && k <= 'z') key = make_char (k - ('a' - 'A')); else if (k >= 'A' && k <= 'Z') - mod |= MOD_SHIFT; + mod |= XEMACS_MOD_SHIFT; } break; } @@ -1292,12 +1281,12 @@ format_event_object (char *buf, Lisp_Event *event, int brief) } #define modprint1(x) do { strcpy (buf, (x)); buf += sizeof (x)-1; } while (0) #define modprint(x,y) do { if (brief) modprint1 (y); else modprint1 (x); } while (0) - if (mod & MOD_CONTROL) modprint ("control-", "C-"); - if (mod & MOD_META) modprint ("meta-", "M-"); - if (mod & MOD_SUPER) modprint ("super-", "S-"); - if (mod & MOD_HYPER) modprint ("hyper-", "H-"); - if (mod & MOD_ALT) modprint ("alt-", "A-"); - if (mod & MOD_SHIFT) modprint ("shift-", "Sh-"); + if (mod & XEMACS_MOD_CONTROL) modprint ("control-", "C-"); + if (mod & XEMACS_MOD_META) modprint ("meta-", "M-"); + if (mod & XEMACS_MOD_SUPER) modprint ("super-", "S-"); + if (mod & XEMACS_MOD_HYPER) modprint ("hyper-", "H-"); + if (mod & XEMACS_MOD_ALT) modprint ("alt-", "A-"); + if (mod & XEMACS_MOD_SHIFT) modprint ("shift-", "Sh-"); if (mouse_p) { modprint1 ("button"); @@ -1554,12 +1543,12 @@ See also the function event-modifier-bits. { int mod = XINT (Fevent_modifier_bits (event)); Lisp_Object result = Qnil; - if (mod & MOD_SHIFT) result = Fcons (Qshift, result); - if (mod & MOD_ALT) result = Fcons (Qalt, result); - if (mod & MOD_HYPER) result = Fcons (Qhyper, result); - if (mod & MOD_SUPER) result = Fcons (Qsuper, result); - if (mod & MOD_META) result = Fcons (Qmeta, result); - if (mod & MOD_CONTROL) result = Fcons (Qcontrol, result); + if (mod & XEMACS_MOD_SHIFT) result = Fcons (Qshift, result); + if (mod & XEMACS_MOD_ALT) result = Fcons (Qalt, result); + if (mod & XEMACS_MOD_HYPER) result = Fcons (Qhyper, result); + if (mod & XEMACS_MOD_SUPER) result = Fcons (Qsuper, result); + if (mod & XEMACS_MOD_META) result = Fcons (Qmeta, result); + if (mod & XEMACS_MOD_CONTROL) result = Fcons (Qcontrol, result); return result; } diff --git a/src/events.h b/src/events.h index 3174fe8..7088301 100644 --- a/src/events.h +++ b/src/events.h @@ -329,6 +329,7 @@ struct event_stream void (*select_process_cb) (Lisp_Process *); void (*unselect_process_cb) (Lisp_Process *); void (*quit_p_cb) (void); + void (*force_event_pending) (struct frame* f); USID (*create_stream_pair_cb) (void* /* inhandle*/, void* /*outhandle*/ , Lisp_Object* /* instream */, Lisp_Object* /* outstream */, @@ -366,20 +367,20 @@ typedef enum emacs_event_type struct key_data { Lisp_Object keysym; - unsigned char modifiers; + int modifiers; }; struct button_data { int button; - unsigned char modifiers; + int modifiers; int x, y; }; struct motion_data { int x, y; - unsigned char modifiers; + int modifiers; }; struct process_data @@ -406,7 +407,7 @@ struct misc_user_data Lisp_Object function; Lisp_Object object; int button; - unsigned char modifiers; + int modifiers; int x, y; }; @@ -532,9 +533,9 @@ extern Lisp_Object QKbackspace, QKdelete, QKescape, QKlinefeed, QKreturn; extern Lisp_Object QKspace, QKtab, Qmouse_event_p, Vcharacter_set_property; extern Lisp_Object Qcancel_mode_internal; -/* Note: under X Windows, MOD_ALT is generated by the Alt key if there are +/* Note: under X Windows, XEMACS_MOD_ALT is generated by the Alt key if there are both Alt and Meta keys. If there are no Meta keys, then Alt generates - MOD_META instead. + XEMACS_MOD_META instead. */ #ifdef emacs @@ -661,4 +662,60 @@ USID event_stream_unixoid_delete_stream_pair (Lisp_Object instream, #endif /* emacs */ +/* #### a hack, until accelerator shit is cleaned up */ + +/* This structure is what we use to encapsulate the state of a command sequence + being composed; key events are executed by adding themselves to the command + builder; if the command builder is then complete (does not still represent + a prefix key sequence) it executes the corresponding command. + */ +struct command_builder +{ + struct lcrecord_header header; + Lisp_Object console; /* back pointer to the console this command + builder is for */ + /* Qnil, or a Lisp_Event representing the first event read + * after the last command completed. Threaded. */ + /* #### NYI */ + Lisp_Object prefix_events; + /* Qnil, or a Lisp_Event representing event in the current + * keymap-lookup sequence. Subsequent events are threaded via + * the event's next slot */ + Lisp_Object current_events; + /* Last elt of above */ + Lisp_Object most_current_event; + /* Last elt before function map code took over. What this means is: + All prefixes up to (but not including) this event have non-nil + bindings, but the prefix including this event has a nil binding. + Any events in the chain after this one were read solely because + we're part of a possible function key. If we end up with + something that's not part of a possible function key, we have to + unread all of those events. */ + Lisp_Object last_non_munged_event; + /* One set of values for function-key-map, one for key-translation-map */ + struct munging_key_translation + { + /* First event that can begin a possible function key sequence + (to be translated according to function-key-map). Normally + this is the first event in the chain. However, once we've + translated a sequence through function-key-map, this will point + to the first event after the translated sequence: we don't ever + want to translate any events twice through function-key-map, or + things could get really screwed up (e.g. if the user created a + translation loop). If this is nil, then the next-read event is + the first that can begin a function key sequence. */ + Lisp_Object first_mungeable_event; + } munge_me[2]; + + Bufbyte *echo_buf; + Bytecount echo_buf_length; /* size of echo_buf */ + Bytecount echo_buf_index; /* index into echo_buf + * -1 before doing echoing for new cmd */ + /* Self-insert-command is magic in that it doesn't always push an undo- + boundary: up to 20 consecutive self-inserts can happen before an undo- + boundary is pushed. This variable is that counter. + */ + int self_insert_countdown; +}; + #endif /* INCLUDED_events_h_ */ diff --git a/src/extents.c b/src/extents.c index 14bebe2..6900786 100644 --- a/src/extents.c +++ b/src/extents.c @@ -227,6 +227,7 @@ Boston, MA 02111-1307, USA. */ #include "opaque.h" #include "process.h" #include "redisplay.h" +#include "gutter.h" /* ------------------------------- */ /* gap array */ @@ -461,7 +462,6 @@ Lisp_Object Vextent_face_reusable_list; /* FSFmacs bogosity */ Lisp_Object Vdefault_text_properties; - EXFUN (Fextent_properties, 1); EXFUN (Fset_extent_property, 3); @@ -1589,33 +1589,46 @@ extent_changed_for_redisplay (EXTENT extent, int descendants_too, object = extent_object (extent); - if (!BUFFERP (object) || extent_detached_p (extent)) - /* #### Can changes to string extents affect redisplay? - I will have to think about this. What about string glyphs? - Things in the modeline? etc. */ - /* #### changes to string extents can certainly affect redisplay - if the extent is in some generated-modeline-string: when - we change an extent in generated-modeline-string, this changes - its parent, which is in `modeline-format', so we should - force the modeline to be updated. But how to determine whether - a string is a `generated-modeline-string'? Looping through - all buffers is not very efficient. Should we add all - `generated-modeline-string' strings to a hash table? - Maybe efficiency is not the greatest concern here and there's - no big loss in looping over the buffers. */ + if (extent_detached_p (extent)) return; - { - struct buffer *b; - b = XBUFFER (object); - BUF_FACECHANGE (b)++; - MARK_EXTENTS_CHANGED; - if (invisibility_change) - MARK_CLIP_CHANGED; - buffer_extent_signal_changed_region (b, - extent_endpoint_bufpos (extent, 0), - extent_endpoint_bufpos (extent, 1)); - } + else if (STRINGP (object)) + { + /* #### Changes to string extents can affect redisplay if they are + in the modeline or in the gutters. + + If the extent is in some generated-modeline-string: when we + change an extent in generated-modeline-string, this changes its + parent, which is in `modeline-format', so we should force the + modeline to be updated. But how to determine whether a string + is a `generated-modeline-string'? Looping through all buffers + is not very efficient. Should we add all + `generated-modeline-string' strings to a hash table? Maybe + efficiency is not the greatest concern here and there's no big + loss in looping over the buffers. + + If the extent is in a gutter we mark the gutter as + changed. This means (a) we can update extents in the gutters + when we need it. (b) we don't have to update the gutters when + only extents attached to buffers have changed. */ + + MARK_EXTENTS_CHANGED; + gutter_extent_signal_changed_region_maybe (object, + extent_endpoint_bufpos (extent, 0), + extent_endpoint_bufpos (extent, 1)); + } + else if (BUFFERP (object)) + { + struct buffer *b; + b = XBUFFER (object); + BUF_FACECHANGE (b)++; + MARK_EXTENTS_CHANGED; + if (invisibility_change) + MARK_CLIP_CHANGED; + buffer_extent_signal_changed_region (b, + extent_endpoint_bufpos (extent, 0), + extent_endpoint_bufpos (extent, 1)); + } } /* A change to an extent occurred that might affect redisplay. @@ -4989,7 +5002,7 @@ static Lisp_Object set_extent_glyph_1 (Lisp_Object extent_obj, Lisp_Object glyph, int endp, Lisp_Object layout_obj) { - EXTENT extent = decode_extent (extent_obj, DE_MUST_HAVE_BUFFER); + EXTENT extent = decode_extent (extent_obj, 0); glyph_layout layout = symbol_to_glyph_layout (layout_obj); /* Make sure we've actually been given a valid glyph or it's nil diff --git a/src/extents.h b/src/extents.h index 94d9152..0f70381 100644 --- a/src/extents.h +++ b/src/extents.h @@ -177,8 +177,8 @@ void flush_cached_extent_info (Lisp_Object extent_info); #define extent_no_chase_normal_field(e, field) ((e)->flags.field) -INLINE struct extent_auxiliary *extent_aux_or_default (EXTENT e); -INLINE struct extent_auxiliary * +INLINE_HEADER struct extent_auxiliary *extent_aux_or_default (EXTENT e); +INLINE_HEADER struct extent_auxiliary * extent_aux_or_default (EXTENT e) { return e->flags.has_aux ? @@ -259,8 +259,8 @@ extent_aux_or_default (EXTENT e) #define extent_internal_p(e) extent_normal_field (e, internal) #define extent_in_red_event_p(e) extent_normal_field (e, in_red_event) -INLINE Lisp_Object * extent_no_chase_plist_addr (EXTENT e); -INLINE Lisp_Object * +INLINE_HEADER Lisp_Object * extent_no_chase_plist_addr (EXTENT e); +INLINE_HEADER Lisp_Object * extent_no_chase_plist_addr (EXTENT e) { return e->flags.has_aux ? &XCDR (e->plist) : &e->plist; @@ -339,8 +339,8 @@ EXTENT extent_ancestor_1 (EXTENT e); /* extent_ancestor() chases all the parent links until there aren't any more. extent_ancestor_1() does the same thing but it a function; the following optimizes the most common case. */ -INLINE EXTENT extent_ancestor (EXTENT e); -INLINE EXTENT +INLINE_HEADER EXTENT extent_ancestor (EXTENT e); +INLINE_HEADER EXTENT extent_ancestor (EXTENT e) { return e->flags.has_parent ? extent_ancestor_1 (e) : e; diff --git a/src/faces.c b/src/faces.c index d952457..17a694d 100644 --- a/src/faces.c +++ b/src/faces.c @@ -2034,9 +2034,7 @@ complex_vars_of_faces (void) Fget (Vgui_element_face, Qforeground, Qunbound)); set_specifier_fallback (Fget (Vwidget_face, Qbackground, Qunbound), Fget (Vgui_element_face, Qbackground, Qunbound)); - set_specifier_fallback (Fget (Vwidget_face, Qbackground_pixmap, Qnil), - Fget (Vgui_element_face, Qbackground_pixmap, - Qunbound)); + /* We don't want widgets to have a default background pixmap. */ Vleft_margin_face = Fmake_face (Qleft_margin, build_string ("left margin face"), diff --git a/src/faces.h b/src/faces.h index fa4a85a..cd2d498 100644 --- a/src/faces.h +++ b/src/faces.h @@ -125,7 +125,7 @@ struct face_cachel corresponding single-face cachels. Formerly we didn't bother to keep track of the faces used for - merging. We do know because we need to do so because there is no + merging. We do now because we need to do so because there is no other way to properly handle multiple charsets for Mule in the presence of display tables short of always computing the values for all charsets, which is very expensive. Instead, we use a diff --git a/src/file-coding.c b/src/file-coding.c index 9db68c7..b9e2fdd 100644 --- a/src/file-coding.c +++ b/src/file-coding.c @@ -2239,6 +2239,13 @@ reset_decoding_stream (struct decoding_stream *str) } str->counter = 0; #endif /* MULE */ + if (CODING_SYSTEM_TYPE (str->codesys) == CODESYS_AUTODETECT + || CODING_SYSTEM_EOL_TYPE (str->codesys) == EOL_AUTODETECT) + { + xzero (str->decst); + str->decst.eol_type = EOL_AUTODETECT; + str->decst.mask = ~0; + } str->flags = str->ch = 0; } diff --git a/src/fileio.c b/src/fileio.c index c300003..c2eb069 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -635,8 +635,10 @@ In Unix-syntax, this function just removes the final slash. This implementation is better than what one usually finds in libc. --hniksic */ +static unsigned int temp_name_rand; + DEFUN ("make-temp-name", Fmake_temp_name, 1, 1, 0, /* -Generate temporary file name starting with PREFIX. +Generate a temporary file name starting with PREFIX. The Emacs process number forms part of the result, so there is no danger of generating a name being used by another process. @@ -646,7 +648,8 @@ be an absolute file name. */ (prefix)) { - static char tbl[64] = { + static const char tbl[64] = + { 'A','B','C','D','E','F','G','H', 'I','J','K','L','M','N','O','P', 'Q','R','S','T','U','V','W','X', @@ -654,13 +657,12 @@ be an absolute file name. 'g','h','i','j','k','l','m','n', 'o','p','q','r','s','t','u','v', 'w','x','y','z','0','1','2','3', - '4','5','6','7','8','9','-','_' }; - static unsigned count, count_initialized_p; + '4','5','6','7','8','9','-','_' + }; Lisp_Object val; Bytecount len; Bufbyte *p, *data; - unsigned pid; CHECK_STRING (prefix); @@ -686,40 +688,33 @@ be an absolute file name. /* VAL is created by adding 6 characters to PREFIX. The first three are the PID of this process, in base 64, and the second three are - incremented if the file already exists. This ensures 262144 - unique file names per PID per PREFIX. */ + a pseudo-random number seeded from process startup time. This + ensures 262144 unique file names per PID per PREFIX per machine. */ - pid = (unsigned)getpid (); - *p++ = tbl[pid & 63], pid >>= 6; - *p++ = tbl[pid & 63], pid >>= 6; - *p++ = tbl[pid & 63], pid >>= 6; + { + unsigned int pid = (unsigned int) getpid (); + *p++ = tbl[(pid >> 0) & 63]; + *p++ = tbl[(pid >> 6) & 63]; + *p++ = tbl[(pid >> 12) & 63]; + } /* Here we try to minimize useless stat'ing when this function is invoked many times successively with the same PREFIX. We achieve - this by initializing count to a random value, and incrementing it - afterwards. */ - if (!count_initialized_p) - { - count = (unsigned)time (NULL); - /* Dumping temacs with a non-zero count_initialized_p wouldn't - make much sense. */ - if (NILP (Frunning_temacs_p ())) - count_initialized_p = 1; - } + this by using a very pseudo-random number generator to generate + file names unique to this process, with a very long cycle. */ while (1) { struct stat ignored; - unsigned num = count; - p[0] = tbl[num & 63], num >>= 6; - p[1] = tbl[num & 63], num >>= 6; - p[2] = tbl[num & 63], num >>= 6; + p[0] = tbl[(temp_name_rand >> 0) & 63]; + p[1] = tbl[(temp_name_rand >> 6) & 63]; + p[2] = tbl[(temp_name_rand >> 12) & 63]; /* Poor man's congruential RN generator. Replace with ++count for debugging. */ - count += 25229; - count %= 225307; + temp_name_rand += 25229; + temp_name_rand %= 225307; QUIT; @@ -1846,7 +1841,7 @@ Create a directory. One argument, a file name string. { return Fsignal (Qfile_error, list3 (build_translated_string ("Creating directory"), - build_translated_string ("pathame too long"), + build_translated_string ("pathname too long"), dirname_)); } strncpy (dir, (char *) XSTRING_DATA (dirname_), @@ -2075,7 +2070,6 @@ This is what happens in interactive use with M-x. return Qnil; } -#ifdef S_IFLNK DEFUN ("make-symbolic-link", Fmake_symbolic_link, 2, 3, "FMake symbolic link to file: \nFMake symbolic link to file %s: \np", /* Make a symbolic link to FILENAME, named LINKNAME. Both args strings. @@ -2087,6 +2081,7 @@ This happens for interactive use with M-x. (filename, linkname, ok_if_already_exists)) { /* This function can GC. GC checked 1997.06.04. */ + /* XEmacs change: run handlers even if local machine doesn't have symlinks */ Lisp_Object handler; struct gcpro gcpro1, gcpro2; @@ -2114,6 +2109,7 @@ This happens for interactive use with M-x. RETURN_UNGCPRO (call4 (handler, Qmake_symbolic_link, filename, linkname, ok_if_already_exists)); +#ifdef S_IFLNK if (NILP (ok_if_already_exists) || INTP (ok_if_already_exists)) barf_or_query_if_file_exists (linkname, "make it a link", @@ -2126,10 +2122,11 @@ This happens for interactive use with M-x. report_file_error ("Making symbolic link", list2 (filename, linkname)); } +#endif /* S_IFLNK */ + UNGCPRO; return Qnil; } -#endif /* S_IFLNK */ #ifdef HPUX_NET @@ -2351,11 +2348,13 @@ Otherwise returns nil. (filename)) { /* This function can GC. GC checked 1997.04.10. */ + /* XEmacs change: run handlers even if local machine doesn't have symlinks */ #ifdef S_IFLNK char *buf; int bufsize; int valsize; Lisp_Object val; +#endif Lisp_Object handler; struct gcpro gcpro1; @@ -2370,6 +2369,7 @@ Otherwise returns nil. if (!NILP (handler)) return call2 (handler, Qfile_symlink_p, filename); +#ifdef S_IFLNK bufsize = 100; while (1) { @@ -4185,9 +4185,7 @@ syms_of_fileio (void) DEFSUBR (Fdelete_file); DEFSUBR (Frename_file); DEFSUBR (Fadd_name_to_file); -#ifdef S_IFLNK DEFSUBR (Fmake_symbolic_link); -#endif /* S_IFLNK */ #ifdef HPUX_NET DEFSUBR (Fsysnetunam); #endif /* HPUX_NET */ @@ -4316,6 +4314,28 @@ what the normal separator is. #ifdef WINDOWSNT Vdirectory_sep_char = make_char ('\\'); #else - Vdirectory_sep_char = make_char ('/'); + Vdirectory_sep_char = make_char ('/'); #endif + + reinit_vars_of_fileio (); +} + +void +reinit_vars_of_fileio (void) +{ + /* We want temp_name_rand to be initialized to a value likely to be + unique to the process, not to the executable. The danger is that + two different XEmacs processes using the same binary on different + machines creating temp files in the same directory will be + unlucky enough to have the same pid. If we randomize using + process startup time, then in practice they will be unlikely to + collide. We use the microseconds field so that scripts that start + simultaneous XEmacs processes on multiple machines will have less + chance of collision. */ + { + EMACS_TIME thyme; + + EMACS_GET_TIME (thyme); + temp_name_rand = (unsigned int) (EMACS_SECS (thyme) ^ EMACS_USECS (thyme)); + } } diff --git a/src/filelock.c b/src/filelock.c index 97573bb..b31766d 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -366,7 +366,7 @@ unlock_file (Lisp_Object fn) } void -unlock_all_files () +unlock_all_files (void) { register Lisp_Object tail; register struct buffer *b; diff --git a/src/filemode.c b/src/filemode.c index 31f4564..efa3a28 100644 --- a/src/filemode.c +++ b/src/filemode.c @@ -79,9 +79,9 @@ static void mode_string (unsigned short mode, char *str) { str[0] = ftypelet (mode); - rwx ((mode & 0700) << 0, &str[1]); - rwx ((mode & 0070) << 3, &str[4]); - rwx ((mode & 0007) << 6, &str[7]); + rwx ((unsigned short) ((mode & 0700) << 0), &str[1]); + rwx ((unsigned short) ((mode & 0070) << 3), &str[4]); + rwx ((unsigned short) ((mode & 0007) << 6), &str[7]); setst (mode, str); } diff --git a/src/frame-msw.c b/src/frame-msw.c index ff640f2..dce9917 100644 --- a/src/frame-msw.c +++ b/src/frame-msw.c @@ -58,7 +58,7 @@ Boston, MA 02111-1307, USA. */ #define POPUP_WIDTH 30 #define POPUP_HEIGHT 10 -/* Default popup size, in characters */ +/* Default regular frame size, in characters */ #define DEFAULT_FRAME_WIDTH 80 #define DEFAULT_FRAME_HEIGHT 35 @@ -133,6 +133,7 @@ mswindows_init_frame_1 (struct frame *f, Lisp_Object props) FRAME_MSWINDOWS_DATA(f)->ignore_next_lbutton_up = 0; FRAME_MSWINDOWS_DATA(f)->ignore_next_rbutton_up = 0; FRAME_MSWINDOWS_DATA(f)->sizing = 0; + FRAME_MSWINDOWS_DATA(f)->paint_pending = 0; FRAME_MSWINDOWS_MENU_HASH_TABLE(f) = Qnil; #ifdef HAVE_TOOLBARS FRAME_MSWINDOWS_TOOLBAR_HASH_TABLE(f) = @@ -203,7 +204,6 @@ mswindows_init_frame_1 (struct frame *f, Lisp_Object props) SetWindowLong (hwnd, XWL_FRAMEOBJ, (LONG)LISP_TO_VOID(frame_obj)); FRAME_MSWINDOWS_DC(f) = GetDC (hwnd); - FRAME_MSWINDOWS_CDC(f) = CreateCompatibleDC (FRAME_MSWINDOWS_CDC(f)); SetTextAlign (FRAME_MSWINDOWS_DC(f), TA_BASELINE | TA_LEFT | TA_NOUPDATECP); } @@ -273,7 +273,6 @@ mswindows_delete_frame (struct frame *f) { if (f->frame_data) { - DeleteDC(FRAME_MSWINDOWS_CDC(f)); ReleaseDC(FRAME_MSWINDOWS_HANDLE(f), FRAME_MSWINDOWS_DC(f)); DestroyWindow(FRAME_MSWINDOWS_HANDLE(f)); xfree (f->frame_data); @@ -610,11 +609,10 @@ mswindows_set_frame_properties (struct frame *f, Lisp_Object plist) void mswindows_size_frame_internal (struct frame* f, XEMACS_RECT_WH* dest) { - RECT rect; + RECT rect, ws_rect; int pixel_width, pixel_height; int size_p = (dest->width >=0 || dest->height >=0); int move_p = (dest->top >=0 || dest->left >=0); - struct device* d = XDEVICE (FRAME_DEVICE (f)); char_to_real_pixel_size (f, dest->width, dest->height, &pixel_width, &pixel_height); if (dest->width < 0) @@ -637,32 +635,44 @@ void mswindows_size_frame_internal (struct frame* f, XEMACS_RECT_WH* dest) GetMenu (FRAME_MSWINDOWS_HANDLE(f)) != NULL, GetWindowLong (FRAME_MSWINDOWS_HANDLE(f), GWL_EXSTYLE)); - /* resize and move the window so that it fits on the screen. This is + /* resize and move the window so that it fits in the workspace. This is not restrictive since this will happen later anyway in WM_SIZE. We have to do this after adjusting the rect to account for menubar etc. */ + msw_get_workspace_coords (&ws_rect); pixel_width = rect.right - rect.left; pixel_height = rect.bottom - rect.top; - if (pixel_width > DEVICE_MSWINDOWS_HORZRES(d)) + if (pixel_width > ws_rect.right - ws_rect.left) { - pixel_width = DEVICE_MSWINDOWS_HORZRES(d); + pixel_width = ws_rect.right - ws_rect.left; size_p=1; } - if (pixel_height > DEVICE_MSWINDOWS_VERTRES(d)) + if (pixel_height > ws_rect.bottom - ws_rect.top) { - pixel_height = DEVICE_MSWINDOWS_VERTRES(d); + pixel_height = ws_rect.bottom - ws_rect.top; size_p=1; } - /* adjust position so window is on screen */ - if (dest->left + pixel_width > DEVICE_MSWINDOWS_HORZRES(d)) + /* adjust position so window is in workspace */ + if (dest->left + pixel_width > ws_rect.right) + { + dest->left = ws_rect.right - pixel_width; + move_p=1; + } + if (dest->left < ws_rect.left) + { + dest->left = ws_rect.left; + move_p=1; + } + + if (dest->top + pixel_height > ws_rect.bottom) { - dest->left = DEVICE_MSWINDOWS_HORZRES(d) - pixel_width; + dest->top = ws_rect.bottom - pixel_height; move_p=1; } - if (dest->top + pixel_height > DEVICE_MSWINDOWS_VERTRES(d)) + if (dest->top < ws_rect.top) { - dest->top = DEVICE_MSWINDOWS_VERTRES(d) - pixel_height; + dest->top = ws_rect.top; move_p=1; } @@ -766,7 +776,7 @@ msprinter_init_frame_3 (struct frame *f) { DOCINFO di; struct device *device = XDEVICE (FRAME_DEVICE (f)); - HDC hdc = DEVICE_MSPRINTER_HDC (device); + HDC hdc; int frame_left, frame_top, frame_width, frame_height; /* Change printer parameters */ @@ -798,9 +808,14 @@ msprinter_init_frame_3 (struct frame *f) abort(); } + assert (!FRAME_MSPRINTER_PAGE_STARTED (f)); msprinter_apply_devmode (device, devmode); } + /* DC might be recreated in msprinter_apply_devmode, + so do not initialize until now */ + hdc = DEVICE_MSPRINTER_HDC (device); + /* Compute geometry properties */ frame_left = (MulDiv (GetDeviceCaps (hdc, LOGPIXELSX), FRAME_MSPRINTER_LEFT_MARGIN(f), 1440) @@ -878,7 +893,6 @@ msprinter_init_frame_3 (struct frame *f) error ("Cannot start print job"); /* Finish frame setup */ - FRAME_MSPRINTER_CDC(f) = CreateCompatibleDC (hdc); FRAME_MSPRINTER_JOB_STARTED (f) = 1; FRAME_VISIBLE_P(f) = 0; } @@ -904,8 +918,6 @@ msprinter_delete_frame (struct frame *f) EndPage (hdc); if (FRAME_MSPRINTER_JOB_STARTED (f)) EndDoc (hdc); - if (FRAME_MSPRINTER_CDC(f)) - DeleteDC (FRAME_MSPRINTER_CDC(f)); xfree (f->frame_data); } diff --git a/src/frame-x.c b/src/frame-x.c index c81b27e..9396eee 100644 --- a/src/frame-x.c +++ b/src/frame-x.c @@ -50,6 +50,7 @@ Boston, MA 02111-1307, USA. */ #include "faces.h" #include "frame.h" #include "window.h" +#include "gutter.h" #ifdef HAVE_DRAGNDROP #include "dragdrop.h" @@ -1146,12 +1147,12 @@ WARNING: can only handle plain/text and file: transfers! x_event.xbutton.y_root = lisp_event->event.button.y; } modifier = lisp_event->event.button.modifiers; - if (modifier & MOD_SHIFT) state |= ShiftMask; - if (modifier & MOD_CONTROL) state |= ControlMask; - if (modifier & MOD_META) state |= xd->MetaMask; - if (modifier & MOD_SUPER) state |= xd->SuperMask; - if (modifier & MOD_HYPER) state |= xd->HyperMask; - if (modifier & MOD_ALT) state |= xd->AltMask; + if (modifier & XEMACS_MOD_SHIFT) state |= ShiftMask; + if (modifier & XEMACS_MOD_CONTROL) state |= ControlMask; + if (modifier & XEMACS_MOD_META) state |= xd->MetaMask; + if (modifier & XEMACS_MOD_SUPER) state |= xd->SuperMask; + if (modifier & XEMACS_MOD_HYPER) state |= xd->HyperMask; + if (modifier & XEMACS_MOD_ALT) state |= xd->AltMask; state |= Button1Mask << (lisp_event->event.button.button-1); x_event.xbutton.state = state; @@ -1412,12 +1413,12 @@ The type defaults to DndText (4). } modifier = lisp_event->event.button.modifiers; - if (modifier & MOD_SHIFT) state |= ShiftMask; - if (modifier & MOD_CONTROL) state |= ControlMask; - if (modifier & MOD_META) state |= xd->MetaMask; - if (modifier & MOD_SUPER) state |= xd->SuperMask; - if (modifier & MOD_HYPER) state |= xd->HyperMask; - if (modifier & MOD_ALT) state |= xd->AltMask; + if (modifier & XEMACS_MOD_SHIFT) state |= ShiftMask; + if (modifier & XEMACS_MOD_CONTROL) state |= ControlMask; + if (modifier & XEMACS_MOD_META) state |= xd->MetaMask; + if (modifier & XEMACS_MOD_SUPER) state |= xd->SuperMask; + if (modifier & XEMACS_MOD_HYPER) state |= xd->HyperMask; + if (modifier & XEMACS_MOD_ALT) state |= xd->AltMask; state |= Button1Mask << (lisp_event->event.button.button-1); x_event.xbutton.state = state; @@ -1550,13 +1551,16 @@ x_initialize_frame_size (struct frame *f) { struct window *win = XWINDOW (f->root_window); - WINDOW_LEFT (win) = FRAME_LEFT_BORDER_END (f); - WINDOW_TOP (win) = FRAME_TOP_BORDER_END (f); + WINDOW_LEFT (win) = FRAME_LEFT_BORDER_END (f) + + FRAME_LEFT_GUTTER_BOUNDS (f); + WINDOW_TOP (win) = FRAME_TOP_BORDER_END (f) + + FRAME_TOP_GUTTER_BOUNDS (f); if (!NILP (f->minibuffer_window)) { win = XWINDOW (f->minibuffer_window); - WINDOW_LEFT (win) = FRAME_LEFT_BORDER_END (f); + WINDOW_LEFT (win) = FRAME_LEFT_BORDER_END (f) + + FRAME_LEFT_GUTTER_BOUNDS (f); } } diff --git a/src/frame.c b/src/frame.c index d742a5b..ac5b9c6 100644 --- a/src/frame.c +++ b/src/frame.c @@ -467,19 +467,14 @@ See `set-frame-properties', `default-x-frame-plist', and reset_face_cachels (XWINDOW (FRAME_SELECTED_WINDOW (f))); reset_glyph_cachels (XWINDOW (FRAME_SELECTED_WINDOW (f))); reset_subwindow_cachels (f); - change_frame_size (f, f->height, f->width, 0); + change_frame_size (f, f->height, f->width, 0); } MAYBE_FRAMEMETH (f, init_frame_2, (f, props)); Fset_frame_properties (frame, props); MAYBE_FRAMEMETH (f, init_frame_3, (f)); - /* now initialise the gutters, this won't change the frame size - so is ok here. */ - if (!DEVICE_STREAM_P (d)) - init_frame_gutters (f); - /* Hallelujah, praise the lord. */ f->init_finished = 1; @@ -505,6 +500,18 @@ See `set-frame-properties', `default-x-frame-plist', and MAYBE_FRAMEMETH (f, after_init_frame, (f, first_frame_on_device, first_frame_on_console)); + if (!DEVICE_STREAM_P (d)) + { + /* Now initialise the gutters. This won't change the frame size, + but is needed as input to the layout that change_frame_size + will eventually do. Unfortunately gutter sizing code relies + on the frame in question being visible so we can't do this + earlier. */ + init_frame_gutters (f); + + change_frame_size (f, f->height, f->width, 0); + } + if (first_frame_on_device) { if (first_frame_on_console) @@ -905,13 +912,13 @@ set_frame_selected_window (struct frame *f, Lisp_Object window) f->selected_window = window; if (!MINI_WINDOW_P (XWINDOW (window)) || FRAME_MINIBUF_ONLY_P (f)) { -#ifdef HAVE_TOOLBARS if (!EQ (f->last_nonminibuf_window, window)) { +#ifdef HAVE_TOOLBARS MARK_TOOLBAR_CHANGED; +#endif MARK_GUTTER_CHANGED; } -#endif f->last_nonminibuf_window = window; } } @@ -2864,6 +2871,9 @@ change_frame_size_1 (struct frame *f, int newheight, int newwidth) - FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT (f) - 2 * FRAME_REAL_BOTTOM_TOOLBAR_BORDER_WIDTH (f); + new_pixheight -= + (FRAME_TOP_GUTTER_BOUNDS (f) + FRAME_BOTTOM_GUTTER_BOUNDS (f)); + new_pixwidth += + FRAME_THEORETICAL_LEFT_TOOLBAR_WIDTH (f) + 2 * FRAME_THEORETICAL_LEFT_TOOLBAR_BORDER_WIDTH (f) @@ -2876,6 +2886,9 @@ change_frame_size_1 (struct frame *f, int newheight, int newwidth) - FRAME_REAL_RIGHT_TOOLBAR_WIDTH (f) - 2 * FRAME_REAL_RIGHT_TOOLBAR_BORDER_WIDTH (f); + new_pixwidth -= + (FRAME_LEFT_GUTTER_BOUNDS (f) + FRAME_RIGHT_GUTTER_BOUNDS (f)); + /* Adjust the width for the end glyph which may be a different width than the default character width. */ { @@ -2897,7 +2910,8 @@ change_frame_size_1 (struct frame *f, int newheight, int newwidth) if (new_pixheight) { - XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_top = FRAME_TOP_BORDER_END (f); + XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_top + = FRAME_TOP_BORDER_END (f) + FRAME_TOP_GUTTER_BOUNDS (f); if (FRAME_HAS_MINIBUF_P (f) && ! FRAME_MINIBUF_ONLY_P (f)) @@ -2923,7 +2937,10 @@ change_frame_size_1 (struct frame *f, int newheight, int newwidth) new_pixheight - minibuf_height, 0); XWINDOW (FRAME_MINIBUF_WINDOW (f))->pixel_top = - new_pixheight - minibuf_height + FRAME_TOP_BORDER_END (f); + FRAME_TOP_BORDER_END (f) + + FRAME_TOP_GUTTER_BOUNDS (f) + + FRAME_BOTTOM_GUTTER_BOUNDS (f) + + new_pixheight - minibuf_height; set_window_pixheight (FRAME_MINIBUF_WINDOW (f), minibuf_height, 0); } @@ -2938,13 +2955,14 @@ change_frame_size_1 (struct frame *f, int newheight, int newwidth) if (new_pixwidth) { - XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_left = FRAME_LEFT_BORDER_END (f); + XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_left = + FRAME_LEFT_BORDER_END (f) + FRAME_LEFT_GUTTER_BOUNDS (f); set_window_pixwidth (FRAME_ROOT_WINDOW (f), new_pixwidth, 0); if (FRAME_HAS_MINIBUF_P (f)) { XWINDOW (FRAME_MINIBUF_WINDOW (f))->pixel_left = - FRAME_LEFT_BORDER_END (f); + FRAME_LEFT_BORDER_END (f) + FRAME_LEFT_GUTTER_BOUNDS (f); set_window_pixwidth (FRAME_MINIBUF_WINDOW (f), new_pixwidth, 0); } @@ -2963,6 +2981,7 @@ change_frame_size_1 (struct frame *f, int newheight, int newwidth) } MARK_FRAME_TOOLBARS_CHANGED (f); + MARK_FRAME_GUTTERS_CHANGED (f); MARK_FRAME_CHANGED (f); f->echo_area_garbaged = 1; } @@ -3372,11 +3391,17 @@ visible frames. Vsynchronize_minibuffers = Qnil; DEFVAR_LISP ("frame-title-format", &Vframe_title_format /* -Controls the title of the X window corresponding to the selected frame. +Controls the title of the window-system window of the selected frame. This is the same format as `modeline-format' with the exception that %- is ignored. */ ); +/* #### I would change this unilaterally but for the wrath of the Kyles +of the world. */ +#ifdef WINDOWSNT + Vframe_title_format = build_string ("%b - XEmacs"); +#else Vframe_title_format = build_string ("%S: %b"); +#endif DEFVAR_LISP ("frame-icon-title-format", &Vframe_icon_title_format /* Controls the title of the icon corresponding to the selected frame. @@ -3386,8 +3411,9 @@ See also the variable `frame-title-format'. DEFVAR_LISP ("default-frame-name", &Vdefault_frame_name /* The default name to assign to newly-created frames. -This can be overridden by arguments to `make-frame'. -This must be a string. +This can be overridden by arguments to `make-frame'. This must be a string. +This is used primarily for picking up X resources, and is *not* the title +of the frame. (See `frame-title-format'.) */ ); #ifndef INFODOCK Vdefault_frame_name = build_string ("emacs"); diff --git a/src/frame.h b/src/frame.h index a811476..e77a490 100644 --- a/src/frame.h +++ b/src/frame.h @@ -116,9 +116,14 @@ struct frame unsigned int current_toolbar_size[4]; #endif - /* Dynamic array of display lines for gutters */ - display_line_dynarr *current_display_lines; - display_line_dynarr *desired_display_lines; + /* Size of gutters as seen by redisplay. This is used to determine + whether to re-layout windows by a call to change_frame_size early + in redisplay_frame. */ + unsigned int current_gutter_bounds[4]; + + /* Dynamic arrays of display lines for gutters */ + display_line_dynarr *current_display_lines[4]; + display_line_dynarr *desired_display_lines[4]; /* A structure of auxiliary data specific to the device type. struct x_frame is used for X window frames; defined in console-x.h */ @@ -258,9 +263,9 @@ DECLARE_LRECORD (frame, struct frame); #define FRAME_TYPE_P(f, type) EQ (FRAME_TYPE (f), Q##type) #ifdef ERROR_CHECK_TYPECHECK -INLINE struct frame * +INLINE_HEADER struct frame * error_check_frame_type (struct frame * f, Lisp_Object sym); -INLINE struct frame * +INLINE_HEADER struct frame * error_check_frame_type (struct frame * f, Lisp_Object sym) { assert (EQ (FRAME_TYPE (f), sym)); diff --git a/src/glyphs-eimage.c b/src/glyphs-eimage.c index 79b4f87..928b8e6 100644 --- a/src/glyphs-eimage.c +++ b/src/glyphs-eimage.c @@ -949,9 +949,9 @@ png_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, rgblist = MAYBE_LISP_DEVMETH (XDEVICE (c->device), color_instance_rgb_components, (c)); - my_background.red = XINT (XCAR (rgblist)); - my_background.green = XINT (XCAR (XCDR (rgblist))); - my_background.blue = XINT (XCAR (XCDR (XCDR (rgblist)))); + my_background.red = (unsigned short) XINT (XCAR (rgblist)); + my_background.green = (unsigned short) XINT (XCAR (XCDR (rgblist))); + my_background.blue = (unsigned short) XINT (XCAR (XCDR (XCDR (rgblist)))); } if (png_get_bKGD (png_ptr, info_ptr, &image_background)) diff --git a/src/glyphs-msw.c b/src/glyphs-msw.c index 25c037f..4cd61ab 100644 --- a/src/glyphs-msw.c +++ b/src/glyphs-msw.c @@ -72,10 +72,13 @@ DECLARE_IMAGE_INSTANTIATOR_FORMAT (gif); #endif #ifdef HAVE_XPM DEFINE_DEVICE_IIFORMAT (mswindows, xpm); +DEFINE_DEVICE_IIFORMAT (msprinter, xpm); #endif DEFINE_DEVICE_IIFORMAT (mswindows, xbm); +DEFINE_DEVICE_IIFORMAT (msprinter, xbm); #ifdef HAVE_XFACE DEFINE_DEVICE_IIFORMAT (mswindows, xface); +DEFINE_DEVICE_IIFORMAT (msprinter, xface); #endif DEFINE_DEVICE_IIFORMAT (mswindows, button); DEFINE_DEVICE_IIFORMAT (mswindows, edit_field); @@ -103,7 +106,20 @@ mswindows_initialize_dibitmap_image_instance (Lisp_Image_Instance *ii, enum image_instance_type type); static void mswindows_initialize_image_instance_mask (Lisp_Image_Instance* image, - struct frame* f); + HDC hcdc); + +/* + * Given device D, retrieve compatible device context. D can be either + * mswindows or an msprinter device. + */ +inline static HDC +get_device_compdc (struct device *d) +{ + if (DEVICE_MSWINDOWS_P (d)) + return DEVICE_MSWINDOWS_HCDC (d); + else + return DEVICE_MSPRINTER_HCDC (d); +} #define BPLINE(width) ((int)(~3UL & (unsigned long)((width) +3))) @@ -124,7 +140,7 @@ static BITMAPINFO* convert_EImage_to_DIBitmap (Lisp_Object device, BITMAPINFO* bmp_info; unsigned char *ip, *dp; - if (DEVICE_MSWINDOWS_BITSPIXEL (d) > 0) + if (GetDeviceCaps (get_device_compdc (d), BITSPIXEL) > 0) { int bpline = BPLINE(width * 3); /* FIXME: we can do this because 24bpp implies no color table, once @@ -206,25 +222,28 @@ static BITMAPINFO* convert_EImage_to_DIBitmap (Lisp_Object device, } /* build up an RGBQUAD colortable */ - for (i = 0; i < qtable->num_active_colors; i++) { - colortbl[i].rgbRed = (BYTE) qtable->rm[i]; - colortbl[i].rgbGreen = (BYTE) qtable->gm[i]; - colortbl[i].rgbBlue = (BYTE) qtable->bm[i]; - colortbl[i].rgbReserved = 0; - } + for (i = 0; i < qtable->num_active_colors; i++) + { + colortbl[i].rgbRed = (BYTE) qtable->rm[i]; + colortbl[i].rgbGreen = (BYTE) qtable->gm[i]; + colortbl[i].rgbBlue = (BYTE) qtable->bm[i]; + colortbl[i].rgbReserved = 0; + } /* now build up the data. picture has to be upside-down and back-to-front for msw bitmaps */ ip = pic; - for (i = height-1; i >= 0; i--) { - dp = (*bmp_data) + (i * bpline); - for (j = 0; j < width; j++) { - rd = *ip++; - gr = *ip++; - bl = *ip++; - *dp++ = QUANT_GET_COLOR (qtable,rd,gr,bl); + for (i = height-1; i >= 0; i--) + { + dp = (*bmp_data) + (i * bpline); + for (j = 0; j < width; j++) + { + rd = *ip++; + gr = *ip++; + bl = *ip++; + *dp++ = QUANT_GET_COLOR (qtable,rd,gr,bl); + } } - } xfree (qtable); } /* fix up the standard stuff */ @@ -296,20 +315,11 @@ init_image_instance_from_dibitmap (Lisp_Image_Instance *ii, { Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); struct device *d = XDEVICE (device); - struct frame *f; void* bmp_buf=0; enum image_instance_type type; HBITMAP bitmap; HDC hdc; - if (!DEVICE_MSWINDOWS_P (d)) - signal_simple_error ("Not an mswindows device", device); - - if (NILP (DEVICE_SELECTED_FRAME (d))) - signal_simple_error ("No selected frame on mswindows device", device); - - f = XFRAME (DEVICE_SELECTED_FRAME (d)); - if (dest_mask & IMAGE_COLOR_PIXMAP_MASK) type = IMAGE_COLOR_PIXMAP; else if (dest_mask & IMAGE_POINTER_MASK) @@ -317,13 +327,13 @@ init_image_instance_from_dibitmap (Lisp_Image_Instance *ii, else incompatible_image_types (instantiator, dest_mask, IMAGE_COLOR_PIXMAP_MASK | IMAGE_POINTER_MASK); - hdc = FRAME_MSWINDOWS_CDC (f); - bitmap=CreateDIBSection (hdc, - bmp_info, - DIB_RGB_COLORS, - &bmp_buf, - 0,0); + hdc = get_device_compdc (d); + bitmap = CreateDIBSection (hdc, + bmp_info, + DIB_RGB_COLORS, + &bmp_buf, + 0, 0); if (!bitmap || !bmp_buf) signal_simple_error ("Unable to create bitmap", instantiator); @@ -340,15 +350,15 @@ init_image_instance_from_dibitmap (Lisp_Image_Instance *ii, IMAGE_INSTANCE_MSWINDOWS_BITMAP (ii) = bitmap; IMAGE_INSTANCE_MSWINDOWS_MASK (ii) = NULL; - IMAGE_INSTANCE_PIXMAP_WIDTH (ii) = bmp_info->bmiHeader.biWidth; - IMAGE_INSTANCE_PIXMAP_HEIGHT (ii) = bmp_info->bmiHeader.biHeight; - IMAGE_INSTANCE_PIXMAP_DEPTH (ii) = bmp_info->bmiHeader.biBitCount; + IMAGE_INSTANCE_PIXMAP_WIDTH (ii) = bmp_info->bmiHeader.biWidth; + IMAGE_INSTANCE_PIXMAP_HEIGHT (ii) = bmp_info->bmiHeader.biHeight; + IMAGE_INSTANCE_PIXMAP_DEPTH (ii) = bmp_info->bmiHeader.biBitCount; XSETINT (IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii), x_hot); XSETINT (IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii), y_hot); if (create_mask) { - mswindows_initialize_image_instance_mask (ii, f); + mswindows_initialize_image_instance_mask (ii, hdc); } if (type == IMAGE_POINTER) @@ -365,12 +375,10 @@ image_instance_add_dibitmap (Lisp_Image_Instance *ii, int slice, Lisp_Object instantiator) { - Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); - struct device *d = XDEVICE (device); - struct frame *f = XFRAME (DEVICE_SELECTED_FRAME (d)); + struct device *d = XDEVICE (IMAGE_INSTANCE_DEVICE (ii)); void* bmp_buf=0; - HDC hdc = FRAME_MSWINDOWS_CDC (f); - HBITMAP bitmap = CreateDIBSection (hdc, + + HBITMAP bitmap = CreateDIBSection (get_device_compdc (d), bmp_info, DIB_RGB_COLORS, &bmp_buf, @@ -400,8 +408,7 @@ mswindows_init_image_instance_from_eimage (Lisp_Image_Instance *ii, COLORREF bkcolor; int slice; - if (!DEVICE_MSWINDOWS_P (XDEVICE (device))) - signal_simple_error ("Not an mswindows device", device); + CHECK_MSGDI_DEVICE (device); /* this is a hack but MaskBlt and TransparentBlt are not supported on most windows variants */ @@ -433,38 +440,38 @@ mswindows_init_image_instance_from_eimage (Lisp_Image_Instance *ii, } } -static void set_mono_pixel ( unsigned char* bits, - int bpline, int height, - int x, int y, int white ) +inline static void +set_mono_pixel (unsigned char* bits, + int bpline, int height, + int x, int y, int white) { int i; - unsigned char bitnum; + unsigned char bitnum; /* Find the byte on which this scanline begins */ i = (height - y - 1) * bpline; /* Find the byte containing this pixel */ i += (x >> 3); /* Which bit is it? */ - bitnum = (unsigned char)( 7 - (x % 8) ); - if( white ) /* Turn it on */ - bits[i] |= (1<bmiHeader.biWidth=IMAGE_INSTANCE_PIXMAP_WIDTH (image); bmp_info->bmiHeader.biHeight = height; - bmp_info->bmiHeader.biPlanes=1; + bmp_info->bmiHeader.biPlanes = 1; bmp_info->bmiHeader.biSize=sizeof(BITMAPINFOHEADER); - bmp_info->bmiHeader.biBitCount=1; - bmp_info->bmiHeader.biCompression=BI_RGB; + bmp_info->bmiHeader.biBitCount = 1; + bmp_info->bmiHeader.biCompression = BI_RGB; bmp_info->bmiHeader.biClrUsed = 2; bmp_info->bmiHeader.biClrImportant = 2; bmp_info->bmiHeader.biSizeImage = height * maskbpline; @@ -504,10 +511,10 @@ mswindows_initialize_image_instance_mask (Lisp_Image_Instance* image, bmp_info->bmiHeader.biWidth=IMAGE_INSTANCE_PIXMAP_WIDTH (image); bmp_info->bmiHeader.biHeight = -height; - bmp_info->bmiHeader.biPlanes=1; + bmp_info->bmiHeader.biPlanes = 1; bmp_info->bmiHeader.biSize=sizeof(BITMAPINFOHEADER); - bmp_info->bmiHeader.biBitCount=24; - bmp_info->bmiHeader.biCompression=BI_RGB; + bmp_info->bmiHeader.biBitCount = 24; + bmp_info->bmiHeader.biCompression = BI_RGB; bmp_info->bmiHeader.biClrUsed = 0; bmp_info->bmiHeader.biClrImportant = 0; bmp_info->bmiHeader.biSizeImage = height * bpline; @@ -578,17 +585,18 @@ mswindows_initialize_image_instance_icon (Lisp_Image_Instance* image, CreateIconIndirect (&x_icon); } -HBITMAP -mswindows_create_resized_bitmap (Lisp_Image_Instance* ii, - struct frame* f, - int newx, int newy) +static HBITMAP +create_resized_bitmap (HBITMAP curbmp, struct frame *f, + int curx, int cury, + int newx, int newy) { HBITMAP newbmp; HGDIOBJ old1, old2; - HDC hcdc = FRAME_MSWINDOWS_CDC (f); + + HDC hcdc = get_device_compdc (XDEVICE (FRAME_DEVICE (f))); HDC hdcDst = CreateCompatibleDC (hcdc); - old1 = SelectObject (hcdc, IMAGE_INSTANCE_MSWINDOWS_BITMAP (ii)); + old1 = SelectObject (hcdc, curbmp); newbmp = CreateCompatibleBitmap (hcdc, newx, newy); @@ -596,8 +604,8 @@ mswindows_create_resized_bitmap (Lisp_Image_Instance* ii, if (!StretchBlt (hdcDst, 0, 0, newx, newy, hcdc, 0, 0, - IMAGE_INSTANCE_PIXMAP_WIDTH (ii), - IMAGE_INSTANCE_PIXMAP_HEIGHT (ii), + curx, + cury, SRCCOPY)) { DeleteObject (newbmp); @@ -613,43 +621,33 @@ mswindows_create_resized_bitmap (Lisp_Image_Instance* ii, } HBITMAP +mswindows_create_resized_bitmap (Lisp_Image_Instance* ii, + struct frame* f, + int newx, int newy) +{ + return create_resized_bitmap (IMAGE_INSTANCE_MSWINDOWS_BITMAP (ii), + f, + IMAGE_INSTANCE_PIXMAP_WIDTH (ii), + IMAGE_INSTANCE_PIXMAP_HEIGHT (ii), + newx, newy); +} + +HBITMAP mswindows_create_resized_mask (Lisp_Image_Instance* ii, struct frame* f, int newx, int newy) { - if (IMAGE_INSTANCE_MSWINDOWS_MASK (ii)) - { - HBITMAP newmask; - HGDIOBJ old1, old2; - HDC hcdc = FRAME_MSWINDOWS_CDC (f); - HDC hdcDst = CreateCompatibleDC (hcdc); - - old1 = SelectObject (hcdc, IMAGE_INSTANCE_MSWINDOWS_MASK (ii)); - newmask = CreateCompatibleBitmap(hcdc, newx, newy); - old2 = SelectObject (hdcDst, newmask); - - if (!StretchBlt(hdcDst, 0, 0, newx, newy, - hcdc, 0, 0, - IMAGE_INSTANCE_PIXMAP_WIDTH (ii), - IMAGE_INSTANCE_PIXMAP_HEIGHT (ii), - SRCCOPY)) - { - DeleteObject (newmask); - DeleteDC (hdcDst); - return NULL; - } - - SelectObject (hdcDst, old2); - SelectObject (hcdc, old1); - - DeleteDC (hdcDst); - - return newmask; - } + if (IMAGE_INSTANCE_MSWINDOWS_MASK (ii) == NULL) + return NULL; - return NULL; + return create_resized_bitmap (IMAGE_INSTANCE_MSWINDOWS_MASK (ii), + f, + IMAGE_INSTANCE_PIXMAP_WIDTH (ii), + IMAGE_INSTANCE_PIXMAP_HEIGHT (ii), + newx, newy); } +#if 0 /* Currently unused */ int mswindows_resize_dibitmap_instance (Lisp_Image_Instance* ii, struct frame* f, @@ -673,6 +671,7 @@ mswindows_resize_dibitmap_instance (Lisp_Image_Instance* ii, return TRUE; } +#endif /********************************************************************** * XPM * @@ -791,7 +790,7 @@ static int xpm_to_eimage (Lisp_Object image, const Extbyte *buffer, default: { signal_double_file_error_2 ("Parsing pixmap data", - "unknown error code", + "unknown error", make_int (result), image); } } @@ -921,8 +920,7 @@ mswindows_xpm_instantiate (Lisp_Object image_instance, Lisp_Object color_symbol_alist = find_keyword_in_vector (instantiator, Q_color_symbols); - if (!DEVICE_MSWINDOWS_P (XDEVICE (device))) - signal_simple_error ("Not an mswindows device", device); + CHECK_MSGDI_DEVICE (device); assert (!NILP (data)); @@ -1007,8 +1005,7 @@ bmp_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, int bmp_bits; Lisp_Object data = find_keyword_in_vector (instantiator, Q_data); - if (!DEVICE_MSWINDOWS_P (XDEVICE (device))) - signal_simple_error ("Not an mswindows device", device); + CHECK_MSGDI_DEVICE (device); assert (!NILP (data)); @@ -1233,8 +1230,7 @@ mswindows_resource_instantiate (Lisp_Object image_instance, Lisp_Object instanti xzero (iconinfo); - if (!DEVICE_MSWINDOWS_P (XDEVICE (device))) - signal_simple_error ("Not an mswindows device", device); + CHECK_MSGDI_DEVICE (device); type = resource_symbol_to_type (resource_type); @@ -1407,7 +1403,8 @@ static int initialized = FALSE; /* easier to fill in at run time */ * Table index for the hex values. Initialized once, first time. * Used for translation value or delimiter significance lookup. */ -static void initHexTable() +static void +initHexTable (void) { /* * We build the table at run time for several reasons: @@ -1440,7 +1437,8 @@ static void initHexTable() /* * read next hex value in the input stream, return -1 if EOF */ -static int NextInt ( FILE *fstream ) +static int +NextInt (FILE *fstream) { int ch; int value = 0; @@ -1730,17 +1728,16 @@ init_image_instance_from_xbm_inline (Lisp_Image_Instance *ii, Lisp_Object mask_filename) { Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); - struct frame* f = XFRAME (DEVICE_SELECTED_FRAME (XDEVICE (device))); Lisp_Object foreground = find_keyword_in_vector (instantiator, Q_foreground); Lisp_Object background = find_keyword_in_vector (instantiator, Q_background); enum image_instance_type type; COLORREF black = PALETTERGB (0,0,0); COLORREF white = PALETTERGB (255,255,255); + HDC hdc; - HDC hdc = FRAME_MSWINDOWS_CDC (f); + CHECK_MSGDI_DEVICE (device); - if (!DEVICE_MSWINDOWS_P (XDEVICE (device))) - signal_simple_error ("Not an MS-Windows device", device); + hdc = get_device_compdc (XDEVICE (device)); if ((dest_mask & IMAGE_MONO_PIXMAP_MASK) && (dest_mask & IMAGE_COLOR_PIXMAP_MASK)) @@ -1855,9 +1852,7 @@ xbm_instantiate_1 (Lisp_Object image_instance, Lisp_Object instantiator, Lisp_Object mask_data = find_keyword_in_vector (instantiator, Q_mask_data); Lisp_Object mask_file = find_keyword_in_vector (instantiator, Q_mask_file); Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); - struct frame* f = XFRAME (DEVICE_SELECTED_FRAME - (XDEVICE (IMAGE_INSTANCE_DEVICE (ii)))); - HDC hdc = FRAME_MSWINDOWS_CDC (f); + HDC hdc = get_device_compdc (XDEVICE (IMAGE_INSTANCE_DEVICE (ii))); HBITMAP mask = 0; if (!NILP (mask_data)) @@ -2230,12 +2225,10 @@ mswindows_subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instant { Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); - struct device* d = XDEVICE (device); Lisp_Object frame = FW_FRAME (domain); HWND wnd; - if (!DEVICE_MSWINDOWS_P (d)) - signal_simple_error ("Not an mswindows device", device); + CHECK_MSWINDOWS_DEVICE (device); /* have to set the type this late in case there is no device instantiation for a widget */ @@ -2354,7 +2347,6 @@ mswindows_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiat /* this function can call lisp */ Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii), style; - struct device* d = XDEVICE (device); Lisp_Object frame = FW_FRAME (domain); Extbyte* nm=0; HWND wnd; @@ -2362,8 +2354,7 @@ mswindows_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiat Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii); Lisp_Gui_Item* pgui = XGUI_ITEM (gui); - if (!DEVICE_MSWINDOWS_P (d)) - signal_simple_error ("Not an mswindows device", device); + CHECK_MSWINDOWS_DEVICE (device); if (!gui_item_active_p (gui)) flags |= WS_DISABLED; @@ -2440,7 +2431,7 @@ mswindows_button_instantiate (Lisp_Object image_instance, Lisp_Object instantiat Lisp_Object pointer_fg, Lisp_Object pointer_bg, int dest_mask, Lisp_Object domain) { - /* this function can call lisp */ + /* This function can call lisp */ Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); HWND wnd; int flags = WS_TABSTOP;/* BS_NOTIFY #### is needed to get exotic feedback @@ -2686,9 +2677,10 @@ mswindows_tab_control_instantiate (Lisp_Object image_instance, Lisp_Object insta Lisp_Object pointer_fg, Lisp_Object pointer_bg, int dest_mask, Lisp_Object domain) { + /* This function can call lisp */ Lisp_Object rest; HWND wnd; - int i = 0; + int i = 0, selected = 0; Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); Lisp_Object orient = find_keyword_in_vector (instantiator, Q_orientation); unsigned int flags = WS_TABSTOP; @@ -2706,38 +2698,49 @@ mswindows_tab_control_instantiate (Lisp_Object image_instance, Lisp_Object insta pointer_bg, dest_mask, domain, WC_TABCONTROL, /* borders don't suit tabs so well */ flags, 0); - wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii); /* add items to the tab */ LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii))) { add_tab_item (image_instance, wnd, XCAR (rest), domain, i); + if (gui_item_selected_p (XCAR (rest))) + selected = i; i++; } + SendMessage (wnd, TCM_SETCURSEL, selected, 0); } /* set the properties of a tab control */ static void mswindows_tab_control_update (Lisp_Object image_instance) { + /* This function can GC if IN_REDISPLAY is false. */ Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); if (IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii)) { HWND wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii); - int i = 0; + int i = 0, selected = 0; Lisp_Object rest; /* delete the pre-existing items */ SendMessage (wnd, TCM_DELETEALLITEMS, 0, 0); + /* Pick up the items we recorded earlier. We do this here so + that the callbacks get set up with the new items. */ + IMAGE_INSTANCE_WIDGET_ITEMS (ii) = + IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii); + IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii) = Qnil; /* add items to the tab */ LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii))) { add_tab_item (image_instance, wnd, XCAR (rest), IMAGE_INSTANCE_SUBWINDOW_FRAME (ii), i); + if (gui_item_selected_p (XCAR (rest))) + selected = i; i++; } + SendMessage (wnd, TCM_SETCURSEL, selected, 0); } } @@ -2926,51 +2929,64 @@ syms_of_glyphs_mswindows (void) void console_type_create_glyphs_mswindows (void) { - /* image methods */ - + /* image methods - display */ CONSOLE_HAS_METHOD (mswindows, print_image_instance); CONSOLE_HAS_METHOD (mswindows, finalize_image_instance); CONSOLE_HAS_METHOD (mswindows, unmap_subwindow); CONSOLE_HAS_METHOD (mswindows, map_subwindow); CONSOLE_HAS_METHOD (mswindows, update_subwindow); + CONSOLE_HAS_METHOD (mswindows, resize_subwindow); CONSOLE_HAS_METHOD (mswindows, update_widget); CONSOLE_HAS_METHOD (mswindows, image_instance_equal); CONSOLE_HAS_METHOD (mswindows, image_instance_hash); CONSOLE_HAS_METHOD (mswindows, init_image_instance_from_eimage); CONSOLE_HAS_METHOD (mswindows, locate_pixmap_file); - CONSOLE_HAS_METHOD (mswindows, resize_subwindow); + + /* image methods - printer */ + CONSOLE_INHERITS_METHOD (msprinter, mswindows, print_image_instance); + CONSOLE_INHERITS_METHOD (msprinter, mswindows, finalize_image_instance); + CONSOLE_INHERITS_METHOD (msprinter, mswindows, image_instance_equal); + CONSOLE_INHERITS_METHOD (msprinter, mswindows, image_instance_hash); + CONSOLE_INHERITS_METHOD (msprinter, mswindows, init_image_instance_from_eimage); + CONSOLE_INHERITS_METHOD (msprinter, mswindows, locate_pixmap_file); } void image_instantiator_format_create_glyphs_mswindows (void) { - IIFORMAT_VALID_CONSOLE (mswindows, nothing); - IIFORMAT_VALID_CONSOLE (mswindows, string); - IIFORMAT_VALID_CONSOLE (mswindows, layout); - IIFORMAT_VALID_CONSOLE (mswindows, formatted_string); - IIFORMAT_VALID_CONSOLE (mswindows, inherit); + IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, nothing); + IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, string); + IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, layout); + IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, formatted_string); + IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, inherit); /* image-instantiator types */ + INITIALIZE_DEVICE_IIFORMAT (mswindows, xbm); + INITIALIZE_DEVICE_IIFORMAT (msprinter, xbm); + IIFORMAT_HAS_DEVMETHOD (mswindows, xbm, instantiate); + IIFORMAT_INHERITS_DEVMETHOD (msprinter, mswindows, xbm, instantiate); #ifdef HAVE_XPM INITIALIZE_DEVICE_IIFORMAT (mswindows, xpm); + INITIALIZE_DEVICE_IIFORMAT (msprinter, xpm); IIFORMAT_HAS_DEVMETHOD (mswindows, xpm, instantiate); + IIFORMAT_INHERITS_DEVMETHOD (msprinter, mswindows, xpm, instantiate); #endif - INITIALIZE_DEVICE_IIFORMAT (mswindows, xbm); - IIFORMAT_HAS_DEVMETHOD (mswindows, xbm, instantiate); #ifdef HAVE_XFACE INITIALIZE_DEVICE_IIFORMAT (mswindows, xface); + INITIALIZE_DEVICE_IIFORMAT (msprinter, xface); IIFORMAT_HAS_DEVMETHOD (mswindows, xface, instantiate); + IIFORMAT_INHERITS_DEVMETHOD (msprinter, mswindows, xface, instantiate); #endif #ifdef HAVE_JPEG - IIFORMAT_VALID_CONSOLE (mswindows, jpeg); + IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, jpeg); #endif #ifdef HAVE_TIFF - IIFORMAT_VALID_CONSOLE (mswindows, tiff); + IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, tiff); #endif #ifdef HAVE_PNG - IIFORMAT_VALID_CONSOLE (mswindows, png); + IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, png); #endif #ifdef HAVE_GIF - IIFORMAT_VALID_CONSOLE (mswindows, gif); + IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, gif); #endif #ifdef HAVE_WIDGETS /* button widget */ @@ -3025,7 +3041,7 @@ image_instantiator_format_create_glyphs_mswindows (void) IIFORMAT_VALID_KEYWORD (bmp, Q_data, check_valid_string); IIFORMAT_VALID_KEYWORD (bmp, Q_file, check_valid_string); - IIFORMAT_VALID_CONSOLE (mswindows, bmp); + IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, bmp); /* mswindows resources */ INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (mswindows_resource, @@ -3040,7 +3056,7 @@ image_instantiator_format_create_glyphs_mswindows (void) check_valid_resource_symbol); IIFORMAT_VALID_KEYWORD (mswindows_resource, Q_resource_id, check_valid_resource_id); IIFORMAT_VALID_KEYWORD (mswindows_resource, Q_file, check_valid_string); - IIFORMAT_VALID_CONSOLE (mswindows, mswindows_resource); + IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, mswindows_resource); } void diff --git a/src/glyphs-widget.c b/src/glyphs-widget.c index ab50d29..355be6e 100644 --- a/src/glyphs-widget.c +++ b/src/glyphs-widget.c @@ -149,6 +149,13 @@ check_valid_callback (Lisp_Object data) } static void +check_valid_int_or_function (Lisp_Object data) +{ + if (!INTP (data) && !CONSP (data)) + signal_simple_error ("must be an integer or expresssion", data); +} + +static void check_valid_symbol (Lisp_Object data) { CHECK_SYMBOL (data); @@ -360,6 +367,8 @@ widget_query_geometry (Lisp_Object image_instance, { Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance); struct image_instantiator_methods* meths; + Lisp_Object dynamic_width = Qnil; + Lisp_Object dynamic_height = Qnil; /* First just set up what we already have. */ if (width) *width = IMAGE_INSTANCE_WIDTH (ii); @@ -402,6 +411,19 @@ widget_query_geometry (Lisp_Object image_instance, *height = h + 2 * WIDGET_BORDER_HEIGHT; } } + /* Finish off with dynamic sizing. */ + if (!NILP (IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (ii))) + { + dynamic_width = Feval (IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (ii)); + if (INTP (dynamic_width)) + *width = XINT (dynamic_width); + } + if (!NILP (IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (ii))) + { + dynamic_height = Feval (IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (ii)); + if (INTP (dynamic_height)) + *height = XINT (dynamic_height); + } } } @@ -484,6 +506,9 @@ initialize_widget_image_instance (Lisp_Image_Instance *ii, Lisp_Object type) IMAGE_INSTANCE_WIDGET_PROPS (ii) = Qnil; SET_IMAGE_INSTANCE_WIDGET_FACE (ii, Qnil); IMAGE_INSTANCE_WIDGET_ITEMS (ii) = allocate_gui_item (); + IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii) = Qnil; + IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (ii) = Qnil; + IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (ii) = Qnil; IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii) = 1; IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP (ii) = 1; IMAGE_INSTANCE_SUBWINDOW_ORIENT (ii) = 0; @@ -618,8 +643,13 @@ widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, geometry gets called. */ if (!NILP (pixwidth)) /* pixwidth takes precendent */ { - pw = XINT (pixwidth); - IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii) = 0; + if (!INTP (pixwidth)) + IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (ii) = pixwidth; + else + { + pw = XINT (pixwidth); + IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii) = 0; + } } else if (!NILP (width)) { @@ -629,8 +659,13 @@ widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, if (!NILP (pixheight)) { - ph = XINT (pixheight); - IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP (ii) = 0; + if (!INTP (pixwidth)) + IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (ii) = pixheight; + else + { + ph = XINT (pixheight); + IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP (ii) = 0; + } } else if (!NILP (height) && XINT (height) > 1) { @@ -756,12 +791,16 @@ tab_control_set_property (Lisp_Object image_instance, if (EQ (prop, Q_items)) { Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image_instance); - check_valid_item_list_1 (val); - IMAGE_INSTANCE_WIDGET_ITEMS (ii) = - Fcons (XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)), - parse_gui_item_tree_children (val)); + check_valid_item_list_1 (val); + /* Don't set the actual items since we might decide not to use + the new ones (because nothing has really changed). If we did + set them and didn't use them then we would get into whole + heaps of trouble when the old items get GC'd. */ + IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii) = + Fcons (XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)), + parse_gui_item_tree_children (val)); IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii) = 1; return Qt; @@ -1099,8 +1138,8 @@ syms_of_glyphs_widget (void) #define VALID_WIDGET_KEYWORDS(type) do { \ IIFORMAT_VALID_KEYWORD (type, Q_width, check_valid_int); \ IIFORMAT_VALID_KEYWORD (type, Q_height, check_valid_int); \ - IIFORMAT_VALID_KEYWORD (type, Q_pixel_width, check_valid_int); \ - IIFORMAT_VALID_KEYWORD (type, Q_pixel_height, check_valid_int); \ + IIFORMAT_VALID_KEYWORD (type, Q_pixel_width, check_valid_int_or_function);\ + IIFORMAT_VALID_KEYWORD (type, Q_pixel_height, check_valid_int_or_function);\ IIFORMAT_VALID_KEYWORD (type, Q_face, check_valid_face); \ } while (0) @@ -1146,7 +1185,7 @@ static void image_instantiator_combo_box (void) IIFORMAT_VALID_KEYWORD (combo_box, Q_width, check_valid_int); IIFORMAT_VALID_KEYWORD (combo_box, Q_height, check_valid_int); - IIFORMAT_VALID_KEYWORD (combo_box, Q_pixel_width, check_valid_int); + IIFORMAT_VALID_KEYWORD (combo_box, Q_pixel_width, check_valid_int_or_function); IIFORMAT_VALID_KEYWORD (combo_box, Q_face, check_valid_face); IIFORMAT_VALID_KEYWORD (combo_box, Q_properties, check_valid_item_list); } @@ -1159,8 +1198,8 @@ static void image_instantiator_scrollbar (void) IIFORMAT_HAS_SHARED_METHOD (scrollbar, instantiate, widget); VALID_GUI_KEYWORDS (scrollbar); - IIFORMAT_VALID_KEYWORD (scrollbar, Q_pixel_width, check_valid_int); - IIFORMAT_VALID_KEYWORD (scrollbar, Q_pixel_height, check_valid_int); + IIFORMAT_VALID_KEYWORD (scrollbar, Q_pixel_width, check_valid_int_or_function); + IIFORMAT_VALID_KEYWORD (scrollbar, Q_pixel_height, check_valid_int_or_function); IIFORMAT_VALID_KEYWORD (scrollbar, Q_face, check_valid_face); } @@ -1218,8 +1257,8 @@ static void image_instantiator_layout (void) IIFORMAT_HAS_METHOD (layout, normalize); IIFORMAT_HAS_METHOD (layout, query_geometry); IIFORMAT_HAS_METHOD (layout, layout); - IIFORMAT_VALID_KEYWORD (layout, Q_pixel_width, check_valid_int); - IIFORMAT_VALID_KEYWORD (layout, Q_pixel_height, check_valid_int); + IIFORMAT_VALID_KEYWORD (layout, Q_pixel_width, check_valid_int_or_function); + IIFORMAT_VALID_KEYWORD (layout, Q_pixel_height, check_valid_int_or_function); IIFORMAT_VALID_KEYWORD (layout, Q_orientation, check_valid_orientation); IIFORMAT_VALID_KEYWORD (layout, Q_justify, check_valid_justification); IIFORMAT_VALID_KEYWORD (layout, Q_border, check_valid_border); diff --git a/src/glyphs-x.c b/src/glyphs-x.c index 6124be4..0651929 100644 --- a/src/glyphs-x.c +++ b/src/glyphs-x.c @@ -2189,6 +2189,12 @@ x_update_widget (Lisp_Image_Instance *p) need to update most other things after the items have changed.*/ if (IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (p)) { + /* Pick up the items we recorded earlier. We do this here so + that the callbacks get set up with the new items. */ + IMAGE_INSTANCE_WIDGET_ITEMS (p) = + IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (p); + IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (p) = Qnil; + wv = gui_items_to_widget_values (IMAGE_INSTANCE_WIDGET_ITEMS (p)); wv->change = STRUCTURAL_CHANGE; @@ -2201,6 +2207,9 @@ x_update_widget (Lisp_Image_Instance *p) /* Now do non structural updates. */ wv = lw_get_all_values (IMAGE_INSTANCE_X_WIDGET_LWID (p)); + if (!wv) + return; + /* Possibly update the colors and font */ if (IMAGE_INSTANCE_WIDGET_FACE_CHANGED (p) || @@ -2692,6 +2701,11 @@ x_tab_control_update (Lisp_Object image_instance) IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii)) { widget_value* wv = lw_get_all_values (IMAGE_INSTANCE_X_WIDGET_LWID (ii)); + + /* #### I don't know why this can occur. */ + if (!wv) + return; + update_tab_widget_face (wv, ii, IMAGE_INSTANCE_SUBWINDOW_FRAME (ii)); diff --git a/src/glyphs.c b/src/glyphs.c index ad542b1..899e33b 100644 --- a/src/glyphs.c +++ b/src/glyphs.c @@ -59,6 +59,7 @@ Lisp_Object Qcolor_pixmap_image_instance_p; Lisp_Object Qpointer_image_instance_p; Lisp_Object Qsubwindow_image_instance_p; Lisp_Object Qlayout_image_instance_p; +Lisp_Object Qupdate_widget_instances; Lisp_Object Qwidget_image_instance_p; Lisp_Object Qconst_glyph_variable; Lisp_Object Qmono_pixmap, Qcolor_pixmap, Qsubwindow; @@ -138,6 +139,7 @@ int hold_ignored_expose_registration; EXFUN (Fimage_instance_type, 1); EXFUN (Fglyph_type, 1); +EXFUN (Fnext_window, 4); /**************************************************************************** @@ -660,6 +662,9 @@ mark_image_instance (Lisp_Object obj) mark_object (IMAGE_INSTANCE_WIDGET_PROPS (i)); mark_object (IMAGE_INSTANCE_WIDGET_FACE (i)); mark_object (IMAGE_INSTANCE_WIDGET_ITEMS (i)); + mark_object (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (i)); + mark_object (IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (i)); + mark_object (IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (i)); case IMAGE_SUBWINDOW: mark_object (IMAGE_INSTANCE_SUBWINDOW_FRAME (i)); break; @@ -897,12 +902,21 @@ image_instance_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) IMAGE_INSTANCE_WIDGET_TYPE (i2)) && IMAGE_INSTANCE_SUBWINDOW_ID (i1) == IMAGE_INSTANCE_SUBWINDOW_ID (i2) + && + EQ (IMAGE_INSTANCE_WIDGET_FACE (i1), + IMAGE_INSTANCE_WIDGET_TYPE (i2)) && internal_equal (IMAGE_INSTANCE_WIDGET_ITEMS (i1), IMAGE_INSTANCE_WIDGET_ITEMS (i2), depth + 1) && internal_equal (IMAGE_INSTANCE_WIDGET_PROPS (i1), IMAGE_INSTANCE_WIDGET_PROPS (i2), depth + 1) + && internal_equal (IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (i1), + IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (i2), + depth + 1) + && internal_equal (IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (i1), + IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (i2), + depth + 1) )) return 0; break; @@ -921,6 +935,22 @@ image_instance_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) } static unsigned long +full_list_hash (Lisp_Object obj, int depth) +{ + unsigned long hash = 0; + Lisp_Object rest; + + if (!CONSP (obj)) + return internal_hash (obj, depth + 1); + + LIST_LOOP (rest, obj) + { + hash = HASH2 (internal_hash (XCAR (rest), depth + 1), hash); + } + return hash; +} + +static unsigned long image_instance_hash (Lisp_Object obj, int depth) { Lisp_Image_Instance *i = XIMAGE_INSTANCE (obj); @@ -950,10 +980,16 @@ image_instance_hash (Lisp_Object obj, int depth) case IMAGE_WIDGET: case IMAGE_LAYOUT: + /* We need the hash to be equivalent to what should be + displayed. */ hash = HASH4 (hash, - internal_hash (IMAGE_INSTANCE_WIDGET_TYPE (i), depth + 1), - internal_hash (IMAGE_INSTANCE_WIDGET_PROPS (i), depth + 1), - internal_hash (IMAGE_INSTANCE_WIDGET_ITEMS (i), depth + 1)); + LISP_HASH (IMAGE_INSTANCE_WIDGET_TYPE (i)), + full_list_hash (IMAGE_INSTANCE_WIDGET_PROPS (i), depth + 1), + full_list_hash + (NILP (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (i)) + ? IMAGE_INSTANCE_WIDGET_ITEMS (i) + : IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (i), + depth + 1)); case IMAGE_SUBWINDOW: hash = HASH2 (hash, (int) IMAGE_INSTANCE_SUBWINDOW_ID (i)); break; @@ -2748,6 +2784,19 @@ image_instantiate (Lisp_Object specifier, Lisp_Object matchspec, Lisp_Object pointer_fg = Qnil; Lisp_Object pointer_bg = Qnil; + if (dest_mask & (IMAGE_SUBWINDOW_MASK + | IMAGE_WIDGET_MASK + | IMAGE_TEXT_MASK)) + { + if (!WINDOWP (domain)) + signal_simple_error ("Can't instantiate text or subwindow outside a window", + instantiator); + else if ((dest_mask & (IMAGE_SUBWINDOW_MASK + | IMAGE_WIDGET_MASK)) + && MINI_WINDOW_P (XWINDOW (domain))) + domain = Fnext_window (domain, Qnil, Qnil, Qnil); + } + if (pointerp) { pointer_fg = FACE_FOREGROUND (Vpointer_face, domain); @@ -2803,9 +2852,6 @@ image_instantiate (Lisp_Object specifier, Lisp_Object matchspec, | IMAGE_WIDGET_MASK | IMAGE_TEXT_MASK)) { - if (!WINDOWP (domain)) - signal_simple_error ("Can't instantiate text or subwindow outside a window", - instantiator); instance = Fgethash (instantiator, XWINDOW (domain)->subwindow_instance_cache, Qunbound); @@ -2841,13 +2887,11 @@ image_instantiate (Lisp_Object specifier, Lisp_Object matchspec, cache. */ if (image_instance_type_to_mask (XIMAGE_INSTANCE_TYPE (instance)) & - (IMAGE_SUBWINDOW_MASK | IMAGE_WIDGET_MASK)) + (IMAGE_SUBWINDOW_MASK + | IMAGE_WIDGET_MASK + | IMAGE_TEXT_MASK )) { - if (!WINDOWP (domain)) - signal_simple_error ("Can't instantiate subwindow outside a window", - instantiator); - - Fsetcdr (XCDR (locative), XWINDOW (domain)->subwindow_instance_cache ); + Fsetcdr (XCDR (locative), XWINDOW (domain)->subwindow_instance_cache); } unbind_to (speccount, Qnil); } @@ -4268,17 +4312,14 @@ int find_matching_subwindow (struct frame* f, int x, int y, int width, int heigh /* Update the displayed characteristics of a subwindow. This function should generally only get called if the subwindow is actually - dirty. The only other time it gets called is if subwindow state - changed, when we can't actually tell whether its going to be dirty - or not. - #### I suspect what we should really do is re-evaluate all the - gui slots that could affect this and then mark the instance as - dirty. Right now, updating everything is safe but expensive. */ + dirty. */ void update_subwindow (Lisp_Object subwindow) { Lisp_Image_Instance* ii = XIMAGE_INSTANCE (subwindow); int count = specpdl_depth (); + unsigned long display_hash = internal_hash (subwindow, + IMAGE_INSTANCE_HASH_DEPTH); /* The update method is allowed to call eval. Since it is quite common for this function to get called from somewhere in @@ -4290,8 +4331,14 @@ update_subwindow (Lisp_Object subwindow) || IMAGE_INSTANCE_TYPE (ii) == IMAGE_LAYOUT) { - if (IMAGE_INSTANCE_TYPE (ii) == IMAGE_WIDGET) - update_widget (subwindow); + if (IMAGE_INSTANCE_TYPE (ii) == IMAGE_WIDGET + && + (display_hash != IMAGE_INSTANCE_DISPLAY_HASH (ii) + || + IMAGE_INSTANCE_DISPLAY_HASH (ii) == 0)) + { + update_widget (subwindow); + } /* Reset the changed flags. */ IMAGE_INSTANCE_WIDGET_FACE_CHANGED (ii) = 0; IMAGE_INSTANCE_WIDGET_PERCENT_CHANGED (ii) = 0; @@ -4306,35 +4353,54 @@ update_subwindow (Lisp_Object subwindow) } IMAGE_INSTANCE_SIZE_CHANGED (ii) = 0; + /* This function is typically called by redisplay just before + outputting the information to the screen. Thus we record a hash + of the output to determine whether on-screen is the same as + recorded structure. This approach has limitations in there is a + good chance that hash values will be different for the same + visual appearance. However, we would rather that then the other + way round - it simply means that we will get more displays than + we might need. We can get better hashing by making the depth + negative - currently it will recurse down 5 levels.*/ + IMAGE_INSTANCE_DISPLAY_HASH (ii) = display_hash; unbind_to (count, Qnil); } /* Update all the subwindows on a frame. */ -void -update_frame_subwindows (struct frame *f) +DEFUN ("update-widget-instances", Fupdate_widget_instances,1, 1, 0, /* +Given a FRAME, re-evaluate the display hash code for all widgets in the frame. +Don't use this. +*/ + (frame)) { int elt; + struct frame* f; + CHECK_FRAME (frame); + f = XFRAME (frame); - /* #### Checking all of these might be overkill now that we update - subwindows in the actual redisplay code. */ - if (f->subwindows_changed || f->subwindows_state_changed || f->faces_changed) - for (elt = 0; elt < Dynarr_length (f->subwindow_cachels); elt++) + /* If we get called we know something has changed. */ + for (elt = 0; elt < Dynarr_length (f->subwindow_cachels); elt++) { struct subwindow_cachel *cachel = Dynarr_atp (f->subwindow_cachels, elt); - if (cachel->being_displayed - && - /* We only want to update if something has really - changed. */ - (f->subwindows_state_changed - || - XIMAGE_INSTANCE_DIRTYP (cachel->subwindow))) + if (cachel->being_displayed && + XIMAGE_INSTANCE_TYPE (cachel->subwindow) + == IMAGE_WIDGET) { - update_subwindow (cachel->subwindow); + /* If a subwindow hash changed mark it so that redisplay + will fix it. */ + if (internal_hash (cachel->subwindow, + IMAGE_INSTANCE_HASH_DEPTH) != + XIMAGE_INSTANCE_DISPLAY_HASH (cachel->subwindow)) + { + set_image_instance_dirty_p (cachel->subwindow, 1); + MARK_FRAME_GLYPHS_CHANGED (f); + } } } + return Qnil; } /* remove a subwindow from its frame */ @@ -4435,26 +4501,25 @@ subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, actually really dumb now that we have dynamic geometry calculations. What should really happen is that the subwindow should query its child for an appropriate geometry. */ - if (NILP (width)) - IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii) = 20; - else + if (INTP (width)) { int w = 1; - CHECK_INT (width); if (XINT (width) > 1) w = XINT (width); IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii) = w; } - if (NILP (height)) - IMAGE_INSTANCE_SUBWINDOW_HEIGHT (ii) = 20; else + IMAGE_INSTANCE_SUBWINDOW_WIDTH (ii) = 20; + + if (INTP (height)) { int h = 1; - CHECK_INT (height); if (XINT (height) > 1) h = XINT (height); IMAGE_INSTANCE_SUBWINDOW_HEIGHT (ii) = h; } + else + IMAGE_INSTANCE_SUBWINDOW_HEIGHT (ii) = 20; } DEFUN ("subwindowp", Fsubwindowp, 1, 1, 0, /* @@ -4696,6 +4761,7 @@ syms_of_glyphs (void) DEFSUBR (Fvalid_image_instantiator_format_p); DEFSUBR (Fset_console_type_image_conversion_list); DEFSUBR (Fconsole_type_image_conversion_list); + DEFSUBR (Fupdate_widget_instances); defkeyword (&Q_file, ":file"); defkeyword (&Q_data, ":data"); @@ -4731,6 +4797,7 @@ syms_of_glyphs (void) defsymbol (&Qwidget_image_instance_p, "widget-image-instance-p"); defsymbol (&Qsubwindow_image_instance_p, "subwindow-image-instance-p"); defsymbol (&Qlayout_image_instance_p, "layout-image-instance-p"); + defsymbol (&Qupdate_widget_instances, "update-widget-instances"); DEFSUBR (Fmake_image_instance); DEFSUBR (Fimage_instance_p); diff --git a/src/glyphs.h b/src/glyphs.h index 771ce7a..b405f9e 100644 --- a/src/glyphs.h +++ b/src/glyphs.h @@ -269,6 +269,10 @@ IIFORMAT_VALID_GENERIC_KEYWORD(format, keyw, validate_fun, 0, 0) entry); \ } while (0) +#define IIFORMAT_VALID_CONSOLE2(con1, con2, format) \ + IIFORMAT_VALID_CONSOLE (con1, format); \ + IIFORMAT_VALID_CONSOLE (con2, format); + #define DEFINE_DEVICE_IIFORMAT(type, format) \ DECLARE_IMAGE_INSTANTIATOR_FORMAT(format); \ struct image_instantiator_methods *type##_##format##_image_instantiator_methods @@ -295,6 +299,11 @@ do { \ #define IIFORMAT_HAS_SHARED_DEVMETHOD(type, format, m, fromformat) \ (type##_##format##_image_instantiator_methods->m##_method = type##_##fromformat##_##m) +#define IIFORMAT_INHERITS_DEVMETHOD(type, from, format, m) \ + (type##_##format##_image_instantiator_methods->m##_method = from##_##format##_##m) +#define IIFORMAT_INHERITS_SHARED_DEVMETHOD(type, from, format, m, fromformat) \ + (type##_##format##_image_instantiator_methods->m##_method = from##_##fromformat##_##m) + struct image_instantiator_methods * decode_device_ii_format (Lisp_Object device, Lisp_Object format, Error_behavior errb); @@ -488,10 +497,14 @@ struct Lisp_Image_Instance enum image_instance_type type; unsigned int x_offset, y_offset; /* for layout purposes */ unsigned int width, height; + unsigned long display_hash; /* Hash value representing the structure + of the image_instance when it was + last displayed. */ unsigned int dirty : 1; unsigned int size_changed : 1; unsigned int text_changed : 1; unsigned int layout_changed : 1; + unsigned int optimize_output : 1; /* For outputting layouts. */ union { @@ -531,6 +544,9 @@ struct Lisp_Image_Instance Lisp_Object type; Lisp_Object props; /* properties or border*/ Lisp_Object items; /* a list of gui_items or children */ + Lisp_Object pending_items; /* gui_items that should be displayed */ + Lisp_Object width; /* dynamic width spec. */ + Lisp_Object height; /* dynamic height spec. */ /* Change flags to augment dirty. */ unsigned int face_changed : 1; unsigned int items_changed : 1; @@ -550,6 +566,8 @@ struct Lisp_Image_Instance #define LAYOUT_JUSTIFY_RIGHT 1 #define LAYOUT_JUSTIFY_CENTER 2 +#define IMAGE_INSTANCE_HASH_DEPTH -2 + /* Accessor macros. */ #define IMAGE_INSTANCE_DEVICE(i) ((i)->device) #define IMAGE_INSTANCE_NAME(i) ((i)->name) @@ -560,6 +578,7 @@ struct Lisp_Image_Instance #define IMAGE_INSTANCE_YOFFSET(i) ((i)->y_offset) #define IMAGE_INSTANCE_WIDTH(i) ((i)->width) #define IMAGE_INSTANCE_HEIGHT(i) ((i)->height) +#define IMAGE_INSTANCE_DISPLAY_HASH(i) ((i)->display_hash) #define IMAGE_INSTANCE_PIXMAP_TYPE_P(i) \ ((IMAGE_INSTANCE_TYPE (i) == IMAGE_MONO_PIXMAP) \ || (IMAGE_INSTANCE_TYPE (i) == IMAGE_COLOR_PIXMAP)) @@ -567,7 +586,8 @@ struct Lisp_Image_Instance #define IMAGE_INSTANCE_NEEDS_LAYOUT(i) \ (IMAGE_INSTANCE_DIRTYP (i) && IMAGE_INSTANCE_LAYOUT_CHANGED (i)) #define IMAGE_INSTANCE_FACE(i) \ - XGLYPH_FACE (IMAGE_INSTANCE_GLYPH (i)) + (GLYPHP (IMAGE_INSTANCE_GLYPH (i)) ? \ + XGLYPH_FACE (IMAGE_INSTANCE_GLYPH (i)) : Qnil) /* Changed flags */ #define IMAGE_INSTANCE_TEXT_CHANGED(i) ((i)->text_changed) @@ -578,8 +598,8 @@ struct Lisp_Image_Instance ((i)->u.subwindow.items_changed) #define IMAGE_INSTANCE_WIDGET_PERCENT_CHANGED(i) \ ((i)->u.subwindow.percent_changed) -#define IMAGE_INSTANCE_LAYOUT_CHANGED(i) \ - ((i)->layout_changed) +#define IMAGE_INSTANCE_LAYOUT_CHANGED(i) ((i)->layout_changed) +#define IMAGE_INSTANCE_OPTIMIZE_OUTPUT(i) ((i)->optimize_output) /* Text properties */ #define IMAGE_INSTANCE_TEXT_STRING(i) ((i)->u.text.string) @@ -632,6 +652,8 @@ struct Lisp_Image_Instance IMAGE_INSTANCE_WIDTH(i) #define IMAGE_INSTANCE_WIDGET_HEIGHT(i) \ IMAGE_INSTANCE_HEIGHT(i) +#define IMAGE_INSTANCE_WIDGET_WIDTH_SUBR(i) ((i)->u.subwindow.width) +#define IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR(i) ((i)->u.subwindow.height) #define IMAGE_INSTANCE_WIDGET_TYPE(i) ((i)->u.subwindow.type) #define IMAGE_INSTANCE_WIDGET_PROPS(i) ((i)->u.subwindow.props) #define SET_IMAGE_INSTANCE_WIDGET_FACE(i,f) \ @@ -641,6 +663,8 @@ struct Lisp_Image_Instance !NILP (IMAGE_INSTANCE_FACE (i)) ? IMAGE_INSTANCE_FACE (i) : \ Vwidget_face) #define IMAGE_INSTANCE_WIDGET_ITEMS(i) ((i)->u.subwindow.items) +#define IMAGE_INSTANCE_WIDGET_PENDING_ITEMS(i) \ + ((i)->u.subwindow.pending_items) #define IMAGE_INSTANCE_WIDGET_ITEM(i) \ (CONSP (IMAGE_INSTANCE_WIDGET_ITEMS (i)) ? \ XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (i)) : \ @@ -661,6 +685,8 @@ XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (i)) : \ IMAGE_INSTANCE_PARENT (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_TYPE(i) \ IMAGE_INSTANCE_TYPE (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_DISPLAY_HASH(i) \ + IMAGE_INSTANCE_DISPLAY_HASH (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_XOFFSET(i) \ IMAGE_INSTANCE_XOFFSET (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_YOFFSET(i) \ @@ -718,6 +744,10 @@ XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (i)) : \ IMAGE_INSTANCE_WIDGET_WIDTH (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_WIDGET_HEIGHT(i) \ IMAGE_INSTANCE_WIDGET_HEIGHT (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_WIDGET_WIDTH_SUBR(i) \ + IMAGE_INSTANCE_WIDGET_WIDTH_SUBR (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_WIDGET_HEIGHT_SUBR(i) \ + IMAGE_INSTANCE_WIDGET_HEIGHT_SUBR (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_WIDGET_TYPE(i) \ IMAGE_INSTANCE_WIDGET_TYPE (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_WIDGET_PROPS(i) \ @@ -730,6 +760,8 @@ XCAR (IMAGE_INSTANCE_WIDGET_ITEMS (i)) : \ IMAGE_INSTANCE_WIDGET_ITEM (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_WIDGET_ITEMS(i) \ IMAGE_INSTANCE_WIDGET_ITEMS (XIMAGE_INSTANCE (i)) +#define XIMAGE_INSTANCE_WIDGET_PENDING_ITEMS(i) \ + IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (XIMAGE_INSTANCE (i)) #define XIMAGE_INSTANCE_WIDGET_TEXT(i) \ IMAGE_INSTANCE_WIDGET_TEXT (XIMAGE_INSTANCE (i)) @@ -854,7 +886,7 @@ extern Lisp_Object Q_mask_file, Q_mask_data, Q_hotspot_x, Q_hotspot_y; extern Lisp_Object Q_foreground, Q_background, Q_face, Q_descriptor, Q_group; extern Lisp_Object Q_width, Q_height, Q_pixel_width, Q_pixel_height, Q_text; extern Lisp_Object Q_items, Q_properties, Q_image, Q_percent, Qimage_conversion_error; -extern Lisp_Object Q_orientation; +extern Lisp_Object Q_orientation, Qupdate_widget_instances; extern Lisp_Object Vcontinuation_glyph, Vcontrol_arrow_glyph, Vhscroll_glyph; extern Lisp_Object Vinvisible_text_glyph, Voctal_escape_glyph, Vtruncation_glyph; extern Lisp_Object Vxemacs_logo; @@ -977,7 +1009,6 @@ void reset_subwindow_cachels (struct frame *f); void unmap_subwindow (Lisp_Object subwindow); void map_subwindow (Lisp_Object subwindow, int x, int y, struct display_glyph_area *dga); -void update_frame_subwindows (struct frame *f); int find_matching_subwindow (struct frame* f, int x, int y, int width, int height); void update_widget (Lisp_Object widget); void update_subwindow (Lisp_Object subwindow); diff --git a/src/gmalloc.c b/src/gmalloc.c index 472bd3f..7358472 100644 --- a/src/gmalloc.c +++ b/src/gmalloc.c @@ -367,7 +367,7 @@ Boston, MA 02111-1307, USA. #endif /* How to really get more memory. */ -#ifdef HEAP_IN_DATA +#if defined (HEAP_IN_DATA) && !defined(PDUMP) /* once dumped, free() & realloc() on static heap space will fail */ #define PURE_DATA(x) \ ((static_heap_dumped && (char*)x >= static_heap_base \ @@ -446,7 +446,7 @@ static int initialize __P ((void)); static int initialize () { -#ifdef HEAP_IN_DATA +#if defined (HEAP_IN_DATA) && !defined(PDUMP) if (static_heap_dumped && __morecore == more_static_core) { __morecore = __default_morecore; diff --git a/src/gpmevent.c b/src/gpmevent.c index 1c879d4..64df9ab 100644 --- a/src/gpmevent.c +++ b/src/gpmevent.c @@ -140,10 +140,10 @@ This function is the process handler for the GPM connection. /* Whow, wouldn't named defines be NICE!?!?! */ modifiers = 0; - if (ev.modifiers & 1) modifiers |= MOD_SHIFT; - if (ev.modifiers & 2) modifiers |= MOD_META; - if (ev.modifiers & 4) modifiers |= MOD_CONTROL; - if (ev.modifiers & 8) modifiers |= MOD_META; + if (ev.modifiers & 1) modifiers |= XEMACS_MOD_SHIFT; + if (ev.modifiers & 2) modifiers |= XEMACS_MOD_META; + if (ev.modifiers & 4) modifiers |= XEMACS_MOD_CONTROL; + if (ev.modifiers & 8) modifiers |= XEMACS_MOD_META; if (ev.buttons & GPM_B_LEFT) { diff --git a/src/gui-msw.c b/src/gui-msw.c index 07b4a79..415d9e2 100644 --- a/src/gui-msw.c +++ b/src/gui-msw.c @@ -36,7 +36,7 @@ Boston, MA 02111-1307, USA. */ * command if we return nil */ Lisp_Object -mswindows_handle_gui_wm_command (struct frame* f, HWND ctrl, DWORD id) +mswindows_handle_gui_wm_command (struct frame* f, HWND ctrl, LPARAM id) { /* Try to map the command id through the proper hash table */ Lisp_Object data, fn, arg, frame; @@ -50,11 +50,14 @@ mswindows_handle_gui_wm_command (struct frame* f, HWND ctrl, DWORD id) if (NILP (data) || UNBOUNDP (data)) return Qnil; - MARK_SUBWINDOWS_STATE_CHANGED; /* Ok, this is our one. Enqueue it. */ get_gui_callback (data, &fn, &arg); XSETFRAME (frame, f); mswindows_enqueue_misc_user_event (frame, fn, arg); + /* The result of this evaluation could cause other instances to change so + enqueue an update callback to check this. */ + mswindows_enqueue_misc_user_event (frame, Qeval, + list2 (Qupdate_widget_instances, frame)); return Qt; } @@ -137,9 +140,9 @@ otherwise it is an integer representing a ShowWindow flag: if (ret > 32) return Qt; - if (ret == ERROR_FILE_NOT_FOUND || ret == SE_ERR_FNF) + if (ret == ERROR_FILE_NOT_FOUND) signal_simple_error ("file not found", document); - else if (ret == ERROR_PATH_NOT_FOUND || ret == SE_ERR_PNF) + else if (ret == ERROR_PATH_NOT_FOUND) signal_simple_error ("path not found", current_dir); else if (ret == ERROR_BAD_FORMAT) signal_simple_error ("bad executable format", document); diff --git a/src/gui-x.c b/src/gui-x.c index 467c3ab..2099351 100644 --- a/src/gui-x.c +++ b/src/gui-x.c @@ -213,6 +213,7 @@ popup_selection_callback (Widget widget, LWLIB_ID ignored_id, Lisp_Object fn, arg; Lisp_Object data; Lisp_Object frame; + int update_subwindows_p = 0; struct device *d = get_device_from_display (XtDisplay (widget)); struct frame *f = x_any_widget_or_parent_to_frame (d, widget); @@ -245,7 +246,7 @@ popup_selection_callback (Widget widget, LWLIB_ID ignored_id, } else { - MARK_SUBWINDOWS_STATE_CHANGED; + update_subwindows_p = 1; get_gui_callback (data, &fn, &arg); } @@ -258,6 +259,11 @@ popup_selection_callback (Widget widget, LWLIB_ID ignored_id, DEVICE_X_MOUSE_TIMESTAMP (d) = DEVICE_X_GLOBAL_MOUSE_TIMESTAMP (d); #endif signal_special_Xt_user_event (frame, fn, arg); + /* The result of this evaluation could cause other instances to change so + enqueue an update callback to check this. */ + if (update_subwindows_p) + signal_special_Xt_user_event (frame, Qeval, + list2 (Qupdate_widget_instances, frame)); } #if 1 @@ -303,6 +309,30 @@ menu_separator_style (const char *s) return NULL; } +char * +strdup_and_add_accel (char *name) +{ + int i; + int found_accel = 0; + + for (i=0; name[i]; ++i) + if (name[i] == '%' && name[i+1] == '_') + { + found_accel = 1; + break; + } + + if (found_accel) + return xstrdup (name); + else + { + char *chars = (char *) alloca (strlen (name) + 3); + chars[0] = '%'; + chars[1] = '_'; + memcpy (chars+2, name, strlen (name) + 1); + return xstrdup (chars); + } +} /* This does the dirty work. gc_currently_forbidden is 1 when this is called. */ @@ -320,7 +350,7 @@ button_item_to_widget_value (Lisp_Object gui_item, widget_value *wv, { wv->type = TEXT_TYPE; wv->name = (char *) XSTRING_DATA (gui_item); - wv->name = xstrdup (wv->name); + wv->name = strdup_and_add_accel (wv->name); return 1; } else if (!GUI_ITEMP (gui_item)) @@ -339,6 +369,9 @@ button_item_to_widget_value (Lisp_Object gui_item, widget_value *wv, } #endif /* HAVE_MENUBARS */ + if (!STRINGP (pgui->name)) + pgui->name = Feval (pgui->name); + CHECK_STRING (pgui->name); wv->name = (char *) XSTRING_DATA (pgui->name); wv->name = xstrdup (wv->name); @@ -388,7 +421,7 @@ button_item_to_widget_value (Lisp_Object gui_item, widget_value *wv, } else if (SYMBOLP (pgui->callback)) /* Show the binding of this command. */ { - char buf [1024]; + char buf[1024]; /* #### */ /* #### Warning, dependency here on current_buffer and point */ where_is_to_char (pgui->callback, buf); if (buf [0]) diff --git a/src/gui-x.h b/src/gui-x.h index d8e581a..f2fa851 100644 --- a/src/gui-x.h +++ b/src/gui-x.h @@ -68,6 +68,7 @@ int popup_handled_p (LWLIB_ID id); void free_popup_widget_value_tree (widget_value *wv); void popup_selection_callback (Widget widget, LWLIB_ID ignored_id, XtPointer client_data); +char *strdup_and_add_accel (char *name); int button_item_to_widget_value (Lisp_Object desc, widget_value *wv, int allow_text_field_p, int no_keys_p); widget_value * gui_items_to_widget_values (Lisp_Object items); diff --git a/src/gui.c b/src/gui.c index 00012a6..d1a546e 100644 --- a/src/gui.c +++ b/src/gui.c @@ -27,6 +27,7 @@ Boston, MA 02111-1307, USA. */ #include "lisp.h" #include "gui.h" #include "elhash.h" +#include "buffer.h" #include "bytecode.h" Lisp_Object Q_active, Q_suffix, Q_keys, Q_style, Q_selected; @@ -108,7 +109,7 @@ gui_item_add_keyval_pair (Lisp_Object gui_item, Lisp_Object key, Lisp_Object val, Error_behavior errb) { - Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item); + Lisp_Gui_Item *pgui_item = XGUI_ITEM (gui_item); if (!KEYWORDP (key)) signal_simple_error_2 ("Non-keyword in gui item", key, pgui_item->name); @@ -132,7 +133,8 @@ gui_item_add_keyval_pair (Lisp_Object gui_item, signal_simple_error ("Bad keyboard accelerator", val); } else if (ERRB_EQ (errb, ERROR_ME)) - signal_simple_error_2 ("Unknown keyword in gui item", key, pgui_item->name); + signal_simple_error_2 ("Unknown keyword in gui item", key, + pgui_item->name); } void @@ -179,7 +181,7 @@ make_gui_item_from_keywords_internal (Lisp_Object item, int length, plist_p, start; Lisp_Object *contents; Lisp_Object gui_item = allocate_gui_item (); - Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item); + Lisp_Gui_Item *pgui_item = XGUI_ITEM (gui_item); CHECK_VECTOR (item); length = XVECTOR_LENGTH (item); @@ -251,7 +253,7 @@ gui_parse_item_keywords_no_errors (Lisp_Object item) void gui_add_item_keywords_to_plist (Lisp_Object plist, Lisp_Object gui_item) { - Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item); + Lisp_Gui_Item *pgui_item = XGUI_ITEM (gui_item); if (!NILP (pgui_item->callback)) Fplist_put (plist, Q_callback, pgui_item->callback); @@ -293,7 +295,7 @@ gui_item_active_p (Lisp_Object gui_item) Lisp_Object gui_item_accelerator (Lisp_Object gui_item) { - Lisp_Gui_Item* pgui = XGUI_ITEM (gui_item); + Lisp_Gui_Item *pgui = XGUI_ITEM (gui_item); if (!NILP (pgui->accelerator)) return pgui->accelerator; @@ -305,23 +307,26 @@ gui_item_accelerator (Lisp_Object gui_item) Lisp_Object gui_name_accelerator (Lisp_Object nm) { - /* !!#### This function has not been Mule-ized */ - char* name = (char*)XSTRING_DATA (nm); - - while (*name) { - if (*name=='%') { - ++name; - if (!(*name)) - return Qnil; - if (*name=='_' && *(name+1)) + Bufbyte *name = XSTRING_DATA (nm); + + while (*name) + { + if (*name == '%') { - int accelerator = (int) (unsigned char) (*(name+1)); - return make_char (tolower (accelerator)); + ++name; + if (!(*name)) + return Qnil; + if (*name == '_' && *(name + 1)) + { + Emchar accelerator = charptr_emchar (name + 1); + /* #### bogus current_buffer dependency */ + return make_char (DOWNCASE (current_buffer, accelerator)); + } } + INC_CHARPTR (name); } - ++name; - } - return Qnil; + return make_char (DOWNCASE (current_buffer, + charptr_emchar (XSTRING_DATA (nm)))); } /* @@ -347,7 +352,7 @@ int gui_item_included_p (Lisp_Object gui_item, Lisp_Object conflist) { /* This function can call lisp */ - Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item); + Lisp_Gui_Item *pgui_item = XGUI_ITEM (gui_item); /* Evaluate :included first. Shortcut to avoid evaluating Qt each time */ if (!EQ (pgui_item->included, Qt) @@ -379,13 +384,13 @@ signal_too_long_error (Lisp_Object name) * buffer. */ unsigned int -gui_item_display_flush_left (Lisp_Object gui_item, - char* buf, Bytecount buf_len) +gui_item_display_flush_left (Lisp_Object gui_item, + char *buf, Bytecount buf_len) { /* This function can call lisp */ char *p = buf; Bytecount len; - Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item); + Lisp_Gui_Item *pgui_item = XGUI_ITEM (gui_item); /* Copy item name first */ CHECK_STRING (pgui_item->name); @@ -429,9 +434,9 @@ gui_item_display_flush_left (Lisp_Object gui_item, */ unsigned int gui_item_display_flush_right (Lisp_Object gui_item, - char* buf, Bytecount buf_len) + char *buf, Bytecount buf_len) { - Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item); + Lisp_Gui_Item *pgui_item = XGUI_ITEM (gui_item); *buf = 0; #ifdef HAVE_MENUBARS @@ -444,16 +449,17 @@ gui_item_display_flush_right (Lisp_Object gui_item, if (!NILP (pgui_item->keys)) { CHECK_STRING (pgui_item->keys); - if (XSTRING_LENGTH (pgui_item->keys) > buf_len) + if (XSTRING_LENGTH (pgui_item->keys) + 1 > buf_len) signal_too_long_error (pgui_item->name); - strcpy (buf, (const char *) XSTRING_DATA (pgui_item->keys)); + memcpy (buf, XSTRING_DATA (pgui_item->keys), + XSTRING_LENGTH (pgui_item->keys) + 1); return XSTRING_LENGTH (pgui_item->keys); } /* See if we can derive keys out of callback symbol */ if (SYMBOLP (pgui_item->callback)) { - char buf2 [1024]; + char buf2[1024]; /* #### */ Bytecount len; where_is_to_char (pgui_item->callback, buf2); @@ -491,7 +497,7 @@ mark_gui_item (Lisp_Object obj) } static unsigned long -gui_item_hash (Lisp_Object obj, int depth) +gui_item_hash_internal (Lisp_Object obj, int depth) { Lisp_Gui_Item *p = XGUI_ITEM (obj); @@ -507,10 +513,29 @@ gui_item_hash (Lisp_Object obj, int depth) internal_hash (p->keys, depth + 1))); } +static unsigned long +gui_item_hash (Lisp_Object obj, int depth) +{ + Lisp_Gui_Item *p = XGUI_ITEM (obj); + + /* Note that this evaluates the active and selected slots so that + the hash changes when the result of these changes. */ + return HASH2 (HASH5 (internal_hash (p->name, depth + 1), + internal_hash (p->callback, depth + 1), + internal_hash (p->suffix, depth + 1), + gui_item_active_p (obj), + internal_hash (p->included, depth + 1)), + HASH5 (internal_hash (p->config, depth + 1), + internal_hash (p->filter, depth + 1), + internal_hash (p->style, depth + 1), + gui_item_selected_p (obj), + internal_hash (p->keys, depth + 1))); +} + int gui_item_id_hash (Lisp_Object hashtable, Lisp_Object gitem, int slot) { - int hashid = gui_item_hash (gitem, 0); + int hashid = gui_item_hash_internal (gitem, 0); int id = GUI_ITEM_ID_BITS (hashid, slot); while (!NILP (Fgethash (make_int (id), hashtable, Qnil))) @@ -570,12 +595,17 @@ print_gui_item (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) The gui_item slot of an image instance can be a single item or an arbitrarily nested hierarchy of item lists. */ -static Lisp_Object parse_gui_item_tree_item (Lisp_Object entry) +static Lisp_Object +parse_gui_item_tree_item (Lisp_Object entry) { Lisp_Object ret = entry; + struct gcpro gcpro1; + + GCPRO1 (ret); + if (VECTORP (entry)) { - ret = gui_parse_item_keywords_no_errors (entry); + ret = gui_parse_item_keywords_no_errors (entry); } else if (STRINGP (entry)) { @@ -584,17 +614,20 @@ static Lisp_Object parse_gui_item_tree_item (Lisp_Object entry) else signal_simple_error ("item must be a vector or a string", entry); - return ret; + RETURN_UNGCPRO (ret); } -Lisp_Object parse_gui_item_tree_children (Lisp_Object list) +Lisp_Object +parse_gui_item_tree_children (Lisp_Object list) { - Lisp_Object rest, ret = Qnil; + Lisp_Object rest, ret = Qnil, sub = Qnil; + struct gcpro gcpro1, gcpro2; + + GCPRO2 (ret, sub); CHECK_CONS (list); /* recursively add items to the tree view */ LIST_LOOP (rest, list) { - Lisp_Object sub; if (CONSP (XCAR (rest))) sub = parse_gui_item_tree_list (XCAR (rest)); else @@ -603,21 +636,30 @@ Lisp_Object parse_gui_item_tree_children (Lisp_Object list) ret = Fcons (sub, ret); } /* make the order the same as the items we have parsed */ - return Fnreverse (ret); + RETURN_UNGCPRO (Fnreverse (ret)); } -static Lisp_Object parse_gui_item_tree_list (Lisp_Object list) +static Lisp_Object +parse_gui_item_tree_list (Lisp_Object list) { Lisp_Object ret; + struct gcpro gcpro1; CHECK_CONS (list); /* first one can never be a list */ ret = parse_gui_item_tree_item (XCAR (list)); - return Fcons (ret, parse_gui_item_tree_children (XCDR (list))); + GCPRO1 (ret); + ret = Fcons (ret, parse_gui_item_tree_children (XCDR (list))); + RETURN_UNGCPRO (ret); +} + +static void +finalize_gui_item (void* header, int for_disksave) +{ } DEFINE_LRECORD_IMPLEMENTATION ("gui-item", gui_item, mark_gui_item, print_gui_item, - 0, gui_item_equal, + finalize_gui_item, gui_item_equal, gui_item_hash, 0, Lisp_Gui_Item); diff --git a/src/gutter.c b/src/gutter.c index d0055c7..ae568f7 100644 --- a/src/gutter.c +++ b/src/gutter.c @@ -1,5 +1,5 @@ /* Gutter implementation. - Copyright (C) 1999 Andy Piper. + Copyright (C) 1999, 2000 Andy Piper. This file is part of XEmacs. @@ -47,6 +47,8 @@ Lisp_Object Vdefault_gutter_border_width; Lisp_Object Vdefault_gutter_position; Lisp_Object Qgutter_size; +Lisp_Object Qgutter_visible; +Lisp_Object Qdefault_gutter_position_changed_hook; #define SET_GUTTER_WAS_VISIBLE_FLAG(frame, pos, flag) \ do { \ @@ -86,6 +88,7 @@ static int gutter_was_visible (struct frame* frame, enum gutter_pos pos) } } +#if 0 static Lisp_Object frame_topmost_window (struct frame *f) { @@ -100,6 +103,7 @@ frame_topmost_window (struct frame *f) return w; } +#endif static Lisp_Object frame_bottommost_window (struct frame *f) @@ -167,7 +171,6 @@ get_gutter_coords (struct frame *f, enum gutter_pos pos, int *x, int *y, int *width, int *height) { struct window - * top = XWINDOW (frame_topmost_window (f)), * bot = XWINDOW (frame_bottommost_window (f)); /* The top and bottom gutters take precedence over the left and right. */ @@ -183,8 +186,7 @@ get_gutter_coords (struct frame *f, enum gutter_pos pos, int *x, int *y, case BOTTOM_GUTTER: *x = FRAME_LEFT_BORDER_END (f); - *y = WINDOW_BOTTOM (bot) - - FRAME_BOTTOM_GUTTER_BOUNDS (f); + *y = WINDOW_BOTTOM (bot); *width = FRAME_RIGHT_BORDER_START (f) - FRAME_LEFT_BORDER_END (f); *height = FRAME_BOTTOM_GUTTER_BOUNDS (f); @@ -192,21 +194,19 @@ get_gutter_coords (struct frame *f, enum gutter_pos pos, int *x, int *y, case LEFT_GUTTER: *x = FRAME_LEFT_BORDER_END (f); - *y = WINDOW_TEXT_TOP (top); + *y = FRAME_TOP_BORDER_END (f) + FRAME_TOP_GUTTER_BOUNDS (f); *width = FRAME_LEFT_GUTTER_BOUNDS (f); *height = WINDOW_BOTTOM (bot) - - (WINDOW_TEXT_TOP (top) - + FRAME_BOTTOM_GUTTER_BOUNDS (f)); + - (FRAME_TOP_BORDER_END (f) + FRAME_TOP_GUTTER_BOUNDS (f)); break; case RIGHT_GUTTER: *x = FRAME_RIGHT_BORDER_START (f) - FRAME_RIGHT_GUTTER_BOUNDS (f); - *y = WINDOW_TEXT_TOP (top); + *y = FRAME_TOP_BORDER_END (f) + FRAME_TOP_GUTTER_BOUNDS (f); *width = FRAME_RIGHT_GUTTER_BOUNDS (f); *height = WINDOW_BOTTOM (bot) - - (WINDOW_TEXT_TOP (top) - + FRAME_BOTTOM_GUTTER_BOUNDS (f)); + - (FRAME_TOP_BORDER_END (f) + FRAME_TOP_GUTTER_BOUNDS (f)); break; default: @@ -214,8 +214,39 @@ get_gutter_coords (struct frame *f, enum gutter_pos pos, int *x, int *y, } } +/* Convert the gutter specifier into something we can actually + display. */ +static Lisp_Object construct_window_gutter_spec (struct window* w, + enum gutter_pos pos) +{ + Lisp_Object rest, *args; + int nargs = 0; + Lisp_Object gutter = RAW_WINDOW_GUTTER (w, pos); + + if (STRINGP (gutter) || NILP (gutter)) + return gutter; + + GET_LIST_LENGTH (gutter, nargs); + args = alloca_array (Lisp_Object, nargs >> 1); + nargs = 0; + + for (rest = gutter; !NILP (rest); rest = XCDR (XCDR (rest))) + { + /* We only put things in the real gutter that are declared to be + visible. */ + if (!CONSP (WINDOW_GUTTER_VISIBLE (w, pos)) + || + !NILP (Fmemq (XCAR (rest), WINDOW_GUTTER_VISIBLE (w, pos)))) + { + args [nargs++] = XCAR (XCDR (rest)); + } + } + + return Fconcat (nargs, args); +} + static void -output_gutter (struct frame *f, enum gutter_pos pos) +output_gutter (struct frame *f, enum gutter_pos pos, int force) { Lisp_Object frame; Lisp_Object window = FRAME_LAST_NONMINIBUF_WINDOW (f); @@ -232,15 +263,15 @@ output_gutter (struct frame *f, enum gutter_pos pos) return; border_width = FRAME_GUTTER_BORDER_WIDTH (f, pos); - findex = get_builtin_face_cache_index (w, Vgui_element_face); + findex = get_builtin_face_cache_index (w, Vwidget_face); - if (!f->current_display_lines) - f->current_display_lines = Dynarr_new (display_line); - if (!f->desired_display_lines) - f->desired_display_lines = Dynarr_new (display_line); + if (!f->current_display_lines[pos]) + f->current_display_lines[pos] = Dynarr_new (display_line); + if (!f->desired_display_lines[pos]) + f->desired_display_lines[pos] = Dynarr_new (display_line); - ddla = f->desired_display_lines; - cdla = f->current_display_lines; + ddla = f->desired_display_lines[pos]; + cdla = f->current_display_lines[pos]; cdla_len = Dynarr_length (cdla); XSETFRAME (frame, f); @@ -251,40 +282,78 @@ output_gutter (struct frame *f, enum gutter_pos pos) x + border_width, y + border_width, width - 2 * border_width, height - 2 * border_width, ddla, 0, findex); - /* Output each line. */ - for (line = 0; line < Dynarr_length (ddla); line++) - { - output_display_line (w, cdla, ddla, line, -1, -1); - } - /* If the number of display lines has shrunk, adjust. */ - if (cdla_len > Dynarr_length (ddla)) + /* We only output the gutter if we think something of significance + has changed. This is, for example, because redisplay can cause + new face cache elements to get added causing compare_runes to + fail because the findex for a particular face has changed. */ + if (force || f->faces_changed || f->frame_changed || + f->gutter_changed || f->glyphs_changed || + f->size_changed || f->subwindows_changed || + w->windows_changed || f->windows_structure_changed || + cdla_len != Dynarr_length (ddla) || + (f->extents_changed && w->gutter_extent_modiff[pos])) { - Dynarr_length (cdla) = Dynarr_length (ddla); +#ifdef DEBUG_GUTTERS + printf ("gutter redisplay triggered by %s\n", force ? "force" : + f->faces_changed ? "f->faces_changed" : + f->frame_changed ? "f->frame_changed" : + f->gutter_changed ? "f->gutter_changed" : + f->glyphs_changed ? "f->glyphs_changed" : + f->size_changed ? "f->size_changed" : + f->subwindows_changed ? "f->subwindows_changed" : + w->windows_changed ? "w->windows_changed" : + f->windows_structure_changed ? "f->windows_structure_changed" : + cdla_len != Dynarr_length (ddla) ? "different display structures" : + f->extents_changed && w->gutter_extent_modiff[pos] ? + "f->extents_changed && w->gutter_extent_modiff[pos]" : ""); +#endif + /* Output each line. */ + for (line = 0; line < Dynarr_length (ddla); line++) + { + output_display_line (w, cdla, ddla, line, -1, -1); + } + + /* If the number of display lines has shrunk, adjust. */ + if (cdla_len > Dynarr_length (ddla)) + { + Dynarr_length (cdla) = Dynarr_length (ddla); + } + + /* grab coordinates of last line and blank after it. */ + dl = Dynarr_atp (ddla, Dynarr_length (ddla) - 1); + ypos = dl->ypos + dl->descent - dl->clip; + redisplay_clear_region (window, findex, x + border_width , ypos, + width - 2 * border_width, height - (ypos - y) - border_width); + /* bevel the gutter area if so desired */ + if (border_width != 0) + { + MAYBE_DEVMETH (d, bevel_area, + (w, findex, x, y, width, height, border_width, + EDGE_ALL, EDGE_BEVEL_OUT)); + } } - - /* grab coordinates of last line and blank after it. */ - dl = Dynarr_atp (ddla, Dynarr_length (ddla) - 1); - ypos = dl->ypos + dl->descent - dl->clip; - redisplay_clear_region (window, findex, x + border_width , ypos, - width - 2 * border_width, height - (ypos - y) - border_width); - /* bevel the gutter area if so desired */ - if (border_width != 0) + else { - MAYBE_DEVMETH (d, bevel_area, - (w, findex, x, y, width, height, border_width, - EDGE_ALL, EDGE_BEVEL_OUT)); + /* Nothing of significance happened so sync the display line + structs. */ + for (line = 0; line < Dynarr_length (ddla); line++) + { + sync_display_line_structs (w, line, 1, cdla, ddla); + } } + + w->gutter_extent_modiff [pos] = 0; } -/* sizing gutters is a pain so we try and help the user by detemining +/* Sizing gutters is a pain so we try and help the user by detemining what height will accommodate all lines. This is useless on left and right gutters as we always have a maximal number of lines. */ static Lisp_Object calculate_gutter_size (struct window *w, enum gutter_pos pos) { struct frame* f = XFRAME (WINDOW_FRAME (w)); - int ypos; + int ypos, count; display_line_dynarr* ddla; struct display_line *dl; @@ -292,13 +361,20 @@ calculate_gutter_size (struct window *w, enum gutter_pos pos) is no reasonable metric to use */ assert (pos == TOP_GUTTER || pos == BOTTOM_GUTTER); /* degenerate case */ - if (NILP (WINDOW_GUTTER (w, pos)) + if (NILP (RAW_WINDOW_GUTTER (w, pos)) || !FRAME_VISIBLE_P (f) || NILP (w->buffer)) return Qnil; + /* Redisplay code that we use relies on GC not happening. Make it + so. */ + count = specpdl_depth (); + record_unwind_protect (restore_gc_inhibit, + make_int (gc_currently_forbidden)); + gc_currently_forbidden = 1; + ddla = Dynarr_new (display_line); /* generate some display lines */ generate_displayable_area (w, WINDOW_GUTTER (w, pos), @@ -308,6 +384,10 @@ calculate_gutter_size (struct window *w, enum gutter_pos pos) - FRAME_LEFT_BORDER_END (f), 200, ddla, 0, 0); + + /* Let GC happen again. */ + unbind_to (count, Qnil); + /* grab coordinates of last line */ if (Dynarr_length (ddla)) { @@ -329,7 +409,7 @@ clear_gutter (struct frame *f, enum gutter_pos pos) int x, y, width, height; Lisp_Object window = FRAME_LAST_NONMINIBUF_WINDOW (f); face_index findex = get_builtin_face_cache_index (XWINDOW (window), - Vgui_element_face); + Vwidget_face); get_gutter_coords (f, pos, &x, &y, &width, &height); SET_GUTTER_WAS_VISIBLE_FLAG (f, pos, 0); @@ -347,19 +427,86 @@ clear_gutter (struct frame *f, enum gutter_pos pos) void mark_gutters (struct frame* f) { - if (f->current_display_lines) - mark_redisplay_structs (f->current_display_lines); - if (f->desired_display_lines) - mark_redisplay_structs (f->desired_display_lines); + enum gutter_pos pos; + GUTTER_POS_LOOP (pos) + { + if (f->current_display_lines[pos]) + mark_redisplay_structs (f->current_display_lines[pos]); + /* #### Do we really need to mark the desired lines? */ + if (f->desired_display_lines[pos]) + mark_redisplay_structs (f->desired_display_lines[pos]); + } +} + +/* This is called by extent_changed_for_redisplay, so that redisplay + knows exactly what extents have changed. */ +void +gutter_extent_signal_changed_region_maybe (Lisp_Object obj, + Bufpos start, Bufpos end) +{ + /* #### Start and end are currently ignored but could be used by a + more optimal gutter redisplay. We currently loop over all frames + here, this could be optimized. */ + Lisp_Object frmcons, devcons, concons; + + FRAME_LOOP_NO_BREAK (frmcons, devcons, concons) + { + struct frame *f = XFRAME (XCAR (frmcons)); + enum gutter_pos pos; + Lisp_Object window = FRAME_LAST_NONMINIBUF_WINDOW (f); + struct window* w = XWINDOW (window); + + GUTTER_POS_LOOP (pos) + { + if (EQ (WINDOW_GUTTER (w, pos), obj)) + { + w->gutter_extent_modiff[pos]++; + } + } + } +} + +/* We have to change the gutter geometry separately to the gutter + update since it needs to occur outside of redisplay proper. */ +void +update_frame_gutter_geometry (struct frame *f) +{ + if (f->gutter_changed || f->windows_structure_changed) + { + enum gutter_pos pos; + + /* If the gutter geometry has changed then re-layout the + frame. If we are in display there is almost no point in doing + anything else since the frame size changes will be delayed + until we are out of redisplay proper. */ + GUTTER_POS_LOOP (pos) + { + if (FRAME_GUTTER_BOUNDS (f, pos) != f->current_gutter_bounds[pos]) + { + int width, height; + pixel_to_char_size (f, FRAME_PIXWIDTH (f), FRAME_PIXHEIGHT (f), + &width, &height); + change_frame_size (f, height, width, 0); + break; + } + } + + GUTTER_POS_LOOP (pos) + { + /* Mark sizes as up-to-date. */ + f->current_gutter_bounds[pos] = FRAME_GUTTER_BOUNDS (f, pos); + } + } } void update_frame_gutters (struct frame *f) { - if (f->gutter_changed || f->clear || - f->glyphs_changed || f->subwindows_changed || - f->windows_changed || f->windows_structure_changed || - f->extents_changed || f->faces_changed) + if (f->faces_changed || f->frame_changed || + f->gutter_changed || f->glyphs_changed || + f->size_changed || f->subwindows_changed || + f->windows_changed || f->windows_structure_changed || + f->extents_changed) { enum gutter_pos pos; @@ -374,10 +521,12 @@ update_frame_gutters (struct frame *f) GUTTER_POS_LOOP (pos) { if (FRAME_GUTTER_VISIBLE (f, pos)) - output_gutter (f, pos); + output_gutter (f, pos, 0); + else if (gutter_was_visible (f, pos)) - clear_gutter (f, pos); + clear_gutter (f, pos); } + f->clip_changed = local_clip_changed; f->buffers_changed = local_buffers_changed; f->gutter_changed = 0; @@ -387,8 +536,12 @@ update_frame_gutters (struct frame *f) void reset_gutter_display_lines (struct frame* f) { - if (f->current_display_lines) - Dynarr_reset (f->current_display_lines); + enum gutter_pos pos; + GUTTER_POS_LOOP (pos) + { + if (f->current_display_lines[pos]) + Dynarr_reset (f->current_display_lines[pos]); + } } static void @@ -412,7 +565,7 @@ redraw_exposed_gutter (struct frame *f, enum gutter_pos pos, int x, int y, /* Even if none of the gutter is in the area, the blank region at the very least must be because the first thing we did is verify that some portion of the gutter is in the exposed region. */ - output_gutter (f, pos); + output_gutter (f, pos, 1); } void @@ -430,15 +583,19 @@ redraw_exposed_gutters (struct frame *f, int x, int y, int width, void free_frame_gutters (struct frame *f) { - if (f->current_display_lines) - { - free_display_lines (f->current_display_lines); - f->current_display_lines = 0; - } - if (f->desired_display_lines) + enum gutter_pos pos; + GUTTER_POS_LOOP (pos) { - free_display_lines (f->desired_display_lines); - f->desired_display_lines = 0; + if (f->current_display_lines[pos]) + { + free_display_lines (f->current_display_lines[pos]); + f->current_display_lines[pos] = 0; + } + if (f->desired_display_lines[pos]) + { + free_display_lines (f->desired_display_lines[pos]); + f->desired_display_lines[pos] = 0; + } } } @@ -482,14 +639,21 @@ See `default-gutter-position'. list1 (Fcons (Qnil, Qzero))); set_specifier_fallback (Vgutter_border_width[new], Vdefault_gutter_border_width); + /* We don't realy want the left and right gutters to default to + visible. */ set_specifier_fallback (Vgutter_visible_p[cur], - list1 (Fcons (Qnil, Qt))); + cur == TOP_GUTTER || cur == BOTTOM_GUTTER ? + list1 (Fcons (Qnil, Qt)) + : list1 (Fcons (Qnil, Qnil))); set_specifier_fallback (Vgutter_visible_p[new], Vdefault_gutter_visible_p); + Vdefault_gutter_position = position; unhold_frame_size_changes (); } + run_hook (Qdefault_gutter_position_changed_hook); + return position; } @@ -558,9 +722,22 @@ gutter_validate (Lisp_Object instantiator) { if (NILP (instantiator)) return; + + /* Must be a string or a plist. */ + if (!STRINGP (instantiator) && NILP (Fvalid_plist_p (instantiator))) + signal_simple_error ("Gutter spec must be string, plist or nil", instantiator); if (!STRINGP (instantiator)) - signal_simple_error ("Gutter spec must be string or nil", instantiator); + { + Lisp_Object rest; + + for (rest = instantiator; !NILP (rest); rest = XCDR (XCDR (rest))) + { + if (!SYMBOLP (XCAR (rest)) + || !STRINGP (XCAR (XCDR (rest)))) + signal_simple_error ("Gutter plist spec must contain strings", instantiator); + } + } } DEFUN ("gutter-specifier-p", Fgutter_specifier_p, 1, 1, 0, /* @@ -570,9 +747,9 @@ The values of the variables `default-gutter', `top-gutter', `left-gutter', `right-gutter', and `bottom-gutter' are always gutter specifiers. -Valid gutter instantiators are called "gutter descriptors" -and are lists of vectors. See `default-gutter' for a description -of the exact format. +Valid gutter instantiators are called "gutter descriptors" and are +either strings or property-lists of strings. See `default-gutter' for +a description of the exact format. */ (object)) { @@ -593,22 +770,50 @@ recompute_overlaying_specifier (Lisp_Object real_one[4]) static void gutter_specs_changed (Lisp_Object specifier, struct window *w, - Lisp_Object oldval) + Lisp_Object oldval, enum gutter_pos pos) { - enum gutter_pos pos; - GUTTER_POS_LOOP (pos) + w->real_gutter[pos] = construct_window_gutter_spec (w, pos); + w->real_gutter_size[pos] = w->gutter_size[pos]; + + if (EQ (w->real_gutter_size[pos], Qautodetect) + && !NILP (w->gutter_visible_p[pos])) { - w->real_gutter_size[pos] = w->gutter_size[pos]; - if (EQ (w->real_gutter_size[pos], Qautodetect) - && !NILP (w->gutter_visible_p[pos])) - { - w->real_gutter_size [pos] = calculate_gutter_size (w, pos); - } + w->real_gutter_size [pos] = calculate_gutter_size (w, pos); } MARK_GUTTER_CHANGED; + MARK_MODELINE_CHANGED; MARK_WINDOWS_CHANGED (w); } +/* We define all of these so we can access which actual gutter changed. */ +static void +top_gutter_specs_changed (Lisp_Object specifier, struct window *w, + Lisp_Object oldval) +{ + gutter_specs_changed (specifier, w, oldval, TOP_GUTTER); +} + +static void +bottom_gutter_specs_changed (Lisp_Object specifier, struct window *w, + Lisp_Object oldval) +{ + gutter_specs_changed (specifier, w, oldval, BOTTOM_GUTTER); +} + +static void +left_gutter_specs_changed (Lisp_Object specifier, struct window *w, + Lisp_Object oldval) +{ + gutter_specs_changed (specifier, w, oldval, LEFT_GUTTER); +} + +static void +right_gutter_specs_changed (Lisp_Object specifier, struct window *w, + Lisp_Object oldval) +{ + gutter_specs_changed (specifier, w, oldval, RIGHT_GUTTER); +} + static void default_gutter_specs_changed (Lisp_Object specifier, struct window *w, Lisp_Object oldval) @@ -632,6 +837,7 @@ gutter_geometry_changed_in_window (Lisp_Object specifier, struct window *w, } MARK_GUTTER_CHANGED; + MARK_MODELINE_CHANGED; MARK_WINDOWS_CHANGED (w); } @@ -656,6 +862,9 @@ default_gutter_visible_p_changed_in_window (Lisp_Object specifier, Lisp_Object oldval) { recompute_overlaying_specifier (Vgutter_visible_p); + /* Need to reconstruct the gutter specifier as it is affected by the + visibility. */ + recompute_overlaying_specifier (Vgutter); } @@ -675,12 +884,69 @@ gutter_size_validate (Lisp_Object instantiator) DEFUN ("gutter-size-specifier-p", Fgutter_size_specifier_p, 1, 1, 0, /* Return non-nil if OBJECT is a gutter-size specifier. + +Gutter-size specifiers are used to specify the size of a gutter. The +values of the variables `default-gutter-size', `top-gutter-size', +`left-gutter-size', `right-gutter-size', and `bottom-gutter-size' are +always gutter-size specifiers. + +Valid gutter-size instantiators are either integers or the special +symbol 'autodetect. If a gutter-size is set to 'autodetect them the +size of the gutter will be adjusted to just accomodate the gutters +contents. 'autodetect only works for top and bottom gutters. */ (object)) { return GUTTER_SIZE_SPECIFIERP (object) ? Qt : Qnil; } +DECLARE_SPECIFIER_TYPE (gutter_visible); +#define GUTTER_VISIBLE_SPECIFIERP(x) SPECIFIER_TYPEP (x, gutter_visible) +DEFINE_SPECIFIER_TYPE (gutter_visible); + +static void +gutter_visible_validate (Lisp_Object instantiator) +{ + if (NILP (instantiator)) + return; + + if (!NILP (instantiator) && !EQ (instantiator, Qt) && !CONSP (instantiator)) + signal_simple_error ("Gutter visibility must be a boolean or list of symbols", + instantiator); + + if (CONSP (instantiator)) + { + Lisp_Object rest; + + EXTERNAL_LIST_LOOP (rest, instantiator) + { + if (!SYMBOLP (XCAR (rest))) + signal_simple_error ("Gutter visibility must be a boolean or list of symbols", + instantiator); + } + } +} + +DEFUN ("gutter-visible-specifier-p", Fgutter_visible_specifier_p, 1, 1, 0, /* +Return non-nil if OBJECT is a gutter-visible specifier. + +Gutter-visible specifiers are used to specify the visibility of a +gutter. The values of the variables `default-gutter-visible-p', +`top-gutter-visible-p', `left-gutter-visible-p', +`right-gutter-visible-p', and `bottom-gutter-visible-p' are always +gutter-visible specifiers. + +Valid gutter-visible instantiators are t, nil or a list of symbols. +If a gutter-visible instantiator is set to a list of symbols, and the +correspondong gutter specification is a property-list strings, then +elements of the gutter specification will only be visible if the +corresponding symbol occurs in the gutter-visible instantiator. +*/ + (object)) +{ + return GUTTER_VISIBLE_SPECIFIERP (object) ? Qt : Qnil; +} + DEFUN ("redisplay-gutter-area", Fredisplay_gutter_area, 0, 0, 0, /* Ensure that all gutters are correctly showing their gutter specifier. */ @@ -696,20 +962,46 @@ Ensure that all gutters are correctly showing their gutter specifier. DEVICE_FRAME_LOOP (frmcons, d) { struct frame *f = XFRAME (XCAR (frmcons)); - - if (FRAME_REPAINT_P (f)) + + /* Sequence is quite important here. We not only want to + redisplay the gutter area but we also want to flush any + frame size changes out so that the gutter redisplay happens + in a kosha environment. + + This is not only so that things look right but so that + glyph redisplay optimization kicks in, by default display + lines will be completely re-output if + f->windows_structure_changed is 1, and this is true if + frame size changes haven't been flushed out. Once frame + size changes have been flushed out we then need to + redisplay the frame in order to flush out pending window + size changes. */ + update_frame_gutter_geometry (f); + + if (f->windows_structure_changed) + redisplay_frame (f, 1); + else if (FRAME_REPAINT_P (f)) { + /* We have to be "in display" when we output the gutter + - make it so. */ + hold_frame_size_changes (); update_frame_gutters (f); + unhold_one_frame_size_changes (f); } } - /* We now call the output_end routine for tty frames. We delay doing so in order to avoid cursor flicker. So much for 100% encapsulation. */ if (DEVICE_TTY_P (d)) DEVMETH (d, output_end, (d)); + + d->gutter_changed = 0; } + /* This is so that further changes to the gutters will trigger redisplay. */ + gutter_changed_set = 0; + gutter_changed = 0; + return Qnil; } @@ -723,6 +1015,7 @@ init_frame_gutters (struct frame *f) initialization. We need to recalculate autodetected gutters. */ GUTTER_POS_LOOP (pos) { + w->real_gutter[pos] = construct_window_gutter_spec (w, pos); w->real_gutter_size[pos] = w->gutter_size[pos]; if (EQ (w->gutter_size[pos], Qautodetect) && !NILP (w->gutter_visible_p[pos])) @@ -732,6 +1025,12 @@ init_frame_gutters (struct frame *f) MARK_WINDOWS_CHANGED (w); } } + + /* Keep a record of the current sizes of things. */ + GUTTER_POS_LOOP (pos) + { + f->current_gutter_bounds[pos] = FRAME_GUTTER_BOUNDS (f, pos); + } } void @@ -739,6 +1038,7 @@ syms_of_gutter (void) { DEFSUBR (Fgutter_specifier_p); DEFSUBR (Fgutter_size_specifier_p); + DEFSUBR (Fgutter_visible_specifier_p); DEFSUBR (Fset_default_gutter_position); DEFSUBR (Fdefault_gutter_position); DEFSUBR (Fgutter_pixel_height); @@ -746,6 +1046,9 @@ syms_of_gutter (void) DEFSUBR (Fredisplay_gutter_area); defsymbol (&Qgutter_size, "gutter-size"); + defsymbol (&Qgutter_visible, "gutter-visible"); + defsymbol (&Qdefault_gutter_position_changed_hook, + "default-gutter-position-changed"); } void @@ -761,13 +1064,14 @@ void specifier_type_create_gutter (void) { INITIALIZE_SPECIFIER_TYPE (gutter, "gutter", "gutter-specifier-p"); - SPECIFIER_HAS_METHOD (gutter, validate); SPECIFIER_HAS_METHOD (gutter, after_change); INITIALIZE_SPECIFIER_TYPE (gutter_size, "gutter-size", "gutter-size-specifier-p"); - SPECIFIER_HAS_METHOD (gutter_size, validate); + + INITIALIZE_SPECIFIER_TYPE (gutter_visible, "gutter-visible", "gutter-visible-specifier-p"); + SPECIFIER_HAS_METHOD (gutter_visible, validate); } void @@ -775,6 +1079,7 @@ reinit_specifier_type_create_gutter (void) { REINITIALIZE_SPECIFIER_TYPE (gutter); REINITIALIZE_SPECIFIER_TYPE (gutter_size); + REINITIALIZE_SPECIFIER_TYPE (gutter_visible); } void @@ -815,11 +1120,11 @@ the visibility and thickness using `default-gutter-visible-p', using position-specific specifiers. That way, you will get sane behavior if the user changes the default gutter position. -The gutter value should be a string or nil. You can attach extents and -glyphs to the string and hence display glyphs and text in other fonts -in the gutter area. - -*/ ); +The gutter value should be a string, a property list of strings or +nil. You can attach extents and glyphs to the string and hence display +glyphs and text in other fonts in the gutter area. If the gutter value +is a property list then the strings will be concatenated together +before being displayed. */ ); Vdefault_gutter = Fmake_specifier (Qgutter); /* #### It would be even nicer if the specifier caching @@ -839,7 +1144,7 @@ See `default-gutter' for a description of a valid gutter instantiator. Vgutter[TOP_GUTTER] = Fmake_specifier (Qgutter); set_specifier_caching (Vgutter[TOP_GUTTER], offsetof (struct window, gutter[TOP_GUTTER]), - gutter_specs_changed, + top_gutter_specs_changed, 0, 0); DEFVAR_SPECIFIER ("bottom-gutter", @@ -856,7 +1161,7 @@ displayed even if you provide a value for `bottom-gutter'. Vgutter[BOTTOM_GUTTER] = Fmake_specifier (Qgutter); set_specifier_caching (Vgutter[BOTTOM_GUTTER], offsetof (struct window, gutter[BOTTOM_GUTTER]), - gutter_specs_changed, + bottom_gutter_specs_changed, 0, 0); DEFVAR_SPECIFIER ("left-gutter", @@ -873,7 +1178,7 @@ displayed even if you provide a value for `left-gutter'. Vgutter[LEFT_GUTTER] = Fmake_specifier (Qgutter); set_specifier_caching (Vgutter[LEFT_GUTTER], offsetof (struct window, gutter[LEFT_GUTTER]), - gutter_specs_changed, + left_gutter_specs_changed, 0, 0); DEFVAR_SPECIFIER ("right-gutter", @@ -890,7 +1195,7 @@ displayed even if you provide a value for `right-gutter'. Vgutter[RIGHT_GUTTER] = Fmake_specifier (Qgutter); set_specifier_caching (Vgutter[RIGHT_GUTTER], offsetof (struct window, gutter[RIGHT_GUTTER]), - gutter_specs_changed, + right_gutter_specs_changed, 0, 0); /* initially, top inherits from default; this can be @@ -955,8 +1260,7 @@ See `default-gutter-height' for more information. Vgutter_size[TOP_GUTTER] = Fmake_specifier (Qgutter_size); set_specifier_caching (Vgutter_size[TOP_GUTTER], offsetof (struct window, gutter_size[TOP_GUTTER]), - gutter_geometry_changed_in_window, - 0, 0); + gutter_geometry_changed_in_window, 0, 0); DEFVAR_SPECIFIER ("bottom-gutter-height", &Vgutter_size[BOTTOM_GUTTER] /* @@ -968,8 +1272,7 @@ See `default-gutter-height' for more information. Vgutter_size[BOTTOM_GUTTER] = Fmake_specifier (Qgutter_size); set_specifier_caching (Vgutter_size[BOTTOM_GUTTER], offsetof (struct window, gutter_size[BOTTOM_GUTTER]), - gutter_geometry_changed_in_window, - 0, 0); + gutter_geometry_changed_in_window, 0, 0); DEFVAR_SPECIFIER ("left-gutter-width", &Vgutter_size[LEFT_GUTTER] /* @@ -981,8 +1284,7 @@ See `default-gutter-height' for more information. Vgutter_size[LEFT_GUTTER] = Fmake_specifier (Qnatnum); set_specifier_caching (Vgutter_size[LEFT_GUTTER], offsetof (struct window, gutter_size[LEFT_GUTTER]), - gutter_geometry_changed_in_window, - 0, 0); + gutter_geometry_changed_in_window, 0, 0); DEFVAR_SPECIFIER ("right-gutter-width", &Vgutter_size[RIGHT_GUTTER] /* @@ -994,8 +1296,7 @@ See `default-gutter-height' for more information. Vgutter_size[RIGHT_GUTTER] = Fmake_specifier (Qnatnum); set_specifier_caching (Vgutter_size[RIGHT_GUTTER], offsetof (struct window, gutter_size[RIGHT_GUTTER]), - gutter_geometry_changed_in_window, - 0, 0); + gutter_geometry_changed_in_window, 0, 0); fb = Qnil; #ifdef HAVE_TTY @@ -1063,8 +1364,7 @@ See `default-gutter-height' for more information. set_specifier_caching (Vgutter_border_width[TOP_GUTTER], offsetof (struct window, gutter_border_width[TOP_GUTTER]), - gutter_geometry_changed_in_window, - 0, 0); + gutter_geometry_changed_in_window, 0, 0); DEFVAR_SPECIFIER ("bottom-gutter-border-width", &Vgutter_border_width[BOTTOM_GUTTER] /* @@ -1077,8 +1377,7 @@ See `default-gutter-height' for more information. set_specifier_caching (Vgutter_border_width[BOTTOM_GUTTER], offsetof (struct window, gutter_border_width[BOTTOM_GUTTER]), - gutter_geometry_changed_in_window, - 0, 0); + gutter_geometry_changed_in_window, 0, 0); DEFVAR_SPECIFIER ("left-gutter-border-width", &Vgutter_border_width[LEFT_GUTTER] /* @@ -1091,8 +1390,7 @@ See `default-gutter-height' for more information. set_specifier_caching (Vgutter_border_width[LEFT_GUTTER], offsetof (struct window, gutter_border_width[LEFT_GUTTER]), - gutter_geometry_changed_in_window, - 0, 0); + gutter_geometry_changed_in_window, 0, 0); DEFVAR_SPECIFIER ("right-gutter-border-width", &Vgutter_border_width[RIGHT_GUTTER] /* @@ -1105,8 +1403,7 @@ See `default-gutter-height' for more information. set_specifier_caching (Vgutter_border_width[RIGHT_GUTTER], offsetof (struct window, gutter_border_width[RIGHT_GUTTER]), - gutter_geometry_changed_in_window, - 0, 0); + gutter_geometry_changed_in_window, 0, 0); fb = Qnil; #ifdef HAVE_TTY @@ -1143,7 +1440,7 @@ instead. `default-gutter-visible-p' and all of the position-specific gutter visibility specifiers have a fallback value of true. */ ); - Vdefault_gutter_visible_p = Fmake_specifier (Qboolean); + Vdefault_gutter_visible_p = Fmake_specifier (Qgutter_visible); set_specifier_caching (Vdefault_gutter_visible_p, offsetof (struct window, default_gutter_visible_p), @@ -1157,12 +1454,11 @@ This is a specifier; use `set-specifier' to change it. See `default-gutter-visible-p' for more information. */ ); - Vgutter_visible_p[TOP_GUTTER] = Fmake_specifier (Qboolean); + Vgutter_visible_p[TOP_GUTTER] = Fmake_specifier (Qgutter_visible); set_specifier_caching (Vgutter_visible_p[TOP_GUTTER], offsetof (struct window, gutter_visible_p[TOP_GUTTER]), - gutter_geometry_changed_in_window, - 0, 0); + top_gutter_specs_changed, 0, 0); DEFVAR_SPECIFIER ("bottom-gutter-visible-p", &Vgutter_visible_p[BOTTOM_GUTTER] /* @@ -1171,12 +1467,11 @@ This is a specifier; use `set-specifier' to change it. See `default-gutter-visible-p' for more information. */ ); - Vgutter_visible_p[BOTTOM_GUTTER] = Fmake_specifier (Qboolean); + Vgutter_visible_p[BOTTOM_GUTTER] = Fmake_specifier (Qgutter_visible); set_specifier_caching (Vgutter_visible_p[BOTTOM_GUTTER], offsetof (struct window, gutter_visible_p[BOTTOM_GUTTER]), - gutter_geometry_changed_in_window, - 0, 0); + bottom_gutter_specs_changed, 0, 0); DEFVAR_SPECIFIER ("left-gutter-visible-p", &Vgutter_visible_p[LEFT_GUTTER] /* @@ -1185,12 +1480,11 @@ This is a specifier; use `set-specifier' to change it. See `default-gutter-visible-p' for more information. */ ); - Vgutter_visible_p[LEFT_GUTTER] = Fmake_specifier (Qboolean); + Vgutter_visible_p[LEFT_GUTTER] = Fmake_specifier (Qgutter_visible); set_specifier_caching (Vgutter_visible_p[LEFT_GUTTER], offsetof (struct window, gutter_visible_p[LEFT_GUTTER]), - gutter_geometry_changed_in_window, - 0, 0); + left_gutter_specs_changed, 0, 0); DEFVAR_SPECIFIER ("right-gutter-visible-p", &Vgutter_visible_p[RIGHT_GUTTER] /* @@ -1199,12 +1493,11 @@ This is a specifier; use `set-specifier' to change it. See `default-gutter-visible-p' for more information. */ ); - Vgutter_visible_p[RIGHT_GUTTER] = Fmake_specifier (Qboolean); + Vgutter_visible_p[RIGHT_GUTTER] = Fmake_specifier (Qgutter_visible); set_specifier_caching (Vgutter_visible_p[RIGHT_GUTTER], offsetof (struct window, gutter_visible_p[RIGHT_GUTTER]), - gutter_geometry_changed_in_window, - 0, 0); + right_gutter_specs_changed, 0, 0); /* initially, top inherits from default; this can be changed with `set-default-gutter-position'. */ diff --git a/src/gutter.h b/src/gutter.h index 967c647..1f642bc 100644 --- a/src/gutter.h +++ b/src/gutter.h @@ -54,6 +54,7 @@ extern Lisp_Object Qgutter; extern Lisp_Object Vgutter_size[4]; extern Lisp_Object Vgutter_border_width[4]; void update_frame_gutters (struct frame *f); +void update_frame_gutter_geometry (struct frame *f); void mark_gutters (struct frame* f); void init_frame_gutters (struct frame *f); void init_device_gutters (struct device *d); @@ -62,17 +63,21 @@ void free_frame_gutters (struct frame *f); void redraw_exposed_gutters (struct frame *f, int x, int y, int width, int height); void reset_gutter_display_lines (struct frame* f); +void gutter_extent_signal_changed_region_maybe (Lisp_Object obj, + Bufpos start, Bufpos end); #define WINDOW_GUTTER_BORDER_WIDTH(w, pos) \ -(NILP ((w)->gutter_border_width[pos]) ? 0 : XINT ((w)->gutter_border_width[pos])) + (INTP ((w)->gutter_border_width[pos]) ? XINT ((w)->gutter_border_width[pos]) : 0) #define WINDOW_GUTTER_SIZE(w, pos) \ -(NILP ((w)->gutter_size[pos]) ? 0 : XINT ((w)->gutter_size[pos])) + (INTP ((w)->gutter_size[pos]) ? XINT ((w)->gutter_size[pos]) : 0) #define WINDOW_GUTTER_SIZE_INTERNAL(w, pos) \ -(NILP ((w)->real_gutter_size[pos]) ? 0 : XINT ((w)->real_gutter_size[pos])) + (INTP ((w)->real_gutter_size[pos]) ? XINT ((w)->real_gutter_size[pos]) : 0) #define WINDOW_GUTTER_VISIBLE(w, pos) \ -((w)->gutter_visible_p[pos]) + ((w)->gutter_visible_p[pos]) #define WINDOW_GUTTER(w, pos) \ -((w)->gutter[pos]) + ((w)->real_gutter[pos]) +#define RAW_WINDOW_GUTTER(w, pos) \ + ((w)->gutter[pos]) #define WINDOW_REAL_GUTTER_SIZE(w, pos) \ (!NILP (WINDOW_GUTTER_VISIBLE (w, pos)) \ @@ -91,17 +96,13 @@ void reset_gutter_display_lines (struct frame* f); /* these macros predicate size on position and type of window */ #define WINDOW_REAL_TOP_GUTTER_BOUNDS(w) \ - ((!MINI_WINDOW_P (w) && window_is_highest (w)) ? \ - WINDOW_REAL_GUTTER_BOUNDS (w,TOP_GUTTER) : 0) + WINDOW_REAL_GUTTER_BOUNDS (w,TOP_GUTTER) #define WINDOW_REAL_BOTTOM_GUTTER_BOUNDS(w) \ - ((!MINI_WINDOW_P (w) && window_is_lowest (w)) ? \ - WINDOW_REAL_GUTTER_BOUNDS (w,BOTTOM_GUTTER) : 0) + WINDOW_REAL_GUTTER_BOUNDS (w,BOTTOM_GUTTER) #define WINDOW_REAL_LEFT_GUTTER_BOUNDS(w) \ - ((!MINI_WINDOW_P (w) && window_is_leftmost (w)) ? \ - WINDOW_REAL_GUTTER_BOUNDS (w,LEFT_GUTTER) : 0) + WINDOW_REAL_GUTTER_BOUNDS (w,LEFT_GUTTER) #define WINDOW_REAL_RIGHT_GUTTER_BOUNDS(w) \ - ((!MINI_WINDOW_P (w) && window_is_rightmost (w)) ? \ - WINDOW_REAL_GUTTER_BOUNDS (w,RIGHT_GUTTER) : 0) + WINDOW_REAL_GUTTER_BOUNDS (w,RIGHT_GUTTER) #define FRAME_GUTTER_VISIBLE(f, pos) \ WINDOW_REAL_GUTTER_VISIBLE (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f)), pos) diff --git a/src/inline.c b/src/inline.c index 8b4fc25..dd05e78 100644 --- a/src/inline.c +++ b/src/inline.c @@ -22,23 +22,23 @@ Boston, MA 02111-1307, USA. */ /* The purpose of this file is so that there is at least one actual definition of each inline function. This is needed under GCC. The - reason is that under GCC we declare our inline functions `extern - inline', which causes the inlined version to get used only for + reason is that under GCC we declare our inline functions `inline + extern', which causes the inlined version to get used only for inlining, and in other cases to generate an external reference to the function. This is more efficient than declaring our inline - functions `static inline', which (in many cases) would cause a separate + functions `inline static', which (in many cases) would cause a separate version of the function to get inserted into every source file that - included the corresponding header file. + included the corresponding header file. See internals.texi. Some compilers that recognize `inline' may not do the same - `extern inline' business, so on those we just do `static inline'. + `inline extern' business, so on those we just do `inline static'. */ /* Note to maintainers: This file contains a list of all header files that use the INLINE macro, either directly, or by using DECLARE_LRECORD. - i.e. the output of ``grep -l -w 'DECLARE_LRECORD|INLINE' *.h'' */ + i.e. the output of ``grep -l -w 'DECLARE_LRECORD|INLINE_HEADER' *.h'' */ -#define DONT_EXTERN_INLINE_FUNCTIONS +#define DONT_EXTERN_INLINE_HEADER_FUNCTIONS #include #include "lisp.h" @@ -53,6 +53,7 @@ Boston, MA 02111-1307, USA. */ #include "faces.h" #include "frame.h" #include "glyphs.h" +#include "gui.h" #include "keymap.h" #include "lstream.h" #include "objects.h" @@ -67,6 +68,11 @@ Boston, MA 02111-1307, USA. */ #include "eldap.h" #endif +#ifdef HAVE_POSTGRESQL +#include +#include "postgresql.h" +#endif + #ifdef HAVE_TOOLBARS #include "toolbar.h" #endif diff --git a/src/keymap.c b/src/keymap.c index 046c5e8..6d5f603 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -37,17 +37,6 @@ Boston, MA 02111-1307, USA. */ #include "insdel.h" #include "keymap.h" #include "window.h" - -#ifdef WINDOWSNT -/* Hmm, under unix we want X modifiers, under NT we want X modifiers if - we are running X and Windows modifiers otherwise. - gak. This is a kludge until we support multiple native GUIs! -*/ -#undef MOD_ALT -#undef MOD_CONTROL -#undef MOD_SHIFT -#endif - #include "events-mod.h" @@ -99,25 +88,25 @@ Boston, MA 02111-1307, USA. */ If the key `C-a' was bound to some command, the hierarchy would look like - keymap-1: associates the integer MOD_CONTROL with keymap-2 + keymap-1: associates the integer XEMACS_MOD_CONTROL with keymap-2 keymap-2: associates "a" with the command Similarly, if the key `C-H-a' was bound to some command, the hierarchy would look like - keymap-1: associates the integer (MOD_CONTROL | MOD_HYPER) + keymap-1: associates the integer (XEMACS_MOD_CONTROL | XEMACS_MOD_HYPER) with keymap-2 keymap-2: associates "a" with the command Note that a special exception is made for the meta modifier, in order to deal with ESC/meta lossage. Any key combination containing the meta modifier is first indexed off of the main map into the meta - submap (with hash key MOD_META) and then indexed off of the + submap (with hash key XEMACS_MOD_META) and then indexed off of the meta submap with the meta modifier removed from the key combination. For example, when associating a command with C-M-H-a, we'd have - keymap-1: associates the integer MOD_META with keymap-2 - keymap-2: associates the integer (MOD_CONTROL | MOD_HYPER) + keymap-1: associates the integer XEMACS_MOD_META with keymap-2 + keymap-2: associates the integer (XEMACS_MOD_CONTROL | XEMACS_MOD_HYPER) with keymap-3 keymap-3: associates "a" with the command @@ -131,7 +120,7 @@ Boston, MA 02111-1307, USA. */ Note that this new model of keymaps takes much of the magic away from the Escape key: the value of the variable `esc-map' is no longer indexed in the `global-map' under the ESC key. It's indexed under the integer - MOD_META. This is not user-visible, however; none of the "bucky" + XEMACS_MOD_META. This is not user-visible, however; none of the "bucky" maps are. There is a hack in Flookup_key() that makes (lookup-key global-map "\^[") @@ -406,32 +395,32 @@ traverse_keymaps (Lisp_Object start_keymap, Lisp_Object start_parents, /* Some low-level functions */ /************************************************************************/ -static unsigned int +static int bucky_sym_to_bucky_bit (Lisp_Object sym) { - if (EQ (sym, Qcontrol)) return MOD_CONTROL; - if (EQ (sym, Qmeta)) return MOD_META; - if (EQ (sym, Qsuper)) return MOD_SUPER; - if (EQ (sym, Qhyper)) return MOD_HYPER; - if (EQ (sym, Qalt)) return MOD_ALT; - if (EQ (sym, Qsymbol)) return MOD_ALT; /* #### - reverse compat */ - if (EQ (sym, Qshift)) return MOD_SHIFT; + if (EQ (sym, Qcontrol)) return XEMACS_MOD_CONTROL; + if (EQ (sym, Qmeta)) return XEMACS_MOD_META; + if (EQ (sym, Qsuper)) return XEMACS_MOD_SUPER; + if (EQ (sym, Qhyper)) return XEMACS_MOD_HYPER; + if (EQ (sym, Qalt)) return XEMACS_MOD_ALT; + if (EQ (sym, Qsymbol)) return XEMACS_MOD_ALT; /* #### - reverse compat */ + if (EQ (sym, Qshift)) return XEMACS_MOD_SHIFT; return 0; } static Lisp_Object -control_meta_superify (Lisp_Object frob, unsigned int modifiers) +control_meta_superify (Lisp_Object frob, int modifiers) { if (modifiers == 0) return frob; frob = Fcons (frob, Qnil); - if (modifiers & MOD_SHIFT) frob = Fcons (Qshift, frob); - if (modifiers & MOD_ALT) frob = Fcons (Qalt, frob); - if (modifiers & MOD_HYPER) frob = Fcons (Qhyper, frob); - if (modifiers & MOD_SUPER) frob = Fcons (Qsuper, frob); - if (modifiers & MOD_CONTROL) frob = Fcons (Qcontrol, frob); - if (modifiers & MOD_META) frob = Fcons (Qmeta, frob); + if (modifiers & XEMACS_MOD_SHIFT) frob = Fcons (Qshift, frob); + if (modifiers & XEMACS_MOD_ALT) frob = Fcons (Qalt, frob); + if (modifiers & XEMACS_MOD_HYPER) frob = Fcons (Qhyper, frob); + if (modifiers & XEMACS_MOD_SUPER) frob = Fcons (Qsuper, frob); + if (modifiers & XEMACS_MOD_CONTROL) frob = Fcons (Qcontrol, frob); + if (modifiers & XEMACS_MOD_META) frob = Fcons (Qmeta, frob); return frob; } @@ -439,7 +428,7 @@ static Lisp_Object make_key_description (const struct key_data *key, int prettify) { Lisp_Object keysym = key->keysym; - unsigned int modifiers = key->modifiers; + int modifiers = key->modifiers; if (prettify && CHARP (keysym)) { @@ -470,12 +459,12 @@ raw_lookup_key (Lisp_Object keymap, /* Relies on caller to gc-protect args */ static Lisp_Object keymap_lookup_directly (Lisp_Object keymap, - Lisp_Object keysym, unsigned int modifiers) + Lisp_Object keysym, int modifiers) { Lisp_Keymap *k; - if ((modifiers & ~(MOD_CONTROL | MOD_META | MOD_SUPER | MOD_HYPER - | MOD_ALT | MOD_SHIFT)) != 0) + if ((modifiers & ~(XEMACS_MOD_CONTROL | XEMACS_MOD_META | XEMACS_MOD_SUPER | XEMACS_MOD_HYPER + | XEMACS_MOD_ALT | XEMACS_MOD_SHIFT)) != 0) abort (); k = XKEYMAP (keymap); @@ -488,14 +477,14 @@ keymap_lookup_directly (Lisp_Object keymap, keysym = i_fart_on_gcc; } - if (modifiers & MOD_META) /* Utterly hateful ESC lossage */ + if (modifiers & XEMACS_MOD_META) /* Utterly hateful ESC lossage */ { - Lisp_Object submap = Fgethash (MAKE_MODIFIER_HASH_KEY (MOD_META), + Lisp_Object submap = Fgethash (MAKE_MODIFIER_HASH_KEY (XEMACS_MOD_META), k->table, Qnil); if (NILP (submap)) return Qnil; k = XKEYMAP (submap); - modifiers &= ~MOD_META; + modifiers &= ~XEMACS_MOD_META; } if (modifiers != 0) @@ -629,7 +618,7 @@ keymap_store_internal (Lisp_Object keysym, Lisp_Keymap *keymap, static Lisp_Object -create_bucky_submap (Lisp_Keymap *k, unsigned int modifiers, +create_bucky_submap (Lisp_Keymap *k, int modifiers, Lisp_Object parent_for_debugging_info) { Lisp_Object submap = Fmake_sparse_keymap (Qnil); @@ -649,24 +638,25 @@ keymap_store (Lisp_Object keymap, const struct key_data *key, Lisp_Object value) { Lisp_Object keysym = key->keysym; - unsigned int modifiers = key->modifiers; + int modifiers = key->modifiers; Lisp_Keymap *k = XKEYMAP (keymap); - assert ((modifiers & ~(MOD_CONTROL | MOD_META | MOD_SUPER | MOD_HYPER - | MOD_ALT | MOD_SHIFT)) == 0); + assert ((modifiers & ~(XEMACS_MOD_CONTROL | XEMACS_MOD_META + | XEMACS_MOD_SUPER | XEMACS_MOD_HYPER + | XEMACS_MOD_ALT | XEMACS_MOD_SHIFT)) == 0); /* If the keysym is a one-character symbol, use the char code instead. */ if (SYMBOLP (keysym) && string_char_length (XSYMBOL (keysym)->name) == 1) keysym = make_char (string_char (XSYMBOL (keysym)->name, 0)); - if (modifiers & MOD_META) /* Utterly hateful ESC lossage */ + if (modifiers & XEMACS_MOD_META) /* Utterly hateful ESC lossage */ { - Lisp_Object submap = Fgethash (MAKE_MODIFIER_HASH_KEY (MOD_META), + Lisp_Object submap = Fgethash (MAKE_MODIFIER_HASH_KEY (XEMACS_MOD_META), k->table, Qnil); if (NILP (submap)) - submap = create_bucky_submap (k, MOD_META, keymap); + submap = create_bucky_submap (k, XEMACS_MOD_META, keymap); k = XKEYMAP (submap); - modifiers &= ~MOD_META; + modifiers &= ~XEMACS_MOD_META; } if (modifiers != 0) @@ -1258,7 +1248,7 @@ Return the number of bindings in the keymap. static void define_key_check_and_coerce_keysym (Lisp_Object spec, Lisp_Object *keysym, - unsigned int modifiers) + int modifiers) { /* Now, check and massage the trailing keysym specifier. */ if (SYMBOLP (*keysym)) @@ -1281,7 +1271,7 @@ define_key_check_and_coerce_keysym (Lisp_Object spec, problems ... */ signal_simple_error ("keysym char must be printable", *keysym); /* #### This bites! I want to be able to write (control shift a) */ - if (modifiers & MOD_SHIFT) + if (modifiers & XEMACS_MOD_SHIFT) signal_simple_error ("The `shift' modifier may not be applied to ASCII keysyms", spec); @@ -1458,14 +1448,14 @@ define_key_parser (Lisp_Object spec, struct key_data *returned_value) } else if (CONSP (spec)) { - unsigned int modifiers = 0; + int modifiers = 0; Lisp_Object keysym = Qnil; Lisp_Object rest = spec; /* First, parse out the leading modifier symbols. */ while (CONSP (rest)) { - unsigned int modifier; + int modifier; keysym = XCAR (rest); modifier = bucky_sym_to_bucky_bit (keysym); @@ -1635,12 +1625,12 @@ define_key_alternate_name (struct key_data *key, struct key_data *returned_value) { Lisp_Object keysym = key->keysym; - unsigned int modifiers = key->modifiers; - unsigned int modifiers_sans_control = (modifiers & (~MOD_CONTROL)); - unsigned int modifiers_sans_meta = (modifiers & (~MOD_META)); + int modifiers = key->modifiers; + int modifiers_sans_control = (modifiers & (~XEMACS_MOD_CONTROL)); + int modifiers_sans_meta = (modifiers & (~XEMACS_MOD_META)); returned_value->keysym = Qnil; /* By default, no "alternate" key */ returned_value->modifiers = 0; - if (modifiers_sans_meta == MOD_CONTROL) + if (modifiers_sans_meta == XEMACS_MOD_CONTROL) { if EQ (keysym, QKspace) MACROLET (make_char ('@'), modifiers); @@ -1667,15 +1657,15 @@ define_key_alternate_name (struct key_data *key, else if (modifiers_sans_meta != 0) return; else if (EQ (keysym, QKbackspace)) /* backspace => c-h */ - MACROLET (make_char ('h'), (modifiers | MOD_CONTROL)); + MACROLET (make_char ('h'), (modifiers | XEMACS_MOD_CONTROL)); else if (EQ (keysym, QKtab)) /* tab => c-i */ - MACROLET (make_char ('i'), (modifiers | MOD_CONTROL)); + MACROLET (make_char ('i'), (modifiers | XEMACS_MOD_CONTROL)); else if (EQ (keysym, QKlinefeed)) /* linefeed => c-j */ - MACROLET (make_char ('j'), (modifiers | MOD_CONTROL)); + MACROLET (make_char ('j'), (modifiers | XEMACS_MOD_CONTROL)); else if (EQ (keysym, QKreturn)) /* return => c-m */ - MACROLET (make_char ('m'), (modifiers | MOD_CONTROL)); + MACROLET (make_char ('m'), (modifiers | XEMACS_MOD_CONTROL)); else if (EQ (keysym, QKescape)) /* escape => c-[ */ - MACROLET (make_char ('['), (modifiers | MOD_CONTROL)); + MACROLET (make_char ('['), (modifiers | XEMACS_MOD_CONTROL)); else return; #undef MACROLET @@ -1908,7 +1898,7 @@ these features. struct gcpro ngcpro1; NGCPRO1 (c); - meta_map = Fgethash (MAKE_MODIFIER_HASH_KEY (MOD_META), + meta_map = Fgethash (MAKE_MODIFIER_HASH_KEY (XEMACS_MOD_META), XKEYMAP (keymap)->table, Qnil); if (!NILP (meta_map) && keymap_fullness (meta_map) != 0) @@ -1935,14 +1925,14 @@ these features. if (metized) { - raw_key1.modifiers |= MOD_META; - raw_key2.modifiers |= MOD_META; + raw_key1.modifiers |= XEMACS_MOD_META; + raw_key2.modifiers |= XEMACS_MOD_META; metized = 0; } /* This crap is to make sure that someone doesn't bind something like "C-x M-a" while "C-x ESC" has a non-keymap binding. */ - if (raw_key1.modifiers & MOD_META) + if (raw_key1.modifiers & XEMACS_MOD_META) ensure_meta_prefix_char_keymapp (keys, idx, keymap); if (++idx == len) @@ -2065,7 +2055,7 @@ raw_lookup_key_mapper (Lisp_Object k, void *arg) if (NILP (cmd)) { /* Do kludgy return of the meta-map */ - cmd = Fgethash (MAKE_MODIFIER_HASH_KEY (MOD_META), + cmd = Fgethash (MAKE_MODIFIER_HASH_KEY (XEMACS_MOD_META), XKEYMAP (k)->table, Qnil); } } @@ -2077,11 +2067,11 @@ raw_lookup_key_mapper (Lisp_Object k, void *arg) if (!NILP (cmd)) cmd = raw_lookup_key (cmd, raw_keys + 1, remaining, keys_so_far + 1, accept_default); - else if ((raw_keys[1].modifiers & MOD_META) == 0) + else if ((raw_keys[1].modifiers & XEMACS_MOD_META) == 0) { struct key_data metified; metified.keysym = raw_keys[1].keysym; - metified.modifiers = raw_keys[1].modifiers | MOD_META; + metified.modifiers = raw_keys[1].modifiers | XEMACS_MOD_META; /* Search for meta-next-char sequence directly */ cmd = keymap_lookup_1 (k, &metified, accept_default); @@ -2743,7 +2733,7 @@ struct map_keymap_unsorted_closure { void (*fn) (const struct key_data *, Lisp_Object binding, void *arg); void *arg; - unsigned int modifiers; + int modifiers; }; /* used by map_keymap() */ @@ -2754,8 +2744,8 @@ map_keymap_unsorted_mapper (Lisp_Object keysym, Lisp_Object value, /* This function can GC */ struct map_keymap_unsorted_closure *closure = (struct map_keymap_unsorted_closure *) map_keymap_unsorted_closure; - unsigned int modifiers = closure->modifiers; - unsigned int mod_bit; + int modifiers = closure->modifiers; + int mod_bit; mod_bit = MODIFIER_HASH_KEY_BITS (keysym); if (mod_bit != 0) { @@ -2805,7 +2795,7 @@ map_keymap_sort_predicate (Lisp_Object obj1, Lisp_Object obj2, { /* obj1 and obj2 are conses with keysyms in their cars. Cdrs are ignored. */ - unsigned int bit1, bit2; + int bit1, bit2; int sym1_p = 0; int sym2_p = 0; obj1 = XCAR (obj1); @@ -2879,7 +2869,7 @@ map_keymap_sort_predicate (Lisp_Object obj1, Lisp_Object obj2, /* used by map_keymap() */ static void map_keymap_sorted (Lisp_Object keymap_table, - unsigned int modifiers, + int modifiers, void (*function) (const struct key_data *key, Lisp_Object binding, void *map_keymap_sorted_closure), @@ -2904,7 +2894,7 @@ map_keymap_sorted (Lisp_Object keymap_table, { Lisp_Object keysym = XCAR (XCAR (contents)); Lisp_Object binding = XCDR (XCAR (contents)); - unsigned int sub_bits = MODIFIER_HASH_KEY_BITS (keysym); + int sub_bits = MODIFIER_HASH_KEY_BITS (keysym); if (sub_bits != 0) map_keymap_sorted (XKEYMAP (get_keymap (binding, 1, 1))->table, @@ -3010,11 +3000,11 @@ struct accessible_keymaps_closure static void accessible_keymaps_mapper_1 (Lisp_Object keysym, Lisp_Object contents, - unsigned int modifiers, + int modifiers, struct accessible_keymaps_closure *closure) { /* This function can GC */ - unsigned int subbits = MODIFIER_HASH_KEY_BITS (keysym); + int subbits = MODIFIER_HASH_KEY_BITS (keysym); if (subbits != 0) { @@ -3492,7 +3482,7 @@ format_raw_keys (struct key_data *keys, int count, char *buf) keys_so_far and modifiers_so_far describe which map we're looking in; If we're in the "meta" submap of the map that "C-x 4" is bound to, then keys_so_far will be {(control x), \4}, and modifiers_so_far - will be MOD_META. That is, keys_so_far is the chain of keys that we + will be XEMACS_MOD_META. That is, keys_so_far is the chain of keys that we have followed, and modifiers_so_far_so_far is the bits (partial keys) beyond that. @@ -3510,7 +3500,7 @@ struct where_is_closure int shadow_count; int firstonly; int keys_count; - unsigned int modifiers_so_far; + int modifiers_so_far; char *target_buffer; struct key_data *keys_so_far; int keys_so_far_total_size; @@ -3526,8 +3516,8 @@ where_is_recursive_mapper (Lisp_Object map, void *arg) struct where_is_closure *c = (struct where_is_closure *) arg; Lisp_Object definition = c->definition; const int firstonly = c->firstonly; - const unsigned int keys_count = c->keys_count; - const unsigned int modifiers_so_far = c->modifiers_so_far; + const int keys_count = c->keys_count; + const int modifiers_so_far = c->modifiers_so_far; char *target_buffer = c->target_buffer; Lisp_Object keys = Fgethash (definition, XKEYMAP (map)->inverse_table, @@ -3600,9 +3590,9 @@ where_is_recursive_mapper (Lisp_Object map, void *arg) { Lisp_Object key = XCAR (XCAR (submaps)); Lisp_Object submap = XCDR (XCAR (submaps)); - unsigned int lower_modifiers; + int lower_modifiers; int lower_keys_count = keys_count; - unsigned int bucky; + int bucky; submap = get_keymap (submap, 0, 0); @@ -3933,7 +3923,7 @@ describe_map_mapper (const struct key_data *key, struct describe_map_closure *closure = (struct describe_map_closure *) describe_map_closure; Lisp_Object keysym = key->keysym; - unsigned int modifiers = key->modifiers; + int modifiers = key->modifiers; /* Don't mention suppressed commands. */ if (SYMBOLP (binding) @@ -4007,7 +3997,7 @@ describe_map_sort_predicate (Lisp_Object obj1, Lisp_Object obj2, ( ( . ) . ) keysym and modifiers are used, binding is ignored. */ - unsigned int bit1, bit2; + int bit1, bit2; obj1 = XCAR (obj1); obj2 = XCAR (obj2); bit1 = XINT (XCDR (obj1)); @@ -4127,17 +4117,17 @@ describe_map (Lisp_Object keymap, Lisp_Object elt_prefix, { Lisp_Object elt = XCAR (XCAR (list)); Lisp_Object keysym = XCAR (elt); - unsigned int modifiers = XINT (XCDR (elt)); + int modifiers = XINT (XCDR (elt)); if (!NILP (elt_prefix)) buffer_insert_lisp_string (buf, elt_prefix); - if (modifiers & MOD_META) buffer_insert_c_string (buf, "M-"); - if (modifiers & MOD_CONTROL) buffer_insert_c_string (buf, "C-"); - if (modifiers & MOD_SUPER) buffer_insert_c_string (buf, "S-"); - if (modifiers & MOD_HYPER) buffer_insert_c_string (buf, "H-"); - if (modifiers & MOD_ALT) buffer_insert_c_string (buf, "Alt-"); - if (modifiers & MOD_SHIFT) buffer_insert_c_string (buf, "Sh-"); + if (modifiers & XEMACS_MOD_META) buffer_insert_c_string (buf, "M-"); + if (modifiers & XEMACS_MOD_CONTROL) buffer_insert_c_string (buf, "C-"); + if (modifiers & XEMACS_MOD_SUPER) buffer_insert_c_string (buf, "S-"); + if (modifiers & XEMACS_MOD_HYPER) buffer_insert_c_string (buf, "H-"); + if (modifiers & XEMACS_MOD_ALT) buffer_insert_c_string (buf, "Alt-"); + if (modifiers & XEMACS_MOD_SHIFT) buffer_insert_c_string (buf, "Sh-"); if (SYMBOLP (keysym)) { Lisp_Object code = Fget (keysym, Vcharacter_set_property, Qnil); @@ -4357,7 +4347,7 @@ complex_vars_of_keymap (void) meta_disgustitute = Fmake_keymap (Qnil); Ffset (ESC_prefix, meta_disgustitute); /* no need to protect meta_disgustitute, though */ - keymap_store_internal (MAKE_MODIFIER_HASH_KEY (MOD_META), + keymap_store_internal (MAKE_MODIFIER_HASH_KEY (XEMACS_MOD_META), XKEYMAP (Vcurrent_global_map), meta_disgustitute); XKEYMAP (Vcurrent_global_map)->sub_maps_cache = Qt; diff --git a/src/line-number.c b/src/line-number.c index b0ce90f..cce759f 100644 --- a/src/line-number.c +++ b/src/line-number.c @@ -293,7 +293,7 @@ buffer_line_number (struct buffer *b, Bufpos pos, int cachep) get_nearest_line_number (b, &beg, pos, &cached_lines); } - scan_buffer (b, '\n', beg, pos, pos > beg ? EMACS_INT_MAX : -EMACS_INT_MAX, + scan_buffer (b, '\n', beg, pos, pos > beg ? EMACS_INT_MAX : EMACS_INT_MIN, &shortage, 0); line = EMACS_INT_MAX - shortage; diff --git a/src/lisp-union.h b/src/lisp-union.h index 648f824..4a49f8f 100644 --- a/src/lisp-union.h +++ b/src/lisp-union.h @@ -100,8 +100,8 @@ Lisp_Object; } while (0) # define XPNTRVAL(x) ((x).ui) -INLINE Lisp_Object make_int (EMACS_INT val); -INLINE Lisp_Object +INLINE_HEADER Lisp_Object make_int (EMACS_INT val); +INLINE_HEADER Lisp_Object make_int (EMACS_INT val) { Lisp_Object obj; @@ -109,8 +109,8 @@ make_int (EMACS_INT val) return obj; } -INLINE Lisp_Object make_char (Emchar val); -INLINE Lisp_Object +INLINE_HEADER Lisp_Object make_char (Emchar val); +INLINE_HEADER Lisp_Object make_char (Emchar val) { Lisp_Object obj; diff --git a/src/lisp.h b/src/lisp.h index f632885..fcfddc9 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -510,7 +510,8 @@ enum Lisp_Type #define INT_VALBITS (BITS_PER_EMACS_INT - INT_GCBITS) #define VALBITS (BITS_PER_EMACS_INT - GCBITS) -#define EMACS_INT_MAX ((1UL << INT_VALBITS) -1UL) +#define EMACS_INT_MAX ((EMACS_INT) ((1UL << INT_VALBITS) -1UL)) +#define EMACS_INT_MIN (-(EMACS_INT_MAX) - 1) #ifdef USE_UNION_TYPE # include "lisp-union.h" @@ -855,8 +856,8 @@ EXTERNAL_PROPERTY_LIST_LOOP_7 (key, value, list, len, tail, \ ) /* Return 1 if LIST is properly acyclic and nil-terminated, else 0. */ -INLINE int TRUE_LIST_P (Lisp_Object object); -INLINE int +INLINE_HEADER int TRUE_LIST_P (Lisp_Object object); +INLINE_HEADER int TRUE_LIST_P (Lisp_Object object) { Lisp_Object hare, tortoise; @@ -947,8 +948,8 @@ void resize_string (Lisp_String *s, Bytecount pos, Bytecount delta); #ifdef MULE -INLINE Charcount string_char_length (Lisp_String *s); -INLINE Charcount +INLINE_HEADER Charcount string_char_length (Lisp_String *s); +INLINE_HEADER Charcount string_char_length (Lisp_String *s) { return bytecount_to_charcount (string_data (s), string_length (s)); @@ -1040,16 +1041,16 @@ DECLARE_LRECORD (bit_vector, Lisp_Bit_Vector); #define bit_vector_length(v) ((v)->size) #define bit_vector_next(v) ((v)->next) -INLINE int bit_vector_bit (Lisp_Bit_Vector *v, size_t n); -INLINE int +INLINE_HEADER int bit_vector_bit (Lisp_Bit_Vector *v, size_t n); +INLINE_HEADER int bit_vector_bit (Lisp_Bit_Vector *v, size_t n) { return ((v->bits[n >> LONGBITS_LOG2] >> (n & (LONGBITS_POWER_OF_2 - 1))) & 1); } -INLINE void set_bit_vector_bit (Lisp_Bit_Vector *v, size_t n, int value); -INLINE void +INLINE_HEADER void set_bit_vector_bit (Lisp_Bit_Vector *v, size_t n, int value); +INLINE_HEADER void set_bit_vector_bit (Lisp_Bit_Vector *v, size_t n, int value) { if (value) @@ -1157,8 +1158,8 @@ DECLARE_LRECORD (marker, Lisp_Marker); #ifdef ERROR_CHECK_TYPECHECK -INLINE Emchar XCHAR (Lisp_Object obj); -INLINE Emchar +INLINE_HEADER Emchar XCHAR (Lisp_Object obj); +INLINE_HEADER Emchar XCHAR (Lisp_Object obj) { assert (CHARP (obj)); @@ -1236,16 +1237,16 @@ DECLARE_LRECORD (float, Lisp_Float); #ifdef ERROR_CHECK_TYPECHECK -INLINE EMACS_INT XINT (Lisp_Object obj); -INLINE EMACS_INT +INLINE_HEADER EMACS_INT XINT (Lisp_Object obj); +INLINE_HEADER EMACS_INT XINT (Lisp_Object obj) { assert (INTP (obj)); return XREALINT (obj); } -INLINE EMACS_INT XCHAR_OR_INT (Lisp_Object obj); -INLINE EMACS_INT +INLINE_HEADER EMACS_INT XCHAR_OR_INT (Lisp_Object obj); +INLINE_HEADER EMACS_INT XCHAR_OR_INT (Lisp_Object obj) { assert (INTP (obj) || CHARP (obj)); @@ -2018,7 +2019,7 @@ size_t fixed_type_block_overhead (size_t); #endif #ifdef PDUMP void pdump (void); -int pdump_load (void); +int pdump_load (const char *); extern char *pdump_start, *pdump_end; #define DUMPEDP(adr) ((((char *)(adr)) < pdump_end) && (((char *)(adr)) >= pdump_start)) @@ -2407,7 +2408,7 @@ void clear_message (void); /* Defined in print.c */ void write_string_to_stdio_stream (FILE *, struct console *, const Bufbyte *, Bytecount, Bytecount, - Lisp_Object); + Lisp_Object, int); void debug_print (Lisp_Object); void debug_short_backtrace (int); void temp_output_buffer_setup (Lisp_Object); @@ -2550,6 +2551,7 @@ EXFUN (Fcdr, 1); EXFUN (Fchar_after, 2); EXFUN (Fchar_to_string, 1); EXFUN (Fcheck_valid_plist, 1); +EXFUN (Fvalid_plist_p, 1); EXFUN (Fclear_range_table, 1); EXFUN (Fcoding_category_list, 0); EXFUN (Fcoding_category_system, 1); diff --git a/src/lread.c b/src/lread.c index a1f9ec9..8d1450d 100644 --- a/src/lread.c +++ b/src/lread.c @@ -259,9 +259,9 @@ readchar (Lisp_Object readcharfun) #ifdef DEBUG_XEMACS /* testing Mule */ static int testing_mule = 0; /* Change via debugger */ if (testing_mule) { - if (c >= 0x20 && c <= 0x7E) fprintf (stderr, "%c", c); - else if (c == '\n') fprintf (stderr, "\\n\n"); - else fprintf (stderr, "\\%o ", c); + if (c >= 0x20 && c <= 0x7E) stderr_out ("%c", c); + else if (c == '\n') stderr_out ("\\n\n"); + else stderr_out ("\\%o ", c); } #endif return c; diff --git a/src/lrecord.h b/src/lrecord.h index d222ca3..ef86a38 100644 --- a/src/lrecord.h +++ b/src/lrecord.h @@ -184,7 +184,10 @@ enum lrecord_type lrecord_type_tooltalk_message, lrecord_type_tooltalk_pattern, lrecord_type_ldap, - lrecord_type_count + lrecord_type_pgconn, + lrecord_type_pgresult, + lrecord_type_pgsetenv, + lrecord_type_count /* must be last */ }; struct lrecord_implementation @@ -479,8 +482,9 @@ extern Lisp_Object (*lrecord_markers[]) (Lisp_Object); # define DECLARE_LRECORD(c_name, structtype) \ extern const struct lrecord_implementation lrecord_##c_name; \ -INLINE structtype *error_check_##c_name (Lisp_Object obj); \ -INLINE structtype * \ +INLINE_HEADER structtype * \ +error_check_##c_name (Lisp_Object obj); \ +INLINE_HEADER structtype * \ error_check_##c_name (Lisp_Object obj) \ { \ assert (RECORD_TYPEP (obj, lrecord_type_##c_name)); \ @@ -489,8 +493,9 @@ error_check_##c_name (Lisp_Object obj) \ extern Lisp_Object Q##c_name##p # define DECLARE_NONRECORD(c_name, type_enum, structtype) \ -INLINE structtype *error_check_##c_name (Lisp_Object obj); \ -INLINE structtype * \ +INLINE_HEADER structtype * \ +error_check_##c_name (Lisp_Object obj); \ +INLINE_HEADER structtype * \ error_check_##c_name (Lisp_Object obj) \ { \ assert (XTYPE (obj) == type_enum); \ diff --git a/src/lstream.h b/src/lstream.h index e1674c2..6eba8b1 100644 --- a/src/lstream.h +++ b/src/lstream.h @@ -175,10 +175,10 @@ struct lstream ((lstr)->imp == lstream_##type) #ifdef ERROR_CHECK_TYPECHECK -INLINE struct lstream * +INLINE_HEADER struct lstream * error_check_lstream_type (struct lstream *stream, const Lstream_implementation *imp); -INLINE struct lstream * +INLINE_HEADER struct lstream * error_check_lstream_type (struct lstream *stream, const Lstream_implementation *imp) { @@ -268,8 +268,8 @@ void Lstream_set_character_mode (Lstream *str); #include "mule-charset.h" #endif -INLINE Emchar Lstream_get_emchar (Lstream *stream); -INLINE Emchar +INLINE_HEADER Emchar Lstream_get_emchar (Lstream *stream); +INLINE_HEADER Emchar Lstream_get_emchar (Lstream *stream) { int c = Lstream_getc (stream); @@ -277,8 +277,8 @@ Lstream_get_emchar (Lstream *stream) Lstream_get_emchar_1 (stream, c); } -INLINE int Lstream_put_emchar (Lstream *stream, Emchar ch); -INLINE int +INLINE_HEADER int Lstream_put_emchar (Lstream *stream, Emchar ch); +INLINE_HEADER int Lstream_put_emchar (Lstream *stream, Emchar ch) { return CHAR_ASCII_P (ch) ? @@ -286,8 +286,8 @@ Lstream_put_emchar (Lstream *stream, Emchar ch) Lstream_fput_emchar (stream, ch); } -INLINE void Lstream_unget_emchar (Lstream *stream, Emchar ch); -INLINE void +INLINE_HEADER void Lstream_unget_emchar (Lstream *stream, Emchar ch); +INLINE_HEADER void Lstream_unget_emchar (Lstream *stream, Emchar ch) { if (CHAR_ASCII_P (ch)) diff --git a/src/malloc.c b/src/malloc.c index 599110a..0fc31a0 100644 --- a/src/malloc.c +++ b/src/malloc.c @@ -738,7 +738,7 @@ malloc_stats (size) return v; } int -malloc_mem_used () +malloc_mem_used (void) { int i; int size_used; @@ -757,7 +757,7 @@ malloc_mem_used () } int -malloc_mem_free () +malloc_mem_free (void) { int i; int size_unused; @@ -787,7 +787,7 @@ malloc_mem_free () #ifdef USG static void -get_lim_data () +get_lim_data (void) { #ifdef ULIMIT_BREAK_VALUE lim_data = ULIMIT_BREAK_VALUE; @@ -802,7 +802,7 @@ get_lim_data () #ifndef BSD4_2 static void -get_lim_data () +get_lim_data (void) { lim_data = vlimit (LIM_DATA, -1); } @@ -810,7 +810,7 @@ get_lim_data () #else /* BSD4_2 */ static void -get_lim_data () +get_lim_data (void) { struct rlimit XXrlimit; diff --git a/src/mem-limits.h b/src/mem-limits.h index 427a61c..a7625d0 100644 --- a/src/mem-limits.h +++ b/src/mem-limits.h @@ -123,7 +123,7 @@ static POINTER data_space_start; /* Number of bytes of writable memory we can expect to be able to get */ extern unsigned int lim_data; -#ifdef HEAP_IN_DATA +#if defined (HEAP_IN_DATA) && !defined(PDUMP) extern unsigned long static_heap_size; extern int initialized; static void diff --git a/src/menubar-msw.c b/src/menubar-msw.c index a388c30..7d5b4de 100644 --- a/src/menubar-msw.c +++ b/src/menubar-msw.c @@ -1,7 +1,8 @@ /* Implements an elisp-programmable menubar -- Win32 Copyright (C) 1993, 1994 Free Software Foundation, Inc. Copyright (C) 1995 Tinker Systems and INS Engineering Corp. - Copyright (C) 1997 Kirill M. Katsnelson + Copyright (C) 1997 Kirill M. Katsnelson . + Copyright (C) 2000 Ben Wing. This file is part of XEmacs. @@ -70,7 +71,7 @@ Boston, MA 02111-1307, USA. */ * particular knowledge is bad because this may break in Windows NT * 5.0, or Windows 98, or other future version. Instead, I allow the * hash tables to hang around, and not clear them, unless WM_COMMAND is - * received. This is worthy some memory but more safe. Hacks welcome, + * received. This is worth some memory but more safe. Hacks welcome, * anyways! * */ @@ -93,7 +94,7 @@ Boston, MA 02111-1307, USA. */ #include "window.h" /* #### */ -#define REPLACE_ME_WITH_GLOBAL_VARIABLE_WHICH_CONTROLS_RIHGT_FLUSH 0 +#define REPLACE_ME_WITH_GLOBAL_VARIABLE_WHICH_CONTROLS_RIGHT_FLUSH 0 #define EMPTY_ITEM_ID ((UINT)LISP_TO_VOID (Qunbound)) #define EMPTY_ITEM_NAME "(empty)" @@ -116,52 +117,107 @@ static Lisp_Object current_hash_table; #define MENU_ITEM_ID_BITS(x) (((x) & 0x7FFF) | 0x8000) static HMENU top_level_menu; -/* - * This returns Windows-style menu item string: - * "Left Flush\tRight Flush" - */ -static char* -displayable_menu_item (Lisp_Object gui_item, int bar_p) +/* Translate (in place) %_ to &, %% to %. + Return new length, and (through accel) the accelerator character. + (If there is no accelerator, it will be added on the first character.) + len = number of bytes (not including zero terminator). + maxlen = size of buffer. + We assume and maintain zero-termination. To be absolutely sure + of not hitting an error, maxlen should be >= 2*len + 3. */ + +Bytecount +msw_translate_menu_or_dialog_item (Bufbyte *item, Bytecount len, + Bytecount maxlen, Emchar *accel, + Lisp_Object error_name) { - /* We construct the name in a static buffer. That's fine, because - menu items longer than 128 chars are probably programming errors, - and better be caught than displayed! */ - - static char buf[MAX_MENUITEM_LENGTH+2]; - char *ptr; - unsigned int ll, lr; + Bufbyte *ptr; - /* Left flush part of the string */ - ll = gui_item_display_flush_left (gui_item, buf, MAX_MENUITEM_LENGTH); + *accel = '\0'; /* Escape '&' as '&&' */ - ptr = buf; - while ((ptr = (char*) memchr (ptr, '&', ll - (ptr - buf))) != NULL) + + ptr = item; + while ((ptr = (Bufbyte *) memchr (ptr, '&', len - (ptr - item))) != NULL) { - if (ll + 2 >= MAX_MENUITEM_LENGTH) + if (len + 2 > maxlen) signal_simple_error ("Menu item produces too long displayable string", - XGUI_ITEM (gui_item)->name); - memmove (ptr + 1, ptr, (ll - (ptr - buf)) + 1); - ll++; + error_name); + memmove (ptr + 1, ptr, (len - (ptr - item)) + 1); + len++; ptr += 2; } - /* Replace XEmacs accelerator '%_' with Windows accelerator '&' */ - ptr = buf; - while ((ptr = (char*) memchr (ptr, '%', ll - (ptr - buf))) != NULL) + /* Replace XEmacs accelerator '%_' with Windows accelerator '&' + and `%%' with `%'. */ + ptr = item; + while ((ptr = memchr (ptr, '%', len - (ptr - item))) != NULL) { if (*(ptr + 1) == '_') { *ptr = '&'; - memmove (ptr + 1, ptr + 2, ll - (ptr - buf + 2)); - ll--; + if (!*accel) + /* #### urk ! We need a reference translation table for + case changes that aren't buffer-specific. */ + *accel = DOWNCASE (current_buffer, charptr_emchar (ptr + 2)); + memmove (ptr + 1, ptr + 2, len - (ptr - item + 2) + 1); + len--; + } + else if (*(ptr + 1) == '%') + { + memmove (ptr + 1, ptr + 2, len - (ptr - item + 2) + 1); + len--; } ptr++; } + if (!*accel) + { + if (len + 2 > maxlen) + signal_simple_error ("Menu item produces too long displayable string", + error_name); + ptr = item; + memmove (ptr + 1, ptr, len + 1); + /* #### urk ! We need a reference translation table for + case changes that aren't buffer-specific. */ + *accel = DOWNCASE (current_buffer, charptr_emchar (ptr + 1)); + *ptr = '&'; + + len++; + } + + return len; +} + +/* + * This returns Windows-style menu item string: + * "Left Flush\tRight Flush" + */ + +/* #### This is junk. Need correct handling of sizes. Use a Bufbyte_dynarr, + not a static buffer. */ +static char* +displayable_menu_item (Lisp_Object gui_item, int bar_p, Emchar *accel) +{ + unsigned int ll; + + /* We construct the name in a static buffer. That's fine, because + menu items longer than 128 chars are probably programming errors, + and better be caught than displayed! */ + + static char buf[MAX_MENUITEM_LENGTH+2]; + + /* Left flush part of the string */ + ll = gui_item_display_flush_left (gui_item, buf, MAX_MENUITEM_LENGTH); + + ll = msw_translate_menu_or_dialog_item ((Bufbyte *) buf, ll, + MAX_MENUITEM_LENGTH, accel, + XGUI_ITEM (gui_item)->name); + /* Right flush part, unless we're at the top-level where it's not allowed */ if (!bar_p) { + unsigned int lr; + assert (MAX_MENUITEM_LENGTH > ll + 1); lr = gui_item_display_flush_right (gui_item, buf + ll + 1, MAX_MENUITEM_LENGTH - ll - 1); @@ -251,6 +307,7 @@ checksum_menu_item (Lisp_Object item) static void populate_menu_add_item (HMENU menu, Lisp_Object path, Lisp_Object hash_tab, Lisp_Object item, + Lisp_Object *accel_list, int flush_right, int bar_p) { MENUITEMINFO item_info; @@ -278,63 +335,75 @@ populate_menu_add_item (HMENU menu, Lisp_Object path, /* Submenu */ HMENU submenu; Lisp_Object gui_item = allocate_gui_item (); - Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item); - struct gcpro gcpro1; + Lisp_Gui_Item *pgui_item = XGUI_ITEM (gui_item); + struct gcpro gcpro1, gcpro2, gcpro3; + Emchar accel; - GCPRO1 (gui_item); + GCPRO3 (gui_item, path, *accel_list); menu_parse_submenu_keywords (item, gui_item); if (!STRINGP (pgui_item->name)) - signal_simple_error ("Menu name (first element) must be a string", item); + signal_simple_error ("Menu name (first element) must be a string", + item); if (!gui_item_included_p (gui_item, Vmenubar_configuration)) - return; + { + UNGCPRO; + goto done; + } if (!gui_item_active_p (gui_item)) item_info.fState = MFS_GRAYED; /* Temptation is to put 'else' right here. Although, the displayed item won't have an arrow indicating that it is a popup. So we go ahead a little bit more and create a popup */ - submenu = create_empty_popup_menu(); + submenu = create_empty_popup_menu (); item_info.fMask |= MIIM_SUBMENU; - item_info.dwTypeData = displayable_menu_item (gui_item, bar_p); + item_info.dwTypeData = displayable_menu_item (gui_item, bar_p, &accel); item_info.hSubMenu = submenu; + if (accel && bar_p) + *accel_list = Fcons (make_char (accel), *accel_list); + if (!(item_info.fState & MFS_GRAYED)) { /* Now add the full submenu path as a value to the hash table, keyed by menu handle */ if (NILP(path)) - /* list1 cannot GC */ path = list1 (pgui_item->name); else { Lisp_Object arg[2]; arg[0] = path; arg[1] = list1 (pgui_item->name); - /* Fappend gcpro'es its arg */ path = Fappend (2, arg); } - /* Fputhash GCPRO'es PATH */ Fputhash (hmenu_to_lisp_object (submenu), path, hash_tab); } - UNGCPRO; /* gui_item */ + UNGCPRO; } else if (VECTORP (item)) { /* An ordinary item */ Lisp_Object style, id; Lisp_Object gui_item = gui_parse_item_keywords (item); - Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item); - struct gcpro gcpro1; + Lisp_Gui_Item *pgui_item = XGUI_ITEM (gui_item); + struct gcpro gcpro1, gcpro2; + Emchar accel; - GCPRO1 (gui_item); + GCPRO2 (gui_item, *accel_list); if (!gui_item_included_p (gui_item, Vmenubar_configuration)) - return; + { + UNGCPRO; + goto done; + } + + if (!STRINGP (pgui_item->name)) + pgui_item->name = Feval (pgui_item->name); if (!gui_item_active_p (gui_item)) item_info.fState = MFS_GRAYED; @@ -356,11 +425,14 @@ populate_menu_add_item (HMENU menu, Lisp_Object path, pgui_item->suffix); Fputhash (id, pgui_item->callback, hash_tab); - item_info.wID = (UINT) XINT(id); + item_info.wID = (UINT) XINT (id); item_info.fType |= MFT_STRING; - item_info.dwTypeData = displayable_menu_item (gui_item, bar_p); + item_info.dwTypeData = displayable_menu_item (gui_item, bar_p, &accel); - UNGCPRO; /* gui_item */ + if (accel && bar_p) + *accel_list = Fcons (make_char (accel), *accel_list); + + UNGCPRO; } else { @@ -371,6 +443,8 @@ populate_menu_add_item (HMENU menu, Lisp_Object path, item_info.fType |= MFT_RIGHTJUSTIFY; InsertMenuItem (menu, UINT_MAX, TRUE, &item_info); + +done:; } /* @@ -390,16 +464,18 @@ populate_or_checksum_helper (HMENU menu, Lisp_Object path, Lisp_Object desc, { Lisp_Object item_desc; int deep_p, flush_right; - struct gcpro gcpro1; + struct gcpro gcpro1, gcpro2, gcpro3; unsigned long checksum; Lisp_Object gui_item = allocate_gui_item (); - Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item); - GCPRO1 (gui_item); + Lisp_Object accel_list = Qnil; + Lisp_Gui_Item *pgui_item = XGUI_ITEM (gui_item); + + GCPRO3 (gui_item, accel_list, desc); /* We are sometimes called with the menubar unchanged, and with changed right flush. We have to update the menubar in this case, so account for the compliance setting in the hash value */ - checksum = REPLACE_ME_WITH_GLOBAL_VARIABLE_WHICH_CONTROLS_RIHGT_FLUSH; + checksum = REPLACE_ME_WITH_GLOBAL_VARIABLE_WHICH_CONTROLS_RIGHT_FLUSH; /* Will initially contain only "(empty)" */ if (populate_p) @@ -426,14 +502,15 @@ populate_or_checksum_helper (HMENU menu, Lisp_Object path, Lisp_Object desc, if (NILP (XCAR (item_desc))) { /* Do not flush right menubar items when MS style compliant */ - if (bar_p && !REPLACE_ME_WITH_GLOBAL_VARIABLE_WHICH_CONTROLS_RIHGT_FLUSH) + if (bar_p && !REPLACE_ME_WITH_GLOBAL_VARIABLE_WHICH_CONTROLS_RIGHT_FLUSH) flush_right = 1; if (!populate_p) checksum = HASH2 (checksum, LISP_HASH (Qnil)); } else if (populate_p) populate_menu_add_item (menu, path, hash_tab, - XCAR (item_desc), flush_right, bar_p); + XCAR (item_desc), &accel_list, + flush_right, bar_p); else checksum = HASH2 (checksum, checksum_menu_item (XCAR (item_desc))); @@ -447,8 +524,8 @@ populate_or_checksum_helper (HMENU menu, Lisp_Object path, Lisp_Object desc, /* Add the header to the popup, if told so. The same as in X - an insensitive item, and a separator (Seems to me, there were - two separators in X... In Windows this looks ugly, anyways. */ - if (!bar_p && !deep_p && popup_menu_titles && !NILP(pgui_item->name)) + two separators in X... In Windows this looks ugly, anyways.) */ + if (!bar_p && !deep_p && popup_menu_titles && !NILP (pgui_item->name)) { CHECK_STRING (pgui_item->name); InsertMenu (menu, 0, MF_BYPOSITION | MF_STRING | MF_DISABLED, @@ -457,13 +534,17 @@ populate_or_checksum_helper (HMENU menu, Lisp_Object path, Lisp_Object desc, SetMenuDefaultItem (menu, 0, MF_BYPOSITION); } } - UNGCPRO; /* gui_item */ + + if (bar_p) + Fputhash (Qt, accel_list, hash_tab); + + UNGCPRO; return checksum; } static void populate_menu (HMENU menu, Lisp_Object path, Lisp_Object desc, - Lisp_Object hash_tab, int bar_p) + Lisp_Object hash_tab, int bar_p) { populate_or_checksum_helper (menu, path, desc, hash_tab, bar_p, 1); } @@ -475,23 +556,28 @@ checksum_menu (Lisp_Object desc) } static void -update_frame_menubar_maybe (struct frame* f) +update_frame_menubar_maybe (struct frame *f) { HMENU menubar = GetMenu (FRAME_MSWINDOWS_HANDLE (f)); struct window *w = XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f)); Lisp_Object desc = (!NILP (w->menubar_visible_p) ? symbol_value_in_buffer (Qcurrent_menubar, w->buffer) : Qnil); + struct gcpro gcpro1; + + GCPRO1 (desc); /* it's safest to do this, just in case some filter + or something changes the value of current-menubar */ top_level_menu = menubar; if (NILP (desc) && menubar != NULL) { /* Menubar has gone */ - FRAME_MSWINDOWS_MENU_HASH_TABLE(f) = Qnil; + FRAME_MSWINDOWS_MENU_HASH_TABLE (f) = Qnil; SetMenu (FRAME_MSWINDOWS_HANDLE (f), NULL); DestroyMenu (menubar); DrawMenuBar (FRAME_MSWINDOWS_HANDLE (f)); + UNGCPRO; return; } @@ -505,29 +591,35 @@ update_frame_menubar_maybe (struct frame* f) if (NILP (desc)) { /* We did not have the bar and are not going to */ + UNGCPRO; return; } /* Now we bail out if the menubar has not changed */ - if (FRAME_MSWINDOWS_MENU_CHECKSUM(f) == checksum_menu (desc)) - return; + if (FRAME_MSWINDOWS_MENU_CHECKSUM (f) == checksum_menu (desc)) + { + UNGCPRO; + return; + } populate: /* Come with empty hash table */ - if (NILP (FRAME_MSWINDOWS_MENU_HASH_TABLE(f))) - FRAME_MSWINDOWS_MENU_HASH_TABLE(f) = + if (NILP (FRAME_MSWINDOWS_MENU_HASH_TABLE (f))) + FRAME_MSWINDOWS_MENU_HASH_TABLE (f) = make_lisp_hash_table (50, HASH_TABLE_NON_WEAK, HASH_TABLE_EQUAL); else - Fclrhash (FRAME_MSWINDOWS_MENU_HASH_TABLE(f)); + Fclrhash (FRAME_MSWINDOWS_MENU_HASH_TABLE (f)); Fputhash (hmenu_to_lisp_object (menubar), Qnil, - FRAME_MSWINDOWS_MENU_HASH_TABLE(f)); + FRAME_MSWINDOWS_MENU_HASH_TABLE (f)); populate_menu (menubar, Qnil, desc, - FRAME_MSWINDOWS_MENU_HASH_TABLE(f), 1); + FRAME_MSWINDOWS_MENU_HASH_TABLE (f), 1); SetMenu (FRAME_MSWINDOWS_HANDLE (f), menubar); DrawMenuBar (FRAME_MSWINDOWS_HANDLE (f)); - FRAME_MSWINDOWS_MENU_CHECKSUM(f) = checksum_menu (desc); + FRAME_MSWINDOWS_MENU_CHECKSUM (f) = checksum_menu (desc); + + UNGCPRO; } static void @@ -535,6 +627,8 @@ prune_menubar (struct frame *f) { HMENU menubar = GetMenu (FRAME_MSWINDOWS_HANDLE (f)); Lisp_Object desc = current_frame_menubar (f); + struct gcpro gcpro1; + if (menubar == NULL) return; @@ -542,20 +636,22 @@ prune_menubar (struct frame *f) triggers. To resolve, we must prevent filters explicitly from mangling with the active menu. In apply_filter probably? Is copy-tree on the whole menu too expensive? */ - if (NILP(desc)) + if (NILP (desc)) /* abort(); */ return; + GCPRO1 (desc); /* just to be safe -- see above */ /* We do the trick by removing all items and re-populating top level */ empty_menu (menubar, 0); - assert (HASH_TABLEP (FRAME_MSWINDOWS_MENU_HASH_TABLE(f))); - Fclrhash (FRAME_MSWINDOWS_MENU_HASH_TABLE(f)); + assert (HASH_TABLEP (FRAME_MSWINDOWS_MENU_HASH_TABLE (f))); + Fclrhash (FRAME_MSWINDOWS_MENU_HASH_TABLE (f)); Fputhash (hmenu_to_lisp_object (menubar), Qnil, - FRAME_MSWINDOWS_MENU_HASH_TABLE(f)); + FRAME_MSWINDOWS_MENU_HASH_TABLE (f)); populate_menu (menubar, Qnil, desc, - FRAME_MSWINDOWS_MENU_HASH_TABLE(f), 1); + FRAME_MSWINDOWS_MENU_HASH_TABLE (f), 1); + UNGCPRO; } /* @@ -570,13 +666,24 @@ menu_cleanup (struct frame *f) current_hash_table = Qnil; prune_menubar (f); } + +int +msw_char_is_accelerator (struct frame *f, Emchar ch) +{ + Lisp_Object hash = FRAME_MSWINDOWS_MENU_HASH_TABLE (f); + + assert (HASH_TABLEP (hash)); + /* !!#### not Mule-ized */ + return !NILP (memq_no_quit (make_char (tolower (ch)), + Fgethash (Qt, hash, Qnil))); +} /*------------------------------------------------------------------------*/ /* Message handlers */ /*------------------------------------------------------------------------*/ static Lisp_Object -unsafe_handle_wm_initmenupopup_1 (HMENU menu, struct frame* f) +unsafe_handle_wm_initmenupopup_1 (HMENU menu, struct frame *f) { /* This function can call lisp, beat dogs and stick chewing gum to everything! */ @@ -608,7 +715,7 @@ unsafe_handle_wm_initmenupopup_1 (HMENU menu, struct frame* f) } static Lisp_Object -unsafe_handle_wm_initmenu_1 (struct frame* f) +unsafe_handle_wm_initmenu_1 (struct frame *f) { /* This function can call lisp */ @@ -625,7 +732,7 @@ unsafe_handle_wm_initmenu_1 (struct frame* f) update_frame_menubar_maybe (f); current_menudesc = current_frame_menubar (f); - current_hash_table = FRAME_MSWINDOWS_MENU_HASH_TABLE(f); + current_hash_table = FRAME_MSWINDOWS_MENU_HASH_TABLE (f); assert (HASH_TABLEP (current_hash_table)); return Qt; @@ -638,7 +745,7 @@ unsafe_handle_wm_initmenu_1 (struct frame* f) * command if we return nil */ Lisp_Object -mswindows_handle_wm_command (struct frame* f, WORD id) +mswindows_handle_wm_command (struct frame *f, WORD id) { /* Try to map the command id through the proper hash table */ Lisp_Object data, fn, arg, frame; @@ -680,7 +787,7 @@ mswindows_handle_wm_command (struct frame* f, WORD id) /*------------------------------------------------------------------------*/ static HMENU wm_initmenu_menu; -static struct frame* wm_initmenu_frame; +static struct frame *wm_initmenu_frame; static Lisp_Object unsafe_handle_wm_initmenupopup (Lisp_Object u_n_u_s_e_d) @@ -695,7 +802,7 @@ unsafe_handle_wm_initmenu (Lisp_Object u_n_u_s_e_d) } Lisp_Object -mswindows_handle_wm_initmenupopup (HMENU hmenu, struct frame* frm) +mswindows_handle_wm_initmenupopup (HMENU hmenu, struct frame *frm) { /* We cannot pass hmenu as a lisp object. Use static var */ wm_initmenu_menu = hmenu; @@ -704,10 +811,10 @@ mswindows_handle_wm_initmenupopup (HMENU hmenu, struct frame* frm) } Lisp_Object -mswindows_handle_wm_initmenu (HMENU hmenu, struct frame* f) +mswindows_handle_wm_initmenu (HMENU hmenu, struct frame *f) { /* Handle only frame menubar, ignore if from popup or system menu */ - if (GetMenu (FRAME_MSWINDOWS_HANDLE(f)) == hmenu) + if (GetMenu (FRAME_MSWINDOWS_HANDLE (f)) == hmenu) { wm_initmenu_frame = f; return mswindows_protect_modal_loop (unsafe_handle_wm_initmenu, Qnil); @@ -721,15 +828,15 @@ mswindows_handle_wm_initmenu (HMENU hmenu, struct frame* f) /*------------------------------------------------------------------------*/ static void -mswindows_update_frame_menubars (struct frame* f) +mswindows_update_frame_menubars (struct frame *f) { update_frame_menubar_maybe (f); } static void -mswindows_free_frame_menubars (struct frame* f) +mswindows_free_frame_menubars (struct frame *f) { - FRAME_MSWINDOWS_MENU_HASH_TABLE(f) = Qnil; + FRAME_MSWINDOWS_MENU_HASH_TABLE (f) = Qnil; } static void @@ -740,6 +847,9 @@ mswindows_popup_menu (Lisp_Object menu_desc, Lisp_Object event) HMENU menu; POINT pt; int ok; + struct gcpro gcpro1; + + GCPRO1 (menu_desc); /* to be safe -- see above */ if (!NILP (event)) { @@ -777,7 +887,7 @@ mswindows_popup_menu (Lisp_Object menu_desc, Lisp_Object event) current_menudesc = menu_desc; current_hash_table = make_lisp_hash_table (10, HASH_TABLE_NON_WEAK, HASH_TABLE_EQUAL); - menu = create_empty_popup_menu(); + menu = create_empty_popup_menu (); Fputhash (hmenu_to_lisp_object (menu), Qnil, current_hash_table); top_level_menu = menu; @@ -796,11 +906,13 @@ mswindows_popup_menu (Lisp_Object menu_desc, Lisp_Object event) mswindows_unmodalize_signal_maybe (); /* This is probably the only real reason for failure */ - if (!ok) { - menu_cleanup (f); - signal_simple_error ("Cannot track popup menu while in menu", - menu_desc); - } + if (!ok) + { + menu_cleanup (f); + signal_simple_error ("Cannot track popup menu while in menu", + menu_desc); + } + UNGCPRO; } diff --git a/src/menubar-x.c b/src/menubar-x.c index 216856f..99400a3 100644 --- a/src/menubar-x.c +++ b/src/menubar-x.c @@ -21,7 +21,14 @@ Boston, MA 02111-1307, USA. */ /* Synched up with: Not in FSF. */ -/* created 16-dec-91 by jwz */ +/* Authorship: + + Created 16-dec-91 by Jamie Zawinski. + Menu filters and many other keywords added by Stig for 19.12. + Original device-abstraction work and GC cleanup work by Ben Wing for 19.13. + Menu accelerators c. 1997? by ??. Moved here from event-stream.c. + Other work post-1996 by ??. +*/ #include #include "lisp.h" @@ -29,12 +36,15 @@ Boston, MA 02111-1307, USA. */ #include "console-x.h" #include "EmacsFrame.h" #include "gui-x.h" +#include "../lwlib/lwlib.h" #include "buffer.h" #include "commands.h" /* zmacs_regions */ -#include "gui.h" #include "events.h" #include "frame.h" +#include "gui.h" +#include "keymap.h" +#include "menubar.h" #include "opaque.h" #include "window.h" @@ -154,7 +164,7 @@ menu_item_descriptor_to_widget_value_1 (Lisp_Object desc, wv->type = CASCADE_TYPE; wv->enabled = 1; wv->name = (char *) XSTRING_DATA (LISP_GETTEXT (XCAR (desc))); - wv->name = xstrdup (wv->name); + wv->name = strdup_and_add_accel (wv->name); accel = gui_name_accelerator (LISP_GETTEXT (XCAR (desc))); wv->accel = LISP_TO_VOID (accel); @@ -267,7 +277,7 @@ menu_item_descriptor_to_widget_value_1 (Lisp_Object desc, dummy->next = NULL; goto menu_item_done; - } + } } else if (menubar_root_p) @@ -292,7 +302,7 @@ menu_item_descriptor_to_widget_value_1 (Lisp_Object desc, { if (partition_seen) error ( - "More than one partition (nil) in menubar description"); + "More than one partition (nil) in menubar description"); partition_seen = 1; next = xmalloc_widget_value (); next->type = PUSHRIGHT_TYPE; @@ -319,7 +329,7 @@ menu_item_descriptor_to_widget_value_1 (Lisp_Object desc, else signal_simple_error ("Unrecognized menu descriptor", desc); -menu_item_done: + menu_item_done: if (wv) { @@ -336,7 +346,7 @@ menu_item_done: static widget_value * menu_item_descriptor_to_widget_value (Lisp_Object desc, int menu_type, /* if this is a menubar, - popup or sub menu */ + popup or sub menu */ int deep_p, /* */ int filter_p) /* if :filter forms should run now */ @@ -360,8 +370,8 @@ int in_menu_callback; static Lisp_Object restore_in_menu_callback (Lisp_Object val) { - in_menu_callback = XINT (val); - return Qnil; + in_menu_callback = XINT (val); + return Qnil; } #endif /* LWLIB_MENUBARS_LUCID || LWLIB_MENUBARS_MOTIF */ @@ -830,7 +840,7 @@ x_popup_menu (Lisp_Object menu_desc, Lisp_Object event) them. We don't want the *first* command event to alter the state of the region, so that the region can be available as an argument for the second command. - */ + */ if (zmacs_regions) zmacs_region_stays = 1; @@ -841,9 +851,516 @@ x_popup_menu (Lisp_Object menu_desc, Lisp_Object event) } + +#if defined(LWLIB_MENUBARS_LUCID) +static void +menu_move_up (void) +{ + widget_value *current = lw_get_entries (False); + widget_value *entries = lw_get_entries (True); + widget_value *prev = NULL; + + while (entries != current) + { + if (entries->name /*&& entries->enabled*/) prev = entries; + entries = entries->next; + assert (entries); + } + + if (!prev) + /* move to last item */ + { + while (entries->next) + { + if (entries->name /*&& entries->enabled*/) prev = entries; + entries = entries->next; + } + if (prev) + { + if (entries->name /*&& entries->enabled*/) + prev = entries; + } + else + { + /* no selectable items in this menu, pop up to previous level */ + lw_pop_menu (); + return; + } + } + lw_set_item (prev); +} + +static void +menu_move_down (void) +{ + widget_value *current = lw_get_entries (False); + widget_value *new = current; + + while (new->next) + { + new = new->next; + if (new->name /*&& new->enabled*/) break; + } + + if (new==current||!(new->name/*||new->enabled*/)) + { + new = lw_get_entries (True); + while (new!=current) + { + if (new->name /*&& new->enabled*/) break; + new = new->next; + } + if (new==current&&!(new->name /*|| new->enabled*/)) + { + lw_pop_menu (); + return; + } + } + + lw_set_item (new); +} + +static void +menu_move_left (void) +{ + int level = lw_menu_level (); + int l = level; + widget_value *current; + + while (level-- >= 3) + lw_pop_menu (); + + menu_move_up (); + current = lw_get_entries (False); + if (l > 2 && current->contents) + lw_push_menu (current->contents); +} + +static void +menu_move_right (void) +{ + int level = lw_menu_level (); + int l = level; + widget_value *current; + + while (level-- >= 3) + lw_pop_menu (); + + menu_move_down (); + current = lw_get_entries (False); + if (l > 2 && current->contents) + lw_push_menu (current->contents); +} + +static void +menu_select_item (widget_value *val) +{ + if (val == NULL) + val = lw_get_entries (False); + + /* is match a submenu? */ + + if (val->contents) + { + /* enter the submenu */ + + lw_set_item (val); + lw_push_menu (val->contents); + } + else + { + /* Execute the menu entry by calling the menu's `select' + callback function + */ + lw_kill_menus (val); + } +} + +Lisp_Object +command_builder_operate_menu_accelerator (struct command_builder *builder) +{ + /* this function can GC */ + + struct console *con = XCONSOLE (Vselected_console); + Lisp_Object evee = builder->most_current_event; + Lisp_Object binding; + widget_value *entries; + + extern int lw_menu_accelerate; /* lwlib.c */ + +#if 0 + { + int i; + Lisp_Object t; + char buf[50]; + + t = builder->current_events; + i = 0; + while (!NILP (t)) + { + i++; + sprintf (buf,"OPERATE (%d): ",i); + write_c_string (buf, Qexternal_debugging_output); + print_internal (t, Qexternal_debugging_output, 1); + write_c_string ("\n", Qexternal_debugging_output); + t = XEVENT_NEXT (t); + } + } +#endif /* 0 */ + + /* menu accelerator keys don't go into keyboard macros */ + if (!NILP (con->defining_kbd_macro) && NILP (Vexecuting_macro)) + con->kbd_macro_ptr = con->kbd_macro_end; + + /* don't echo menu accelerator keys */ + /*reset_key_echo (builder, 1);*/ + + if (!lw_menu_accelerate) + { + /* `convert' mouse display to keyboard display + by entering the open submenu + */ + entries = lw_get_entries (False); + if (entries->contents) + { + lw_push_menu (entries->contents); + lw_display_menu (CurrentTime); + } + } + + /* compare event to the current menu accelerators */ + + entries=lw_get_entries (True); + + while (entries) + { + Lisp_Object accel; + VOID_TO_LISP (accel, entries->accel); + if (entries->name && !NILP (accel)) + { + if (event_matches_key_specifier_p (XEVENT (evee), accel)) + { + /* a match! */ + + menu_select_item (entries); + + if (lw_menu_active) lw_display_menu (CurrentTime); + + reset_this_command_keys (Vselected_console, 1); + /*reset_command_builder_event_chain (builder);*/ + return Vmenu_accelerator_map; + } + } + entries = entries->next; + } + + /* try to look up event in menu-accelerator-map */ + + binding = event_binding_in (evee, Vmenu_accelerator_map, 1); + + if (NILP (binding)) + { + /* beep at user for undefined key */ + return Qnil; + } + else + { + if (EQ (binding, Qmenu_quit)) + { + /* turn off menus and set quit flag */ + lw_kill_menus (NULL); + Vquit_flag = Qt; + } + else if (EQ (binding, Qmenu_up)) + { + int level = lw_menu_level (); + if (level > 2) + menu_move_up (); + } + else if (EQ (binding, Qmenu_down)) + { + int level = lw_menu_level (); + if (level > 2) + menu_move_down (); + else + menu_select_item (NULL); + } + else if (EQ (binding, Qmenu_left)) + { + int level = lw_menu_level (); + if (level > 3) + { + lw_pop_menu (); + lw_display_menu (CurrentTime); + } + else + menu_move_left (); + } + else if (EQ (binding, Qmenu_right)) + { + int level = lw_menu_level (); + if (level > 2 && + lw_get_entries (False)->contents) + { + widget_value *current = lw_get_entries (False); + if (current->contents) + menu_select_item (NULL); + } + else + menu_move_right (); + } + else if (EQ (binding, Qmenu_select)) + menu_select_item (NULL); + else if (EQ (binding, Qmenu_escape)) + { + int level = lw_menu_level (); + + if (level > 2) + { + lw_pop_menu (); + lw_display_menu (CurrentTime); + } + else + { + /* turn off menus quietly */ + lw_kill_menus (NULL); + } + } + else if (KEYMAPP (binding)) + { + /* prefix key */ + reset_this_command_keys (Vselected_console, 1); + /*reset_command_builder_event_chain (builder);*/ + return binding; + } + else + { + /* turn off menus and execute binding */ + lw_kill_menus (NULL); + reset_this_command_keys (Vselected_console, 1); + /*reset_command_builder_event_chain (builder);*/ + return binding; + } + } + + if (lw_menu_active) lw_display_menu (CurrentTime); + + reset_this_command_keys (Vselected_console, 1); + /*reset_command_builder_event_chain (builder);*/ + + return Vmenu_accelerator_map; +} + +static Lisp_Object +menu_accelerator_junk_on_error (Lisp_Object errordata, Lisp_Object ignored) +{ + Vmenu_accelerator_prefix = Qnil; + Vmenu_accelerator_modifiers = Qnil; + Vmenu_accelerator_enabled = Qnil; + if (!NILP (errordata)) + { + Lisp_Object args[2]; + + args[0] = build_string ("Error in menu accelerators (setting to nil)"); + /* #### This should call + (with-output-to-string (display-error errordata)) + but that stuff is all in Lisp currently. */ + args[1] = errordata; + warn_when_safe_lispobj + (Qerror, Qwarning, + emacs_doprnt_string_lisp ((const Bufbyte *) "%s: %s", + Qnil, -1, 2, args)); + } + + return Qnil; +} + +static Lisp_Object +menu_accelerator_safe_compare (Lisp_Object event0) +{ + if (CONSP (Vmenu_accelerator_prefix)) + { + Lisp_Object t; + t=Vmenu_accelerator_prefix; + while (!NILP (t) + && !NILP (event0) + && event_matches_key_specifier_p (XEVENT (event0), Fcar (t))) + { + t = Fcdr (t); + event0 = XEVENT_NEXT (event0); + } + if (!NILP (t)) + return Qnil; + } + else if (NILP (event0)) + return Qnil; + else if (event_matches_key_specifier_p (XEVENT (event0), Vmenu_accelerator_prefix)) + event0 = XEVENT_NEXT (event0); + else + return Qnil; + return event0; +} + +static Lisp_Object +menu_accelerator_safe_mod_compare (Lisp_Object cons) +{ + return (event_matches_key_specifier_p (XEVENT (XCAR (cons)), XCDR (cons)) + ? Qt + : Qnil); +} + +Lisp_Object +command_builder_find_menu_accelerator (struct command_builder *builder) +{ + /* this function can GC */ + Lisp_Object event0 = builder->current_events; + struct console *con = XCONSOLE (Vselected_console); + struct frame *f = XFRAME (CONSOLE_SELECTED_FRAME (con)); + Widget menubar_widget; + + /* compare entries in event0 against the menu prefix */ + + if ((!CONSOLE_X_P (XCONSOLE (builder->console))) || NILP (event0) || + XEVENT (event0)->event_type != key_press_event) + return Qnil; + + if (!NILP (Vmenu_accelerator_prefix)) + { + event0 = condition_case_1 (Qerror, + menu_accelerator_safe_compare, + event0, + menu_accelerator_junk_on_error, + Qnil); + } + + if (NILP (event0)) + return Qnil; + + menubar_widget = FRAME_X_MENUBAR_WIDGET (f); + if (menubar_widget + && CONSP (Vmenu_accelerator_modifiers)) + { + Lisp_Object fake; + Lisp_Object last = Qnil; + struct gcpro gcpro1; + Lisp_Object matchp; + + widget_value *val; + LWLIB_ID id = XPOPUP_DATA (f->menubar_data)->id; + + val = lw_get_all_values (id); + if (val) + { + val = val->contents; + + fake = Fcopy_sequence (Vmenu_accelerator_modifiers); + last = fake; + + while (!NILP (Fcdr (last))) + last = Fcdr (last); + + Fsetcdr (last, Fcons (Qnil, Qnil)); + last = Fcdr (last); + } + + fake = Fcons (Qnil, fake); + + GCPRO1 (fake); + + while (val) + { + Lisp_Object accel; + VOID_TO_LISP (accel, val->accel); + if (val->name && !NILP (accel)) + { + Fsetcar (last, accel); + Fsetcar (fake, event0); + matchp = condition_case_1 (Qerror, + menu_accelerator_safe_mod_compare, + fake, + menu_accelerator_junk_on_error, + Qnil); + if (!NILP (matchp)) + { + /* we found one! */ + + lw_set_menu (menubar_widget, val); + /* yah - yet another hack. + pretend emacs timestamp is the same as an X timestamp, + which for the moment it is. (read events.h) + */ + lw_map_menu (XEVENT (event0)->timestamp); + + if (val->contents) + lw_push_menu (val->contents); + + lw_display_menu (CurrentTime); + + /* menu accelerator keys don't go into keyboard macros */ + if (!NILP (con->defining_kbd_macro) + && NILP (Vexecuting_macro)) + con->kbd_macro_ptr = con->kbd_macro_end; + + /* don't echo menu accelerator keys */ + /*reset_key_echo (builder, 1);*/ + reset_this_command_keys (Vselected_console, 1); + UNGCPRO; + + return Vmenu_accelerator_map; + } + } + + val = val->next; + } + + UNGCPRO; + } + return Qnil; +} + +int +x_kludge_lw_menu_active (void) +{ + return lw_menu_active; +} + +DEFUN ("accelerate-menu", Faccelerate_menu, 0, 0, "_", /* +Make the menubar active. Menu items can be selected using menu accelerators +or by actions defined in menu-accelerator-map. +*/ + ()) +{ + struct console *con = XCONSOLE (Vselected_console); + struct frame *f = XFRAME (CONSOLE_SELECTED_FRAME (con)); + LWLIB_ID id; + widget_value *val; + + if (NILP (f->menubar_data)) + error ("Frame has no menubar."); + + id = XPOPUP_DATA (f->menubar_data)->id; + val = lw_get_all_values (id); + val = val->contents; + lw_set_menu (FRAME_X_MENUBAR_WIDGET (f), val); + lw_map_menu (CurrentTime); + + lw_display_menu (CurrentTime); + + /* menu accelerator keys don't go into keyboard macros */ + if (!NILP (con->defining_kbd_macro) && NILP (Vexecuting_macro)) + con->kbd_macro_ptr = con->kbd_macro_end; + + return Qnil; +} +#endif /* LWLIB_MENUBARS_LUCID */ + + void syms_of_menubar_x (void) { +#if defined(LWLIB_MENUBARS_LUCID) + DEFSUBR (Faccelerate_menu); +#endif } void diff --git a/src/menubar.c b/src/menubar.c index df32322..f397934 100644 --- a/src/menubar.c +++ b/src/menubar.c @@ -21,8 +21,13 @@ Boston, MA 02111-1307, USA. */ /* Synched up with: Not in FSF. */ -/* #### There ain't much here because menubars have not been - properly abstracted yet. */ +/* Authorship: + + Created by Ben Wing as part of device-abstraction work for 19.12. + Menu filters and many other keywords added by Stig for 19.12. + Menu accelerators c. 1997? by ??. Moved here from event-stream.c. + Much other work post-1996 by ??. +*/ #include #include "lisp.h" @@ -31,6 +36,7 @@ Boston, MA 02111-1307, USA. */ #include "device.h" #include "frame.h" #include "gui.h" +#include "keymap.h" #include "menubar.h" #include "redisplay.h" #include "window.h" @@ -54,6 +60,30 @@ int popup_menu_titles; Lisp_Object Vmenubar_pointer_glyph; +/* prefix key(s) that must match in order to activate menu. + This is ugly. fix me. + */ +Lisp_Object Vmenu_accelerator_prefix; + +/* list of modifier keys to match accelerator for top level menus */ +Lisp_Object Vmenu_accelerator_modifiers; + +/* whether menu accelerators are enabled */ +Lisp_Object Vmenu_accelerator_enabled; + +/* keymap for auxiliary menu accelerator functions */ +Lisp_Object Vmenu_accelerator_map; + +Lisp_Object Qmenu_force; +Lisp_Object Qmenu_fallback; +Lisp_Object Qmenu_quit; +Lisp_Object Qmenu_up; +Lisp_Object Qmenu_down; +Lisp_Object Qmenu_left; +Lisp_Object Qmenu_right; +Lisp_Object Qmenu_select; +Lisp_Object Qmenu_escape; + static int menubar_variable_changed (Lisp_Object sym, Lisp_Object *val, Lisp_Object in_object, int flags) @@ -104,7 +134,7 @@ current_frame_menubar (const struct frame* f) Lisp_Object menu_parse_submenu_keywords (Lisp_Object desc, Lisp_Object gui_item) { - Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item); + Lisp_Gui_Item *pgui_item = XGUI_ITEM (gui_item); /* Menu descriptor should be a list */ CHECK_CONS (desc); @@ -153,11 +183,11 @@ See also 'find-menu-item'. (desc, path)) { Lisp_Object path_entry, submenu_desc, submenu; - struct gcpro gcpro1; + struct gcpro gcpro1, gcpro2; Lisp_Object gui_item = allocate_gui_item (); Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item); - GCPRO1 (gui_item); + GCPRO2 (gui_item, desc); EXTERNAL_LIST_LOOP (path_entry, path) { @@ -292,6 +322,7 @@ See menubar.el for many more examples. DEFUN ("normalize-menu-item-name", Fnormalize_menu_item_name, 1, 2, 0, /* Convert a menu item name string into normal form, and return the new string. Menu item names should be converted to normal form before being compared. +This removes %_'s (accelerator indications) and converts %% to %. */ (name, buffer)) { @@ -347,6 +378,18 @@ void syms_of_menubar (void) { defsymbol (&Qcurrent_menubar, "current-menubar"); + + defsymbol (&Qmenu_force, "menu-force"); + defsymbol (&Qmenu_fallback, "menu-fallback"); + + defsymbol (&Qmenu_quit, "menu-quit"); + defsymbol (&Qmenu_up, "menu-up"); + defsymbol (&Qmenu_down, "menu-down"); + defsymbol (&Qmenu_left, "menu-left"); + defsymbol (&Qmenu_right, "menu-right"); + defsymbol (&Qmenu_select, "menu-select"); + defsymbol (&Qmenu_escape, "menu-escape"); + DEFSUBR (Fpopup_menu); DEFSUBR (Fnormalize_menu_item_name); DEFSUBR (Fmenu_find_real_submenu); @@ -397,8 +440,18 @@ This is the string that will be displayed in the parent menu, if any. For toplevel menus, it is ignored. This string is not displayed in the menu itself. -Immediately following the name string of the menu, any of three -optional keyword-value pairs is permitted. +Menu accelerators can be indicated in the string by putting the +sequence "%_" before the character corresponding to the key that will +invoke the menu or menu item. Uppercase and lowercase accelerators +are equivalent. The sequence "%%" is also special, and is translated +into a single %. + +If no menu accelerator is present in the string, XEmacs will act as if +the first character has been tagged as an accelerator. + +Immediately following the name string of the menu, various optional +keyword-value pairs are permitted: currently, :filter, :active, :included, +and :config. (See below.) If an element of a menu (or menubar) is a string, then that string will be presented as unselectable text. @@ -406,6 +459,29 @@ presented as unselectable text. If an element of a menu is a string consisting solely of hyphens, then that item will be presented as a solid horizontal line. +If an element of a menu is a string beginning with "--:", it will be +presented as a line whose appearance is controlled by the rest of the +text in the string. The allowed line specs are system-dependent, and +currently work only under X Windows (with Lucid and Motif menubars); +otherwise, a solid horizontal line is presented, as if the string were +all hyphens. + +The possibilities are: + + "--:singleLine" + "--:doubleLine" + "--:singleDashedLine" + "--:doubleDashedLine" + "--:noLine" + "--:shadowEtchedIn" + "--:shadowEtchedOut" + "--:shadowEtchedInDash" + "--:shadowEtchedOutDash" + "--:shadowDoubleEtchedIn" (Lucid menubars only) + "--:shadowDoubleEtchedOut" (Lucid menubars only) + "--:shadowDoubleEtchedInDash" (Lucid menubars only) + "--:shadowDoubleEtchedOutDash" (Lucid menubars only) + If an element of a menu is a list, it is treated as a submenu. The name of that submenu (the first element in the list) will be used as the name of the item representing this menu on the parent. @@ -415,33 +491,39 @@ division between the set of menubar-items which are flushleft and those which are flushright. Otherwise, the element must be a vector, which describes a menu item. -A menu item can have any of the following forms: +A menu item is of the following form: + + [ "name" callback : : ... ] + +The following forms are also accepted for compatibility, but deprecated: [ "name" callback ] [ "name" callback ] - [ "name" callback : : ... ] The name is the string to display on the menu; it is filtered through the resource database, so it is possible for resources to override what string -is actually displayed. +is actually displayed. Menu accelerator indicators (the sequence `%_') are +also processed; see above. If the name is not a string, it will be +evaluated with `eval', and the result should be a string. If the `callback' of a menu item is a symbol, then it must name a command. It will be invoked with `call-interactively'. If it is a list, then it is evaluated with `eval'. -The possible keywords are this: +In the deprecated forms, is equivalent to using the :active +keyword, and is equivalent to using the :suffix keyword. - :active
Same as in the first two forms: the - expression is evaluated just before the menu is +The possible keywords are: + + :active The expression is evaluated just before the menu is displayed, and the menu will be selectable only if the result is non-nil. - :suffix Same as in the second form: the expression - is evaluated just before the menu is displayed and - resulting string is appended to the displayed name, - providing a convenient way of adding the name of a - command's ``argument'' to the menu, like - ``Kill Buffer NAME''. + :suffix The expression is evaluated just before the menu is + displayed and the resulting string is appended to + the displayed name, providing a convenient way of + adding the name of a command's ``argument'' to the + menu, like ``Kill Buffer NAME''. :keys "string" Normally, the keyboard equivalents of commands in menus are displayed when the `callback' is a symbol. @@ -478,47 +560,42 @@ The possible keywords are this: See the variable `menubar-configuration'. :filter A menu filter can only be used in a menu item list. - (i.e.: not in a menu item itself). It is used to - sensitize or incrementally create a submenu only when - it is selected by the user and not every time the - menubar is activated. The filter function is passed - the list of menu items in the submenu and must return a - list of menu items to be used for the menu. It is - called only when the menu is about to be displayed, so - other menus may already be displayed. Vile and - terrible things will happen if a menu filter function - changes the current buffer, window, or frame. It - also should not raise, lower, or iconify any frames. - Basically, the filter function should have no - side-effects. + (i.e. not in a menu item itself). It is used to + incrementally create a submenu only when it is selected + by the user and not every time the menubar is activated. + The filter function is passed the list of menu items in + the submenu and must return a list of menu items to be + used for the menu. It must not destructively modify + the list of menu items passed to it. It is called only + when the menu is about to be displayed, so other menus + may already be displayed. Vile and terrible things will + happen if a menu filter function changes the current + buffer, window, or frame. It also should not raise, + lower, or iconify any frames. Basically, the filter + function should have no side-effects. :key-sequence keys Used in FSF Emacs as an hint to an equivalent keybinding. - Ignored by XEnacs for easymenu.el compatibility. - - :label (unimplemented!) Like :suffix, but replaces label - completely. - (might be added in 21.2). + Ignored by XEmacs for easymenu.el compatibility. For example: - ("File" + ("%_File" :filter file-menu-filter ; file-menu-filter is a function that takes ; one argument (a list of menu items) and ; returns a list of menu items - [ "Save As..." write-file t ] - [ "Revert Buffer" revert-buffer (buffer-modified-p) ] - [ "Read Only" toggle-read-only :style toggle + [ "Save %_As..." write-file t ] + [ "%_Revert Buffer" revert-buffer (buffer-modified-p) ] + [ "R%_ead Only" toggle-read-only :style toggle :selected buffer-read-only ] ) -See x-menubar.el for many more examples. +See menubar-items.el for many more examples. After the menubar is clicked upon, but before any menus are popped up, the functions on the `activate-menubar-hook' are invoked to make top-level changes to the menus and menubar. Note, however, that the use of menu filters (using the :filter keyword) is usually a more efficient way to -dynamically alter or sensitize menus. -*/, menubar_variable_changed); +dynamically alter or sensitize menus. */, menubar_variable_changed); Vcurrent_menubar = Qnil; @@ -564,6 +641,80 @@ If unspecified in a particular domain, the window-system-provided default pointer is used. */ ); + DEFVAR_LISP ("menu-accelerator-prefix", &Vmenu_accelerator_prefix /* +Prefix key(s) that must be typed before menu accelerators will be activated. +Set this to a value acceptable by define-key. + +NOTE: This currently only has any effect under X Windows. +*/ ); + Vmenu_accelerator_prefix = Qnil; + + DEFVAR_LISP ("menu-accelerator-modifiers", &Vmenu_accelerator_modifiers /* +Modifier keys which must be pressed to get to the top level menu accelerators. +This is a list of modifier key symbols. All modifier keys must be held down +while a valid menu accelerator key is pressed in order for the top level +menu to become active. + +NOTE: This currently only has any effect under X Windows. + +See also menu-accelerator-enabled and menu-accelerator-prefix. +*/ ); + Vmenu_accelerator_modifiers = list1 (Qmeta); + + DEFVAR_LISP ("menu-accelerator-enabled", &Vmenu_accelerator_enabled /* +Whether menu accelerator keys can cause the menubar to become active. +If 'menu-force or 'menu-fallback, then menu accelerator keys can +be used to activate the top level menu. Once the menubar becomes active, the +accelerator keys can be used regardless of the value of this variable. + +menu-force is used to indicate that the menu accelerator key takes +precedence over bindings in the current keymap(s). menu-fallback means +that bindings in the current keymap take precedence over menu accelerator keys. +Thus a top level menu with an accelerator of "T" would be activated on a +keypress of Meta-t if menu-accelerator-enabled is menu-force. +However, if menu-accelerator-enabled is menu-fallback, then +Meta-t will not activate the menubar and will instead run the function +transpose-words, to which it is normally bound. + +See also menu-accelerator-modifiers and menu-accelerator-prefix. +*/ ); + Vmenu_accelerator_enabled = Qnil; + + DEFVAR_LISP ("menu-accelerator-map", &Vmenu_accelerator_map /* +Keymap for use when the menubar is active. +The actions menu-quit, menu-up, menu-down, menu-left, menu-right, +menu-select and menu-escape can be mapped to keys in this map. +NOTE: This currently only has any effect under X Windows. + +menu-quit Immediately deactivate the menubar and any open submenus without + selecting an item. +menu-up Move the menu cursor up one row in the current menu. If the + move extends past the top of the menu, wrap around to the bottom. +menu-down Move the menu cursor down one row in the current menu. If the + move extends past the bottom of the menu, wrap around to the top. + If executed while the cursor is in the top level menu, move down + into the selected menu. +menu-left Move the cursor from a submenu into the parent menu. If executed + while the cursor is in the top level menu, move the cursor to the + left. If the move extends past the left edge of the menu, wrap + around to the right edge. +menu-right Move the cursor into a submenu. If the cursor is located in the + top level menu or is not currently on a submenu heading, then move + the cursor to the next top level menu entry. If the move extends + past the right edge of the menu, wrap around to the left edge. +menu-select Activate the item under the cursor. If the cursor is located on + a submenu heading, then move the cursor into the submenu. +menu-escape Pop up to the next level of menus. Moves from a submenu into its + parent menu. From the top level menu, this deactivates the + menubar. + +This keymap can also contain normal key-command bindings, in which case the +menubar is deactivated and the corresponding command is executed. + +The action bindings used by the menu accelerator code are designed to mimic +the actions of menu traversal keys in a commonly used PC operating system. +*/ ); + Fprovide (intern ("menubar")); } @@ -588,4 +739,6 @@ void complex_vars_of_menubar (void) { Vmenubar_pointer_glyph = Fmake_glyph_internal (Qpointer); + + Vmenu_accelerator_map = Fmake_keymap (Qnil); } diff --git a/src/menubar.h b/src/menubar.h index c67de98..9b2cce8 100644 --- a/src/menubar.h +++ b/src/menubar.h @@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA. */ /* Synched up with: Not in FSF. */ -/* #### Not properly abstracted for device-independence. */ +/* #### Still needs some device-abstraction work. */ #ifndef INCLUDED_menubar_h_ #define INCLUDED_menubar_h_ @@ -35,6 +35,37 @@ Lisp_Object current_frame_menubar (const struct frame* f); EXFUN (Fmenu_find_real_submenu, 2); +extern Lisp_Object Vmenu_accelerator_prefix; +extern Lisp_Object Vmenu_accelerator_modifiers; +extern Lisp_Object Vmenu_accelerator_enabled; +extern Lisp_Object Vmenu_accelerator_map; + +extern Lisp_Object Qmenu_force; +extern Lisp_Object Qmenu_fallback; + +extern Lisp_Object Qmenu_quit; +extern Lisp_Object Qmenu_up; +extern Lisp_Object Qmenu_down; +extern Lisp_Object Qmenu_left; +extern Lisp_Object Qmenu_right; +extern Lisp_Object Qmenu_select; +extern Lisp_Object Qmenu_escape; + + +/* #### kluuuuuuuuuuuuuuuuuuuuuuuuuuuudge! + The author of the accelerator code didn't know what the hell he was doing. + Someone needs to abstract this properly. */ +#if defined(HAVE_X_WINDOWS) && defined(LWLIB_MENUBARS_LUCID) +extern int x_kludge_lw_menu_active (void); +struct command_builder; +Lisp_Object command_builder_find_menu_accelerator (struct command_builder + *builder); +Lisp_Object command_builder_operate_menu_accelerator (struct command_builder + *builder); + +extern int in_menu_callback; +#endif + #endif /* HAVE_MENUBARS */ #endif /* INCLUDED_menubar_h_ */ diff --git a/src/minibuf.c b/src/minibuf.c index f189636..0c9d560 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -682,7 +682,7 @@ clear_echo_area_internal (struct frame *f, Lisp_Object label, int from_print, else { write_string_to_stdio_stream (stderr, 0, (const Bufbyte *) "\n", 0, 1, - Qterminal); + Qterminal, 0); return Qnil; } } @@ -751,7 +751,7 @@ echo_area_append (struct frame *f, const Bufbyte *nonreloc, Lisp_Object reloc, if (STRINGP (reloc)) nonreloc = XSTRING_DATA (reloc); write_string_to_stdio_stream (stderr, 0, nonreloc, offset, length, - Qterminal); + Qterminal, 0); } } diff --git a/src/miscplay.c b/src/miscplay.c index 3acfca5..723981d 100644 --- a/src/miscplay.c +++ b/src/miscplay.c @@ -32,7 +32,6 @@ #define UNUSED(x) ((void)(x)) #else #define UNUSED(x) -#define __inline__ #endif /* Maintain global variable for keeping parser state information; this struct @@ -114,7 +113,7 @@ static size_t parsevoc(void **data,size_t *sz,void **outbuf) this might require re-partioning of the data segments if headers cross the boundaries between two read operations. This is done in a two-step way: first we request a certain amount of bytes... */ -static __inline__ int waverequire(void **data,size_t *sz,size_t rq) +static inline int waverequire(void **data,size_t *sz,size_t rq) { int rc = 1; @@ -135,7 +134,7 @@ static __inline__ int waverequire(void **data,size_t *sz,size_t rq) } /* ...and next we remove this many bytes from the buffer */ -static __inline__ void waveremove(size_t rq) +static inline void waveremove(size_t rq) { if (parsestate.wave.left <= rq) parsestate.wave.left = 0; @@ -431,7 +430,7 @@ size_t sndcnv2unsigned(void **data,size_t *sz,void **outbuf) /* Convert a number in the range -32768..32767 to an 8 bit ulaw encoded number --- I hope, I got this conversion right :-) */ -static __inline__ signed char int2ulaw(int i) +static inline signed char int2ulaw(int i) { /* Lookup table for fast calculation of number of bits that need shifting*/ static short int t_bits[128] = { diff --git a/src/mule-canna.c b/src/mule-canna.c index 069c7b5..ea01f0f 100644 --- a/src/mule-canna.c +++ b/src/mule-canna.c @@ -718,7 +718,8 @@ byteLen (int bun, int len) } DEFUN ("canna-henkan-begin", Fcanna_henkan_begin, 1, 1, 0, /* -¤«¤Ê´Á»úÊÑ´¹¤·¤¿·ë²Ì¤òÊÖ´Ô¤¹¤ë¡£Ê¸ÀáÀڤ꤬¤·¤Æ¤¢¤ë¡£ +Return the result of kana-to-kanji conversion. +Clause separator is set. */ (yomi)) { @@ -773,7 +774,7 @@ kanjiYomiList (int context, int nbun) } DEFUN ("canna-henkan-next", Fcanna_henkan_next, 1, 1, 0, /* -¸õÊä°ìÍ÷¤òµá¤á¤ë¡£ +Return the list of candidates. */ (bunsetsu)) { @@ -798,7 +799,7 @@ DEFUN ("canna-henkan-next", Fcanna_henkan_next, 1, 1, 0, /* } else { - endp = XCDR (endp) = Fcons (make_string (p, slen), Qnil); + endp = XCDR (res) = Fcons (make_string (p, slen), Qnil); } p += slen + 1; } @@ -806,7 +807,7 @@ DEFUN ("canna-henkan-next", Fcanna_henkan_next, 1, 1, 0, /* } DEFUN ("canna-bunsetu-henkou", Fcanna_bunsetu_henkou, 2, 2, 0, /* -ʸÀá¤ÎŤµ¤ò»ØÄꤹ¤ë¡£ +Specify the length of a clause. */ (bunsetsu, bunlen)) { @@ -826,7 +827,7 @@ DEFUN ("canna-bunsetu-henkou", Fcanna_bunsetu_henkou, 2, 2, 0, /* } DEFUN ("canna-henkan-kakutei", Fcanna_henkan_kakutei, 2, 2, 0, /* -¸õÊäÁªÂò¡£ +Select a candidate. */ (bun, kouho)) { @@ -845,7 +846,7 @@ DEFUN ("canna-henkan-kakutei", Fcanna_henkan_kakutei, 2, 2, 0, /* } DEFUN ("canna-henkan-end", Fcanna_henkan_end, 0, 0, 0, /* -ÊÑ´¹½ªÎ»¡£ +End conversion. */ ()) { @@ -858,7 +859,7 @@ DEFUN ("canna-henkan-end", Fcanna_henkan_end, 0, 0, 0, /* } DEFUN ("canna-henkan-quit", Fcanna_henkan_quit, 0, 0, 0, /* -ÊÑ´¹½ªÎ»¡£ +Quit conversion. */ ()) { @@ -1777,9 +1778,9 @@ For canna /* EUC multibyte string to MULE internal string */ static void -c2mu (char *cp, int l, char *mp) +c2mu (unsigned char *cp, int l, unsigned char *mp) { - char ch, *ep = cp+l; + unsigned char ch, *ep = cp+l; while ((cp < ep) && (ch = *cp)) { diff --git a/src/mule-charset.h b/src/mule-charset.h index 9e1ee3b..2e3f7a8 100644 --- a/src/mule-charset.h +++ b/src/mule-charset.h @@ -401,8 +401,8 @@ enum LEADING_BYTE_OFFICIAL_2 /* Is this a prefix for a private leading byte? */ -INLINE int LEADING_BYTE_PREFIX_P (unsigned char lb); -INLINE int +INLINE_HEADER int LEADING_BYTE_PREFIX_P (unsigned char lb); +INLINE_HEADER int LEADING_BYTE_PREFIX_P (unsigned char lb) { return (lb == PRE_LEADING_BYTE_PRIVATE_1 || @@ -565,8 +565,8 @@ extern struct charset_lookup *chlook; /* int not Bufbyte even though that is the actual type of a leading byte. This way, out-ot-range values will get caught rather than automatically truncated. */ -INLINE Lisp_Object CHARSET_BY_LEADING_BYTE (int lb); -INLINE Lisp_Object +INLINE_HEADER Lisp_Object CHARSET_BY_LEADING_BYTE (int lb); +INLINE_HEADER Lisp_Object CHARSET_BY_LEADING_BYTE (int lb) { assert (lb >= 0x80 && lb <= 0xFF); @@ -592,8 +592,8 @@ CHARSET_BY_LEADING_BYTE (int lb) extern const Bytecount rep_bytes_by_first_byte[0xA0]; /* Number of bytes in the string representation of a character. */ -INLINE int REP_BYTES_BY_FIRST_BYTE (int fb); -INLINE int +INLINE_HEADER int REP_BYTES_BY_FIRST_BYTE (int fb); +INLINE_HEADER int REP_BYTES_BY_FIRST_BYTE (int fb) { #ifdef ERROR_CHECK_TYPECHECK @@ -675,8 +675,8 @@ REP_BYTES_BY_FIRST_BYTE (int fb) FIELD2_TO_PRIVATE_LEADING_BYTE are the same. */ -INLINE Bufbyte CHAR_LEADING_BYTE (Emchar c); -INLINE Bufbyte +INLINE_HEADER Bufbyte CHAR_LEADING_BYTE (Emchar c); +INLINE_HEADER Bufbyte CHAR_LEADING_BYTE (Emchar c) { if (CHAR_ASCII_P (c)) @@ -710,8 +710,8 @@ CHAR_LEADING_BYTE (Emchar c) FIELD2_TO_PRIVATE_LEADING_BYTE are the same. */ -INLINE Emchar MAKE_CHAR (Lisp_Object charset, int c1, int c2); -INLINE Emchar +INLINE_HEADER Emchar MAKE_CHAR (Lisp_Object charset, int c1, int c2); +INLINE_HEADER Emchar MAKE_CHAR (Lisp_Object charset, int c1, int c2) { if (EQ (charset, Vcharset_ascii)) @@ -748,8 +748,8 @@ MAKE_CHAR (Lisp_Object charset, int c1, int c2) : ((c1) = CHAR_FIELD2 (c), \ (c2) = CHAR_FIELD3 (c)) -INLINE void breakup_char_1 (Emchar c, Lisp_Object *charset, int *c1, int *c2); -INLINE void +INLINE_HEADER void breakup_char_1 (Emchar c, Lisp_Object *charset, int *c1, int *c2); +INLINE_HEADER void breakup_char_1 (Emchar c, Lisp_Object *charset, int *c1, int *c2) { *charset = CHAR_CHARSET (c); diff --git a/src/nt.c b/src/nt.c index 4b21a11..bd14ddc 100644 --- a/src/nt.c +++ b/src/nt.c @@ -48,20 +48,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include #include -#ifndef __MINGW32__ #include -#else -typedef void (CALLBACK TIMECALLBACK)(UINT uTimerID, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2); - -typedef TIMECALLBACK FAR *LPTIMECALLBACK; -DWORD WINAPI timeGetTime(void); -MMRESULT WINAPI timeSetEvent(UINT uDelay, UINT uResolution, - LPTIMECALLBACK fptc, DWORD dwUser, UINT fuEvent); -MMRESULT WINAPI timeKillEvent(UINT uTimerID); -MMRESULT WINAPI timeGetDevCaps(TIMECAPS* ptc, UINT cbtc); -MMRESULT WINAPI timeBeginPeriod(UINT uPeriod); -MMRESULT WINAPI timeEndPeriod(UINT uPeriod); -#endif #include "nt.h" #include @@ -132,25 +119,25 @@ static struct passwd the_passwd = }; uid_t -getuid () +getuid (void) { return nt_fake_unix_uid; } uid_t -geteuid () +geteuid (void) { return nt_fake_unix_uid; } gid_t -getgid () +getgid (void) { return the_passwd.pw_gid; } gid_t -getegid () +getegid (void) { return getgid (); } @@ -183,7 +170,7 @@ getpwnam (const char *name) } void -init_user_info () +init_user_info (void) { /* This code is pretty much of ad hoc nature. There is no unix-like UIDs under Windows NT. There is no concept of root user, because @@ -593,7 +580,7 @@ nt_get_resource (char *key, LPDWORD lpdwtype) } void -init_environment () +init_environment (void) { /* Check for environment variables and use registry if they don't exist */ { @@ -615,7 +602,7 @@ init_environment () "EMACSLOCKDIR", "INFOPATH" }; -#ifdef HEAP_IN_DATA +#if defined (HEAP_IN_DATA) && !defined(PDUMP) cache_system_info (); #endif for (i = 0; i < countof (env_vars); i++) @@ -1250,6 +1237,11 @@ convert_time (FILETIME ft) } #else +#if defined(__MINGW32__) && CYGWIN_VERSION_DLL_MAJOR <= 21 +#define LowPart u.LowPart +#define HighPart u.HighPart +#endif + static LARGE_INTEGER utc_base_li; time_t @@ -1319,6 +1311,10 @@ convert_time (FILETIME uft) return ret; } #endif +#if defined(__MINGW32__) && CYGWIN_VERSION_DLL_MAJOR <= 21 +#undef LowPart +#undef HighPart +#endif #if 0 /* in case we ever have need of this */ @@ -1400,6 +1396,12 @@ generate_inode_val (const char * name) Oh, and do not encapsulater stat for non-MS compilers, too */ /* #### popineau@ese-metz.fr says they still might be broken. Oh well... Let's add that `1 ||' condition.... --kkm */ +/* #### aichner@ecf.teradyne.com reported that with the library + provided stat/fstat, (file-exist "d:\\tmp\\") =>> nil, + (file-exist "d:\\tmp") =>> t, when d:\tmp exists. Whenever + we opt to use non-encapsulated stat(), this should serve as + a compatibility test. --kkm */ + #if 1 || defined(_MSC_VER) && _MSC_VER < 1100 /* Since stat is encapsulated on Windows NT, we need to encapsulate @@ -1667,7 +1669,7 @@ term_ntproc (int unused) } void -init_ntproc () +init_ntproc (void) { /* Initial preparation for subprocess support: replace our standard handles with non-inheritable versions. */ diff --git a/src/ntproc.c b/src/ntproc.c index 0b95e43..eed038e 100644 --- a/src/ntproc.c +++ b/src/ntproc.c @@ -55,6 +55,9 @@ Boston, MA 02111-1307, USA. #include "syswait.h" #include "buffer.h" #include "process.h" + +#include "console-msw.h" + /*#include "w32term.h"*/ /* From 19.34.6: sync in ? --marcpa */ /* #### I'm not going to play with shit. */ @@ -120,13 +123,6 @@ child_process *dead_child = NULL; DWORD WINAPI reader_thread (void *arg); -/* Determine if running on Windows 9x and not NT */ -static int -windows9x_p (void) -{ - return GetVersion () & 0x80000000; -} - /* Find an unused process slot. */ child_process * new_child (void) @@ -751,7 +747,7 @@ sys_spawnve (int mode, const char *cmdname, /* Override escape char by binding win32-quote-process-args to desired character, or use t for auto-selection. */ if (INTP (Vwin32_quote_process_args)) - escape_char = XINT (Vwin32_quote_process_args); + escape_char = (char) XINT (Vwin32_quote_process_args); else escape_char = is_cygnus_app ? '"' : '\\'; } @@ -947,7 +943,7 @@ find_child_console (HWND hwnd, child_process * cp) GetClassName (hwnd, window_class, sizeof (window_class)); if (strcmp (window_class, - windows9x_p() + msw_windows9x_p() ? "tty" : "ConsoleWindowClass") == 0) { @@ -1040,7 +1036,7 @@ sys_kill (int pid, int sig) if (NILP (Vwin32_start_process_share_console) && cp && cp->hwnd) { #if 1 - if (windows9x_p()) + if (msw_windows9x_p()) { /* Another possibility is to try terminating the VDM out-right by @@ -1442,7 +1438,7 @@ If successful, the new locale id is returned, otherwise nil. void -syms_of_ntproc () +syms_of_ntproc (void) { DEFSUBR (Fwin32_short_file_name); DEFSUBR (Fwin32_long_file_name); diff --git a/src/opaque.c b/src/opaque.c index 1b080e5..2fb6dec 100644 --- a/src/opaque.c +++ b/src/opaque.c @@ -124,7 +124,7 @@ print_opaque_ptr (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) const Lisp_Opaque_Ptr *p = XOPAQUE_PTR (obj); char buf[200]; - sprintf (buf, "#", + sprintf (buf, "#", (long)(p->ptr), (unsigned long) p); write_c_string (buf, printcharfun); } @@ -141,7 +141,7 @@ hash_opaque_ptr (Lisp_Object obj, int depth) return (unsigned long) XOPAQUE_PTR (obj)->ptr; } -DEFINE_LRECORD_IMPLEMENTATION ("opaque_ptr", opaque_ptr, +DEFINE_LRECORD_IMPLEMENTATION ("opaque-ptr", opaque_ptr, 0, print_opaque_ptr, 0, equal_opaque_ptr, hash_opaque_ptr, 0, Lisp_Opaque_Ptr); diff --git a/src/print.c b/src/print.c index 981e4f8..dfe2e1c 100644 --- a/src/print.c +++ b/src/print.c @@ -1,6 +1,6 @@ /* Lisp object printing and output streams. Copyright (C) 1985, 1986, 1988, 1992-1995 Free Software Foundation, Inc. - Copyright (C) 1995, 1996 Ben Wing. + Copyright (C) 1995, 1996, 2000 Ben Wing. This file is part of XEmacs. @@ -38,6 +38,9 @@ Boston, MA 02111-1307, USA. */ #include "insdel.h" #include "lstream.h" #include "sysfile.h" +#ifdef WINDOWSNT +#include "console-msw.h" +#endif #include #include @@ -103,40 +106,40 @@ FILE *termscript; /* Stdio stream being used for copy of all output. */ int stdout_needs_newline; -/* Write a string (in internal format) to stdio stream STREAM. */ - -void -write_string_to_stdio_stream (FILE *stream, struct console *con, - const Bufbyte *str, - Bytecount offset, Bytecount len, - Lisp_Object coding_system) +static void +std_handle_out_external (FILE *stream, Lisp_Object lstream, + const Extbyte *extptr, Extcount extlen, + /* is this really stdout/stderr? + (controls termscript writing) */ + int output_is_std_handle, + int must_flush) { - Extcount extlen; - const Extbyte *extptr; - - TO_EXTERNAL_FORMAT (DATA, (str + offset, len), - ALLOCA, (extptr, extlen), - coding_system); if (stream) { - fwrite (extptr, 1, extlen, stream); #ifdef WINDOWSNT - /* Q122442 says that pipes are "treated as files, not as - devices", and that this is a feature. Before I found that - article, I thought it was a bug. Thanks MS, I feel much - better now. - kkm */ - if (stream == stdout || stream == stderr) - fflush (stream); + /* we typically have no useful stdout/stderr under windows if we're + being invoked graphically. */ + if (!noninteractive) + msw_output_console_string (extptr, extlen); + else +#endif + { + fwrite (extptr, 1, extlen, stream); +#ifdef WINDOWSNT + /* Q122442 says that pipes are "treated as files, not as + devices", and that this is a feature. Before I found that + article, I thought it was a bug. Thanks MS, I feel much + better now. - kkm */ + must_flush = 1; #endif + if (must_flush) + fflush (stream); + } } else - { - assert (CONSOLE_TTY_P (con)); - Lstream_write (XLSTREAM (CONSOLE_TTY_DATA (con)->outstream), - extptr, extlen); - } - if (stream == stdout || stream == stderr || - (!stream && CONSOLE_TTY_DATA (con)->is_stdio)) + Lstream_write (XLSTREAM (lstream), extptr, extlen); + + if (output_is_std_handle) { if (termscript) { @@ -147,6 +150,113 @@ write_string_to_stdio_stream (FILE *stream, struct console *con, } } +/* #### The following function should be replaced a call to the + emacs_doprnt_*() functions. This is the only way to ensure that + I18N3 works properly (many implementations of the *printf() + functions, including the ones included in glibc, do not implement + the %###$ argument-positioning syntax). + + Note, however, that to do this, we'd have to + + 1) pre-allocate all the lstreams and do whatever else was necessary + to make sure that no allocation occurs, since these functions may be + called from fatal_error_signal(). + + 2) (to be really correct) make a new lstream that outputs using + msw_output_console_string(). */ + +static int +std_handle_out_va (FILE *stream, const char *fmt, va_list args) +{ + Bufbyte kludge[8192]; + Extbyte *extptr; + Extcount extlen; + int retval; + + retval = vsprintf ((char *) kludge, fmt, args); + TO_EXTERNAL_FORMAT (DATA, (kludge, strlen ((char *) kludge)), + ALLOCA, (extptr, extlen), + Qnative); + std_handle_out_external (stream, Qnil, extptr, extlen, 1, 1); + return retval; +} + +/* Output portably to stderr or its equivalent; call GETTEXT on the + format string. Automatically flush when done. */ + +int +stderr_out (const char *fmt, ...) +{ + int retval; + va_list args; + va_start (args, fmt); + retval = std_handle_out_va (stderr, GETTEXT (fmt), args); + va_end (args); + return retval; +} + +/* Output portably to stdout or its equivalent; call GETTEXT on the + format string. Automatically flush when done. */ + +int +stdout_out (const char *fmt, ...) +{ + int retval; + va_list args; + va_start (args, fmt); + retval = std_handle_out_va (stdout, GETTEXT (fmt), args); + va_end (args); + return retval; +} + +DOESNT_RETURN +fatal (const char *fmt, ...) +{ + va_list args; + va_start (args, fmt); + + stderr_out ("\nXEmacs: "); + std_handle_out_va (stderr, GETTEXT (fmt), args); + stderr_out ("\n"); + + va_end (args); + exit (1); +} + +/* Write a string (in internal format) to stdio stream STREAM. */ + +void +write_string_to_stdio_stream (FILE *stream, struct console *con, + const Bufbyte *str, + Bytecount offset, Bytecount len, + Lisp_Object coding_system, + int must_flush) +{ + Extcount extlen; + const Extbyte *extptr; + + /* #### yuck! sometimes this function is called with string data, + and the following call may gc. */ + { + Bufbyte *puta = (Bufbyte *) alloca (len); + memcpy (puta, str + offset, len); + TO_EXTERNAL_FORMAT (DATA, (puta, len), + ALLOCA, (extptr, extlen), + coding_system); + } + + if (stream) + std_handle_out_external (stream, Qnil, extptr, extlen, + stream == stdout || stream == stderr, must_flush); + else + { + assert (CONSOLE_TTY_P (con)); + std_handle_out_external (0, CONSOLE_TTY_DATA (con)->outstream, + extptr, extlen, + CONSOLE_TTY_DATA (con)->is_stdio, must_flush); + } +} + /* Write a string to the output location specified in FUNCTION. Arguments NONRELOC, RELOC, OFFSET, and LEN are as in buffer_insert_string_1() in insdel.c. */ @@ -238,7 +348,7 @@ output_string (Lisp_Object function, const Bufbyte *nonreloc, else if (EQ (function, Qt) || EQ (function, Qnil)) { write_string_to_stdio_stream (stdout, 0, newnonreloc, offset, len, - Qterminal); + Qterminal, print_unbuffered); } else { @@ -1427,6 +1537,10 @@ If optional arg STDOUT-P is non-nil, write to stdout; otherwise, write to stderr. You can use this function to write directly to the terminal. This function can be used as the STREAM argument of Fprint() or the like. +Under MS Windows, this writes output to the console window (which is +created, if necessary), unless XEmacs is being run noninteractively +(i.e. using the `-batch' argument). + If you have opened a termscript file (using `open-termscript'), then the output also will be logged to this file. */ @@ -1461,7 +1575,7 @@ the output also will be logged to this file. write_string_to_stdio_stream (file, con, XSTRING_DATA (char_or_string), 0, XSTRING_LENGTH (char_or_string), - Qterminal); + Qterminal, 1); else { Bufbyte str[MAX_EMCHAR_LEN]; @@ -1469,7 +1583,7 @@ the output also will be logged to this file. CHECK_CHAR_COERCE_INT (char_or_string); len = set_charptr_emchar (str, XCHAR (char_or_string)); - write_string_to_stdio_stream (file, con, str, 0, len, Qterminal); + write_string_to_stdio_stream (file, con, str, 0, len, Qterminal, 1); } return char_or_string; @@ -1542,7 +1656,6 @@ debug_print (Lisp_Object debug_print_obj) { debug_print_no_newline (debug_print_obj); stderr_out ("\n"); - fflush (stderr); } /* Debugging kludge -- unbuffered */ @@ -1575,7 +1688,6 @@ debug_backtrace (void) Fbacktrace (Qexternal_debugging_output, Qt); stderr_out ("\n"); - fflush (stderr); Vinhibit_quit = old_inhibit_quit; Vprint_level = old_print_level; @@ -1593,13 +1705,11 @@ debug_short_backtrace (int length) int first = 1; struct backtrace *bt = backtrace_list; stderr_out (" ["); - fflush (stderr); while (length > 0 && bt) { if (!first) { stderr_out (", "); - fflush (stderr); } if (COMPILED_FUNCTIONP (*bt->function)) { @@ -1612,15 +1722,12 @@ debug_short_backtrace (int length) if (!NILP (ann)) { stderr_out (""); - fflush (stderr); } else { stderr_out (""); - fflush (stderr); } } else @@ -1630,7 +1737,6 @@ debug_short_backtrace (int length) bt = bt->next; } stderr_out ("]\n"); - fflush (stderr); } #endif /* debugging kludge */ diff --git a/src/process-nt.c b/src/process-nt.c index f7ab6a5..8450fbc 100644 --- a/src/process-nt.c +++ b/src/process-nt.c @@ -2,7 +2,7 @@ Copyright (C) 1985, 1986, 1987, 1988, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. - Copyright (C) 1995, 1996 Ben Wing. + Copyright (C) 1995, 1996, 2000 Ben Wing. This file is part of XEmacs. @@ -26,15 +26,15 @@ Boston, MA 02111-1307, USA. */ #include #include "lisp.h" +#include "console-msw.h" #include "hash.h" #include "lstream.h" #include "process.h" #include "procimpl.h" #include "sysdep.h" -#ifndef __MINGW32__ #include -#else +#ifdef __MINGW32__ #include #endif #include @@ -52,9 +52,22 @@ Lisp_Object Qnt_quote_process_args; struct nt_process_data { HANDLE h_process; + DWORD dwProcessId; + HWND hwnd; /* console window */ int need_enable_child_signals; }; +/* Control whether create_child causes the process to inherit Emacs' + console window, or be given a new one of its own. The default is + nil, to allow multiple DOS programs to run on Win95. Having separate + consoles also allows Emacs to cleanly terminate process groups. */ +Lisp_Object Vmswindows_start_process_share_console; + +/* Control whether create_child cause the process to inherit Emacs' + error mode setting. The default is t, to minimize the possibility of + subprocesses blocking when accessing unmounted drives. */ +Lisp_Object Vmswindows_start_process_inherit_error_mode; + #define NT_DATA(p) ((struct nt_process_data*)((p)->process_data)) /*-----------------------------------------------------------------------*/ @@ -68,6 +81,21 @@ get_nt_process_handle (Lisp_Process *p) { return (NT_DATA (p)->h_process); } + +static struct Lisp_Process * +find_process_from_pid (DWORD pid) +{ + Lisp_Object tail, proc; + + for (tail = Vprocess_list; CONSP (tail); tail = XCDR (tail)) + { + proc = XCAR (tail); + if (NT_DATA (XPROCESS (proc))->dwProcessId == pid) + return XPROCESS (proc); + } + return 0; +} + /*-----------------------------------------------------------------------*/ /* Running remote threads. See Microsoft Systems Journal 1994 Number 5 */ @@ -224,6 +252,8 @@ run_in_other_process (HANDLE h_process, /* Sending signals */ /*-----------------------------------------------------------------------*/ +/* ---------------------------- the NT way ------------------------------- */ + /* * We handle the following signals: * @@ -287,19 +317,34 @@ sig_enable_proc (sig_enable_data* data) * Return nonzero if successful. */ -/* This code assigns a return value of GetProcAddress to function pointers - of many different types. Instead of heavy obscure casts, we just disable - warnings about assignments to different function pointer types. */ -#pragma warning (disable : 4113) - static int -send_signal (HANDLE h_process, int signo) +send_signal_the_nt_way (struct nt_process_data *cp, int pid, int signo) { + HANDLE h_process; HMODULE h_kernel = GetModuleHandle ("kernel32"); + int close_process = 0; DWORD retval; assert (h_kernel != NULL); + if (cp) + { + pid = cp->dwProcessId; + h_process = cp->h_process; + } + else + { + close_process = 1; + /* Try to open the process with required privileges */ + h_process = OpenProcess (PROCESS_CREATE_THREAD + | PROCESS_QUERY_INFORMATION + | PROCESS_VM_OPERATION + | PROCESS_VM_WRITE, + FALSE, pid); + if (!h_process) + return 0; + } + switch (signo) { case SIGKILL: @@ -308,7 +353,9 @@ send_signal (HANDLE h_process, int signo) case SIGHUP: { sigkill_data d; - d.adr_ExitProcess = GetProcAddress (h_kernel, "ExitProcess"); + + d.adr_ExitProcess = + (void (WINAPI *) (UINT)) GetProcAddress (h_kernel, "ExitProcess"); assert (d.adr_ExitProcess); retval = run_in_other_process (h_process, (LPTHREAD_START_ROUTINE)sigkill_proc, @@ -319,6 +366,7 @@ send_signal (HANDLE h_process, int signo) { sigint_data d; d.adr_GenerateConsoleCtrlEvent = + (BOOL (WINAPI *) (DWORD, DWORD)) GetProcAddress (h_kernel, "GenerateConsoleCtrlEvent"); assert (d.adr_GenerateConsoleCtrlEvent); d.event = CTRL_C_EVENT; @@ -331,6 +379,8 @@ send_signal (HANDLE h_process, int signo) assert (0); } + if (close_process) + CloseHandle (h_process); return (int)retval > 0 ? 1 : 0; } @@ -345,6 +395,7 @@ enable_child_signals (HANDLE h_process) assert (h_kernel != NULL); d.adr_SetConsoleCtrlHandler = + (BOOL (WINAPI *) (LPVOID, BOOL)) GetProcAddress (h_kernel, "SetConsoleCtrlHandler"); assert (d.adr_SetConsoleCtrlHandler); run_in_other_process (h_process, (LPTHREAD_START_ROUTINE)sig_enable_proc, @@ -353,6 +404,214 @@ enable_child_signals (HANDLE h_process) #pragma warning (default : 4113) +/* ---------------------------- the 95 way ------------------------------- */ + +static BOOL CALLBACK +find_child_console (HWND hwnd, struct nt_process_data *cp) +{ + DWORD thread_id; + DWORD process_id; + + thread_id = GetWindowThreadProcessId (hwnd, &process_id); + if (process_id == cp->dwProcessId) + { + char window_class[32]; + + GetClassName (hwnd, window_class, sizeof (window_class)); + if (strcmp (window_class, + msw_windows9x_p () + ? "tty" + : "ConsoleWindowClass") == 0) + { + cp->hwnd = hwnd; + return FALSE; + } + } + /* keep looking */ + return TRUE; +} + +static int +send_signal_the_95_way (struct nt_process_data *cp, int pid, int signo) +{ + HANDLE h_process; + int close_process = 0; + int rc = 1; + + if (cp) + { + pid = cp->dwProcessId; + h_process = cp->h_process; + + /* Try to locate console window for process. */ + EnumWindows (find_child_console, (LPARAM) cp); + } + else + { + close_process = 1; + /* Try to open the process with required privileges */ + h_process = OpenProcess (PROCESS_TERMINATE, FALSE, pid); + if (!h_process) + return 0; + } + + if (signo == SIGINT) + { + if (NILP (Vmswindows_start_process_share_console) && cp && cp->hwnd) + { + BYTE control_scan_code = (BYTE) MapVirtualKey (VK_CONTROL, 0); + BYTE vk_break_code = VK_CANCEL; + BYTE break_scan_code = (BYTE) MapVirtualKey (vk_break_code, 0); + HWND foreground_window; + + if (break_scan_code == 0) + { + /* Fake Ctrl-C if we can't manage Ctrl-Break. */ + vk_break_code = 'C'; + break_scan_code = (BYTE) MapVirtualKey (vk_break_code, 0); + } + + foreground_window = GetForegroundWindow (); + if (foreground_window) + { + /* NT 5.0, and apparently also Windows 98, will not allow + a Window to be set to foreground directly without the + user's involvement. The workaround is to attach + ourselves to the thread that owns the foreground + window, since that is the only thread that can set the + foreground window. */ + DWORD foreground_thread, child_thread; + foreground_thread = + GetWindowThreadProcessId (foreground_window, NULL); + if (foreground_thread == GetCurrentThreadId () + || !AttachThreadInput (GetCurrentThreadId (), + foreground_thread, TRUE)) + foreground_thread = 0; + + child_thread = GetWindowThreadProcessId (cp->hwnd, NULL); + if (child_thread == GetCurrentThreadId () + || !AttachThreadInput (GetCurrentThreadId (), + child_thread, TRUE)) + child_thread = 0; + + /* Set the foreground window to the child. */ + if (SetForegroundWindow (cp->hwnd)) + { + /* Generate keystrokes as if user had typed Ctrl-Break or + Ctrl-C. */ + keybd_event (VK_CONTROL, control_scan_code, 0, 0); + keybd_event (vk_break_code, break_scan_code, + (vk_break_code == 'C' ? 0 : KEYEVENTF_EXTENDEDKEY), 0); + keybd_event (vk_break_code, break_scan_code, + (vk_break_code == 'C' ? 0 : KEYEVENTF_EXTENDEDKEY) + | KEYEVENTF_KEYUP, 0); + keybd_event (VK_CONTROL, control_scan_code, + KEYEVENTF_KEYUP, 0); + + /* Sleep for a bit to give time for Emacs frame to respond + to focus change events (if Emacs was active app). */ + Sleep (100); + + SetForegroundWindow (foreground_window); + } + /* Detach from the foreground and child threads now that + the foreground switching is over. */ + if (foreground_thread) + AttachThreadInput (GetCurrentThreadId (), + foreground_thread, FALSE); + if (child_thread) + AttachThreadInput (GetCurrentThreadId (), + child_thread, FALSE); + } + } + /* Ctrl-Break is NT equivalent of SIGINT. */ + else if (!GenerateConsoleCtrlEvent (CTRL_BREAK_EVENT, pid)) + { +#if 0 /* FSF Emacs */ + DebPrint (("sys_kill.GenerateConsoleCtrlEvent return %d " + "for pid %lu\n", GetLastError (), pid)); + errno = EINVAL; +#endif + rc = 0; + } + } + else + { + if (NILP (Vmswindows_start_process_share_console) && cp && cp->hwnd) + { +#if 1 + if (msw_windows9x_p ()) + { +/* + Another possibility is to try terminating the VDM out-right by + calling the Shell VxD (id 0x17) V86 interface, function #4 + "SHELL_Destroy_VM", ie. + + mov edx,4 + mov ebx,vm_handle + call shellapi + + First need to determine the current VM handle, and then arrange for + the shellapi call to be made from the system vm (by using + Switch_VM_and_callback). + + Could try to invoke DestroyVM through CallVxD. + +*/ +#if 0 + /* On Win95, posting WM_QUIT causes the 16-bit subsystem + to hang when cmdproxy is used in conjunction with + command.com for an interactive shell. Posting + WM_CLOSE pops up a dialog that, when Yes is selected, + does the same thing. TerminateProcess is also less + than ideal in that subprocesses tend to stick around + until the machine is shutdown, but at least it + doesn't freeze the 16-bit subsystem. */ + PostMessage (cp->hwnd, WM_QUIT, 0xff, 0); +#endif + if (!TerminateProcess (h_process, 0xff)) + { +#if 0 /* FSF Emacs */ + DebPrint (("sys_kill.TerminateProcess returned %d " + "for pid %lu\n", GetLastError (), pid)); + errno = EINVAL; +#endif + rc = 0; + } + } + else +#endif + PostMessage (cp->hwnd, WM_CLOSE, 0, 0); + } + /* Kill the process. On W32 this doesn't kill child processes + so it doesn't work very well for shells which is why it's not + used in every case. */ + else if (!TerminateProcess (h_process, 0xff)) + { +#if 0 /* FSF Emacs */ + DebPrint (("sys_kill.TerminateProcess returned %d " + "for pid %lu\n", GetLastError (), pid)); + errno = EINVAL; +#endif + rc = 0; + } + } + + if (close_process) + CloseHandle (h_process); + + return rc; +} + +/* -------------------------- all-OS functions ---------------------------- */ + +static int +send_signal (struct nt_process_data *cp, int pid, int signo) +{ + return send_signal_the_nt_way (cp, pid, signo) + || send_signal_the_95_way (cp, pid, signo); +} + /* * Signal error if SIGNO is not supported */ @@ -383,8 +642,8 @@ static void nt_finalize_process_data (Lisp_Process *p, int for_disksave) { assert (!for_disksave); - if (NT_DATA(p)->h_process) - CloseHandle (NT_DATA(p)->h_process); + if (NT_DATA (p)->h_process) + CloseHandle (NT_DATA (p)->h_process); } /* @@ -416,6 +675,13 @@ signal_cannot_launch (Lisp_Object image_file, DWORD err) signal_simple_error_2 ("Error starting", image_file, lisp_strerror (errno)); } +static void +ensure_console_window_exists () +{ + if (msw_windows9x_p ()) + msw_hide_console (); +} + static int nt_create_process (Lisp_Process *p, Lisp_Object *argv, int nargv, @@ -595,6 +861,7 @@ nt_create_process (Lisp_Process *p, STARTUPINFO si; PROCESS_INFORMATION pi; DWORD err; + DWORD flags; xzero (si); si.dwFlags = STARTF_USESHOWWINDOW; @@ -607,9 +874,19 @@ nt_create_process (Lisp_Process *p, si.dwFlags |= STARTF_USESTDHANDLES; } - err = (CreateProcess (NULL, command_line, NULL, NULL, TRUE, - CREATE_NEW_CONSOLE | CREATE_NEW_PROCESS_GROUP - | CREATE_SUSPENDED, + flags = CREATE_SUSPENDED; + if (msw_windows9x_p ()) + flags |= (!NILP (Vmswindows_start_process_share_console) + ? CREATE_NEW_PROCESS_GROUP + : CREATE_NEW_CONSOLE); + else + flags |= CREATE_NEW_CONSOLE | CREATE_NEW_PROCESS_GROUP; + if (NILP (Vmswindows_start_process_inherit_error_mode)) + flags |= CREATE_DEFAULT_ERROR_MODE; + + ensure_console_window_exists (); + + err = (CreateProcess (NULL, command_line, NULL, NULL, TRUE, flags, proc_env, (char *) XSTRING_DATA (cur_dir), &si, &pi) ? 0 : GetLastError ()); @@ -636,6 +913,7 @@ nt_create_process (Lisp_Process *p, if (do_io) { NT_DATA(p)->h_process = pi.hProcess; + NT_DATA(p)->dwProcessId = pi.dwProcessId; init_process_io_handles (p, (void*)hmyslurp, (void*)hmyshove, 0); } else @@ -789,18 +1067,18 @@ nt_kill_child_process (Lisp_Object proc, int signo, /* Enable child signals if necessary. This may lose the first but it's better than nothing. */ - if (NT_DATA(p)->need_enable_child_signals > 0) + if (NT_DATA (p)->need_enable_child_signals > 0) { - enable_child_signals(NT_DATA(p)->h_process); - NT_DATA(p)->need_enable_child_signals = 0; + enable_child_signals (NT_DATA(p)->h_process); + NT_DATA (p)->need_enable_child_signals = 0; } /* Signal error if SIGNO cannot be sent */ validate_signal_number (signo); /* Send signal */ - if (!send_signal (NT_DATA(p)->h_process, signo)) - error ("Cannot send signal to process"); + if (!send_signal (NT_DATA (p), 0, signo)) + signal_simple_error ("Cannot send signal to process", proc); } /* @@ -812,26 +1090,13 @@ nt_kill_child_process (Lisp_Object proc, int signo, static int nt_kill_process_by_pid (int pid, int signo) { - HANDLE h_process; - int send_result; - + struct Lisp_Process *p; + /* Signal error if SIGNO cannot be sent */ validate_signal_number (signo); - /* Try to open the process with required privileges */ - h_process = OpenProcess (PROCESS_CREATE_THREAD - | PROCESS_QUERY_INFORMATION - | PROCESS_VM_OPERATION - | PROCESS_VM_WRITE, - FALSE, pid); - if (h_process == NULL) - return -1; - - send_result = send_signal (h_process, signo); - - CloseHandle (h_process); - - return send_result ? 0 : -1; + p = find_process_from_pid (pid); + return send_signal (p ? NT_DATA (p) : 0, pid, signo) ? 0 : -1; } /*-----------------------------------------------------------------------*/ @@ -942,9 +1207,11 @@ nt_canonicalize_host_name (Lisp_Object host) deactivate and close it via delete-process */ static void -nt_open_network_stream (Lisp_Object name, Lisp_Object host, Lisp_Object service, +nt_open_network_stream (Lisp_Object name, Lisp_Object host, + Lisp_Object service, Lisp_Object protocol, void** vinfd, void** voutfd) { + /* !!#### not Mule-ized */ struct sockaddr_in address; SOCKET s; int port; @@ -953,8 +1220,7 @@ nt_open_network_stream (Lisp_Object name, Lisp_Object host, Lisp_Object service, CHECK_STRING (host); if (!EQ (protocol, Qtcp)) - error ("Unsupported protocol \"%s\"", - string_data (symbol_name (XSYMBOL (protocol)))); + signal_simple_error ("Unsupported protocol", protocol); if (INTP (service)) port = htons ((unsigned short) XINT (service)); @@ -964,7 +1230,7 @@ nt_open_network_stream (Lisp_Object name, Lisp_Object host, Lisp_Object service, CHECK_STRING (service); svc_info = getservbyname ((char *) XSTRING_DATA (service), "tcp"); if (svc_info == 0) - error ("Unknown service \"%s\"", XSTRING_DATA (service)); + signal_simple_error ("Unknown service", service); port = svc_info->s_port; } @@ -1026,18 +1292,20 @@ nt_open_network_stream (Lisp_Object name, Lisp_Object host, Lisp_Object service, connect_failed: closesocket (s); - if (INTP (service)) { - warn_when_safe(Qstream, Qwarning, - "failure to open network stream to host \"%s\" for service \"%d\"", - XSTRING_DATA (host), - (unsigned short) XINT (service)); - } - else { - warn_when_safe(Qstream, Qwarning, - "failure to open network stream to host \"%s\" for service \"%s\"", - XSTRING_DATA (host), - XSTRING_DATA (service)); - } + if (INTP (service)) + { + warn_when_safe (Qstream, Qwarning, + "failure to open network stream to host \"%s\" for service \"%d\"", + XSTRING_DATA (host), + (unsigned short) XINT (service)); + } + else + { + warn_when_safe (Qstream, Qwarning, + "failure to open network stream to host \"%s\" for service \"%s\"", + XSTRING_DATA (host), + XSTRING_DATA (service)); + } report_file_error ("connection failed", list2 (host, name)); } @@ -1077,4 +1345,22 @@ syms_of_process_nt (void) void vars_of_process_nt (void) { + DEFVAR_LISP ("mswindows-start-process-share-console", + &Vmswindows_start_process_share_console /* +When nil, new child processes are given a new console. +When non-nil, they share the Emacs console; this has the limitation of +allowing only only DOS subprocess to run at a time (whether started directly +or indirectly by Emacs), and preventing Emacs from cleanly terminating the +subprocess group, but may allow Emacs to interrupt a subprocess that doesn't +otherwise respond to interrupts from Emacs. +*/ ); + Vmswindows_start_process_share_console = Qnil; + + DEFVAR_LISP ("mswindows-start-process-inherit-error-mode", + &Vmswindows_start_process_inherit_error_mode /* + "When nil, new child processes revert to the default error mode. +When non-nil, they inherit their error mode setting from Emacs, which stops +them blocking when trying to access unmounted drives etc. +*/ ); + Vmswindows_start_process_inherit_error_mode = Qt; } diff --git a/src/process-unix.c b/src/process-unix.c index c4f8bbd..c9ac0a1 100644 --- a/src/process-unix.c +++ b/src/process-unix.c @@ -1765,7 +1765,7 @@ unix_open_network_stream (Lisp_Object name, Lisp_Object host, Lisp_Object servic #ifdef HAVE_MULTICAST -/* Didier Verna Nov. 28 1997. +/* Didier Verna Nov. 28 1997. This function is similar to open-network-stream-internal, but provides a mean to open an UDP multicast connection instead of a TCP one. Like in the diff --git a/src/process.h b/src/process.h index 8e230cf..bb4f682 100644 --- a/src/process.h +++ b/src/process.h @@ -37,7 +37,8 @@ void wait_without_blocking (void); #else /* not NO_SUBPROCESSES */ -/* Only process.c needs to know about the guts of this */ +/* struct Lisp_Process is defined in procimpl.h; only process-*.c need + to know about the guts of it. */ DECLARE_LRECORD (process, Lisp_Process); #define XPROCESS(x) XRECORD (x, process, Lisp_Process) diff --git a/src/redisplay-msw.c b/src/redisplay-msw.c index 12a5ae7..744d6ba 100644 --- a/src/redisplay-msw.c +++ b/src/redisplay-msw.c @@ -202,16 +202,17 @@ mswindows_text_width_single_run (HDC hdc, struct face_cachel *cachel, /* * Given F, retrieve device context. F can be a display frame, or - * a print job. + * a print job. For a print job, page is also started when printer's + * device context is first time requested. */ -INLINE HDC -get_frame_dc (struct frame *f) +static HDC +get_frame_dc (struct frame *f, int start_page_p) { if (FRAME_MSWINDOWS_P (f)) return FRAME_MSWINDOWS_DC (f); else { - if (!FRAME_MSPRINTER_PAGE_STARTED (f)) + if (start_page_p && !FRAME_MSPRINTER_PAGE_STARTED (f)) msprinter_start_page (f); return DEVICE_MSPRINTER_HDC (XDEVICE (FRAME_DEVICE (f))); } @@ -221,13 +222,14 @@ get_frame_dc (struct frame *f) * Given F, retrieve compatible device context. F can be a display * frame, or a print job. */ -INLINE HDC +static HDC get_frame_compdc (struct frame *f) { - if (FRAME_MSWINDOWS_P (f)) - return FRAME_MSWINDOWS_CDC (f); + struct device *d = XDEVICE (FRAME_DEVICE (f)); + if (DEVICE_MSWINDOWS_P (d)) + return DEVICE_MSWINDOWS_HCDC (d); else - return FRAME_MSPRINTER_CDC (f); + return DEVICE_MSPRINTER_HCDC (d); } /***************************************************************************** @@ -285,7 +287,7 @@ mswindows_output_blank (struct window *w, struct display_line *dl, struct rune *rb, int start_pixpos) { struct frame *f = XFRAME (w->frame); - HDC hdc = get_frame_dc (f); + HDC hdc = get_frame_dc (f, 1); RECT rect = { rb->xpos, DISPLAY_LINE_YPOS (dl), rb->xpos+rb->width, DISPLAY_LINE_YEND (dl) }; @@ -338,7 +340,7 @@ mswindows_output_cursor (struct window *w, struct display_line *dl, int xpos, struct face_cachel *cachel=0; Lisp_Object font = Qnil; int focus = EQ (w->frame, DEVICE_FRAME_WITH_FOCUS_REAL (d)); - HDC hdc = get_frame_dc (f); + HDC hdc = get_frame_dc (f, 1); unsigned int local_face_index=0; char *p_char = NULL; int n_char = 0; @@ -458,7 +460,7 @@ mswindows_output_string (struct window *w, struct display_line *dl, struct frame *f = XFRAME (w->frame); /* struct device *d = XDEVICE (f->device);*/ Lisp_Object window; - HDC hdc = get_frame_dc (f); + HDC hdc = get_frame_dc (f, 1); int clip_end; Lisp_Object bg_pmap; int len = Dynarr_length (buf); @@ -571,7 +573,7 @@ mswindows_output_dibitmap (struct frame *f, Lisp_Image_Instance *p, struct display_box* db, struct display_glyph_area* dga) { - HDC hdc = get_frame_dc (f); + HDC hdc = get_frame_dc (f, 1); HDC hcompdc = get_frame_compdc (f); HGDIOBJ old=NULL; COLORREF bgcolor = GetBkColor (hdc); @@ -680,7 +682,7 @@ mswindows_output_pixmap (struct window *w, Lisp_Object image_instance, int cursor_height, int bg_pixmap) { struct frame *f = XFRAME (w->frame); - HDC hdc = get_frame_dc (f); + HDC hdc = get_frame_dc (f, 1); Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance); Lisp_Object window; @@ -731,7 +733,7 @@ mswindows_redisplay_deadbox_maybe (struct window *w, const RECT* prc) if (IntersectRect (&rect_paint, &rect_dead, prc)) { struct frame *f = XFRAME (WINDOW_FRAME (w)); - FillRect (get_frame_dc (f), &rect_paint, + FillRect (get_frame_dc (f, 1), &rect_paint, (HBRUSH) (COLOR_BTNFACE+1)); } } @@ -910,7 +912,7 @@ mswindows_bevel_area (struct window *w, face_index findex, int x, int y, { RECT rect = { x, y, x + width, y + height }; Lisp_Object color = WINDOW_FACE_CACHEL_BACKGROUND (w, findex); - HDC hdc = get_frame_dc (f); + HDC hdc = get_frame_dc (f, 1); mswindows_update_dc (hdc, Qnil, color, Qnil); DrawEdge (hdc, &rect, edge, border); @@ -969,7 +971,7 @@ static int mswindows_flash (struct device *d) { struct frame *f = device_selected_frame (d); - HDC hdc = get_frame_dc (f); + HDC hdc = get_frame_dc (f, 1); RECT rc; GetClientRect (FRAME_MSWINDOWS_HANDLE (f), &rc); @@ -1121,6 +1123,7 @@ mswindows_output_display_block (struct window *w, struct display_line *dl, int b Lisp_Object instance; struct display_box dbox; struct display_glyph_area dga; + redisplay_calculate_display_boxes (dl, rb->xpos, rb->object.dglyph.xoffset, start_pixpos, rb->width, &dbox, &dga); @@ -1131,69 +1134,72 @@ mswindows_output_display_block (struct window *w, struct display_line *dl, int b findex = rb->findex; if (IMAGE_INSTANCEP (instance)) - switch (XIMAGE_INSTANCE_TYPE (instance)) - { - case IMAGE_TEXT: + { + switch (XIMAGE_INSTANCE_TYPE (instance)) { - /* #### This is way losing. See the comment in - add_glyph_rune(). */ - Lisp_Object string = - XIMAGE_INSTANCE_TEXT_STRING (instance); - convert_bufbyte_string_into_emchar_dynarr - (XSTRING_DATA (string), XSTRING_LENGTH (string), buf); - + case IMAGE_TEXT: + { + /* #### This is way losing. See the comment in + add_glyph_rune(). */ + Lisp_Object string = + XIMAGE_INSTANCE_TEXT_STRING (instance); + convert_bufbyte_string_into_emchar_dynarr + (XSTRING_DATA (string), XSTRING_LENGTH (string), buf); + + if (rb->cursor_type == CURSOR_ON) + mswindows_output_cursor (w, dl, xpos, cursor_width, + findex, Dynarr_at (buf, 0), 0); + else /* #### redisplay-x passes -1 as the width: why ? */ + mswindows_output_string (w, dl, buf, xpos, + rb->object.dglyph.xoffset, + start_pixpos, rb->width, findex, + 0, 0, 0, 0); + Dynarr_reset (buf); + } + break; + + case IMAGE_MONO_PIXMAP: + case IMAGE_COLOR_PIXMAP: + redisplay_output_pixmap (w, instance, &dbox, &dga, findex, + cursor_start, cursor_width, + cursor_height, 0); if (rb->cursor_type == CURSOR_ON) mswindows_output_cursor (w, dl, xpos, cursor_width, - findex, Dynarr_at (buf, 0), 0); - else /* #### redisplay-x passes -1 as the width: why ? */ - mswindows_output_string (w, dl, buf, xpos, - rb->object.dglyph.xoffset, - start_pixpos, rb->width, findex, - 0, 0, 0, 0); - Dynarr_reset (buf); + findex, 0, 1); + break; + + case IMAGE_POINTER: + abort (); + + case IMAGE_SUBWINDOW: + case IMAGE_WIDGET: + redisplay_output_subwindow (w, instance, &dbox, &dga, findex, + cursor_start, cursor_width, + cursor_height); + if (rb->cursor_type == CURSOR_ON) + mswindows_output_cursor (w, dl, xpos, cursor_width, + findex, 0, 1); + break; + + case IMAGE_LAYOUT: + redisplay_output_layout (w, instance, &dbox, &dga, findex, + cursor_start, cursor_width, + cursor_height); + if (rb->cursor_type == CURSOR_ON) + mswindows_output_cursor (w, dl, xpos, cursor_width, + findex, 0, 1); + break; + + case IMAGE_NOTHING: + /* nothing is as nothing does */ + break; + + default: + abort (); } - break; - - case IMAGE_MONO_PIXMAP: - case IMAGE_COLOR_PIXMAP: - redisplay_output_pixmap (w, instance, &dbox, &dga, findex, - cursor_start, cursor_width, - cursor_height, 0); - if (rb->cursor_type == CURSOR_ON) - mswindows_output_cursor (w, dl, xpos, cursor_width, - findex, 0, 1); - break; - - case IMAGE_POINTER: - abort (); - - case IMAGE_SUBWINDOW: - case IMAGE_WIDGET: - redisplay_output_subwindow (w, instance, &dbox, &dga, findex, - cursor_start, cursor_width, - cursor_height); - if (rb->cursor_type == CURSOR_ON) - mswindows_output_cursor (w, dl, xpos, cursor_width, - findex, 0, 1); - break; - - case IMAGE_LAYOUT: - redisplay_output_layout (w, instance, &dbox, &dga, findex, - cursor_start, cursor_width, - cursor_height); - if (rb->cursor_type == CURSOR_ON) - mswindows_output_cursor (w, dl, xpos, cursor_width, - findex, 0, 1); - break; - - case IMAGE_NOTHING: - /* nothing is as nothing does */ - break; - - default: - abort (); - } - + IMAGE_INSTANCE_OPTIMIZE_OUTPUT + (XIMAGE_INSTANCE (instance)) = 0; + } xpos += rb->width; elt++; } @@ -1226,15 +1232,15 @@ static void mswindows_output_vertical_divider (struct window *w, int clear_unused) { struct frame *f = XFRAME (w->frame); - HDC hdc = get_frame_dc (f); + HDC hdc = get_frame_dc (f, 1); RECT rect; int spacing = XINT (w->vertical_divider_spacing); int shadow = XINT (w->vertical_divider_shadow_thickness); int abs_shadow = abs (shadow); int line_width = XINT (w->vertical_divider_line_width); int div_left = WINDOW_RIGHT (w) - window_divider_width (w); - int y1 = WINDOW_TOP (w) + FRAME_TOP_GUTTER_BOUNDS (f); - int y2 = WINDOW_BOTTOM (w) + FRAME_BOTTOM_GUTTER_BOUNDS (f); + int y1 = WINDOW_TOP (w); + int y2 = WINDOW_BOTTOM (w); /* Clear left and right spacing areas */ if (spacing) @@ -1287,7 +1293,7 @@ static int mswindows_text_width (struct frame *f, struct face_cachel *cachel, const Emchar *str, Charcount len) { - HDC hdc = get_frame_dc (f); + HDC hdc = get_frame_dc (f, 0); int width_so_far = 0; unsigned char *text_storage = (unsigned char *) alloca (2 * len); textual_run *runs = alloca_array (textual_run, len); @@ -1317,7 +1323,7 @@ mswindows_clear_region (Lisp_Object locale, struct device* d, struct frame* f, Lisp_Object background_pixmap) { RECT rect = { x, y, x+width, y+height }; - HDC hdc = get_frame_dc (f); + HDC hdc = get_frame_dc (f, 1); if (!NILP (background_pixmap)) { diff --git a/src/redisplay-output.c b/src/redisplay-output.c index 4d5fe0c..b89f50f 100644 --- a/src/redisplay-output.c +++ b/src/redisplay-output.c @@ -101,7 +101,7 @@ sync_rune_structs (struct window *w, rune_dynarr *cra, rune_dynarr *dra) For the given LINE in window W, make the current display line equal the desired display line. ****************************************************************************/ -static void +void sync_display_line_structs (struct window *w, int line, int do_blocks, display_line_dynarr *cdla, display_line_dynarr *ddla) @@ -211,10 +211,7 @@ compare_runes (struct window *w, struct rune *crb, struct rune *drb) #### It would really be worth it to arrange for this function to be (almost) a single call to memcmp. */ - if ((crb->findex != drb->findex) || - (WINDOW_FACE_CACHEL_DIRTY (w, drb->findex))) - return 0; - else if (crb->xpos != drb->xpos) + if (crb->xpos != drb->xpos) return 0; else if (crb->width != drb->width) return 0; @@ -236,17 +233,67 @@ compare_runes (struct window *w, struct rune *crb, struct rune *drb) return 0; /* Only check dirtiness if we know something has changed. */ else if (crb->type == RUNE_DGLYPH && - XFRAME (w->frame)->glyphs_changed) + ((XFRAME (w->frame)->glyphs_changed && + XGLYPH_DIRTYP (crb->object.dglyph.glyph)) || + crb->findex != drb->findex)) { - glyph_index gindex = get_glyph_cachel_index (w, drb->object.dglyph.glyph); - /* Although doing the cachel lookup for every comparison is - very expensive.we have to do it to make sure the cache is - up-to-date. */ - if (GLYPH_CACHEL_DIRTYP (w, gindex)) + /* We need some way of telling redisplay_output_layout () that the + only reason we are outputting it is because something has + changed internally. That way we can optimize whether we need + to clear the layout first and also only output the components + that have changed. The image_instance dirty flag and + display_hash are no good to us because these will invariably + have been set anyway if the layout has changed. So it looks + like we need yet another change flag that we can set here and + then clear in redisplay_output_layout (). */ + Lisp_Object window, image; + Lisp_Image_Instance* ii; + XSETWINDOW (window, w); + image = glyph_image_instance (crb->object.dglyph.glyph, + window, ERROR_ME_NOT, 1); + ii = XIMAGE_INSTANCE (image); + + if (TEXT_IMAGE_INSTANCEP (image) && + (crb->findex != drb->findex || + WINDOW_FACE_CACHEL_DIRTY (w, drb->findex))) return 0; + + /* It is quite common of the two glyphs to be EQ since in many + cases they will actually be the same object. This does not + mean, however, that nothing has changed. We therefore need to + check the current hash of the glyph against the last recorded + display hash. See update_subwindow (). */ + if (IMAGE_INSTANCE_DISPLAY_HASH (ii) == 0 || + IMAGE_INSTANCE_DISPLAY_HASH (ii) != + internal_hash (image, IMAGE_INSTANCE_HASH_DEPTH) || + crb->findex != drb->findex || + WINDOW_FACE_CACHEL_DIRTY (w, drb->findex)) + { + /* We now now we are going to re-output the glyph, but since + this is for some internal reason not related to geometry + changes, send a hint to the output routines that they can + take some short cuts. This is most useful for + layouts. This flag should get reset by the output + routines. + + #### It is possible for us to get here when the + face_cachel is dirty. I do not know what the implications + of this are.*/ + IMAGE_INSTANCE_OPTIMIZE_OUTPUT (ii) = 1; + return 0; + } else return 1; } + /* We now do this last so that glyph checks can do their own thing + for face changes. Face changes quite often happen when we are + trying to output something in the gutter, this would normally + lead to a lot of flashing. The indices can quite often be + different and yet the faces are the same, we do not want to + re-output in this instance. */ + else if (crb->findex != drb->findex || + WINDOW_FACE_CACHEL_DIRTY (w, drb->findex)) + return 0; else return 1; } @@ -1067,6 +1114,8 @@ redisplay_output_display_block (struct window *w, struct display_line *dl, int b { struct frame *f = XFRAME (w->frame); struct device *d = XDEVICE (f->device); + /* Temporarily disabled until generalization is done. */ +#if 0 struct display_block *db = Dynarr_atp (dl->display_blocks, block); rune_dynarr *rba = db->runes; struct rune *rb; @@ -1084,6 +1133,7 @@ redisplay_output_display_block (struct window *w, struct display_line *dl, int b rb = Dynarr_atp (rba, end - 1); width = rb->xpos + rb->width - xpos; +#endif /* now actually output the block. */ DEVMETH (d, output_display_block, (w, dl, block, start, end, start_pixpos, @@ -1243,17 +1293,6 @@ redisplay_output_layout (struct window *w, struct frame *f = XFRAME (w->frame); struct device *d = XDEVICE (f->device); int layout_height, layout_width; - /* We bogusly don't take f->extents_changed and f->glyphs_changed - into account. This is because if we do we always redisplay the - entire layout. So far I have seen no ill effects so we'll see. */ - int frame_really_changed = (f->buffers_changed || - f->clip_changed || - f->faces_changed || - f->frame_changed || - f->modeline_changed || - f->subwindows_changed || - f->windows_changed || - f->windows_structure_changed); XSETWINDOW (window, w); @@ -1269,7 +1308,7 @@ redisplay_output_layout (struct window *w, /* Highly dodgy optimization. We want to only output the whole layout if we really have to. */ - if (frame_really_changed + if (!IMAGE_INSTANCE_OPTIMIZE_OUTPUT (p) || IMAGE_INSTANCE_LAYOUT_CHANGED (p) || IMAGE_INSTANCE_WIDGET_FACE_CHANGED (p) || IMAGE_INSTANCE_SIZE_CHANGED (p) @@ -1342,6 +1381,7 @@ redisplay_output_layout (struct window *w, if (IMAGE_INSTANCEP (child)) { Lisp_Image_Instance* childii = XIMAGE_INSTANCE (child); + /* The enclosing layout offsets are +ve at this point */ struct display_glyph_area cdga; cdga.xoffset = IMAGE_INSTANCE_XOFFSET (childii) - dga->xoffset; @@ -1349,6 +1389,9 @@ redisplay_output_layout (struct window *w, cdga.width = glyph_width (child, window); cdga.height = glyph_height (child, window); + IMAGE_INSTANCE_OPTIMIZE_OUTPUT (childii) = + IMAGE_INSTANCE_OPTIMIZE_OUTPUT (p); + /* Although normalization is done by the output routines we have to do it here so that they don't try and clear all of db. This is true below also. */ @@ -1375,7 +1418,8 @@ redisplay_output_layout (struct window *w, generalisation.*/ if (redisplay_normalize_glyph_area (&cdb, &cdga) && - (frame_really_changed || IMAGE_INSTANCE_DIRTYP (childii))) + (!IMAGE_INSTANCE_OPTIMIZE_OUTPUT (childii) || + IMAGE_INSTANCE_DIRTYP (childii))) { struct display_line dl; /* this is fake */ Lisp_Object string = @@ -1409,14 +1453,16 @@ redisplay_output_layout (struct window *w, case IMAGE_MONO_PIXMAP: case IMAGE_COLOR_PIXMAP: - if (frame_really_changed || IMAGE_INSTANCE_DIRTYP (childii)) + if (!IMAGE_INSTANCE_OPTIMIZE_OUTPUT (childii) + || IMAGE_INSTANCE_DIRTYP (childii)) redisplay_output_pixmap (w, child, &cdb, &cdga, findex, 0, 0, 0, 0); break; case IMAGE_WIDGET: case IMAGE_SUBWINDOW: - if (frame_really_changed || IMAGE_INSTANCE_DIRTYP (childii)) + if (!IMAGE_INSTANCE_OPTIMIZE_OUTPUT (childii) || + IMAGE_INSTANCE_DIRTYP (childii)) redisplay_output_subwindow (w, child, &cdb, &cdga, findex, 0, 0, 0); break; @@ -1435,6 +1481,7 @@ redisplay_output_layout (struct window *w, abort (); } } + IMAGE_INSTANCE_OPTIMIZE_OUTPUT (childii) = 0; } } diff --git a/src/redisplay-tty.c b/src/redisplay-tty.c index 773eea3..6f6c197 100644 --- a/src/redisplay-tty.c +++ b/src/redisplay-tty.c @@ -333,79 +333,83 @@ tty_output_display_block (struct window *w, struct display_line *dl, int block, window, ERROR_ME_NOT, 1); if (IMAGE_INSTANCEP (instance)) - switch (XIMAGE_INSTANCE_TYPE (instance)) - { - case IMAGE_TEXT: + { + switch (XIMAGE_INSTANCE_TYPE (instance)) { - Bufbyte *temptemp; - Lisp_Object string = - XIMAGE_INSTANCE_TEXT_STRING (instance); - Bytecount len = XSTRING_LENGTH (string); - - /* In the unlikely instance that a garbage-collect - occurs during encoding, we at least need to - copy the string. - */ - temptemp = (Bufbyte *) alloca (len); - memcpy (temptemp, XSTRING_DATA (string), len); + case IMAGE_TEXT: { - int i; - - /* Now truncate the first rb->object.dglyph.xoffset - columns. */ - for (i = 0; i < rb->object.dglyph.xoffset;) - { + Bufbyte *temptemp; + Lisp_Object string = + XIMAGE_INSTANCE_TEXT_STRING (instance); + Bytecount len = XSTRING_LENGTH (string); + + /* In the unlikely instance that a garbage-collect + occurs during encoding, we at least need to + copy the string. + */ + temptemp = (Bufbyte *) alloca (len); + memcpy (temptemp, XSTRING_DATA (string), len); + { + int i; + + /* Now truncate the first rb->object.dglyph.xoffset + columns. */ + for (i = 0; i < rb->object.dglyph.xoffset;) + { #ifdef MULE - Emchar ch = charptr_emchar (temptemp); - i += XCHARSET_COLUMNS (CHAR_CHARSET (ch)); + Emchar ch = charptr_emchar (temptemp); + i += XCHARSET_COLUMNS (CHAR_CHARSET (ch)); #else - i++; /* telescope this */ + i++; /* telescope this */ #endif - INC_CHARPTR (temptemp); - } - - /* If we truncated one column too many, then - add a space at the beginning. */ - if (i > rb->object.dglyph.xoffset) + INC_CHARPTR (temptemp); + } + + /* If we truncated one column too many, then + add a space at the beginning. */ + if (i > rb->object.dglyph.xoffset) + { + assert (i > 0); + *--temptemp = ' '; + i--; + } + len -= i; + } + + tty_output_bufbyte_string (w, dl, temptemp, len, + xpos, findex, 0); + + if (xpos >= cursor_start + && (cursor_start < + xpos + (bufbyte_string_displayed_columns + (temptemp, len)))) { - assert (i > 0); - *--temptemp = ' '; - i--; + cmgoto (f, dl->ypos - 1, cursor_start); } - len -= i; } - - tty_output_bufbyte_string (w, dl, temptemp, len, - xpos, findex, 0); - - if (xpos >= cursor_start - && (cursor_start < - xpos + (bufbyte_string_displayed_columns - (temptemp, len)))) - { - cmgoto (f, dl->ypos - 1, cursor_start); - } + break; + + case IMAGE_MONO_PIXMAP: + case IMAGE_COLOR_PIXMAP: + case IMAGE_SUBWINDOW: + case IMAGE_WIDGET: + case IMAGE_LAYOUT: + /* just do nothing here */ + break; + + case IMAGE_POINTER: + abort (); + + case IMAGE_NOTHING: + /* nothing is as nothing does */ + break; + + default: + abort (); } - break; - - case IMAGE_MONO_PIXMAP: - case IMAGE_COLOR_PIXMAP: - case IMAGE_SUBWINDOW: - case IMAGE_WIDGET: - case IMAGE_LAYOUT: - /* just do nothing here */ - break; - - case IMAGE_POINTER: - abort (); - - case IMAGE_NOTHING: - /* nothing is as nothing does */ - break; - - default: - abort (); - } + IMAGE_INSTANCE_OPTIMIZE_OUTPUT + (XIMAGE_INSTANCE (instance)) = 0; + } xpos += rb->width; elt++; @@ -566,7 +570,7 @@ tty_clear_frame (struct frame *f) clear_to_end (f); #else /* #### Not implemented. */ - fprintf (stderr, "Not yet.\n"); + stderr_out ("Not yet.\n"); #endif } tty_turn_off_frame_face (f, Vdefault_face); diff --git a/src/redisplay-x.c b/src/redisplay-x.c index 8d68173..1abe97a 100644 --- a/src/redisplay-x.c +++ b/src/redisplay-x.c @@ -449,55 +449,59 @@ x_output_display_block (struct window *w, struct display_line *dl, int block, findex = rb->findex; if (IMAGE_INSTANCEP (instance)) - switch (XIMAGE_INSTANCE_TYPE (instance)) - { - case IMAGE_TEXT: + { + switch (XIMAGE_INSTANCE_TYPE (instance)) { - /* #### This is way losing. See the comment in - add_glyph_rune(). */ - Lisp_Object string = - XIMAGE_INSTANCE_TEXT_STRING (instance); - convert_bufbyte_string_into_emchar_dynarr - (XSTRING_DATA (string), XSTRING_LENGTH (string), buf); - - x_output_string (w, dl, buf, xpos, - rb->object.dglyph.xoffset, - start_pixpos, -1, findex, - (rb->cursor_type == CURSOR_ON), - cursor_start, cursor_width, - cursor_height); - Dynarr_reset (buf); + case IMAGE_TEXT: + { + /* #### This is way losing. See the comment in + add_glyph_rune(). */ + Lisp_Object string = + XIMAGE_INSTANCE_TEXT_STRING (instance); + convert_bufbyte_string_into_emchar_dynarr + (XSTRING_DATA (string), XSTRING_LENGTH (string), buf); + + x_output_string (w, dl, buf, xpos, + rb->object.dglyph.xoffset, + start_pixpos, -1, findex, + (rb->cursor_type == CURSOR_ON), + cursor_start, cursor_width, + cursor_height); + Dynarr_reset (buf); + } + break; + + case IMAGE_MONO_PIXMAP: + case IMAGE_COLOR_PIXMAP: + redisplay_output_pixmap (w, instance, &dbox, &dga, findex, + cursor_start, cursor_width, + cursor_height, 0); + break; + + case IMAGE_WIDGET: + case IMAGE_SUBWINDOW: + redisplay_output_subwindow (w, instance, &dbox, &dga, findex, + cursor_start, cursor_width, + cursor_height); + break; + + case IMAGE_LAYOUT: + redisplay_output_layout (w, instance, &dbox, &dga, findex, + cursor_start, cursor_width, + cursor_height); + break; + + case IMAGE_NOTHING: + /* nothing is as nothing does */ + break; + + case IMAGE_POINTER: + default: + abort (); } - break; - - case IMAGE_MONO_PIXMAP: - case IMAGE_COLOR_PIXMAP: - redisplay_output_pixmap (w, instance, &dbox, &dga, findex, - cursor_start, cursor_width, - cursor_height, 0); - break; - - case IMAGE_WIDGET: - case IMAGE_SUBWINDOW: - redisplay_output_subwindow (w, instance, &dbox, &dga, findex, - cursor_start, cursor_width, - cursor_height); - break; - - case IMAGE_LAYOUT: - redisplay_output_layout (w, instance, &dbox, &dga, findex, - cursor_start, cursor_width, - cursor_height); - break; - - case IMAGE_NOTHING: - /* nothing is as nothing does */ - break; - - case IMAGE_POINTER: - default: - abort (); - } + IMAGE_INSTANCE_OPTIMIZE_OUTPUT + (XIMAGE_INSTANCE (instance)) = 0; + } xpos += rb->width; elt++; @@ -682,7 +686,7 @@ x_get_gc (struct device *d, Lisp_Object font, Lisp_Object fg, Lisp_Object bg, { /* #### I fixed once case where this was getting it. It was a bad macro expansion (compiler bug). */ - fprintf (stderr, "Help! x_get_gc got a bogus fg value! fg = "); + stderr_out ("Help! x_get_gc got a bogus fg value! fg = "); debug_print (fg); fg = Qnil; } @@ -1320,8 +1324,8 @@ x_output_vertical_divider (struct window *w, int clear) spacing = XINT (w->vertical_divider_spacing); line_width = XINT (w->vertical_divider_line_width); x = WINDOW_RIGHT (w) - width; - y1 = WINDOW_TOP (w) + FRAME_TOP_GUTTER_BOUNDS (f); - y2 = WINDOW_BOTTOM (w) + FRAME_BOTTOM_GUTTER_BOUNDS (f); + y1 = WINDOW_TOP (w); + y2 = WINDOW_BOTTOM (w); memset (&gcv, ~0, sizeof (XGCValues)); @@ -1983,6 +1987,7 @@ x_flash (struct device *d) struct frame *f = device_selected_frame (d); struct window *w = XWINDOW (FRAME_ROOT_WINDOW (f)); Widget shell = FRAME_X_SHELL_WIDGET (f); + int flash_height; XSETFRAME (frame, f); @@ -1999,8 +2004,22 @@ x_flash (struct device *d) gcv.graphics_exposures = False; gc = gc_cache_lookup (DEVICE_X_GC_CACHE (XDEVICE (f->device)), &gcv, (GCForeground | GCFunction | GCGraphicsExposures)); - XFillRectangle (dpy, win, gc, w->pixel_left, w->pixel_top, - w->pixel_width, w->pixel_height); + default_face_height_and_width (frame, &flash_height, 0); + + /* If window is tall, flash top and bottom line. */ + if (EQ (Vvisible_bell, Qtop_bottom) && w->pixel_height > 3 * flash_height) + { + XFillRectangle (dpy, win, gc, w->pixel_left, w->pixel_top, + w->pixel_width, flash_height); + XFillRectangle (dpy, win, gc, w->pixel_left, + w->pixel_top + w->pixel_height - flash_height, + w->pixel_width, flash_height); + } + else + /* If it is short, flash it all. */ + XFillRectangle (dpy, win, gc, w->pixel_left, w->pixel_top, + w->pixel_width, w->pixel_height); + XSync (dpy, False); #ifdef HAVE_SELECT @@ -2020,8 +2039,20 @@ x_flash (struct device *d) #endif /* HAVE_POLL */ #endif /* HAVE_SELECT */ - XFillRectangle (dpy, win, gc, w->pixel_left, w->pixel_top, - w->pixel_width, w->pixel_height); + /* If window is tall, flash top and bottom line. */ + if (EQ (Vvisible_bell, Qtop_bottom) && w->pixel_height > 3 * flash_height) + { + XFillRectangle (dpy, win, gc, w->pixel_left, w->pixel_top, + w->pixel_width, flash_height); + XFillRectangle (dpy, win, gc, w->pixel_left, + w->pixel_top + w->pixel_height - flash_height, + w->pixel_width, flash_height); + } + else + /* If it is short, flash it all. */ + XFillRectangle (dpy, win, gc, w->pixel_left, w->pixel_top, + w->pixel_width, w->pixel_height); + XSync (dpy, False); return 1; diff --git a/src/redisplay.c b/src/redisplay.c index c3ef67c..6fe354b 100644 --- a/src/redisplay.c +++ b/src/redisplay.c @@ -364,8 +364,7 @@ int frame_changed; int glyphs_changed; int glyphs_changed_set; -/* non-zero if any displayed subwindow is in need of updating - somewhere. */ +/* non-zero if any subwindow has been deleted. */ int subwindows_changed; int subwindows_changed_set; @@ -419,9 +418,9 @@ int windows_structure_changed; Lisp_Object Vbar_cursor; Lisp_Object Qbar_cursor; -int visible_bell; /* If true and the terminal will support it - then the frame will flash instead of - beeping when an error occurs */ +Lisp_Object Vvisible_bell; /* If true and the terminal will support it + then the frame will flash instead of + beeping when an error occurs */ /* Nonzero means no need to redraw the entire frame on resuming a suspended Emacs. This is useful on terminals with multiple pages, @@ -471,6 +470,8 @@ Lisp_Object Vtext_cursor_visible_p; int column_number_start_at_one; +Lisp_Object Qtop_bottom; + #define WINDOW_SCROLLED(w) \ (w->hscroll > 0 || w->left_xoffset) @@ -1528,10 +1529,12 @@ add_glyph_rune (pos_data *data, struct glyph_block *gb, int pos_type, glyph sizes might have changed too */ invalidate_glyph_geometry_maybe (gb->glyph, w); - /* This makes sure the glyph is in the cachels. + /* This makes sure the glyph is in the cachels. - #### We need to change this so that we hold onto the glyph_index - here, not the glyph itself. */ + #### We do this to make sure the glyph is in the glyph cachels, + so that the dirty flag can be reset after redisplay has + finished. We should do this some other way, maybe by iterating + over the window cache of subwindows. */ get_glyph_cachel_index (w, gb->glyph); /* A nil extent indicates a special glyph (ex. truncator). */ @@ -3632,10 +3635,6 @@ generate_modeline (struct window *w, struct display_line *dl, int type) /* The modeline is at the bottom of the gutters. */ dl->ypos = WINDOW_BOTTOM (w); - /* adjust for the bottom gutter */ - if (window_is_lowest (w)) - dl->ypos -= FRAME_BOTTOM_GUTTER_BOUNDS (f); - rb.findex = MODELINE_INDEX; rb.xpos = dl->bounds.left_out; rb.width = dl->bounds.right_out - dl->bounds.left_out; @@ -3689,9 +3688,6 @@ generate_modeline (struct window *w, struct display_line *dl, int type) set this until we've generated the modeline in order to account for any embedded faces. */ dl->ypos = WINDOW_BOTTOM (w) - dl->descent - ypos_adj; - /* adjust for the bottom gutter */ - if (window_is_lowest (w)) - dl->ypos -= FRAME_BOTTOM_GUTTER_BOUNDS (f); } static Charcount @@ -5157,6 +5153,9 @@ regenerate_window (struct window *w, Bufpos start_pos, Bufpos point, int type) else prop = 0; + /* Make sure this is set always */ + /* Note the conversion at end */ + w->window_end_pos[type] = start_pos; while (ypos < yend) { struct display_line dl; @@ -5260,10 +5259,14 @@ regenerate_window (struct window *w, Bufpos start_pos, Bufpos point, int type) Dynarr_free (prop); /* #### More not quite right, but close enough. */ - /* #### Ben sez: apparently window_end_pos[] is measured + /* Ben sez: apparently window_end_pos[] is measured as the number of characters between the window end and the end of the buffer? This seems rather weirdo. What's - the justification for this? */ + the justification for this? + + JV sez: Because BUF_Z (b) would be a good initial value, however + that can change. This representation allows initalizing with 0. + */ w->window_end_pos[type] = BUF_Z (b) - w->window_end_pos[type]; if (need_modeline) @@ -6290,7 +6293,7 @@ call_redisplay_end_triggers (struct window *w, void *closure) /* Ensure that all windows on the given frame are correctly displayed. */ -static int +int redisplay_frame (struct frame *f, int preemption_check) { struct device *d = XDEVICE (f->device); @@ -6332,30 +6335,26 @@ redisplay_frame (struct frame *f, int preemption_check) being handled. */ update_frame_menubars (f); #endif /* HAVE_MENUBARS */ - /* widgets are similar to menus in that they can call lisp to - determine activation etc. Therefore update them before we get - into redisplay. This is primarily for connected widgets such as - radio buttons. */ - update_frame_subwindows (f); #ifdef HAVE_TOOLBARS /* Update the toolbars. */ update_frame_toolbars (f); #endif /* HAVE_TOOLBARS */ + /* Gutter update proper has to be done inside display when no frame + size changes can occur, thus we separately update the gutter + geometry here if it needs it. */ + update_frame_gutter_geometry (f); /* If we clear the frame we have to force its contents to be redrawn. */ if (f->clear) f->frame_changed = 1; - /* invalidate the subwindow cache. We use subwindows_changed here to + /* Invalidate the subwindow cache. We use subwindows_changed here to cause subwindows to get instantiated. This is because subwindows_state_changed is less strict - dealing with things like the clicked state of button. We have to do this before redisplaying the gutters as subwindows get unmapped in the process.*/ - if (!Dynarr_length (f->subwindow_cachels) - || f->subwindows_changed - || f->faces_changed - || f->frame_changed) + if (f->frame_changed || f->subwindows_changed) { reset_subwindow_cachels (f); /* we have to do this so the gutter gets regenerated. */ @@ -6364,16 +6363,6 @@ redisplay_frame (struct frame *f, int preemption_check) else mark_subwindow_cachels_as_not_updated (f); - /* We can now update the gutters, safe in the knowledge that our - efforts won't get undone. */ - - /* #### This can call lisp, it may be that if the subwindow cachels - have been reset there are no remaining references to the - displayed glyphs and so they get garbage collected. We should - consider putting this call inside the critical redisplay - section. */ - update_frame_gutters (f); - hold_frame_size_changes (); /* ----------------- BEGIN CRITICAL REDISPLAY SECTION ---------------- */ @@ -6400,6 +6389,16 @@ redisplay_frame (struct frame *f, int preemption_check) #### If a frame-size change does occur we should probably actually be preempting redisplay. */ + /* We can now update the gutters, safe in the knowledge that our + efforts won't get undone. */ + + /* This can call lisp, but redisplay is protected by binding + inhibit_quit. More importantly the code involving display lines + *assumes* that GC will not happen and so does not GCPRO + anything. Since we use this code the whole time with the gutters + we cannot allow GC to happen when manipulating the gutters. */ + update_frame_gutters (f); + /* Erase the frame before outputting its contents. */ if (f->clear) { @@ -7553,11 +7552,18 @@ point_would_be_visible (struct window *w, Bufpos startp, Bufpos point) displayed. The end of the last line is also know as the window end position. + WARNING: It is possible that rediplay failed to layout any lines for the + windows. Under normal circumstances this is rare. However it seems that it + does occur in the following situation: A mouse event has come in and we + need to compute its location in a window. That code (in + pixel_to_glyph_translation) already can handle 0 as an error return value. + #### With a little work this could probably be reworked as just a call to start_with_line_at_pixpos. */ static Bufpos -start_end_of_last_line (struct window *w, Bufpos startp, int end) +start_end_of_last_line (struct window *w, Bufpos startp, int end, + int may_error) { struct buffer *b = XBUFFER (w->buffer); line_start_cache_dynarr *cache = w->line_start_cache; @@ -7577,7 +7583,7 @@ start_end_of_last_line (struct window *w, Bufpos startp, int end) start_elt = point_in_line_start_cache (w, cur_start, 0); if (start_elt == -1) - abort (); /* this had better never happen */ + return may_error ? 0 : startp; while (1) { @@ -7641,7 +7647,7 @@ start_end_of_last_line (struct window *w, Bufpos startp, int end) Bufpos start_of_last_line (struct window *w, Bufpos startp) { - return start_end_of_last_line (w, startp, 0); + return start_end_of_last_line (w, startp, 0 , 0); } /* For the given window W, if display starts at STARTP, what will be @@ -7651,9 +7657,16 @@ start_of_last_line (struct window *w, Bufpos startp) Bufpos end_of_last_line (struct window *w, Bufpos startp) { - return start_end_of_last_line (w, startp, 1); + return start_end_of_last_line (w, startp, 1, 0); +} + +static Bufpos +end_of_last_line_may_error (struct window *w, Bufpos startp) +{ + return start_end_of_last_line (w, startp, 1, 1); } + /* For window W, what does the starting position have to be so that the line containing POINT will cover pixel position PIXPOS. */ @@ -8807,7 +8820,7 @@ pixel_to_glyph_translation (struct frame *f, int x_coord, int y_coord, if (!MARKERP ((*w)->start[CURRENT_DISP])) *closest = 0; else - *closest = end_of_last_line (*w, + *closest = end_of_last_line_may_error (*w, marker_position ((*w)->start[CURRENT_DISP])); *col = 0; UPDATE_CACHE_RETURN; @@ -8895,6 +8908,9 @@ input and is guaranteed to proceed to completion. f->clear = 1; redisplay_frame (f, 1); + /* See the comment in Fredisplay_frame. */ + RESET_CHANGED_SET_FLAGS; + return unbind_to (count, Qnil); } @@ -8922,6 +8938,15 @@ input and is guaranteed to proceed to completion. redisplay_frame (f, 1); + /* If we don't reset the global redisplay flafs here, subsequent + changes to the display will not get registered by redisplay + because it thinks it already has registered changes. If you + really knew what you were doing you could confuse redisplay by + calling Fredisplay_frame while updating another frame. We assume + that if you know what you are doing you will not be that + stupid. */ + RESET_CHANGED_SET_FLAGS; + return unbind_to (count, Qnil); } @@ -8951,6 +8976,9 @@ input and is guaranteed to proceed to completion. } redisplay_device (d, 0); + /* See the comment in Fredisplay_frame. */ + RESET_CHANGED_SET_FLAGS; + return unbind_to (count, Qnil); } @@ -8978,6 +9006,9 @@ input and is guaranteed to proceed to completion. redisplay_device (d, 0); + /* See the comment in Fredisplay_frame. */ + RESET_CHANGED_SET_FLAGS; + return unbind_to (count, Qnil); } @@ -9240,6 +9271,7 @@ syms_of_redisplay (void) defsymbol (&Qbar_cursor, "bar-cursor"); defsymbol (&Qredisplay_end_trigger_functions, "redisplay-end-trigger-functions"); + defsymbol (&Qtop_bottom, "top-bottom"); DEFSUBR (Fredisplay_echo_area); DEFSUBR (Fredraw_frame); @@ -9328,10 +9360,19 @@ If this is zero, point is always centered after it moves off screen. redisplay_variable_changed); truncate_partial_width_windows = 1; - DEFVAR_BOOL ("visible-bell", &visible_bell /* -*Non-nil means try to flash the frame to represent a bell. + DEFVAR_LISP ("visible-bell", &Vvisible_bell /* +*Non-nil substitutes a visual signal for the audible bell. + +Default behavior is to flash the whole screen. On some platforms, +special effects are available using the following values: + +'display Flash the whole screen (ie, the default behavior). +'top-bottom Flash only the top and bottom lines of the selected frame. + +When effects are unavailable on a platform, the visual bell is the +default, whole screen. (Currently only X supports any special effects.) */ ); - visible_bell = 0; + Vvisible_bell = Qnil; DEFVAR_BOOL ("no-redraw-on-reenter", &no_redraw_on_reenter /* *Non-nil means no need to redraw entire frame after suspending. diff --git a/src/redisplay.h b/src/redisplay.h index 9c91f6e..0ed8baf 100644 --- a/src/redisplay.h +++ b/src/redisplay.h @@ -415,24 +415,24 @@ struct extent_fragment If any of these flags are set, redisplay will look more carefully to see if anything has really changed. */ -/* non-nil if the contents of a buffer have changed since the last time - redisplay completed */ +/* Nonzero if the contents of a buffer have changed since the last time + redisplay completed. */ extern int buffers_changed; extern int buffers_changed_set; /* Nonzero if head_clip or tail_clip of a buffer has changed - since last redisplay that finished */ + since last redisplay that finished. */ extern int clip_changed; extern int clip_changed_set; -/* non-nil if any extent has changed since the last time redisplay completed */ +/* Nonzero if any extent has changed since the last time redisplay completed. */ extern int extents_changed; extern int extents_changed_set; -/* non-nil if any face has changed since the last time redisplay completed */ +/* Nonzero if any face has changed since the last time redisplay completed. */ extern int faces_changed; -/* Nonzero means one or more frames have been marked as garbaged */ +/* Nonzero means one or more frames have been marked as garbaged. */ extern int frame_changed; /* True if any of the builtin display glyphs (continuation, @@ -459,34 +459,34 @@ extern int icon_changed_set; extern int menubar_changed; extern int menubar_changed_set; -/* true iff we should redraw the modelines on the next redisplay */ +/* True iff we should redraw the modelines on the next redisplay. */ extern int modeline_changed; extern int modeline_changed_set; -/* non-nil if point has changed in some buffer since the last time - redisplay completed */ +/* Nonzero if point has changed in some buffer since the last time + redisplay completed. */ extern int point_changed; extern int point_changed_set; -/* non-nil if some frame has changed its size */ +/* Nonzero if some frame has changed its size. */ extern int size_changed; -/* non-nil if some device has signaled that it wants to change size */ +/* Nonzero if some device has signaled that it wants to change size. */ extern int asynch_device_change_pending; -/* non-nil if any toolbar has changed */ +/* Nonzero if any toolbar has changed. */ extern int toolbar_changed; extern int toolbar_changed_set; -/* non-nil if any gutter has changed */ +/* Nonzero if any gutter has changed. */ extern int gutter_changed; extern int gutter_changed_set; -/* non-nil if any window has changed since the last time redisplay completed */ +/* Nonzero if any window has changed since the last time redisplay completed */ extern int windows_changed; -/* non-nil if any frame's window structure has changed since the last - time redisplay completed */ +/* Nonzero if any frame's window structure has changed since the last + time redisplay completed. */ extern int windows_structure_changed; /* These macros can be relatively expensive. Since they are often @@ -550,7 +550,6 @@ extern int windows_structure_changed; buffers_changed = 0; \ clip_changed = 0; \ extents_changed = 0; \ - faces_changed = 0; \ frame_changed = 0; \ icon_changed = 0; \ menubar_changed = 0; \ @@ -560,7 +559,7 @@ extern int windows_structure_changed; gutter_changed = 0; \ glyphs_changed = 0; \ subwindows_changed = 0; \ - subwindows_state_changed = 0; \ + subwindows_state_changed = 0; \ windows_changed = 0; \ windows_structure_changed = 0; \ } while (0) @@ -578,7 +577,7 @@ extern int windows_structure_changed; (p)->toolbar_changed || \ (p)->gutter_changed || \ (p)->glyphs_changed || \ - (p)->size_changed || \ + (p)->size_changed || \ (p)->subwindows_changed || \ (p)->subwindows_state_changed || \ (p)->windows_changed || \ @@ -640,8 +639,8 @@ extern int in_display; where one page is used for Emacs and another for all else. */ extern int no_redraw_on_reenter; -/* Nonzero means flash the frame instead of ringing the bell. */ -extern int visible_bell; +/* Non-nil means flash the frame instead of ringing the bell. */ +extern Lisp_Object Vvisible_bell; /* Thickness of shadow border around 3D modelines. */ extern Lisp_Object Vmodeline_shadow_thickness; @@ -670,6 +669,8 @@ extern int cursor_in_echo_area; extern Lisp_Object Qbar_cursor, Qcursor_in_echo_area, Vwindow_system; +extern Lisp_Object Qtop_bottom; + /*************************************************************************/ /* redisplay exported functions */ @@ -684,6 +685,7 @@ int redisplay_frame_text_width_string (struct frame *f, Bufbyte *nonreloc, Lisp_Object reloc, Bytecount offset, Bytecount len); +int redisplay_frame (struct frame *f, int preemption_check); void redisplay (void); struct display_block *get_display_block_from_line (struct display_line *dl, enum display_type type); @@ -784,5 +786,8 @@ void redisplay_redraw_cursor (struct frame *f, int run_begin_end_meths); void output_display_line (struct window *w, display_line_dynarr *cdla, display_line_dynarr *ddla, int line, int force_start, int force_end); +void sync_display_line_structs (struct window *w, int line, int do_blocks, + display_line_dynarr *cdla, + display_line_dynarr *ddla); #endif /* INCLUDED_redisplay_h_ */ diff --git a/src/regex.c b/src/regex.c index 27fbf6e..683a4be 100644 --- a/src/regex.c +++ b/src/regex.c @@ -2388,7 +2388,7 @@ regex_compile (const char *pattern, int size, reg_syntax_t syntax, if (c == ':' || c == ']' || p == pend || c1 == CHAR_CLASS_MAX_LENGTH) break; - str[c1++] = c; + str[c1++] = (char) c; } str[c1] = '\0'; diff --git a/src/s/cygwin32.h b/src/s/cygwin32.h index d108923..937adab 100644 --- a/src/s/cygwin32.h +++ b/src/s/cygwin32.h @@ -42,26 +42,26 @@ Boston, MA 02111-1307, USA. */ /* cheesy way to determine cygwin version */ #ifndef NOT_C_CODE -#include -#ifdef HAVE_CYGWIN_VERSION_H -#include -#else -#ifdef SIGIO -#define CYGWIN_VERSION_DLL_MAJOR 19 -#define CYGWIN_VERSION_DLL_MINOR 0 -#define CYGWIN_B19 -#else -#define CYGWIN_VERSION_DLL_MAJOR 18 -#define CYGWIN_VERSION_DLL_MINOR 0 -#define BROKEN_CYGWIN -#endif -#endif +# include +# ifdef HAVE_CYGWIN_VERSION_H +# include +# else +# ifdef SIGIO +# define CYGWIN_VERSION_DLL_MAJOR 19 +# define CYGWIN_VERSION_DLL_MINOR 0 +# define CYGWIN_B19 +# else +# define CYGWIN_VERSION_DLL_MAJOR 18 +# define CYGWIN_VERSION_DLL_MINOR 0 +# define BROKEN_CYGWIN +# endif +# endif extern void cygwin32_win32_to_posix_path_list(const char*, char*); extern int cygwin32_win32_to_posix_path_list_buf_size(const char*); extern void cygwin32_posix_to_win32_path_list(const char*, char*); extern int cygwin32_posix_to_win32_path_list_buf_size(const char*); -#if CYGWIN_VERSION_DLL_MAJOR < 20 +# if CYGWIN_VERSION_DLL_MAJOR < 20 struct timeval; struct timezone; struct itimerval; @@ -85,28 +85,27 @@ extern int utimes(char *file, struct timeval *tvp); extern int srandom( unsigned seed); extern long random(); -#define SND_ASYNC 1 -#define SND_NODEFAULT 2 -#define SND_MEMORY 4 -#define SND_FILENAME 0x2000L -#define VK_APPS 0x5D -#define SIF_TRACKPOS 0x0010 -#define ICC_BAR_CLASSES 4 -#define FW_BLACK FW_HEAVY -#define FW_ULTRABOLD FW_EXTRABOLD -#define FW_DEMIBOLD FW_SEMIBOLD -#define FW_ULTRALIGHT FW_EXTRALIGHT -#define APPCMD_FILTERINITS 0x20L -#define CBF_FAIL_SELFCONNECTIONS 0x1000 -#define CBF_SKIP_ALLNOTIFICATIONS 0x3C0000 -#define CBF_FAIL_ADVISES 0x4000 -#define CBF_FAIL_POKES 0x10000 -#define CBF_FAIL_REQUESTS 0x20000 -#define SZDDESYS_TOPIC "System" -#define JOHAB_CHARSET 130 -#define MAC_CHARSET 77 - -#endif +# define SND_ASYNC 1 +# define SND_NODEFAULT 2 +# define SND_MEMORY 4 +# define SND_FILENAME 0x2000L +# define VK_APPS 0x5D +# define SIF_TRACKPOS 0x0010 +# define ICC_BAR_CLASSES 4 +# define FW_BLACK FW_HEAVY +# define FW_ULTRABOLD FW_EXTRABOLD +# define FW_DEMIBOLD FW_SEMIBOLD +# define FW_ULTRALIGHT FW_EXTRALIGHT +# define APPCMD_FILTERINITS 0x20L +# define CBF_FAIL_SELFCONNECTIONS 0x1000 +# define CBF_SKIP_ALLNOTIFICATIONS 0x3C0000 +# define CBF_FAIL_ADVISES 0x4000 +# define CBF_FAIL_POKES 0x10000 +# define CBF_FAIL_REQUESTS 0x20000 +# define SZDDESYS_TOPIC "System" +# define JOHAB_CHARSET 130 +# define MAC_CHARSET 77 +# endif #endif #ifndef SPI_GETWHEELSCROLLLINES @@ -160,6 +159,7 @@ extern long random(); #define TEXT_END -1 #define DATA_END -1 #define HEAP_IN_DATA +#define NO_LIM_DATA #define UNEXEC "unexcw.o" #ifdef CYGWIN_VERSION_DLL_MAJOR diff --git a/src/s/mingw32.h b/src/s/mingw32.h index f65ba74..9cb42bf 100644 --- a/src/s/mingw32.h +++ b/src/s/mingw32.h @@ -28,8 +28,6 @@ Boston, MA 02111-1307, USA. */ #define DOS_NT /* MSDOS or WINDOWSNT */ #endif -#define PBS_SMOOTH 0x01 - #ifdef HAVE_MS_WINDOWS #define HAVE_NTGUI #define HAVE_FACES @@ -51,7 +49,6 @@ Boston, MA 02111-1307, USA. */ #define TIME_ONESHOT 0 #define TIME_PERIODIC 1 #define LOCALE_USE_CP_ACP 0x40000000 -#define SHGFI_EXETYPE 0x2000 #define NSIG 23 #ifndef SPI_GETWHEELSCROLLLINES @@ -63,9 +60,34 @@ Boston, MA 02111-1307, USA. */ #ifndef WHEEL_DELTA #define WHEEL_DELTA 120 #endif + +/* this is necessary to get the TCS_* definitions in */ +#define _WIN32_IE 0x0400 + #ifndef WM_MOUSEWHEEL #define WM_MOUSEWHEEL 0x20A #endif +#ifndef TCS_BOTTOM +#define TCS_BOTTOM 0x0002 +#endif +#ifndef TCS_VERTICAL +#define TCS_VERTICAL 0x0080 +#endif +#ifndef PHYSICALWIDTH +#define PHYSICALWIDTH 110 +#endif +#ifndef PHYSICALHEIGHT +#define PHYSICALHEIGHT 111 +#endif +#ifndef PHYSICALOFFSETX +#define PHYSICALOFFSETX 112 +#endif +#ifndef PHYSICALOFFSETY +#define PHYSICALOFFSETY 113 +#endif +#ifndef PBS_SMOOTH +#define PBS_SMOOTH 0x01 +#endif /* translate NT world unexec stuff to our a.out definitions */ @@ -169,12 +191,6 @@ Boston, MA 02111-1307, USA. */ #include #endif -typedef unsigned int MMRESULT; -typedef struct timecaps_tag { - unsigned int wPeriodMin; - unsigned int wPeriodMax; -} TIMECAPS; - /* IO calls that are emulated or shadowed */ #define pipe sys_pipe int sys_pipe (int * phandles); @@ -199,11 +215,6 @@ int kill (int pid, int sig); #define popen _popen #define pclose _pclose -typedef int uid_t; -typedef int gid_t; -typedef int pid_t; -typedef int ssize_t; - /* Encapsulation of system calls */ #ifndef DONT_ENCAPSULATE #define getpid sys_getpid @@ -230,13 +241,23 @@ uid_t getuid (void); uid_t geteuid (void); gid_t getgid (void); gid_t getegid (void); + +#if CYGWIN_VERSION_DLL_MAJOR <= 21 +#define _ftime ftime #define _timeb timeb +#endif /* Stuff that gets set wrongly or otherwise */ #define HAVE_SETITIMER #define HAVE_GETTIMEOFDAY #define HAVE_SELECT /*#define HAVE_STRUCT_UTIMBUF*/ +#ifndef HAVE_H_ERRNO +#define HAVE_H_ERRNO +#endif +#ifndef HAVE_TZNAME +#define HAVE_TZNAME +#endif #undef GETTIMEOFDAY_ONE_ARGUMENT #undef HAVE_SYS_WAIT_H diff --git a/src/s/windowsnt.h b/src/s/windowsnt.h index 33d49a4..ed8b98a 100644 --- a/src/s/windowsnt.h +++ b/src/s/windowsnt.h @@ -58,7 +58,7 @@ typedef int pid_t; #define SIZEOF_SHORT 2 #define SIZEOF_INT 4 #define SIZEOF_LONG 4 -#define SIZEOF_LONG_LONG 8 +#define SIZEOF_LONG_LONG 0 #define SIZEOF_VOID_P 4 /* NOMULTIPLEJOBS should be defined if your system's shell diff --git a/src/scrollbar.c b/src/scrollbar.c index 7f586b4..18360c0 100644 --- a/src/scrollbar.c +++ b/src/scrollbar.c @@ -460,14 +460,10 @@ update_scrollbar_instance (struct window *w, int vertical, if (!NILP (w->scrollbar_on_left_p)) { x_offset = WINDOW_LEFT (w); - if (window_is_leftmost (w)) - x_offset += FRAME_LEFT_GUTTER_BOUNDS (f); } else { x_offset = WINDOW_RIGHT (w) - scrollbar_width; - if (window_is_rightmost (w)) - x_offset -= FRAME_RIGHT_GUTTER_BOUNDS (f); if (window_needs_vertical_divider (w)) x_offset -= window_divider_width (w); } @@ -481,8 +477,6 @@ update_scrollbar_instance (struct window *w, int vertical, if (!NILP (w->scrollbar_on_top_p)) { y_offset += WINDOW_TOP (w); - if (window_is_highest (w)) - y_offset += FRAME_TOP_GUTTER_BOUNDS (f); } else { diff --git a/src/select-msw.c b/src/select-msw.c index f72a46c..7d11bd9 100644 --- a/src/select-msw.c +++ b/src/select-msw.c @@ -34,175 +34,178 @@ Boston, MA 02111-1307, USA. */ #include "console-msw.h" -DEFUN ("mswindows-set-clipboard", Fmswindows_set_clipboard, 1, 1, 0, /* -Copy STRING to the mswindows clipboard. -*/ - (string)) -{ - int rawsize, size, i; - unsigned char *src, *dst, *next; - HGLOBAL h = NULL; - struct frame *f = NULL; - - CHECK_STRING (string); - - /* Calculate size with LFs converted to CRLFs because - * CF_TEXT format uses CRLF delimited ASCIIZ */ - src = XSTRING_DATA (string); - size = rawsize = XSTRING_LENGTH (string) + 1; - for (i=0; icaching->offset_into_struct_window); + /* #### What's the point of this check, other than to optimize image + instance instantiation? Unless you specify a caching instantiate + method the instantiation that specifier_instance will do will + always create a new copy. Thus EQ will always fail. Unfortunately + calling equal is no good either as this doesn't take into account + things attached to the specifier - for instance strings on + extents. --andyp */ if (!EQ (newval, *location)) { Lisp_Object oldval = *location; diff --git a/src/specifier.h b/src/specifier.h index bb6472d..17461cb 100644 --- a/src/specifier.h +++ b/src/specifier.h @@ -267,9 +267,9 @@ extern const struct lrecord_description specifier_empty_extra_description[]; #ifdef ERROR_CHECK_TYPECHECK #define DECLARE_SPECIFIER_TYPE(type) \ extern struct specifier_methods * type##_specifier_methods; \ -INLINE struct type##_specifier * \ +INLINE_HEADER struct type##_specifier * \ error_check_##type##_specifier_data (Lisp_Specifier *sp); \ -INLINE struct type##_specifier * \ +INLINE_HEADER struct type##_specifier * \ error_check_##type##_specifier_data (Lisp_Specifier *sp) \ { \ if (SPECIFIERP (sp->magic_parent)) \ @@ -282,9 +282,9 @@ error_check_##type##_specifier_data (Lisp_Specifier *sp) \ assert (SPECIFIER_TYPE_P (sp, type)); \ return (struct type##_specifier *) sp->data; \ } \ -INLINE Lisp_Specifier * \ +INLINE_HEADER Lisp_Specifier * \ error_check_##type##_specifier_type (Lisp_Object obj); \ -INLINE Lisp_Specifier * \ +INLINE_HEADER Lisp_Specifier * \ error_check_##type##_specifier_type (Lisp_Object obj) \ { \ Lisp_Specifier *sp = XSPECIFIER (obj); \ @@ -293,11 +293,11 @@ error_check_##type##_specifier_type (Lisp_Object obj) \ } \ DECLARE_NOTHING #else -#define DECLARE_SPECIFIER_TYPE(type) \ +#define DECLARE_SPECIFIER_TYPE(type) \ extern struct specifier_methods * type##_specifier_methods #endif /* ERROR_CHECK_TYPECHECK */ -#define DEFINE_SPECIFIER_TYPE(type) \ +#define DEFINE_SPECIFIER_TYPE(type) \ struct specifier_methods * type##_specifier_methods #define INITIALIZE_SPECIFIER_TYPE(type, obj_name, pred_sym) do { \ @@ -305,12 +305,12 @@ struct specifier_methods * type##_specifier_methods type##_specifier_methods->name = obj_name; \ type##_specifier_methods->extra_description = \ specifier_empty_extra_description; \ - defsymbol_nodump (&type##_specifier_methods->predicate_symbol, pred_sym); \ - add_entry_to_specifier_type_list (Q##type, type##_specifier_methods); \ - dumpstruct (&type##_specifier_methods, &specifier_methods_description); \ + defsymbol_nodump (&type##_specifier_methods->predicate_symbol, pred_sym); \ + add_entry_to_specifier_type_list (Q##type, type##_specifier_methods); \ + dumpstruct (&type##_specifier_methods, &specifier_methods_description); \ } while (0) -#define REINITIALIZE_SPECIFIER_TYPE(type) do { \ +#define REINITIALIZE_SPECIFIER_TYPE(type) do { \ staticpro_nodump (&type##_specifier_methods->predicate_symbol); \ } while (0) @@ -366,7 +366,7 @@ do { \ # define XSETSPECIFIER_TYPE(x, p, type) XSETSPECIFIER (x, p) #endif /* ERROR_CHECK_TYPE_CHECK */ -#define SPECIFIER_TYPEP(x, type) \ +#define SPECIFIER_TYPEP(x, type) \ (SPECIFIERP (x) && SPECIFIER_TYPE_P (XSPECIFIER (x), type)) #define CHECK_SPECIFIER_TYPE(x, type) do { \ CHECK_SPECIFIER (x); \ diff --git a/src/symsinit.h b/src/symsinit.h index 9b17ab5..baa3c66 100644 --- a/src/symsinit.h +++ b/src/symsinit.h @@ -152,6 +152,7 @@ void syms_of_widget (void); void syms_of_window (void); void syms_of_select_x (void); void syms_of_eldap (void); +void syms_of_postgresql (void); void syms_of_gpmevent (void); /* Initialize the console types (dump-time but for reinit_). */ @@ -290,6 +291,7 @@ void vars_of_extents (void); void reinit_vars_of_extents (void); void vars_of_faces (void); void vars_of_fileio (void); +void reinit_vars_of_fileio (void); void vars_of_filelock (void); void vars_of_floatfns (void); void vars_of_font_lock (void); @@ -376,6 +378,7 @@ void reinit_vars_of_window (void); void vars_of_select_x (void); void reinit_vars_of_select_x (void); void vars_of_eldap (void); +void vars_of_postgresql (void); void vars_of_gpmevent (void); /* Initialize specifier variables (dump-time only). */ @@ -428,7 +431,7 @@ void reinit_eval (void); void init_buffer (void); void init_callproc (void); -void init_console_stream (void); +void init_console_stream (int reinit); void init_device_tty (void); void init_dosfns (void); void init_editfns (void); diff --git a/src/syntax.c b/src/syntax.c index ceb942d..c84502a 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -295,14 +295,13 @@ charset_syntax (struct buffer *buf, Lisp_Object charset, int *multi_p_out) Lisp_Object syntax_match (Lisp_Object table, Emchar ch) { - Lisp_Object code = CHAR_TABLE_VALUE_UNSAFE (XCHAR_TABLE (table), ch); + Lisp_Object code = XCHAR_TABLE_VALUE_UNSAFE (table, ch); Lisp_Object code2 = code; if (CONSP (code)) code2 = XCAR (code); if (SYNTAX_FROM_CODE (XINT (code2)) == Sinherit) - code = CHAR_TABLE_VALUE_UNSAFE (XCHAR_TABLE (Vstandard_syntax_table), - ch); + code = XCHAR_TABLE_VALUE_UNSAFE (Vstandard_syntax_table, ch); return CONSP (code) ? XCDR (code) : Qnil; } diff --git a/src/syntax.h b/src/syntax.h index aa78eab..d94fc04 100644 --- a/src/syntax.h +++ b/src/syntax.h @@ -72,8 +72,8 @@ enum syntaxcode charset_syntax (struct buffer *buf, Lisp_Object charset, #define SYNTAX_CODE_UNSAFE(table, c) \ XINT (CHAR_TABLE_VALUE_UNSAFE (table, c)) -INLINE int SYNTAX_CODE (Lisp_Char_Table *table, Emchar c); -INLINE int +INLINE_HEADER int SYNTAX_CODE (Lisp_Char_Table *table, Emchar c); +INLINE_HEADER int SYNTAX_CODE (Lisp_Char_Table *table, Emchar c) { return SYNTAX_CODE_UNSAFE (table, c); @@ -85,8 +85,8 @@ SYNTAX_CODE (Lisp_Char_Table *table, Emchar c) #define SYNTAX_FROM_CODE(code) ((enum syntaxcode) ((code) & 0177)) #define SYNTAX(table, c) SYNTAX_FROM_CODE (SYNTAX_CODE (table, c)) -INLINE int WORD_SYNTAX_P (Lisp_Char_Table *table, Emchar c); -INLINE int +INLINE_HEADER int WORD_SYNTAX_P (Lisp_Char_Table *table, Emchar c); +INLINE_HEADER int WORD_SYNTAX_P (Lisp_Char_Table *table, Emchar c) { return SYNTAX (table, c) == Sword; diff --git a/src/sysdep.c b/src/sysdep.c index fbf71ac..f3aa717 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -93,6 +93,11 @@ Boston, MA 02111-1307, USA. */ #include "ntheap.h" #endif +#ifdef HAVE_MMAP +#include +#include +#endif + /* ------------------------------- */ /* TTY definitions */ /* ------------------------------- */ @@ -612,20 +617,20 @@ restore_signal_handlers (struct save_signal *saved_handlers) } #ifdef WINDOWSNT + pid_t sys_getpid (void) { return abs (getpid ()); } + #endif /* WINDOWSNT */ /* Fork a subshell. */ static void sys_subshell (void) { -#ifdef WINDOWSNT - HANDLE pid; -#else +#ifndef WINDOWSNT int pid; #endif struct save_signal saved_handlers[5]; @@ -660,21 +665,17 @@ sys_subshell (void) str = (unsigned char *) alloca (XSTRING_LENGTH (dir) + 2); len = XSTRING_LENGTH (dir); memcpy (str, XSTRING_DATA (dir), len); - /* #### Unix specific */ - if (str[len - 1] != '/') str[len++] = '/'; + if (!IS_ANY_SEP (str[len - 1])) + str[len++] = DIRECTORY_SEP; str[len] = 0; xyzzy: -#ifdef WINDOWSNT - pid = NULL; -#else /* not WINDOWSNT */ - +#ifndef WINDOWSNT pid = fork (); if (pid == -1) error ("Can't spawn subshell"); if (pid == 0) - #endif /* not WINDOWSNT */ { char *sh = 0; @@ -688,7 +689,18 @@ sys_subshell (void) if (str) sys_chdir (str); -#if !defined (NO_SUBPROCESSES) && !defined (WINDOWSNT) +#ifdef WINDOWSNT + + /* Waits for process completion */ + if (_spawnlp (_P_WAIT, sh, sh, NULL) != 0) + error ("Can't spawn subshell"); + else + return; /* we're done, no need to wait for termination */ + } + +#else + +#if !defined (NO_SUBPROCESSES) close_process_descs (); /* Close Emacs's pipes/ptys */ #endif @@ -697,23 +709,18 @@ sys_subshell (void) nice (-emacs_priority); /* Give the new shell the default priority */ #endif -#ifdef WINDOWSNT - /* Waits for process completion */ - pid = (HANDLE) _spawnlp (_P_WAIT, sh, sh, NULL); - if (pid == NULL) - write (1, "Can't execute subshell", 22); - -#else /* not WINDOWSNT */ execlp (sh, sh, 0); write (1, "Can't execute subshell", 22); _exit (1); -#endif /* not WINDOWSNT */ } save_signal_handlers (saved_handlers); synch_process_alive = 1; wait_for_termination (pid); restore_signal_handlers (saved_handlers); + +#endif /* not WINDOWSNT */ + } #endif /* !defined (SIGTSTP) && !defined (USG_JOBCTRL) */ @@ -2191,7 +2198,7 @@ start_of_text (void) * */ -#ifdef ORDINARY_LINK +#if defined(ORDINARY_LINK) && !defined(__MINGW32__) extern char **environ; #endif @@ -2208,7 +2215,7 @@ start_of_data (void) * is known to live at or near the start of the system crt0.c, and * we don't sweat the handful of bytes that might lose. */ -#ifdef HEAP_IN_DATA +#if defined (HEAP_IN_DATA) && !defined(PDUMP) extern char* static_heap_base; if (!initialized) return static_heap_base; diff --git a/src/sysdep.h b/src/sysdep.h index 2911014..c5476de 100644 --- a/src/sysdep.h +++ b/src/sysdep.h @@ -29,6 +29,10 @@ Boston, MA 02111-1307, USA. */ extern char **environ; #endif +#ifdef PDUMP +int pdump_read_file (char **pdump_start_pos, size_t *pdump_length); +#endif + int eight_bit_tty (struct device *d); void stuff_char (struct console *con, int c); diff --git a/src/sysfile.h b/src/sysfile.h index 69179b7..f573ce3 100644 --- a/src/sysfile.h +++ b/src/sysfile.h @@ -24,6 +24,7 @@ Boston, MA 02111-1307, USA. */ #define INCLUDED_sysfile_h_ #include +#include #ifndef WINDOWSNT #include /* does not always imply this */ @@ -206,10 +207,21 @@ Boston, MA 02111-1307, USA. */ #define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) #endif +/* Client .c files should simply use `PATH_MAX'. */ +#ifndef PATH_MAX +# if defined (_POSIX_PATH_MAX) +# define PATH_MAX _POSIX_PATH_MAX +# elif defined (MAXPATHLEN) +# define PATH_MAX MAXPATHLEN +# else +# define PATH_MAX 1024 +# endif +#endif + +/* MAXPATHLEN is deprecated, but, as of this writing, still used. */ #ifndef MAXPATHLEN -/* in 4.1, param.h fails to define this. */ -#define MAXPATHLEN 1024 -#endif /* not MAXPATHLEN */ +# define MAXPATHLEN 1024 +#endif #ifndef X_OK # define X_OK 01 diff --git a/src/window.c b/src/window.c index 7f84aa0..473c778 100644 --- a/src/window.c +++ b/src/window.c @@ -290,6 +290,11 @@ allocate_window (void) INIT_DISP_VARIABLE (window_end_pos, 0); p->redisplay_end_trigger = Qnil; + p->gutter_extent_modiff[0] = 0; + p->gutter_extent_modiff[1] = 0; + p->gutter_extent_modiff[2] = 0; + p->gutter_extent_modiff[3] = 0; + #define WINDOW_SLOT(slot, compare) p->slot = Qnil #include "winslots.h" @@ -1010,31 +1015,35 @@ window_right_margin_width (struct window *w) relative to the frame, not the window. ****************************************************************************/ -int -window_top_gutter_height (struct window *w) +static int +window_top_window_gutter_height (struct window *w) { - int gutter = WINDOW_REAL_TOP_GUTTER_BOUNDS (w); - if (!NILP (w->hchild) || !NILP (w->vchild)) return 0; - + #ifdef HAVE_SCROLLBARS if (!NILP (w->scrollbar_on_top_p)) - return window_scrollbar_height (w) + gutter; + return window_scrollbar_height (w); else #endif - return gutter; + return 0; } int -window_bottom_gutter_height (struct window *w) +window_top_gutter_height (struct window *w) +{ + return window_top_window_gutter_height (w); +} + +static int +window_bottom_window_gutter_height (struct window *w) { - int gutter = WINDOW_REAL_BOTTOM_GUTTER_BOUNDS (w); + int gutter; if (!NILP (w->hchild) || !NILP (w->vchild)) return 0; - gutter += window_modeline_height (w); + gutter = window_modeline_height (w); #ifdef HAVE_SCROLLBARS if (NILP (w->scrollbar_on_top_p)) @@ -1045,25 +1054,35 @@ window_bottom_gutter_height (struct window *w) } int -window_left_gutter_width (struct window *w, int modeline) +window_bottom_gutter_height (struct window *w) { - int gutter = WINDOW_REAL_LEFT_GUTTER_BOUNDS (w); + return window_bottom_window_gutter_height (w); +} +static int +window_left_window_gutter_width (struct window *w, int modeline) +{ if (!NILP (w->hchild) || !NILP (w->vchild)) return 0; #ifdef HAVE_SCROLLBARS if (!modeline && !NILP (w->scrollbar_on_left_p)) - gutter += window_scrollbar_width (w); + return window_scrollbar_width (w); #endif - return gutter; + return 0; } int -window_right_gutter_width (struct window *w, int modeline) +window_left_gutter_width (struct window *w, int modeline) +{ + return window_left_window_gutter_width (w, modeline); +} + +static int +window_right_window_gutter_width (struct window *w, int modeline) { - int gutter = WINDOW_REAL_RIGHT_GUTTER_BOUNDS (w); + int gutter = 0; if (!NILP (w->hchild) || !NILP (w->vchild)) return 0; @@ -1079,6 +1098,18 @@ window_right_gutter_width (struct window *w, int modeline) return gutter; } +int +window_right_gutter_width (struct window *w, int modeline) +{ + return window_right_window_gutter_width (w, modeline); +} + +static int +window_pixel_height (struct window* w) +{ + return WINDOW_HEIGHT (w); +} + DEFUN ("windowp", Fwindowp, 1, 1, 0, /* Return t if OBJ is a window. @@ -1294,6 +1325,22 @@ be different. Use `window-height' to get consistent results in geometry calculations. Use `window-displayed-height' to get the actual number of lines currently displayed in a window. + +The names are somewhat confusing; here's a table to help out: + + width height +------------------------------------------------------------------------- +w/o gutters + (rows/columns) window-width window-text-area-height + (pixels) window-text-area-pixel-width window-text-area-pixel-height + +with gutters + (rows/columns) window-full-width window-height + (pixels) window-pixel-width window-pixel-height + +actually displayed + (rows/columns) ---- window-displayed-height + (pixels) ---- window-displayed-text-pixel-height */ (window)) { @@ -1320,7 +1367,20 @@ This includes the window's modeline and horizontal scrollbar (if any). */ (window)) { - return make_int (decode_window (window)->pixel_height); + return make_int (window_pixel_height (decode_window (window))); +} + +DEFUN ("window-text-area-height", Fwindow_text_area_height, 0, 1, 0, /* +Return the number of default lines in the text area of WINDOW. +This actually works by dividing the window's text area pixel height (i.e. +excluding the modeline and horizontal scrollbar, if any) by the height of the +default font; therefore, the number of displayed lines will probably +be different. +See also `window-height' and `window-displayed-height'. +*/ + (window)) +{ + return make_int (window_char_height (decode_window (window), 0)); } DEFUN ("window-text-area-pixel-height", @@ -1401,13 +1461,25 @@ is non-nil, do not include space occupied by clipped lines. DEFUN ("window-width", Fwindow_width, 0, 1, 0, /* Return the number of display columns in WINDOW. -This is the width that is usable columns available for text in WINDOW. +This is the width that is usable columns available for text in WINDOW, +and does not include vertical scrollbars, dividers, or the like. See also +`window-full-width' and `window-height'. */ (window)) { return make_int (window_char_width (decode_window (window), 0)); } +DEFUN ("window-full-width", Fwindow_full_width, 0, 1, 0, /* +Return the total number of columns in WINDOW. +This is like `window-width' but includes vertical scrollbars, dividers, +etc. +*/ + (window)) +{ + return make_int (window_char_width (decode_window (window), 1)); +} + DEFUN ("window-pixel-width", Fwindow_pixel_width, 0, 1, 0, /* Return the width of WINDOW in pixels. Defaults to current window. */ @@ -1526,15 +1598,14 @@ Afterwards the end-trigger value is reset to nil. DEFUN ("window-pixel-edges", Fwindow_pixel_edges, 0, 1, 0, /* Return a list of the pixel edge coordinates of WINDOW. \(LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at top left corner of frame. -The frame toolbars and menubars are considered to be outside of this area. +The frame toolbars, menubars and gutters are considered to be outside of this area. */ (window)) { struct window *w = decode_window (window); - struct frame *f = XFRAME (w->frame); - int left = w->pixel_left - FRAME_LEFT_BORDER_END (f); - int top = w->pixel_top - FRAME_TOP_BORDER_END (f); + int left = w->pixel_left; + int top = w->pixel_top; return list4 (make_int (left), make_int (top), @@ -3277,8 +3348,9 @@ global or per-frame buffer ordering. /* we have already caught dead-window errors */ if (!NILP (w->hchild) || !NILP (w->vchild)) error ("Trying to select non-leaf window"); - + w->use_time = make_int (++window_select_count); + if (EQ (window, old_selected_window)) return window; @@ -3402,6 +3474,10 @@ make_dummy_parent (Lisp_Object window) p->line_start_cache = Dynarr_new (line_start_cache); p->face_cachels = Dynarr_new (face_cachel); p->glyph_cachels = Dynarr_new (glyph_cachel); + p->subwindow_instance_cache = + make_lisp_hash_table (10, + HASH_TABLE_KEY_WEAK, + HASH_TABLE_EQ); /* Put new into window structure in place of window */ replace_window (window, new); @@ -3617,12 +3693,6 @@ selected window. } static int -window_pixel_height (Lisp_Object window) -{ - return WINDOW_HEIGHT (XWINDOW (window)); -} - -static int window_pixel_height_to_char_height (struct window *w, int pixel_height, int include_gutters_p) { @@ -3635,8 +3705,8 @@ window_pixel_height_to_char_height (struct window *w, int pixel_height, avail_height = (pixel_height - (include_gutters_p ? 0 : - window_top_gutter_height (w) + - window_bottom_gutter_height (w))); + window_top_window_gutter_height (w) + + window_bottom_window_gutter_height (w))); default_face_height_and_width (window, &defheight, &defwidth); @@ -3667,8 +3737,8 @@ window_char_height_to_pixel_height (struct window *w, int char_height, avail_height = char_height * defheight; pixel_height = (avail_height + (include_gutters_p ? 0 : - window_top_gutter_height (w) + - window_bottom_gutter_height (w))); + window_top_window_gutter_height (w) + + window_bottom_window_gutter_height (w))); /* It's the calling function's responsibility to check these values and make sure they're not out of range. @@ -3681,11 +3751,12 @@ window_char_height_to_pixel_height (struct window *w, int char_height, /* Return number of default lines of text can fit in the window W. If INCLUDE_GUTTERS_P is 1, include "gutter" space (modeline plus horizontal scrollbar) in the space that is used for the calculation. + This doesn't include space used by the frame gutters. */ int window_char_height (struct window *w, int include_gutters_p) { - return window_pixel_height_to_char_height (w, WINDOW_HEIGHT (w), + return window_pixel_height_to_char_height (w, window_pixel_height (w), include_gutters_p); } @@ -3765,6 +3836,8 @@ window_pixel_width (Lisp_Object window) return WINDOW_WIDTH (XWINDOW (window)); } +/* Calculate the pixel of a window, optionally including margin space + but no vertical gutters. */ static int window_pixel_width_to_char_width (struct window *w, int pixel_width, int include_margins_p) @@ -3809,8 +3882,8 @@ window_char_width_to_pixel_width (struct window *w, int char_width, avail_width = char_width * defwidth; pixel_width = (avail_width + - window_left_gutter_width (w, 0) + - window_right_gutter_width (w, 0) + + window_left_window_gutter_width (w, 0) + + window_right_window_gutter_width (w, 0) + (include_margins_p ? 0 : window_left_margin_width (w)) + (include_margins_p ? 0 : window_right_margin_width (w))); @@ -3849,6 +3922,12 @@ window_char_width (struct window *w, int include_margins_p) (widthflag ? window_min_width : MINI_WINDOW_P (XWINDOW (window)) \ ? 1 : window_min_height) +static int +window_pixheight (Lisp_Object w) +{ + return window_pixel_height (XWINDOW (w)); +} + /* Unlike set_window_pixheight, this function also changes the heights of the siblings so as to keep everything consistent. */ @@ -3864,7 +3943,7 @@ change_window_height (struct window *win, int delta, int widthflag, int *sizep; int (*sizefun) (Lisp_Object) = (widthflag ? window_pixel_width - : window_pixel_height); + : window_pixheight); void (*setsizefun) (Lisp_Object, int, int) = (widthflag ? set_window_pixwidth : set_window_pixheight); @@ -5102,7 +5181,7 @@ by `current-window-configuration' (which see). frame "sizes" maybe equal but the windows still should be resized. This is tickled alot by the new "character size stays constant" policy in 21.0. It leads to very wierd - glitches (and possibly craches when asserts are tickled). + glitches (and possibly crashes when asserts are tickled). Just changing the units doens't help because changing the toolbar configuration can also change the pixel positions. @@ -5175,6 +5254,10 @@ by `current-window-configuration' (which see). w->glyph_cachels = Dynarr_new (glyph_cachel); if (!w->line_start_cache) w->line_start_cache = Dynarr_new (line_start_cache); + w->gutter_extent_modiff[0] = 0; + w->gutter_extent_modiff[1] = 0; + w->gutter_extent_modiff[2] = 0; + w->gutter_extent_modiff[3] = 0; w->dead = 0; if (p->parent_index >= 0) @@ -5374,6 +5457,7 @@ by `current-window-configuration' (which see). the restored current_window. */ if (f == selected_frame ()) { +#if 0 /* When using `pop-window-configuration', often the minibuffer ends up as the selected window even though it's not active ... I really don't know the cause of this, but it should never @@ -5382,15 +5466,25 @@ by `current-window-configuration' (which see). #### Find out why this is really going wrong. */ if (!minibuf_level && MINI_WINDOW_P (XWINDOW (config->current_window))) - Fselect_window (Fnext_window (config->current_window, - Qnil, Qnil, Qnil), - Qnil); + window_to_select = Fnext_window (config->current_window, + Qnil, Qnil, Qnil); else - Fselect_window (config->current_window, Qnil); + window_to_select = config->current_window; +#endif + /* Do this last so that buffer stacking is calculated + correctly. */ + Fselect_window (config->current_window, Qnil); + if (!NILP (new_current_buffer)) - Fset_buffer (new_current_buffer); + { + Fset_buffer (new_current_buffer); + Frecord_buffer (new_current_buffer); + } else - Fset_buffer (XWINDOW (Fselected_window (Qnil))->buffer); + { + Fset_buffer (XWINDOW (config->current_window)->buffer); + Frecord_buffer (XWINDOW (config->current_window)->buffer); + } } else set_frame_selected_window (f, config->current_window); @@ -5599,7 +5693,14 @@ its value is -not- saved. /* config->frame_width = FRAME_WIDTH (f); config->frame_height = FRAME_HEIGHT (f); */ - config->current_window = FRAME_SELECTED_WINDOW (f); + /* When using `push-window-configuration', often the minibuffer ends + up as the selected window because functions run as the result of + user interaction e.g. hyper-apropros. It seems to me the sensible + thing to do is not record the minibuffer here. */ + if (FRAME_MINIBUF_ONLY_P (f) || minibuf_level) + config->current_window = FRAME_SELECTED_WINDOW (f); + else + config->current_window = FRAME_LAST_NONMINIBUF_WINDOW (f); XSETBUFFER (config->current_buffer, current_buffer); config->minibuffer_scroll_window = Vminibuffer_scroll_window; config->root_window = FRAME_ROOT_WINDOW (f); @@ -5739,15 +5840,15 @@ debug_print_window (Lisp_Object window, int level) child = Fwindow_first_hchild (window); for (i = level; i > 0; i--) - putc ('\t', stderr); + stderr_out ("\t"); - fputs ("#buffer; if (!NILP (buffer) && BUFFERP (buffer)) - fprintf (stderr, " on %s", XSTRING_DATA (XBUFFER (buffer)->name)); + stderr_out (" on %s", XSTRING_DATA (XBUFFER (buffer)->name)); } - fprintf (stderr, " 0x%x>", XWINDOW (window)->header.uid); + stderr_out (" 0x%x>", XWINDOW (window)->header.uid); while (!NILP (child)) { @@ -5815,8 +5916,10 @@ syms_of_window (void) DEFSUBR (Fwindow_height); DEFSUBR (Fwindow_displayed_height); DEFSUBR (Fwindow_width); + DEFSUBR (Fwindow_full_width); DEFSUBR (Fwindow_pixel_height); DEFSUBR (Fwindow_pixel_width); + DEFSUBR (Fwindow_text_area_height); DEFSUBR (Fwindow_text_area_pixel_height); DEFSUBR (Fwindow_displayed_text_pixel_height); DEFSUBR (Fwindow_text_area_pixel_width); diff --git a/src/window.h b/src/window.h index d228076..8144a47 100644 --- a/src/window.h +++ b/src/window.h @@ -184,6 +184,9 @@ struct window must run the redisplay-end-trigger-functions. */ Lisp_Object redisplay_end_trigger; + /* Set by the extent code when extents in the gutter are changed. */ + int gutter_extent_modiff[4]; + /* Set by redisplay to the last position seen. This is used to implement the redisplay-end-trigger-functions. */ Bufpos last_redisplay_pos; diff --git a/src/winslots.h b/src/winslots.h index 95d74b5..c97390f 100644 --- a/src/winslots.h +++ b/src/winslots.h @@ -102,6 +102,10 @@ Boston, MA 02111-1307, USA. */ This is not a size hog because the value here is not copied, and will be shared with the specs in the specifier. */ WINDOW_SLOT_ARRAY (gutter, 4, EQUAL_WRAPPED); + /* Real (pre-calculated) gutter specification for each of the four positions. + This is not a specifier, it is calculated by the specifier change + functions. */ + WINDOW_SLOT_ARRAY (real_gutter, 4, EQUAL_WRAPPED); /* Gutter size for each of the four positions. */ WINDOW_SLOT_ARRAY (gutter_size, 4, EQUAL_WRAPPED); /* Real (pre-calculated) gutter size for each of the four positions. diff --git a/tests/ChangeLog b/tests/ChangeLog index 5921166..141d4d7 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,16 @@ +2000-03-20 Martin Buchholz + + * XEmacs 21.2.32 is released. + +2000-03-10 Martin Buchholz + + * automated/mule-tests.el: Check that (make-temp-name) returns + unique values. + +2000-03-06 Yoshiki Hayashi + + * gutter-test.el: Fix name of specifier. + 2000-02-23 Martin Buchholz * XEmacs 21.2.31 is released. diff --git a/tests/automated/mule-tests.el b/tests/automated/mule-tests.el index b73163c..eb2317c 100644 --- a/tests/automated/mule-tests.el +++ b/tests/automated/mule-tests.el @@ -299,6 +299,7 @@ the Assert macro checks for correctness." (file-name-coding-system 'iso-8859-2)) ;; This is how you suppress output from `message', called by `write-region' (flet ((append-message (&rest args) ())) + (Assert (not (equal name1 name2))) (Assert (not (file-exists-p name1))) (write-region (point-min) (point-max) name1) (Assert (file-exists-p name1)) diff --git a/tests/glyph-test.el b/tests/glyph-test.el index b9c04a1..425b1b8 100644 --- a/tests/glyph-test.el +++ b/tests/glyph-test.el @@ -18,26 +18,26 @@ (make-extent (point) (point)) (setq radio-button1 (make-glyph - [button :descriptor ["ok " (setq ok-select t) + [button :descriptor ["ok1" (setq ok-select t) :style radio :selected ok-select]]))) ;; button in a group (set-extent-begin-glyph (make-extent (point) (point)) (setq radio-button2 (make-glyph - [button :descriptor ["ok" (setq ok-select nil) :style radio +` [button :descriptor ["ok2" (setq ok-select nil) :style radio :selected (not ok-select)]]))) ;; toggle button (set-extent-begin-glyph (make-extent (point) (point)) (setq tbutton - (make-glyph [button :descriptor ["ok" (setq ok-select nil) + (make-glyph [button :descriptor ["ok3" (setq ok-select nil) :style toggle :selected (not ok-select)]]))) (set-extent-begin-glyph (make-extent (point) (point)) (setq toggle-button - (make-glyph [button :descriptor ["ok" :style toggle + (make-glyph [button :descriptor ["ok4" :style toggle :callback (setq ok-select (not ok-select)) :selected ok-select]]))) @@ -69,9 +69,9 @@ [tab-control :descriptor "My Tab" :face highlight :orientation right - :properties (:items (["One" foo] - ["Two" fee] - ["Three" foo]))]))) + :properties (:items (["One" foo :selected t] + ["Two" fee :selected nil] + ["Three" foo :selected nil]))]))) ;; progress gauge (set-extent-begin-glyph diff --git a/tests/gutter-test.el b/tests/gutter-test.el index 41a870a..27b6d07 100644 --- a/tests/gutter-test.el +++ b/tests/gutter-test.el @@ -1,17 +1,23 @@ -(setq str "Hello There\nHello Again") +(setq str "Hello\nAgain") +(setq str-ext (make-extent 0 5 str)) (set-extent-begin-glyph - (make-extent 0 0 str) + str-ext (make-glyph [xpm :file "../etc/xemacs-icon.xpm"])) +(set-extent-property str-ext 'mouse-face 'highlight) +(setq str2 "Hello\n") +(setq str2-ext (make-extent 0 1 str2)) (set-extent-begin-glyph - (make-extent 3 3 str) + str2-ext (make-glyph [button :width 5 :height 1 :face modeline-mousable + :callback (set-specifier bottom-gutter-visible-p '(str2)) :descriptor "ok" :selected t])) -(set-specifier default-gutter-height 'autodetect) -(set-specifier default-gutter-width 40) -(set-specifier default-gutter-border-width 2) -(set-specifier default-gutter str) -(set-default-gutter-position 'bottom) +(set-specifier bottom-gutter-height 'autodetect) +(set-specifier bottom-gutter-border-width 2) +(set-gutter-element bottom-gutter 'str str) +(set-gutter-element bottom-gutter 'str2 str2) +(set-gutter-element-visible-p bottom-gutter-visible-p 'str t) +(set-gutter-element-visible-p bottom-gutter-visible-p 'str2 t) diff --git a/version.sh b/version.sh index faa7b82..f6f2925 100644 --- a/version.sh +++ b/version.sh @@ -2,8 +2,8 @@ emacs_is_beta=t emacs_major_version=21 emacs_minor_version=2 -emacs_beta_version=31 -xemacs_codename="Iris" +emacs_beta_version=32 +xemacs_codename="Kastor & Polydeukes" infodock_major_version=4 infodock_minor_version=0 infodock_build_version=8